We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 44786

AutoESL - Sharing of internal AP_STREAMs and scope


I have attempted to define ap_stream across several files and received 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, whereas 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.

As a result, 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 fixed in the 2012.1 release of AutoESL.

The use of the AP_STREAM_SIZE() macro for internal streams is recommended for size specification of the underlying memory.

Linked Answer Records

Master Answer Records

Answer Number Answer Title Version Found Version Resolved
47431 Xilinx Vivado HLS Solution Center - Design Assistant N/A N/A
AR# 44786
Date Created 01/17/2012
Last Updated 10/21/2014
Status Active
Type Solution Center
  • AutoESL - 2011.3
  • AutoESL - 2011.4
  • AutoESL - 2011.4.2
  • AutoESL