I have defined a value using `define. Now I want to change the value of that macro using commndline. How to change that value?
I believe that in the simulator command line just add +define+NAME_OF_MACRO=VALUE
HTH,
Ronald
In reply to rgarcia07:
Thanks For Response. Can we change the value of parameter from commandline ? I have tried but it doesn’t impact on code.
In reply to Vyom:
Yes You can. Using `define along with parameter
`define P 2
module tb;
parameter T=`P;
initial
$display (T);
Use below switch along the compilation command line
+define+P=20
The value of parameter T now becomes 20
In reply to Vyom:
Some tools allow you to change the value of a parameter from the command line. You will have to look at the User Manual of your tool, or contact your vendor as this forum is not for tool specific help.