Main Content

Stream Write

Stream data from processor algorithms to shared memory

Since R2020b

  • Stream Write block

Libraries:
SoC Blockset / Processor I/O

Description

The Stream Write block streams data from your processor algorithm to shared memory in the Memory Channel block. The Stream Write block has an internal counter that keeps track of the number of empty buffers in the shared memory. After a successful read from memory, the memory sends a done signal to the Stream Write block. Then, the block increments the counter, asserting that a buffer is available in the memory. A write transaction is successful if at least one buffer is available for writing. The Stream Write block sends a status of True back to the software. You can use this status signal to perform actions such as counting dropped frames or issuing rewrite requests.

In simulation, a timer-driven or event-driven task subsystem contains the Stream Write block. The data signals from the software algorithm connect to the Stream Write block. The write transaction is issued as a message to the Memory channel block. After a read operation from shared memory, the Memory Channel block notifies the Stream Write block of the read event via the done signal.

Examples

Ports

Input

expand all

This port receives a data frame from the software algorithm. The block then streams the data as a message to a region of shared memory defined in the Memory Channel block.

Data Types: uint16 | uint32 | uint64 | fixdt(0,128,0)

This message port receives a notification from the connected Memory Channel or IO Data Sink block. The notification indicates that a read transaction completed and that a buffer in memory is available for writing.

Data Types: Boolean

Output

expand all

When buffer space is available in the memory, this message port emits data messages to the connected Memory Channel or IO Data Sink block. For more information on messages, see Messages.

Data Types: SoCData

This port sends a true status(1) to the processor after a write transaction to memory occurred. Use this status to count dropped frames.

Data Types: Boolean

Parameters

expand all

The device name parameter is generated by the SoC Builder tool. Enter the name and channel of the IP core on the FPGA as a colon-separated list.

Enter the number of data frame buffers in the physical memory. This number must match the Number of buffers parameter in the Memory Channel or IO Data Sink block.

  • Select this parameter to use this block in event-driven task subsystems. In this case, the block writes to the Memory Channel block each time an empty buffer is available in the shared memory region.

  • Clear this parameter to use this block in timer-driven task subsystems. In this case, the block writes the data in the shared memory region at each sample time.

Extended Capabilities

Version History

Introduced in R2020b