MATLAB Loop Optimization
R2026bOptimize loops in MATLAB code
Loop optimization in HDL Coder involves streaming or unrolling loops to balance hardware area and speed. Loop streaming saves hardware resources by reusing the loop body. Loop unrolling increases speed by duplicating the loop body.
Functions
coder.hdl.loopspec | Unroll or stream loops in generated HDL and High-Level Synthesis (HLS) code |
Topics
- Optimize MATLAB Loops
Optimize loops for area or speed.
- Loop Streaming to Reduce Area
This example shows how to use the design-level loop streaming optimization in HDL Coder™ to reduce area.
