Limitation: DSim -defparam
errors on Windows machines
Problem
DSim may fail on Windows machines when the -defparam
option is used, with an error message like this:
=E: [BadDefparamConv]: Failed to convert defparam token to type of generic:
Workaround
Either install PowerShell 7 or use -defparam
in a file list.
Install PowerShell 7
1. Close the terminal running DSim. If you're running DSim from within Visual Studio Code, close Visual Studio Code.
3. Re-run DSim.
Use -defparam
in a File List
1. Create a file list containing all the -defparam
arguments needed to pass to the dsim
command. Example file lists:
-defparam value="string paramater value" some_file.sv -defparam value1="string paramater value1" -defparam value2="string paramater value2" some_file.sv -defparam value1="string paramater value1" some_file1.sv -defparam value2="string paramater value2" some_file2.sv
2. Save the file list. Eg. defParamArgs.txt
3. Pass the file list as an option to the dsim
command with the -f
option. Ensure the path to the file list is relative to the directory in which DSim is invoked. Eg.
In DSim:
dsim -top work.carry_lookahead_adder_tb -L dut +acc+b -waves waves.mxd -f defParamArgs.txt
In DSim Studio, enter
-top work.carry_lookahead_adder_tb -L dut +acc+b -waves waves.mxd -f defParamArgs.txt
into the Options box of the simulation configuration.
In DSim Cloud:
mdc dsim -a '-top work.carry_lookahead_adder_tb -L dut +acc+b -waves waves.mxd -f defParamArgs.txt'
4. Run the simulation.
Cause
Older versions of PowerShell, including Windows PowerShell, do not properly parse the string in the -defparam
option.
Products Affected
- DSim Studio
- DSim
- DSim Cloud
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article