^

AR# 44786 AutoESL - Sharing internal AP_STREAMs and its scope


Example case:

I attempted to define ap_stream across several files andreceived no warning from AutoESL. However, the resulting RTL is incorrect; it does not pass my testbench (while it did pass when all parts of the design were in a single file).

The internal ap_stream is converted to an ap_vld interface for subfunction outputs and an ap_none interface for subfunction inputs, while I would expect ap_fifo.

What is happening?


Sharing internal AP_STREAMs between source files is not supported.

AP_STREAMS can be used in functions defined in different files. However, if the AP_STREAM does not appear in the design interface, it is defined as being only internal by using the static qualifier. This, by definition of the 'static' qualifier, makes the stream private to the source file in which it is defined, so any functions that require access to the stream must be defined in the same file.

For 2011.4.2 AutoESL and before, all internal (static) AP_STREAMs need to also be defined in the top-level source file in order to be implemented correctly as FIFOs. Even if all functions using the internal AP_STREAM are defined in the same source file, this file must include the top-level function. This limitation is scheduled to be fixed in 2012.1 AutoESL.

The use of AP_STREAM_SIZE() macro for internal streams is recommended for size specification of the underlying memory.
AR# 44786
Date Created 01/17/2012
Last Updated 06/01/2012
Status Active
Type
Tools
  • AutoESL - 2011.3
  • AutoESL - 2011.4
  • AutoESL - 2011.4.2
  • More
Feed Back