better handle simulation interruption

This commit is contained in:
Stefan Frederik 2021-01-12 22:07:27 +01:00
parent 37f52dd625
commit afef3e059f
4 changed files with 7 additions and 9 deletions

View File

@ -1231,7 +1231,6 @@ void logic_set(int value, int num)
static int map[] = {LOGIC_0, LOGIC_1, LOGIC_X, LOGIC_Z};
struct hilight_hashentry *entry;
tclsetvar("tclstop", "0");
prepare_netlist_structs(0);
if(!xctx->simdata.valid) create_simdata();
rebuild_selected_array();

View File

@ -525,7 +525,8 @@ descr="START SIMULATION"
comment="
This launcher Starts a simple interactive simulation of the LFSR
"
tclcommand=" set count 0
tclcommand=" set tclstop 0 ;# clear stop flag
set count 0
xschem select instance l23 ;# VSS
xschem select instance p11 ;# CLEAR
xschem select instance p8 ;# CLOCK

View File

@ -334,7 +334,8 @@ descr="START SIMULATION"
comment="
This launcher Starts a simple interactive simulation of the LFSR
"
tclcommand=" set count 0
tclcommand=" set tclstop 0 ;# clear stop flag
set count 0
set duration 1000
xschem select instance p8 ;# CLEAR_
xschem select instance p9 ;# CLK

View File

@ -339,7 +339,9 @@ descr="START SIMULATION"
comment="
This launcher Starts a simple interactive simulation
"
tclcommand=" set count 0
tclcommand="
set tclstop 0 ;# clear stop flag
set count 0
set duration 400
xschem select instance p20 ;# A
xschem select instance p19 ;# B
@ -363,30 +365,25 @@ tclcommand=" set count 0
xschem select instance p20 clear
after $duration
if \{$count>100 || $tclstop == 1\} break
xschem select instance p19
xschem logic_set [expr int(rand()*2.)]
xschem select instance p19 clear
after $duration
if \{$count>100 || $tclstop == 1\} break
xschem select instance p5
xschem logic_set [expr int(rand()*2.)]
xschem select instance p5 clear
after $duration
if \{$count>100 || $tclstop == 1\} break
xschem select instance p69
xschem logic_set [expr int(rand()*2.)]
xschem select instance p69 clear
after $duration
if \{$count>100 || $tclstop == 1\} break
xschem select instance p72
xschem logic_set [expr int(0.8 + rand()*1.2)]
xschem select instance p72 clear
after $duration
\}
"