When the incoming stream of image data is not stoppable, as it is typically the case when data comes from a camera sensor, special care must be taken in order to avoid overflow of input buffers. Consider the following effects:
-
M-type operators may slow down processing (i.e., PARALLELdn).
-
Synchronizing different data streams with SYNC may introduce wait cycles.
-
Some kernel based operators like FIRkernelNxM require extra clock cycles before accepting new data after the end of a line and even more after the end of a frame.
In general, it is a good idea to instrument the input data path with a circuit like the following one for monitoring whether a design can deal with the input data rate:
The hierarchical box Control is designed as follows:
This circuit measures the number of buffered data words between the input and the output of FIFO StartFifo. The FIFO StartFifo is configured for taking a non-stoppable data stream (parameter InfiniteSource = ENABLED). It is useful to define a buffer size so one or a few lines can be stored in that FIFO.
Check the read parameter of the operator MaxPixelInFifo during or after operation. If the subsequent image processing pipeline is able to deal with the input data rate there should be a low number showing that the FIFO is only needed to buffer a few data words.
If you find that your design cannot operate with the input data rate, you have following options:
-
Increase the throughput of your design, in particular by increasing the parallelism.
-
Decrease the amount of data which needs to be processed, for example, you may operate on a reduced image size by dropping some data from the sensor.
-
Use a RAM-based image buffer operator for decoupling the input data rate from the processing rate.