Hello,
I have a PLL Model in Verilog which has
parameter base_frequency = 1.5 ( 1.5 GHz )
parameter step_size = 0.040 ( 40 MHz )
Is it possible to use $valueplusargs and pass command line values and change the
paramter. I need to have different base frequency values and different step size values to be
passed
run_command +base_freq=1.7 +step_size=0.050
Thanks
JeffD
In reply to dvuvmsv:
Hello,
I have a PLL Model in Verilog which has
parameter base_frequency = 1.5 ( 1.5 GHz )
parameter step_size = 0.040 ( 40 MHz )
Is it possible to use $valueplusargs and pass command line values and change the
paramter. I need to have different base frequency values and different step size values to be
passed
run_command +base_freq=1.7 +step_size=0.050
Thanks
JeffD
We cannot change the verilog parameter in run-time simulation using $value$plusargs.
The parameter is constant and only can be assigned in compile-time with default value, or elaboration-time with overriden value
In reply to dvuvmsv:
Hello,
I have a PLL Model in Verilog which has
parameter base_frequency = 1.5 ( 1.5 GHz )
parameter step_size = 0.040 ( 40 MHz )
Is it possible to use $valueplusargs and pass command line values and change the
paramter. I need to have different base frequency values and different step size values to be
passed
run_command +base_freq=1.7 +step_size=0.050
Thanks
JeffD
No, you can’t change the parameter at run time.
isn’t it possible for you to use the variable instead of parameter and then use the $valueplusargs?
Hi Chris and Rahul,
Thanks for your reply. Instead of parameter what variable can I use ?
I need values like 1.5, 1.6, 1.7 … I cannot use integer. Which datatype
can I use instead of parameter ?
parameter base_frequency = 1.5
parameter step_size = 0.040
Thanks
JeffD
In reply to dvuvmsv:
Hi Chris and Rahul,
Thanks for your reply. Instead of parameter what variable can I use ?
I need values like 1.5, 1.6, 1.7 … I cannot use integer. Which datatype
can I use instead of parameter ?
parameter base_frequency = 1.5
parameter step_size = 0.040
Thanks
JeffD
‘real’ or ‘shortreal’ should be OK.
module top;
real step_size = 0.040;
initial begin
if($value$plusargs("step_size=%f", step_size)) begin
$display("step_size = %f", step_size);
end
end
endmodule