le reset asynchrone, eviter de tomber dans une boucle pseudo-combinatoire.
This commit is contained in:
parent
1eaa39208c
commit
5872794507
|
@ -299,12 +299,18 @@ extern chain_list* permutations(befig_list* befig)
|
|||
|
||||
/*build group of variables which can be permuted*/
|
||||
if (befig->BEBUS) {
|
||||
groupchain=permute_variable(NULL,befig->BEBUS->BIABL->CNDABL);
|
||||
groupchain=permute_variable(groupchain,befig->BEBUS->BIABL->VALABL);
|
||||
for (biabl = befig->BEBUS->BIABL; biabl; biabl = biabl->NEXT )
|
||||
{
|
||||
groupchain=permute_variable(groupchain,biabl->CNDABL);
|
||||
groupchain=permute_variable(groupchain,biabl->VALABL);
|
||||
}
|
||||
}
|
||||
else if (befig->BEREG) {
|
||||
groupchain=permute_variable(NULL,befig->BEREG->BIABL->CNDABL);
|
||||
groupchain=permute_variable(groupchain,befig->BEREG->BIABL->VALABL);
|
||||
for (biabl = befig->BEREG->BIABL; biabl; biabl = biabl->NEXT )
|
||||
{
|
||||
groupchain=permute_variable(groupchain,biabl->CNDABL);
|
||||
groupchain=permute_variable(groupchain,biabl->VALABL);
|
||||
}
|
||||
}
|
||||
else if (befig->BEOUT) {
|
||||
groupchain=permute_variable(NULL,befig->BEOUT->ABL);
|
||||
|
|
|
@ -41,6 +41,14 @@
|
|||
#include "lon_signal_critical.h"
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/* Global Variables */
|
||||
/***************************************************************************/
|
||||
|
||||
static authtable *ControlLoop;
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/*return the signal with the highest delay */
|
||||
|
@ -107,6 +115,7 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include)
|
|||
ptype_list* ptype, *ret;
|
||||
double max_delay=-1, delay;
|
||||
cell_list* cell;
|
||||
biabl_list* biabl;
|
||||
|
||||
if (!losig) {
|
||||
fprintf(stderr,"search_long_path: NULL pointer\n");
|
||||
|
@ -117,8 +126,20 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include)
|
|||
fprintf(stderr,"search_long_path: no losig name\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
signame=(char*) losig->NAMECHAIN->DATA;
|
||||
|
||||
|
||||
/*control combinational loop, not to recurse infinitively*/
|
||||
if ( searchauthelem( ControlLoop, (char*) losig ) )
|
||||
{
|
||||
fprintf(stderr,"Warning: combinational loop on signal %s\n", signame );
|
||||
return ret;
|
||||
}
|
||||
|
||||
addauthelem( ControlLoop, (char*) losig, 1 );
|
||||
|
||||
|
||||
/*search drivers*/
|
||||
ptype=getptype(losig->USER,LOFIGCHAIN);
|
||||
if (!ptype || !ptype->DATA) {
|
||||
|
@ -158,12 +179,16 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include)
|
|||
}
|
||||
befig=cell->BEFIG;
|
||||
if (befig->BEREG) {
|
||||
ptype=getptype(befig->BEREG->BIABL->USER,ABL_STABLE);
|
||||
for ( biabl = cell->BEFIG->BEREG->BIABL; biabl; biabl = biabl->NEXT )
|
||||
{
|
||||
ptype=getptype(biabl->USER,ABL_STABLE);
|
||||
if (ptype) {
|
||||
/*do not include clock in path*/
|
||||
if (!ck_include) return ret;
|
||||
reg=1;
|
||||
ck=ptype->DATA;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,11 +235,19 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include)
|
|||
extern ptype_list* critical_path(lofig_list* lofig)
|
||||
{
|
||||
losig_list* losig;
|
||||
ptype_list* ret;
|
||||
|
||||
losig=critical_output(lofig);
|
||||
/*lofig is empty*/
|
||||
if (!losig) return NULL;
|
||||
return (ptype_list*) reverse( (chain_list*) search_long_path(losig,1));
|
||||
|
||||
ControlLoop = createauthtable( 100 );
|
||||
|
||||
ret = (ptype_list*) reverse( (chain_list*) search_long_path(losig,1));
|
||||
|
||||
destroyauthtable( ControlLoop );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -225,11 +258,19 @@ extern ptype_list* critical_path(lofig_list* lofig)
|
|||
extern ptype_list* critical_path_without_clock(lofig_list* lofig)
|
||||
{
|
||||
losig_list* losig;
|
||||
ptype_list* ret;
|
||||
|
||||
losig=critical_output(lofig);
|
||||
/*lofig is empty*/
|
||||
if (!losig) return NULL;
|
||||
return (ptype_list*) reverse( (chain_list*) search_long_path(losig,0));
|
||||
|
||||
ControlLoop = createauthtable( 100 );
|
||||
|
||||
ret = (ptype_list*) reverse( (chain_list*) search_long_path(losig,0));
|
||||
|
||||
destroyauthtable( ControlLoop );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ extern double loins_max_T(loins_list* loins)
|
|||
port_list* port;
|
||||
locon_list* locon;
|
||||
char* input;
|
||||
biabl_list* biabl;
|
||||
|
||||
if (!loins) {
|
||||
fprintf(stderr,"loins_max_T: NULL pointer\n");
|
||||
|
@ -120,10 +121,15 @@ extern double loins_max_T(loins_list* loins)
|
|||
|
||||
/*is-it a flip-flop?*/
|
||||
if (cell->BEFIG->BEREG) {
|
||||
ptype=getptype(cell->BEFIG->BEREG->BIABL->USER,ABL_STABLE);
|
||||
if (ptype) {
|
||||
for ( biabl = cell->BEFIG->BEREG->BIABL; biabl; biabl = biabl->NEXT )
|
||||
{
|
||||
ptype=getptype(biabl->USER,ABL_STABLE);
|
||||
if (ptype)
|
||||
{
|
||||
flip_flop=1;
|
||||
ck=(char*) ptype->DATA;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,6 +185,7 @@ extern double loins_max_RC(loins_list* loins, char* output)
|
|||
port_list* port;
|
||||
locon_list* locon;
|
||||
char* input;
|
||||
biabl_list* biabl;
|
||||
|
||||
if (!loins || !output) {
|
||||
fprintf(stderr,"loins_max_RC: NULL pointer\n");
|
||||
|
@ -195,10 +202,15 @@ extern double loins_max_RC(loins_list* loins, char* output)
|
|||
|
||||
/*is-it a flip-flop?*/
|
||||
if (cell->BEFIG->BEREG) {
|
||||
ptype=getptype(cell->BEFIG->BEREG->BIABL->USER,ABL_STABLE);
|
||||
if (ptype) {
|
||||
for ( biabl = cell->BEFIG->BEREG->BIABL; biabl; biabl = biabl->NEXT )
|
||||
{
|
||||
ptype=getptype(biabl->USER,ABL_STABLE);
|
||||
if (ptype)
|
||||
{
|
||||
flip_flop=1;
|
||||
ck=(char*) ptype->DATA;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -254,6 +266,7 @@ extern double loins_delay(loins_list* loins, char* output)
|
|||
port_list* port;
|
||||
locon_list* locon;
|
||||
char* input;
|
||||
biabl_list* biabl;
|
||||
|
||||
if (!loins || !output) {
|
||||
fprintf(stderr,"loins_delay: NULL pointer\n");
|
||||
|
@ -270,10 +283,15 @@ extern double loins_delay(loins_list* loins, char* output)
|
|||
|
||||
/*is-it a flip-flop?*/
|
||||
if (cell->BEFIG->BEREG) {
|
||||
ptype=getptype(cell->BEFIG->BEREG->BIABL->USER,ABL_STABLE);
|
||||
if (ptype) {
|
||||
for ( biabl = cell->BEFIG->BEREG->BIABL; biabl; biabl = biabl->NEXT )
|
||||
{
|
||||
ptype=getptype(biabl->USER,ABL_STABLE);
|
||||
if (ptype)
|
||||
{
|
||||
flip_flop=1;
|
||||
ck=(char*) ptype->DATA;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue