Code cleanup with cppcheck & gcc 4.4.6 (RHEL6).
This commit is way too big. Next time split it tool by tool. All tool sources have been checked with cppcheck & gcc. All correctables errors/warning have been removed: * Now uses correct conversion specifiers in printf(), mostly 'u' instead of 'd' for unsigneds. * In scanf(), uses systematically a maximum field width, 11 for int, 22 for long int and the appropriate length for char*. * In strcpy(), no longer uses same array for source & dest, but uses an intermediate array. * Remove (or comment) unused variables. * In C++ files, correct constructors attribute initialisation and disable copy constructors. * When possible, correct memory leaks. Some corrections would need a more intimate knowledge of the source than I do. * Removed some "gets()" calls. * In parsers, undeclare yyunput & yyinput when necessary. * NOT correct variable scope as it may clutter the code (my opinion). Specific tools remark: * In <asimut>, comment beginning with "FRAGILE" signals a very ugly trick: structs passed as losig_list but with only the two first fields identical. * In <graal> & <dreal> for char used as table index, uses a cast toward int, but in <xfsm>, <xgra>, <xsch> & <xvpn> simply declares the variables int. * In <cells>, dp_nmux_x1.ap, shrink the ALU2 part of the ALU3 terminals so they do not collide with neighboring track. Has do to it manually as Graal refuse to shrink them. The same correction must be done on other cells for nero/kite dual compliance.
This commit is contained in:
parent
43da04a7e4
commit
97aee2580b
|
@ -11,5 +11,13 @@ install-sh
|
||||||
ltmain.sh
|
ltmain.sh
|
||||||
missing
|
missing
|
||||||
depcomp
|
depcomp
|
||||||
|
alliance/src/configure.in
|
||||||
dev/scripts/cppcheck/*
|
dev/scripts/cppcheck/*
|
||||||
|
*.eps
|
||||||
|
*.aux
|
||||||
|
*.dvi
|
||||||
|
*.pdf
|
||||||
|
*.log
|
||||||
|
*.lst
|
||||||
|
archives/
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct beaux headaux;
|
struct beaux headaux;
|
||||||
struct beaux *ptlastaux;
|
struct beaux *ptlastaux = NULL;
|
||||||
struct beaux *ptbeaux;
|
struct beaux *ptbeaux;
|
||||||
|
|
||||||
if (listbeaux != NULL)
|
if (listbeaux != NULL)
|
||||||
|
@ -131,7 +131,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct bebus headbus;
|
struct bebus headbus;
|
||||||
struct bebus *ptlastbus;
|
struct bebus *ptlastbus = NULL;
|
||||||
struct bebus *ptbebus;
|
struct bebus *ptbebus;
|
||||||
|
|
||||||
if (listbebus != NULL)
|
if (listbebus != NULL)
|
||||||
|
@ -210,7 +210,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct bebux headbux;
|
struct bebux headbux;
|
||||||
struct bebux *ptlastbux;
|
struct bebux *ptlastbux = NULL;
|
||||||
struct bebux *ptbebux;
|
struct bebux *ptbebux;
|
||||||
|
|
||||||
if (listbebux != NULL)
|
if (listbebux != NULL)
|
||||||
|
@ -292,7 +292,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct befig headfig;
|
struct befig headfig;
|
||||||
struct befig *ptlastfig;
|
struct befig *ptlastfig = NULL;
|
||||||
struct befig *ptbefig;
|
struct befig *ptbefig;
|
||||||
struct ptype *ptptype;
|
struct ptype *ptptype;
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct begen headgen;
|
struct begen headgen;
|
||||||
struct begen *ptlastgen;
|
struct begen *ptlastgen = NULL;
|
||||||
struct begen *ptbegen;
|
struct begen *ptbegen;
|
||||||
|
|
||||||
if (listbegen != NULL)
|
if (listbegen != NULL)
|
||||||
|
@ -470,7 +470,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct bemsg headmsg;
|
struct bemsg headmsg;
|
||||||
struct bemsg *ptlastmsg;
|
struct bemsg *ptlastmsg = NULL;
|
||||||
struct bemsg *ptbemsg;
|
struct bemsg *ptbemsg;
|
||||||
|
|
||||||
if (listbemsg != NULL)
|
if (listbemsg != NULL)
|
||||||
|
@ -545,7 +545,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct beout headout;
|
struct beout headout;
|
||||||
struct beout *ptlastout;
|
struct beout *ptlastout = NULL;
|
||||||
struct beout *ptbeout;
|
struct beout *ptbeout;
|
||||||
|
|
||||||
if (listbeout != NULL)
|
if (listbeout != NULL)
|
||||||
|
@ -618,7 +618,7 @@ char *beporname; /* name of the BEPOR to be deleted */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct bepor headpor;
|
struct bepor headpor;
|
||||||
struct bepor *ptlastpor;
|
struct bepor *ptlastpor = NULL;
|
||||||
struct bepor *ptbepor;
|
struct bepor *ptbepor;
|
||||||
|
|
||||||
if (listbepor != NULL)
|
if (listbepor != NULL)
|
||||||
|
@ -681,7 +681,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct bereg headreg;
|
struct bereg headreg;
|
||||||
struct bereg *ptlastreg;
|
struct bereg *ptlastreg = NULL;
|
||||||
struct bereg *ptbereg;
|
struct bereg *ptbereg;
|
||||||
|
|
||||||
if (listbereg != NULL)
|
if (listbereg != NULL)
|
||||||
|
@ -758,7 +758,7 @@ char *berinname; /* name of the BERIN to be deleted */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct berin headrin;
|
struct berin headrin;
|
||||||
struct berin *ptlastrin;
|
struct berin *ptlastrin = NULL;
|
||||||
struct berin *ptberin;
|
struct berin *ptberin;
|
||||||
|
|
||||||
if (listberin != NULL)
|
if (listberin != NULL)
|
||||||
|
|
|
@ -112,8 +112,8 @@ int main( argc, argv )
|
||||||
int FlagVerbose = 0;
|
int FlagVerbose = 0;
|
||||||
int FlagSave = 0;
|
int FlagSave = 0;
|
||||||
int FlagDisplay = 0;
|
int FlagDisplay = 0;
|
||||||
int FlagErase = 0;
|
/*int FlagErase = 0;*/
|
||||||
int FlagBdd = 0;
|
/*int FlagBdd = 0;*/
|
||||||
|
|
||||||
mbkenv();
|
mbkenv();
|
||||||
autenv();
|
autenv();
|
||||||
|
@ -135,9 +135,9 @@ int main( argc, argv )
|
||||||
|
|
||||||
switch ( Option )
|
switch ( Option )
|
||||||
{
|
{
|
||||||
case 'E' : FlagErase = 1;
|
case 'E' : /*FlagErase = 1;*/
|
||||||
break;
|
break;
|
||||||
case 'B' : FlagBdd = 1;
|
case 'B' : /*FlagBdd = 1;*/
|
||||||
break;
|
break;
|
||||||
case 'D' : FlagDisplay = 1;
|
case 'D' : FlagDisplay = 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -106,7 +106,6 @@ int main( argc, argv )
|
||||||
char **argv;
|
char **argv;
|
||||||
{
|
{
|
||||||
ablexpr *Expr1;
|
ablexpr *Expr1;
|
||||||
ablexpr *Expr2;
|
|
||||||
|
|
||||||
mbkenv();
|
mbkenv();
|
||||||
autenv();
|
autenv();
|
||||||
|
|
|
@ -354,7 +354,6 @@ struct begex *gexpnt;
|
||||||
case ABL_NOR :
|
case ABL_NOR :
|
||||||
case ABL_NXOR :
|
case ABL_NXOR :
|
||||||
freflag = 1; break;
|
freflag = 1; break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,13 +369,10 @@ struct begex *gexpnt;
|
||||||
case ABL_NAND :
|
case ABL_NAND :
|
||||||
case ABL_AND :
|
case ABL_AND :
|
||||||
freflag = 1; break;
|
freflag = 1; break;
|
||||||
break;
|
|
||||||
case ABL_XOR :
|
case ABL_XOR :
|
||||||
gexpnt->TERM = ABL_NXOR; freflag = 1; break;
|
gexpnt->TERM = ABL_NXOR; freflag = 1; break;
|
||||||
break;
|
|
||||||
case ABL_NXOR :
|
case ABL_NXOR :
|
||||||
gexpnt->TERM = ABL_XOR ; freflag = 1; break;
|
gexpnt->TERM = ABL_XOR ; freflag = 1; break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,10 +461,10 @@ struct chain *expr;
|
||||||
|
|
||||||
{
|
{
|
||||||
char delayed [128];
|
char delayed [128];
|
||||||
static char *str_zero = NULL;
|
static char *str_zero = NULL;
|
||||||
static char *str_dc = NULL;
|
static char *str_dc = NULL;
|
||||||
static char *str_one = NULL;
|
static char *str_one = NULL;
|
||||||
struct begex *resgex ;
|
struct begex *resgex = NULL;
|
||||||
struct begex *gex_elt ;
|
struct begex *gex_elt ;
|
||||||
struct chain *oper_list ;
|
struct chain *oper_list ;
|
||||||
struct chain *operand ;
|
struct chain *operand ;
|
||||||
|
|
|
@ -401,7 +401,7 @@ void bhl_orderbdd( BehFigure, AuxFlag, OrderFlag )
|
||||||
BehReg = BehReg->NEXT;
|
BehReg = BehReg->NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
BehRin = BehFigure->BERIN;
|
/*BehRin = BehFigure->BERIN;*/
|
||||||
|
|
||||||
# ifdef BHL_ORDER_DEBUG
|
# ifdef BHL_ORDER_DEBUG
|
||||||
viewauthtable( BhlHashTableOrder, viewauthelem );
|
viewauthtable( BhlHashTableOrder, viewauthelem );
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
|
||||||
|
%option noinput
|
||||||
|
%option nounput
|
||||||
|
|
||||||
/*------------------------------------------------------------\
|
/*------------------------------------------------------------\
|
||||||
| |
|
| |
|
||||||
| This file is part of the Alliance CAD System Copyright |
|
| This file is part of the Alliance CAD System Copyright |
|
||||||
|
|
|
@ -49,6 +49,10 @@
|
||||||
#include "bvl_util.h"
|
#include "bvl_util.h"
|
||||||
#include "bvl_byacc.h"
|
#include "bvl_byacc.h"
|
||||||
#include "bvl_bedef.h"
|
#include "bvl_bedef.h"
|
||||||
|
#include "bvl_bspec.h"
|
||||||
|
|
||||||
|
extern int yylex ( );
|
||||||
|
extern void yyerror ( );
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
@ -300,7 +304,7 @@ design_file
|
||||||
{
|
{
|
||||||
if (beaux_pnt->ABL == NULL)
|
if (beaux_pnt->ABL == NULL)
|
||||||
{
|
{
|
||||||
fprintf (stderr,"`%s` Warning %d line %d :",BVL_CURFIL,40,BVL_LINNUM);
|
fprintf (stderr,"`%s` Warning %d line %ld :",BVL_CURFIL,40,BVL_LINNUM);
|
||||||
fprintf (stderr,"signal `%s` never assigned\n",beaux_pnt->NAME);
|
fprintf (stderr,"signal `%s` never assigned\n",beaux_pnt->NAME);
|
||||||
|
|
||||||
/*removing signal*/
|
/*removing signal*/
|
||||||
|
@ -1459,7 +1463,7 @@ choices
|
||||||
Bar
|
Bar
|
||||||
choice
|
choice
|
||||||
{
|
{
|
||||||
if ($3 == "others")
|
if (!strncmp($3,"others",7))
|
||||||
bvl_error (30,NULL);
|
bvl_error (30,NULL);
|
||||||
BVL_NM1LST = addchain (BVL_NM1LST ,$3);
|
BVL_NM1LST = addchain (BVL_NM1LST ,$3);
|
||||||
}
|
}
|
||||||
|
@ -2039,8 +2043,8 @@ short right )
|
||||||
char auxflg = 0;
|
char auxflg = 0;
|
||||||
char buxflg = 0;
|
char buxflg = 0;
|
||||||
char regflg = 0;
|
char regflg = 0;
|
||||||
char lclmod;
|
char lclmod = 0;
|
||||||
char lcltyp;
|
char lcltyp = 0;
|
||||||
char extname[100];
|
char extname[100];
|
||||||
short i;
|
short i;
|
||||||
short inc = 1;
|
short inc = 1;
|
||||||
|
|
|
@ -114,7 +114,7 @@ short right; /* array's right bound (= -1 if scalar) */
|
||||||
{
|
{
|
||||||
for (i=left ; i!=(right+inc) ; i+=inc)
|
for (i=left ; i!=(right+inc) ; i+=inc)
|
||||||
{
|
{
|
||||||
sprintf (extname,"%s %d",(char *)ptauxnam->DATA,i);
|
sprintf (extname,"%s %ld",(char *)ptauxnam->DATA,i);
|
||||||
name = namealloc(extname);
|
name = namealloc(extname);
|
||||||
if (ptauxnat != NULL)
|
if (ptauxnat != NULL)
|
||||||
{
|
{
|
||||||
|
@ -213,11 +213,13 @@ long right )
|
||||||
char lcl_buffer[256];
|
char lcl_buffer[256];
|
||||||
long inc;
|
long inc;
|
||||||
long i;
|
long i;
|
||||||
|
#if 0
|
||||||
char true_flag_un = 0;
|
char true_flag_un = 0;
|
||||||
char true_flag_zero = 0;
|
char true_flag_zero = 0;
|
||||||
|
|
||||||
struct chain *abl_un = createablatom("'1'");
|
struct chain *abl_un = createablatom("'1'");
|
||||||
struct chain *abl_zero = createablatom("'0'");
|
struct chain *abl_zero = createablatom("'0'");
|
||||||
|
#endif
|
||||||
result.IDENT = NULL;
|
result.IDENT = NULL;
|
||||||
result.LIST_ABL = NULL;
|
result.LIST_ABL = NULL;
|
||||||
result.WIDTH = 0;
|
result.WIDTH = 0;
|
||||||
|
@ -273,7 +275,7 @@ long right )
|
||||||
|
|
||||||
for (i=left ; i!=(right+inc) ; i+=inc)
|
for (i=left ; i!=(right+inc) ; i+=inc)
|
||||||
{
|
{
|
||||||
sprintf (name,"%s %i",expr1.IDENT,i);
|
sprintf (name,"%s %li",expr1.IDENT,i);
|
||||||
name2 = namealloc (name);
|
name2 = namealloc (name);
|
||||||
result.LIST_ABL = addchain (result.LIST_ABL,createablatom(name2));
|
result.LIST_ABL = addchain (result.LIST_ABL,createablatom(name2));
|
||||||
}
|
}
|
||||||
|
@ -770,7 +772,7 @@ bvl_ablstr pt_ablstr ) /* tested expression */
|
||||||
{
|
{
|
||||||
for (; last_width<pt_ablstr.WIDTH ; last_width++)
|
for (; last_width<pt_ablstr.WIDTH ; last_width++)
|
||||||
{
|
{
|
||||||
sprintf (nomvar,"(%d)",last_width);
|
sprintf (nomvar,"(%ld)",last_width);
|
||||||
addlogbddcircuitin(BvlBddCircuit,nomvar);
|
addlogbddcircuitin(BvlBddCircuit,nomvar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -826,7 +828,7 @@ bvl_ablstr pt_ablstr ) /* tested expression */
|
||||||
i = pt_ablstr.WIDTH - 1;
|
i = pt_ablstr.WIDTH - 1;
|
||||||
while (pt_auxabl != NULL)
|
while (pt_auxabl != NULL)
|
||||||
{
|
{
|
||||||
sprintf (nomvar,"(%i)",i);
|
sprintf (nomvar,"(%li)",i);
|
||||||
/*--------
|
/*--------
|
||||||
substPhyExpr (pt_newabl,namealloc(nomvar),(struct chain *)pt_auxabl->DATA);
|
substPhyExpr (pt_newabl,namealloc(nomvar),(struct chain *)pt_auxabl->DATA);
|
||||||
---------*/
|
---------*/
|
||||||
|
|
|
@ -67,14 +67,14 @@ long trace_mode;
|
||||||
{
|
{
|
||||||
char *suffix;
|
char *suffix;
|
||||||
char *str;
|
char *str;
|
||||||
char *mode;
|
char *mode = NULL;
|
||||||
char *type_mark;
|
char *type_mark = NULL;
|
||||||
long nrlabel = 0;
|
long nrlabel = 0;
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
time_t clock;
|
time_t clock;
|
||||||
long left,right;
|
long left,right;
|
||||||
char *name;
|
char *name;
|
||||||
char *bus;
|
char *bus = NULL;
|
||||||
|
|
||||||
struct begen *ptgeneric = NULL; /* current ptype pnt (generic) */
|
struct begen *ptgeneric = NULL; /* current ptype pnt (generic) */
|
||||||
struct bereg *ptbereg = NULL; /* current BEREG pointer */
|
struct bereg *ptbereg = NULL; /* current BEREG pointer */
|
||||||
|
@ -192,7 +192,7 @@ long trace_mode;
|
||||||
default :
|
default :
|
||||||
beh_error (68, ptbepor->NAME);
|
beh_error (68, ptbepor->NAME);
|
||||||
}
|
}
|
||||||
(void)fprintf(fd," %s : %s %s(%d %s %d) %s",vhdlablname(name), mode,
|
(void)fprintf(fd," %s : %s %s(%ld %s %ld) %s",vhdlablname(name), mode,
|
||||||
type_mark, left, (left>=right)?"DOWNTO":"TO",right,bus);
|
type_mark, left, (left>=right)?"DOWNTO":"TO",right,bus);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -245,7 +245,7 @@ long trace_mode;
|
||||||
ptbereg = (bereg_list *)bvl_vectnam(ptbereg,&left,&right,&name,2);
|
ptbereg = (bereg_list *)bvl_vectnam(ptbereg,&left,&right,&name,2);
|
||||||
if(left != -1)
|
if(left != -1)
|
||||||
{
|
{
|
||||||
(void)fprintf(fd," SIGNAL %s : REG_VECTOR(%d %s %d) REGISTER;\t-- %s\n",
|
(void)fprintf(fd," SIGNAL %s : REG_VECTOR(%ld %s %ld) REGISTER;\t-- %s\n",
|
||||||
vhdlablname(name),left,(left>=right)?"DOWNTO":"TO",
|
vhdlablname(name),left,(left>=right)?"DOWNTO":"TO",
|
||||||
right,name);
|
right,name);
|
||||||
}
|
}
|
||||||
|
@ -278,7 +278,7 @@ long trace_mode;
|
||||||
type_mark = namealloc("MUX_VECTOR");
|
type_mark = namealloc("MUX_VECTOR");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
(void)fprintf(fd," SIGNAL %s : %s(%d %s %d) BUS;\t-- %s\n",
|
(void)fprintf(fd," SIGNAL %s : %s(%ld %s %ld) BUS;\t-- %s\n",
|
||||||
vhdlablname(name),type_mark,left,(left>=right)?"DOWNTO":"TO",
|
vhdlablname(name),type_mark,left,(left>=right)?"DOWNTO":"TO",
|
||||||
right,name);
|
right,name);
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ long trace_mode;
|
||||||
ptbeaux = (beaux_list *)bvl_vectnam(ptbeaux,&left,&right,&name,3);
|
ptbeaux = (beaux_list *)bvl_vectnam(ptbeaux,&left,&right,&name,3);
|
||||||
if(left != -1)
|
if(left != -1)
|
||||||
{
|
{
|
||||||
(void)fprintf(fd," SIGNAL %s : BIT_VECTOR(%d %s %d);\t-- %s\n",
|
(void)fprintf(fd," SIGNAL %s : BIT_VECTOR(%ld %s %ld);\t-- %s\n",
|
||||||
vhdlablname(name),left,(left>=right)?"DOWNTO":"TO",
|
vhdlablname(name),left,(left>=right)?"DOWNTO":"TO",
|
||||||
right,name);
|
right,name);
|
||||||
}
|
}
|
||||||
|
@ -389,7 +389,7 @@ long trace_mode;
|
||||||
ptbiabl = ptbereg->BIABL;
|
ptbiabl = ptbereg->BIABL;
|
||||||
while (ptbiabl != NULL)
|
while (ptbiabl != NULL)
|
||||||
{
|
{
|
||||||
(void) fprintf (fd," label%d : BLOCK ",nrlabel);
|
(void) fprintf (fd," label%ld : BLOCK ",nrlabel);
|
||||||
if (ptbiabl->CNDABL != NULL)
|
if (ptbiabl->CNDABL != NULL)
|
||||||
{
|
{
|
||||||
(void) fprintf (fd,"(" );
|
(void) fprintf (fd,"(" );
|
||||||
|
@ -419,7 +419,7 @@ long trace_mode;
|
||||||
else
|
else
|
||||||
beh_toolbug (20,"bvl_decomp",ptbereg->NAME,0);
|
beh_toolbug (20,"bvl_decomp",ptbereg->NAME,0);
|
||||||
|
|
||||||
(void) fprintf ( fd," END BLOCK label%d;\n",nrlabel);
|
(void) fprintf ( fd," END BLOCK label%ld;\n",nrlabel);
|
||||||
ptbiabl = ptbiabl->NEXT;
|
ptbiabl = ptbiabl->NEXT;
|
||||||
nrlabel++;
|
nrlabel++;
|
||||||
}
|
}
|
||||||
|
@ -438,7 +438,7 @@ long trace_mode;
|
||||||
ptbiabl = ptbebux->BIABL;
|
ptbiabl = ptbebux->BIABL;
|
||||||
while (ptbiabl != NULL)
|
while (ptbiabl != NULL)
|
||||||
{
|
{
|
||||||
(void) fprintf (fd," label%d : BLOCK (",nrlabel);
|
(void) fprintf (fd," label%ld : BLOCK (",nrlabel);
|
||||||
if (ptbiabl->CNDABL != NULL)
|
if (ptbiabl->CNDABL != NULL)
|
||||||
{
|
{
|
||||||
bvl_printablfile( fd, ptbiabl->CNDABL );
|
bvl_printablfile( fd, ptbiabl->CNDABL );
|
||||||
|
@ -468,7 +468,7 @@ long trace_mode;
|
||||||
else
|
else
|
||||||
beh_toolbug (20,"bvl_decomp",ptbebux->NAME,0);
|
beh_toolbug (20,"bvl_decomp",ptbebux->NAME,0);
|
||||||
|
|
||||||
(void) fprintf (fd," END BLOCK label%d;\n",nrlabel);
|
(void) fprintf (fd," END BLOCK label%ld;\n",nrlabel);
|
||||||
ptbiabl = ptbiabl->NEXT;
|
ptbiabl = ptbiabl->NEXT;
|
||||||
nrlabel++;
|
nrlabel++;
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,7 @@ long trace_mode;
|
||||||
ptbiabl = ptbebus->BIABL;
|
ptbiabl = ptbebus->BIABL;
|
||||||
while (ptbiabl != NULL)
|
while (ptbiabl != NULL)
|
||||||
{
|
{
|
||||||
(void) fprintf (fd,"\tlabel%d : BLOCK (",nrlabel);
|
(void) fprintf (fd,"\tlabel%ld : BLOCK (",nrlabel);
|
||||||
if (ptbiabl->CNDABL != NULL)
|
if (ptbiabl->CNDABL != NULL)
|
||||||
{
|
{
|
||||||
bvl_printablfile ( fd, ptbiabl->CNDABL );
|
bvl_printablfile ( fd, ptbiabl->CNDABL );
|
||||||
|
@ -516,7 +516,7 @@ long trace_mode;
|
||||||
else
|
else
|
||||||
beh_toolbug (20,"bvl_decomp",ptbebus->NAME,0);
|
beh_toolbug (20,"bvl_decomp",ptbebus->NAME,0);
|
||||||
|
|
||||||
(void) fprintf (fd,"\tEND BLOCK label%d;\n",nrlabel);
|
(void) fprintf (fd,"\tEND BLOCK label%ld;\n",nrlabel);
|
||||||
ptbiabl = ptbiabl->NEXT;
|
ptbiabl = ptbiabl->NEXT;
|
||||||
nrlabel++;
|
nrlabel++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ void bvl_error ( long code, char *str1 )
|
||||||
|
|
||||||
{
|
{
|
||||||
BVL_ERRFLG++;
|
BVL_ERRFLG++;
|
||||||
(void)fprintf (stderr,"`%s` Error %d line %d :",BVL_CURFIL,code,BVL_LINNUM);
|
(void)fprintf (stderr,"`%s` Error %ld line %ld :",BVL_CURFIL,code,BVL_LINNUM);
|
||||||
|
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
@ -194,7 +194,7 @@ void bvl_y_error (str)
|
||||||
char *str;
|
char *str;
|
||||||
{
|
{
|
||||||
BVL_ERRFLG++;
|
BVL_ERRFLG++;
|
||||||
(void)fprintf (stderr,"`%s` Error line %d : %s\n",BVL_CURFIL,BVL_LINNUM,str);
|
(void)fprintf (stderr,"`%s` Error line %ld : %s\n",BVL_CURFIL,BVL_LINNUM,str);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
|
@ -66,8 +66,6 @@ int main( argc, argv )
|
||||||
char Option;
|
char Option;
|
||||||
long Value;
|
long Value;
|
||||||
|
|
||||||
int FlagVerbose = 0;
|
|
||||||
|
|
||||||
mbkenv();
|
mbkenv();
|
||||||
autenv();
|
autenv();
|
||||||
ablenv();
|
ablenv();
|
||||||
|
@ -88,7 +86,7 @@ int main( argc, argv )
|
||||||
|
|
||||||
switch ( Option )
|
switch ( Option )
|
||||||
{
|
{
|
||||||
case 'V' : FlagVerbose = 1;
|
case 'V' :
|
||||||
break;
|
break;
|
||||||
default : BvlUsage();
|
default : BvlUsage();
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,10 +119,10 @@ main (argc, argv)
|
||||||
int parsed_option;
|
int parsed_option;
|
||||||
int arguments_left;
|
int arguments_left;
|
||||||
|
|
||||||
char * ToolName;
|
char * ToolName = NULL;
|
||||||
char * ToolVersion;
|
char * ToolVersion = NULL;
|
||||||
char * ToolPurpose;
|
char * ToolPurpose = NULL;
|
||||||
char * ToolDate;
|
char * ToolDate = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,10 @@ asimut_LDADD = \
|
||||||
-lMlu \
|
-lMlu \
|
||||||
-lMal \
|
-lMal \
|
||||||
-lMcl -lMel -lMhl -lMgl -lMsl \
|
-lMcl -lMel -lMhl -lMgl -lMsl \
|
||||||
-lMvg -lMlo -lRcn -lBvl -lBeh -lPpt -lPhl -lPat -lLog -lMut
|
-lMvg -lMlo -lRcn -lBvl -lBhl -lBeh -lPpt -lPhl -lPat -lLog -lMut
|
||||||
|
|
||||||
asimut_SOURCES = \
|
asimut_SOURCES = \
|
||||||
beh_delay.h c_fsyn_sr1k_56.c vh_debug.c vh_lspec.c vh_util.h \
|
beh_delay.h c_fsyn_sr1k_56.c vh_debug.c vh_lspec.c vh_util.h vh_init.h \
|
||||||
beh_setdelay.c c_fsyn_sr4k_10.c vh_debug.h vh_lspec.h vh_xcomm.c \
|
beh_setdelay.c c_fsyn_sr4k_10.c vh_debug.h vh_lspec.h vh_xcomm.c \
|
||||||
c_fsyn_sr1k_10.c c_hada_repondeur.c vh_dtype.h vh_ltype.h vh_xcomm.h \
|
c_fsyn_sr1k_10.c c_hada_repondeur.c vh_dtype.h vh_ltype.h vh_xcomm.h \
|
||||||
c_fsyn_sr1k_1.c c_sr1k_8a.c vh_globals.c vh_simulad.c vh_xspec.c \
|
c_fsyn_sr1k_1.c c_sr1k_8a.c vh_globals.c vh_simulad.c vh_xspec.c \
|
||||||
|
|
|
@ -1,24 +1,31 @@
|
||||||
|
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
/* file : beh_delay.h */
|
/* file : beh_delay.h */
|
||||||
/* date : Oct 30 1995 */
|
/* date : Oct 30 1995 */
|
||||||
/* version : v109 */
|
/* version : v109 */
|
||||||
/* author : Pirouz BAZARGAN SABET & Julien DUNOYER */
|
/* author : Pirouz BAZARGAN SABET & Julien DUNOYER */
|
||||||
/* contents : defines delay definitions used in BEH library */
|
/* contents : defines delay definitions used in BEH library */
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
/* defines */
|
/* defines */
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
|
|
||||||
#define BEH_DELAY_FIXED 0x01 /* Fixed delay behavior */
|
#define BEH_DELAY_FIXED 0x01 /* Fixed delay behavior */
|
||||||
#define BEH_DELAY_RANDOM 0x02 /* Random delay behavior */
|
#define BEH_DELAY_RANDOM 0x02 /* Random delay behavior */
|
||||||
#define BEH_DELAY_BACKANOTATED 0x04 /* Backanotated delay behavior */
|
#define BEH_DELAY_BACKANOTATED 0x04 /* Backanotated delay behavior */
|
||||||
#define BEH_DELAY_BUFREG 0x08 /* Add Buffer delay after reg */
|
#define BEH_DELAY_BUFREG 0x08 /* Add Buffer delay after reg */
|
||||||
#define BEH_DELAY_DEFAULT 0x10 /* Default delay behavior */
|
#define BEH_DELAY_DEFAULT 0x10 /* Default delay behavior */
|
||||||
#define BEH_DELAY_MIN 0x20 /* Minimum delay mode */
|
#define BEH_DELAY_MIN 0x20 /* Minimum delay mode */
|
||||||
#define BEH_DELAY_MAX 0x40 /* Maximum delay mode */
|
#define BEH_DELAY_MAX 0x40 /* Maximum delay mode */
|
||||||
#define BEH_DELAY_TYP 0x80 /* Typical delay mode */
|
#define BEH_DELAY_TYP 0x80 /* Typical delay mode */
|
||||||
|
|
||||||
#define BEH_DELAY_FIELD 7 /* delay dico field */
|
#define BEH_DELAY_FIELD 7 /* delay dico field */
|
||||||
|
|
||||||
|
/* ###------------------------------------------------------### */
|
||||||
|
/* functions */
|
||||||
|
/* ###------------------------------------------------------### */
|
||||||
|
|
||||||
|
extern char beh_backdelay ();
|
||||||
|
extern void beh_setdelay ();
|
||||||
|
extern void beh_chkregdly ();
|
||||||
|
|
|
@ -123,7 +123,7 @@ unsigned char mode;
|
||||||
char new_name [256];
|
char new_name [256];
|
||||||
char *name ;
|
char *name ;
|
||||||
char error_flag ;
|
char error_flag ;
|
||||||
unsigned int time = 0 ;
|
unsigned int time = 0 ;
|
||||||
|
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
/* create a dictionary that will associate to each element */
|
/* create a dictionary that will associate to each element */
|
||||||
|
@ -305,7 +305,7 @@ unsigned char mode;
|
||||||
pt_binode = pt_binode->NEXT;
|
pt_binode = pt_binode->NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("WARNING : Buffer %s with delay %d %s is created after register %s.\n",
|
printf("WARNING : Buffer %s with delay %u %s is created after register %s.\n",
|
||||||
name, time, beh_gettimeunit(pt_fig->TIME_UNIT), pt_reg->NAME);
|
name, time, beh_gettimeunit(pt_fig->TIME_UNIT), pt_reg->NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ unsigned char mode;
|
||||||
pt_binode = pt_binode->NEXT;
|
pt_binode = pt_binode->NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("WARNING : Register %s with delay %d %s becomes a null-delay Register.\n",
|
printf("WARNING : Register %s with delay %u %s becomes a null-delay Register.\n",
|
||||||
pt_reg->NAME, time, beh_gettimeunit(pt_fig->TIME_UNIT));
|
pt_reg->NAME, time, beh_gettimeunit(pt_fig->TIME_UNIT));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ unsigned char mode;
|
||||||
|
|
||||||
if (mode == 0)
|
if (mode == 0)
|
||||||
{
|
{
|
||||||
printf("WARNING : Register %s with delay %d %s becomes a null-delay Register.\n",
|
printf("WARNING : Register %s with delay %u %s becomes a null-delay Register.\n",
|
||||||
pt_reg->NAME, time, beh_gettimeunit(pt_fig->TIME_UNIT));
|
pt_reg->NAME, time, beh_gettimeunit(pt_fig->TIME_UNIT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ unsigned char delay_mode;
|
||||||
|
|
||||||
while ( fgets(line, 256, delay_file) != NULL)
|
while ( fgets(line, 256, delay_file) != NULL)
|
||||||
{
|
{
|
||||||
if ( sscanf( line, "%s : %d : %d : %d : %d", signame,
|
if ( sscanf( line, "%255s : %11d : %11d : %11d : %11d", signame,
|
||||||
&typ_delay, &min_delay, &max_delay, &nbr_delay ) == 5 )
|
&typ_delay, &min_delay, &max_delay, &nbr_delay ) == 5 )
|
||||||
{
|
{
|
||||||
if ((delay_mode & BEH_DELAY_MAX) == BEH_DELAY_MAX)
|
if ((delay_mode & BEH_DELAY_MAX) == BEH_DELAY_MAX)
|
||||||
|
@ -436,7 +436,7 @@ unsigned char delay_mode;
|
||||||
else if ((delay_mode & BEH_DELAY_TYP) == BEH_DELAY_TYP)
|
else if ((delay_mode & BEH_DELAY_TYP) == BEH_DELAY_TYP)
|
||||||
beh_addtab (delay_dict, namealloc(signame), NULL, BEH_DELAY_FIELD, typ_delay);
|
beh_addtab (delay_dict, namealloc(signame), NULL, BEH_DELAY_FIELD, typ_delay);
|
||||||
}
|
}
|
||||||
else if ( sscanf( line, "%s %d : %d : %d : %d : %d", vector_radical, &index,
|
else if ( sscanf( line, "%255s %11d : %11d : %11d : %11d : %11d", vector_radical, &index,
|
||||||
&typ_delay, &min_delay, &max_delay, &nbr_delay ) == 6 )
|
&typ_delay, &min_delay, &max_delay, &nbr_delay ) == 6 )
|
||||||
{
|
{
|
||||||
sprintf(signame, "%s %d", vector_radical, index);
|
sprintf(signame, "%s %d", vector_radical, index);
|
||||||
|
@ -449,7 +449,7 @@ unsigned char delay_mode;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sscanf( line, "%s", signame );
|
sscanf( line, "%255s", signame );
|
||||||
printf("WARNING : invalid line in file %s.%s : \n",delay_filename,(char *)(suffix->DATA));
|
printf("WARNING : invalid line in file %s.%s : \n",delay_filename,(char *)(suffix->DATA));
|
||||||
printf(" : %s\n", line);
|
printf(" : %s\n", line);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#include "vh_ltype.h"
|
#include "vh_ltype.h"
|
||||||
#include "vh_xspec.h"
|
#include "vh_xspec.h"
|
||||||
|
#include "vh_xcomm.h"
|
||||||
|
|
||||||
#define MAX 64
|
#define MAX 64
|
||||||
#define ENTREE "fic_entree"
|
#define ENTREE "fic_entree"
|
||||||
|
@ -31,7 +32,6 @@ struct lkdins *pt_lkdins;
|
||||||
#define PROB 900
|
#define PROB 900
|
||||||
|
|
||||||
static int deja_ouvert=0;
|
static int deja_ouvert=0;
|
||||||
static int deja_ouvert2=0;
|
|
||||||
static int nb_entrees=0;
|
static int nb_entrees=0;
|
||||||
static int nb_sorties=0;
|
static int nb_sorties=0;
|
||||||
static int ck_old=0;
|
static int ck_old=0;
|
||||||
|
@ -48,8 +48,6 @@ struct lkdins *pt_lkdins;
|
||||||
char read ;
|
char read ;
|
||||||
char write ;
|
char write ;
|
||||||
int hadout; /* Entree sur 14 bits */
|
int hadout; /* Entree sur 14 bits */
|
||||||
char vdd ;
|
|
||||||
char vss ;
|
|
||||||
|
|
||||||
char empty ;
|
char empty ;
|
||||||
char full ;
|
char full ;
|
||||||
|
@ -104,12 +102,12 @@ struct lkdins *pt_lkdins;
|
||||||
{
|
{
|
||||||
empty=0;
|
empty=0;
|
||||||
full=0;
|
full=0;
|
||||||
if (fscanf(fouvrir,"%d",&data) == EOF)
|
if (fscanf(fouvrir,"%11d",&data) == EOF)
|
||||||
{
|
{
|
||||||
rewind(fouvrir);
|
rewind(fouvrir);
|
||||||
fscanf(fouvrir,"%d",&data);
|
fscanf(fouvrir,"%11d",&data);
|
||||||
}
|
}
|
||||||
fprintf(stderr,"NEW INPUT FIFO VALUE : %d\n", data);
|
fprintf(stderr,"NEW INPUT FIFO VALUE : %u\n", data);
|
||||||
vhx_writeout(data,pt_lkdins,POSO_data,8);
|
vhx_writeout(data,pt_lkdins,POSO_data,8);
|
||||||
nb_entrees--;
|
nb_entrees--;
|
||||||
}
|
}
|
||||||
|
@ -132,12 +130,12 @@ struct lkdins *pt_lkdins;
|
||||||
|
|
||||||
if ((empty_old == 0) && (read == 1) && (nb_entrees != 0))
|
if ((empty_old == 0) && (read == 1) && (nb_entrees != 0))
|
||||||
{
|
{
|
||||||
if (fscanf(fouvrir,"%d",&data) == EOF)
|
if (fscanf(fouvrir,"%11d",&data) == EOF)
|
||||||
{
|
{
|
||||||
rewind(fouvrir);
|
rewind(fouvrir);
|
||||||
fscanf(fouvrir,"%d",&data);
|
fscanf(fouvrir,"%11d",&data);
|
||||||
}
|
}
|
||||||
fprintf(stderr,"NEW INPUT FIFO VALUE : %d\n", data);
|
fprintf(stderr,"NEW INPUT FIFO VALUE : %u\n", data);
|
||||||
vhx_writeout(data,pt_lkdins,POSO_data,8);
|
vhx_writeout(data,pt_lkdins,POSO_data,8);
|
||||||
nb_entrees--;
|
nb_entrees--;
|
||||||
}
|
}
|
||||||
|
@ -147,12 +145,12 @@ struct lkdins *pt_lkdins;
|
||||||
fprintf(stderr,"NEW OUPUT FIFO VALUE : %d\n", hadout);
|
fprintf(stderr,"NEW OUPUT FIFO VALUE : %d\n", hadout);
|
||||||
fprintf(fecrire,"0x%x\t",hadout);
|
fprintf(fecrire,"0x%x\t",hadout);
|
||||||
nb_sorties--;
|
nb_sorties--;
|
||||||
if ( (nb_sorties%8) == 0 ) fprintf(fecrire,"\n",hadout);
|
if ( (nb_sorties%8) == 0 ) fprintf(fecrire,"\n");
|
||||||
|
|
||||||
if ( (nb_sorties == 0))
|
if ( (nb_sorties == 0))
|
||||||
{
|
{
|
||||||
nb_entrees=MAX;
|
nb_entrees=MAX;
|
||||||
fprintf(fecrire,"\n",hadout);
|
fprintf(fecrire,"\n");
|
||||||
fflush(fecrire);
|
fflush(fecrire);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,10 +45,8 @@ struct lkdins *pt_lkdins;
|
||||||
{
|
{
|
||||||
char e_n ; /* chip select */
|
char e_n ; /* chip select */
|
||||||
char w_n ; /* write enable */
|
char w_n ; /* write enable */
|
||||||
unsigned int dat ; /* input-output 8-bit data */
|
unsigned int dat = 0; /* input-output 8-bit data */
|
||||||
unsigned int adr ; /* 10-bit address */
|
unsigned int adr ; /* 10-bit address */
|
||||||
char vdd ; /* power supply */
|
|
||||||
char vss ; /* power supply */
|
|
||||||
|
|
||||||
#define POSI_vss 0
|
#define POSI_vss 0
|
||||||
#define POSI_vdd POSI_vss + 1
|
#define POSI_vdd POSI_vss + 1
|
||||||
|
|
|
@ -58,10 +58,8 @@ unsigned int *byt_pnt ;
|
||||||
{
|
{
|
||||||
unsigned int state = 0;
|
unsigned int state = 0;
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
unsigned int j = 0;
|
|
||||||
unsigned int l_idx = 0;
|
unsigned int l_idx = 0;
|
||||||
unsigned int adr = 0;
|
unsigned int adr = 0;
|
||||||
unsigned int byt = 0;
|
|
||||||
|
|
||||||
strcpy (fil_name, name);
|
strcpy (fil_name, name);
|
||||||
|
|
||||||
|
@ -151,7 +149,7 @@ unsigned char *pt_mem ;
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("loading RAM initialization file: %s.ini , %.8x , %d\n",
|
printf ("loading RAM initialization file: %s.ini , %.8x , %u\n",
|
||||||
fil_name, fil_addr, fil_byte);
|
fil_name, fil_addr, fil_byte);
|
||||||
|
|
||||||
|
|
||||||
|
@ -208,10 +206,8 @@ struct lkdins *pt_lkdins;
|
||||||
{
|
{
|
||||||
char e_n ; /* chip select */
|
char e_n ; /* chip select */
|
||||||
char w_n ; /* write enable */
|
char w_n ; /* write enable */
|
||||||
unsigned int dat ; /* input-output 8-bit data */
|
unsigned int dat = 0; /* input-output 8-bit data */
|
||||||
unsigned int adr ; /* 10-bit address */
|
unsigned int adr ; /* 10-bit address */
|
||||||
char vdd ; /* power supply */
|
|
||||||
char vss ; /* power supply */
|
|
||||||
|
|
||||||
#define POSI_vss 0
|
#define POSI_vss 0
|
||||||
#define POSI_vdd POSI_vss + 1
|
#define POSI_vdd POSI_vss + 1
|
||||||
|
|
|
@ -45,10 +45,8 @@ struct lkdins *pt_lkdins;
|
||||||
{
|
{
|
||||||
char e_n ; /* chip select */
|
char e_n ; /* chip select */
|
||||||
char w_n ; /* write enable */
|
char w_n ; /* write enable */
|
||||||
unsigned int dat ; /* input-output 8-bit data */
|
unsigned int dat = 0; /* input-output 8-bit data */
|
||||||
unsigned int adr ; /* 13-bit address */
|
unsigned int adr ; /* 13-bit address */
|
||||||
char vdd ; /* power supply */
|
|
||||||
char vss ; /* power supply */
|
|
||||||
|
|
||||||
#define POSI_vss 0
|
#define POSI_vss 0
|
||||||
#define POSI_vdd POSI_vss + 1
|
#define POSI_vdd POSI_vss + 1
|
||||||
|
|
|
@ -100,11 +100,12 @@ extern void sch_insentry ();
|
||||||
extern void sch_inswave ();
|
extern void sch_inswave ();
|
||||||
|
|
||||||
extern struct shdul *sch_CreateScheduler ();
|
extern struct shdul *sch_CreateScheduler ();
|
||||||
extern void sch_AddTranscation ();
|
extern void sch_AddTransaction ();
|
||||||
extern struct shtra *sch_GetCurrentTransactions ();
|
extern struct shtra *sch_GetCurrentTransactions ();
|
||||||
extern int sch_GotoNextTime ();
|
extern int sch_GotoNextTime ();
|
||||||
extern int sch_GetNextTime ();
|
extern int sch_GetNextTime ();
|
||||||
extern void sch_FreeTransactions ();
|
extern void sch_FreeTransactions ();
|
||||||
extern unsigned int sch_GetCurrentTime ();
|
extern unsigned int sch_GetCurrentTime ();
|
||||||
|
extern void sch_SetCurrentTime ();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,7 +47,7 @@ struct shdul *pt_shdul;
|
||||||
pt_shtra = pt_shent->TRANS [wind_offset];
|
pt_shtra = pt_shent->TRANS [wind_offset];
|
||||||
if (pt_shtra == NULL)
|
if (pt_shtra == NULL)
|
||||||
{
|
{
|
||||||
printf ("sch_bug amar 2 : %x\n", pt_shtra);
|
printf ("sch_bug amar 2 : %x\n", (unsigned int)pt_shtra);
|
||||||
sch_bug (1, "sch_GetCurrentTranscations", NULL);
|
sch_bug (1, "sch_GetCurrentTranscations", NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -62,12 +62,12 @@ struct shdul *pt_shdul;
|
||||||
pt_shwav = pt_shwav->NEXT;
|
pt_shwav = pt_shwav->NEXT;
|
||||||
|
|
||||||
if ((pt_shwav == NULL) || (pt_shwav->TRANS != pt_shtra))
|
if ((pt_shwav == NULL) || (pt_shwav->TRANS != pt_shtra))
|
||||||
{
|
{
|
||||||
printf ("wav : %x, tra : %x\n", pt_shwav->TRANS, pt_shtra);
|
printf ("wav : %x, tra : %x\n", (unsigned int)pt_shwav->TRANS, (unsigned int)pt_shtra);
|
||||||
sch_debug (pt_shtra, "shtra");
|
sch_debug (pt_shtra, "shtra");
|
||||||
sch_debug (pt_shwav, "shwav");
|
sch_debug (pt_shwav, "shwav");
|
||||||
sch_bug (2, "sch_GetCurrentTranscations", NULL);
|
sch_bug (2, "sch_GetCurrentTranscations", NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pt_shwav->TRANS = pt_shtra->WAVE;
|
pt_shwav->TRANS = pt_shtra->WAVE;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ struct shdul *pt_shdul;
|
||||||
unsigned int *pt_date ;
|
unsigned int *pt_date ;
|
||||||
|
|
||||||
{
|
{
|
||||||
struct shtra *pt_shtra ;
|
|
||||||
struct shent *pt_shent ;
|
struct shent *pt_shent ;
|
||||||
struct shent *pt_nxtent ;
|
struct shent *pt_nxtent ;
|
||||||
unsigned int min_window = 0;
|
unsigned int min_window = 0;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include "mut.h"
|
#include "mut.h"
|
||||||
#include "sch.h"
|
#include "sch.h"
|
||||||
#include "sch_debug.h"
|
#include "sch_debug.h"
|
||||||
|
@ -227,24 +228,24 @@ char **str ; /* recognized strings */
|
||||||
{
|
{
|
||||||
case s_DFN :
|
case s_DFN :
|
||||||
if (pnt[i].dat != NULL)
|
if (pnt[i].dat != NULL)
|
||||||
printf ("%s", pnt[i].dat);
|
printf ("%s", (char*)pnt[i].dat);
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case f_DFN :
|
case f_DFN :
|
||||||
printf ("%f\n", pnt[i].imd);
|
printf ("%ld\n", pnt[i].imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case u_DFN :
|
case u_DFN :
|
||||||
printf ("%u\n", pnt[i].imd);
|
printf ("%ld\n", pnt[i].imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case c_DFN :
|
case c_DFN :
|
||||||
printf ("%c\n", pnt[i].imd);
|
printf ("%c\n", (char)pnt[i].imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case d_DFN :
|
case d_DFN :
|
||||||
printf ("%d\n", pnt[i].imd);
|
printf ("%ld\n", pnt[i].imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case l_DFN :
|
case l_DFN :
|
||||||
|
@ -252,7 +253,7 @@ char **str ; /* recognized strings */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case x_DFN :
|
case x_DFN :
|
||||||
printf ("0x%x\n", pnt[i].imd);
|
printf ("0x%x\n", (unsigned int)pnt[i].imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -492,8 +493,6 @@ union value pnt ;
|
||||||
int type ;
|
int type ;
|
||||||
|
|
||||||
{
|
{
|
||||||
char *lcl_str;
|
|
||||||
|
|
||||||
printf (" %-15s: ", str [type]);
|
printf (" %-15s: ", str [type]);
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
@ -504,17 +503,17 @@ int type ;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case float_DFN :
|
case float_DFN :
|
||||||
printf ("%f\n", pnt.imd);
|
printf ("%ld\n", pnt.imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case character_DFN :
|
case character_DFN :
|
||||||
printf ("%c\n", pnt.imd);
|
printf ("%c\n", (char)pnt.imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case short_DFN :
|
case short_DFN :
|
||||||
case integer_DFN :
|
case integer_DFN :
|
||||||
case long_DFN :
|
case long_DFN :
|
||||||
printf ("0x%x\n", pnt.imd);
|
printf ("0x%x\n", (unsigned int)pnt.imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
|
@ -535,8 +534,9 @@ void *head_pnt; /* structure's pointer */
|
||||||
char *type; /* structure's type */
|
char *type; /* structure's type */
|
||||||
|
|
||||||
{
|
{
|
||||||
char line [128]; /* buffer to read a cmd line */
|
size_t lline = 128;
|
||||||
char buffer [128]; /* buffer to split the cmd line */
|
char *line = NULL; /* buffer to read a cmd line */
|
||||||
|
char buffer [lline]; /* buffer to split the cmd line */
|
||||||
|
|
||||||
char *words [ 10]; /* number of words on a line */
|
char *words [ 10]; /* number of words on a line */
|
||||||
int nmbrs [ 10]; /* words translated into number */
|
int nmbrs [ 10]; /* words translated into number */
|
||||||
|
@ -544,9 +544,8 @@ char *type; /* structure's type */
|
||||||
int indxs [ 10]; /* index of words */
|
int indxs [ 10]; /* index of words */
|
||||||
|
|
||||||
struct stack jtab [ 10]; /* list of memorized addresses */
|
struct stack jtab [ 10]; /* list of memorized addresses */
|
||||||
int idx, i;
|
int idx;
|
||||||
int readflg = 0;
|
int readflg = 0;
|
||||||
int code;
|
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
char *pntr = NULL;
|
char *pntr = NULL;
|
||||||
long pshtype;
|
long pshtype;
|
||||||
|
@ -582,6 +581,7 @@ char *type; /* structure's type */
|
||||||
/* - search that words among recognized strings */
|
/* - search that words among recognized strings */
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
|
|
||||||
|
line = (char*)malloc( lline*sizeof(char) );
|
||||||
words [0] = buffer;
|
words [0] = buffer;
|
||||||
get_size (siz);
|
get_size (siz);
|
||||||
|
|
||||||
|
@ -831,7 +831,7 @@ char *type; /* structure's type */
|
||||||
|
|
||||||
printf ("\n\nCOMMAND > ");
|
printf ("\n\nCOMMAND > ");
|
||||||
|
|
||||||
gets (line);
|
getline (&line, &lline, stdin);
|
||||||
if (strcmp (line ,"."))
|
if (strcmp (line ,"."))
|
||||||
{
|
{
|
||||||
wrdcnt = splitline (words, line);
|
wrdcnt = splitline (words, line);
|
||||||
|
|
|
@ -43,41 +43,41 @@ union value
|
||||||
|
|
||||||
#define TYPE_DFN 0x0000ffff
|
#define TYPE_DFN 0x0000ffff
|
||||||
#define _back_DFN 0
|
#define _back_DFN 0
|
||||||
#define _exit_DFN _back_DFN + 1
|
#define _exit_DFN (_back_DFN + 1)
|
||||||
#define _jump_DFN _exit_DFN + 1
|
#define _jump_DFN (_exit_DFN + 1)
|
||||||
#define _save_DFN _jump_DFN + 1
|
#define _save_DFN (_jump_DFN + 1)
|
||||||
#define _stop_DFN _save_DFN + 1
|
#define _stop_DFN (_save_DFN + 1)
|
||||||
#define _top_DFN _stop_DFN + 1
|
#define _top_DFN (_stop_DFN + 1)
|
||||||
#define _up_DFN _top_DFN + 1
|
#define _up_DFN (_top_DFN + 1)
|
||||||
#define _display_DFN _up_DFN + 1
|
#define _display_DFN (_up_DFN + 1)
|
||||||
|
|
||||||
#define character_DFN _display_DFN + 1
|
#define character_DFN (_display_DFN + 1)
|
||||||
#define short_DFN character_DFN + 1
|
#define short_DFN (character_DFN + 1)
|
||||||
#define integer_DFN short_DFN + 1
|
#define integer_DFN (short_DFN + 1)
|
||||||
#define long_DFN integer_DFN + 1
|
#define long_DFN (integer_DFN + 1)
|
||||||
#define float_DFN long_DFN + 1
|
#define float_DFN (long_DFN + 1)
|
||||||
#define void_DFN float_DFN + 1
|
#define void_DFN (float_DFN + 1)
|
||||||
#define string_DFN void_DFN + 1
|
#define string_DFN (void_DFN + 1)
|
||||||
|
|
||||||
#define shdul_DFN string_DFN + 1
|
#define shdul_DFN (string_DFN + 1)
|
||||||
#define shent_DFN shdul_DFN + 1
|
#define shent_DFN (shdul_DFN + 1)
|
||||||
#define shtra_DFN shent_DFN + 1
|
#define shtra_DFN (shent_DFN + 1)
|
||||||
#define shwav_DFN shtra_DFN + 1
|
#define shwav_DFN (shtra_DFN + 1)
|
||||||
|
|
||||||
#define cond_DFN shwav_DFN + 1
|
#define cond_DFN (shwav_DFN + 1)
|
||||||
#define curtime_DFN cond_DFN + 1
|
#define curtime_DFN (cond_DFN + 1)
|
||||||
#define date_DFN curtime_DFN + 1
|
#define date_DFN (curtime_DFN + 1)
|
||||||
#define flags_DFN date_DFN + 1
|
#define flags_DFN (date_DFN + 1)
|
||||||
#define ident_DFN flags_DFN + 1
|
#define ident_DFN (flags_DFN + 1)
|
||||||
#define itable_DFN ident_DFN + 1
|
#define itable_DFN (ident_DFN + 1)
|
||||||
#define label_DFN itable_DFN + 1
|
#define label_DFN (itable_DFN + 1)
|
||||||
#define next_DFN label_DFN + 1
|
#define next_DFN (label_DFN + 1)
|
||||||
#define prev_DFN next_DFN + 1
|
#define prev_DFN (next_DFN + 1)
|
||||||
#define scdid_DFN prev_DFN + 1
|
#define scdid_DFN (prev_DFN + 1)
|
||||||
#define trans_DFN scdid_DFN + 1
|
#define trans_DFN (scdid_DFN + 1)
|
||||||
#define ttable_DFN trans_DFN + 1
|
#define ttable_DFN (trans_DFN + 1)
|
||||||
#define uflag_DFN ttable_DFN + 1
|
#define uflag_DFN (ttable_DFN + 1)
|
||||||
#define valu_DFN uflag_DFN + 1
|
#define valu_DFN (uflag_DFN + 1)
|
||||||
#define wave_DFN valu_DFN + 1
|
#define wave_DFN (valu_DFN + 1)
|
||||||
|
|
||||||
#define MAXCMD_DFN wave_DFN + 1
|
#define MAXCMD_DFN (wave_DFN + 1)
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include "mut.h"
|
#include "mut.h"
|
||||||
#include "mlo.h"
|
#include "mlo.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
#include "sch.h"
|
#include "sch.h"
|
||||||
#include "vh_ltype.h"
|
#include "vh_ltype.h"
|
||||||
#include "vh_debug.h"
|
#include "vh_debug.h"
|
||||||
|
#include "vh_util.h"
|
||||||
|
|
||||||
|
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
@ -1478,7 +1480,7 @@ int *indxs ; /* words' index in strgs table */
|
||||||
|
|
||||||
for (i=0 ; i<wrdcnt ; i++)
|
for (i=0 ; i<wrdcnt ; i++)
|
||||||
{
|
{
|
||||||
flags [i] = sscanf (words [i], "%u", &nmbrs [i]);
|
flags [i] = sscanf (words [i], "%11u", &nmbrs [i]);
|
||||||
for (j=0; j<MAXCMD_DFN ; j++)
|
for (j=0; j<MAXCMD_DFN ; j++)
|
||||||
{
|
{
|
||||||
if (!strcmp (strgs [j], words [i]))
|
if (!strcmp (strgs [j], words [i]))
|
||||||
|
@ -1608,7 +1610,8 @@ char *type; /* structure's type */
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
char line [128]; /* buffer to read a cmd line */
|
size_t lline = 128;
|
||||||
|
char *line = NULL; /* buffer to read a cmd line */
|
||||||
char buffer [128]; /* buffer to split the cmd line */
|
char buffer [128]; /* buffer to split the cmd line */
|
||||||
|
|
||||||
char *words [ 10]; /* number of words on a line */
|
char *words [ 10]; /* number of words on a line */
|
||||||
|
@ -1690,6 +1693,7 @@ char *type; /* structure's type */
|
||||||
/* - search that words among recognized strings */
|
/* - search that words among recognized strings */
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
|
|
||||||
|
line = (char*)malloc( lline*sizeof(char) );
|
||||||
words [0] = buffer;
|
words [0] = buffer;
|
||||||
get_size (siz);
|
get_size (siz);
|
||||||
|
|
||||||
|
@ -1939,7 +1943,7 @@ char *type; /* structure's type */
|
||||||
|
|
||||||
printf ("\n\nCOMMAND > ");
|
printf ("\n\nCOMMAND > ");
|
||||||
|
|
||||||
gets (line);
|
getline (&line, &lline, stdin);
|
||||||
if (strcmp (line ,"."))
|
if (strcmp (line ,"."))
|
||||||
{
|
{
|
||||||
wrdcnt = splitline (words, line);
|
wrdcnt = splitline (words, line);
|
||||||
|
|
|
@ -1,18 +1,22 @@
|
||||||
|
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
/* file : vh_debug.h */
|
/* file : vh_debug.h */
|
||||||
/* date : Aug 20 1997 */
|
/* date : Aug 20 1997 */
|
||||||
/* version : v3.0 */
|
/* version : v3.0 */
|
||||||
/* author : Pirouz BAZARGAN SABET */
|
/* author : Pirouz BAZARGAN SABET */
|
||||||
/* description : declaration of diefines, global variables and, */
|
/* description : declaration of diefines, global variables and, */
|
||||||
/* functions used in the debugger */
|
/* functions used in the debugger */
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
||||||
struct stack /* debugger's stack's structure */
|
/* ###------------------------------------------------------### */
|
||||||
|
/* defines */
|
||||||
|
/* ###------------------------------------------------------### */
|
||||||
|
|
||||||
|
struct stack /* debugger's stack's structure */
|
||||||
{
|
{
|
||||||
short type; /* type of the current ponter */
|
short type; /* type of the current ponter */
|
||||||
short mark; /* stop mark */
|
short mark; /* stop mark */
|
||||||
void *data; /* current pointer */
|
void *data; /* current pointer */
|
||||||
};
|
};
|
||||||
|
|
||||||
union value
|
union value
|
||||||
|
@ -21,7 +25,7 @@ union value
|
||||||
long imd;
|
long imd;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define STKSIZ_DFN 500 /* debugger's stack size */
|
#define STKSIZ_DFN 500 /* debugger's stack size */
|
||||||
|
|
||||||
#define KIND_DFN 0xff000000
|
#define KIND_DFN 0xff000000
|
||||||
#define COMMAND_DFN 0x01000000
|
#define COMMAND_DFN 0x01000000
|
||||||
|
@ -203,3 +207,9 @@ union value
|
||||||
#define wave_DFN (value_DFN + 1)
|
#define wave_DFN (value_DFN + 1)
|
||||||
|
|
||||||
#define MAXCMD_DFN (wave_DFN + 1)
|
#define MAXCMD_DFN (wave_DFN + 1)
|
||||||
|
|
||||||
|
/* ###------------------------------------------------------### */
|
||||||
|
/* functions */
|
||||||
|
/* ###------------------------------------------------------### */
|
||||||
|
|
||||||
|
extern void dast_dbg ();
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
|
||||||
|
/* ###--------------------------------------------------------------### */
|
||||||
|
/* file : vh_init.h */
|
||||||
|
/* date : Jan 11 2014 */
|
||||||
|
/* version : v3.0 */
|
||||||
|
/* authors : J.-P. CHAPUT , P. BAZARGAN */
|
||||||
|
/* content : contains defines, external variables and funtions */
|
||||||
|
/* used by init functions */
|
||||||
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
||||||
|
/* ###------------------------------------------------------### */
|
||||||
|
/* defines */
|
||||||
|
/* ###------------------------------------------------------### */
|
||||||
|
|
||||||
|
|
||||||
|
/* ###------------------------------------------------------### */
|
||||||
|
/* functions */
|
||||||
|
/* ###------------------------------------------------------### */
|
||||||
|
|
||||||
|
extern void vhi_addcmodel ();
|
||||||
|
extern void vhi_models ();
|
|
@ -569,10 +569,9 @@ struct loins *pt_loins ;
|
||||||
{
|
{
|
||||||
unsigned int count ;
|
unsigned int count ;
|
||||||
struct locon *pt_locon ;
|
struct locon *pt_locon ;
|
||||||
struct losig *pt_losig ;
|
struct losig *pt_losig = NULL;
|
||||||
struct befig *pt_befig ;
|
struct befig *pt_befig ;
|
||||||
struct berin *pt_berin ;
|
struct berin *pt_berin ;
|
||||||
struct bepor *pt_bepor ;
|
|
||||||
struct beout *pt_beout ;
|
struct beout *pt_beout ;
|
||||||
struct bebus *pt_bebus ;
|
struct bebus *pt_bebus ;
|
||||||
struct bebux *pt_bebux ;
|
struct bebux *pt_bebux ;
|
||||||
|
@ -1367,7 +1366,7 @@ struct befig *head_befig;
|
||||||
int errflg = 0;
|
int errflg = 0;
|
||||||
int update_flg ;
|
int update_flg ;
|
||||||
int mode ;
|
int mode ;
|
||||||
int new_mode ;
|
int new_mode = 0;
|
||||||
int receiv_nbr ;
|
int receiv_nbr ;
|
||||||
int emettr_nbr ;
|
int emettr_nbr ;
|
||||||
int connec_nbr ;
|
int connec_nbr ;
|
||||||
|
|
|
@ -24,9 +24,11 @@
|
||||||
#include "vh_ltype.h"
|
#include "vh_ltype.h"
|
||||||
#include "vh_globals.h"
|
#include "vh_globals.h"
|
||||||
#include "vh_util.h"
|
#include "vh_util.h"
|
||||||
|
#include "vh_init.h"
|
||||||
#include "vh_lspec.h"
|
#include "vh_lspec.h"
|
||||||
#include "vh_xspec.h"
|
#include "vh_xspec.h"
|
||||||
#include "vh_xcomm.h"
|
#include "vh_xcomm.h"
|
||||||
|
#include "vh_debug.h"
|
||||||
#include "vh_simulad.h"
|
#include "vh_simulad.h"
|
||||||
#include "beh_delay.h"
|
#include "beh_delay.h"
|
||||||
|
|
||||||
|
@ -35,10 +37,10 @@ extern char MVL_ERRFLG;
|
||||||
static char *VH_TUNIT_TABLE [] = { "vu", "fs", "ps", "ns", "us", "ms" };
|
static char *VH_TUNIT_TABLE [] = { "vu", "fs", "ps", "ns", "us", "ms" };
|
||||||
|
|
||||||
|
|
||||||
main (argc, argv)
|
int main (argc, argv)
|
||||||
|
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char *argv[];
|
||||||
|
|
||||||
{
|
{
|
||||||
int i ;
|
int i ;
|
||||||
|
@ -73,7 +75,6 @@ char **argv;
|
||||||
char inert_flg = 1 ; /* inertial delays */
|
char inert_flg = 1 ; /* inertial delays */
|
||||||
char bufreg_flg = 0 ; /* bufreg delays */
|
char bufreg_flg = 0 ; /* bufreg delays */
|
||||||
char stat_flg = 0 ; /* stat */
|
char stat_flg = 0 ; /* stat */
|
||||||
char sav_end ; /* saved end flag */
|
|
||||||
int max_err = 10 ; /* # of simul. errors */
|
int max_err = 10 ; /* # of simul. errors */
|
||||||
unsigned int max_pat = 0 ; /* # of patterns */
|
unsigned int max_pat = 0 ; /* # of patterns */
|
||||||
unsigned int labelsiz = 32 ; /* longest patt. label */
|
unsigned int labelsiz = 32 ; /* longest patt. label */
|
||||||
|
@ -88,7 +89,7 @@ char **argv;
|
||||||
struct befig *ptbef ;
|
struct befig *ptbef ;
|
||||||
struct chain *ptchain ;
|
struct chain *ptchain ;
|
||||||
struct papat *pt_papat ;
|
struct papat *pt_papat ;
|
||||||
struct papat *lst_papat ;
|
struct papat *lst_papat = NULL;
|
||||||
struct paseq *pt_paseq ;
|
struct paseq *pt_paseq ;
|
||||||
struct pains *pt_pains = NULL ; /* inspected instances */
|
struct pains *pt_pains = NULL ; /* inspected instances */
|
||||||
struct lkdspy *pt_lkdspy = NULL ; /* inspected signals */
|
struct lkdspy *pt_lkdspy = NULL ; /* inspected signals */
|
||||||
|
@ -490,7 +491,7 @@ char **argv;
|
||||||
|
|
||||||
if (bckdly_flg != 0)
|
if (bckdly_flg != 0)
|
||||||
{
|
{
|
||||||
error_flag += beh_backdelay (delay_dic, argv [bckdly_flg], delay_mode);
|
error_flag += beh_backdelay (delay_dic, argv [(int)bckdly_flg], delay_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((bckdly_flg != 0) || (fixdly_flg != 0) || (randly_flg != 0))
|
if ((bckdly_flg != 0) || (fixdly_flg != 0) || (randly_flg != 0))
|
||||||
|
@ -742,12 +743,12 @@ char **argv;
|
||||||
|
|
||||||
if (init_flg != 0)
|
if (init_flg != 0)
|
||||||
{
|
{
|
||||||
if ((sscanf (argv [init_flg], "%u", &init_val) == 1) && (init_val <= 1))
|
if ((sscanf (argv [(int)init_flg], "%u", &init_val) == 1) && (init_val <= 1))
|
||||||
vhx_initval (VHL_HEDLKF, init_val + '0');
|
vhx_initval (VHL_HEDLKF, init_val + '0');
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((filepnt = mbkfopen (argv [init_flg], "sav", READ_TEXT)) == NULL)
|
if ((filepnt = mbkfopen (argv [(int)init_flg], "sav", READ_TEXT)) == NULL)
|
||||||
vhu_error (116, argv [init_flg], NULL);
|
vhu_error (116, argv [(int)init_flg], NULL);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
error_flag = vhx_initfig (VHL_HEDLKF, filepnt);
|
error_flag = vhx_initfig (VHL_HEDLKF, filepnt);
|
||||||
|
@ -939,9 +940,9 @@ char **argv;
|
||||||
{
|
{
|
||||||
if (stat_flg != 0)
|
if (stat_flg != 0)
|
||||||
{
|
{
|
||||||
st_wrtsta (stat_dic, VHL_HEDLKF, pt_paseq, num_cycle, argv [stat_flg]);
|
st_wrtsta (stat_dic, VHL_HEDLKF, pt_paseq, num_cycle, argv [(int)stat_flg]);
|
||||||
st_wrtstadly (stat_dic, VHL_HEDLKF, pt_paseq, cur_date, ref_date, argv [stat_flg]);
|
st_wrtstadly (stat_dic, VHL_HEDLKF, pt_paseq, cur_date, ref_date, argv [(int)stat_flg]);
|
||||||
st_wrtstabis (stat_dic, VHL_HEDLKF, pt_paseq, cur_date, ref_date, argv [stat_flg]);
|
st_wrtstabis (stat_dic, VHL_HEDLKF, pt_paseq, cur_date, ref_date, argv [(int)stat_flg]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,10 @@
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "pat.h"
|
#include "pat.h"
|
||||||
#include "sch.h"
|
#include "sch.h"
|
||||||
|
#include "vh_util.h"
|
||||||
#include "vh_ltype.h"
|
#include "vh_ltype.h"
|
||||||
#include "vh_globals.h"
|
#include "vh_globals.h"
|
||||||
|
#include "vh_xspec.h"
|
||||||
#include "vh_xcomm.h"
|
#include "vh_xcomm.h"
|
||||||
|
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
@ -194,7 +196,7 @@ struct magex *gex ;
|
||||||
{
|
{
|
||||||
int indexgex;
|
int indexgex;
|
||||||
struct chain *expr ;
|
struct chain *expr ;
|
||||||
char result ;
|
char result = 'u';
|
||||||
char res ;
|
char res ;
|
||||||
|
|
||||||
if (gex->OPERAND != NULL)
|
if (gex->OPERAND != NULL)
|
||||||
|
@ -947,8 +949,8 @@ struct paini *pt_paini;
|
||||||
char *sig_name ;
|
char *sig_name ;
|
||||||
char *ins_name ;
|
char *ins_name ;
|
||||||
void *pt_sig ;
|
void *pt_sig ;
|
||||||
struct ptype *pt_depend;
|
struct ptype *pt_depend = NULL;
|
||||||
unsigned char *pt_curval;
|
unsigned char *pt_curval = NULL;
|
||||||
|
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
/* for each paini structure, first find the pointer of the */
|
/* for each paini structure, first find the pointer of the */
|
||||||
|
@ -1011,8 +1013,8 @@ struct papat *pt_papat;
|
||||||
|
|
||||||
{
|
{
|
||||||
struct paiol *pt_paiol ;
|
struct paiol *pt_paiol ;
|
||||||
struct bussig *pt_bussig;
|
/*struct bussig *pt_bussig;*/
|
||||||
struct simsig *pt_simsig;
|
/*struct simsig *pt_simsig;*/
|
||||||
struct paevt *pt_paevt ;
|
struct paevt *pt_paevt ;
|
||||||
|
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
|
@ -1066,7 +1068,7 @@ struct papat *pt_papat;
|
||||||
int max_err = 0;
|
int max_err = 0;
|
||||||
struct paiol *pt_paiol ;
|
struct paiol *pt_paiol ;
|
||||||
struct paevt *pt_paevt ;
|
struct paevt *pt_paevt ;
|
||||||
char value ;
|
char value = 'u';
|
||||||
char usrval ;
|
char usrval ;
|
||||||
|
|
||||||
max_iol = pt_paseq->IOLNBR;
|
max_iol = pt_paseq->IOLNBR;
|
||||||
|
@ -1289,7 +1291,7 @@ struct paseq *pt_paseq;
|
||||||
struct lkdspy *head_lkdspy;
|
struct lkdspy *head_lkdspy;
|
||||||
|
|
||||||
{
|
{
|
||||||
char str[200] ;
|
char str[256] ;
|
||||||
struct lkdspy *pt_lkdspy= NULL ;
|
struct lkdspy *pt_lkdspy= NULL ;
|
||||||
|
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
|
@ -1309,7 +1311,9 @@ struct lkdspy *head_lkdspy;
|
||||||
|
|
||||||
if (pt_lkdspy->PAIOL->MODE == 'I')
|
if (pt_lkdspy->PAIOL->MODE == 'I')
|
||||||
{
|
{
|
||||||
sprintf(str, "%s : Warning : this spy is useless (input signal)", str);
|
char tmp[256];
|
||||||
|
sprintf(tmp, "%s : Warning : this spy is useless (input signal)", str);
|
||||||
|
strncpy(str, tmp, 256);
|
||||||
}
|
}
|
||||||
pt_paseq->CURCOM = pat_addpacom(pt_paseq->CURCOM, namealloc(str), 0);
|
pt_paseq->CURCOM = pat_addpacom(pt_paseq->CURCOM, namealloc(str), 0);
|
||||||
}
|
}
|
||||||
|
@ -1339,13 +1343,12 @@ unsigned int labelsiz;
|
||||||
struct wrireg *pt_wrireg= NULL ;
|
struct wrireg *pt_wrireg= NULL ;
|
||||||
struct paevt *pt_paevt = NULL ;
|
struct paevt *pt_paevt = NULL ;
|
||||||
struct lkdspy *pt_lkdspy= NULL ;
|
struct lkdspy *pt_lkdspy= NULL ;
|
||||||
char value ;
|
char value = 'u';
|
||||||
char *label ;
|
char *label ;
|
||||||
char str[200] ;
|
|
||||||
int spy_event_flag = 0 ;
|
int spy_event_flag = 0 ;
|
||||||
|
|
||||||
label = mbkalloc (labelsiz + 1);
|
label = mbkalloc (labelsiz + 1);
|
||||||
sprintf(label, "");
|
label[0] = '\0';
|
||||||
max_iol = pt_paseq->IOLNBR;
|
max_iol = pt_paseq->IOLNBR;
|
||||||
|
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
|
@ -1416,7 +1419,9 @@ unsigned int labelsiz;
|
||||||
{
|
{
|
||||||
if ((strlen (label) + 10) <= labelsiz)
|
if ((strlen (label) + 10) <= labelsiz)
|
||||||
{
|
{
|
||||||
sprintf(label, "%s_spy%u", label, pt_lkdspy->IOLNBR);
|
char tmp[2048];
|
||||||
|
sprintf(tmp, "%s_spy%u", label, pt_lkdspy->IOLNBR);
|
||||||
|
strcpy(label, tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
/* the simulation funciotns */
|
/* the simulation funciotns */
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
||||||
extern unsigned long vhx_getvalu ();
|
extern unsigned long vhx_getvalu ();
|
||||||
extern unsigned long vhx_getsize ();
|
extern unsigned long vhx_getsize ();
|
||||||
extern char vhx_gexeval ();
|
extern char vhx_gexeval ();
|
||||||
extern char vhx_muxbit ();
|
extern char vhx_muxbit ();
|
||||||
extern char vhx_worbit ();
|
extern char vhx_worbit ();
|
||||||
|
@ -29,4 +29,6 @@ extern unsigned int vhx_readinput ();
|
||||||
extern void vhx_writeout ();
|
extern void vhx_writeout ();
|
||||||
extern void vhx_writebus ();
|
extern void vhx_writebus ();
|
||||||
extern char *vhx_GetInstanceName ();
|
extern char *vhx_GetInstanceName ();
|
||||||
|
extern void vhx_vectorinit ();
|
||||||
extern void vhx_vectorstat ();
|
extern void vhx_vectorstat ();
|
||||||
|
extern void vhx_commentspytable ();
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "pat.h"
|
#include "pat.h"
|
||||||
#include "sch.h"
|
#include "sch.h"
|
||||||
|
#include "vh_util.h"
|
||||||
#include "vh_ltype.h"
|
#include "vh_ltype.h"
|
||||||
#include "vh_globals.h"
|
#include "vh_globals.h"
|
||||||
#include "vh_xcomm.h"
|
#include "vh_xcomm.h"
|
||||||
|
@ -862,7 +863,7 @@ unsigned int cur_date;
|
||||||
struct simsig *pt_simsig;
|
struct simsig *pt_simsig;
|
||||||
unsigned int count = 0;
|
unsigned int count = 0;
|
||||||
unsigned int l_tim = 0; /* Statistics last_time access */
|
unsigned int l_tim = 0; /* Statistics last_time access */
|
||||||
char resval ;
|
char resval = 'u';
|
||||||
|
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
/* update simple signals' value */
|
/* update simple signals' value */
|
||||||
|
@ -1212,7 +1213,8 @@ char *filename;
|
||||||
|
|
||||||
if((fp = mbkfopen(filename, "sta", WRITE_TEXT)) == NULL)
|
if((fp = mbkfopen(filename, "sta", WRITE_TEXT)) == NULL)
|
||||||
{
|
{
|
||||||
sprintf(signame, "%s.sta", filename);
|
signame = (char*)malloc( 1024*sizeof(char) );
|
||||||
|
snprintf(signame, 1024, "%s.sta", filename);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1232,7 +1234,8 @@ char *filename;
|
||||||
pt_simsig = pt_lkdfig->SIMSIG;
|
pt_simsig = pt_lkdfig->SIMSIG;
|
||||||
while (pt_simsig != NULL)
|
while (pt_simsig != NULL)
|
||||||
{
|
{
|
||||||
signame = (char *)getsigname(pt_simsig);
|
/* FRAGILE: the cast works because the two first fields are identicals */
|
||||||
|
signame = (char *)getsigname((losig_list*)pt_simsig);
|
||||||
num_evt = VHX_VECTOR_TRANS[i];
|
num_evt = VHX_VECTOR_TRANS[i];
|
||||||
num_prb = VHX_VECTOR_PROBA[i];
|
num_prb = VHX_VECTOR_PROBA[i];
|
||||||
pt_paiol = pt_paseq->PAIOL;
|
pt_paiol = pt_paseq->PAIOL;
|
||||||
|
@ -1293,7 +1296,8 @@ char *filename;
|
||||||
pt_bussig = pt_lkdfig->BUSSIG;
|
pt_bussig = pt_lkdfig->BUSSIG;
|
||||||
while (pt_bussig != NULL)
|
while (pt_bussig != NULL)
|
||||||
{
|
{
|
||||||
signame = (char *)getsigname(pt_bussig);
|
/* FRAGILE: the cast works because the two first fields are identicals */
|
||||||
|
signame = (char *)getsigname((losig_list*)pt_bussig);
|
||||||
num_evt = VHX_VECTOR_TRANS[i];
|
num_evt = VHX_VECTOR_TRANS[i];
|
||||||
num_prb = VHX_VECTOR_PROBA[i];
|
num_prb = VHX_VECTOR_PROBA[i];
|
||||||
|
|
||||||
|
@ -1482,7 +1486,8 @@ char *filename;
|
||||||
pt_simsig = pt_lkdfig->SIMSIG;
|
pt_simsig = pt_lkdfig->SIMSIG;
|
||||||
while (pt_simsig != NULL)
|
while (pt_simsig != NULL)
|
||||||
{
|
{
|
||||||
signame = (char *)getsigname(pt_simsig);
|
/* FRAGILE: the cast works because the two first fields are identicals */
|
||||||
|
signame = (char *)getsigname((losig_list*)pt_simsig);
|
||||||
num_evt = st_getstat(dict, pt_simsig, CTXEVT, num_time, *(pt_simsig->CURVAL));
|
num_evt = st_getstat(dict, pt_simsig, CTXEVT, num_time, *(pt_simsig->CURVAL));
|
||||||
num_prb = st_getstat(dict, pt_simsig, CTXPRB, num_time, *(pt_simsig->CURVAL));
|
num_prb = st_getstat(dict, pt_simsig, CTXPRB, num_time, *(pt_simsig->CURVAL));
|
||||||
pt_paiol = pt_paseq->PAIOL;
|
pt_paiol = pt_paseq->PAIOL;
|
||||||
|
@ -1541,7 +1546,8 @@ char *filename;
|
||||||
pt_bussig = pt_lkdfig->BUSSIG;
|
pt_bussig = pt_lkdfig->BUSSIG;
|
||||||
while (pt_bussig != NULL)
|
while (pt_bussig != NULL)
|
||||||
{
|
{
|
||||||
signame = (char *)getsigname(pt_bussig);
|
/* FRAGILE: the cast works because the two first fields are identicals */
|
||||||
|
signame = (char *)getsigname((losig_list*)pt_bussig);
|
||||||
num_evt = st_getstat(dict, pt_bussig, CTXEVT, num_time, *(pt_bussig->CURVAL));
|
num_evt = st_getstat(dict, pt_bussig, CTXEVT, num_time, *(pt_bussig->CURVAL));
|
||||||
num_prb = st_getstat(dict, pt_bussig, CTXPRB, num_time, *(pt_bussig->CURVAL));
|
num_prb = st_getstat(dict, pt_bussig, CTXPRB, num_time, *(pt_bussig->CURVAL));
|
||||||
pt_paiol = pt_paseq->PAIOL;
|
pt_paiol = pt_paseq->PAIOL;
|
||||||
|
@ -1684,19 +1690,18 @@ char *filename;
|
||||||
unsigned int num_sev = 0;
|
unsigned int num_sev = 0;
|
||||||
unsigned int num_mev = 0;
|
unsigned int num_mev = 0;
|
||||||
unsigned int num_cycle = 0;
|
unsigned int num_cycle = 0;
|
||||||
int found = 0;
|
|
||||||
struct simsig *pt_simsig;
|
struct simsig *pt_simsig;
|
||||||
struct bussig *pt_bussig;
|
struct bussig *pt_bussig;
|
||||||
struct lkdins *pt_lkdins;
|
struct lkdins *pt_lkdins;
|
||||||
struct wriaux *pt_wriaux;
|
struct wriaux *pt_wriaux;
|
||||||
struct wribux *pt_wribux;
|
struct wribux *pt_wribux;
|
||||||
struct wrireg *pt_wrireg;
|
struct wrireg *pt_wrireg;
|
||||||
struct paiol *pt_paiol;
|
|
||||||
|
|
||||||
if((fp = mbkfopen(filename, "stb", WRITE_TEXT)) == NULL)
|
if((fp = mbkfopen(filename, "stb", WRITE_TEXT)) == NULL)
|
||||||
{
|
{
|
||||||
sprintf(signame, "%s.stb", filename);
|
signame = (char*)malloc( 512*sizeof(char) );
|
||||||
exit(1);
|
snprintf(signame, 512, "%s.stb", filename);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
time(&clock);
|
time(&clock);
|
||||||
|
@ -1715,7 +1720,8 @@ char *filename;
|
||||||
pt_simsig = pt_lkdfig->SIMSIG;
|
pt_simsig = pt_lkdfig->SIMSIG;
|
||||||
while (pt_simsig != NULL)
|
while (pt_simsig != NULL)
|
||||||
{
|
{
|
||||||
signame = (char *)getsigname(pt_simsig);
|
/* FRAGILE: the cast works because the two first fields are identicals */
|
||||||
|
signame = (char *)getsigname((losig_list*)pt_simsig);
|
||||||
num_sev = (unsigned int) beh_chktab(dict, pt_simsig, CTXSEV, VHL_PNTDFN);
|
num_sev = (unsigned int) beh_chktab(dict, pt_simsig, CTXSEV, VHL_PNTDFN);
|
||||||
num_mev = (unsigned int) beh_chktab(dict, pt_simsig, CTXMEV, VHL_PNTDFN);
|
num_mev = (unsigned int) beh_chktab(dict, pt_simsig, CTXMEV, VHL_PNTDFN);
|
||||||
|
|
||||||
|
@ -1736,7 +1742,8 @@ char *filename;
|
||||||
pt_bussig = pt_lkdfig->BUSSIG;
|
pt_bussig = pt_lkdfig->BUSSIG;
|
||||||
while (pt_bussig != NULL)
|
while (pt_bussig != NULL)
|
||||||
{
|
{
|
||||||
signame = (char *)getsigname(pt_bussig);
|
/* FRAGILE: the cast works because the two first fields are identicals */
|
||||||
|
signame = (char *)getsigname((losig_list*)pt_bussig);
|
||||||
num_sev = (unsigned int) beh_chktab(dict, pt_bussig, CTXSEV, VHL_PNTDFN);
|
num_sev = (unsigned int) beh_chktab(dict, pt_bussig, CTXSEV, VHL_PNTDFN);
|
||||||
num_mev = (unsigned int) beh_chktab(dict, pt_bussig, CTXMEV, VHL_PNTDFN);
|
num_mev = (unsigned int) beh_chktab(dict, pt_bussig, CTXMEV, VHL_PNTDFN);
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ extern void vhx_addexec ();
|
||||||
extern int vhx_execute ();
|
extern int vhx_execute ();
|
||||||
extern unsigned int vhx_addtra ();
|
extern unsigned int vhx_addtra ();
|
||||||
extern void vhx_redtra ();
|
extern void vhx_redtra ();
|
||||||
|
extern void vhx_supdate ();
|
||||||
|
|
||||||
extern void st_wrtsta ();
|
extern void st_wrtsta ();
|
||||||
extern void st_wrtstadly ();
|
extern void st_wrtstadly ();
|
||||||
|
|
|
@ -92,6 +92,7 @@
|
||||||
| |
|
| |
|
||||||
\------------------------------------------------------------*/
|
\------------------------------------------------------------*/
|
||||||
|
|
||||||
extern void aut_error __P((int Error, char *Text, char *File, long Line));
|
extern void aut_error __P((int Error, char *Text, char *File, long Line));
|
||||||
|
extern void aut_warning __P((int Warning, char* Text, char* File, long Line ));
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -118,7 +118,7 @@ void autfree( Pointer, Size )
|
||||||
|
|
||||||
if ( AllocDebug->POINTER != AllocDebug )
|
if ( AllocDebug->POINTER != AllocDebug )
|
||||||
{
|
{
|
||||||
fprintf( stdout, "ERROR autfree %lx != %lx !!!!\n", AllocDebug->POINTER, AllocDebug );
|
fprintf( stdout, "ERROR autfree %p != %p !!!!\n", AllocDebug->POINTER, AllocDebug );
|
||||||
autexit( 1 );
|
autexit( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ void autfree( Pointer, Size )
|
||||||
if ( ( AllocDebug->HEAP ) &&
|
if ( ( AllocDebug->HEAP ) &&
|
||||||
( AllocDebug->SIZE != Size ) )
|
( AllocDebug->SIZE != Size ) )
|
||||||
{
|
{
|
||||||
fprintf( stdout, "ERROR autfree heap mode and size %ld != %ld !!!!\n",
|
fprintf( stdout, "ERROR autfree heap mode and size %ld != %u !!!!\n",
|
||||||
AllocDebug->SIZE, Size );
|
AllocDebug->SIZE, Size );
|
||||||
autexit( 1 );
|
autexit( 1 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,7 +195,6 @@ autarc_list *addautgrapharc( Graph, NodeFrom, NodeTo )
|
||||||
autnode_list *NodeTo;
|
autnode_list *NodeTo;
|
||||||
{
|
{
|
||||||
autarc_list *Arc;
|
autarc_list *Arc;
|
||||||
chain_list *ScanArc;
|
|
||||||
|
|
||||||
Arc = searchautgrapharc( Graph, NodeFrom, NodeTo );
|
Arc = searchautgrapharc( Graph, NodeFrom, NodeTo );
|
||||||
|
|
||||||
|
|
|
@ -452,7 +452,7 @@ bddnode *B2fTreatInitialState( BehFigure, FlagInitial, StringInitial )
|
||||||
authtable *HashTable;
|
authtable *HashTable;
|
||||||
authelem *Element;
|
authelem *Element;
|
||||||
char *ScanString;
|
char *ScanString;
|
||||||
long Value;
|
long Value = 0;
|
||||||
int Index;
|
int Index;
|
||||||
int Scan;
|
int Scan;
|
||||||
int Length;
|
int Length;
|
||||||
|
@ -624,7 +624,6 @@ void B2fTreatState( BehFigure, FlagInitial, StringInitial )
|
||||||
bddnode *BddImageSet;
|
bddnode *BddImageSet;
|
||||||
bddnode *BddImage;
|
bddnode *BddImage;
|
||||||
bddvar Variable;
|
bddvar Variable;
|
||||||
int InitialExist;
|
|
||||||
long NumberIndex;
|
long NumberIndex;
|
||||||
long StateIndex;
|
long StateIndex;
|
||||||
|
|
||||||
|
@ -738,10 +737,9 @@ void B2fTreatPort( BehFigure )
|
||||||
befig_list *BehFigure;
|
befig_list *BehFigure;
|
||||||
{
|
{
|
||||||
bepor_list *ScanPort;
|
bepor_list *ScanPort;
|
||||||
char *ClockName;
|
|
||||||
char *Vector;
|
char *Vector;
|
||||||
long Index;
|
long Index;
|
||||||
int FsmType;
|
int FsmType = FSM_TYPE_BIT;
|
||||||
|
|
||||||
for ( ScanPort = BehFigure->BEPOR;
|
for ( ScanPort = BehFigure->BEPOR;
|
||||||
ScanPort != (bepor_list *)0;
|
ScanPort != (bepor_list *)0;
|
||||||
|
@ -785,18 +783,16 @@ void B2fTreatRegister( BehFigure )
|
||||||
|
|
||||||
befig_list *BehFigure;
|
befig_list *BehFigure;
|
||||||
{
|
{
|
||||||
bddcircuit *BddCircuit;
|
|
||||||
bereg_list *ScanReg;
|
bereg_list *ScanReg;
|
||||||
binode_list *BiNode;
|
binode_list *BiNode;
|
||||||
bddnode *BddNode;
|
bddnode *BddNode;
|
||||||
chain_list *Expr;
|
chain_list *Expr;
|
||||||
chain_list *Support;
|
chain_list *Support;
|
||||||
char *RegName;
|
char *RegName = NULL;
|
||||||
long Index;
|
long Index;
|
||||||
|
|
||||||
B2fNumberRegister = 0;
|
B2fNumberRegister = 0;
|
||||||
B2fRegisterName = (char *)0;
|
B2fRegisterName = (char *)0;
|
||||||
BddCircuit = BehFigure->CIRCUI;
|
|
||||||
BddNode = (bddnode *)0;
|
BddNode = (bddnode *)0;
|
||||||
Expr = (chain_list *)0;
|
Expr = (chain_list *)0;
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -94,4 +94,7 @@
|
||||||
| |
|
| |
|
||||||
\------------------------------------------------------------*/
|
\------------------------------------------------------------*/
|
||||||
|
|
||||||
|
extern void B2fDisplayError ();
|
||||||
|
extern void B2fDisplayWarning();
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -110,7 +110,7 @@ char *loc_getbddstablename( Name )
|
||||||
sprintf( BddStableName, "%s'stable", Name );
|
sprintf( BddStableName, "%s'stable", Name );
|
||||||
StableName = namealloc( BddStableName );
|
StableName = namealloc( BddStableName );
|
||||||
|
|
||||||
Element = addauthelem( BddHashInvStable, StableName, (long)Name );
|
addauthelem( BddHashInvStable, StableName, (long)Name );
|
||||||
Element = addauthelem( BddHashStable , Name, (long)StableName );
|
Element = addauthelem( BddHashStable , Name, (long)StableName );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -600,7 +600,7 @@ bddnode *addbddcircuitout( BddCircuit, OutputName, BddNode )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BddLocalCircuit->NUMBER_NAME_OUT++;
|
BddLocalCircuit->NUMBER_NAME_OUT++;
|
||||||
Element = addauthelem( BddLocalCircuit->HASH_OUT, OutputName, (long)BddNode );
|
addauthelem( BddLocalCircuit->HASH_OUT, OutputName, (long)BddNode );
|
||||||
}
|
}
|
||||||
|
|
||||||
return( incbddrefext( BddNode ) );
|
return( incbddrefext( BddNode ) );
|
||||||
|
|
|
@ -161,7 +161,7 @@ bddcircuit *undumpbddcircuit( BddSystem, FileName )
|
||||||
Name = BddDumpBuffer + 9;
|
Name = BddDumpBuffer + 9;
|
||||||
|
|
||||||
loc_undumpbddgetline();
|
loc_undumpbddgetline();
|
||||||
Value = sscanf( BddDumpBuffer, ".port %ld %ld", &NumberIn, &NumberOut );
|
Value = sscanf( BddDumpBuffer, ".port %22ld %22ld", &NumberIn, &NumberOut );
|
||||||
if ( Value != 2 ) bdderror( BDD_UNDUMP_LINE_ERROR, BddDumpLine );
|
if ( Value != 2 ) bdderror( BDD_UNDUMP_LINE_ERROR, BddDumpLine );
|
||||||
|
|
||||||
loc_undumpbddgetline();
|
loc_undumpbddgetline();
|
||||||
|
@ -180,7 +180,7 @@ bddcircuit *undumpbddcircuit( BddSystem, FileName )
|
||||||
if ( Scan != (char *)0 )
|
if ( Scan != (char *)0 )
|
||||||
{
|
{
|
||||||
*Scan = '\0';
|
*Scan = '\0';
|
||||||
Value = sscanf( BddDumpBuffer, "%ld", &BddVar );
|
Value = sscanf( BddDumpBuffer, "%22ld", &BddVar );
|
||||||
Name = namealloc( Scan + 1 );
|
Name = namealloc( Scan + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ bddcircuit *undumpbddcircuit( BddSystem, FileName )
|
||||||
}
|
}
|
||||||
|
|
||||||
loc_undumpbddgetline();
|
loc_undumpbddgetline();
|
||||||
Value = sscanf( BddDumpBuffer, ".node %ld %lX %lX",
|
Value = sscanf( BddDumpBuffer, ".node %22ld %18lX %18lX",
|
||||||
&NumberNode, &ZeroAddr, &OneAddr );
|
&NumberNode, &ZeroAddr, &OneAddr );
|
||||||
if ( Value != 3 ) bdderror( BDD_UNDUMP_LINE_ERROR, BddDumpLine );
|
if ( Value != 3 ) bdderror( BDD_UNDUMP_LINE_ERROR, BddDumpLine );
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ bddcircuit *undumpbddcircuit( BddSystem, FileName )
|
||||||
|
|
||||||
while ( BddDumpBuffer[ 0 ] != '.' )
|
while ( BddDumpBuffer[ 0 ] != '.' )
|
||||||
{
|
{
|
||||||
Value = sscanf( BddDumpBuffer, "%lX %ld %lX %lX",
|
Value = sscanf( BddDumpBuffer, "%18lX %22ld %18lX %18lX",
|
||||||
&NodeAddr, &BddVar, &HighAddr, &LowAddr );
|
&NodeAddr, &BddVar, &HighAddr, &LowAddr );
|
||||||
if ( Value != 4 ) bdderror( BDD_UNDUMP_LINE_ERROR, BddDumpLine );
|
if ( Value != 4 ) bdderror( BDD_UNDUMP_LINE_ERROR, BddDumpLine );
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ bddcircuit *undumpbddcircuit( BddSystem, FileName )
|
||||||
if ( Scan != (char *)0 )
|
if ( Scan != (char *)0 )
|
||||||
{
|
{
|
||||||
*Scan = '\0';
|
*Scan = '\0';
|
||||||
Value = sscanf( BddDumpBuffer, "%lX", &NodeAddr );
|
Value = sscanf( BddDumpBuffer, "%18lX", &NodeAddr );
|
||||||
Name = namealloc( Scan + 1 );
|
Name = namealloc( Scan + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,9 +65,6 @@
|
||||||
| Variables |
|
| Variables |
|
||||||
| |
|
| |
|
||||||
\------------------------------------------------------------*/
|
\------------------------------------------------------------*/
|
||||||
|
|
||||||
static long BddMarkNumberNode = 0;
|
|
||||||
|
|
||||||
/*------------------------------------------------------------\
|
/*------------------------------------------------------------\
|
||||||
| |
|
| |
|
||||||
| Functions |
|
| Functions |
|
||||||
|
|
|
@ -135,7 +135,7 @@ bddnode *addbddnode( BddSystem, Index, High, Low )
|
||||||
{
|
{
|
||||||
if ( ! IsBddSystemExplosion( BddLocalSystem ) )
|
if ( ! IsBddSystemExplosion( BddLocalSystem ) )
|
||||||
{
|
{
|
||||||
BddLocalSystem->HASH_OPER->TABLE_FREEZE;
|
//BddLocalSystem->HASH_OPER->TABLE_FREEZE;
|
||||||
|
|
||||||
if ( BddLocalSystem->EXPLOSION_FUNC != NULL )
|
if ( BddLocalSystem->EXPLOSION_FUNC != NULL )
|
||||||
{
|
{
|
||||||
|
|
|
@ -166,7 +166,7 @@ reorderbddvarwindow3( BddSystem, BddVar )
|
||||||
|
|
||||||
if ( BddLocalSystem->NUMBER_NODE < NumberNode )
|
if ( BddLocalSystem->NUMBER_NODE < NumberNode )
|
||||||
{
|
{
|
||||||
NumberNode = BddLocalSystem->NUMBER_NODE;
|
//BddLocalSystem->NUMBER_NODE;
|
||||||
BestOrder = BDD_REORDER_132;
|
BestOrder = BDD_REORDER_132;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ reorderbddsystemtop( BddSystem )
|
||||||
while ( VarCount > 0 )
|
while ( VarCount > 0 )
|
||||||
{
|
{
|
||||||
# ifdef BDD_DEBUG
|
# ifdef BDD_DEBUG
|
||||||
fprintf( stdout, "-> VarFrom %d\n", VarFrom );
|
fprintf( stdout, "-> VarFrom %u\n", VarFrom );
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
BddReorderLevel[ VarFrom ] = 0;
|
BddReorderLevel[ VarFrom ] = 0;
|
||||||
|
@ -363,7 +363,7 @@ reorderbddsystemtop( BddSystem )
|
||||||
for ( VarTo = VarFrom; VarTo < NumberVar - 1; VarTo++ )
|
for ( VarTo = VarFrom; VarTo < NumberVar - 1; VarTo++ )
|
||||||
{
|
{
|
||||||
# ifdef BDD_DEBUG
|
# ifdef BDD_DEBUG
|
||||||
fprintf( stdout, "-> Swap %d and %d\n", VarTo, VarTo + 1 );
|
fprintf( stdout, "-> Swap %u and %d\n", VarTo, VarTo + 1 );
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
swapbddvar( BddLocalSystem, VarTo );
|
swapbddvar( BddLocalSystem, VarTo );
|
||||||
|
@ -379,14 +379,14 @@ reorderbddsystemtop( BddSystem )
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef BDD_DEBUG
|
# ifdef BDD_DEBUG
|
||||||
fprintf( stdout, "--> Best one %d\n", BestVar );
|
fprintf( stdout, "--> Best one %u\n", BestVar );
|
||||||
fprintf( stdout, "--> Number nodes %d\n", NumberNode );
|
fprintf( stdout, "--> Number nodes %d\n", NumberNode );
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
for ( VarTo = NumberVar - 1; VarTo > BestVar; VarTo-- )
|
for ( VarTo = NumberVar - 1; VarTo > BestVar; VarTo-- )
|
||||||
{
|
{
|
||||||
# ifdef BDD_DEBUG
|
# ifdef BDD_DEBUG
|
||||||
fprintf( stdout, "-> UnSwap %d and %d\n", VarTo - 1, VarTo );
|
fprintf( stdout, "-> UnSwap %d and %u\n", VarTo - 1, VarTo );
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
SwapReorder = BddReorderLevel[ VarTo - 1 ];
|
SwapReorder = BddReorderLevel[ VarTo - 1 ];
|
||||||
|
|
|
@ -302,13 +302,13 @@ void viewbddsystem( BddSystem, ViewIndex )
|
||||||
|
|
||||||
for ( Index = 0; Index < BddSystem->NUMBER_INDEX; Index++ )
|
for ( Index = 0; Index < BddSystem->NUMBER_INDEX; Index++ )
|
||||||
{
|
{
|
||||||
fprintf( stdout, " INDEX_TO_VAR[ %d ] = %d\n",
|
fprintf( stdout, " INDEX_TO_VAR[ %u ] = %d\n",
|
||||||
Index, IndexToVar[ Index ] );
|
Index, IndexToVar[ Index ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( Variable = 0; Variable < BddSystem->NUMBER_VAR; Variable++ )
|
for ( Variable = 0; Variable < BddSystem->NUMBER_VAR; Variable++ )
|
||||||
{
|
{
|
||||||
fprintf( stdout, " VAR_TO_INDEX[ %d ] = %d\n",
|
fprintf( stdout, " VAR_TO_INDEX[ %u ] = %d\n",
|
||||||
Variable, VarToIndex[ Variable ] );
|
Variable, VarToIndex[ Variable ] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct beaux headaux;
|
struct beaux headaux;
|
||||||
struct beaux *ptlastaux;
|
struct beaux *ptlastaux = NULL;
|
||||||
struct beaux *ptbeaux;
|
struct beaux *ptbeaux;
|
||||||
|
|
||||||
if (listbeaux != NULL)
|
if (listbeaux != NULL)
|
||||||
|
|
|
@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct bebus headbus;
|
struct bebus headbus;
|
||||||
struct bebus *ptlastbus;
|
struct bebus *ptlastbus = NULL;
|
||||||
struct bebus *ptbebus;
|
struct bebus *ptbebus;
|
||||||
|
|
||||||
if (listbebus != NULL)
|
if (listbebus != NULL)
|
||||||
|
|
|
@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct bebux headbux;
|
struct bebux headbux;
|
||||||
struct bebux *ptlastbux;
|
struct bebux *ptlastbux = NULL;
|
||||||
struct bebux *ptbebux;
|
struct bebux *ptbebux;
|
||||||
|
|
||||||
if (listbebux != NULL)
|
if (listbebux != NULL)
|
||||||
|
|
|
@ -48,7 +48,7 @@ short bederindex; /* index of the BEDER to be deleted */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct beder headder;
|
struct beder headder;
|
||||||
struct beder *ptlastder;
|
struct beder *ptlastder = NULL;
|
||||||
struct beder *ptbeder;
|
struct beder *ptbeder;
|
||||||
|
|
||||||
if (listbeder != NULL)
|
if (listbeder != NULL)
|
||||||
|
|
|
@ -53,7 +53,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct befig headfig;
|
struct befig headfig;
|
||||||
struct befig *ptlastfig;
|
struct befig *ptlastfig = NULL;
|
||||||
struct befig *ptbefig;
|
struct befig *ptbefig;
|
||||||
struct ptype *ptptype;
|
struct ptype *ptptype;
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct begen headgen;
|
struct begen headgen;
|
||||||
struct begen *ptlastgen;
|
struct begen *ptlastgen = NULL;
|
||||||
struct begen *ptbegen;
|
struct begen *ptbegen;
|
||||||
|
|
||||||
if (listbegen != NULL)
|
if (listbegen != NULL)
|
||||||
|
|
|
@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct bemsg headmsg;
|
struct bemsg headmsg;
|
||||||
struct bemsg *ptlastmsg;
|
struct bemsg *ptlastmsg = NULL;
|
||||||
struct bemsg *ptbemsg;
|
struct bemsg *ptbemsg;
|
||||||
|
|
||||||
if (listbemsg != NULL)
|
if (listbemsg != NULL)
|
||||||
|
|
|
@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct beout headout;
|
struct beout headout;
|
||||||
struct beout *ptlastout;
|
struct beout *ptlastout = NULL;
|
||||||
struct beout *ptbeout;
|
struct beout *ptbeout;
|
||||||
|
|
||||||
if (listbeout != NULL)
|
if (listbeout != NULL)
|
||||||
|
|
|
@ -48,7 +48,7 @@ char *beporname; /* name of the BEPOR to be deleted */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct bepor headpor;
|
struct bepor headpor;
|
||||||
struct bepor *ptlastpor;
|
struct bepor *ptlastpor = NULL;
|
||||||
struct bepor *ptbepor;
|
struct bepor *ptbepor;
|
||||||
|
|
||||||
if (listbepor != NULL)
|
if (listbepor != NULL)
|
||||||
|
|
|
@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct bereg headreg;
|
struct bereg headreg;
|
||||||
struct bereg *ptlastreg;
|
struct bereg *ptlastreg = NULL;
|
||||||
struct bereg *ptbereg;
|
struct bereg *ptbereg;
|
||||||
|
|
||||||
if (listbereg != NULL)
|
if (listbereg != NULL)
|
||||||
|
|
|
@ -48,7 +48,7 @@ char *berinname; /* name of the BERIN to be deleted */
|
||||||
|
|
||||||
{
|
{
|
||||||
struct berin headrin;
|
struct berin headrin;
|
||||||
struct berin *ptlastrin;
|
struct berin *ptlastrin = NULL;
|
||||||
struct berin *ptberin;
|
struct berin *ptberin;
|
||||||
|
|
||||||
if (listberin != NULL)
|
if (listberin != NULL)
|
||||||
|
|
|
@ -22,11 +22,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
/* file : beh_clrdepend.c */
|
/* file : beh_clrdepend.c */
|
||||||
/* date : Mar 8
|
/* date : Mar 8 */
|
||||||
/* version : v111 */
|
/* version : v111 */
|
||||||
/* author : Laurent VUILLEMIN, Pirouz BAZARGAN SABET */
|
/* author : Laurent VUILLEMIN, Pirouz BAZARGAN SABET */
|
||||||
/* description : beh_clrdepend */
|
/* description : beh_clrdepend */
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -30,13 +30,14 @@
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include "mut.h"
|
#include "mut.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "beh.h"
|
#include "beh.h"
|
||||||
#include "beh_debug.h"
|
#include "beh_debug.h"
|
||||||
|
|
||||||
static char *buffer = NULL;
|
static char *buffer = NULL;
|
||||||
static unsigned long buff_size = 0;
|
static long buff_size = 0;
|
||||||
static struct circuit *circuit_pnt = NULL;
|
static struct circuit *circuit_pnt = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,7 +69,6 @@ char **str; /* recognized strings */
|
||||||
struct beout *beout_pnt;
|
struct beout *beout_pnt;
|
||||||
struct bebus *bebus_pnt;
|
struct bebus *bebus_pnt;
|
||||||
struct beaux *beaux_pnt;
|
struct beaux *beaux_pnt;
|
||||||
struct beaux *bedly_pnt;
|
|
||||||
struct bebux *bebux_pnt;
|
struct bebux *bebux_pnt;
|
||||||
struct bepor *bepor_pnt;
|
struct bepor *bepor_pnt;
|
||||||
struct begen *begen_pnt;
|
struct begen *begen_pnt;
|
||||||
|
@ -561,20 +561,20 @@ char **str; /* recognized strings */
|
||||||
{
|
{
|
||||||
case s_DFN :
|
case s_DFN :
|
||||||
if (pnt[i].dat != NULL)
|
if (pnt[i].dat != NULL)
|
||||||
printf ("%s", pnt[i].dat);
|
printf ("%s", (char*)pnt[i].dat);
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case u_DFN :
|
case u_DFN :
|
||||||
printf ("%u\n", pnt[i].imd);
|
printf ("%u\n", (unsigned int)pnt[i].imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case c_DFN :
|
case c_DFN :
|
||||||
printf ("'%c'\n", pnt[i].imd);
|
printf ("'%c'\n", (char)pnt[i].imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case d_DFN :
|
case d_DFN :
|
||||||
printf ("%d\n", pnt[i].imd);
|
printf ("%d\n", (int)pnt[i].imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case l_DFN :
|
case l_DFN :
|
||||||
|
@ -582,7 +582,7 @@ char **str; /* recognized strings */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case x_DFN :
|
case x_DFN :
|
||||||
printf ("0x%x\n", pnt[i].imd);
|
printf ("0x%x\n", (unsigned int)pnt[i].imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ABL_DFN :
|
case ABL_DFN :
|
||||||
|
@ -798,7 +798,7 @@ long *indxs; /* words' index in strgs table */
|
||||||
|
|
||||||
for (i=0 ; i<wrdcnt ; i++)
|
for (i=0 ; i<wrdcnt ; i++)
|
||||||
{
|
{
|
||||||
flags [i] = sscanf (words [i], "%u", &nmbrs [i]);
|
flags [i] = sscanf (words [i], "%11ld", &nmbrs [i]);
|
||||||
for (j=0; j<MAXCMD_DFN ; j++)
|
for (j=0; j<MAXCMD_DFN ; j++)
|
||||||
{
|
{
|
||||||
if (!strcmp (strgs [j], words [i]))
|
if (!strcmp (strgs [j], words [i]))
|
||||||
|
@ -861,7 +861,6 @@ union value pnt ;
|
||||||
long type ;
|
long type ;
|
||||||
|
|
||||||
{
|
{
|
||||||
char *lcl_str ;
|
|
||||||
struct chain *ptr_abl ;
|
struct chain *ptr_abl ;
|
||||||
|
|
||||||
printf (" %-15s: ", str [type]);
|
printf (" %-15s: ", str [type]);
|
||||||
|
@ -874,13 +873,13 @@ long type ;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case character_DFN :
|
case character_DFN :
|
||||||
printf ("%c\n", pnt.imd);
|
printf ("%c\n", (char)pnt.imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case short_DFN :
|
case short_DFN :
|
||||||
case integer_DFN :
|
case integer_DFN :
|
||||||
case long_DFN :
|
case long_DFN :
|
||||||
printf ("0x%x\n", pnt.imd);
|
printf ("0x%x\n", (unsigned int)pnt.imd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case abl_DFN :
|
case abl_DFN :
|
||||||
|
@ -927,8 +926,9 @@ void *head_pnt; /* structure's pointer */
|
||||||
char *type; /* structure's type */
|
char *type; /* structure's type */
|
||||||
|
|
||||||
{
|
{
|
||||||
char line [128]; /* buffer to read a cmd line */
|
size_t lline = 128;
|
||||||
char heap [128]; /* buffer to split the cmd line */
|
char* line ; /* buffer to read a cmd line */
|
||||||
|
char heap [lline]; /* buffer to split the cmd line */
|
||||||
|
|
||||||
char *words [ 10]; /* number of words on a line */
|
char *words [ 10]; /* number of words on a line */
|
||||||
long nmbrs [ 10]; /* words translated into number */
|
long nmbrs [ 10]; /* words translated into number */
|
||||||
|
@ -936,13 +936,12 @@ char *type; /* structure's type */
|
||||||
long indxs [ 10]; /* index of words */
|
long indxs [ 10]; /* index of words */
|
||||||
|
|
||||||
struct stack jtab [ 10]; /* list of memorized addresses */
|
struct stack jtab [ 10]; /* list of memorized addresses */
|
||||||
long idx, i;
|
long idx;
|
||||||
long dispflg = 0;
|
long dispflg = 0;
|
||||||
long code;
|
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
char *pntr = NULL;
|
char *pntr = NULL;
|
||||||
long pshtype;
|
long pshtype;
|
||||||
long wrdcnt = 1;
|
long wrdcnt;
|
||||||
|
|
||||||
struct stack stk [STKSIZ_DFN];
|
struct stack stk [STKSIZ_DFN];
|
||||||
long stkpnt = -1;
|
long stkpnt = -1;
|
||||||
|
@ -981,6 +980,7 @@ char *type; /* structure's type */
|
||||||
/* - search that words among recognized strings */
|
/* - search that words among recognized strings */
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
|
|
||||||
|
line = (char*)malloc( lline*sizeof(char) );
|
||||||
words [0] = heap;
|
words [0] = heap;
|
||||||
getsize (siz);
|
getsize (siz);
|
||||||
|
|
||||||
|
@ -1209,11 +1209,13 @@ char *type; /* structure's type */
|
||||||
|
|
||||||
printf ("\n\nCOMMAND > ");
|
printf ("\n\nCOMMAND > ");
|
||||||
|
|
||||||
gets (line);
|
getline (&line, &lline, stdin);
|
||||||
if (strcmp (line ,"."))
|
if (strcmp (line ,"."))
|
||||||
{
|
{
|
||||||
wrdcnt = splitline (words, line);
|
wrdcnt = splitline (words, line);
|
||||||
idx = translate (words, wrdcnt, str, nmbrs, flags, indxs);
|
idx = translate (words, wrdcnt, str, nmbrs, flags, indxs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free (line);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,72 +66,72 @@ union value
|
||||||
|
|
||||||
#define TYPE_DFN 0x0000ffff
|
#define TYPE_DFN 0x0000ffff
|
||||||
#define _back_DFN 0
|
#define _back_DFN 0
|
||||||
#define _exit_DFN _back_DFN + 1
|
#define _exit_DFN (_back_DFN + 1)
|
||||||
#define _jump_DFN _exit_DFN + 1
|
#define _jump_DFN (_exit_DFN + 1)
|
||||||
#define _save_DFN _jump_DFN + 1
|
#define _save_DFN (_jump_DFN + 1)
|
||||||
#define _stop_DFN _save_DFN + 1
|
#define _stop_DFN (_save_DFN + 1)
|
||||||
#define _top_DFN _stop_DFN + 1
|
#define _top_DFN (_stop_DFN + 1)
|
||||||
#define _up_DFN _top_DFN + 1
|
#define _up_DFN (_top_DFN + 1)
|
||||||
#define _display_DFN _up_DFN + 1
|
#define _display_DFN (_up_DFN + 1)
|
||||||
|
|
||||||
#define character_DFN _display_DFN + 1
|
#define character_DFN (_display_DFN + 1)
|
||||||
#define short_DFN character_DFN + 1
|
#define short_DFN (character_DFN + 1)
|
||||||
#define integer_DFN short_DFN + 1
|
#define integer_DFN (short_DFN + 1)
|
||||||
#define long_DFN integer_DFN + 1
|
#define long_DFN (integer_DFN + 1)
|
||||||
#define void_DFN long_DFN + 1
|
#define void_DFN (long_DFN + 1)
|
||||||
#define string_DFN void_DFN + 1
|
#define string_DFN (void_DFN + 1)
|
||||||
|
|
||||||
#define chain_DFN string_DFN + 1
|
#define chain_DFN (string_DFN + 1)
|
||||||
#define ptype_DFN chain_DFN + 1
|
#define ptype_DFN (chain_DFN + 1)
|
||||||
|
|
||||||
#define befig_DFN ptype_DFN + 1
|
#define befig_DFN (ptype_DFN + 1)
|
||||||
#define bereg_DFN befig_DFN + 1
|
#define bereg_DFN (befig_DFN + 1)
|
||||||
#define bemsg_DFN bereg_DFN + 1
|
#define bemsg_DFN (bereg_DFN + 1)
|
||||||
#define berin_DFN bemsg_DFN + 1
|
#define berin_DFN (bemsg_DFN + 1)
|
||||||
#define beout_DFN berin_DFN + 1
|
#define beout_DFN (berin_DFN + 1)
|
||||||
#define bebus_DFN beout_DFN + 1
|
#define bebus_DFN (beout_DFN + 1)
|
||||||
#define beaux_DFN bebus_DFN + 1
|
#define beaux_DFN (bebus_DFN + 1)
|
||||||
#define bedly_DFN beaux_DFN + 1
|
#define bedly_DFN (beaux_DFN + 1)
|
||||||
#define bebux_DFN bedly_DFN + 1
|
#define bebux_DFN (bedly_DFN + 1)
|
||||||
#define bepor_DFN bebux_DFN + 1
|
#define bepor_DFN (bebux_DFN + 1)
|
||||||
#define begen_DFN bepor_DFN + 1
|
#define begen_DFN (bepor_DFN + 1)
|
||||||
#define biabl_DFN begen_DFN + 1
|
#define biabl_DFN (begen_DFN + 1)
|
||||||
#define binode_DFN biabl_DFN + 1
|
#define binode_DFN (biabl_DFN + 1)
|
||||||
#define bequad_DFN binode_DFN + 1
|
#define bequad_DFN (binode_DFN + 1)
|
||||||
#define beder_DFN bequad_DFN + 1
|
#define beder_DFN (bequad_DFN + 1)
|
||||||
|
|
||||||
#define next_DFN beder_DFN + 1
|
#define next_DFN (beder_DFN + 1)
|
||||||
#define name_DFN next_DFN + 1
|
#define name_DFN (next_DFN + 1)
|
||||||
#define user_DFN name_DFN + 1
|
#define user_DFN (name_DFN + 1)
|
||||||
#define errflg_DFN user_DFN + 1
|
#define errflg_DFN (user_DFN + 1)
|
||||||
#define type_DFN errflg_DFN + 1
|
#define type_DFN (errflg_DFN + 1)
|
||||||
#define level_DFN type_DFN + 1
|
#define level_DFN (type_DFN + 1)
|
||||||
#define label_DFN level_DFN + 1
|
#define label_DFN (level_DFN + 1)
|
||||||
#define message_DFN label_DFN + 1
|
#define message_DFN (label_DFN + 1)
|
||||||
#define abl_DFN message_DFN + 1
|
#define abl_DFN (message_DFN + 1)
|
||||||
#define node_DFN abl_DFN + 1
|
#define node_DFN (abl_DFN + 1)
|
||||||
#define direction_DFN node_DFN + 1
|
#define direction_DFN (node_DFN + 1)
|
||||||
#define cndabl_DFN direction_DFN + 1
|
#define cndabl_DFN (direction_DFN + 1)
|
||||||
#define valabl_DFN cndabl_DFN + 1
|
#define valabl_DFN (cndabl_DFN + 1)
|
||||||
#define cndnode_DFN valabl_DFN + 1
|
#define cndnode_DFN (valabl_DFN + 1)
|
||||||
#define valnode_DFN cndnode_DFN + 1
|
#define valnode_DFN (cndnode_DFN + 1)
|
||||||
#define out_ref_DFN valnode_DFN + 1
|
#define out_ref_DFN (valnode_DFN + 1)
|
||||||
#define bus_ref_DFN out_ref_DFN + 1
|
#define bus_ref_DFN (out_ref_DFN + 1)
|
||||||
#define aux_ref_DFN bus_ref_DFN + 1
|
#define aux_ref_DFN (bus_ref_DFN + 1)
|
||||||
#define reg_ref_DFN aux_ref_DFN + 1
|
#define reg_ref_DFN (aux_ref_DFN + 1)
|
||||||
#define bux_ref_DFN reg_ref_DFN + 1
|
#define bux_ref_DFN (reg_ref_DFN + 1)
|
||||||
#define msg_ref_DFN bux_ref_DFN + 1
|
#define msg_ref_DFN (bux_ref_DFN + 1)
|
||||||
#define dly_ref_DFN msg_ref_DFN + 1
|
#define dly_ref_DFN (msg_ref_DFN + 1)
|
||||||
#define value_DFN dly_ref_DFN + 1
|
#define value_DFN (dly_ref_DFN + 1)
|
||||||
#define data_DFN value_DFN + 1
|
#define data_DFN (value_DFN + 1)
|
||||||
#define time_DFN data_DFN + 1
|
#define time_DFN (data_DFN + 1)
|
||||||
#define bdd_DFN time_DFN + 1
|
#define bdd_DFN (time_DFN + 1)
|
||||||
#define gex_DFN bdd_DFN + 1
|
#define gex_DFN (bdd_DFN + 1)
|
||||||
#define varlist_DFN gex_DFN + 1
|
#define varlist_DFN (gex_DFN + 1)
|
||||||
#define derivate_DFN varlist_DFN + 1
|
#define derivate_DFN (varlist_DFN + 1)
|
||||||
#define index_DFN derivate_DFN + 1
|
#define index_DFN (derivate_DFN + 1)
|
||||||
#define flag_DFN index_DFN + 1
|
#define flag_DFN (index_DFN + 1)
|
||||||
#define time_unit_DFN flag_DFN + 1
|
#define time_unit_DFN (flag_DFN + 1)
|
||||||
#define time_step_DFN time_unit_DFN + 1
|
#define time_step_DFN (time_unit_DFN + 1)
|
||||||
|
|
||||||
#define MAXCMD_DFN time_step_DFN + 1
|
#define MAXCMD_DFN (time_step_DFN + 1)
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include "mut.h"
|
#include "mut.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "beh.h"
|
#include "beh.h"
|
||||||
|
|
|
@ -72,7 +72,6 @@ struct bequad *pt_bequad;
|
||||||
{
|
{
|
||||||
pNode pt_node ;
|
pNode pt_node ;
|
||||||
struct chain *pt_varidx ;
|
struct chain *pt_varidx ;
|
||||||
struct chain *suppor ;
|
|
||||||
struct beder *list_derive = NULL;
|
struct beder *list_derive = NULL;
|
||||||
|
|
||||||
pt_varidx = pt_bequad->VARLIST;
|
pt_varidx = pt_bequad->VARLIST;
|
||||||
|
@ -105,7 +104,6 @@ struct befig *pt_befig;
|
||||||
struct bereg *pt_bereg;
|
struct bereg *pt_bereg;
|
||||||
struct bemsg *pt_bemsg;
|
struct bemsg *pt_bemsg;
|
||||||
struct binode *pt_binod;
|
struct binode *pt_binod;
|
||||||
struct chain *list_der;
|
|
||||||
|
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
/* check that the BEFIG is ready to support the derivation */
|
/* check that the BEFIG is ready to support the derivation */
|
||||||
|
|
|
@ -149,13 +149,12 @@ unsigned int oper;
|
||||||
/* called func. : none */
|
/* called func. : none */
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
||||||
void *mad_fregex (ptgex, mode)
|
void mad_fregex (ptgex, mode)
|
||||||
|
|
||||||
struct begex *ptgex;
|
struct begex *ptgex;
|
||||||
char mode ;
|
char mode ;
|
||||||
|
|
||||||
{
|
{
|
||||||
struct begex *tmpgex;
|
|
||||||
struct chain *tmpchn;
|
struct chain *tmpchn;
|
||||||
|
|
||||||
if (ptgex != NULL)
|
if (ptgex != NULL)
|
||||||
|
@ -348,7 +347,6 @@ struct begex *gexpnt;
|
||||||
case NOR :
|
case NOR :
|
||||||
case NXOR :
|
case NXOR :
|
||||||
freflag = 1; break;
|
freflag = 1; break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,13 +362,10 @@ struct begex *gexpnt;
|
||||||
case NAND :
|
case NAND :
|
||||||
case AND :
|
case AND :
|
||||||
freflag = 1; break;
|
freflag = 1; break;
|
||||||
break;
|
|
||||||
case XOR :
|
case XOR :
|
||||||
gexpnt->TERM = NXOR; freflag = 1; break;
|
gexpnt->TERM = NXOR; freflag = 1; break;
|
||||||
break;
|
|
||||||
case NXOR :
|
case NXOR :
|
||||||
gexpnt->TERM = XOR ; freflag = 1; break;
|
gexpnt->TERM = XOR ; freflag = 1; break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,12 +453,10 @@ struct befig *ptr_befig;
|
||||||
struct chain *expr;
|
struct chain *expr;
|
||||||
|
|
||||||
{
|
{
|
||||||
struct chain *my_operand;
|
|
||||||
|
|
||||||
char delayed [128];
|
char delayed [128];
|
||||||
static char *str_zero = NULL;
|
static char *str_zero = NULL;
|
||||||
static char *str_one = NULL;
|
static char *str_one = NULL;
|
||||||
struct begex *resgex ;
|
struct begex *resgex = NULL;
|
||||||
struct begex *gex_elt ;
|
struct begex *gex_elt ;
|
||||||
struct chain *oper_list ;
|
struct chain *oper_list ;
|
||||||
struct chain *operand ;
|
struct chain *operand ;
|
||||||
|
|
|
@ -45,14 +45,12 @@ void beh_makquad ( struct befig *pt_befig )
|
||||||
|
|
||||||
{
|
{
|
||||||
struct beaux *pt_beaux;
|
struct beaux *pt_beaux;
|
||||||
struct berin *pt_berin;
|
|
||||||
struct beout *pt_beout;
|
struct beout *pt_beout;
|
||||||
struct bebus *pt_bebus;
|
struct bebus *pt_bebus;
|
||||||
struct bebux *pt_bebux;
|
struct bebux *pt_bebux;
|
||||||
struct bereg *pt_bereg;
|
struct bereg *pt_bereg;
|
||||||
struct bemsg *pt_bemsg;
|
struct bemsg *pt_bemsg;
|
||||||
struct binode *pt_binod;
|
struct binode *pt_binod;
|
||||||
struct biabl *pt_biabl;
|
|
||||||
|
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
/* simple output ports */
|
/* simple output ports */
|
||||||
|
|
|
@ -58,7 +58,6 @@ struct chain *expr ; /* pointer abl expression */
|
||||||
int index ;
|
int index ;
|
||||||
char *atom ;
|
char *atom ;
|
||||||
static char buffer [128] ;
|
static char buffer [128] ;
|
||||||
short oper ;
|
|
||||||
struct chain *cst_AddSetElement ();
|
struct chain *cst_AddSetElement ();
|
||||||
struct chain *cst_CreateUnionSet ();
|
struct chain *cst_CreateUnionSet ();
|
||||||
|
|
||||||
|
@ -92,7 +91,7 @@ struct chain *expr ; /* pointer abl expression */
|
||||||
/* if the expression is not a terminal (is a complex expr.) */
|
/* if the expression is not a terminal (is a complex expr.) */
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
|
|
||||||
if ((oper = OPER(expr)) != STABLE)
|
if (OPER(expr) != STABLE)
|
||||||
{
|
{
|
||||||
while ((expr = CDR(expr)) != NULL)
|
while ((expr = CDR(expr)) != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,6 +55,7 @@ extern int beh_chkbefig ();
|
||||||
extern void beh_debug ();
|
extern void beh_debug ();
|
||||||
extern void beh_makbdd ();
|
extern void beh_makbdd ();
|
||||||
extern void beh_makgex ();
|
extern void beh_makgex ();
|
||||||
|
extern void beh_makquad ();
|
||||||
extern void beh_makderiv ();
|
extern void beh_makderiv ();
|
||||||
extern void beh_makvarlist ();
|
extern void beh_makvarlist ();
|
||||||
extern void beh_freabl ();
|
extern void beh_freabl ();
|
||||||
|
|
|
@ -183,7 +183,6 @@ loc_addnamelist( lax_name_list *head, char *name )
|
||||||
int
|
int
|
||||||
loc_getdouble( FILE *Pfile, int c, double *PValue )
|
loc_getdouble( FILE *Pfile, int c, double *PValue )
|
||||||
{
|
{
|
||||||
double Value = 0.0;
|
|
||||||
char Buffer[ 32 ];
|
char Buffer[ 32 ];
|
||||||
int Index = 0;
|
int Index = 0;
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ static dual_list* add_dual(dual_list* top, cell_list* cell)
|
||||||
if (dual->OPER!=ABL_OPER(cell->ABL)
|
if (dual->OPER!=ABL_OPER(cell->ABL)
|
||||||
&& (!dual->CELL || ABL_OPER(cell->ABL)!=ABL_OPER(dual->CELL->ABL))){
|
&& (!dual->CELL || ABL_OPER(cell->ABL)!=ABL_OPER(dual->CELL->ABL))){
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"add_dual: computing error on cell with oper %s and %s (arity %d)\n",
|
"add_dual: computing error on cell with oper %s and %s (arity %ld)\n",
|
||||||
getabloperuppername(ABL_OPER(cell->ABL)),
|
getabloperuppername(ABL_OPER(cell->ABL)),
|
||||||
getabloperuppername(dual->OPER),ABL_ARITY(cell->ABL));
|
getabloperuppername(dual->OPER),ABL_ARITY(cell->ABL));
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -543,7 +543,7 @@ extern void control_lib()
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if xor doesn't exist, build*/
|
/*if xor doesn't exist, build*/
|
||||||
if (!xor) {
|
if (xor == NULL) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Mapping Warning: 'xor' is missing in cell library...Generating\n");
|
"Mapping Warning: 'xor' is missing in cell library...Generating\n");
|
||||||
cell=complete_xor_lib();
|
cell=complete_xor_lib();
|
||||||
|
|
|
@ -55,7 +55,7 @@ extern chain_list* inv_oper(chain_list* abl, int negativ)
|
||||||
else {
|
else {
|
||||||
if (negativ) {
|
if (negativ) {
|
||||||
abl=createablnotexpr(abl);
|
abl=createablnotexpr(abl);
|
||||||
ABL_ARITY_L(abl)=1;
|
ABL_ARITY_L(abl)=(chain_list*)1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return abl;
|
return abl;
|
||||||
|
@ -63,30 +63,30 @@ extern chain_list* inv_oper(chain_list* abl, int negativ)
|
||||||
|
|
||||||
switch (ABL_OPER(abl)) {
|
switch (ABL_OPER(abl)) {
|
||||||
case ABL_AND:
|
case ABL_AND:
|
||||||
if (negativ) ABL_OPER_L(abl)=ABL_NAND;
|
if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_NAND;
|
||||||
else ABL_OPER_L(abl)=ABL_NOR;
|
else ABL_OPER_L(abl)=(chain_list*)ABL_NOR;
|
||||||
negativ=!negativ;
|
negativ=!negativ;
|
||||||
break;
|
break;
|
||||||
case ABL_NAND:
|
case ABL_NAND:
|
||||||
if (negativ) ABL_OPER_L(abl)=ABL_NOR;
|
if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_NOR;
|
||||||
else ABL_OPER_L(abl)=ABL_NAND;
|
else ABL_OPER_L(abl)=(chain_list*)ABL_NAND;
|
||||||
break;
|
break;
|
||||||
case ABL_OR:
|
case ABL_OR:
|
||||||
if (negativ) ABL_OPER_L(abl)=ABL_NOR;
|
if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_NOR;
|
||||||
else ABL_OPER_L(abl)=ABL_NAND;
|
else ABL_OPER_L(abl)=(chain_list*)ABL_NAND;
|
||||||
negativ=!negativ;
|
negativ=!negativ;
|
||||||
break;
|
break;
|
||||||
case ABL_NOR:
|
case ABL_NOR:
|
||||||
if (negativ) ABL_OPER_L(abl)=ABL_NAND;
|
if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_NAND;
|
||||||
else ABL_OPER_L(abl)=ABL_NOR;
|
else ABL_OPER_L(abl)=(chain_list*)ABL_NOR;
|
||||||
break;
|
break;
|
||||||
case ABL_XOR:
|
case ABL_XOR:
|
||||||
if (negativ) ABL_OPER_L(abl)=ABL_NXOR;
|
if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_NXOR;
|
||||||
negativ=0;
|
negativ=0;
|
||||||
/*nothing to do: same size XOR and NXOR*/
|
/*nothing to do: same size XOR and NXOR*/
|
||||||
break;
|
break;
|
||||||
case ABL_NXOR:
|
case ABL_NXOR:
|
||||||
if (negativ) ABL_OPER_L(abl)=ABL_XOR;
|
if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_XOR;
|
||||||
negativ=0;
|
negativ=0;
|
||||||
/*nothing to do*/
|
/*nothing to do*/
|
||||||
break;
|
break;
|
||||||
|
@ -98,7 +98,7 @@ extern chain_list* inv_oper(chain_list* abl, int negativ)
|
||||||
case ABL_STABLE:
|
case ABL_STABLE:
|
||||||
if (negativ) {
|
if (negativ) {
|
||||||
abl=createablnotexpr(abl);
|
abl=createablnotexpr(abl);
|
||||||
ABL_ARITY_L(abl)=1;
|
ABL_ARITY_L(abl)=(chain_list*)1;
|
||||||
}
|
}
|
||||||
return abl;
|
return abl;
|
||||||
default:
|
default:
|
||||||
|
@ -187,22 +187,22 @@ extern chain_list* build_negativ(chain_list* abl)
|
||||||
ABL_CAR_L(leaf)=getablatomzero();
|
ABL_CAR_L(leaf)=getablatomzero();
|
||||||
else {
|
else {
|
||||||
ABL_CAR_L(chain)=createablnotexpr(ABL_CAR(chain));
|
ABL_CAR_L(chain)=createablnotexpr(ABL_CAR(chain));
|
||||||
ABL_ARITY_L(ABL_CAR(chain))=1;
|
ABL_ARITY_L(ABL_CAR(chain))=(chain_list*)1;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (ABL_OPER(leaf)==ABL_STABLE) {
|
else if (ABL_OPER(leaf)==ABL_STABLE) {
|
||||||
ABL_CAR_L(chain)=createablnotexpr(ABL_CAR(chain));
|
ABL_CAR_L(chain)=createablnotexpr(ABL_CAR(chain));
|
||||||
ABL_ARITY_L(ABL_CAR(chain))=1;
|
ABL_ARITY_L(ABL_CAR(chain))=(chain_list*)1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
switch (ABL_OPER(leaf)) {
|
switch (ABL_OPER(leaf)) {
|
||||||
case ABL_AND: ABL_OPER_L(leaf)=ABL_NAND; break;
|
case ABL_AND: ABL_OPER_L(leaf)=(chain_list*)ABL_NAND; break;
|
||||||
case ABL_OR: ABL_OPER_L(leaf)=ABL_NOR; break;
|
case ABL_OR: ABL_OPER_L(leaf)=(chain_list*)ABL_NOR; break;
|
||||||
case ABL_NAND: ABL_OPER_L(leaf)=ABL_AND; break;
|
case ABL_NAND: ABL_OPER_L(leaf)=(chain_list*)ABL_AND; break;
|
||||||
case ABL_NOR: ABL_OPER_L(leaf)=ABL_OR; break;
|
case ABL_NOR: ABL_OPER_L(leaf)=(chain_list*)ABL_OR; break;
|
||||||
case ABL_XOR: ABL_OPER_L(leaf)=ABL_NXOR; break;
|
case ABL_XOR: ABL_OPER_L(leaf)=(chain_list*)ABL_NXOR; break;
|
||||||
case ABL_NXOR: ABL_OPER_L(leaf)=ABL_XOR; break;
|
case ABL_NXOR: ABL_OPER_L(leaf)=(chain_list*)ABL_XOR; break;
|
||||||
case ABL_NOT:
|
case ABL_NOT:
|
||||||
ABL_CAR_L(chain)=ABL_CADR(leaf);
|
ABL_CAR_L(chain)=ABL_CADR(leaf);
|
||||||
freechain(leaf);
|
freechain(leaf);
|
||||||
|
@ -214,10 +214,10 @@ extern chain_list* build_negativ(chain_list* abl)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (ABL_OPER(abl)) {
|
switch (ABL_OPER(abl)) {
|
||||||
case ABL_AND: ABL_OPER_L(abl)=ABL_NOR; break;
|
case ABL_AND: ABL_OPER_L(abl)=(chain_list*)ABL_NOR; break;
|
||||||
case ABL_OR: ABL_OPER_L(abl)=ABL_NAND; break;
|
case ABL_OR: ABL_OPER_L(abl)=(chain_list*)ABL_NAND; break;
|
||||||
case ABL_NAND: ABL_OPER_L(abl)=ABL_OR; break;
|
case ABL_NAND: ABL_OPER_L(abl)=(chain_list*)ABL_OR; break;
|
||||||
case ABL_NOR: ABL_OPER_L(abl)=ABL_AND; break;
|
case ABL_NOR: ABL_OPER_L(abl)=(chain_list*)ABL_AND; break;
|
||||||
case ABL_NOT:
|
case ABL_NOT:
|
||||||
chain=abl;
|
chain=abl;
|
||||||
abl=ABL_CADR(abl);
|
abl=ABL_CADR(abl);
|
||||||
|
|
|
@ -248,7 +248,7 @@ static chain_list *permutations_abl(chain_list* abl)
|
||||||
/*put the operator*/
|
/*put the operator*/
|
||||||
for (chain=list_abl; chain; chain=chain->NEXT) {
|
for (chain=list_abl; chain; chain=chain->NEXT) {
|
||||||
head=createabloper(ABL_OPER(abl));
|
head=createabloper(ABL_OPER(abl));
|
||||||
ABL_ARITY_L(head)=ABL_ARITY(abl);
|
ABL_ARITY_L(head)=(chain_list*)ABL_ARITY(abl);
|
||||||
ABL_CDR(head)=dupablchain(chain->DATA);
|
ABL_CDR(head)=dupablchain(chain->DATA);
|
||||||
chain->DATA=head;
|
chain->DATA=head;
|
||||||
}
|
}
|
||||||
|
@ -266,6 +266,7 @@ static chain_list *permutations_abl(chain_list* abl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if THIS_IS_DISABLED
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* return 1 if abl1 and abl2 heave the same properties */
|
/* return 1 if abl1 and abl2 heave the same properties */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -302,6 +303,7 @@ static int same_properties(chain_list* abl1, chain_list* abl2, befig_list* befig
|
||||||
|
|
||||||
return 0; /*equality*/
|
return 0; /*equality*/
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -64,7 +64,7 @@ extern chain_list *getfiles_with_ext (char *path, char *ext)
|
||||||
struct dirent *entry;
|
struct dirent *entry;
|
||||||
char *filename;
|
char *filename;
|
||||||
char *completefilename;
|
char *completefilename;
|
||||||
int filenamelength, extensionlength, pathlength;
|
int filenamelength, extensionlength;
|
||||||
chain_list *head;
|
chain_list *head;
|
||||||
|
|
||||||
if (!path || !ext) return NULL;
|
if (!path || !ext) return NULL;
|
||||||
|
@ -73,7 +73,6 @@ extern chain_list *getfiles_with_ext (char *path, char *ext)
|
||||||
if (!dir) return NULL;
|
if (!dir) return NULL;
|
||||||
|
|
||||||
extensionlength = strlen (ext);
|
extensionlength = strlen (ext);
|
||||||
pathlength = strlen (path);
|
|
||||||
head=NULL;
|
head=NULL;
|
||||||
|
|
||||||
while ((entry = readdir (dir)) != NULL) {
|
while ((entry = readdir (dir)) != NULL) {
|
||||||
|
|
|
@ -85,7 +85,7 @@ extern void invert_port(port_list* port)
|
||||||
{
|
{
|
||||||
/*add a not*/
|
/*add a not*/
|
||||||
not=createabloper(ABL_NOT);
|
not=createabloper(ABL_NOT);
|
||||||
ABL_ARITY_L(not)=1;
|
ABL_ARITY_L(not)=(chain_list*)1;
|
||||||
/*swap pointers references*/
|
/*swap pointers references*/
|
||||||
swap_pointers(port->ABL,not);
|
swap_pointers(port->ABL,not);
|
||||||
ABL_CDR(port->ABL)=addchain(NULL,not);
|
ABL_CDR(port->ABL)=addchain(NULL,not);
|
||||||
|
@ -94,12 +94,12 @@ extern void invert_port(port_list* port)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (ABL_OPER(port->ABL)) {
|
switch (ABL_OPER(port->ABL)) {
|
||||||
case ABL_AND: ABL_OPER_L(port->ABL)=ABL_NAND; break;
|
case ABL_AND: ABL_OPER_L(port->ABL)=(chain_list*)ABL_NAND; break;
|
||||||
case ABL_NAND: ABL_OPER_L(port->ABL)=ABL_AND; break;
|
case ABL_NAND: ABL_OPER_L(port->ABL)=(chain_list*)ABL_AND; break;
|
||||||
case ABL_OR: ABL_OPER_L(port->ABL)=ABL_NOR; break;
|
case ABL_OR: ABL_OPER_L(port->ABL)=(chain_list*)ABL_NOR; break;
|
||||||
case ABL_NOR: ABL_OPER_L(port->ABL)=ABL_OR; break;
|
case ABL_NOR: ABL_OPER_L(port->ABL)=(chain_list*)ABL_OR; break;
|
||||||
case ABL_XOR: ABL_OPER_L(port->ABL)=ABL_NXOR; break;
|
case ABL_XOR: ABL_OPER_L(port->ABL)=(chain_list*)ABL_NXOR; break;
|
||||||
case ABL_NXOR: ABL_OPER_L(port->ABL)=ABL_XOR; break;
|
case ABL_NXOR: ABL_OPER_L(port->ABL)=(chain_list*)ABL_XOR; break;
|
||||||
case ABL_NOT: /*no need to insert*/
|
case ABL_NOT: /*no need to insert*/
|
||||||
port->ABL=ABL_CADR_L(port->ABL); continue;
|
port->ABL=ABL_CADR_L(port->ABL); continue;
|
||||||
default:
|
default:
|
||||||
|
@ -112,7 +112,7 @@ extern void invert_port(port_list* port)
|
||||||
|
|
||||||
/*insert a NOT to match perfectly with cell*/
|
/*insert a NOT to match perfectly with cell*/
|
||||||
not=createabloper(ABL_NOT);
|
not=createabloper(ABL_NOT);
|
||||||
ABL_ARITY_L(not)=1;
|
ABL_ARITY_L(not)=(chain_list*)1;
|
||||||
/*swap pointers references*/
|
/*swap pointers references*/
|
||||||
swap_pointers(port->ABL,not);
|
swap_pointers(port->ABL,not);
|
||||||
ABL_CDR(port->ABL)=addchain(NULL,not);
|
ABL_CDR(port->ABL)=addchain(NULL,not);
|
||||||
|
@ -160,17 +160,17 @@ static chain_list* loc_adapt_abl(chain_list* expr, float C)
|
||||||
/*evaluate with the biggest oper*/
|
/*evaluate with the biggest oper*/
|
||||||
int arity=ABL_ARITY(expr); /*memorize arity*/
|
int arity=ABL_ARITY(expr); /*memorize arity*/
|
||||||
/*search the biggest arity which matches expr*/
|
/*search the biggest arity which matches expr*/
|
||||||
for (ABL_ARITY_L(expr)=ABL_ARITY(expr)-1 ; ABL_ARITY(expr)>0;
|
for (ABL_ARITY_L(expr)=(chain_list*)(ABL_ARITY(expr)-1) ; ABL_ARITY(expr)>0;
|
||||||
ABL_ARITY_L(expr)=ABL_ARITY(expr)-1) {
|
ABL_ARITY_L(expr)=(chain_list*)(ABL_ARITY(expr)-1) ) {
|
||||||
cell=cell_prepare(expr);
|
cell=cell_prepare(expr);
|
||||||
if (cell) break;
|
if (cell) break;
|
||||||
}
|
}
|
||||||
ABL_ARITY_L(expr)=arity; /*put back arity*/
|
ABL_ARITY_L(expr)=(chain_list*)arity; /*put back arity*/
|
||||||
if (!cell) {
|
if (!cell) {
|
||||||
fprintf(stderr,"Library Error: No cell could match '");
|
fprintf(stderr,"Library Error: No cell could match '");
|
||||||
display_abl(expr);
|
display_abl(expr);
|
||||||
if (ABL_ATOM(expr)) fprintf(stderr,"'\n");
|
if (ABL_ATOM(expr)) fprintf(stderr,"'\n");
|
||||||
else fprintf(stderr,"' (oper arity=%d)\n",ABL_ARITY(expr));
|
else fprintf(stderr,"' (oper arity=%ld)\n",ABL_ARITY(expr));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,16 +241,16 @@ extern chain_list* adapt_abl(chain_list* expr)
|
||||||
/*evaluate with the biggest oper*/
|
/*evaluate with the biggest oper*/
|
||||||
arity=ABL_ARITY(expr); /*memorize arity*/
|
arity=ABL_ARITY(expr); /*memorize arity*/
|
||||||
/*search the biggest arity which matches expr*/
|
/*search the biggest arity which matches expr*/
|
||||||
for (ABL_ARITY_L(expr)=ABL_ARITY(expr)-1 ; ABL_ARITY(expr)>0;
|
for (ABL_ARITY_L(expr)=(chain_list*)(ABL_ARITY(expr)-1) ; ABL_ARITY(expr)>0;
|
||||||
ABL_ARITY_L(expr)=ABL_ARITY(expr)-1) {
|
ABL_ARITY_L(expr)=(chain_list*)(ABL_ARITY(expr)-1) ) {
|
||||||
cell=cell_prepare(expr);
|
cell=cell_prepare(expr);
|
||||||
if (cell) break;
|
if (cell) break;
|
||||||
}
|
}
|
||||||
ABL_ARITY_L(expr)=arity; /*put back arity*/
|
ABL_ARITY_L(expr)=(chain_list*)arity; /*put back arity*/
|
||||||
if (!cell) {
|
if (!cell) {
|
||||||
fprintf(stderr,"Library Error: No cell could match '");
|
fprintf(stderr,"Library Error: No cell could match '");
|
||||||
display_abl(expr);
|
display_abl(expr);
|
||||||
fprintf(stderr,"' (oper arity=%d)\n",ABL_ARITY(expr));
|
fprintf(stderr,"' (oper arity=%ld)\n",ABL_ARITY(expr));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ extern biabl_list* adapt_bus(biabl_list* biabl)
|
||||||
biabl->VALABL=build_negativ(biabl->VALABL);
|
biabl->VALABL=build_negativ(biabl->VALABL);
|
||||||
biabl->VALABL=createablnotexpr(biabl->VALABL);
|
biabl->VALABL=createablnotexpr(biabl->VALABL);
|
||||||
/* createablnotexpr() can simplify*/
|
/* createablnotexpr() can simplify*/
|
||||||
if (!ABL_ATOM(biabl->VALABL)) ABL_ARITY_L(biabl->VALABL)=1;
|
if (!ABL_ATOM(biabl->VALABL)) ABL_ARITY_L(biabl->VALABL)=(chain_list*)1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cell=cell_prepare_bus(biabl);
|
cell=cell_prepare_bus(biabl);
|
||||||
|
|
|
@ -406,7 +406,7 @@ extern cell_list* cell_pattern(chain_list* expr)
|
||||||
/*create a temporary NOT to match perfectly with cell*/
|
/*create a temporary NOT to match perfectly with cell*/
|
||||||
not=createabloper(ABL_NOT);
|
not=createabloper(ABL_NOT);
|
||||||
ABL_CDR(not)=addchain(NULL,NULL);
|
ABL_CDR(not)=addchain(NULL,NULL);
|
||||||
ABL_ARITY_L(not)=1;
|
ABL_ARITY_L(not)=(chain_list*)1;
|
||||||
|
|
||||||
/*take those are biggest*/
|
/*take those are biggest*/
|
||||||
for (cell=getcell_logic_lib(); cell; cell=cell->NEXT) {
|
for (cell=getcell_logic_lib(); cell; cell=cell->NEXT) {
|
||||||
|
@ -525,7 +525,7 @@ extern cell_list* cell_pattern(chain_list* expr)
|
||||||
fprintf(stderr,"Library Error: No cell could match '");
|
fprintf(stderr,"Library Error: No cell could match '");
|
||||||
display_abl(expr);
|
display_abl(expr);
|
||||||
if (ABL_ATOM(expr)) fprintf(stderr,"'\n");
|
if (ABL_ATOM(expr)) fprintf(stderr,"'\n");
|
||||||
else fprintf(stderr,"' (oper arity=%d)\n",ABL_ARITY(expr));
|
else fprintf(stderr,"' (oper arity=%ld)\n",ABL_ARITY(expr));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -566,7 +566,7 @@ extern cell_list* cell_pattern_bus(biabl_list* biabl)
|
||||||
/*create a temporary NOT to match perfectly with cell*/
|
/*create a temporary NOT to match perfectly with cell*/
|
||||||
not=createabloper(ABL_NOT);
|
not=createabloper(ABL_NOT);
|
||||||
ABL_CDR(not)=addchain(NULL,NULL);
|
ABL_CDR(not)=addchain(NULL,NULL);
|
||||||
ABL_ARITY_L(not)=1;
|
ABL_ARITY_L(not)=(chain_list*)1;
|
||||||
|
|
||||||
for (cell=getcell_tristate_lib(); cell; cell=cell->NEXT) {
|
for (cell=getcell_tristate_lib(); cell; cell=cell->NEXT) {
|
||||||
/*prepare for use*/
|
/*prepare for use*/
|
||||||
|
@ -713,7 +713,7 @@ extern cell_list* cell_pattern_reg(biabl_list* biabl)
|
||||||
/*create a temporary NOT to match perfectly with cell*/
|
/*create a temporary NOT to match perfectly with cell*/
|
||||||
not=createabloper(ABL_NOT);
|
not=createabloper(ABL_NOT);
|
||||||
ABL_CDR(not)=addchain(NULL,NULL);
|
ABL_CDR(not)=addchain(NULL,NULL);
|
||||||
ABL_ARITY_L(not)=1;
|
ABL_ARITY_L(not)=(chain_list*)1;
|
||||||
|
|
||||||
cell=getcell_register_lib();
|
cell=getcell_register_lib();
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ extern void put_arity_abl (chain_list* abl)
|
||||||
put_arity_abl((chain_list*)ABL_CAR(pattern));
|
put_arity_abl((chain_list*)ABL_CAR(pattern));
|
||||||
}
|
}
|
||||||
|
|
||||||
ABL_ARITY_L(abl)=arity;
|
ABL_ARITY_L(abl)=(chain_list*)arity;
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,8 @@
|
||||||
#include "bog_normalize_DAG.h"
|
#include "bog_normalize_DAG.h"
|
||||||
|
|
||||||
|
|
||||||
#define USING(node) {node=-mark;}
|
#define USING(node) {node=(void*)(((long)node)-mark);}
|
||||||
#define USED(node) {node=(long)((((long)node<0)?0L:(long)node)+1L);}
|
#define USED(node) {node=(void*)((((long)node<0)?0L:(long)node)+1L);}
|
||||||
#define IS_USING(node) ((long)node==-mark)
|
#define IS_USING(node) ((long)node==-mark)
|
||||||
#define IS_USED(node) ((long)node!=0)
|
#define IS_USED(node) ((long)node!=0)
|
||||||
#define IS_UNUSED(node) ((long)node==0)
|
#define IS_UNUSED(node) ((long)node==0)
|
||||||
|
|
|
@ -57,13 +57,13 @@ static chain_list* unflatnegexpr(chain_list* abl)
|
||||||
|
|
||||||
switch(ABL_OPER(abl)) {
|
switch(ABL_OPER(abl)) {
|
||||||
case ABL_NAND:
|
case ABL_NAND:
|
||||||
ABL_OPER_L(abl)=ABL_AND;
|
ABL_OPER_L(abl)=(chain_list*)ABL_AND;
|
||||||
return createablnotexpr(abl);
|
return createablnotexpr(abl);
|
||||||
case ABL_NOR:
|
case ABL_NOR:
|
||||||
ABL_OPER_L(abl)=ABL_OR;
|
ABL_OPER_L(abl)=(chain_list*)ABL_OR;
|
||||||
return createablnotexpr(abl);
|
return createablnotexpr(abl);
|
||||||
case ABL_NXOR:
|
case ABL_NXOR:
|
||||||
ABL_OPER_L(abl)=ABL_XOR;
|
ABL_OPER_L(abl)=(chain_list*)ABL_XOR;
|
||||||
return createablnotexpr(abl);
|
return createablnotexpr(abl);
|
||||||
default: return abl;
|
default: return abl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,7 +192,7 @@ extern ptype_list* max_delay_path(befig_list* befig, lofig_list* lofig)
|
||||||
{
|
{
|
||||||
ptype_list* head, *path;
|
ptype_list* head, *path;
|
||||||
loins_list* loins;
|
loins_list* loins;
|
||||||
char *insname;
|
char *insname = NULL;
|
||||||
|
|
||||||
if (!befig) {
|
if (!befig) {
|
||||||
fprintf(stderr,"max_delay_path: NULL pointer\n");
|
fprintf(stderr,"max_delay_path: NULL pointer\n");
|
||||||
|
|
|
@ -58,6 +58,7 @@ static void search_name(char* name);
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* change all leaf expressions from 'mbk_not_a' to 'NOT (a)' */
|
/* change all leaf expressions from 'mbk_not_a' to 'NOT (a)' */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
#if THIS_IS_DISABLED
|
||||||
static chain_list* change_atom(chain_list* abl,int invert)
|
static chain_list* change_atom(chain_list* abl,int invert)
|
||||||
{
|
{
|
||||||
chain_list* chain;
|
chain_list* chain;
|
||||||
|
@ -79,6 +80,7 @@ static chain_list* change_atom(chain_list* abl,int invert)
|
||||||
|
|
||||||
return abl;
|
return abl;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
|
@ -183,7 +183,7 @@ extern void save_xsch(FILE* xsch_stream, lofig_list* lofig, ptype_list* long_pat
|
||||||
ptype_list* ptype, *ptype2=NULL;
|
ptype_list* ptype, *ptype2=NULL;
|
||||||
float delay=0, delay_out=0;
|
float delay=0, delay_out=0;
|
||||||
char mes[1024];
|
char mes[1024];
|
||||||
char* signame;
|
char* signame = NULL;
|
||||||
locon_list* locon;
|
locon_list* locon;
|
||||||
losig_list* losig;
|
losig_list* losig;
|
||||||
float gradient=1;
|
float gradient=1;
|
||||||
|
|
|
@ -101,6 +101,7 @@
|
||||||
| |
|
| |
|
||||||
\------------------------------------------------------------*/
|
\------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#if THIS_IS_DISABLED
|
||||||
static long BoomGetAblDepth( Expr )
|
static long BoomGetAblDepth( Expr )
|
||||||
|
|
||||||
ablexpr *Expr;
|
ablexpr *Expr;
|
||||||
|
@ -141,6 +142,7 @@ static long BoomGetAblDepth( Expr )
|
||||||
|
|
||||||
return( MaxDepth + NumberOper );
|
return( MaxDepth + NumberOper );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*------------------------------------------------------------\
|
/*------------------------------------------------------------\
|
||||||
| |
|
| |
|
||||||
|
@ -533,7 +535,7 @@ void BoomBehCreateAux( BehFigure )
|
||||||
|
|
||||||
befig_list *BehFigure;
|
befig_list *BehFigure;
|
||||||
{
|
{
|
||||||
beaux_list *InitialAux;
|
/*beaux_list *InitialAux;*/
|
||||||
bddcircuit *BddCircuit;
|
bddcircuit *BddCircuit;
|
||||||
bddsystem *BddSystem;
|
bddsystem *BddSystem;
|
||||||
long Reverse;
|
long Reverse;
|
||||||
|
@ -551,7 +553,7 @@ fprintf( stdout, "Before BoomBehMakeBddNode\n" );
|
||||||
testbddcircuit( (bddcircuit *)0 );
|
testbddcircuit( (bddcircuit *)0 );
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
InitialAux = BehFigure->BEAUX;
|
/*InitialAux = BehFigure->BEAUX;*/
|
||||||
BoomAuxNumber = 0;
|
BoomAuxNumber = 0;
|
||||||
|
|
||||||
if ( BoomAuxHashTable == (authtable *)0 )
|
if ( BoomAuxHashTable == (authtable *)0 )
|
||||||
|
|
|
@ -540,7 +540,7 @@ static long BoomBddSetExprKeepAux( Expr )
|
||||||
|
|
||||||
addauthelem( BoomBddHashKeepAux, BehAux->NAME, 0 );
|
addauthelem( BoomBddHashKeepAux, BehAux->NAME, 0 );
|
||||||
SetBoomBehAuxKeep( BehAux );
|
SetBoomBehAuxKeep( BehAux );
|
||||||
BddNode = addbddcircuitin( (bddcircuit *)0, BehAux->NAME, 0, BDD_IN_MODE_LAST );
|
/*BddNode =*/ addbddcircuitin( (bddcircuit *)0, BehAux->NAME, 0, BDD_IN_MODE_LAST );
|
||||||
|
|
||||||
Number++;
|
Number++;
|
||||||
}
|
}
|
||||||
|
@ -677,7 +677,7 @@ void BoomBehMakeBddNodeNoExplosion( BehFigure )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BddNode = addbddcircuitin( (bddcircuit *)0, BehAux->NAME, 0, BDD_IN_MODE_LAST );
|
/*BddNode =*/ addbddcircuitin( (bddcircuit *)0, BehAux->NAME, 0, BDD_IN_MODE_LAST );
|
||||||
|
|
||||||
if ( IsBoomBehAuxKeep( BehAux ) )
|
if ( IsBoomBehAuxKeep( BehAux ) )
|
||||||
{
|
{
|
||||||
|
@ -1780,7 +1780,7 @@ void BoomBehRandomBddOrder( BehFigure, Amplitude )
|
||||||
befig_list *BehFigure;
|
befig_list *BehFigure;
|
||||||
long Amplitude;
|
long Amplitude;
|
||||||
{
|
{
|
||||||
boombefiginfo *FigInfo;
|
/*boombefiginfo *FigInfo;*/
|
||||||
long NumberVar;
|
long NumberVar;
|
||||||
long MaxNode;
|
long MaxNode;
|
||||||
long BddVar;
|
long BddVar;
|
||||||
|
@ -1790,7 +1790,7 @@ void BoomBehRandomBddOrder( BehFigure, Amplitude )
|
||||||
|
|
||||||
static unsigned char InitRandom = 1;
|
static unsigned char InitRandom = 1;
|
||||||
|
|
||||||
FigInfo = GetBoomBehFigInfo( BehFigure );
|
/*FigInfo = GetBoomBehFigInfo( BehFigure );*/
|
||||||
|
|
||||||
if ( InitRandom )
|
if ( InitRandom )
|
||||||
{
|
{
|
||||||
|
|
|
@ -168,7 +168,7 @@ chain_list *BoomBehBurgunBddOrder( BehFigure )
|
||||||
|
|
||||||
befig_list *BehFigure;
|
befig_list *BehFigure;
|
||||||
{
|
{
|
||||||
boombefiginfo *FigInfo;
|
/*boombefiginfo *FigInfo;*/
|
||||||
chain_list *OrderList;
|
chain_list *OrderList;
|
||||||
long NumberIndex;
|
long NumberIndex;
|
||||||
long NumberVar;
|
long NumberVar;
|
||||||
|
@ -182,7 +182,7 @@ chain_list *BoomBehBurgunBddOrder( BehFigure )
|
||||||
char *Name;
|
char *Name;
|
||||||
char Buffer[ 32 ];
|
char Buffer[ 32 ];
|
||||||
|
|
||||||
FigInfo = GetBoomBehFigInfo( BehFigure );
|
/*FigInfo = GetBoomBehFigInfo( BehFigure );*/
|
||||||
|
|
||||||
NumberIndex = BddLocalSystem->NUMBER_INDEX;
|
NumberIndex = BddLocalSystem->NUMBER_INDEX;
|
||||||
NumberVar = BddLocalSystem->NUMBER_VAR;
|
NumberVar = BddLocalSystem->NUMBER_VAR;
|
||||||
|
|
|
@ -166,7 +166,7 @@ chain_list *BoomBehGradientBddOrder( BehFigure )
|
||||||
|
|
||||||
befig_list *BehFigure;
|
befig_list *BehFigure;
|
||||||
{
|
{
|
||||||
boombefiginfo *FigInfo;
|
/*boombefiginfo *FigInfo;*/
|
||||||
chain_list *OrderList;
|
chain_list *OrderList;
|
||||||
long NumberVar;
|
long NumberVar;
|
||||||
long VarIndex;
|
long VarIndex;
|
||||||
|
@ -175,7 +175,7 @@ chain_list *BoomBehGradientBddOrder( BehFigure )
|
||||||
long MaxNode;
|
long MaxNode;
|
||||||
char *Name;
|
char *Name;
|
||||||
|
|
||||||
FigInfo = GetBoomBehFigInfo( BehFigure );
|
/*FigInfo = GetBoomBehFigInfo( BehFigure );*/
|
||||||
|
|
||||||
VarIndex = getbddvarindex( BddLocalSystem, 0 );
|
VarIndex = getbddvarindex( BddLocalSystem, 0 );
|
||||||
BoomBddTopVarNode = addbddcircuitin( BddLocalCircuit, "_top_", VarIndex,
|
BoomBddTopVarNode = addbddcircuitin( BddLocalCircuit, "_top_", VarIndex,
|
||||||
|
|
|
@ -150,7 +150,7 @@ int BoomLogicReorderWindow2( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
//BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( NewCost < *PCost )
|
if ( NewCost < *PCost )
|
||||||
|
@ -197,7 +197,7 @@ int BoomLogicReorderWindow3( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
//BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
|
@ -218,7 +218,7 @@ int BoomLogicReorderWindow3( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
//BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
|
@ -239,7 +239,7 @@ int BoomLogicReorderWindow3( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
//BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
|
@ -260,7 +260,7 @@ int BoomLogicReorderWindow3( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
//BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
|
@ -281,7 +281,7 @@ int BoomLogicReorderWindow3( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
//BehAux = BoomLogicComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
|
@ -340,15 +340,11 @@ void BoomLogicOptimizeWindow( BehFigure )
|
||||||
beaux_list *BehAux;
|
beaux_list *BehAux;
|
||||||
short *ReorderLevel;
|
short *ReorderLevel;
|
||||||
bddvar NumberChild;
|
bddvar NumberChild;
|
||||||
bddvar BestChild;
|
|
||||||
bddvar ChildCount;
|
bddvar ChildCount;
|
||||||
bddvar ChildTo;
|
|
||||||
bddvar ChildFrom;
|
bddvar ChildFrom;
|
||||||
int SwapReorder;
|
|
||||||
int AnySwap;
|
int AnySwap;
|
||||||
int Moved;
|
int Moved;
|
||||||
long Cost;
|
long Cost;
|
||||||
long NewCost;
|
|
||||||
|
|
||||||
NumberChild = BddLocalSystem->NUMBER_VAR;
|
NumberChild = BddLocalSystem->NUMBER_VAR;
|
||||||
ReorderLevel = (short *)autallocblock( sizeof( short ) * NumberChild );
|
ReorderLevel = (short *)autallocblock( sizeof( short ) * NumberChild );
|
||||||
|
@ -465,7 +461,7 @@ void BoomLogicOptimizeTop( BehFigure )
|
||||||
|
|
||||||
if ( IsBoomDebugLevel2() )
|
if ( IsBoomDebugLevel2() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> ChildFrom %d\n", ChildFrom );
|
BoomPrintf( stdout, "-> ChildFrom %u\n", ChildFrom );
|
||||||
}
|
}
|
||||||
|
|
||||||
ReorderLevel[ ChildFrom ] = 0;
|
ReorderLevel[ ChildFrom ] = 0;
|
||||||
|
@ -476,7 +472,7 @@ void BoomLogicOptimizeTop( BehFigure )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel2() )
|
if ( IsBoomDebugLevel2() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> Swap %d and %d\n", ChildTo, ChildTo + 1 );
|
BoomPrintf( stdout, "-> Swap %u and %u\n", ChildTo, ChildTo + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, ChildTo );
|
swapbddvar( (bddsystem *)0, ChildTo );
|
||||||
|
@ -501,7 +497,7 @@ void BoomLogicOptimizeTop( BehFigure )
|
||||||
|
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "--> Best child %d\n", BestChild );
|
BoomPrintf( stdout, "--> Best child %u\n", BestChild );
|
||||||
BoomPrintf( stdout, "--> Best cost %ld\n", Cost );
|
BoomPrintf( stdout, "--> Best cost %ld\n", Cost );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -510,7 +506,7 @@ void BoomLogicOptimizeTop( BehFigure )
|
||||||
# ifdef BDD_DEBUG
|
# ifdef BDD_DEBUG
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
fprintf( stdout, "-> UnSwap %d and %d\n", ChildTo - 1, ChildTo );
|
fprintf( stdout, "-> UnSwap %d and %u\n", ChildTo - 1, ChildTo );
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
@ -555,7 +551,6 @@ void BoomLogicOptimizeProcrast( BehFigure )
|
||||||
bddvar NumberChild;
|
bddvar NumberChild;
|
||||||
bddvar ChildTo;
|
bddvar ChildTo;
|
||||||
bddvar ChildFrom;
|
bddvar ChildFrom;
|
||||||
char SwapReorder;
|
|
||||||
long Cost;
|
long Cost;
|
||||||
long NumberNode;
|
long NumberNode;
|
||||||
long NewCost;
|
long NewCost;
|
||||||
|
@ -588,14 +583,14 @@ void BoomLogicOptimizeProcrast( BehFigure )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> ChildFrom %d\n", ChildFrom );
|
BoomPrintf( stdout, "-> ChildFrom %u\n", ChildFrom );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ChildTo = ChildFrom; ChildTo < ( NumberChild - 1 ); ChildTo++ )
|
for ( ChildTo = ChildFrom; ChildTo < ( NumberChild - 1 ); ChildTo++ )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> Swap %d and %d\n", ChildTo, ChildTo + 1 );
|
BoomPrintf( stdout, "-> Swap %u and %d\n", ChildTo, ChildTo + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, ChildTo );
|
swapbddvar( (bddsystem *)0, ChildTo );
|
||||||
|
@ -629,7 +624,7 @@ void BoomLogicOptimizeProcrast( BehFigure )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> UnSwap %d and %d\n", ChildTo, ChildTo - 1 );
|
BoomPrintf( stdout, "-> UnSwap %u and %d\n", ChildTo, ChildTo - 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, ChildTo - 1 );
|
swapbddvar( (bddsystem *)0, ChildTo - 1 );
|
||||||
|
@ -668,7 +663,6 @@ void BoomLogicOptimizeBest( BehFigure )
|
||||||
bddvar NumberChild;
|
bddvar NumberChild;
|
||||||
bddvar ChildTo;
|
bddvar ChildTo;
|
||||||
bddvar ChildFrom;
|
bddvar ChildFrom;
|
||||||
char SwapReorder;
|
|
||||||
long Cost;
|
long Cost;
|
||||||
long NewCost;
|
long NewCost;
|
||||||
long Iteration;
|
long Iteration;
|
||||||
|
@ -700,14 +694,14 @@ void BoomLogicOptimizeBest( BehFigure )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> ChildFrom %d\n", ChildFrom );
|
BoomPrintf( stdout, "-> ChildFrom %u\n", ChildFrom );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ChildTo = ChildFrom; ChildTo < ( NumberChild - 1 ); ChildTo++ )
|
for ( ChildTo = ChildFrom; ChildTo < ( NumberChild - 1 ); ChildTo++ )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> Swap %d and %d\n", ChildTo, ChildTo + 1 );
|
BoomPrintf( stdout, "-> Swap %u and %d\n", ChildTo, ChildTo + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, ChildTo );
|
swapbddvar( (bddsystem *)0, ChildTo );
|
||||||
|
@ -734,7 +728,7 @@ void BoomLogicOptimizeBest( BehFigure )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> UnSwap %d and %d\n", ChildTo, ChildTo - 1 );
|
BoomPrintf( stdout, "-> UnSwap %u and %d\n", ChildTo, ChildTo - 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, ChildTo - 1 );
|
swapbddvar( (bddsystem *)0, ChildTo - 1 );
|
||||||
|
@ -847,7 +841,7 @@ void BoomLogicOptimizeRandom( BehFigure )
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "Initial cost %ld, NumberVar %d\n", Cost, NumberVar );
|
BoomPrintf( stdout, "Initial cost %ld, NumberVar %u\n", Cost, NumberVar );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( MaxIteration <= 0 ) MaxIteration = NumberVar;
|
if ( MaxIteration <= 0 ) MaxIteration = NumberVar;
|
||||||
|
@ -858,7 +852,7 @@ void BoomLogicOptimizeRandom( BehFigure )
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "Swap %d\n", BddVar );
|
BoomPrintf( stdout, "Swap %u\n", BddVar );
|
||||||
}
|
}
|
||||||
|
|
||||||
BoomLogicReorderWindow2( BehFigure, BehAux, BddVar, &Cost );
|
BoomLogicReorderWindow2( BehFigure, BehAux, BddVar, &Cost );
|
||||||
|
@ -964,16 +958,16 @@ void BoomLogicOptimizeOne( BehFigure )
|
||||||
|
|
||||||
befig_list *BehFigure;
|
befig_list *BehFigure;
|
||||||
{
|
{
|
||||||
beaux_list *BehAux;
|
//beaux_list *BehAux;
|
||||||
bddvar NumberVar;
|
//bddvar NumberVar;
|
||||||
bddvar BddVar;
|
//bddvar BddVar;
|
||||||
long Cost;
|
long Cost;
|
||||||
|
|
||||||
reorderbddsystemwindow( BddLocalSystem );
|
reorderbddsystemwindow( BddLocalSystem );
|
||||||
|
|
||||||
NumberVar = BddLocalSystem->NUMBER_VAR;
|
//NumberVar = BddLocalSystem->NUMBER_VAR;
|
||||||
|
|
||||||
BehAux = BoomLogicComputeAux( BehFigure, BehFigure->BEAUX );
|
//BehAux = BoomLogicComputeAux( BehFigure, BehFigure->BEAUX );
|
||||||
Cost = BoomBehGiveCost( BehFigure );
|
Cost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
|
@ -995,7 +989,7 @@ void BoomLogicOptimization( BehFigure )
|
||||||
boombefiginfo *FigInfo;
|
boombefiginfo *FigInfo;
|
||||||
bddsystem *BddSystem;
|
bddsystem *BddSystem;
|
||||||
bddcircuit *BddCircuit;
|
bddcircuit *BddCircuit;
|
||||||
beaux_list *BehAux;
|
//beaux_list *BehAux;
|
||||||
|
|
||||||
FigInfo = GetBoomBehFigInfo( BehFigure );
|
FigInfo = GetBoomBehFigInfo( BehFigure );
|
||||||
|
|
||||||
|
@ -1015,7 +1009,7 @@ void BoomLogicOptimization( BehFigure )
|
||||||
BoomBehAbl2BddNode( BehFigure, FigInfo->KEEP_AUX, FigInfo->INIT_BDD_ORDER );
|
BoomBehAbl2BddNode( BehFigure, FigInfo->KEEP_AUX, FigInfo->INIT_BDD_ORDER );
|
||||||
reorderbddsystemdynamic( BddSystem, garbagebddsystem, 200000, 50 );
|
reorderbddsystemdynamic( BddSystem, garbagebddsystem, 200000, 50 );
|
||||||
|
|
||||||
BehAux = BehFigure->BEAUX;
|
//BehAux = BehFigure->BEAUX;
|
||||||
|
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -94,16 +94,12 @@ void BoomBehOptimizeOne( BehFigure )
|
||||||
|
|
||||||
befig_list *BehFigure;
|
befig_list *BehFigure;
|
||||||
{
|
{
|
||||||
beaux_list *BehAux;
|
long Cost;
|
||||||
bddvar NumberVar;
|
|
||||||
long Cost;
|
|
||||||
|
|
||||||
reorderbddsystemwindow( BddLocalSystem );
|
reorderbddsystemwindow( BddLocalSystem );
|
||||||
|
|
||||||
NumberVar = BddLocalSystem->NUMBER_VAR;
|
BoomBehComputeAux( BehFigure, BehFigure->BEAUX );
|
||||||
|
Cost = BoomBehGiveCost( BehFigure );
|
||||||
BehAux = BoomBehComputeAux( BehFigure, BehFigure->BEAUX );
|
|
||||||
Cost = BoomBehGiveCost( BehFigure );
|
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,7 +104,7 @@ void BoomBehOptimizeProcrast( BehFigure )
|
||||||
long NewCost;
|
long NewCost;
|
||||||
long NumberNode;
|
long NumberNode;
|
||||||
long NewNumberNode;
|
long NewNumberNode;
|
||||||
long LastNewNumberNode;
|
long LastNewNumberNode = 0;
|
||||||
long Iteration;
|
long Iteration;
|
||||||
long MaxIteration;
|
long MaxIteration;
|
||||||
int Level;
|
int Level;
|
||||||
|
@ -152,14 +152,14 @@ void BoomBehOptimizeProcrast( BehFigure )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> ChildFrom %d\n", ChildFrom );
|
BoomPrintf( stdout, "-> ChildFrom %u\n", ChildFrom );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ChildTo = ChildFrom; ChildTo < ( NumberChild - 1 ); ChildTo++ )
|
for ( ChildTo = ChildFrom; ChildTo < ( NumberChild - 1 ); ChildTo++ )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> Swap %d and %d\n", ChildTo, ChildTo + 1 );
|
BoomPrintf( stdout, "-> Swap %u and %d\n", ChildTo, ChildTo + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, ChildTo );
|
swapbddvar( (bddsystem *)0, ChildTo );
|
||||||
|
@ -220,7 +220,7 @@ void BoomBehOptimizeProcrast( BehFigure )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> UnSwap %d and %d\n", ChildTo, ChildTo - 1 );
|
BoomPrintf( stdout, "-> UnSwap %u and %d\n", ChildTo, ChildTo - 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, ChildTo - 1 );
|
swapbddvar( (bddsystem *)0, ChildTo - 1 );
|
||||||
|
|
|
@ -121,7 +121,7 @@ void BoomBehOptimizeRandom( BehFigure )
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "Initial cost %ld, NumberVar %d\n", Cost, NumberVar );
|
BoomPrintf( stdout, "Initial cost %ld, NumberVar %u\n", Cost, NumberVar );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( MaxIteration <= 0 ) MaxIteration = NumberVar;
|
if ( MaxIteration <= 0 ) MaxIteration = NumberVar;
|
||||||
|
@ -139,7 +139,7 @@ void BoomBehOptimizeRandom( BehFigure )
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "Swap %d\n", BddVar );
|
BoomPrintf( stdout, "Swap %u\n", BddVar );
|
||||||
}
|
}
|
||||||
|
|
||||||
BoomBehReorderWindow2( BehFigure, BehAux, BddVar, &Cost );
|
BoomBehReorderWindow2( BehFigure, BehAux, BddVar, &Cost );
|
||||||
|
|
|
@ -490,10 +490,8 @@ long BoomComputeLog2( Value )
|
||||||
|
|
||||||
unsigned long Value;
|
unsigned long Value;
|
||||||
{
|
{
|
||||||
unsigned long Mask;
|
|
||||||
unsigned long Log2;
|
unsigned long Log2;
|
||||||
|
|
||||||
Mask = 1;
|
|
||||||
Log2 = 0;
|
Log2 = 0;
|
||||||
|
|
||||||
while ( Value != 0 )
|
while ( Value != 0 )
|
||||||
|
|
|
@ -136,7 +136,7 @@ void BoomBehOptimizeTop( BehFigure )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel2() )
|
if ( IsBoomDebugLevel2() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> ChildFrom %d\n", ChildFrom );
|
BoomPrintf( stdout, "-> ChildFrom %u\n", ChildFrom );
|
||||||
}
|
}
|
||||||
|
|
||||||
ReorderLevel[ ChildFrom ] = 0;
|
ReorderLevel[ ChildFrom ] = 0;
|
||||||
|
@ -147,7 +147,7 @@ void BoomBehOptimizeTop( BehFigure )
|
||||||
{
|
{
|
||||||
if ( IsBoomDebugLevel2() )
|
if ( IsBoomDebugLevel2() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "-> Swap %d and %d\n", ChildTo, ChildTo + 1 );
|
BoomPrintf( stdout, "-> Swap %u and %u\n", ChildTo, ChildTo + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, ChildTo );
|
swapbddvar( (bddsystem *)0, ChildTo );
|
||||||
|
@ -172,7 +172,7 @@ void BoomBehOptimizeTop( BehFigure )
|
||||||
|
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
BoomPrintf( stdout, "--> Best child %d\n", BestChild );
|
BoomPrintf( stdout, "--> Best child %u\n", BestChild );
|
||||||
BoomPrintf( stdout, "--> Best cost %ld\n", Cost );
|
BoomPrintf( stdout, "--> Best cost %ld\n", Cost );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ void BoomBehOptimizeTop( BehFigure )
|
||||||
# ifdef BDD_DEBUG
|
# ifdef BDD_DEBUG
|
||||||
if ( IsBoomDebugLevel1() )
|
if ( IsBoomDebugLevel1() )
|
||||||
{
|
{
|
||||||
fprintf( stdout, "-> UnSwap %d and %d\n", ChildTo - 1, ChildTo );
|
fprintf( stdout, "-> UnSwap %u and %u\n", ChildTo - 1, ChildTo );
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ int BoomBehReorderWindow2( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
//BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( NewCost < *PCost )
|
if ( NewCost < *PCost )
|
||||||
|
@ -147,7 +147,7 @@ int BoomBehReorderWindow3( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
//BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
|
@ -168,7 +168,7 @@ int BoomBehReorderWindow3( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
//BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
|
@ -189,7 +189,7 @@ int BoomBehReorderWindow3( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
//BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
|
@ -210,7 +210,7 @@ int BoomBehReorderWindow3( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
//BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
|
@ -231,7 +231,7 @@ int BoomBehReorderWindow3( BehFigure, BehAux, BddVar, PCost )
|
||||||
|
|
||||||
swapbddvar( (bddsystem *)0, BddVar );
|
swapbddvar( (bddsystem *)0, BddVar );
|
||||||
|
|
||||||
BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
//BehAux = BoomBehComputeAux( BehFigure, BehAux );
|
||||||
NewCost = BoomBehGiveCost( BehFigure );
|
NewCost = BoomBehGiveCost( BehFigure );
|
||||||
|
|
||||||
if ( IsBoomDebugLevel0() )
|
if ( IsBoomDebugLevel0() )
|
||||||
|
|
|
@ -345,9 +345,6 @@ int main( argc, argv )
|
||||||
|
|
||||||
bddnode *BddInitial;
|
bddnode *BddInitial;
|
||||||
bddsystem *BddSystem;
|
bddsystem *BddSystem;
|
||||||
bddcircuit *BddCircuit;
|
|
||||||
|
|
||||||
long BtrNumReg;
|
|
||||||
|
|
||||||
btrtransfunc *BtrTransFunc;
|
btrtransfunc *BtrTransFunc;
|
||||||
btrtransrel *BtrTransRel;
|
btrtransrel *BtrTransRel;
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
|
||||||
|
%option noinput
|
||||||
|
%option nounput
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
/* called func. : none */
|
/* called func. : none */
|
||||||
/* ###--------------------------------------------------------------### */
|
/* ###--------------------------------------------------------------### */
|
||||||
|
|
||||||
|
extern int bvl_y_lex (void);
|
||||||
static void bvl_y_error (str)
|
static void bvl_y_error (str)
|
||||||
|
|
||||||
char *str;
|
char *str;
|
||||||
|
@ -611,7 +612,7 @@ short right ; /* array's right bound (= -1 if scalar) */
|
||||||
{
|
{
|
||||||
for (i=left ; i!=(right+inc) ; i+=inc)
|
for (i=left ; i!=(right+inc) ; i+=inc)
|
||||||
{
|
{
|
||||||
sprintf (extname, "%s %d", (char *)ptauxnam->DATA, i);
|
sprintf (extname, "%s %ld", (char *)ptauxnam->DATA, i);
|
||||||
name = namealloc (extname);
|
name = namealloc (extname);
|
||||||
|
|
||||||
if (ptauxnat != NULL)
|
if (ptauxnat != NULL)
|
||||||
|
@ -1275,7 +1276,7 @@ bvl_ablstr pt_ablstr; /* tested expression */
|
||||||
{
|
{
|
||||||
for (; last_width<pt_ablstr.WIDTH ; last_width++)
|
for (; last_width<pt_ablstr.WIDTH ; last_width++)
|
||||||
{
|
{
|
||||||
sprintf (nomvar,"(%d)",last_width);
|
sprintf (nomvar,"(%ld)",last_width);
|
||||||
createNodeTermBdd (addInputCct(pC,nomvar));
|
createNodeTermBdd (addInputCct(pC,nomvar));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1331,7 +1332,7 @@ bvl_ablstr pt_ablstr; /* tested expression */
|
||||||
i = pt_ablstr.WIDTH - 1;
|
i = pt_ablstr.WIDTH - 1;
|
||||||
while (pt_auxabl != NULL)
|
while (pt_auxabl != NULL)
|
||||||
{
|
{
|
||||||
sprintf (nomvar,"(%i)",i);
|
sprintf (nomvar,"(%li)",i);
|
||||||
/*--------
|
/*--------
|
||||||
substPhyExpr (pt_newabl,namealloc(nomvar),(struct chain *)pt_auxabl->DATA);
|
substPhyExpr (pt_newabl,namealloc(nomvar),(struct chain *)pt_auxabl->DATA);
|
||||||
---------*/
|
---------*/
|
||||||
|
@ -2833,7 +2834,7 @@ choices
|
||||||
Bar
|
Bar
|
||||||
choice
|
choice
|
||||||
{
|
{
|
||||||
if ($3 == "others")
|
if (!strncmp($3,"others",7))
|
||||||
bvl_error (30, NULL);
|
bvl_error (30, NULL);
|
||||||
BVL_NM1LST = addchain (BVL_NM1LST, $3);
|
BVL_NM1LST = addchain (BVL_NM1LST, $3);
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,7 @@ long trace_mode;
|
||||||
else
|
else
|
||||||
direct = "TO" ;
|
direct = "TO" ;
|
||||||
|
|
||||||
fprintf (fp, " SIGNAL %s : %s %s (%d %s %d) %s", beh_vhdlname (name),
|
fprintf (fp, " SIGNAL %s : %s %s (%ld %s %ld) %s", beh_vhdlname (name),
|
||||||
mode, type, left, direct, right, kind);
|
mode, type, left, direct, right, kind);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -239,7 +239,7 @@ long trace_mode;
|
||||||
else
|
else
|
||||||
direct = "TO" ;
|
direct = "TO" ;
|
||||||
|
|
||||||
fprintf (fp, " SIGNAL %s : REG_VECTOR (%d %s %d) REGISTER;\t-- %s\n",
|
fprintf (fp, " SIGNAL %s : REG_VECTOR (%ld %s %ld) REGISTER;\t-- %s\n",
|
||||||
beh_vhdlname (name), left, direct, right, name);
|
beh_vhdlname (name), left, direct, right, name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -283,7 +283,7 @@ long trace_mode;
|
||||||
else
|
else
|
||||||
direct = "TO" ;
|
direct = "TO" ;
|
||||||
|
|
||||||
fprintf (fp, " SIGNAL %s : %s (%d %s %d) BUS;\t-- %s\n",
|
fprintf (fp, " SIGNAL %s : %s (%ld %s %ld) BUS;\t-- %s\n",
|
||||||
beh_vhdlname (name), type, left, direct, right, name);
|
beh_vhdlname (name), type, left, direct, right, name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -327,7 +327,7 @@ long trace_mode;
|
||||||
else
|
else
|
||||||
direct = "TO" ;
|
direct = "TO" ;
|
||||||
|
|
||||||
fprintf (fp, " SIGNAL %s : BIT_VECTOR (%d %s %d);\t-- %s\n",
|
fprintf (fp, " SIGNAL %s : BIT_VECTOR (%ld %s %ld);\t-- %s\n",
|
||||||
beh_vhdlname (name), left, direct, right, name);
|
beh_vhdlname (name), left, direct, right, name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -398,7 +398,7 @@ long trace_mode;
|
||||||
if (pt_aux->TIME == 0)
|
if (pt_aux->TIME == 0)
|
||||||
fprintf (fp, ";\n");
|
fprintf (fp, ";\n");
|
||||||
else
|
else
|
||||||
fprintf (fp, " after %u %s;\n", pt_aux->TIME*time_step, time_unit);
|
fprintf (fp, " after %lu %s;\n", pt_aux->TIME*time_step, time_unit);
|
||||||
|
|
||||||
buffer [0] = '\0';
|
buffer [0] = '\0';
|
||||||
}
|
}
|
||||||
|
@ -416,7 +416,7 @@ long trace_mode;
|
||||||
ptbiabl = pt_reg->BIABL;
|
ptbiabl = pt_reg->BIABL;
|
||||||
while (ptbiabl != NULL)
|
while (ptbiabl != NULL)
|
||||||
{
|
{
|
||||||
fprintf (fp, " label%d : BLOCK ", nrlabel);
|
fprintf (fp, " label%ld : BLOCK ", nrlabel);
|
||||||
|
|
||||||
if (ptbiabl->CNDABL == NULL)
|
if (ptbiabl->CNDABL == NULL)
|
||||||
beh_toolbug (19, "vhdlsavebefig", pt_reg->NAME, 0);
|
beh_toolbug (19, "vhdlsavebefig", pt_reg->NAME, 0);
|
||||||
|
@ -445,12 +445,12 @@ long trace_mode;
|
||||||
if (ptbiabl->TIME == 0)
|
if (ptbiabl->TIME == 0)
|
||||||
fprintf (fp, ";\n");
|
fprintf (fp, ";\n");
|
||||||
else
|
else
|
||||||
fprintf (fp, "after %u %s;\n", ptbiabl->TIME*time_step, time_unit);
|
fprintf (fp, "after %lu %s;\n", ptbiabl->TIME*time_step, time_unit);
|
||||||
|
|
||||||
buffer[0] = '\0';
|
buffer[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (fp, " END BLOCK label%d;\n", nrlabel);
|
fprintf (fp, " END BLOCK label%ld;\n", nrlabel);
|
||||||
ptbiabl = ptbiabl->NEXT;
|
ptbiabl = ptbiabl->NEXT;
|
||||||
nrlabel++;
|
nrlabel++;
|
||||||
}
|
}
|
||||||
|
@ -469,7 +469,7 @@ long trace_mode;
|
||||||
ptbiabl = pt_bux->BIABL;
|
ptbiabl = pt_bux->BIABL;
|
||||||
while (ptbiabl != NULL)
|
while (ptbiabl != NULL)
|
||||||
{
|
{
|
||||||
fprintf (fp, " label%d : BLOCK ", nrlabel);
|
fprintf (fp, " label%ld : BLOCK ", nrlabel);
|
||||||
|
|
||||||
if (ptbiabl->CNDABL == NULL)
|
if (ptbiabl->CNDABL == NULL)
|
||||||
beh_toolbug (19, "vhdlsavebefig", pt_bux->NAME, 0);
|
beh_toolbug (19, "vhdlsavebefig", pt_bux->NAME, 0);
|
||||||
|
@ -498,12 +498,12 @@ long trace_mode;
|
||||||
if (ptbiabl->TIME == 0)
|
if (ptbiabl->TIME == 0)
|
||||||
fprintf (fp, ";\n");
|
fprintf (fp, ";\n");
|
||||||
else
|
else
|
||||||
fprintf (fp, "after %u %s;\n", ptbiabl->TIME*time_step, time_unit);
|
fprintf (fp, "after %lu %s;\n", ptbiabl->TIME*time_step, time_unit);
|
||||||
|
|
||||||
buffer[0] = '\0';
|
buffer[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (fp, " END BLOCK label%d;\n",nrlabel);
|
fprintf (fp, " END BLOCK label%ld;\n",nrlabel);
|
||||||
ptbiabl = ptbiabl->NEXT;
|
ptbiabl = ptbiabl->NEXT;
|
||||||
nrlabel++;
|
nrlabel++;
|
||||||
}
|
}
|
||||||
|
@ -523,7 +523,7 @@ long trace_mode;
|
||||||
ptbiabl = pt_bus->BIABL;
|
ptbiabl = pt_bus->BIABL;
|
||||||
while (ptbiabl != NULL)
|
while (ptbiabl != NULL)
|
||||||
{
|
{
|
||||||
fprintf (fp, " label%d : BLOCK ", nrlabel);
|
fprintf (fp, " label%ld : BLOCK ", nrlabel);
|
||||||
|
|
||||||
if (ptbiabl->CNDABL == NULL)
|
if (ptbiabl->CNDABL == NULL)
|
||||||
beh_toolbug (19, "vhdlsavebefig", pt_bus->NAME, 0);
|
beh_toolbug (19, "vhdlsavebefig", pt_bus->NAME, 0);
|
||||||
|
@ -551,11 +551,11 @@ long trace_mode;
|
||||||
if (ptbiabl->TIME == 0)
|
if (ptbiabl->TIME == 0)
|
||||||
fprintf (fp, ";\n");
|
fprintf (fp, ";\n");
|
||||||
else
|
else
|
||||||
fprintf (fp, "after %u %s;\n", ptbiabl->TIME*time_step, time_unit);
|
fprintf (fp, "after %lu %s;\n", ptbiabl->TIME*time_step, time_unit);
|
||||||
buffer [0] = '\0';
|
buffer [0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (fp, "\tEND BLOCK label%d;\n", nrlabel);
|
fprintf (fp, "\tEND BLOCK label%ld;\n", nrlabel);
|
||||||
ptbiabl = ptbiabl->NEXT;
|
ptbiabl = ptbiabl->NEXT;
|
||||||
nrlabel++;
|
nrlabel++;
|
||||||
}
|
}
|
||||||
|
@ -587,7 +587,7 @@ long trace_mode;
|
||||||
if (pt_out->TIME == 0)
|
if (pt_out->TIME == 0)
|
||||||
fprintf (fp, ";\n");
|
fprintf (fp, ";\n");
|
||||||
else
|
else
|
||||||
fprintf (fp, " after %u %s;\n", pt_out->TIME*time_step, time_unit);
|
fprintf (fp, " after %lu %s;\n", pt_out->TIME*time_step, time_unit);
|
||||||
|
|
||||||
buffer [0] = '\0';
|
buffer [0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,14 +31,15 @@ char *figname ;
|
||||||
unsigned long trace_mode;
|
unsigned long trace_mode;
|
||||||
|
|
||||||
{
|
{
|
||||||
extern FILE *bvl_y_in ;
|
extern FILE *bvl_y_in ;
|
||||||
extern long bvl_y_parse ();
|
extern long bvl_y_parse ();
|
||||||
char *tok ;
|
extern void bvl_y_restart();
|
||||||
char *str ;
|
char *tok ;
|
||||||
unsigned long check_mode ;
|
char *str ;
|
||||||
struct chain *behsfx_lst = NULL;
|
unsigned long check_mode ;
|
||||||
struct chain *suffix = NULL;
|
struct chain *behsfx_lst = NULL;
|
||||||
static unsigned long call_nbr = 0 ;
|
struct chain *suffix = NULL;
|
||||||
|
static unsigned long call_nbr = 0 ;
|
||||||
|
|
||||||
/* ###------------------------------------------------------### */
|
/* ###------------------------------------------------------### */
|
||||||
/* read the environment variable VH_BEHSFX to create a list */
|
/* read the environment variable VH_BEHSFX to create a list */
|
||||||
|
|
|
@ -42,7 +42,7 @@ char *str1;
|
||||||
|
|
||||||
{
|
{
|
||||||
BVL_ERRFLG++;
|
BVL_ERRFLG++;
|
||||||
fprintf (stderr, "`%s` Error %d line %d :", BVL_CURFIL, code, BEH_LINNUM);
|
fprintf (stderr, "`%s` Error %ld line %u :", BVL_CURFIL, code, BEH_LINNUM);
|
||||||
|
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
@ -202,7 +202,7 @@ char *name ;
|
||||||
prv_por = pt_por;
|
prv_por = pt_por;
|
||||||
if (pt_por != NULL)
|
if (pt_por != NULL)
|
||||||
{
|
{
|
||||||
if (sscanf (pt_por->NAME, "%s %u", name, &left) == 1)
|
if (sscanf (pt_por->NAME, "%255s %22ld", name, &left) == 1)
|
||||||
left = -1;
|
left = -1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -211,7 +211,7 @@ char *name ;
|
||||||
|
|
||||||
while (pt_por != NULL)
|
while (pt_por != NULL)
|
||||||
{
|
{
|
||||||
if (sscanf (pt_por->NAME, "%s %u", tmp_nam, &index) == 1)
|
if (sscanf (pt_por->NAME, "%255s %22ld", tmp_nam, &index) == 1)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -255,7 +255,7 @@ char *name ;
|
||||||
prv_aux = pt_aux;
|
prv_aux = pt_aux;
|
||||||
if (pt_aux != NULL)
|
if (pt_aux != NULL)
|
||||||
{
|
{
|
||||||
if (sscanf (pt_aux->NAME, "%s %u", name, &left) == 1)
|
if (sscanf (pt_aux->NAME, "%255s %22ld", name, &left) == 1)
|
||||||
left = -1;
|
left = -1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -264,7 +264,7 @@ char *name ;
|
||||||
|
|
||||||
while (pt_aux != NULL)
|
while (pt_aux != NULL)
|
||||||
{
|
{
|
||||||
if (sscanf (pt_aux->NAME, "%s %u", tmp_nam, &index) == 1)
|
if (sscanf (pt_aux->NAME, "%255s %22ld", tmp_nam, &index) == 1)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -308,7 +308,7 @@ char *name ;
|
||||||
prv_bux = pt_bux;
|
prv_bux = pt_bux;
|
||||||
if (pt_bux != NULL)
|
if (pt_bux != NULL)
|
||||||
{
|
{
|
||||||
if (sscanf (pt_bux->NAME, "%s %u", name, &left) == 1)
|
if (sscanf (pt_bux->NAME, "%255s %22ld", name, &left) == 1)
|
||||||
left = -1;
|
left = -1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -317,7 +317,7 @@ char *name ;
|
||||||
|
|
||||||
while (pt_bux != NULL)
|
while (pt_bux != NULL)
|
||||||
{
|
{
|
||||||
if (sscanf (pt_bux->NAME, "%s %u", tmp_nam, &index) == 1)
|
if (sscanf (pt_bux->NAME, "%255s %22ld", tmp_nam, &index) == 1)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -361,7 +361,7 @@ char *name ;
|
||||||
prv_reg = pt_reg;
|
prv_reg = pt_reg;
|
||||||
if (pt_reg != NULL)
|
if (pt_reg != NULL)
|
||||||
{
|
{
|
||||||
if (sscanf (pt_reg->NAME, "%s %u", name, &left) == 1)
|
if (sscanf (pt_reg->NAME, "%255s %22ld", name, &left) == 1)
|
||||||
left = -1;
|
left = -1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -370,7 +370,7 @@ char *name ;
|
||||||
|
|
||||||
while (pt_reg != NULL)
|
while (pt_reg != NULL)
|
||||||
{
|
{
|
||||||
if (sscanf (pt_reg->NAME, "%s %u", tmp_nam, &index) == 1)
|
if (sscanf (pt_reg->NAME, "%255s %22ld", tmp_nam, &index) == 1)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,8 +23,8 @@ R 1500,1500,ref_ref,nq_15
|
||||||
R 1500,1000,ref_ref,nq_10
|
R 1500,1000,ref_ref,nq_10
|
||||||
R 500,1000,ref_ref,i1_10
|
R 500,1000,ref_ref,i1_10
|
||||||
R 500,1500,ref_ref,i1_15
|
R 500,1500,ref_ref,i1_15
|
||||||
S 1800,2000,2000,2000,200,sel0,LEFT,ALU2
|
S 2000,2000,2000,2000,200,sel0,LEFT,CALU2
|
||||||
S 1000,2000,1200,2000,200,sel1,RIGHT,ALU2
|
S 1000,2000,1000,2000,200,sel1,RIGHT,CALU2
|
||||||
S 1500,1000,1500,3500,200,nq,UP,CALU1
|
S 1500,1000,1500,3500,200,nq,UP,CALU1
|
||||||
S 500,1000,500,4000,200,i1,UP,CALU1
|
S 500,1000,500,4000,200,i1,UP,CALU1
|
||||||
S 2500,1000,2500,4000,200,i0,UP,CALU1
|
S 2500,1000,2500,4000,200,i0,UP,CALU1
|
||||||
|
|
|
@ -306,6 +306,8 @@
|
||||||
extern ctlfig_list *addctlfig __P((char *Name));
|
extern ctlfig_list *addctlfig __P((char *Name));
|
||||||
extern ctlform_list *addctlform __P((ctlfig_list *Figure, char *Name, vexexpr *Expr));
|
extern ctlform_list *addctlform __P((ctlfig_list *Figure, char *Name, vexexpr *Expr));
|
||||||
extern ctltype_list *addctltype __P((ctlfig_list *Figure, char *Name, unsigned long Index, long Left, long Right, unsigned long Size, char **Value, char Class, ctltype_list *Base));
|
extern ctltype_list *addctltype __P((ctlfig_list *Figure, char *Name, unsigned long Index, long Left, long Right, unsigned long Size, char **Value, char Class, ctltype_list *Base));
|
||||||
|
extern void addctlpredefinedtype __P(( ctlfig_list *Figure ));
|
||||||
|
|
||||||
|
|
||||||
extern ctldecl_list *addctldecl __P((ctlfig_list *Figure, vexexpr *Atom, unsigned char Type ));
|
extern ctldecl_list *addctldecl __P((ctlfig_list *Figure, vexexpr *Atom, unsigned char Type ));
|
||||||
extern ctldecl_list *addctldeclvar __P((ctlfig_list *Figure, vexexpr *Atom));
|
extern ctldecl_list *addctldeclvar __P((ctlfig_list *Figure, vexexpr *Atom));
|
||||||
|
|
|
@ -521,10 +521,6 @@ void addctlpredefinedtype( Figure )
|
||||||
static char *std_ulogic_vl[9];
|
static char *std_ulogic_vl[9];
|
||||||
|
|
||||||
ctltype_list *TypeBit;
|
ctltype_list *TypeBit;
|
||||||
ctltype_list *TypeReg;
|
|
||||||
ctltype_list *TypeMux;
|
|
||||||
ctltype_list *TypeWor;
|
|
||||||
ctltype_list *TypeInt;
|
|
||||||
ctltype_list *TypeStd_logic;
|
ctltype_list *TypeStd_logic;
|
||||||
ctltype_list *TypeStd_ulogic;
|
ctltype_list *TypeStd_ulogic;
|
||||||
ctltype_list *TypeCharacter;
|
ctltype_list *TypeCharacter;
|
||||||
|
@ -564,7 +560,7 @@ void addctlpredefinedtype( Figure )
|
||||||
addctltype( Figure, "string",
|
addctltype( Figure, "string",
|
||||||
VEX_TYPE_STRING, 0, 0x7fffffff, 0, NULL, 'U', TypeCharacter );
|
VEX_TYPE_STRING, 0, 0x7fffffff, 0, NULL, 'U', TypeCharacter );
|
||||||
|
|
||||||
TypeInt = addctltype( Figure, "integer",
|
addctltype( Figure, "integer",
|
||||||
VEX_TYPE_INTEGER, 0x80000000, 0x7fffffff, 0, NULL, 'I', NULL );
|
VEX_TYPE_INTEGER, 0x80000000, 0x7fffffff, 0, NULL, 'I', NULL );
|
||||||
|
|
||||||
addctltype( Figure, "natural",
|
addctltype( Figure, "natural",
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include "ctldel.h"
|
# include "ctldel.h"
|
||||||
|
# include "ctlfree.h"
|
||||||
# include "ctlerror.h"
|
# include "ctlerror.h"
|
||||||
|
|
||||||
/*------------------------------------------------------------\
|
/*------------------------------------------------------------\
|
||||||
|
@ -102,6 +103,7 @@ static void loc_delallctlline( ScanLine )
|
||||||
| |
|
| |
|
||||||
\------------------------------------------------------------*/
|
\------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#if THIS_IS_DISABLED
|
||||||
static void loc_delctldecl( Figure, Declar )
|
static void loc_delctldecl( Figure, Declar )
|
||||||
|
|
||||||
ctlfig_list *Figure;
|
ctlfig_list *Figure;
|
||||||
|
@ -125,6 +127,7 @@ static void loc_delctldecl( Figure, Declar )
|
||||||
freevexexpr( Declar->VEX_INIT );
|
freevexexpr( Declar->VEX_INIT );
|
||||||
freectldecl( Declar );
|
freectldecl( Declar );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*------------------------------------------------------------\
|
/*------------------------------------------------------------\
|
||||||
| |
|
| |
|
||||||
|
|
|
@ -72,4 +72,6 @@
|
||||||
| |
|
| |
|
||||||
\------------------------------------------------------------*/
|
\------------------------------------------------------------*/
|
||||||
|
|
||||||
|
extern void freectltype __P(( ctltype_list *Type ));
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue