Design Considerations for RAM Blocks and Blocks in HDL Operations Library
Follow these guidelines to learn how you can use RAM blocks and blocks in the HDL Operations library when modeling your design.
Each guideline has a severity level that indicates the level of compliance requirements. To learn more, see HDL Modeling Guidelines Severity Levels.
RAM Block Access Considerations
Guideline ID
2.1.1
Severity
Recommended
Description
In the HDL RAMs block library, there are seven different
RAM blocks and a HDL FIFO block. If you see a RAM block that has
the term System
as part of the block name, such as
Single Port RAM System, it is recommended that you use this
block instead of the equivalent block that does not have
System
as part of the name, such as Single Port
RAM. These blocks have System
as part of the name
because the block implementation is based on the hdl.RAM
System object™. The system blocks support vector inputs and yield much faster
simulation results when used in your Simulink® model.
When you use these blocks, make sure that the input sample time and output sample time are the same. This table illustrates the various RAM blocks that you can use and their purpose. The generated HDL code for these blocks maps to RAM in most FPGAs.
Block Name | Recommended Usage |
---|---|
Single Port RAM System | Use this block to replace the Single Port RAM block in your model. You obtain faster simulation results when using this block in your model. The block implementation uses a
MATLAB
System block that uses the The block
does not support boolean inputs. Cast
|
Simple Dual Port RAM System | Use this block to replace the Simple Dual Port RAM block in your model. You obtain faster simulation results when using this block in your model. The block implementation uses a
MATLAB System block that uses the
The block does not support boolean
inputs. Cast |
Dual Port RAM System | Use this block to replace the Dual Port RAM block in your model. You obtain faster simulation results when using this block in your model. The block implementation uses a
MATLAB System block that uses the
The block does not support boolean
inputs. Cast |
True Dual Port RAM System | The block implementation uses a MATLAB
System block that uses the
The block does not support boolean
inputs. Cast |
Simple Tri Port RAM System | The block implementation uses a MATLAB
System block that uses the
The block does not support boolean
inputs. Cast |
Dual Rate Dual Port RAM | This block does not have an equivalent System object-based implementation. Use this block to perform simultaneous read and write operations to two different addresses that operate at different clock rates. You cannot perform concurrent access to the same address of the RAM. To run the RAM
ports at multiple clock rates, set Clock
Inputs to |
HDL FIFO | The HDL FIFO block stores a sequence of samples in a first in, first out (FIFO) register. The inputs,
The signals
The input and output rates of the FIFO block are synchronous to each other. |
Serial to Parallel Conversion
Guideline ID
2.1.2
Severity
Informative
Description
You can use the Serializer1D and Deserializer1D blocks to perform serial to parallel and parallel to serial conversion.