I am writing a test bench in which I am trying to define a bit stream like so:
`define PREAMBLE (10'b1010101011)
`define FUNC_ENERGY (4'b0001)
reg bit_stream_tb = {`PREAMBLE, `FUNC_ENERGY, 1'b1};
Once I display the bit_stream_tb in my initial statement, I only get a '1'.
$display("bit_stream: ", bit_stream_tb);
Output:
bit_stream: 1
How do I concatenate it so that the output is:
bit_stream: 1010101011 0001 1
PREAMBLE FUNC_ENERGY
without the whitespaces of course.
In later stages of my program I want to be able to "spam" a series of `DEFINES to get a bit stream. I thought the easiest way is to just concatenate into a reg, this doesn't work as intended.
I do not want to have a long `DEFINE like so:
`DEFINE `PREAMBLE `FUNC_ENERGY 1,
because it is not as modular as I like.