tclmodelsimquestasim

Passing $args as a substitution for vsim arguments gives an error


I want to use $args as a substitution for some of the vsim arguments.

** UI-Msg: (vish-3296) Unknown option '-assertdebug -classdebug'

vlog -sv time_diff_test.sv
vopt time_diff_test +acc -o dbgver
set args "-assertdebug -classdebug"
vsim dbgver $args # error
vsim dbgver -assertdebug -classdebug # runs fine

I think vsim is defined as a proc on the simulator(questasim) side and it recognizes the $args as a single argument. So it throws an error since no such argument is available. Do anybody know a workaround with this issue?


Solution

  • This might be correct:

    vsim dbgver {*}$args