stanford
Full Member level 2
Let's say that I have a data[WIDTH-1:0]. I want to use a parameter in RTL to provide the reset value for this data.
How do I make this work syntax wise? Is it even possible?
Thanks!
Code:
parameter RESET_VALUE = 5;
logic [WIDTH-1:0] data;
always_ff @(posedge clk)
if (~reset)
data <= WIDTH'd (RESET_VALUE);
else
....
How do I make this work syntax wise? Is it even possible?
Thanks!