- bug fix (signal conflict names)

- replace exit calls to autexit calls (better for debug)
This commit is contained in:
Ludovic Jacomme 2004-09-06 21:26:09 +00:00
parent c7998e9ddb
commit 00651fec71
17 changed files with 142 additions and 138 deletions

View File

@ -908,7 +908,7 @@ parsefilelax(char *filename)
strcpy( name + size, ".lax" ); strcpy( name + size, ".lax" );
LAX = loadlax(name); LAX = loadlax(name);
if (!LAX) exit(1); if (!LAX) autexit(1);
} }

View File

@ -67,7 +67,7 @@ static int loc_pattern_matching(chain_list* expr, chain_list* pattern)
{ {
if (!expr || !pattern) { if (!expr || !pattern) {
fprintf(stderr,"loc_pattern_matching: NULL pointer\n"); fprintf(stderr,"loc_pattern_matching: NULL pointer\n");
exit(1); autexit(1);
} }
/*pattern is an atom*/ /*pattern is an atom*/
@ -122,7 +122,7 @@ extern int pattern_matching(chain_list* expr, chain_list* pattern)
if (!expr || !pattern) { if (!expr || !pattern) {
fprintf(stderr,"pattern_matching: NULL pointer\n"); fprintf(stderr,"pattern_matching: NULL pointer\n");
exit(1); autexit(1);
} }
if ( HTABLE == (authtable *)0 ) if ( HTABLE == (authtable *)0 )

View File

@ -95,7 +95,7 @@ extern chain_list* inv_oper(chain_list* abl, int negativ)
return abl; return abl;
default: default:
fprintf(stderr,"inv_oper: unknown operator %ld\n",ABL_OPER(abl)); fprintf(stderr,"inv_oper: unknown operator %ld\n",ABL_OPER(abl));
exit(1); autexit(1);
} }
for (chain=ABL_CDR(abl); chain; chain=ABL_CDR(chain)) { for (chain=ABL_CDR(abl); chain; chain=ABL_CDR(chain)) {
@ -148,7 +148,7 @@ extern chain_list* build_negativ(chain_list* abl)
case ABL_XOR: case ABL_NXOR: /*undifferent*/ break; case ABL_XOR: case ABL_NXOR: /*undifferent*/ break;
default: default:
fprintf(stderr,"inv_oper: oper %ld unknown\n",ABL_OPER(leaf)); fprintf(stderr,"inv_oper: oper %ld unknown\n",ABL_OPER(leaf));
exit(1); autexit(1);
} }
} }
@ -187,7 +187,7 @@ extern chain_list* build_negativ(chain_list* abl)
break; break;
default: default:
fprintf(stderr,"inv_oper: oper %ld unknown\n",ABL_OPER(leaf)); fprintf(stderr,"inv_oper: oper %ld unknown\n",ABL_OPER(leaf));
exit(1); autexit(1);
} }
} }
@ -205,7 +205,7 @@ extern chain_list* build_negativ(chain_list* abl)
break; break;
default: default:
fprintf(stderr,"inv_oper: oper %ld unknown\n",ABL_OPER(leaf)); fprintf(stderr,"inv_oper: oper %ld unknown\n",ABL_OPER(leaf));
exit(1); autexit(1);
} }
return abl; return abl;

View File

@ -105,7 +105,7 @@ extern void library_reader(char* cell_directory)
if (!cell_directory) { if (!cell_directory) {
fprintf(stderr,"library_reader: no Cell directory\n"); fprintf(stderr,"library_reader: no Cell directory\n");
exit(1); autexit(1);
} }
/*seek vbe files which describe the lib*/ /*seek vbe files which describe the lib*/
@ -115,7 +115,7 @@ extern void library_reader(char* cell_directory)
fprintf(stderr, fprintf(stderr,
"Library Error: no cell in directory '%s'\n", "Library Error: no cell in directory '%s'\n",
cell_directory?cell_directory:"."); cell_directory?cell_directory:".");
exit(1); autexit(1);
} }
/*search only in our library not to interfer with others*/ /*search only in our library not to interfer with others*/

View File

@ -213,7 +213,7 @@ extern double getgenericT(befig_list* befig, char* name)
else if (befig->BEBUS) output=befig->BEBUS->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME;
else { else {
fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME); fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME);
exit(1); autexit(1);
} }
memo=SEPAR; memo=SEPAR;
@ -261,7 +261,7 @@ extern double getgenericTh(befig_list* befig, char* name)
else if (befig->BEBUS) output=befig->BEBUS->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME;
else { else {
fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME); fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME);
exit(1); autexit(1);
} }
memo=SEPAR; memo=SEPAR;
@ -300,7 +300,7 @@ extern double getgenericTl(befig_list* befig, char* name)
else if (befig->BEBUS) output=befig->BEBUS->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME;
else { else {
fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME); fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME);
exit(1); autexit(1);
} }
memo=SEPAR; memo=SEPAR;
@ -336,7 +336,7 @@ extern void putgenericT(befig_list* befig, char* name, double Thl_value, double
else if (befig->BEBUS) output=befig->BEBUS->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME;
else { else {
fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME); fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME);
exit(1); autexit(1);
} }
memo=SEPAR; memo=SEPAR;
@ -420,7 +420,7 @@ extern int getgenericR(befig_list* befig, char* name)
else if (befig->BEBUS) output=befig->BEBUS->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME;
else { else {
fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME); fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME);
exit(1); autexit(1);
} }
memo=SEPAR; memo=SEPAR;
@ -456,7 +456,7 @@ extern void putgenericR(befig_list* befig, char* name, double Rup_value, double
else if (befig->BEBUS) output=befig->BEBUS->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME;
else { else {
fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME); fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME);
exit(1); autexit(1);
} }
memo=SEPAR; memo=SEPAR;
@ -490,7 +490,7 @@ extern int getgenericRup(befig_list* befig, char* name)
else if (befig->BEBUS) output=befig->BEBUS->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME;
else { else {
fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME); fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME);
exit(1); autexit(1);
} }
memo=SEPAR; memo=SEPAR;
@ -527,7 +527,7 @@ extern int getgenericRdown(befig_list* befig, char* name)
else if (befig->BEBUS) output=befig->BEBUS->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME;
else { else {
fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME); fprintf(stderr,"BEH: output is missing in %s\n",befig->NAME);
exit(1); autexit(1);
} }
memo=SEPAR; memo=SEPAR;

View File

@ -121,7 +121,7 @@ extern void moveport(port_list* head, port_list* new)
if (!head && !new) return; if (!head && !new) return;
if (!head || !new) { if (!head || !new) {
fprintf(stderr,"moveport: discrepancy in length\n"); fprintf(stderr,"moveport: discrepancy in length\n");
exit(1); autexit(1);
} }
moveport(head->NEXT,new->NEXT); moveport(head->NEXT,new->NEXT);
@ -179,14 +179,14 @@ static lofig_list* build_lofig(lofig_list* lofig, chain_list* nameorder)
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,lofig->NAME); locon->NAME,lofig->NAME);
exit(1); autexit(1);
} }
if (locon->NAME==name) break; if (locon->NAME==name) break;
} }
if (!locon) { if (!locon) {
fprintf(stderr,"build_lofig: no locon '%s' found in '%s'\n",name, fprintf(stderr,"build_lofig: no locon '%s' found in '%s'\n",name,
lofig->NAME); lofig->NAME);
exit(1); autexit(1);
} }
namechain=addchain(NULL,name); namechain=addchain(NULL,name);
@ -242,7 +242,7 @@ static cell_list* properties_addCell(befig_list* befig, lofig_list *lofig)
if (!locon) { if (!locon) {
fprintf(stderr,"properties_addCell: locon '%s' not found\n", fprintf(stderr,"properties_addCell: locon '%s' not found\n",
locon->NAME); locon->NAME);
exit(1); autexit(1);
} }
losig=locon->SIG; losig=locon->SIG;
@ -253,7 +253,7 @@ static cell_list* properties_addCell(befig_list* befig, lofig_list *lofig)
if (!locon) { if (!locon) {
fprintf(stderr,"properties_addCell: locon '%s' not found in cell\n", fprintf(stderr,"properties_addCell: locon '%s' not found in cell\n",
locon->NAME); locon->NAME);
exit(1); autexit(1);
} }
/*apply properties*/ /*apply properties*/

View File

@ -114,30 +114,30 @@ static void set_param(int argc, char* argv[])
if (optim_mode<=OPTIM_DELAY4) break; if (optim_mode<=OPTIM_DELAY4) break;
} }
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
case XSCH_MODE: case XSCH_MODE:
if (strlen(optarg)==1 && isdigit((int) optarg[0])) { if (strlen(optarg)==1 && isdigit((int) optarg[0])) {
xsch_mode=optarg[0]-'0'; xsch_mode=optarg[0]-'0';
if (xsch_mode<=XSCH_GRADIENT) break; if (xsch_mode<=XSCH_GRADIENT) break;
} }
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
case LAX_FILE: case LAX_FILE:
if (!lax_file) {lax_file=optarg; break;} if (!lax_file) {lax_file=optarg; break;}
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
case 1 : /*all the other parameters without options (Linux only)*/ case 1 : /*all the other parameters without options (Linux only)*/
if (!input_file || input_file==argv[i]) {input_file=optarg; break;} if (!input_file || input_file==argv[i]) {input_file=optarg; break;}
if (!output_file || output_file==argv[i]) {output_file=optarg; break;} if (!output_file || output_file==argv[i]) {output_file=optarg; break;}
if (!lax_file || lax_file==argv[i]) {lax_file=optarg; break;} if (!lax_file || lax_file==argv[i]) {lax_file=optarg; break;}
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
case HELP_MODE: case HELP_MODE:
fprintf(stdout,HELP_USAGE "\n"); fprintf(stdout,HELP_USAGE "\n");
exit(0); autexit(0);
case '?': default: case '?': default:
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
} }
} }
#endif #endif
@ -145,12 +145,12 @@ static void set_param(int argc, char* argv[])
/*verify for Sun and Solaris. getopt() isn't the same than Linux_elf */ /*verify for Sun and Solaris. getopt() isn't the same than Linux_elf */
for (i=1; i<argc; i++) { for (i=1; i<argc; i++) {
if (!strcmp(argv[i],"-o")) {overwrite_mode=1; continue;} if (!strcmp(argv[i],"-o")) {overwrite_mode=1; continue;}
if (!strcmp(argv[i],"-h")) {fprintf(stdout,HELP_USAGE "\n"); exit(0);} if (!strcmp(argv[i],"-h")) {fprintf(stdout,HELP_USAGE "\n"); autexit(0);}
/*take option and argument*/ /*take option and argument*/
if (!strcmp(argv[i],"-l")) { if (!strcmp(argv[i],"-l")) {
if (++i<argc) {lax_file=argv[i]; continue;} if (++i<argc) {lax_file=argv[i]; continue;}
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
} }
if (!strcmp(argv[i],"-x")) { if (!strcmp(argv[i],"-x")) {
if (++i<argc && strlen(argv[i])==1 && isdigit((int) argv[i][0])) { if (++i<argc && strlen(argv[i])==1 && isdigit((int) argv[i][0])) {
@ -158,7 +158,7 @@ static void set_param(int argc, char* argv[])
if (xsch_mode<=XSCH_GRADIENT) continue; if (xsch_mode<=XSCH_GRADIENT) continue;
} }
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
} }
if (!strcmp(argv[i],"-m")) { if (!strcmp(argv[i],"-m")) {
if (++i<argc && strlen(argv[i])==1 && isdigit((int) argv[i][0])) { if (++i<argc && strlen(argv[i])==1 && isdigit((int) argv[i][0])) {
@ -166,7 +166,7 @@ static void set_param(int argc, char* argv[])
if (optim_mode<=OPTIM_DELAY4) continue; if (optim_mode<=OPTIM_DELAY4) continue;
} }
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
} }
} }
@ -182,7 +182,7 @@ static void set_param(int argc, char* argv[])
if (!output_file || output_file==argv[i]) {output_file=argv[i]; continue;} if (!output_file || output_file==argv[i]) {output_file=argv[i]; continue;}
if (!lax_file || lax_file==argv[i]) {lax_file=argv[i]; continue;} if (!lax_file || lax_file==argv[i]) {lax_file=argv[i]; continue;}
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
} }
@ -192,14 +192,14 @@ static void set_param(int argc, char* argv[])
else { else {
fprintf(stderr, fprintf(stderr,
"Environment Error: no 'MBK_IN_LO' defined for <input_file> extension\n"); "Environment Error: no 'MBK_IN_LO' defined for <input_file> extension\n");
exit(1); autexit(1);
} }
mbk_out_lo=mbkgetenv ("MBK_OUT_LO"); mbk_out_lo=mbkgetenv ("MBK_OUT_LO");
if (mbk_out_lo) fprintf(stdout,"\tMBK_OUT_LO\t: %s\n",mbk_out_lo); if (mbk_out_lo) fprintf(stdout,"\tMBK_OUT_LO\t: %s\n",mbk_out_lo);
else { else {
fprintf(stderr, fprintf(stderr,
"Environment Error: no 'MBK_OUT_LO' defined for <output_file> extension\n"); "Environment Error: no 'MBK_OUT_LO' defined for <output_file> extension\n");
exit(1); autexit(1);
} }
/*if no library defined*/ /*if no library defined*/
@ -208,27 +208,27 @@ static void set_param(int argc, char* argv[])
else { else {
fprintf(stderr, fprintf(stderr,
"Environment Error: no 'MBK_TARGET_LIB' defined for cells directory\n"); "Environment Error: no 'MBK_TARGET_LIB' defined for cells directory\n");
exit(1); autexit(1);
} }
/*coherence in options*/ /*coherence in options*/
if (!input_file) { if (!input_file) {
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
} }
if (!output_file) { if (!output_file) {
if (overwrite_mode) output_file=input_file; if (overwrite_mode) output_file=input_file;
else { else {
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
} }
} }
if (!strcmp(output_file,input_file) && !strcmp(mbk_in_lo,mbk_out_lo) && !overwrite_mode) { if (!strcmp(output_file,input_file) && !strcmp(mbk_in_lo,mbk_out_lo) && !overwrite_mode) {
fprintf(stderr,"<output_file> must be different from <input_file>\n"); fprintf(stderr,"<output_file> must be different from <input_file>\n");
fprintf(stderr,OPT_USAGE "\n"); fprintf(stderr,OPT_USAGE "\n");
exit(1); autexit(1);
} }
/*take default values*/ /*take default values*/
@ -248,8 +248,8 @@ extern int main (int argc, char* argv[])
/*init*/ /*init*/
mbkenv(); /*mbk*/ mbkenv(); /*mbk*/
ablenv(); /*abl*/
autenv(); /*hash table*/ autenv(); /*hash table*/
ablenv(); /*abl*/
bddenv(); /*for vhdlloadbefig() in library reader*/ bddenv(); /*for vhdlloadbefig() in library reader*/
@ -280,7 +280,7 @@ extern int main (int argc, char* argv[])
case OPTIM_DELAY3: case OPTIM_DELAY3:
fprintf(stdout,"25%% area - 75%% delay optimization\n"); break; fprintf(stdout,"25%% area - 75%% delay optimization\n"); break;
case OPTIM_DELAY4: fprintf(stdout,"100%% delay optimization\n"); break; case OPTIM_DELAY4: fprintf(stdout,"100%% delay optimization\n"); break;
default: fprintf(stderr,"LAX: Optimization mode greater than 4\n"); exit(1); default: fprintf(stderr,"LAX: Optimization mode greater than 4\n"); autexit(1);
} }
@ -289,7 +289,7 @@ extern int main (int argc, char* argv[])
lofig=getlofig(input_file, 'A'/*all the figure*/); lofig=getlofig(input_file, 'A'/*all the figure*/);
if (!lofig) { if (!lofig) {
fprintf(stderr,"Cannot find '%s.%s'\n",input_file,mbk_in_lo); fprintf(stderr,"Cannot find '%s.%s'\n",input_file,mbk_in_lo);
exit(1); autexit(1);
} }
/*flatten all instance at cells level*/ /*flatten all instance at cells level*/
rflattenlofig(lofig, YES, YES); rflattenlofig(lofig, YES, YES);
@ -298,7 +298,7 @@ extern int main (int argc, char* argv[])
/*check coherence between LAX and lofig*/ /*check coherence between LAX and lofig*/
if (lax_file) { if (lax_file) {
fprintf(stdout,"Controlling file '%s.lax'...\n",lax_file); fprintf(stdout,"Controlling file '%s.lax'...\n",lax_file);
if (!coherencelaxlofig(lofig)) exit(1); if (!coherencelaxlofig(lofig)) autexit(1);
} }
/*read cell library*/ /*read cell library*/
@ -310,7 +310,7 @@ extern int main (int argc, char* argv[])
fprintf(stdout,"Capacitances on file '%s.%s'...\n",input_file,mbk_in_lo); fprintf(stdout,"Capacitances on file '%s.%s'...\n",input_file,mbk_in_lo);
if (!lofig->LOINS || !lofig->LOSIG) { if (!lofig->LOINS || !lofig->LOSIG) {
fprintf(stderr,"Figure '%s' is empty!\n",lofig->NAME); fprintf(stderr,"Figure '%s' is empty!\n",lofig->NAME);
exit(1); autexit(1);
} }
/*prepare source*/ /*prepare source*/
@ -418,7 +418,7 @@ extern int main (int argc, char* argv[])
losig=long_path->DATA; losig=long_path->DATA;
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"main: no name on signal\n"); fprintf(stderr,"main: no name on signal\n");
exit(1); autexit(1);
} }
fprintf(stdout,"Critical path (no warranty)...%ld ps from '%s' to ", fprintf(stdout,"Critical path (no warranty)...%ld ps from '%s' to ",
(long) critical_delay(lofig),(char*) losig->NAMECHAIN->DATA); (long) critical_delay(lofig),(char*) losig->NAMECHAIN->DATA);
@ -428,7 +428,7 @@ extern int main (int argc, char* argv[])
losig=(losig_list*) ptype->DATA; losig=(losig_list*) ptype->DATA;
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"main: no name on signal\n"); fprintf(stderr,"main: no name on signal\n");
exit(1); autexit(1);
} }
if (losig->TYPE==EXTERNAL) { if (losig->TYPE==EXTERNAL) {
fprintf(stdout,"'%s'\n",(char*) losig->NAMECHAIN->DATA); fprintf(stdout,"'%s'\n",(char*) losig->NAMECHAIN->DATA);
@ -477,7 +477,7 @@ extern int main (int argc, char* argv[])
xsch_stream=mbkfopen(xsch_file,"xsc",WRITE_TEXT); xsch_stream=mbkfopen(xsch_file,"xsc",WRITE_TEXT);
if (!xsch_stream){ if (!xsch_stream){
fprintf(stderr,"Cannot save file %s.xsc\n",xsch_file); fprintf(stderr,"Cannot save file %s.xsc\n",xsch_file);
exit(1); autexit(1);
} }
/*replace losig by names*/ /*replace losig by names*/
for (ptype=long_path; ptype; ptype=ptype->NEXT) { for (ptype=long_path; ptype; ptype=ptype->NEXT) {
@ -492,6 +492,6 @@ extern int main (int argc, char* argv[])
fprintf(stdout,"End of %s...\n\n",LOON); fprintf(stdout,"End of %s...\n\n",LOON);
exit(0); return(0);
} }

View File

@ -334,7 +334,7 @@ static int abl_dispatching(chain_list *abl, int mark)
if (!abl) { if (!abl) {
fprintf(stderr,"abl_dispatching: NULL pointer\n"); fprintf(stderr,"abl_dispatching: NULL pointer\n");
exit(1); autexit(1);
} }
if (ABL_ATOM(abl)) { /*it is a leaf*/ if (ABL_ATOM(abl)) { /*it is a leaf*/
@ -473,7 +473,7 @@ static int abl_dispatching(chain_list *abl, int mark)
/*error: leaf not found*/ /*error: leaf not found*/
fprintf(stderr,"abl_dispatching: %s not found\n",ABL_ATOM_VALUE(abl)); fprintf(stderr,"abl_dispatching: %s not found\n",ABL_ATOM_VALUE(abl));
exit(1); autexit(1);
} }
/*it is an operator*/ /*it is an operator*/
@ -548,7 +548,7 @@ extern int DAG_control(befig_list *befig_param)
if (!befig_param) { if (!befig_param) {
fprintf(stderr,"DAG_control: NULL pointer\n"); fprintf(stderr,"DAG_control: NULL pointer\n");
exit(1); autexit(1);
} }
befig=befig_param; befig=befig_param;

View File

@ -102,7 +102,7 @@ extern void display_error_in_abl(char* message, chain_list *abl)
{ {
if (!message || !abl) { if (!message || !abl) {
fprintf(stderr,"display_error_in_abl: NULL pointer\n"); fprintf(stderr,"display_error_in_abl: NULL pointer\n");
exit(1); autexit(1);
} }
fprintf(stderr,"BEH: "); fprintf(stderr,"BEH: ");

View File

@ -108,7 +108,7 @@ static int loc_format_register(bereg_list* bereg)
if (!bereg || !bereg->BIABL) { if (!bereg || !bereg->BIABL) {
fprintf(stderr,"identify_register: NULL pointer\n"); fprintf(stderr,"identify_register: NULL pointer\n");
exit(1); autexit(1);
} }
#if 0 /*to accept multiple condition block*/ #if 0 /*to accept multiple condition block*/
@ -212,7 +212,7 @@ extern int format_register(befig_list* befig)
if (!befig) { if (!befig) {
fprintf(stderr,"format_register: NULL pointer\n"); fprintf(stderr,"format_register: NULL pointer\n");
exit(1); autexit(1);
} }
BEH_ERROR=0; BEH_ERROR=0;

View File

@ -186,7 +186,7 @@ static void flattenablexpr(chain_list* abl)
default: default:
fprintf(stderr,"unflattenexprabl: operator %ld unknown\n", fprintf(stderr,"unflattenexprabl: operator %ld unknown\n",
ABL_OPER(abl)); ABL_OPER(abl));
exit(1); autexit(1);
} }
pred=chain; pred=chain;
} }

View File

@ -59,7 +59,7 @@ static ptype_list* sort_capa(ptype_list* capa)
losig=(losig_list*) capa->DATA; losig=(losig_list*) capa->DATA;
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"sort_capa: no name on signal\n"); fprintf(stderr,"sort_capa: no name on signal\n");
exit(1); autexit(1);
} }
best_C=getcapacitance(losig->NAMECHAIN->DATA); best_C=getcapacitance(losig->NAMECHAIN->DATA);
pred=capa; pred=capa;
@ -69,7 +69,7 @@ static ptype_list* sort_capa(ptype_list* capa)
losig=(losig_list*) ptype->DATA; losig=(losig_list*) ptype->DATA;
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"sort_capa: no name on signal\n"); fprintf(stderr,"sort_capa: no name on signal\n");
exit(1); autexit(1);
} }
C=getcapacitance((char*) losig->NAMECHAIN->DATA); C=getcapacitance((char*) losig->NAMECHAIN->DATA);
if (C>best_C) { if (C>best_C) {
@ -105,12 +105,12 @@ static int change_instance(loins_list* loins, losig_list* losig, lofig_list* lof
best=getCell(loins->FIGNAME); best=getCell(loins->FIGNAME);
if (!best || best->NAME!=loins->FIGNAME) { if (!best || best->NAME!=loins->FIGNAME) {
fprintf(stderr,"library error: no cell '%s.vbe' found\n",loins->FIGNAME); fprintf(stderr,"library error: no cell '%s.vbe' found\n",loins->FIGNAME);
exit(1); autexit(1);
} }
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"change_instance: no name on signal\n"); fprintf(stderr,"change_instance: no name on signal\n");
exit(1); autexit(1);
} }
best_critical=critical_delay(lofig); best_critical=critical_delay(lofig);
@ -157,7 +157,7 @@ static int change_instance(loins_list* loins, losig_list* losig, lofig_list* lof
fprintf(stderr, fprintf(stderr,
"change_instance: compute error %f!=%f ps %f!=%f ps (%sdue to caller)\n", "change_instance: compute error %f!=%f ps %f!=%f ps (%sdue to caller)\n",
critical,best_critical,delay,best_delay,change?"not ":""); critical,best_critical,delay,best_delay,change?"not ":"");
exit(1); autexit(1);
} }
@ -177,7 +177,7 @@ static int change_instance(loins_list* loins, losig_list* losig, lofig_list* lof
if (!locon_aux) { if (!locon_aux) {
fprintf(stderr,"change_instance: locon '%s' not found\n", fprintf(stderr,"change_instance: locon '%s' not found\n",
locon->NAME); locon->NAME);
exit(1); autexit(1);
} }
losig_aux=locon_aux->SIG; losig_aux=locon_aux->SIG;
/*search real connection*/ /*search real connection*/
@ -188,7 +188,7 @@ static int change_instance(loins_list* loins, losig_list* losig, lofig_list* lof
if (!locon_aux) { if (!locon_aux) {
fprintf(stderr,"change_instance: locon '%s' not found in cell\n", fprintf(stderr,"change_instance: locon '%s' not found in cell\n",
locon->NAME); locon->NAME);
exit(1); autexit(1);
} }
locon->NAME=locon_aux->NAME; locon->NAME=locon_aux->NAME;
} }
@ -204,7 +204,7 @@ static int change_instance(loins_list* loins, losig_list* losig, lofig_list* lof
fprintf(stderr, fprintf(stderr,
"change_instance: flatten error %f!=%f ps %f!=%f ps\n", "change_instance: flatten error %f!=%f ps %f!=%f ps\n",
critical,best_critical,delay,best_delay); critical,best_critical,delay,best_delay);
exit(1); autexit(1);
} }
} /*end of change loins*/ } /*end of change loins*/
@ -240,7 +240,7 @@ extern void improve_capa_critical_path(lofig_list* lofig, int optim_level)
losig=(losig_list*) ptype->DATA; losig=(losig_list*) ptype->DATA;
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"improve_capa_critical_path: no name on signal\n"); fprintf(stderr,"improve_capa_critical_path: no name on signal\n");
exit(1); autexit(1);
} }
/*seek latest driver*/ /*seek latest driver*/
ptype2=getptype(losig->USER,LOFIGCHAIN); ptype2=getptype(losig->USER,LOFIGCHAIN);
@ -248,7 +248,7 @@ extern void improve_capa_critical_path(lofig_list* lofig, int optim_level)
fprintf(stderr, fprintf(stderr,
"improve_capa_critical_path: no lofigchain on losig '%s'\n", "improve_capa_critical_path: no lofigchain on losig '%s'\n",
(char*) losig->NAMECHAIN->DATA); (char*) losig->NAMECHAIN->DATA);
exit(1); autexit(1);
} }
loins=NULL; loins=NULL;
for (lofigchain=ptype2->DATA; lofigchain; lofigchain=lofigchain->NEXT){ for (lofigchain=ptype2->DATA; lofigchain; lofigchain=lofigchain->NEXT){
@ -256,7 +256,7 @@ extern void improve_capa_critical_path(lofig_list* lofig, int optim_level)
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' isn't accepted\n",
locon->NAME); locon->NAME);
exit(1); autexit(1);
} }
if (locon->TYPE==EXTERNAL || locon->DIRECTION==IN) continue; if (locon->TYPE==EXTERNAL || locon->DIRECTION==IN) continue;
loins=locon->ROOT; loins=locon->ROOT;
@ -290,7 +290,7 @@ extern void improve_RC_circuit(lofig_list* lofig, int optim_level)
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,loins->INSNAME); locon->NAME,loins->INSNAME);
exit(1); autexit(1);
} }
if (isvdd(locon->NAME) || isvss(locon->NAME)) continue; if (isvdd(locon->NAME) || isvss(locon->NAME)) continue;
if (locon->DIRECTION!=IN) break; if (locon->DIRECTION!=IN) break;
@ -298,7 +298,7 @@ extern void improve_RC_circuit(lofig_list* lofig, int optim_level)
if (!locon) { if (!locon) {
fprintf(stderr,"improve_RC_circuit: no output found for '%s'\n", fprintf(stderr,"improve_RC_circuit: no output found for '%s'\n",
loins->FIGNAME); loins->FIGNAME);
exit(1); autexit(1);
} }
losig=locon->SIG; losig=locon->SIG;
change_instance(loins, losig, lofig, optim_level); change_instance(loins, losig, lofig, optim_level);
@ -336,7 +336,7 @@ static int insert_buffer(losig_list* losig, lofig_list* lofig, int optim_level,
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"insert_buffer: no name on signal\n"); fprintf(stderr,"insert_buffer: no name on signal\n");
exit(1); autexit(1);
} }
best_delay=critical_delay(lofig); best_delay=critical_delay(lofig);
@ -361,7 +361,7 @@ static int insert_buffer(losig_list* losig, lofig_list* lofig, int optim_level,
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,model->NAME); locon->NAME,model->NAME);
exit(1); autexit(1);
} }
if (isvdd(locon->NAME)) losig_aux=losig_vdd; if (isvdd(locon->NAME)) losig_aux=losig_vdd;
else if (isvss(locon->NAME)) losig_aux=losig_vss; else if (isvss(locon->NAME)) losig_aux=losig_vss;
@ -369,7 +369,7 @@ static int insert_buffer(losig_list* losig, lofig_list* lofig, int optim_level,
else if (locon->DIRECTION==IN) losig_aux=losig; else if (locon->DIRECTION==IN) losig_aux=losig;
else { else {
fprintf(stderr,"insert_buffer: buffer port '%s' unknown\n",locon->NAME); fprintf(stderr,"insert_buffer: buffer port '%s' unknown\n",locon->NAME);
exit(1); autexit(1);
} }
sigchain=addchain(sigchain,losig_aux); sigchain=addchain(sigchain,losig_aux);
} }
@ -388,7 +388,7 @@ static int insert_buffer(losig_list* losig, lofig_list* lofig, int optim_level,
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,loins_buf->INSNAME); locon->NAME,loins_buf->INSNAME);
exit(1); autexit(1);
} }
if (isvdd(locon->NAME)) losig_aux=losig_vdd; if (isvdd(locon->NAME)) losig_aux=losig_vdd;
else if (isvss(locon->NAME)) losig_aux=losig_vss; else if (isvss(locon->NAME)) losig_aux=losig_vss;
@ -396,7 +396,7 @@ static int insert_buffer(losig_list* losig, lofig_list* lofig, int optim_level,
else if (locon->DIRECTION==IN) losig_aux=losig; else if (locon->DIRECTION==IN) losig_aux=losig;
else { else {
fprintf(stderr,"insert_buffer: buffer port '%s' unknown\n",locon->NAME); fprintf(stderr,"insert_buffer: buffer port '%s' unknown\n",locon->NAME);
exit(1); autexit(1);
} }
ptype=getptype(losig_aux->USER,LOFIGCHAIN); ptype=getptype(losig_aux->USER,LOFIGCHAIN);
if (!ptype) losig_aux->USER=addptype(losig_aux->USER,LOFIGCHAIN,addchain(NULL,locon)); if (!ptype) losig_aux->USER=addptype(losig_aux->USER,LOFIGCHAIN,addchain(NULL,locon));
@ -408,7 +408,7 @@ static int insert_buffer(losig_list* losig, lofig_list* lofig, int optim_level,
buffer_ptype=getptype(losig_buf->USER,LOFIGCHAIN); buffer_ptype=getptype(losig_buf->USER,LOFIGCHAIN);
if (!ptype || !buffer_ptype) { if (!ptype || !buffer_ptype) {
fprintf(stderr,"insert_buffer: LOFIGCHAIN not found\n"); fprintf(stderr,"insert_buffer: LOFIGCHAIN not found\n");
exit(1); autexit(1);
} }
for (lofigchain=((chain_list*)ptype->DATA)->NEXT/*first is entry of buffer*/; for (lofigchain=((chain_list*)ptype->DATA)->NEXT/*first is entry of buffer*/;
@ -417,7 +417,7 @@ static int insert_buffer(losig_list* losig, lofig_list* lofig, int optim_level,
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' isn't accepted\n",
locon->NAME); locon->NAME);
exit(1); autexit(1);
} }
/*do not move drivers and port of circuit*/ /*do not move drivers and port of circuit*/
if (locon->TYPE==EXTERNAL || locon->DIRECTION!=IN) { if (locon->TYPE==EXTERNAL || locon->DIRECTION!=IN) {
@ -449,7 +449,7 @@ static int insert_buffer(losig_list* losig, lofig_list* lofig, int optim_level,
ptype=getptype(losig->USER,LOFIGCHAIN); ptype=getptype(losig->USER,LOFIGCHAIN);
if (!buffer_ptype || !buffer_ptype->DATA) { if (!buffer_ptype || !buffer_ptype->DATA) {
fprintf(stderr,"insert_buffer: LOFIGCHAIN is empty\n"); fprintf(stderr,"insert_buffer: LOFIGCHAIN is empty\n");
exit(1); autexit(1);
} }
/*put critical path before buffer*/ /*put critical path before buffer*/
@ -564,7 +564,7 @@ static int insert_buffer(losig_list* losig, lofig_list* lofig, int optim_level,
fprintf(stderr, fprintf(stderr,
"insert_buffer: compute error %e!=%e fF %f!=%f ps %f!=%f ps\n", "insert_buffer: compute error %e!=%e fF %f!=%f ps %f!=%f ps\n",
capa,init_capa,delay,best_delay, init_delay, getdelay(losig->NAMECHAIN->DATA)); capa,init_capa,delay,best_delay, init_delay, getdelay(losig->NAMECHAIN->DATA));
exit(1); autexit(1);
} }
} }

View File

@ -74,7 +74,7 @@ extern ptype_list* count_instance(lofig_list* lofig)
if (!lofig) { if (!lofig) {
fprintf(stderr,"count_instance: NULL pointer\n"); fprintf(stderr,"count_instance: NULL pointer\n");
exit(1); autexit(1);
} }
NUM_INS=0; NUM_INS=0;
@ -133,7 +133,7 @@ extern ptype_list* percent_instance(ptype_list* model_list)
cell=getCell((char*)ptype->DATA); cell=getCell((char*)ptype->DATA);
if (!cell) { if (!cell) {
fprintf(stderr,"Library Error: cell '%s' not found\n",cell->NAME); fprintf(stderr,"Library Error: cell '%s' not found\n",cell->NAME);
exit(1); autexit(1);
} }
inst=addptype(inst,cell->AREA*ptype->TYPE,ptype->DATA); inst=addptype(inst,cell->AREA*ptype->TYPE,ptype->DATA);
AREA+=cell->AREA*ptype->TYPE; AREA+=cell->AREA*ptype->TYPE;
@ -166,7 +166,7 @@ extern double getmaxRC(lofig_list* lofig)
losig=locon->SIG; losig=locon->SIG;
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"getmaxRC: no name on signal\n"); fprintf(stderr,"getmaxRC: no name on signal\n");
exit(1); autexit(1);
} }
t=loins_max_RC(loins,losig->NAMECHAIN->DATA); t=loins_max_RC(loins,losig->NAMECHAIN->DATA);
if (t>RC) RC=t; if (t>RC) RC=t;

View File

@ -62,7 +62,7 @@ extern losig_list* critical_output(lofig_list* lofig)
for (losig=lofig->LOSIG; losig; losig=losig->NEXT) { for (losig=lofig->LOSIG; losig; losig=losig->NEXT) {
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"critical_output: no losig name\n"); fprintf(stderr,"critical_output: no losig name\n");
exit(1); autexit(1);
} }
signame=losig->NAMECHAIN->DATA; signame=losig->NAMECHAIN->DATA;
if (losig->TYPE==EXTERNAL) delay=getdelay(output_name(signame)); if (losig->TYPE==EXTERNAL) delay=getdelay(output_name(signame));
@ -89,7 +89,7 @@ extern double critical_delay(lofig_list* lofig)
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"critical_delay: no losig name\n"); fprintf(stderr,"critical_delay: no losig name\n");
exit(1); autexit(1);
} }
signame=losig->NAMECHAIN->DATA; signame=losig->NAMECHAIN->DATA;
@ -119,12 +119,12 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include)
if (!losig) { if (!losig) {
fprintf(stderr,"search_long_path: NULL pointer\n"); fprintf(stderr,"search_long_path: NULL pointer\n");
exit(1); autexit(1);
} }
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"search_long_path: no losig name\n"); fprintf(stderr,"search_long_path: no losig name\n");
exit(1); autexit(1);
} }
signame=(char*) losig->NAMECHAIN->DATA; signame=(char*) losig->NAMECHAIN->DATA;
@ -144,7 +144,7 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include)
ptype=getptype(losig->USER,LOFIGCHAIN); ptype=getptype(losig->USER,LOFIGCHAIN);
if (!ptype || !ptype->DATA) { if (!ptype || !ptype->DATA) {
fprintf(stderr,"search_long_path: no lofigchain found\n"); fprintf(stderr,"search_long_path: no lofigchain found\n");
exit(1); autexit(1);
} }
for (lofigchain=(chain_list*) ptype->DATA; lofigchain; lofigchain=lofigchain->NEXT) { for (lofigchain=(chain_list*) ptype->DATA; lofigchain; lofigchain=lofigchain->NEXT) {
@ -152,7 +152,7 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include)
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' isn't accepted\n",
locon->NAME); locon->NAME);
exit(1); autexit(1);
} }
/*only outputs*/ /*only outputs*/
if (isvss(locon->NAME) || isvdd(locon->NAME) if (isvss(locon->NAME) || isvdd(locon->NAME)
@ -175,7 +175,7 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include)
if (!cell) { if (!cell) {
fprintf(stderr,"library error: no cell '%s.vbe' found\n", fprintf(stderr,"library error: no cell '%s.vbe' found\n",
loins->FIGNAME); loins->FIGNAME);
exit(1); autexit(1);
} }
befig=cell->BEFIG; befig=cell->BEFIG;
if (befig->BEREG) { if (befig->BEREG) {
@ -198,7 +198,7 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include)
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,loins->FIGNAME); locon->NAME,loins->FIGNAME);
exit(1); autexit(1);
} }
/*only inputs*/ /*only inputs*/
if (locon->DIRECTION==OUT || locon->DIRECTION==TRISTATE if (locon->DIRECTION==OUT || locon->DIRECTION==TRISTATE
@ -208,7 +208,7 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include)
losig=locon->SIG; losig=locon->SIG;
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"search_long_path: no name on signal\n"); fprintf(stderr,"search_long_path: no name on signal\n");
exit(1); autexit(1);
} }
signame=(char*) losig->NAMECHAIN->DATA; signame=(char*) losig->NAMECHAIN->DATA;
delay=getdelay(signame); delay=getdelay(signame);

View File

@ -57,14 +57,14 @@ extern void loins_capacitance(loins_list* loins, int increment)
if (!cell) { if (!cell) {
fprintf(stderr,"library error: no model '%s.vbe' found\n", fprintf(stderr,"library error: no model '%s.vbe' found\n",
loins->FIGNAME); loins->FIGNAME);
exit(1); autexit(1);
} }
for (locon=loins->LOCON; locon; locon=locon->NEXT) { for (locon=loins->LOCON; locon; locon=locon->NEXT) {
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,loins->INSNAME); locon->NAME,loins->INSNAME);
exit(1); autexit(1);
} }
/*seek port which match with netlist*/ /*seek port which match with netlist*/
for (port=cell->PORT; port; port=port->NEXT) { for (port=cell->PORT; port; port=port->NEXT) {
@ -74,13 +74,13 @@ extern void loins_capacitance(loins_list* loins, int increment)
fprintf(stderr, fprintf(stderr,
"loins_capacitance: connector discrepancy between '%s' and '%s'\n", "loins_capacitance: connector discrepancy between '%s' and '%s'\n",
cell->NAME,loins->FIGNAME); cell->NAME,loins->FIGNAME);
exit(1); autexit(1);
} }
losig=locon->SIG; losig=locon->SIG;
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"loins_capacitance: no losig name\n"); fprintf(stderr,"loins_capacitance: no losig name\n");
exit(1); autexit(1);
} }
signame=losig->NAMECHAIN->DATA; signame=losig->NAMECHAIN->DATA;
if (!isvdd(locon->NAME) && !isvss(locon->NAME) if (!isvdd(locon->NAME) && !isvss(locon->NAME)
@ -108,7 +108,7 @@ extern double loins_max_T(loins_list* loins)
if (!loins) { if (!loins) {
fprintf(stderr,"loins_max_T: NULL pointer\n"); fprintf(stderr,"loins_max_T: NULL pointer\n");
exit(1); autexit(1);
} }
/*cell properties*/ /*cell properties*/
@ -116,7 +116,7 @@ extern double loins_max_T(loins_list* loins)
if (!cell) { if (!cell) {
fprintf(stderr,"library error: no cell '%s.vbe' found\n", fprintf(stderr,"library error: no cell '%s.vbe' found\n",
loins->FIGNAME); loins->FIGNAME);
exit(1); autexit(1);
} }
/*is-it a flip-flop?*/ /*is-it a flip-flop?*/
@ -138,7 +138,7 @@ extern double loins_max_T(loins_list* loins)
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,loins->INSNAME); locon->NAME,loins->INSNAME);
exit(1); autexit(1);
} }
/*eval delay on input dependancy*/ /*eval delay on input dependancy*/
if (isvdd(locon->NAME) || isvss(locon->NAME)) continue; if (isvdd(locon->NAME) || isvss(locon->NAME)) continue;
@ -154,12 +154,12 @@ extern double loins_max_T(loins_list* loins)
fprintf(stderr, fprintf(stderr,
"loins_max_T: connector discrepancy between '%s' and '%s'\n", "loins_max_T: connector discrepancy between '%s' and '%s'\n",
cell->NAME,loins->FIGNAME); cell->NAME,loins->FIGNAME);
exit(1); autexit(1);
} }
if (!locon->SIG->NAMECHAIN) { if (!locon->SIG->NAMECHAIN) {
fprintf(stderr,"loins_max_T: no losig name\n"); fprintf(stderr,"loins_max_T: no losig name\n");
exit(1); autexit(1);
} }
input=(char*) locon->SIG->NAMECHAIN->DATA; input=(char*) locon->SIG->NAMECHAIN->DATA;
@ -189,7 +189,7 @@ extern double loins_max_RC(loins_list* loins, char* output)
if (!loins || !output) { if (!loins || !output) {
fprintf(stderr,"loins_max_RC: NULL pointer\n"); fprintf(stderr,"loins_max_RC: NULL pointer\n");
exit(1); autexit(1);
} }
/*cell properties*/ /*cell properties*/
@ -197,7 +197,7 @@ extern double loins_max_RC(loins_list* loins, char* output)
if (!cell) { if (!cell) {
fprintf(stderr,"library error: no cell '%s.vbe' found\n", fprintf(stderr,"library error: no cell '%s.vbe' found\n",
loins->FIGNAME); loins->FIGNAME);
exit(1); autexit(1);
} }
/*is-it a flip-flop?*/ /*is-it a flip-flop?*/
@ -219,7 +219,7 @@ extern double loins_max_RC(loins_list* loins, char* output)
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,loins->INSNAME); locon->NAME,loins->INSNAME);
exit(1); autexit(1);
} }
/*eval delay on input dependancy*/ /*eval delay on input dependancy*/
if (isvdd(locon->NAME) || isvss(locon->NAME)) continue; if (isvdd(locon->NAME) || isvss(locon->NAME)) continue;
@ -235,12 +235,12 @@ extern double loins_max_RC(loins_list* loins, char* output)
fprintf(stderr, fprintf(stderr,
"loins_max_RC: connector discrepancy between '%s' and '%s'\n", "loins_max_RC: connector discrepancy between '%s' and '%s'\n",
cell->NAME,loins->FIGNAME); cell->NAME,loins->FIGNAME);
exit(1); autexit(1);
} }
if (!locon->SIG->NAMECHAIN) { if (!locon->SIG->NAMECHAIN) {
fprintf(stderr,"loins_max_RC: no losig name\n"); fprintf(stderr,"loins_max_RC: no losig name\n");
exit(1); autexit(1);
} }
input=(char*) locon->SIG->NAMECHAIN->DATA; input=(char*) locon->SIG->NAMECHAIN->DATA;
@ -270,7 +270,7 @@ extern double loins_delay(loins_list* loins, char* output)
if (!loins || !output) { if (!loins || !output) {
fprintf(stderr,"loins_delay: NULL pointer\n"); fprintf(stderr,"loins_delay: NULL pointer\n");
exit(1); autexit(1);
} }
/*cell properties*/ /*cell properties*/
@ -278,7 +278,7 @@ extern double loins_delay(loins_list* loins, char* output)
if (!cell) { if (!cell) {
fprintf(stderr,"library error: no cell '%s.vbe' found\n", fprintf(stderr,"library error: no cell '%s.vbe' found\n",
loins->FIGNAME); loins->FIGNAME);
exit(1); autexit(1);
} }
/*is-it a flip-flop?*/ /*is-it a flip-flop?*/
@ -300,7 +300,7 @@ extern double loins_delay(loins_list* loins, char* output)
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,loins->INSNAME); locon->NAME,loins->INSNAME);
exit(1); autexit(1);
} }
/*eval delay on input dependancy*/ /*eval delay on input dependancy*/
if (isvdd(locon->NAME) || isvss(locon->NAME)) continue; if (isvdd(locon->NAME) || isvss(locon->NAME)) continue;
@ -316,16 +316,16 @@ extern double loins_delay(loins_list* loins, char* output)
fprintf(stderr, fprintf(stderr,
"loins_delay: connector discrepancy between '%s' and '%s'\n", "loins_delay: connector discrepancy between '%s' and '%s'\n",
cell->NAME,loins->FIGNAME); cell->NAME,loins->FIGNAME);
exit(1); autexit(1);
} }
if (!locon->SIG) { if (!locon->SIG) {
fprintf(stderr,"loins_delay: no losig\n"); fprintf(stderr,"loins_delay: no losig\n");
exit(1); autexit(1);
} }
if (!locon->SIG->NAMECHAIN) { if (!locon->SIG->NAMECHAIN) {
fprintf(stderr,"loins_delay: no losig name\n"); fprintf(stderr,"loins_delay: no losig name\n");
exit(1); autexit(1);
} }
input=(char*) locon->SIG->NAMECHAIN->DATA; input=(char*) locon->SIG->NAMECHAIN->DATA;
@ -352,12 +352,12 @@ extern double losig_delay(losig_list* losig)
if (!losig) { if (!losig) {
fprintf(stderr,"losig_delay: NULL pointer\n"); fprintf(stderr,"losig_delay: NULL pointer\n");
exit(1); autexit(1);
} }
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"losig_delay: no losig name\n"); fprintf(stderr,"losig_delay: no losig name\n");
exit(1); autexit(1);
} }
signame=losig->NAMECHAIN->DATA; signame=losig->NAMECHAIN->DATA;
@ -365,7 +365,7 @@ extern double losig_delay(losig_list* losig)
if (!ptype) { if (!ptype) {
fprintf(stderr,"losig_delay: no lofigchain on signal '%s'\n", fprintf(stderr,"losig_delay: no lofigchain on signal '%s'\n",
signame); signame);
exit(1); autexit(1);
} }
/*search drivers*/ /*search drivers*/
@ -377,7 +377,7 @@ extern double losig_delay(losig_list* losig)
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' isn't accepted\n",
locon->NAME); locon->NAME);
exit(1); autexit(1);
} }
/*real inputs*/ /*real inputs*/
if (isvdd(locon->NAME) || isvss(locon->NAME)) continue; if (isvdd(locon->NAME) || isvss(locon->NAME)) continue;
@ -405,7 +405,7 @@ extern void propagate_loins_delay(loins_list *loins)
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,loins->INSNAME); locon->NAME,loins->INSNAME);
exit(1); autexit(1);
} }
if (locon->DIRECTION==IN || locon->DIRECTION==INOUT || locon->DIRECTION==TRANSCV) if (locon->DIRECTION==IN || locon->DIRECTION==INOUT || locon->DIRECTION==TRANSCV)
propagate_losig_delay(locon->SIG); propagate_losig_delay(locon->SIG);
@ -428,14 +428,14 @@ static void loc_propagate_losig_delay(loins_list *loins)
if (!loins) { if (!loins) {
fprintf(stderr,"propagate_loins_delay: NULL pointer\n"); fprintf(stderr,"propagate_loins_delay: NULL pointer\n");
exit(1); autexit(1);
} }
for (locon=loins->LOCON; locon; locon=locon->NEXT) { for (locon=loins->LOCON; locon; locon=locon->NEXT) {
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,loins->INSNAME); locon->NAME,loins->INSNAME);
exit(1); autexit(1);
} }
if (isvdd(locon->NAME) || isvss(locon->NAME)) continue; if (isvdd(locon->NAME) || isvss(locon->NAME)) continue;
if (locon->DIRECTION==IN) continue; if (locon->DIRECTION==IN) continue;
@ -460,13 +460,13 @@ extern void propagate_losig_delay(losig_list *losig)
if (!losig) { if (!losig) {
fprintf(stderr,"propagate_losig_delay: NULL pointer\n"); fprintf(stderr,"propagate_losig_delay: NULL pointer\n");
exit(1); autexit(1);
} }
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"propagate_losig_delay: no losig name\n"); fprintf(stderr,"propagate_losig_delay: no losig name\n");
exit(1); autexit(1);
} }
signame=losig->NAMECHAIN->DATA; signame=losig->NAMECHAIN->DATA;
delay=losig_delay(losig); delay=losig_delay(losig);
@ -489,14 +489,14 @@ extern void propagate_losig_delay(losig_list *losig)
if (!ptype) { if (!ptype) {
fprintf(stderr,"propagate_losig_delay: no lofigchain on signal '%s'\n", fprintf(stderr,"propagate_losig_delay: no lofigchain on signal '%s'\n",
signame); signame);
exit(1); autexit(1);
} }
for (lofigchain=ptype->DATA; lofigchain; lofigchain=lofigchain->NEXT) { for (lofigchain=ptype->DATA; lofigchain; lofigchain=lofigchain->NEXT) {
locon= (locon_list*) lofigchain->DATA; locon= (locon_list*) lofigchain->DATA;
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' isn't accepted\n",
locon->NAME); locon->NAME);
exit(1); autexit(1);
} }
if (isvdd(locon->NAME) || isvss(locon->NAME)) continue; if (isvdd(locon->NAME) || isvss(locon->NAME)) continue;
if (locon->DIRECTION==OUT || locon->DIRECTION==TRISTATE) continue; if (locon->DIRECTION==OUT || locon->DIRECTION==TRISTATE) continue;
@ -520,9 +520,13 @@ extern void set_circuit_capacitance(lofig_list *lofig)
for (losig=lofig->LOSIG; losig; losig=losig->NEXT) { for (losig=lofig->LOSIG; losig; losig=losig->NEXT) {
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"set_circuit_capacitance: no losig name\n"); fprintf(stderr,"set_circuit_capacitance: no losig name\n");
exit(1); autexit(1);
} }
signame=losig->NAMECHAIN->DATA; /*
** LUDO: to ensure name unicity !
*/
signame=getnameindex(losig->NAMECHAIN->DATA);
losig->NAMECHAIN->DATA = signame;
/*for circuit output take user propertie if defined else return 0*/ /*for circuit output take user propertie if defined else return 0*/
putcapacitance(signame,getcapacitancelax(signame)); putcapacitance(signame,getcapacitancelax(signame));
putdelay(signame,0); putdelay(signame,0);

View File

@ -123,7 +123,7 @@ static void putsignal(signal_list* signal, char* name)
{ {
if (!name || !signal) { if (!name || !signal) {
fprintf(stderr,"putsignal: NULL pointer\n"); fprintf(stderr,"putsignal: NULL pointer\n");
exit(1); autexit(1);
} }
/*if doesn't exist hash table, init*/ /*if doesn't exist hash table, init*/
@ -144,7 +144,7 @@ static signal_list* getsignal(char *name, int create)
if (!name) { if (!name) {
fprintf(stderr,"getsignal: no name\n"); fprintf(stderr,"getsignal: no name\n");
exit(1); autexit(1);
} }
/*if doesn't exist hash table, init*/ /*if doesn't exist hash table, init*/
@ -155,7 +155,7 @@ static signal_list* getsignal(char *name, int create)
if (create==0) { if (create==0) {
fprintf(stderr,"getsignal: '%s' not found in hash table\n",name); fprintf(stderr,"getsignal: '%s' not found in hash table\n",name);
exit(1); autexit(1);
} }
/*create new signal*/ /*create new signal*/
@ -174,7 +174,7 @@ extern void putdelay(char* name, double delay)
if (!name) { if (!name) {
fprintf(stderr,"putdelay: no name\n"); fprintf(stderr,"putdelay: no name\n");
exit(1); autexit(1);
} }
signal=getsignal(name,1/*if doesn't exist create it*/); signal=getsignal(name,1/*if doesn't exist create it*/);
@ -192,7 +192,7 @@ extern double getdelay(char* name)
if (!name) { if (!name) {
fprintf(stderr,"getdelay: no name\n"); fprintf(stderr,"getdelay: no name\n");
exit(1); autexit(1);
} }
signal=getsignal(name,0/*if doesn't exist then error*/); signal=getsignal(name,0/*if doesn't exist then error*/);
@ -209,7 +209,7 @@ extern void incdelay(char* name, double delay)
if (!name) { if (!name) {
fprintf(stderr,"incdelay: no name\n"); fprintf(stderr,"incdelay: no name\n");
exit(1); autexit(1);
} }
signal=getsignal(name,0); signal=getsignal(name,0);
@ -227,7 +227,7 @@ extern double getcapacitance(char* name)
if (!name) { if (!name) {
fprintf(stderr,"getcapacitance: no name\n"); fprintf(stderr,"getcapacitance: no name\n");
exit(1); autexit(1);
} }
signal=getsignal(name,0/*if doesn't exist then error*/); signal=getsignal(name,0/*if doesn't exist then error*/);
@ -244,7 +244,7 @@ extern void inccapacitance(char* name, double capacitance)
if (!name) { if (!name) {
fprintf(stderr,"inccapacitance: no name\n"); fprintf(stderr,"inccapacitance: no name\n");
exit(1); autexit(1);
} }
signal=getsignal(name,0/*if doesn't exist then error*/); signal=getsignal(name,0/*if doesn't exist then error*/);
@ -262,7 +262,7 @@ extern void putcapacitance(char* name, double capacitance)
if (!name) { if (!name) {
fprintf(stderr,"putcapacitance: no name\n"); fprintf(stderr,"putcapacitance: no name\n");
exit(1); autexit(1);
} }
signal=getsignal(name,1/*if doesn't exist create it*/); signal=getsignal(name,1/*if doesn't exist create it*/);

View File

@ -150,7 +150,7 @@ extern void save_xsch(FILE* xsch_stream, lofig_list* lofig, ptype_list* long_pat
if (!ptype->DATA) { if (!ptype->DATA) {
fprintf(stderr,"save_xsch: compute error\n"); fprintf(stderr,"save_xsch: compute error\n");
exit(1); autexit(1);
} }
delay=ptype->TYPE; delay=ptype->TYPE;
gradient=delay/((double)XSCH_COLOR_MAX); gradient=delay/((double)XSCH_COLOR_MAX);
@ -161,7 +161,7 @@ extern void save_xsch(FILE* xsch_stream, lofig_list* lofig, ptype_list* long_pat
if (!losig->NAMECHAIN || !losig->NAMECHAIN->DATA) { if (!losig->NAMECHAIN || !losig->NAMECHAIN->DATA) {
fprintf(stderr,"save_xsch: no name for signal\n"); fprintf(stderr,"save_xsch: no name for signal\n");
exit(1); autexit(1);
} }
signame=losig->NAMECHAIN->DATA; signame=losig->NAMECHAIN->DATA;
@ -195,19 +195,19 @@ extern void save_xsch(FILE* xsch_stream, lofig_list* lofig, ptype_list* long_pat
if (locon->DIRECTION==UNKNOWN) { if (locon->DIRECTION==UNKNOWN) {
fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n", fprintf(stderr,"BEH: 'linkage %s' in figure '%s' isn't accepted\n",
locon->NAME,loins->INSNAME); locon->NAME,loins->INSNAME);
exit(1); autexit(1);
} }
if (locon->DIRECTION==OUT || locon->DIRECTION==INOUT if (locon->DIRECTION==OUT || locon->DIRECTION==INOUT
|| locon->DIRECTION==TRISTATE || locon->DIRECTION==TRANSCV) break; || locon->DIRECTION==TRISTATE || locon->DIRECTION==TRANSCV) break;
} }
if (!locon) { if (!locon) {
fprintf(stderr,"save_xsch: no output found for '%s'\n",loins->INSNAME); fprintf(stderr,"save_xsch: no output found for '%s'\n",loins->INSNAME);
exit(1); autexit(1);
} }
losig=locon->SIG; losig=locon->SIG;
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"save_xsch: no name on signal\n"); fprintf(stderr,"save_xsch: no name on signal\n");
exit(1); autexit(1);
} }
signame=losig->NAMECHAIN->DATA; signame=losig->NAMECHAIN->DATA;
@ -226,7 +226,7 @@ extern void save_xsch(FILE* xsch_stream, lofig_list* lofig, ptype_list* long_pat
losig_aux=locon->SIG; losig_aux=locon->SIG;
if (!losig_aux->NAMECHAIN) { if (!losig_aux->NAMECHAIN) {
fprintf(stderr,"save_xsch: no name on signal\n"); fprintf(stderr,"save_xsch: no name on signal\n");
exit(1); autexit(1);
} }
/*is signal in critical path?*/ /*is signal in critical path?*/
for (ptype2=long_path; ptype2; ptype2=ptype2->NEXT) { for (ptype2=long_path; ptype2; ptype2=ptype2->NEXT) {
@ -301,7 +301,7 @@ extern void save_xsch(FILE* xsch_stream, lofig_list* lofig, ptype_list* long_pat
losig=locon->SIG; losig=locon->SIG;
if (!losig->NAMECHAIN) { if (!losig->NAMECHAIN) {
fprintf(stderr,"save_xsch: no name on signal\n"); fprintf(stderr,"save_xsch: no name on signal\n");
exit(1); autexit(1);
} }
if (losig->NAMECHAIN->DATA==signame) { if (losig->NAMECHAIN->DATA==signame) {
dest=loins->INSNAME; dest=loins->INSNAME;