Altera_Forum
Honored Contributor
10 years agoVerilog Error
Could you please let me know how to declare a synthesizable array of constants? The constants are shown in the define directive. The below is giving an error. I am new to verilog .
Thanks `define DATA_0 1 `define DATA_1 2 `define DATA_2 4 `define DATA_3 8 `define DATA_4 16 `define DATA_5 32 `define DATA_6 64 `define DATA_7 128 module IRC (......); input x,y,z; out alpha, beta; reg alpha, beta; reg [7:0] IDATA [31:0] = {DATA_0, DATA_1, DATA_2, DATA_3, DATA_4, DATA_5, DATA_6, DATA_7}; ... begin .... .... endmodule