coder.hdl.loopspec | Unroll or stream loops in generated HDL code |
coder.hdl.pipeline | Insert pipeline registers at output of MATLAB expression |
Speed and Area Optimizations in HDL Coder
Learn about various speed and area optimizations and how to optimize your design.
Configure clock enable to run at design base rate or input data rate.
Generate code for registers without clock enables
Constant Multiplier Optimization
What is Constant multiplier optimization and how to specify this optimization
Map Persistent Arrays and dsp.Delay to RAM
In the HDL Workflow Advisor, select MATLAB to HDL Workflow > Code Generation > Optimizations tab.
To map a matrix constant to ROM:If your MATLAB® code meets these requirements, HDL Coder™ inserts a no-reset register at the output of the matrix in the generated code.
RAM mapping is an area optimization that maps storage and delay elements in your MATLAB code to RAM.
RAM Mapping Comparison for MATLAB Code
hdl.RAM
, dsp.Delay
, persistent
array variables, and user-definedSystem object™ private properties can map to RAM, but have different attributes.
Pipelining helps achieve a higher maximum clock rate by inserting registers at strategic points in the hardware to break the critical path.
Insert registers at output of MATLAB expression.
Optimize loops for area or speed.
Distributed pipelining definition, benefits, and costs.