for hierarchy cellname listing use nolist_libs for exclucing patterns, instead of xschem_libs, which is used for netlisting

This commit is contained in:
stefan schippers 2022-12-10 01:15:18 +01:00
parent 3d5bb6d64a
commit 5a8e0c9ba2
4 changed files with 16 additions and 4 deletions

View File

@ -356,7 +356,11 @@ void hash_wires(void)
}
/* return 0 if library path of s matches any lib name in tcl variable $xschem_libs */
/* what: 1: netlist exclude lib, 2: hierarchical print exclude lib */
/* what:
* 1: netlist exclude pattern
* 2: hierarchical print exclude pattern
* 4: hierarchical cell listing exclude pattern
*/
int check_lib(int what, const char *s)
{
int range,i, found;
@ -365,15 +369,17 @@ int check_lib(int what, const char *s)
found=0;
if(what & 1) tcleval("llength $xschem_libs");
if(what & 2) tcleval("llength $noprint_libs");
if(what & 4) tcleval("llength $nolist_libs");
range = atoi(tclresult());
dbg(1, "check_lib(): s=%s, range=%d\n", s, range);
for(i=0;i<range;i++){
if(what & 1 ) my_snprintf(str, S(str), "lindex $xschem_libs %d",i);
if(what & 2 ) my_snprintf(str, S(str), "lindex $noprint_libs %d",i);
if(what & 4 ) my_snprintf(str, S(str), "lindex $nolist_libs %d",i);
tcleval(str);
dbg(1, "check_lib(): %s -> %s\n", str, tclresult());
my_snprintf(str, S(str), "regexp {%s} %s", tclresult(), s);
my_snprintf(str, S(str), "regexp {%s} {%s}", tclresult(), s);
dbg(1, "check_lib(): str=%s\n", str);
tcleval(str);
if( tclresult()[0] == '1') found=1;

View File

@ -78,7 +78,7 @@ void hier_psprint(char **res, int what) /* netlister driver */
if(!xctx->sym[i].type || !xctx->sym[i].name || !xctx->sym[i].name[0]) continue; /* can not descend into */
my_strdup2(1230, &abs_path, abs_sym_path(xctx->sym[i].name, ""));
if(what & 1) flag = check_lib(2, abs_path); /* noprint_libs */
else flag = check_lib(1, abs_path); /* xschem_libs */
else flag = check_lib(4, abs_path); /* nolist_libs */
if(strcmp(xctx->sym[i].type,"subcircuit")==0 && flag)
{
/* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */

View File

@ -5280,7 +5280,7 @@ set tctx::global_list {
graph_selected graph_sort graph_unlocked hide_empty_graphs hide_symbols hsize
incr_hilight infowindow_text input_line_cmd input_line_data launcher_default_program
light_colors line_width live_cursor2_backannotate local_netlist_dir measure_text netlist_show
netlist_type no_change_attrs noprint_libs old_selected_tok only_probes path pathlist
netlist_type no_change_attrs nolist_libs noprint_libs old_selected_tok only_probes path pathlist
persistent_command preserve_unchanged_attrs prev_symbol ps_colors rainbow_colors
rawfile_loaded rcode recentfile
replace_key retval retval_orig rotated_text search_exact search_found search_schematic
@ -6279,6 +6279,7 @@ if {[file exists ${XSCHEM_TMP_DIR}/xschem_web] } {
# used in C code
set_ne xschem_libs {}
set_ne noprint_libs {}
set_ne nolist_libs {}
set_ne debug_var 0
# used to activate debug from menu
set_ne menu_debug_var 0

View File

@ -105,6 +105,11 @@
#### variable controls hierarchical print
#### default value: empty
# set noprint_libs {}
#### nolist_libs is a list with same rules as for xschem_libs. This
#### variable controls cell listing in procedure list_hierarchy.
#### default value: empty
# set nolist_libs {}
###########################################################################
#### CHANGE DEFAULT [] WITH SOME OTHER CHARACTERS FOR BUSSED SIGNALS