diff --git a/src/xschem.tcl b/src/xschem.tcl index c05f4973..b667872a 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -1772,11 +1772,6 @@ proc simulate {{callback {}}} { set cmd [subst -nobackslashes $sim($tool,$def,cmd)] set save [pwd] cd $netlist_dir - if {[info exists has_x]} { - set button_path [xschem get top_path].menubar.simulate - $button_path configure -bg yellow - set tctx::[xschem get current_win_path]_simulate yellow - } if {$OS == "Windows"} { # $cmd cannot be surrounded by {} as exec will change forward slash to backward slash set_simulate_button list [xschem get top_path] [xschem get current_win_path] @@ -1801,7 +1796,12 @@ proc simulate {{callback {}}} { " # puts $cmd set id [eval $fg $st $cmd] - if {[info exists has_x]} {set tctx::[xschem get current_win_path]_simulate_id $id} + if {[info exists has_x] && $id >= 0} { + set tctx::[xschem get current_win_path]_simulate_id $id + set button_path [xschem get top_path].menubar.simulate + $button_path configure -bg yellow + set tctx::[xschem get current_win_path]_simulate yellow + } puts "Simulation started: execution ID: $id" } cd $save diff --git a/xschem_library/examples/poweramp.sch b/xschem_library/examples/poweramp.sch index 4ad3b99c..81714cad 100644 --- a/xschem_library/examples/poweramp.sch +++ b/xschem_library/examples/poweramp.sch @@ -347,18 +347,8 @@ vvss vss 0 dc 0 ** SPICE models for active devices and put them into the below ** referenced file in simulation directory. .include \\"models_poweramp.txt\\" -.control -save all -op -write poweramp_op.raw -tran 8e-7 0.07 uic -* .FOUR 20k v(outm,outp) -* .probe i(*) -plot outp outm -save p(r*) p(v*) -write poweramp.raw -quit 0 -.endc +.save all +.tran 8e-7 0.07 uic "} C {simulator_commands.sym} 1020 -870 0 0 {name=COMMANDS1 simulator=xyce