Buffer
This block buffers the inputs, by row, as the block is activated through its I port, and outputs the buffered content once the block is activated through its O port. The full output activation port can be connected to the port O for output buffering when the buffer is full.
Library
Activate/Buffers
Description
This block buffers and outputs a sequence of input vectors. Whenever an activation signal arrives at the activation port I, this block samples the input and places its value in the buffer. When an activation signal arrives at the activation port O, this block outputs the buffer content; content is originally initialized to zero. The buffer length is fixed and can be set by defining the parameter "Buffer length". This block accepts column vectors as input. The output is a matrix exposing the content of the buffer in different ways. The output activation port generates an event when the buffer is full, and can be used to initiate a buffer output by connecting it to port O.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
bufferlength | Buffer length | Defines the buffer size. If the input row size is Nrow and the buffer size is Nbuffer, the output is a matrix of size Nrow*Nbuffer. | Scalar | |
initialoutput | Initial output | Matrix | ||
reverseBuffer | Reverse buffer | Specifies the direction in which the buffer is populated. When this option is selected and the buffer is non-circular, the latest input is placed in the last column of the output after pushing other columns to the left. If the buffer is circular, the latest input is placed in the column specified by a pointer that is incremented at every activation on the I port. The pointer starts at 1 and returns to 1 after reaching Nbuffer. | Number | 0 |
circularBuffer | Circular buffer | When this option is selected and the buffer is not in reverse mode, the latest input is placed in the column specified by a pointer that is decremented at every activation on the I port. The pointer starts at Nbuffer and returns to Nbuffer after reaching 1. In reverse mode, the pointer is incremented and starts at 1 and returns to 1 after reaching Nbuffer. When this option is deselected, the input is pushed in the buffer either in the first or last column, shifting other columns, depending on the reverse buffer mode. | Number | 0 |
feedthrough | Feedthrough | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | Input port which can be a column vector of any datatype. | input | 1 |
Port 2 | explicit | Output of size Nrow*Nbuffer where Nrow is the inout row size and Nbuffer is the buffer size. | output | 1 |
I | activation | input | 1 | |
O | activation | input | 2 | |
full | activation | output | 1 |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | no | |
direct-feedthrough | no | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |