Circular Buffer
Overview
This operator copies input values into a circular buffer, which has the length specified in the property BufferLength.The resulting buffer or vector will be placed at the output when BufferIntervalCount input samples have been read.
Operator ports
Input S: Floating point valuesOutput V: Floating point value buffers
Properties
Find more information about changing properties here: "Properties Viewer"BufferLength
type: Integer valueThe length of the outgoing buffer. Note: changing this will reset the buffer! Only zero or positive values are allowed.
VectorOutput
type: True or FalseDetermine if the output buffers are just data buffers (false), or mathematical vectors (true).
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'
True or False
True may also be read like 'yes' and false like 'no'
Many operators in Polybench can be used for data buffers as well as for mathematical vectors (describing points in a multi-demensional space). Some of the operators behave differently for buffers and vectors, therefore if you intend to do vector calculation, it is important to set this property.
BufferIntervalCount
type: Integer valueThe amount of incoming data samples between two outputs. Note: changing this will change the output sample frequency! Only positive values (excluding 0) are allowed.
For example, if the BufferIntervalCount property is 5, then for each five input samples, one output vector is created.
Caption
type: Word or phraseThe name of the object in the project. This name must not contain '.', '$' nor '@' characters.
For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".
Documentation
type: See descriptionOptional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.
Details
The Circular Buffer transforms streaming data to a buffer linearly. Once the end of the buffer has been reached, the oldest data points will start to be overwritten.The buffer is aligned with the incoming sample values, i.e. the oldest data points will always be the first fields of the buffer at the output.
The output sample frequency of the Circular Buffer operator is the input sample frequency divided by BufferIntervalCount.
Explanation: The left rectangle shows 9 floating point samples that arrive at the input of the Circular Buffer operator. The Circular Buffer is set up to put out buffers with 3 fields. Automatically, each next set of three samples is copied to a buffer and put out, as shown in the right rectangle.
Buffers or vectors
In many cases this operator is used to create buffers of data for statistical purposes, but sometimes the buffers are interpreted as mathematical (complex) vectors, describing points in a multidimensional space. Those vectors use the same infrastructure as ordinary buffers, so there is almost no difference - except that some calculations are different for buffers and vectors.See the VectorOutput property to control this behavior.
Operators that behave differently for buffers and vectors will have extra notes in the manual that describe the way they handle vectors.
Examples
Example: CircularBuffer Example
The Circular Buffer transforms streaming data to vector linearly, and once it has reached the end of the vector, will begin overwriting the oldest data points. Note: the vector will be aligned (i.e. the oldest data points will always be in first fields of the vector).Examples\DF0506003_001_Circular Buffer Exmp.xmc