主要内容

本页翻译不是最新的。点击此处可查看最新英文版本。

缓冲区、开关和计数器

R2026a
更改信号的采样率或帧速率、对事件进行计数、检测边缘以及当事件发生时执行操作

使用 Buffer、Unbuffer 和 Delay Line 等帧重缓冲模块在 Simulink® 中转换信号速率和帧大小。使用 Simulink 中的 Queue、Stack 模块和 MATLAB® 中的 dsp.AsyncBuffer 对象实现 FIFO 和 LIFO 缓冲区。您还可以使用 DSP System Toolbox™ 中的开关模块和计数器模块对事件进行计数、检测边缘以及在事件发生时执行操作。

对象

dsp.AsyncBufferFIFO buffer

函数

rebuffer_delayNumber of samples of delay introduced by buffering and unbuffering operations

模块

全部展开

Buffer blockBuffer将输入序列分组或合并为更小或更大的帧大小
N-Ratio Buffer blockN-Ratio BufferBuffer input data into integer-multiple-sized frames (自 R2026a 起)
Delay Line blockDelay LineRebuffer sequence of inputs
Queue blockQueueStore inputs in FIFO register
Stack blockStackStore inputs into LIFO register
Unbuffer blockUnbufferUnbuffer input frame into sequence of scalar outputs
N-Ratio Unbuffer blockN-Ratio UnbufferUnbuffer input data into integer-factor-sized frames (自 R2026a 起)
Counter blockCounterCount up or down through specified range of numbers
Edge Detector blockEdge DetectorDetect transition from zero to nonzero value
Event-Count Comparator blockEvent-Count ComparatorDetect threshold crossing of accumulated nonzero inputs
Multiphase Clock blockMultiphase ClockGenerate multiple binary clock signals
N-Sample Enable blockN-Sample EnableOutput ones or zeros for specified number of sample times
N-Sample Switch blockN-Sample SwitchSwitch between two inputs after specified number of sample periods

主题