/**********************************************/
/*** Fonction permettant de creer une Befig ***/
/*** a partir du code genere par la lecture ***/
/*** de la Befig obtenue par le compilateur ***/
/***       fichier compile : ms_y.vbe ***/
/**********************************************/

#include <stdio.h>
#include "mut312.h"
#include "log120.h"
#include "beh104.h"

befig_list *ms_y()
{
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("ms_y"));
befigAux->BERIN = beh_addberin(befigAux->BERIN,namealloc("mpx_s"));
befigAux->BERIN = beh_addberin(befigAux->BERIN,namealloc("vss"));
befigAux->BERIN = beh_addberin(befigAux->BERIN,namealloc("vdd"));
befigAux->BERIN = beh_addberin(befigAux->BERIN,namealloc("l"));
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"),'O','B');
befigAux->BEPOR = beh_addbepor(befigAux->BEPOR,namealloc("l"),'I','B');
befigAux->BEPOR = beh_addbepor(befigAux->BEPOR,namealloc("i"),'I','B');
befigAux->BEPOR = (bepor_list *)reverse((chain_list *)befigAux->BEPOR);
abl = charToExpr("mpx_s");
befigAux->BEOUT = beh_addbeout(befigAux->BEOUT,namealloc("t"),abl,NULL);
valabl = charToExpr("i");
cndabl = charToExpr("(not l)");
biabl = beh_addbiabl(biabl,"label0", cndabl, valabl);
biabl->USER = NULL;
biabl->USER = addptype(biabl->USER,0,0);
befigAux->BEREG = beh_addbereg(befigAux->BEREG,namealloc("mpx_s"),biabl,NULL);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 2087;
genAux = beh_addbegen(genAux,"rup_l","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 962;
genAux = beh_addbegen(genAux,"tplh_l","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 1318;
genAux = beh_addbegen(genAux,"rdown_l","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 509;
genAux = beh_addbegen(genAux,"tphl_l","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 151;
genAux = beh_addbegen(genAux,"cin_l","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 0;
genAux = beh_addbegen(genAux,"rup_l","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 0;
genAux = beh_addbegen(genAux,"tphh_l","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 0;
genAux = beh_addbegen(genAux,"rdown_l","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 0;
genAux = beh_addbegen(genAux,"tpll_l","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 151;
genAux = beh_addbegen(genAux,"cin_l","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 3500;
genAux = beh_addbegen(genAux,"rup_i","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 413;
genAux = beh_addbegen(genAux,"tphh_i","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 3500;
genAux = beh_addbegen(genAux,"rdown_i","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 949;
genAux = beh_addbegen(genAux,"tpll_i","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 39;
genAux = beh_addbegen(genAux,"cin_i","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 1636;
genAux = beh_addbegen(genAux,"rup_smpx_s","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 2643;
genAux = beh_addbegen(genAux,"tphh_smpx_s","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 993;
genAux = beh_addbegen(genAux,"rdown_smpx_s","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 4010;
genAux = beh_addbegen(genAux,"tpll_smpx_s","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 137;
genAux = beh_addbegen(genAux,"cin_smpx_s","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 1132;
genAux = beh_addbegen(genAux,"fanout","natural",(void *)pentier);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 13;
genAux = beh_addbegen(genAux,"area","natural",(void *)pentier);
befigAux->USER = addptype(NULL,BEH_GENERIC,(void *)genAux);
befigAux->CIRCUI = NULL;
befigAux->NEXT = NULL;
abl = charToExpr("(not (xor (not (xor (not (xor (and (not (xor vdd '1')) (not (xor vss '0'))) '1')) '1')) '1'))");
befigAux->BEMSG = beh_addbemsg(befigAux->BEMSG,NULL,'W',"power supply is missing on ms_y",abl,NULL);

return befigAux;
}
