3

I'm using ModelSim / Questa-SIM from command line in GUI mode. If ModelSim runs in GUI mode I would like to execute a 'Zoom Fit' from my imported 'wave.do' file.

I pass this file to vsim by -do wave.do. Here is the script:

add wave *
run -all

I started vsim and saved a waveform window as test.do. This file contains statements like this:

WaveRestoreZoom {0 fs} {2724750 ps}

Is it possible to calculate the upper boundary in TCL?

I also found a simtime statement, but using simtime as a second parameter gives an error:

VSIM1> simtime
       # {5,195 ns} {1       } /arith_counter_gray_tb 0 0
VSIM1> WaveRestoreZoom {0 fs} {simetime}
       # zoomrange: invalid range "0 fs simetime"
Paebbels
  • 15,573
  • 13
  • 70
  • 139

1 Answers1

6

If I understand what you're trying to do correctly, wave zoom full works for me.

Your technique works if you use WaveRestoreZoom {0 fs} [simtime]. By putting simtime in curly braces, you're asking for it to be treated as a literal string. Square brackets ask it to try to evaluate the expression within. You could equally use WaveRestoreZoom {0 fs} [eval simtime].

scary_jeff
  • 4,314
  • 13
  • 27