Could anyone tell me how to create an array that can store real
values in Verilog? I tried the following, but it did not work:
real [31:0] in1_table [0:256];
Could anyone tell me how to create an array that can store real
values in Verilog? I tried the following, but it did not work:
real [31:0] in1_table [0:256];
One way is to use an unpacked array. Change:
to:
This works for me with 2 different simulators:
Output:
Refer to IEEE Std 1800-2012, section 7.4 "Packed and unpacked arrays".
From "7.4.1 Packed arrays"
I interpret this to mean that packed arrays of type
real
are not permitted.This assumes you wanted a multi-dimensional array of reals (32x257 reals).