fix netlisting schematics with generator name containing extension ( like symgen.tcl(1,2,3) )
This commit is contained in:
parent
1e74b21c49
commit
d7557d7945
|
|
@ -253,17 +253,20 @@ const char *add_ext(const char *f, const char *ext)
|
|||
int i;
|
||||
|
||||
dbg(1, "add_ext(): f=%s ext=%s\n", f, ext);
|
||||
if((p=strrchr(f,'.'))) {
|
||||
my_strncpy(ff, f, (p-f) + 1);
|
||||
p = ff + (p-f);
|
||||
dbg(1, "add_ext(): 1: ff=%s\n", ff);
|
||||
} else {
|
||||
i = my_strncpy(ff, f, S(ff));
|
||||
p = ff+i;
|
||||
dbg(1, "add_ext(): 2: ff=%s\n", ff);
|
||||
if(strchr(f,'(')) my_strncpy(ff, f, S(ff)); /* generator: return as is */
|
||||
else {
|
||||
if((p=strrchr(f,'.'))) {
|
||||
my_strncpy(ff, f, (p-f) + 1);
|
||||
p = ff + (p-f);
|
||||
dbg(1, "add_ext(): 1: ff=%s\n", ff);
|
||||
} else {
|
||||
i = my_strncpy(ff, f, S(ff));
|
||||
p = ff+i;
|
||||
dbg(1, "add_ext(): 2: ff=%s\n", ff);
|
||||
}
|
||||
my_strncpy(p, ext, S(ff)-(p-ff));
|
||||
dbg(1, "add_ext(): 3: ff=%s\n", ff);
|
||||
}
|
||||
my_strncpy(p, ext, S(ff)-(p-ff));
|
||||
dbg(1, "add_ext(): 3: ff=%s\n", ff);
|
||||
return ff;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -208,7 +208,8 @@ static int spice_netlist(FILE *fd, int spice_stop )
|
|||
} else {
|
||||
const char *m;
|
||||
if(print_spice_element(fd, i)) {
|
||||
int_hash_lookup(&used_symbols, get_sym_name(i, 9999, 1), 1, XINSERT); /* symbol is used */
|
||||
/* symbol is used */
|
||||
int_hash_lookup(&used_symbols, translate(i, get_sym_name(i, 9999, 1)), 1, XINSERT);
|
||||
fprintf(fd, "**** end_element\n");
|
||||
}
|
||||
/* hash device_model attribute if any */
|
||||
|
|
@ -415,7 +416,8 @@ int global_spice_netlist(int global) /* netlister driver */
|
|||
get_additional_symbols(1);
|
||||
for(i=0;i<xctx->symbols; ++i)
|
||||
{
|
||||
if(int_hash_lookup(&used_symbols, xctx->sym[i].name, 0, XLOOKUP) == NULL) continue;
|
||||
if(int_hash_lookup(&used_symbols,
|
||||
get_trailing_path(xctx->sym[i].name, 9999, 0), 0, XLOOKUP) == NULL) continue;
|
||||
if( strcmp(get_tok_value(xctx->sym[i].prop_ptr,"spice_ignore",0),"true")==0 ) continue;
|
||||
if(!xctx->sym[i].type) continue;
|
||||
my_strdup(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, ""));
|
||||
|
|
|
|||
|
|
@ -66,7 +66,9 @@ static int tedax_netlist(FILE *fd, int tedax_stop )
|
|||
fprintf(fd,"#**** end user architecture code\n");
|
||||
} else {
|
||||
print_tedax_element(fd, i) ; /* this is the element line */
|
||||
int_hash_lookup(&used_symbols, get_sym_name(i, 9999, 1), 1, XINSERT); /* symbol is used */
|
||||
/* symbol is used */
|
||||
int_hash_lookup(&used_symbols, translate(i, get_sym_name(i, 9999, 1)), 1, XINSERT);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -209,7 +211,8 @@ int global_tedax_netlist(int global) /* netlister driver */
|
|||
get_additional_symbols(1);
|
||||
for(i=0;i<xctx->symbols; ++i)
|
||||
{
|
||||
if(int_hash_lookup(&used_symbols, xctx->sym[i].name, 0, XLOOKUP) == NULL) continue;
|
||||
if(int_hash_lookup(&used_symbols,
|
||||
get_trailing_path(xctx->sym[i].name, 9999, 0), 0, XLOOKUP) == NULL) continue;
|
||||
if( strcmp(get_tok_value(xctx->sym[i].prop_ptr,"tedax_ignore",0),"true")==0 ) continue;
|
||||
if(!xctx->sym[i].type) continue;
|
||||
my_strdup2(_ALLOC_ID_, &abs_path, abs_sym_path(tcl_hook2(xctx->sym[i].name), ""));
|
||||
|
|
|
|||
|
|
@ -63,12 +63,16 @@ static int verilog_netlist(FILE *fd , int verilog_stop)
|
|||
{
|
||||
if(xctx->inst[i].sel==SELECTED) {
|
||||
print_verilog_element(fd, i) ;
|
||||
int_hash_lookup(&used_symbols, get_sym_name(i, 9999, 1), 1, XINSERT); /* symbol is used */
|
||||
/* symbol is used */
|
||||
int_hash_lookup(&used_symbols, translate(i, get_sym_name(i, 9999, 1)), 1, XINSERT);
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
print_verilog_element(fd, i) ; /* this is the element line */
|
||||
int_hash_lookup(&used_symbols, get_sym_name(i, 9999, 1), 1, XINSERT); /* symbol is used */
|
||||
/* symbol is used */
|
||||
int_hash_lookup(&used_symbols, translate(i, get_sym_name(i, 9999, 1)), 1, XINSERT);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -362,7 +366,8 @@ int global_verilog_netlist(int global) /* netlister driver */
|
|||
get_additional_symbols(1);
|
||||
for(i=0;i<xctx->symbols; ++i)
|
||||
{
|
||||
if(int_hash_lookup(&used_symbols, xctx->sym[i].name, 0, XLOOKUP) == NULL) continue;
|
||||
if(int_hash_lookup(&used_symbols,
|
||||
get_trailing_path(xctx->sym[i].name, 9999, 0), 0, XLOOKUP) == NULL) continue;
|
||||
if( strcmp(get_tok_value(xctx->sym[i].prop_ptr,"verilog_ignore",0),"true")==0 ) continue;
|
||||
if(!xctx->sym[i].type) continue;
|
||||
my_strdup2(_ALLOC_ID_, &abs_path, abs_sym_path(tcl_hook2(xctx->sym[i].name), ""));
|
||||
|
|
|
|||
Loading…
Reference in New Issue