I haven’t had chance to work with ASIC tools yet. So I have doubts regarding the synthesisability of a signal which is constant inside the IP. And this signal is not clocked/register. So I cannot initialise it with reset. I know initial blocks are not supported for synthesis. So I would like to know if I can get away with following options. Which of these are synthesisable in ASIC?
logic [31:0] offset = 32’hA0A0A0A0 ;
const logic [31:0] offset = 32’hA0A0A0A0 ;
Or is it better to use localparam or macros which are compile time constants?
I know is it a little confusing, but a const variable is not a constant; it is a write once variable. It gets initialized once at the beginning of the variable’s lifetime.
It you really want a constant, use a parameter, then it cane be used for things like declaring the width of another variable.