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*/
|
/*build group of variables which can be permuted*/
|
||||||
if (befig->BEBUS) {
|
if (befig->BEBUS) {
|
||||||
groupchain=permute_variable(NULL,befig->BEBUS->BIABL->CNDABL);
|
for (biabl = befig->BEBUS->BIABL; biabl; biabl = biabl->NEXT )
|
||||||
groupchain=permute_variable(groupchain,befig->BEBUS->BIABL->VALABL);
|
{
|
||||||
|
groupchain=permute_variable(groupchain,biabl->CNDABL);
|
||||||
|
groupchain=permute_variable(groupchain,biabl->VALABL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (befig->BEREG) {
|
else if (befig->BEREG) {
|
||||||
groupchain=permute_variable(NULL,befig->BEREG->BIABL->CNDABL);
|
for (biabl = befig->BEREG->BIABL; biabl; biabl = biabl->NEXT )
|
||||||
groupchain=permute_variable(groupchain,befig->BEREG->BIABL->VALABL);
|
{
|
||||||
|
groupchain=permute_variable(groupchain,biabl->CNDABL);
|
||||||
|
groupchain=permute_variable(groupchain,biabl->VALABL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (befig->BEOUT) {
|
else if (befig->BEOUT) {
|
||||||
groupchain=permute_variable(NULL,befig->BEOUT->ABL);
|
groupchain=permute_variable(NULL,befig->BEOUT->ABL);
|
||||||
|
|
|
@ -41,6 +41,14 @@
|
||||||
#include "lon_signal_critical.h"
|
#include "lon_signal_critical.h"
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************************/
|
||||||
|
/* Global Variables */
|
||||||
|
/***************************************************************************/
|
||||||
|
|
||||||
|
static authtable *ControlLoop;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
/*return the signal with the highest delay */
|
/*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;
|
ptype_list* ptype, *ret;
|
||||||
double max_delay=-1, delay;
|
double max_delay=-1, delay;
|
||||||
cell_list* cell;
|
cell_list* cell;
|
||||||
|
biabl_list* biabl;
|
||||||
|
|
||||||
if (!losig) {
|
if (!losig) {
|
||||||
fprintf(stderr,"search_long_path: NULL pointer\n");
|
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");
|
fprintf(stderr,"search_long_path: no losig name\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
signame=(char*) losig->NAMECHAIN->DATA;
|
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*/
|
/*search drivers*/
|
||||||
ptype=getptype(losig->USER,LOFIGCHAIN);
|
ptype=getptype(losig->USER,LOFIGCHAIN);
|
||||||
if (!ptype || !ptype->DATA) {
|
if (!ptype || !ptype->DATA) {
|
||||||
|
@ -158,12 +179,16 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include)
|
||||||
}
|
}
|
||||||
befig=cell->BEFIG;
|
befig=cell->BEFIG;
|
||||||
if (befig->BEREG) {
|
if (befig->BEREG) {
|
||||||
ptype=getptype(befig->BEREG->BIABL->USER,ABL_STABLE);
|
for ( biabl = cell->BEFIG->BEREG->BIABL; biabl; biabl = biabl->NEXT )
|
||||||
if (ptype) {
|
{
|
||||||
/*do not include clock in path*/
|
ptype=getptype(biabl->USER,ABL_STABLE);
|
||||||
if (!ck_include) return ret;
|
if (ptype) {
|
||||||
reg=1;
|
/*do not include clock in path*/
|
||||||
ck=ptype->DATA;
|
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)
|
extern ptype_list* critical_path(lofig_list* lofig)
|
||||||
{
|
{
|
||||||
losig_list* losig;
|
losig_list* losig;
|
||||||
|
ptype_list* ret;
|
||||||
|
|
||||||
losig=critical_output(lofig);
|
losig=critical_output(lofig);
|
||||||
/*lofig is empty*/
|
/*lofig is empty*/
|
||||||
if (!losig) return NULL;
|
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)
|
extern ptype_list* critical_path_without_clock(lofig_list* lofig)
|
||||||
{
|
{
|
||||||
losig_list* losig;
|
losig_list* losig;
|
||||||
|
ptype_list* ret;
|
||||||
|
|
||||||
losig=critical_output(lofig);
|
losig=critical_output(lofig);
|
||||||
/*lofig is empty*/
|
/*lofig is empty*/
|
||||||
if (!losig) return NULL;
|
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;
|
port_list* port;
|
||||||
locon_list* locon;
|
locon_list* locon;
|
||||||
char* input;
|
char* input;
|
||||||
|
biabl_list* biabl;
|
||||||
|
|
||||||
if (!loins) {
|
if (!loins) {
|
||||||
fprintf(stderr,"loins_max_T: NULL pointer\n");
|
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?*/
|
/*is-it a flip-flop?*/
|
||||||
if (cell->BEFIG->BEREG) {
|
if (cell->BEFIG->BEREG) {
|
||||||
ptype=getptype(cell->BEFIG->BEREG->BIABL->USER,ABL_STABLE);
|
for ( biabl = cell->BEFIG->BEREG->BIABL; biabl; biabl = biabl->NEXT )
|
||||||
if (ptype) {
|
{
|
||||||
flip_flop=1;
|
ptype=getptype(biabl->USER,ABL_STABLE);
|
||||||
ck=(char*) ptype->DATA;
|
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;
|
port_list* port;
|
||||||
locon_list* locon;
|
locon_list* locon;
|
||||||
char* input;
|
char* input;
|
||||||
|
biabl_list* biabl;
|
||||||
|
|
||||||
if (!loins || !output) {
|
if (!loins || !output) {
|
||||||
fprintf(stderr,"loins_max_RC: NULL pointer\n");
|
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?*/
|
/*is-it a flip-flop?*/
|
||||||
if (cell->BEFIG->BEREG) {
|
if (cell->BEFIG->BEREG) {
|
||||||
ptype=getptype(cell->BEFIG->BEREG->BIABL->USER,ABL_STABLE);
|
for ( biabl = cell->BEFIG->BEREG->BIABL; biabl; biabl = biabl->NEXT )
|
||||||
if (ptype) {
|
{
|
||||||
flip_flop=1;
|
ptype=getptype(biabl->USER,ABL_STABLE);
|
||||||
ck=(char*) ptype->DATA;
|
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;
|
port_list* port;
|
||||||
locon_list* locon;
|
locon_list* locon;
|
||||||
char* input;
|
char* input;
|
||||||
|
biabl_list* biabl;
|
||||||
|
|
||||||
if (!loins || !output) {
|
if (!loins || !output) {
|
||||||
fprintf(stderr,"loins_delay: NULL pointer\n");
|
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?*/
|
/*is-it a flip-flop?*/
|
||||||
if (cell->BEFIG->BEREG) {
|
if (cell->BEFIG->BEREG) {
|
||||||
ptype=getptype(cell->BEFIG->BEREG->BIABL->USER,ABL_STABLE);
|
for ( biabl = cell->BEFIG->BEREG->BIABL; biabl; biabl = biabl->NEXT )
|
||||||
if (ptype) {
|
{
|
||||||
flip_flop=1;
|
ptype=getptype(biabl->USER,ABL_STABLE);
|
||||||
ck=(char*) ptype->DATA;
|
if (ptype)
|
||||||
|
{
|
||||||
|
flip_flop=1;
|
||||||
|
ck=(char*) ptype->DATA;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue