readout_rm/hilbert_dpi/codegen/dll/hilbert_fir/loop_detect.tcl

24 lines
441 B
Tcl

#!/usr/bin/tclsh
proc loop_detect {args} {
set help "-help"
if { [string equal $args $help] != 1 } {
config followactivescope on
set i 0;
while {$i < $args} {
run_step
incr i
}
} else {
puts "Usage: loop_detect <no. of iteration>"
}
}
proc run_step {} {
redirect -f loop.txt -a {set x [step]};
redirect -f loop.txt -a {set y [scope]};
puts $x;
puts $y;
}