缓冲区、开关和计数器
使用 Buffer、Unbuffer 和 Delay Line 等帧重缓冲模块在 Simulink® 中转换信号速率和帧大小。使用 Simulink 中的 Queue、Stack 模块和 MATLAB® 中的 dsp.AsyncBuffer
对象实现 FIFO 和 LIFO 缓冲区。您还可以使用 DSP System Toolbox™ 中的开关模块和计数器模块对事件进行计数、检测边缘以及在事件发生时执行操作。
对象
dsp.AsyncBuffer | FIFO buffer |
函数
rebuffer_delay | Number of samples of delay introduced by buffering and unbuffering operations |
模块
主题
- Sample- and Frame-Based Concepts
Explore basic signal concepts in the context of a Simulink model. Learn more about sample-based processing and frame-based processing.
- Buffering and Frame-Based Processing
Convert signals of frame size
1
into signals of frame size greater than1
, and vice versa. - Convert Sample and Frame Rates in Simulink Using Frame Rebuffering Blocks
Learn how frame rebuffering blocks impact the sample rate and frame rate of signals in Simulink models.
- Delay and Latency
Configure the Simulink environment to minimize delay and increase simulation performance.
- Why Does Reading Data from the dsp.AsyncBuffer Object Give a Dimension Mismatch Error in MATLAB Function Block?
Resolve the dimension mismatch error when you read data from an Async buffer inside the MATLAB function block.
- Why Does the dsp.AsyncBuffer Object Error When You Call read Before write?
Initialize the async buffer by calling either setup or write before the first call to read.