some bug fixes in resolved_net hashing, use some @#n:resolved_net labels in examples
This commit is contained in:
parent
bb9ad82d80
commit
cff9f7d169
|
|
@ -1695,7 +1695,7 @@ int descend_schematic(int instnumber)
|
|||
const char *pin_name = get_tok_value(xctx->sym[xctx->inst[n].ptr].rect[PINLAYER][i].prop_ptr,"name",0);
|
||||
char *pin_node = NULL, *net_node = NULL;
|
||||
int k, mult, net_mult;
|
||||
char *single_p, *single_n = NULL;
|
||||
char *single_p, *single_n = NULL, *single_n_ptr = NULL;
|
||||
char *p_n_s1 = NULL;
|
||||
char *p_n_s2 = NULL;
|
||||
|
||||
|
|
@ -1708,12 +1708,14 @@ int descend_schematic(int instnumber)
|
|||
p_n_s1 = pin_node;
|
||||
for(k = 1; k<=mult; ++k) {
|
||||
single_p = my_strtok_r(p_n_s1, ",", "", &p_n_s2);
|
||||
if(single_p[0] == '#') single_p++;
|
||||
p_n_s1 = NULL;
|
||||
my_strdup2(_ALLOC_ID_, &single_n,
|
||||
find_nth(net_node, ",", ((inst_number - 1) * mult + k - 1) % net_mult + 1));
|
||||
str_hash_lookup(&xctx->portmap[xctx->currsch + 1], single_p, single_n, XINSERT);
|
||||
dbg(1, "descend_schematic(): %s: %s ->%s\n", xctx->inst[n].instname, single_p, single_n);
|
||||
single_n_ptr = single_n;
|
||||
if(single_n_ptr[0] == '#') single_n_ptr++;
|
||||
|
||||
str_hash_lookup(&xctx->portmap[xctx->currsch + 1], single_p, single_n_ptr, XINSERT);
|
||||
dbg(0, "descend_schematic(): %s: %s ->%s\n", xctx->inst[n].instname, single_p, single_n_ptr);
|
||||
}
|
||||
if(single_n) my_free(_ALLOC_ID_, &single_n);
|
||||
my_free(_ALLOC_ID_, &net_node);
|
||||
|
|
|
|||
|
|
@ -3170,6 +3170,7 @@ int load_sym_def(const char *name, FILE *embed_fd)
|
|||
int symbols, sym_n_pins=0, generator;
|
||||
char *cmd = NULL;
|
||||
char *translated_cmd = NULL;
|
||||
int is_floater = 0;
|
||||
|
||||
if(!name) {
|
||||
dbg(0, "l_s_d(): Warning: name parameter set to NULL, returning with no action\n");
|
||||
|
|
@ -3564,7 +3565,11 @@ int load_sym_def(const char *name, FILE *embed_fd)
|
|||
continue;
|
||||
}
|
||||
load_ascii_string(&tmptext.prop_ptr, lcc[level].fd);
|
||||
if( !strcmp(get_tok_value(tmptext.prop_ptr, "symbol_ignore", 0), "true")) {
|
||||
|
||||
is_floater = 0;
|
||||
get_tok_value(tmptext.prop_ptr, "name", 2);
|
||||
if(xctx->tok_size) is_floater = 1; /* get rid of floater texts in LCC symbols */
|
||||
if( !strcmp(get_tok_value(tmptext.prop_ptr, "symbol_ignore", 0), "true") || is_floater) {
|
||||
my_free(_ALLOC_ID_, &tmptext.prop_ptr);
|
||||
my_free(_ALLOC_ID_, &tmptext.txt_ptr);
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
v {xschem version=3.1.0 file_version=1.2
|
||||
v {xschem version=3.4.0 file_version=1.2
|
||||
}
|
||||
G {}
|
||||
K {type=subcircuit
|
||||
|
|
@ -74,6 +74,9 @@ T {ANALOG AUDIO AMPLIFIER
|
|||
N-Channel only power stage} 290 -380 0 0 0.5 0.5 {layer=8 symbol_ignore=true}
|
||||
T {@name} 40 -1350 0 0 0.8 0.8 {}
|
||||
T {@symname} 1320 -1350 0 1 0.8 0.8 {}
|
||||
T {( @#0:resolved_net )} 120 -635 0 1 0.2 0.2 {name=p0 layer=15}
|
||||
T {( @#0:resolved_net )} 120 -585 0 1 0.2 0.2 {name=p1 layer=15}
|
||||
T {( @#0:resolved_net )} 1360 -665 0 1 0.2 0.2 {name=p5 layer=15}
|
||||
N 180 -590 180 -550 {lab=E9}
|
||||
N 260 -550 340 -550 {lab=E9}
|
||||
N 340 -590 340 -550 {lab=E9}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
v {xschem version=3.1.0 file_version=1.2 }
|
||||
v {xschem version=3.4.0 file_version=1.2
|
||||
}
|
||||
G {}
|
||||
K {type=subcircuit
|
||||
format="@name @pinlist @symname"
|
||||
|
|
@ -32,3 +33,6 @@ T {VSS} -125 -4 0 0 0.2 0.2 {}
|
|||
T {OUT} 125 -44 0 1 0.2 0.2 {}
|
||||
T {VPP} -125 16 0 0 0.2 0.2 {}
|
||||
T {VNN} -125 36 0 0 0.2 0.2 {}
|
||||
T {( @#0:resolved_net )} -90 -45 0 0 0.2 0.2 {layer=15}
|
||||
T {( @#1:resolved_net )} -90 -25 0 0 0.2 0.2 {layer=15}
|
||||
T {( @#3:resolved_net )} 120 -25 0 1 0.2 0.2 {layer=15}
|
||||
|
|
|
|||
Loading…
Reference in New Issue