pour ne pas generer des signaux ou des instances du meme nom que le modele

This commit is contained in:
Francois Donnet 2002-04-15 13:29:10 +00:00
parent 07b7fa587a
commit 373a87ee1c
7 changed files with 53 additions and 26 deletions

View File

@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/bog_main.c) AC_INIT(src/bog_main.c)
BOOG_MAJOR_VERSION=1 BOOG_MAJOR_VERSION=1
BOOG_MINOR_VERSION=4 BOOG_MINOR_VERSION=5
BOOG_VERSION=$BOOG_MAJOR_VERSION.$BOOG_MINOR_VERSION BOOG_VERSION=$BOOG_MAJOR_VERSION.$BOOG_MINOR_VERSION
AC_SUBST(BOOG_MAJOR_VERSION) AC_SUBST(BOOG_MAJOR_VERSION)

View File

@ -250,7 +250,7 @@ extern int main (int argc, char* argv[])
autenv(); /*hash table*/ autenv(); /*hash table*/
bddenv(); /*for vhdlloadbefig() */ bddenv(); /*for vhdlloadbefig() */
alliancebanner_with_authors("BooG", VERSION " [2002/02/11]", "Binding and Optimizing On Gates", alliancebanner_with_authors("BooG", VERSION " [2002/04/15]", "Binding and Optimizing On Gates",
"2000", ALLIANCE_VERSION, "François Donnet"); "2000", ALLIANCE_VERSION, "François Donnet");
/*alliance env: extension netlist file (vst or al)*/ /*alliance env: extension netlist file (vst or al)*/

View File

@ -95,7 +95,9 @@ static losig_list* loc_map_abl(lofig_list *lofig, chain_list *abl)
losig_list* losig; losig_list* losig;
port_list* port, *top; port_list* port, *top;
chain_list* sigchain = NULL, *new, *pred=NULL; chain_list* sigchain = NULL, *new, *pred=NULL;
char* name;
char* insname; char* insname;
char* signame;
chain_list* namechain; chain_list* namechain;
cell_list* cell; cell_list* cell;
losig_list* output_losig; losig_list* output_losig;
@ -117,12 +119,14 @@ static losig_list* loc_map_abl(lofig_list *lofig, chain_list *abl)
/*cell->PORT contains the result of pattern matching*/ /*cell->PORT contains the result of pattern matching*/
cell=cell_pattern(abl); cell=cell_pattern(abl);
insname=getnameindex(cell->NAME); name=getnameindex(cell->NAME);
putdelay(loins_name(insname),cell->DELAY); /*delay for loins*/ signame=losig_name(name);
putdelay(insname,cell->DELAY); /*delay for new signal*/ insname=loins_name(name);
putdelay(insname,cell->DELAY); /*delay for loins*/
putdelay(signame,cell->DELAY); /*delay for new signal*/
/*output_losig */ /*output_losig */
namechain=addchain(NULL,insname); namechain=addchain(NULL,signame);
output_losig=addlosig(lofig, getindex(), namechain, INTERNAL); output_losig=addlosig(lofig, getindex(), namechain, INTERNAL);
top=copyport(cell->PORT); /*not to be disturb by recursion*/ top=copyport(cell->PORT); /*not to be disturb by recursion*/
@ -176,6 +180,7 @@ extern void map_abl(lofig_list *lofig, chain_list *abl, losig_list *output_losig
port_list* port, *top; port_list* port, *top;
chain_list* sigchain = NULL, *new, *pred=NULL; chain_list* sigchain = NULL, *new, *pred=NULL;
char* insname; char* insname;
char* signame;
cell_list* cell; cell_list* cell;
int master; int master;
@ -195,8 +200,9 @@ extern void map_abl(lofig_list *lofig, chain_list *abl, losig_list *output_losig
/*search buffer, one or zero constant*/ /*search buffer, one or zero constant*/
cell=cell_pattern(abl); cell=cell_pattern(abl);
insname=(char*)output_losig->NAMECHAIN->DATA; signame=(char*)output_losig->NAMECHAIN->DATA;
putdelay(loins_name(insname),cell->DELAY); /*delay for loins*/ insname=loins_name(signame);
putdelay(insname,cell->DELAY); /*delay for loins*/
top=copyport(cell->PORT); /*not to be disturb by recursion*/ top=copyport(cell->PORT); /*not to be disturb by recursion*/
for (port=top; port; port=port->NEXT) { for (port=top; port; port=port->NEXT) {
@ -280,8 +286,10 @@ extern void map_bus(lofig_list* lofig, biabl_list* biabl, losig_list* output_los
SEPAR='_'; SEPAR='_';
insname=concatname((char*)output_losig->NAMECHAIN->DATA,insname); insname=concatname((char*)output_losig->NAMECHAIN->DATA,insname);
SEPAR=memo; SEPAR=memo;
} }
putdelay(loins_name(insname),cell->DELAY); /*delay for loins*/
insname=loins_name(insname);
putdelay(insname,cell->DELAY); /*delay for loins*/
top=copyport(cell->PORT); top=copyport(cell->PORT);
for (port=top; port; port=port->NEXT) { for (port=top; port; port=port->NEXT) {
@ -372,8 +380,9 @@ extern void map_register(lofig_list* lofig, biabl_list* biabl, losig_list* outpu
insname=concatname((char*)output_losig->NAMECHAIN->DATA,insname); insname=concatname((char*)output_losig->NAMECHAIN->DATA,insname);
SEPAR=memo; SEPAR=memo;
} }
putdelay(loins_name(insname),cell->DELAY); /*delay for loins*/ insname=loins_name(insname);
putdelay(insname,cell->DELAY); /*delay for loins*/
top=copyport(cell->PORT); top=copyport(cell->PORT);
for (port=top; port; port=port->NEXT) { for (port=top; port; port=port->NEXT) {

View File

@ -165,7 +165,7 @@ static ptype_list* search_long_path(loins_list* loins, befig_list* befig)
|| locon->TYPE==EXTERNAL) continue; || locon->TYPE==EXTERNAL) continue;
loins_aux=locon->ROOT; loins_aux=locon->ROOT;
if (loins_aux==loins) continue; if (loins_aux==loins) continue;
delay=getdelay(loins_name(loins_aux->INSNAME)); delay=getdelay(loins_aux->INSNAME);
if (delay>max_delay) { if (delay>max_delay) {
best_loins=loins_aux; best_loins=loins_aux;
max_delay=delay; max_delay=delay;
@ -191,7 +191,8 @@ 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;
if (!befig) { if (!befig) {
fprintf(stderr,"max_delay_path: NULL pointer\n"); fprintf(stderr,"max_delay_path: NULL pointer\n");
exit(1); exit(1);
@ -204,10 +205,11 @@ extern ptype_list* max_delay_path(befig_list* befig, lofig_list* lofig)
if (head) { if (head) {
/*search instance which begins*/ /*search instance which begins*/
for (loins=lofig->LOINS; loins; loins=loins->NEXT) { for (loins=lofig->LOINS; loins; loins=loins->NEXT) {
if ((char*) head->DATA==loins->INSNAME) break; insname=loins_name(head->DATA);
if (insname==loins->INSNAME) break;
} }
if (!loins) { if (!loins) {
fprintf(stderr,"max_delay_path: no loins '%s' found\n",(char*) head->DATA); fprintf(stderr,"max_delay_path: no loins '%s' found\n", insname);
exit(1); exit(1);
} }
path=search_long_path(loins, befig); path=search_long_path(loins, befig);

View File

@ -39,10 +39,10 @@
#include "bog_signal_nameindex.h" #include "bog_signal_nameindex.h"
#define MBK_NOT namealloc("MBK_NOT") #define MBK_NOT namealloc("not")
#define MBK_SIG namealloc("MBK_SIG") #define MBK_SIG namealloc("sig")
#define MBK_OUT namealloc("MBK_OUT") #define MBK_OUT namealloc("out")
#define MBK_INS namealloc("MBK_INS") #define MBK_INS namealloc("ins")
#define BLOCK 1024 #define BLOCK 1024
/*table of used name*/ /*table of used name*/
@ -163,6 +163,17 @@ extern char* getoppositename(char* name)
/* build a generic name with an incremented index */ /* build a generic name with an incremented index */
/******************************************************************************/ /******************************************************************************/
extern char* getautoname(char* name) extern char* getautoname(char* name)
{
name=losig_name(name);
return getnameindex(name);
}
/******************************************************************************/
/* return an artificial name to distinguish loins from signal */
/******************************************************************************/
extern char* losig_name(char* name)
{ {
char memo_char; char memo_char;
@ -170,10 +181,10 @@ extern char* getautoname(char* name)
memo_char=SEPAR; /*external value from MBK environment*/ memo_char=SEPAR; /*external value from MBK environment*/
SEPAR='_'; SEPAR='_';
name=concatname(MBK_SIG,name); name=concatname(name,MBK_SIG);
SEPAR=memo_char; SEPAR=memo_char;
return getnameindex(name); return name;
} }
@ -189,7 +200,7 @@ extern char* loins_name(char* name)
memo_char=SEPAR; /*external value from MBK environment*/ memo_char=SEPAR; /*external value from MBK environment*/
SEPAR='_'; SEPAR='_';
name=concatname(MBK_INS,name); name=concatname(name,MBK_INS);
SEPAR=memo_char; SEPAR=memo_char;
return name; return name;
@ -209,8 +220,8 @@ extern char* output_name(char* name)
memo_char=SEPAR; /*external value from MBK environment*/ memo_char=SEPAR; /*external value from MBK environment*/
SEPAR='_'; SEPAR='_';
name=concatname(MBK_SIG,name); name=concatname(name,MBK_SIG);
name=concatname(MBK_OUT,name); name=concatname(name,MBK_OUT);
SEPAR=memo_char; SEPAR=memo_char;
return name; return name;

View File

@ -69,6 +69,11 @@ extern char* getoppositename __P ((char* name));
/******************************************************************************/ /******************************************************************************/
extern char* getautoname __P ((char* name)); extern char* getautoname __P ((char* name));
/******************************************************************************/
/* return an artificial name to distinguish loins from signal */
/******************************************************************************/
extern char* losig_name(char* name);
/******************************************************************************/ /******************************************************************************/
/* return an artificial name to distinguish loins from signal */ /* return an artificial name to distinguish loins from signal */
/* only used to hash values for internal treatment */ /* only used to hash values for internal treatment */

View File

@ -260,7 +260,7 @@ extern void save_xsch(FILE* xsch_stream, lofig_list* lofig, ptype_list* long_pat
losig=locon->SIG; losig=locon->SIG;
signame=losig->NAMECHAIN->DATA; signame=losig->NAMECHAIN->DATA;
delay=getdelay(loins_name(loins->INSNAME)); delay=getdelay(loins->INSNAME);
switch (color_mode) { switch (color_mode) {
case XSCH_GRADIENT: color=gradient_color(delay,gradient); break; case XSCH_GRADIENT: color=gradient_color(delay,gradient); break;