From 64d547296305b3d7e9f6d4d00f6e75ac75b91a95 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Sun, 23 Jun 2024 11:02:25 +0200 Subject: [PATCH] allow `global` atttributes on instances of gnd.sym and vdd.sym to override symbol `global` setting. This allows also to set global=1 to net labels (lab_net.sym, lab_pin.sym) to make the net global. --- src/netlist.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/netlist.c b/src/netlist.c index 843a6934..f3267df7 100644 --- a/src/netlist.c +++ b/src/netlist.c @@ -1315,7 +1315,10 @@ static int name_nodes_of_pins_labels_and_propagate() } else { /* handle global nodes (global=1 set as symbol property) 28032003 */ - my_strdup(_ALLOC_ID_, &global_node,get_tok_value((inst[i].ptr+ xctx->sym)->prop_ptr,"global",0)); + my_strdup(_ALLOC_ID_, &global_node,get_tok_value(inst[i].prop_ptr,"global",0)); + if(!xctx->tok_size) { + my_strdup(_ALLOC_ID_, &global_node,get_tok_value((inst[i].ptr+ xctx->sym)->prop_ptr,"global",0)); + } /*20071204 if instance is a label dont define a dir property for more precise erc checking */ } /* obtain ipin/opin/label signal type (default: std_logic) */