I want to put in a ROM a vector of values I have in the workspace. Does anyone know how to do it? Thank you to all possible references, articles or comments.
1 Answer
Use a ROM block (from the memory section of the Xilinx blockset).
It has a parameter called Inital value vector
- put the name of the vector in there. Put length(vector_name)
in the depth
parameter.
Setup the output type
tab to the fixed point representation you want to use. Bear in mind the sizes of RAM bclock you have available in the target FPGA when selecting the number of bits
. For example, 2k elements of 9 bits fits just as well in a single RAM block as 2k elements of 8 bits (in case you, or other readers, aren't already aware of that).
Job done!
-
\$\begingroup\$ It has been so easy that is difficult to believe. \$\endgroup\$ Commented Feb 11, 2011 at 11:41