periodic update of process status dialog, updated delta_sigma and rom8k examples for allowing batch mode ngspice run
This commit is contained in:
parent
e603a71651
commit
99f31e4535
|
|
@ -377,6 +377,34 @@ proc insert_running_cmds {lb} {
|
|||
}
|
||||
}
|
||||
|
||||
# periodically update status
|
||||
proc update_process_status {lb} {
|
||||
global execute
|
||||
set exists 0
|
||||
set selected [$lb curselection]
|
||||
if { [winfo exists .pstat] } {
|
||||
if { $selected ne {} && [llength $selected] == 1} {
|
||||
.pstat.text delete 1.0 end
|
||||
set idx $selected
|
||||
set cmd1 [$lb get $idx]
|
||||
foreach {id pid cmd2} [get_running_cmds] {
|
||||
if { $cmd1 eq $cmd2 } {
|
||||
if {[catch { set t $execute(data,$id) } err]} {
|
||||
set t $err
|
||||
}
|
||||
.pstat.text insert 1.0 $t
|
||||
.pstat.text yview moveto 1
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
after 1000 "update_process_status $lb"
|
||||
} else {
|
||||
after cancel "update_process_status $lb"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# display stdout of selected sub-process
|
||||
proc view_process_status {lb} {
|
||||
global execute
|
||||
|
|
@ -404,6 +432,7 @@ proc view_process_status {lb} {
|
|||
}
|
||||
}
|
||||
}
|
||||
after 1000 "update_process_status $lb"
|
||||
}
|
||||
|
||||
# top level dialog displaying running sub-processes
|
||||
|
|
@ -1133,7 +1162,7 @@ proc set_sim_defaults {{reset {}}} {
|
|||
set_ne sim(spice,0,fg) 0
|
||||
set_ne sim(spice,0,st) 0
|
||||
|
||||
set_ne sim(spice,1,cmd) {ngspice -b -r "$n.raw" -o "$n.out" "$N"}
|
||||
set_ne sim(spice,1,cmd) {ngspice -b -r "$n.raw" "$N"}
|
||||
set sim(spice,1,name) {Ngspice batch}
|
||||
set_ne sim(spice,1,fg) 0
|
||||
set_ne sim(spice,1,st) 1
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
v {xschem version=3.4.4 file_version=1.2
|
||||
v {xschem version=3.4.5 file_version=1.2
|
||||
*
|
||||
* This file is part of XSCHEM,
|
||||
* a schematic capture and Spice/Vhdl/Verilog netlisting tool for circuit
|
||||
|
|
@ -95,7 +95,9 @@ C {title.sym} 160 -30 0 0 {name=l1 author="Stefan Schippers"}
|
|||
C {lab_pin.sym} 270 -670 0 0 {name=p33 lab=VREF}
|
||||
C {vsource.sym} 270 -640 0 0 {name=v2 value="'VCC/2'"}
|
||||
C {lab_pin.sym} 270 -610 0 0 {name=p34 lab=0}
|
||||
C {code_shown.sym} 10 -440 0 0 {name=CONTROL
|
||||
C {simulator_commands.sym} 10 -390 0 0 {name=INTERACTIVE
|
||||
simulator=ngspice
|
||||
spice_ignore=0
|
||||
tclcommand="xschem edit_vi_prop"
|
||||
xxplace=end
|
||||
value="
|
||||
|
|
@ -165,3 +167,35 @@ descr="Netlist + Simulate
|
|||
Ctrl-Left-Click"
|
||||
tclcommand="xschem netlist; xschem simulate"
|
||||
}
|
||||
C {simulator_commands.sym} 150 -390 0 0 {name=BATCH_MODE
|
||||
simulator=ngspice
|
||||
spice_ignore=1
|
||||
tclcommand="xschem edit_vi_prop"
|
||||
xxplace=end
|
||||
value="
|
||||
** download the models from:
|
||||
** https://ptm.asu.edu/modelcard/65nm_bulk.txt
|
||||
.include models_65nm.txt
|
||||
.model switch sw vt='VCC/2' vh=0.2 ron=1000 roff=1G
|
||||
.param VCC=1.2
|
||||
.option method=GEAR
|
||||
.measure tran avg1 AVG v(x1.qn) from=1u to=3u
|
||||
.measure tran avg2 AVG v(x1.qn) from=4u to=6u
|
||||
.measure tran avg3 AVG v(x1.qn) from=7u to=9u
|
||||
* save all
|
||||
.tran 0.2n 9u uic
|
||||
"}
|
||||
C {launcher.sym} 70 -210 0 0 {name=h2
|
||||
descr="Swap interactive / batch mode"
|
||||
tclcommand="proc simswap \{\} \{
|
||||
|
||||
set x [xschem getprop instance INTERACTIVE spice_ignore]
|
||||
xschem setprop instance BATCH_MODE spice_ignore $x
|
||||
set x [expr \{ !$x\}]
|
||||
xschem setprop instance INTERACTIVE spice_ignore $x
|
||||
\}
|
||||
|
||||
simswap
|
||||
|
||||
"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -364,8 +364,9 @@ C {spice_probe.sym} 1670 -790 0 0 {name=p91 analysis=tran}
|
|||
C {launcher.sym} 1050 -1320 0 0 {name=h3
|
||||
descr="Graph Manual page"
|
||||
url="https://xschem.sourceforge.io/stefan/xschem_man/graphs.html"}
|
||||
C {simulator_commands.sym} 470 -150 0 0 {name=COMMANDS
|
||||
C {simulator_commands.sym} 470 -150 0 0 {name=INTERACTIVE
|
||||
simulator=ngspice
|
||||
spice_ignore=0
|
||||
only_toplevel=false
|
||||
value="
|
||||
.options SCALE=0.10
|
||||
|
|
@ -395,7 +396,7 @@ vvss vss 0 0
|
|||
.include models_rom8k.txt
|
||||
|
||||
"}
|
||||
C {simulator_commands.sym} 600 -150 0 0 {name=COMMANDS1
|
||||
C {simulator_commands.sym} 600 -150 0 0 {name=COMMANDS
|
||||
place=header
|
||||
simulator=xyce
|
||||
only_toplevel=false
|
||||
|
|
@ -481,8 +482,9 @@ tclcommand="
|
|||
\}
|
||||
"
|
||||
}
|
||||
C {simulator_commands.sym} 340 -150 0 0 {name=BATCH\\ MODE
|
||||
C {simulator_commands.sym} 340 -150 0 0 {name=BATCH_MODE
|
||||
simulator=ngspice
|
||||
spice_ignore=1
|
||||
only_toplevel=false
|
||||
value="
|
||||
.options SCALE=0.10
|
||||
|
|
@ -508,3 +510,17 @@ vvss vss 0 0
|
|||
.include models_rom8k.txt
|
||||
|
||||
"}
|
||||
C {launcher.sym} 300 -240 0 0 {name=h7
|
||||
descr="Swap interactive / batch mode"
|
||||
tclcommand="proc simswap \{\} \{
|
||||
|
||||
set x [xschem getprop instance INTERACTIVE spice_ignore]
|
||||
xschem setprop instance BATCH_MODE spice_ignore $x
|
||||
set x [expr \{ !$x\}]
|
||||
xschem setprop instance INTERACTIVE spice_ignore $x
|
||||
\}
|
||||
|
||||
simswap
|
||||
|
||||
"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue