Altera_Forum
Honored Contributor
12 years agoInitialize parameter of an array type
Hi,
In VHDL, we can have something like this: TYPE memory1 is array (0 to 11) of std_logic_vector(7 downto 0); constant RVSeq: memory1 := (X"40", X"52", X"56", X"30", X"30", X"34", X"30", X"30", X"35", X"30", X"31", X"2A"); in which we initialize each member of array RVSeq to a fixed value. How do we do the same thing in Verilog? Example: parameter [7:0] RVSeq [11:0] = (8'h40, 8'h52, 8'h56, 8'h30, 8'h30, 8'h34, 8'h30, 8'h30, 8'h35, 8'h30, 8'h31, 8'h2A); It gives me compilation error of error (10170): verilog hdl syntax error at rs232.v(22) near text ","; expecting ")"Thanks for the advice!