diff --git a/doc/xschem_man/developer_info.html b/doc/xschem_man/developer_info.html index bad620aa..ad83f17a 100644 --- a/doc/xschem_man/developer_info.html +++ b/doc/xschem_man/developer_info.html @@ -541,6 +541,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns" +
  • abort_operation
  • @@ -1225,6 +1226,8 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
          
  • cadsnap set mouse snap (default: 10)
  • color_ps set color psoscript (1 or 0)
  • constrained_move set constrained move (1=horiz, 2=vert, 0=none)
  • +
  • cursor1_x set graph cursor1 position
  • +
  • cursor2_x set graph cursor2 position
  • draw_window set drawing to window (1 or 0)
  • fix_broken_tiled_fill alternate drawing method for broken GPUs
  • fix_mouse_coord fix for wrong mouse coords in RDP software
  • @@ -1454,7 +1457,6 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns" - diff --git a/src/scheduler.c b/src/scheduler.c index 3066df7e..d02dc94e 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -4135,6 +4135,28 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg else if(!strcmp(argv[2], "constrained_move")) { /* set constrained move (1=horiz, 2=vert, 0=none) */ constrained_move = atoi(argv[3]); } + else if(!strcmp(argv[2], "cursor1_x")) { /* set graph cursor1 position */ + xctx->graph_cursor1_x = atof(argv[3]); + + if(xctx->rects[GRIDLAYER] > 0) { + Graph_ctx *gr = &xctx->graph_struct; + xRect *r = &xctx->rect[GRIDLAYER][0]; + if(r->flags & 1) { + backannotate_at_cursor_b_pos(r, gr); + } + } + } + else if(!strcmp(argv[2], "cursor2_x")) { /* set graph cursor2 position */ + xctx->graph_cursor2_x = atof(argv[3]); + + if(xctx->rects[GRIDLAYER] > 0) { + Graph_ctx *gr = &xctx->graph_struct; + xRect *r = &xctx->rect[GRIDLAYER][0]; + if(r->flags & 1) { + backannotate_at_cursor_b_pos(r, gr); + } + } + } else if(!strcmp(argv[2], "draw_window")) { /* set drawing to window (1 or 0) */ if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;} xctx->draw_window=atoi(argv[3]); diff --git a/xschem_library/examples/mos_power_ampli.sch b/xschem_library/examples/mos_power_ampli.sch index 95714843..be744ce0 100644 --- a/xschem_library/examples/mos_power_ampli.sch +++ b/xschem_library/examples/mos_power_ampli.sch @@ -491,14 +491,11 @@ foreach \{n s t\} [xschem instance_list] \{ set curr 0 if \{$t == \{resistor\} || $t == \{ammeter\} \} \{ set curr [expr \{ abs([from_eng [xschem translate $n \{@spice_get_current\}]])\}] - \} - if \{$t == \{pnp\} || $t == \{npn\}\} \{ + \} elseif \{$t == \{pnp\} || $t == \{npn\}\} \{ set curr [expr \{abs([ngspice::get_current $n\\\\\\[ic\\\\\\]])\}] - \} - - if \{$t == \{nmos\}\} \{ + \} elseif \{$t == \{nmos\}\} \{ set curr [expr \{abs([ngspice::get_current $n.rd\\\\\\[i\\\\\\]])\}] - \} + \} else \{continue\} if \{$curr > 0.02\} \{ xschem set hilight_color 11 xschem hilight_instname $n fast