From 3e2bc9f95e2f84c87123c2b8d42f6fbe4e3b4ff8 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Thu, 22 Sep 2022 19:47:25 +0200 Subject: [PATCH] added "Annotate operating point" into Simulation menu --- src/draw.c | 1 + src/xschem.tcl | 5 +++-- xschem_library/devices/vsource_arith.sym | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/draw.c b/src/draw.c index 76d4b223..7594a2f8 100644 --- a/src/draw.c +++ b/src/draw.c @@ -3214,6 +3214,7 @@ void draw(void) #endif #endif if(xctx->no_draw) return; + xctx->show_hidden_texts = tclgetboolvar("show_hidden_texts"); rebuild_selected_array(); if(has_x) { if(xctx->draw_pixmap) diff --git a/src/xschem.tcl b/src/xschem.tcl index f0375eea..3614544b 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -4782,7 +4782,6 @@ proc housekeeping_ctx {} { xschem set hide_symbols $hide_symbols xschem set draw_window $draw_window xschem case_insensitive $case_insensitive - xschem set show_hidden_texts $show_hidden_texts if {![info exists tctx::[xschem get current_win_path]_simulate]} { [xschem get top_path].menubar.simulate configure -bg $simulate_bg } else { @@ -5217,7 +5216,7 @@ proc build_widgets { {topwin {} } } { xschem redraw } $topwin.menubar.view.menu add checkbutton -label "Show hidden texts" -variable show_hidden_texts \ - -command {xschem set show_hidden_texts $show_hidden_texts; xschem redraw} + -command {xschem redraw} $topwin.menubar.view.menu add command -label "Change current layer color" -accelerator {} -command { change_color } @@ -5403,6 +5402,8 @@ proc build_widgets { {topwin {} } } { $topwin.menubar.simulation.menu add command -label {Add waveform graph} -command {xschem add_graph} $topwin.menubar.simulation.menu add checkbutton -label "Live annotate probes with 'b' cursor" \ -variable live_cursor2_backannotate + $topwin.menubar.simulation.menu add command -label "Annotate Operating Point into schematic" \ + -command {set show_hidden_texts 1; xschem annotate_op} $topwin.menubar.simulation.menu add separator $topwin.menubar.simulation.menu add checkbutton -label "LVS netlist: Top level is a .subckt" -variable top_subckt $topwin.menubar.simulation.menu add checkbutton -label "Use 'spiceprefix' attribute" -variable spiceprefix \ diff --git a/xschem_library/devices/vsource_arith.sym b/xschem_library/devices/vsource_arith.sym index 999135c9..6fb537ec 100644 --- a/xschem_library/devices/vsource_arith.sym +++ b/xschem_library/devices/vsource_arith.sym @@ -18,5 +18,5 @@ T {@VOL} 20 0 0 0 0.2 0.2 {} T {@name} 20 -17.5 0 0 0.2 0.2 {} T {@#0:net_name} 5 -42.5 0 0 0.15 0.15 {layer=15} T {@#1:net_name} 5 32.5 0 0 0.15 0.15 {layer=15} -T {tcleval(id=[ngspice::get_node [subst -nocommand \{i($\{path\}@name\\\\)\}]] )} 12.5 15 0 0 0.2 0.2 {layer=15 +T {@spice_get_current} 12.5 15 0 0 0.2 0.2 {layer=15 hide=true}