UPGRADE YOUR BROWSER

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# 60458

Vivado HLS 2014.1 SystemC: ap_mem_port & AXI4M_bus_port cannot be used together

Description

I have the following in my header file:
 
#define SC_INCLUDE_FX
#define SC_FX_EXCLUDE_OTHER
#include"systemc.h"
#include "AXI4_if.h"
#include "ap_mem_if.h"

SC_MODULE(stream_tx)
{
sc_in <bool>  clock;
sc_in <bool>  reset;
sc_in <bool>  button;
sc_out<bool>  led;
ap_mem_port<sc_int<32>, int, 8192> data_array;
sc_in<bool> should_be_zero;  
sc_in<unsigned int>  trigger;
sc_in<unsigned int>  address;
sc_in<unsigned int>  size;
AXI4M_bus_port<sc_int<32> > bus_if;

I am receiving the error below:
 

C:/Xilinx/Vivado_HLS/2013.4/common/technology/autopilot/ap_sysc\ap_mem_if.h:35:39: error: expected a qualified name after 'typename'
template<typename data_type, typename unsigned, int t_size, ap_mem_port_type portType=RAM1P>


This happens because in hls_bus_if.h (AXI4M_bus_port) #define addr_type unsigned is used.
 
The same addr_type is used used for ap_mem_port in ap_mem_if.h .

template<typename data_type, typename addr_type, int t_size, ap_mem_port_type portType=RAM1P>
class ap_mem_port : public sc_port<ap_mem_if<data_type, addr_type, t_size, portType> >

Solution

This issue is resolved in the Vivado HLS 2014.3 release.

 

To work around this issue, you can define and undefine addr_type in the top SystemC header as below:

#define addr_type unsigned
#include"systemc.h"
#include "AXI4_if.h"
#undef addr_type
#include "ap_mem_if.h"
AR# 60458
Date Created 04/29/2014
Last Updated 10/08/2014
Status Active
Type Known Issues
Tools
  • Vivado Design Suite - 2014.1