I am trying to write a tcl script for my decoder module (verilog in modelsim)
I need to loop the 'din' input value from from 000 to 111
Thats what i've come up with by now.
vsim work.decode_shift
add wave -noupdate -format Logic -radix binary /decode_shift/din
add wave -noupdate -format Logic -radix binary /decode_shift/dout
for { set i 0 } { $i==0111 } { incr i } {
force din $i
run 100
}
run @500ns
It doesn't work because of some type issue that i din't know how to bypass. What am i doing wrong and what is the proper way to increment binary digits in tcl?