Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to execute 'Zoom Fit' in ModelSim/QuestaSim from TCL console?

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"
like image 350
Paebbels Avatar asked Oct 17 '25 16:10

Paebbels


1 Answers

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].

like image 183
scary_jeff Avatar answered Oct 20 '25 15:10

scary_jeff