Hi,
Is there a way to pass parameter to "do file" in the command line in vsim?
Intuitively, it will be something like this
usr@host>vsim tb_dm -c -do mysim.do 1144
(the 1144 is the parameter to be passed into mysim.do)
but it doesn't work...
Hi,
Is there a way to pass parameter to "do file" in the command line in vsim?
Intuitively, it will be something like this
usr@host>vsim tb_dm -c -do mysim.do 1144
(the 1144 is the parameter to be passed into mysim.do)
but it doesn't work...
It doesn't work because Tcl treats "mysim.do" and "1144" as two completely separate arguments to the [vsim] command. So "mysim.do" is treated as the value of the "-do" option, and "1144" is an orphan.
I can't remember the exact behaviour of the -do option, but you could make it work a slightly different way. The "-do" can be given either the name of a script, or a complete command. So this will be OK:
vsim tb_dm -c -do "do mysim.do 1144"
Note that the command goes in quotes. Tcl programmers might expect to use curly brackets instead, but if you're using Windows the OS command shell will smash it up into separate words. The double-quotes protect the Tcl command from processing by the shell.
HTH
-- Jonathan Bromley, Consultant DOULOS - Developing Design Know-how VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK Tel: +44 (0)1425 471223 mail:jonathan.bromley@doulos.com Fax: +44 (0)1425 471573 Web: http://www.doulos.com The contents of this message may contain personal views which are not the views of Doulos Ltd., unless specifically stated.
It works! My script is much cleaner now. :D
Thanks.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.