Pardon the wordiness of the question's title. How would you accomplish the following. I have this parameter:
parameter BUS_SIZE = 16;
And I want to use it later in the code to declare some constants. Currently, I am doing this:
someReg <= 16'h8F;
The hardcoded 16'h8F
means that the code is not flexible, and defeats the purpose of the parameter.
What is the proper way to declare this constant? This is what I've come up with, but I'm not sure it would work or if there is something more elegant available:
`define dBUS_SIZE BUS_SIZE
...
someReg <= `dBUS_SIZE'h8F;