I know I have asked a similar question before but this one is a little tricky:
Given:
global chip
global reg
global reg${chip}x${reg}
What I want to do is display the contents of
reg${chip}x${reg} by looping since chip is from 1 to 2 and reg is from 0 to 31. Here is what I have:
set c 1
while {$c <= 2} {
set i 0
while {$i <= 31} {
puts $fileId "R $c $i $reg${c}x${i}" -----PROBLEM
incr i
}
incr c
}
Given:
global chip
global reg
global reg${chip}x${reg}
What I want to do is display the contents of
reg${chip}x${reg} by looping since chip is from 1 to 2 and reg is from 0 to 31. Here is what I have:
set c 1
while {$c <= 2} {
set i 0
while {$i <= 31} {
puts $fileId "R $c $i $reg${c}x${i}" -----PROBLEM
incr i
}
incr c
}