fix bus_tap netlisting with bus pin (pin # 1) connected to unnamed net. If Tap pin (pin # 0) was already named as #net... (unnamed net ) delete and take name from bus pin and tap index

This commit is contained in:
stefan schippers 2024-05-31 11:50:02 +02:00
parent 9f368d32e5
commit 9282ea670e
2 changed files with 5 additions and 7 deletions

View File

@ -1160,7 +1160,9 @@ static int instcheck(int n, int p)
if(rects > 1 && bus_tap && p == 1) {
char *node_base_name = NULL;
const char *tap;
dbg(1, "instcheck: bus tap node: %s\n", inst[n].node[p]);
if(inst[n].node && inst[n].node[0] && inst[n].node[0][0] == '#') {
my_free(_ALLOC_ID_, &inst[n].node[0]); /* bus tap forces net name on pin 0 (the tap) */
} /* delete any previously set unnamed net */
if(!inst[n].node[0]) { /* still unnamed */
/* tap = get_tok_value(inst[n].prop_ptr, "lab", 0); */
tap = inst[n].lab;
@ -1194,6 +1196,7 @@ static int instcheck(int n, int p)
} else {
if(for_netlist>0) err |= signal_short("Bus tap", inst[n].node[p], inst[n].node[0]);
}
dbg(1, "instcheck: bus tap node: p=%d, %s, tap=%s\n", p, inst[n].node[p], inst[n].node[0]);
my_free(_ALLOC_ID_, &node_base_name);
}

View File

@ -223,12 +223,7 @@ m=1
}
C {title.sym} 160 -30 0 0 {name=l9
author="tcleval(Stefan Schippers[
if \{$show_pin_net_names == 0\} \{
set show_pin_net_names 1
xschem update_all_sym_bboxes
\}]
)"}
author="Stefan Schippers"}
C {lab_pin.sym} 170 -790 0 0 {name=p11 sig_type=std_logic lab=DIN[15..0]
}
C {bus_tap.sym} 270 -790 1 0 {name=l10 lab=0