T
tuclogicguy
Guest
I am trying to figure out how to initialize an array in Verilog. I am
coding a function that uses a lookup table with 512 entries. This was
easy to do in VHDL; I just coded an array constant with initial values
for every location (wrote a C program to generate the VHDL array
constant statement and all its values) and used an integer signal as an
index into the array. Now I am trying to convert this design to
Verilog. I currently have something working using a $readmemh statement
in an initial block, but I need something that is synthesizable. I'm
beginning to think that the only practical way of doing this in Verilog
is with a big case statement. Any comments/suggestions?
Thanks,
Charles Bailey
coding a function that uses a lookup table with 512 entries. This was
easy to do in VHDL; I just coded an array constant with initial values
for every location (wrote a C program to generate the VHDL array
constant statement and all its values) and used an integer signal as an
index into the array. Now I am trying to convert this design to
Verilog. I currently have something working using a $readmemh statement
in an initial block, but I need something that is synthesizable. I'm
beginning to think that the only practical way of doing this in Verilog
is with a big case statement. Any comments/suggestions?
Thanks,
Charles Bailey