Main Content

Map Matrices to ROM

To map a matrix constant to ROM:

  • Read one matrix element at a time.

  • The matrix size must be greater than or equal to the value specified for RAM mapping threshold.

    To learn how to set the RAM mapping threshold in MATLAB, see Enable RAM Mapping.

  • Read accesses to the matrix must not be within a feedback loop.

If your MATLAB® code meets these requirements, HDL Coder™ inserts a no-reset register at the output of the matrix in the generated code. Many synthesis tools infer a ROM from this code pattern.