Oups! there was a bug when there was no xor in library
When trying to build it, recursion erased result of preceeding pattern matching. Thanks to user which has discovered this bug
This commit is contained in:
parent
a41f62ac2b
commit
698cc05087
|
@ -163,8 +163,15 @@ static void simpleCell(cell_list* cell)
|
|||
static int addgeneric(chain_list *abl, befig_list* befig, int area, float R, float C, float T)
|
||||
{
|
||||
port_list* port;
|
||||
port_list* top;
|
||||
cell_list* cell;
|
||||
|
||||
if ( !abl )
|
||||
{
|
||||
fprintf(stderr,__FUNCTION__ ": NULL pointer\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ABL_ATOM(abl)) {
|
||||
if (ABL_ATOM_VALUE(abl)!=getablatomone()
|
||||
&& ABL_ATOM_VALUE(abl)!=getablatomzero()) {
|
||||
|
@ -178,7 +185,9 @@ static int addgeneric(chain_list *abl, befig_list* befig, int area, float R, flo
|
|||
/*cell->PORT contains the result of pattern matching*/
|
||||
cell=cell_pattern(abl);
|
||||
|
||||
for (port=cell->PORT; port; port=port->NEXT) {
|
||||
top=copyport(cell->PORT); /*not to be disturb by recursion*/
|
||||
|
||||
for (port=top; port; port=port->NEXT) {
|
||||
if (isvss(port->NAME) || isvdd(port->NAME)) continue;
|
||||
switch (port->DIRECTION) {
|
||||
case OUT: case TRISTATE:
|
||||
|
@ -190,6 +199,8 @@ static int addgeneric(chain_list *abl, befig_list* befig, int area, float R, flo
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
delport(top);
|
||||
|
||||
return area+cell->AREA;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue