remove used_symbols feature (may fail in some hierarchical situations)

This commit is contained in:
stefan schippers 2023-05-10 10:13:38 +02:00
parent f8846ca969
commit 626f2729ce
3 changed files with 0 additions and 23 deletions

View File

@ -23,7 +23,6 @@
#include "xschem.h"
static Str_hashtable model_table = {NULL, 0}; /* safe even with multiple schematics */
static Int_hashtable used_symbols = {NULL, 0};
static const char *hier_psprint_mtime(const char *file_name)
{
@ -208,8 +207,6 @@ static int spice_netlist(FILE *fd, int spice_stop )
} else {
const char *m;
if(print_spice_element(fd, i)) {
/* 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 */
@ -257,7 +254,6 @@ int global_spice_netlist(int global) /* netlister driver */
statusmsg("",2); /* clear infowindow */
str_hash_init(&subckt_table, HASHSIZE);
str_hash_init(&model_table, HASHSIZE);
int_hash_init(&used_symbols, HASHSIZE);
record_global_node(2, NULL, NULL); /* delete list of global nodes */
bus_char[0] = bus_char[1] = '\0';
xctx->hiersep[0]='.'; xctx->hiersep[1]='\0';
@ -416,8 +412,6 @@ 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,
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, ""));
@ -507,7 +501,6 @@ int global_spice_netlist(int global) /* netlister driver */
}
str_hash_free(&model_table);
str_hash_free(&subckt_table);
int_hash_free(&used_symbols);
if(first) fprintf(fd,"**** end user architecture code\n");

View File

@ -21,7 +21,6 @@
*/
#include "xschem.h"
static Int_hashtable used_symbols = {NULL, 0};
static int tedax_netlist(FILE *fd, int tedax_stop )
{
int err = 0;
@ -66,8 +65,6 @@ 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 */
/* symbol is used */
int_hash_lookup(&used_symbols, translate(i, get_sym_name(i, 9999, 1)), 1, XINSERT);
}
@ -142,7 +139,6 @@ int global_tedax_netlist(int global) /* netlister driver */
xctx->push_undo();
statusmsg("",2); /* clear infowindow */
str_hash_init(&subckt_table, HASHSIZE);
int_hash_init(&used_symbols, HASHSIZE);
record_global_node(2, NULL, NULL); /* delete list of global nodes */
bus_char[0] = bus_char[1] = '\0';
xctx->hiersep[0]='.'; xctx->hiersep[1]='\0';
@ -211,8 +207,6 @@ 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,
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), ""));
@ -252,7 +246,6 @@ int global_tedax_netlist(int global) /* netlister driver */
propagate_hilights(1, 0, XINSERT_NOREPLACE);
draw_hilight_net(1);
my_free(_ALLOC_ID_, &stored_flags);
int_hash_free(&used_symbols);
/* print globals nodes found in netlist 28032003 */
record_global_node(0,fd,NULL);

View File

@ -21,7 +21,6 @@
*/
#include "xschem.h"
static Int_hashtable used_symbols = {NULL, 0};
static int verilog_netlist(FILE *fd , int verilog_stop)
{
@ -63,15 +62,11 @@ static int verilog_netlist(FILE *fd , int verilog_stop)
{
if(xctx->inst[i].sel==SELECTED) {
print_verilog_element(fd, i) ;
/* 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 */
/* symbol is used */
int_hash_lookup(&used_symbols, translate(i, get_sym_name(i, 9999, 1)), 1, XINSERT);
}
}
@ -109,7 +104,6 @@ int global_verilog_netlist(int global) /* netlister driver */
xctx->netlist_unconn_cnt=0; /* unique count of unconnected pins while netlisting */
statusmsg("",2); /* clear infowindow */
str_hash_init(&subckt_table, HASHSIZE);
int_hash_init(&used_symbols, HASHSIZE);
xctx->netlist_count=0;
/* top sch properties used for library use declarations and type definitions */
/* to be printed before any entity declarations */
@ -366,8 +360,6 @@ 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,
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), ""));
@ -409,7 +401,6 @@ int global_verilog_netlist(int global) /* netlister driver */
propagate_hilights(1, 0, XINSERT_NOREPLACE);
draw_hilight_net(1);
my_free(_ALLOC_ID_, &stored_flags);
int_hash_free(&used_symbols);
dbg(1, "global_verilog_netlist(): starting awk on netlist!\n");
if(!split_f) {