Non-blocking write and read methods are also provided. These allow execution to continue even when a read is attempted on an empty stream or a write to a full stream.
These methods return a Boolean value indicating the status of the access (true
if successful, false
otherwise). Additional methods are included for testing the status of an hls::stream<>
stream.
Important: Non-blocking behavior is only
supported on interfaces using the
ap_fifo
protocol. More
specifically, the AXI-Stream standard and the Xilinx
ap_hs
IO protocol do not support non-blocking
accesses.During C simulation, streams have an infinite size. It is therefore not possible to validate with C simulation if the stream is full. These methods can be verified only during RTL simulation when the FIFO sizes are defined (either the default size of 1, or an arbitrary size defined with the STREAM directive).
Important: If the design is specified to
use the block-level I/O protocol ap_ctrl_none and the design contains any hls::stream
variables that employ non-blocking behavior, C/RTL co-simulation is not guaranteed to
complete.