BSFIFO – Binary Structure - Queueing serialize and deserialize

Block SymbolLicensing group: ADVANCED
PIC

Function Description
This block sequentially adds or removes data to/from the buffer (passed to the uBuff input). The elementary unit in a buffer is a column. All matrices (ie matrices or vectors fed to the inputs uBuff, uMatIn, uMatOut) must have the same column size in bytes. Data is organized as either a queue (if REV=off) or a stack (if REV=on). The behavior of the block depends on the inputs in this way:

  • If PUSH=on, the content of the uMatIn matrix (all defined columns) is inserted into the buffer.
  • If POP=on, the number of columns determined by the col parameter is removed from the buffer and this data is inserted into the uMatOut matrix (it must be of sufficient size).
  • If R1=on, the data is reloaded (mainly the number of valid columns) into the block buffer. Own data is transmitted by reference and is therefore shared. This signal has priority and blocks PUSH, POP signals.

Error states (e.g. mismatched matrix dimensions, insufficient space in some matrices, lack of data in the buffer) are indicated on the iE output and by a message in the SystemLog.

Inputs

uBuff

Binary Structure (array of bytes) input

Reference

uMatIn

Input reference to a matrix or vector (for PUSH)

Reference

uMatOut

Input reference to a matrix or vector (for POP)

Reference

PUSH

Enable push data

Bool

POP

Enable pop data

Bool

R1

Buffer reset (reload headers from uBuff)

Bool

Parameters

OW

Overwrite oldest items in buffer

Bool

REV

Pop last pushed item first

Bool

col

Number of output (pop) columns  1

Long (I32)

Outputs

yBuff

Copy of the uBuff input, for easy chaining

Reference

yMatIn

Output reference to a matrix or vector uMatIn

Reference

yMatOut

Output reference to a matrix or vector uMatOut

Reference

iused

Used bytes in queue

Long (I32)

ifree

Free bytes in queue

Long (I32)

iE

Error code

Error

2024 © REX Controls s.r.o., www.rexygen.com