Streaming Library - Non-Blocking Behaviour
(Ask a Question)As mentioned above, non-blocking FIFO behaviour can be created with the use of
empty()
and full()
functions. Non-blocking FIFO read
and write can be achieved as shown below.
if (!fifo_a.empty()) unsigned data_in = fifo_a.read(); if (!fifo_b.full()) fifo_b.write(data_out);
Important:
A deadlock may occur if a fifo with a depth of 0 uses non-blocking write on its source and non-block read on its sink.