FIFO Write

Write simple data streams

  • Library:
  • Simulink Real-Time / RS232

Description

The FIFO Write block is the write side of a FIFO read/write pair. It is used to generate simple data streams.

Ports

Input

expand all

Vector containing the data to write to the FIFO.

Dependency

To determine the data type of this vector, set the parameter Input vector type.

Data Types: int8 | uint8 | int16 | uint16 | int32 | uint32

Output

expand all

Connects to the FIFO that writes data to the serial port.

If data is present in the FIFO, returns true.

Dependency

To cause this port to become visible, set parameters Max and Min read size ports and Enable passthrough.

Parameters

expand all

Enter the number of elements that can be held in the FIFO at one time. If a write operation to the FIFO causes the number of elements to exceed Size, an error occurs.

Programmatic Use

Block Parameter: size

For the 16-bit and 32-bit data types, include as first element the number of elements to expect in the rest of the input vector. The count controls how many bytes that the block copies into the FIFO. The block does not copy the count itself into the FIFO.

For the 8-bit data types, provide a null terminated character vector in the output vector. The block copies data into the FIFO up to, but not including, the null terminator.

For more information, see RS-232 Composite Drivers.

Programmatic Use

Block Parameter: inputtype

Select this check box to create the Boolean output DP. If data is present in the FIFO, DP becomes true. The transmit side of the send/receive subsystem uses this output. This output is given to the Enable TX block, which enables the transmitter buffer empty interrupt.

Causes output port DP to become visible.

Programmatic Use

Block Parameter: present

Enter the base sample time or a multiple of the base sample time. -1 means that sample time is inherited.

Programmatic Use

Block Parameter: sampletime

Enter a user-defined identifier for FIFO overflow messages.

Programmatic Use

Block Parameter: id

Introduced in R2008a