使用持久变量建模
R2026b持久变量使您能够对寄存器建模。在用于 HDL 代码生成的 MATLAB 设计中使用持久变量和 System object 对状态和延迟建模。
持久数组变量使您能够对 RAM 建模。默认情况下,HDL Coder™ 软件通过将持久数组变量映射到 RAM 来优化设计的面积。
主题
- Map Persistent Variables and Persistent Arrays to RAM
MATLAB persistent variable and persistent array variable language support for HDL and High-Level Synthesis (HLS) code generation.
- Generate Hardware Instances for Local Functions
The following example shows how to use local functions in MATLAB, so that each execution of a local function corresponds to a separate hardware module in the generated HDL code.
- Map Persistent Arrays and dsp.Delay Objects to RAM
If your MATLAB code or Simulink MATLAB Function block contains long persistent arrays or
dsp.DelaySystem object™ objects, you can reduce the FPGA resources that your design uses by mapping them to block RAM. - Map Matrices to ROM
Map matrices to implement ROM in MATLAB and Simulink.

