主要内容

层次化设计与同步硬件行为

R2026b
使用 State Control 模块创建子系统和层次化 HDL 设计

要进行大型设计建模,您可以将模型划分为若干子系统并创建层次化设计。为实现同步硬件行为并生成硬件友好的 HDL 代码,请在子系统内使用 State Control 模块。

模型设置

代码重用Specify whether to generate a reusable file for subsystems (自 R2022a 起)
从封装子系统生成参数化 HDL 代码Generate reusable HDL code for subsystems
对寄存器使用 "rising_edge/falling_edge" 样式使用 rising_edge 或 falling_edge 检测生成代码中的时钟跳变
原子子系统通过资源复用优化来复用 Atomic Subsystem 模块

模块

全部展开

Unit Delay Enabled Synchronous blockUnit Delay Enabled SynchronousDelay input signal by one sample period when external Enable signal is true
Unit Delay Resettable Synchronous blockUnit Delay Resettable SynchronousDelay input signal by one sample period when external Reset signal is false
Unit Delay Enabled Resettable Synchronous blockUnit Delay Enabled Resettable SynchronousDelay input signal by one sample period when external Enable signal is true and external Reset signal is false
Tapped Delay Enabled Synchronous BlockTapped Delay Enabled SynchronousDelay scalar signal multiple sample periods and output all delayed versions when external Enable signal is true (自 R2023a 起)
Tapped Delay Resettable Synchronous BlockTapped Delay Resettable SynchronousDelay scalar signal multiple sample periods and output all delayed versions when external Reset signal is false (自 R2023a 起)
Tapped Delay Enabled Resettable Synchronous BlockTapped Delay Enabled Resettable SynchronousDelay scalar signal multiple sample periods and output all delayed versions when external Enable signal is true and external Reset signal is false (自 R2023a 起)
Enabled Delay blockEnabled DelayDelay input signal by fixed or variable sample periods when external enable signal is true (自 R2024b 起)
Enabled Resettable Delay blockEnabled Resettable DelayDelay input signal by fixed or variable sample periods when external Enable signal is true and external Reset signal is false (自 R2024b 起)
State Control blockState ControlSpecify synchronous reset and enable behavior for blocks with state
Synchronous Subsystem blockSynchronous SubsystemRepresent subsystem that has synchronous reset and enable behavior
Enabled Synchronous Subsystem blockEnabled Synchronous SubsystemRepresent enabled subsystem that has synchronous reset and enable behavior
Resettable Synchronous Subsystem blockResettable Synchronous SubsystemRepresent resettable subsystem that has synchronous reset and enable behavior

主题

精选示例