![]() |
|
|
|||||||
![]() |
VHDL - Modelsim command line: How to pass a generic parameter for my testbench ? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hello all,
That's my first post .. I have a testbench.vhd having the following entity: Code:
Additionally, I wrote a file.do that compiles everything and run the testbench from the command line <linux>: Code:
The file.do looks like: Code:
Is there a way to pass the generic parameter "Mode" from the command line? Thanks in advance, Tarek tarekeldeeb Last edited by tarekeldeeb : 03-09-2009 at 06:22 AM. |
|
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Jan 2008
Location: BAngalore
Posts: 5
|
Vsim command use -g<genericname>=<value>
vsim -gMode=64 -c -do file.do cheevu |
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Mar 2009
Posts: 4
|
Quote:
Furthermore, can I specify more options to check for it in the file.do as: vsim -gMode=64 -c -<more options> showme -do file.do and in the file.do: if [showme] {add signals to wave, and view it} Or I'm just daydreaming ? Thanks in advance, Tarek tarekeldeeb Last edited by tarekeldeeb : 03-10-2009 at 02:04 PM. |
|
|
|
|
|
|
#4 | |
|
Junior Member
Join Date: Mar 2009
Posts: 4
|
Quote:
OOps ! Sorry, but it did not work!! Adding the "-GMode=128" to the command line call did not work. But it worked when added to the file.do ie: The file.do looks now like: Code:
but I want to pass the generic from the command terminal, not by editing the file.do itself. Can this be done ? tarekeldeeb Last edited by tarekeldeeb : 03-10-2009 at 02:08 PM. |
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Mar 2009
Posts: 4
|
For Allah's sake and the community,
I found the solution in the linux terminal: Code:
and in the file.do, you have to check the $argv Code:
salam tarekeldeeb |
|
|
|