/*****************************************************/
/*****  Fonction permettant de creer une Befig.  *****/
/*** Ce fichier est genere par le ~luc/luc/GEN/gen ***/
/**** qui prend en entree un .vbe et qui le parse ****/
/****            batch macrogenere                ****/
/***       fichier compile : bus1.vbe    ***/
/**********************************************/

#include <stdio.h>
#include MUT_H
#include LOG_H
#include BEH_H

befig_list *bus1()
{
befig_list *befigAux;
chain_list *abl;
begen_list *genAux = NULL;
int *pentier;
biabl_list *biabl = NULL;
chain_list *cndabl = NULL;
chain_list *valabl = NULL;
befigAux = beh_addbefig(NULL,namealloc("bus1"));
befigAux->BERIN = beh_addberin(befigAux->BERIN,namealloc("vss"));
befigAux->BERIN = beh_addberin(befigAux->BERIN,namealloc("vdd"));
befigAux->BERIN = beh_addberin(befigAux->BERIN,namealloc("v"));
befigAux->BERIN = beh_addberin(befigAux->BERIN,namealloc("i"));
befigAux->BEPOR = beh_addbepor(befigAux->BEPOR,namealloc("vss"),'I','B');
befigAux->BEPOR = beh_addbepor(befigAux->BEPOR,namealloc("vdd"),'I','B');
befigAux->BEPOR = beh_addbepor(befigAux->BEPOR,namealloc("t"),'Z','M');
befigAux->BEPOR = beh_addbepor(befigAux->BEPOR,namealloc("v"),'I','B');
befigAux->BEPOR = beh_addbepor(befigAux->BEPOR,namealloc("i"),'I','B');
befigAux->BEPOR = (bepor_list *)reverse((chain_list *)befigAux->BEPOR);
valabl = charToExpr("i");
cndabl = charToExpr("v");
biabl = beh_addbiabl(biabl,"label0", cndabl, valabl);
befigAux->BEBUS = beh_addbebus(befigAux->BEBUS,namealloc("t"),biabl,NULL,'M');
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 798;
genAux = beh_addbegen(genAux,"rup_v","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 2626;
genAux = beh_addbegen(genAux,"tphh_v","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 522;
genAux = beh_addbegen(genAux,"rdown_v","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 2507;
genAux = beh_addbegen(genAux,"tphl_v","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 88;
genAux = beh_addbegen(genAux,"cin_v","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 798;
genAux = beh_addbegen(genAux,"rup_i","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 2927;
genAux = beh_addbegen(genAux,"tphh_i","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 522;
genAux = beh_addbegen(genAux,"rdown_i","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 3062;
genAux = beh_addbegen(genAux,"tpll_i","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 46;
genAux = beh_addbegen(genAux,"cin_i","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 2016;
genAux = beh_addbegen(genAux,"area","natural",(void *)pentier);
befigAux->BEGEN = genAux;
befigAux->CIRCUI = NULL;
befigAux->NEXT = NULL;
abl = charToExpr("(and vdd (not vss))");
befigAux->BEMSG = beh_addbemsg(befigAux->BEMSG,NULL,'W',"power supply is missing on bus1",abl,NULL);

return befigAux;
}
