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

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

befig_list *high_y()
{
befig_list *befigAux;
chain_list *abl;
begen_list *genAux = NULL;
int *pentier;
befigAux = beh_addbefig(NULL,namealloc("high_y"));
befigAux->BERIN = beh_addberin(befigAux->BERIN,namealloc("vss"));
befigAux->BERIN = beh_addberin(befigAux->BERIN,namealloc("vdd"));
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 = (bepor_list *)reverse((chain_list *)befigAux->BEPOR);
abl = charToExpr("'1'");
befigAux->BEOUT = beh_addbeout(befigAux->BEOUT,namealloc("t"),abl,NULL);
pentier = (int *) mbkalloc(sizeof(int));
*pentier = 1;
genAux = beh_addbegen(genAux,"surface","natural",(void *)pentier);
/*
befigAux->USER = addptype(NULL,BEH_GENERIC,(void *)genAux);
*/
befigAux->BEGEN = genAux;
befigAux->FLAG = 0;
befigAux->CIRCUI = NULL;
befigAux->NEXT = NULL;
abl = charToExpr("(and (not (xor vdd '1')) (not (xor vss '0')))");
befigAux->BEMSG = beh_addbemsg(befigAux->BEMSG,namealloc("NULL"),'W',"power supply is missing on high_y",abl,NULL);

return befigAux;
}
