Altera_Forum
Honored Contributor
12 years agoAn array of constants / parameters
I have several constants that I want to concatenate and place into an array (reg / parameter?). That array will be compared to another array of the exact same size.
reg setup_packet;
reg byte0 = 8'h01;
parameter getdevicedescriptor = {byte0 && byte1,
word0, word1,
byte2 && byte3
};
if (setup_packet == getdevicedescriptor) status <= rejoice;
.....
I keep getting the following error and I just don't undertsand how to resolve the proper syntax. I don't really understand packed vs unpacked arrays. D; --- Quote Start --- Error (10673): SystemVerilog error at usb_protocol.v(46): assignments to unpacked arrays must be aggregate expressions --- Quote End ---