From cc993bfe44ba34d0228b1f99631b55715e56a766 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Sat, 2 Jan 2021 20:33:34 +0100 Subject: [PATCH] added in the menu the (undocumented) "propagate-highlight" function (propagate through conductive elements) --- src/callback.c | 2 +- src/globals.c | 2 +- src/hilight.c | 2 +- src/scheduler.c | 1 + src/xschem.tcl | 2 ++ xschem_library/devices/adc_bridge.sym | 4 ++-- xschem_library/devices/ammeter.sym | 4 ++-- xschem_library/devices/assign.sym | 2 +- xschem_library/devices/capa-2.sym | 4 ++-- xschem_library/devices/connect.sym | 4 ++-- xschem_library/devices/crystal-2.sym | 6 +++--- xschem_library/devices/crystal.sym | 4 ++-- xschem_library/devices/dac_bridge.sym | 4 ++-- xschem_library/devices/diode.sym | 4 ++-- xschem_library/devices/ind.sym | 4 ++-- xschem_library/devices/jumper.sym | 4 ++-- xschem_library/devices/pnp.sym | 2 +- xschem_library/devices/res.sym | 4 ++-- xschem_library/devices/res_ac.sym | 4 ++-- xschem_library/devices/var_res.sym | 6 +++--- xschem_library/examples/cmos_inv.sch | 11 ++++++----- xschem_library/examples/cmos_inv.sym | 8 +++++--- xschem_library/examples/xnor.sym | 4 ++-- 23 files changed, 49 insertions(+), 43 deletions(-) diff --git a/src/callback.c b/src/callback.c index 288b0439..2159e26f 100644 --- a/src/callback.c +++ b/src/callback.c @@ -949,7 +949,7 @@ int callback(int event, int mx, int my, KeySym key, break; } if(key=='K' && state==(ControlMask|ShiftMask)) /* hilight net drilling thru elements */ - /* with 'goto=' prop set on pins */ + /* with 'propag=' prop set on pins */ { if(xctx->semaphore >= 2) break; enable_drill=1; diff --git a/src/globals.c b/src/globals.c index 8114a6cc..980610e0 100644 --- a/src/globals.c +++ b/src/globals.c @@ -216,7 +216,7 @@ int vertical_move=0; int pending_fullzoom=0; double color_dim=0.0; int no_undo=0; -int enable_drill=0; /* pass net hilights through components with 'goto=' property set on pins */ +int enable_drill=0; /* pass net hilights through components with 'propag=' property set on pins */ int batch_mode = 0; /* no tcl console if set; batch mode */ int show_erc=1; diff --git a/src/hilight.c b/src/hilight.c index 471ec3fc..fec758e3 100644 --- a/src/hilight.c +++ b/src/hilight.c @@ -687,7 +687,7 @@ void drill_hilight(int mode) if(entry && (en_hilight_conn_inst || (symbol->type && IS_LABEL_SH_OR_PIN(symbol->type))) ) { xctx->inst[i].color = entry->value; } - my_strdup(1225, &propagate_str, get_tok_value(rct[j].prop_ptr, "goto", 0)); + my_strdup(1225, &propagate_str, get_tok_value(rct[j].prop_ptr, "propag", 0)); if(propagate_str) { int n = 1; const char *propag; diff --git a/src/scheduler.c b/src/scheduler.c index 2b490cf0..64ee90f0 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1061,6 +1061,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg { cmd_found = 1; enable_drill = 0; + if(argc >=3 && !strcmp(argv[2], "drill")) enable_drill = 1; hilight_net(0); /* draw_hilight_net(1); */ redraw_hilights(); diff --git a/src/xschem.tcl b/src/xschem.tcl index f830abce..99a28c68 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -4054,6 +4054,8 @@ if { ( $::OS== "Windows" || [string length [lindex [array get env DISPLAY] 1] ] -command "xschem check_unique_names 0" -accelerator {#} .menubar.hilight.menu add command -label {Rename duplicate instance names} \ -command "xschem check_unique_names 1" -accelerator {Ctrl+#} + .menubar.hilight.menu add command -label {Propagate Highlight selected net/pins} \ + -command "xschem hilight drill" -accelerator {Ctrl+Shift+K} .menubar.hilight.menu add command -label {Highlight selected net/pins} \ -command "xschem hilight" -accelerator K .menubar.hilight.menu add command -label {Send selected net/pins to GAW} \ diff --git a/xschem_library/devices/adc_bridge.sym b/xschem_library/devices/adc_bridge.sym index 1ce3dfad..26f23d29 100644 --- a/xschem_library/devices/adc_bridge.sym +++ b/xschem_library/devices/adc_bridge.sym @@ -11,7 +11,7 @@ E {} L 4 -30 0 30 0 {} L 4 -10 -5 10 0 {} L 4 -10 5 10 0 {} -B 5 27.5 -2.5 32.5 2.5 {name=d dir=out verilog_type=wire goto=1} -B 5 -32.5 -2.5 -27.5 2.5 {name=s dir=in verilog_type=wire goto=0} +B 5 27.5 -2.5 32.5 2.5 {name=d dir=out verilog_type=wire propag=1} +B 5 -32.5 -2.5 -27.5 2.5 {name=s dir=in verilog_type=wire propag=0} T {@name} -25 -10 0 0 0.12 0.12 {} T {@adc_bridge_model} 0 -10 0 0 0.12 0.12 {} diff --git a/xschem_library/devices/ammeter.sym b/xschem_library/devices/ammeter.sym index d6ca9298..eb514018 100644 --- a/xschem_library/devices/ammeter.sym +++ b/xschem_library/devices/ammeter.sym @@ -10,8 +10,8 @@ E {} L 4 0 -30 0 30 {} L 4 -7.5 0 -0 10 {} L 4 -0 10 7.5 0 {} -B 5 -2.5 -32.5 2.5 -27.5 {name=p dir=inout goto=1} -B 5 -2.5 27.5 2.5 32.5 {name=m dir=inout goto=0} +B 5 -2.5 -32.5 2.5 -27.5 {name=p dir=inout propag=1} +B 5 -2.5 27.5 2.5 32.5 {name=m dir=inout propag=0} T {@current} 10 2.5 0 0 0.2 0.2 {layer=15} T {@name} 15 -18.75 0 0 0.2 0.2 {} T {@#0:net_name} 10 -28.75 0 0 0.15 0.15 {layer=15} diff --git a/xschem_library/devices/assign.sym b/xschem_library/devices/assign.sym index 474e8c76..ce5dc70a 100644 --- a/xschem_library/devices/assign.sym +++ b/xschem_library/devices/assign.sym @@ -13,5 +13,5 @@ L 4 -30 0 30 0 {} L 4 -10 -5 10 0 {} L 4 -10 5 10 0 {} B 5 27.5 -2.5 32.5 2.5 {name=d dir=out verilog_type=wire } -B 5 -32.5 -2.5 -27.5 2.5 {name=s dir=in verilog_type=wire goto=0} +B 5 -32.5 -2.5 -27.5 2.5 {name=s dir=in verilog_type=wire goto=0 propag=0} T {@name @delay} -25 -10 0 0 0.1 0.1 {} diff --git a/xschem_library/devices/capa-2.sym b/xschem_library/devices/capa-2.sym index e52c252e..d86e2243 100644 --- a/xschem_library/devices/capa-2.sym +++ b/xschem_library/devices/capa-2.sym @@ -21,8 +21,8 @@ L 4 0 -30 0 -5 {} L 4 -10 -5 10 -5 {} L 4 2.5 -22.5 7.5 -22.5 {} L 4 5 -25 5 -20 {} -B 5 -2.5 -32.5 2.5 -27.5 {name=p dir=inout goto=1 pinnumber=1} -B 5 -2.5 27.5 2.5 32.5 {name=m dir=inout goto=0 pinnumber=2} +B 5 -2.5 -32.5 2.5 -27.5 {name=p dir=inout propag=1 pinnumber=1} +B 5 -2.5 27.5 2.5 32.5 {name=m dir=inout propag=0 pinnumber=2} A 4 0 26.25 21.25 61.92751306414704 56.14497387170592 {} T {@value} 15 0 0 0 0.25 0.2 {} T {@name} 15 -13.75 0 0 0.2 0.2 {} diff --git a/xschem_library/devices/connect.sym b/xschem_library/devices/connect.sym index b86d804a..8cbd2c6e 100644 --- a/xschem_library/devices/connect.sym +++ b/xschem_library/devices/connect.sym @@ -21,5 +21,5 @@ L 4 -5 5 5 -5 {} L 4 -5 10 5 0 {} L 4 -5 15 5 5 {} L 4 0 15 5 10 {} -B 5 -2.5 -32.5 2.5 -27.5 {name=p dir=out goto=1} -B 5 -2.5 27.5 2.5 32.5 {name=m dir=in goto=0} +B 5 -2.5 -32.5 2.5 -27.5 {name=p dir=out propag=1} +B 5 -2.5 27.5 2.5 32.5 {name=m dir=in propag=0} diff --git a/xschem_library/devices/crystal-2.sym b/xschem_library/devices/crystal-2.sym index 379c9cb1..bc082394 100644 --- a/xschem_library/devices/crystal-2.sym +++ b/xschem_library/devices/crystal-2.sym @@ -28,9 +28,9 @@ L 4 -18.75 -7.5 -11.25 -7.5 {} L 4 -18.75 -5 -11.25 -5 {} L 4 -15 -5 -15 0 {} B 4 -7.5 -7.5 7.5 7.5 {} -B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout goto=1 pinnumber=1} -B 5 -32.5 -2.5 -27.5 2.5 {name=G dir=inout goto=0 pinnumber=2} -B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout goto=0 pinnumber=3} +B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout propag=1 pinnumber=1} +B 5 -32.5 -2.5 -27.5 2.5 {name=G dir=inout propag=0 pinnumber=2} +B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout propag=0 pinnumber=3} T {@name} 25 -13.75 0 0 0.2 0.2 {} T {@value} 25 1.25 0 0 0.2 0.2 {} T {@#0:pinnumber} 5 -26.25 0 0 0.2 0.2 {layer=13} diff --git a/xschem_library/devices/crystal.sym b/xschem_library/devices/crystal.sym index e655df22..b86ba5ac 100644 --- a/xschem_library/devices/crystal.sym +++ b/xschem_library/devices/crystal.sym @@ -20,8 +20,8 @@ L 4 0 -30 0 -12.5 {} L 4 -15 12.5 15 12.5 {} L 4 -15 -12.5 15 -12.5 {} B 4 -7.5 -7.5 7.5 7.5 {} -B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout goto=1 pinnumber=1} -B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout goto=0 pinnumber=2} +B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout propag=1 pinnumber=1} +B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout propag=0 pinnumber=2} T {@name} 25 -13.75 0 0 0.2 0.2 {} T {@value} 25 1.25 0 0 0.2 0.2 {} T {@#0:pinnumber} -10 -26.25 0 1 0.2 0.2 {layer=13} diff --git a/xschem_library/devices/dac_bridge.sym b/xschem_library/devices/dac_bridge.sym index 1533eae4..d3366a2c 100644 --- a/xschem_library/devices/dac_bridge.sym +++ b/xschem_library/devices/dac_bridge.sym @@ -11,7 +11,7 @@ E {} L 4 -30 0 30 0 {} L 4 -10 -5 10 0 {} L 4 -10 5 10 0 {} -B 5 27.5 -2.5 32.5 2.5 {name=d dir=out verilog_type=wire goto=1} -B 5 -32.5 -2.5 -27.5 2.5 {name=s dir=in verilog_type=wire goto=0} +B 5 27.5 -2.5 32.5 2.5 {name=d dir=out verilog_type=wire propag=1} +B 5 -32.5 -2.5 -27.5 2.5 {name=s dir=in verilog_type=wire propag=0} T {@name} -25 -10 0 0 0.12 0.12 {} T {@dac_bridge_model} 0 -10 0 0 0.12 0.12 {} diff --git a/xschem_library/devices/diode.sym b/xschem_library/devices/diode.sym index d3dc4e1f..74450ed3 100644 --- a/xschem_library/devices/diode.sym +++ b/xschem_library/devices/diode.sym @@ -1,4 +1,4 @@ -v {xschem version=2.9.8 file_version=1.2} +v {xschem version=2.9.9 file_version=1.2 } G {} K {type=diode format="@name @pinlist @model area=@area" @@ -17,7 +17,7 @@ E {} L 4 0 5 0 30 {} L 4 0 -30 0 -5 {} L 4 -10 5 10 5 {} -B 5 -2.5 -32.5 2.5 -27.5 {name=p dir=inout pinnumber=1} +B 5 -2.5 -32.5 2.5 -27.5 {name=p dir=inout pinnumber=1 propag=1} B 5 -2.5 27.5 2.5 32.5 {name=m dir=inout pinnumber=2} P 4 4 -0 5 -10 -5 10 -5 0 5 {fill=true} T {@#0:pinnumber} -5 -26.25 0 1 0.2 0.2 {layer=13} diff --git a/xschem_library/devices/ind.sym b/xschem_library/devices/ind.sym index f61cd9b5..dc075e07 100644 --- a/xschem_library/devices/ind.sym +++ b/xschem_library/devices/ind.sym @@ -63,8 +63,8 @@ L 4 6.25 12.5 7.5 10.9375 {} L 4 0 13.75 6.25 12.5 {} L 4 7.5 -26.25 7.5 -21.25 {} L 4 5 -23.75 10 -23.75 {} -B 5 -2.5 -32.5 2.5 -27.5 {name=p dir=inout goto=1 pinnumber=1} -B 5 -2.5 27.5 2.5 32.5 {name=m dir=inout goto=0 pinnumber=2} +B 5 -2.5 -32.5 2.5 -27.5 {name=p dir=inout propag=1 pinnumber=1} +B 5 -2.5 27.5 2.5 32.5 {name=m dir=inout propag=0 pinnumber=2} T {@#0:pinnumber} -10 -27.5 0 1 0.2 0.2 {layer=13} T {@#1:pinnumber} -10 17.5 0 1 0.2 0.2 {layer=13} T {@#0:net_name} 5 -42.5 0 0 0.15 0.15 {layer=15} diff --git a/xschem_library/devices/jumper.sym b/xschem_library/devices/jumper.sym index 31bf1132..c2d99f20 100644 --- a/xschem_library/devices/jumper.sym +++ b/xschem_library/devices/jumper.sym @@ -16,8 +16,8 @@ L 4 0 15 0 30 {} L 4 0 -30 0 -15 {} L 4 2.5 -22.5 7.5 -22.5 {} L 4 5 -25 5 -20 {} -B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout goto=1 pinnumber=1} -B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout goto=0 pinnumber=2} +B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout propag=1 pinnumber=1} +B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout propag=0 pinnumber=2} A 4 0 12.5 2.5 270 360 {} A 4 0 -12.5 2.5 270 360 {} T {@name} 15 -13.75 0 0 0.2 0.2 {} diff --git a/xschem_library/devices/pnp.sym b/xschem_library/devices/pnp.sym index 22004272..d07b8fe1 100644 --- a/xschem_library/devices/pnp.sym +++ b/xschem_library/devices/pnp.sym @@ -1,4 +1,4 @@ -v {xschem version=2.9.8 file_version=1.2} +v {xschem version=2.9.9 file_version=1.2 } G {} K {type=pnp format="@spiceprefix@name @pinlist @model area=@area m=@m" diff --git a/xschem_library/devices/res.sym b/xschem_library/devices/res.sym index b61c9cf0..8fef4248 100644 --- a/xschem_library/devices/res.sym +++ b/xschem_library/devices/res.sym @@ -34,8 +34,8 @@ L 4 -7.5 -17.5 0 -20 {} L 4 0 -30 0 -20 {} L 4 2.5 -22.5 7.5 -22.5 {} L 4 5 -25 5 -20 {} -B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout goto=1 pinnumber=1} -B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout goto=0 pinnumber=2} +B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout propag=1 pinnumber=1} +B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout propag=0 pinnumber=2} T {@name} 15 -18.75 0 0 0.2 0.2 {} T {@value} 15 -6.25 0 0 0.2 0.2 {} T {@#0:pinnumber} -10 -26.25 0 1 0.2 0.2 {layer=13} diff --git a/xschem_library/devices/res_ac.sym b/xschem_library/devices/res_ac.sym index 70788d9b..788f52b7 100644 --- a/xschem_library/devices/res_ac.sym +++ b/xschem_library/devices/res_ac.sym @@ -24,8 +24,8 @@ L 4 -7.5 -17.5 0 -20 {} L 4 0 -30 0 -20 {} L 4 2.5 -22.5 7.5 -22.5 {} L 4 5 -25 5 -20 {} -B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout goto=1 pinnumber=1} -B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout goto=0 pinnumber=2} +B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout propag=1 pinnumber=1} +B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout propag=0 pinnumber=2} T {@name} 15 -18.75 0 0 0.2 0.2 {} T {@value} 15 -6.25 0 0 0.2 0.2 {} T {@#0:pinnumber} -10 -26.25 0 1 0.2 0.2 {layer=13} diff --git a/xschem_library/devices/var_res.sym b/xschem_library/devices/var_res.sym index a6b221df..a8569c77 100644 --- a/xschem_library/devices/var_res.sym +++ b/xschem_library/devices/var_res.sym @@ -32,9 +32,9 @@ L 4 -20 -5 -10 0 {} L 4 -20 -5 -20 5 {} L 4 -20 5 -10 -0 {} L 4 -30 0 -20 -0 {} -B 5 -32.5 -2.5 -27.5 2.5 {name=C dir=inout goto=1 pinnumber=1} -B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout goto=0 pinnumber=2} -B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout goto=1 pinnumber=3} +B 5 -32.5 -2.5 -27.5 2.5 {name=C dir=inout propag=1 pinnumber=1} +B 5 -2.5 27.5 2.5 32.5 {name=M dir=inout propag=0 pinnumber=2} +B 5 -2.5 -32.5 2.5 -27.5 {name=P dir=inout propag=1 pinnumber=3} T {@name} 15 -13.75 0 0 0.2 0.2 {} T {@value} 15 1.25 0 0 0.2 0.2 {} T {@#2:pinnumber} -10 -28.75 0 1 0.2 0.2 {layer=13} diff --git a/xschem_library/examples/cmos_inv.sch b/xschem_library/examples/cmos_inv.sch index 06fd9c25..5e1fa800 100644 --- a/xschem_library/examples/cmos_inv.sch +++ b/xschem_library/examples/cmos_inv.sch @@ -1,6 +1,7 @@ -v {xschem version=2.9.8 file_version=1.2} +v {xschem version=2.9.9 file_version=1.2 } G {} K {type=subcircuit +function0="1 ~" format="@name @pinlist @symname WN=@WN WP=@WP LLN=@LLN LLP=@LLP m=@m" template="name=X1 WN=15u WP=45u LLN=3u LLP=3u m=1" } @@ -17,12 +18,12 @@ N 60 -230 100 -230 {lab=A} N 140 -230 190 -230 {lab=Z} N 140 -340 140 -320 {lab=VDD} N 140 -140 140 -120 {lab=0} -C {nmos4.sym} 120 -170 0 0 {name=M1 model=n w=WN l=LLN m=1 net_name=true} -C {pmos4.sym} 120 -290 0 0 {name=M2 model=p w=WP l=LLP m=1 net_name=true} +C {opin.sym} 190 -230 0 0 {name=p2 lab=Z} +C {ipin.sym} 60 -230 0 0 {name=p1 lab=A goto=0} C {vdd.sym} 140 -340 0 0 {name=l1 lab=VDD} C {lab_pin.sym} 140 -120 0 0 {name=l2 sig_type=std_logic lab=0} -C {ipin.sym} 60 -230 0 0 {name=p1 lab=A} -C {opin.sym} 190 -230 0 0 {name=p2 lab=Z} +C {pmos4.sym} 120 -290 0 0 {name=M2 model=p w=WP l=LLP m=1 net_name=true} +C {nmos4.sym} 120 -170 0 0 {name=M1 model=n w=WN l=LLN m=1 net_name=true} C {lab_pin.sym} 140 -170 0 1 {name=l3 sig_type=std_logic lab=0} C {lab_pin.sym} 140 -290 0 1 {name=l4 sig_type=std_logic lab=VDD} C {title.sym} 160 -30 0 0 {name=l5 author="Stefan Schippers"} diff --git a/xschem_library/examples/cmos_inv.sym b/xschem_library/examples/cmos_inv.sym index e6784123..e521a423 100644 --- a/xschem_library/examples/cmos_inv.sym +++ b/xschem_library/examples/cmos_inv.sym @@ -1,5 +1,7 @@ -v {xschem version=2.9.7 file_version=1.2} -G {type=subcircuit +v {xschem version=2.9.9 file_version=1.2 } +G {} +K {type=subcircuit +function0="1 ~" format="@name @pinlist @symname WN=@WN WP=@WP LLN=@LLN LLP=@LLP m=@m" verilog_primitive=true verilog_format="assign #80 @@Z = ~ @@A ;" @@ -14,7 +16,7 @@ L 4 -27.5 -20 16.25 0 {} L 4 -27.5 20 16.25 0 {} L 4 26.25 0 40 0 {} B 5 37.5 -2.5 42.5 2.5 {name=Z dir=out } -B 5 -42.5 -2.5 -37.5 2.5 {name=A dir=in } +B 5 -42.5 -2.5 -37.5 2.5 {name=A dir=in goto=0 propag=0} A 4 21.25 -0 5 180 360 {} T {@name} -26.25 -5 0 0 0.2 0.2 {} T {@symname} -26.25 35 0 0 0.2 0.2 {} diff --git a/xschem_library/examples/xnor.sym b/xschem_library/examples/xnor.sym index 717b638c..912bf107 100644 --- a/xschem_library/examples/xnor.sym +++ b/xschem_library/examples/xnor.sym @@ -19,9 +19,9 @@ L 4 -25 -30 -5 -30 {} L 4 -25 30 -5 30 {} B 5 57.5 -2.5 62.5 2.5 {name=Z dir=out verilog_type=wire} B 5 -42.5 -22.5 -37.5 -17.5 {name=A dir=in -goto=0} +goto=0 propag=0} B 5 -42.5 17.5 -37.5 22.5 {name=B dir=in -goto=0} +goto=0 propag=0} A 4 40 0 5 180 360 {} A 4 -9.642857142857142 17.85714285714286 48.0818286351295 21.80140948635181 62.65738573560834 {} A 4 -4.6875 -11.25 41.25118369513777 269.5659493678606 74.60789655596687 {}