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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor panyu
Visitor
6,518 Views
Registered: ‎01-04-2013

SystemC FIFO Synthesis issue in 2013.3

We have upgraded to Vivado HLS 2013.3 recently. However, one of our SystemC synthesis test failed upon it with some errors pointing to some issues in the autopilot source code base with the num_available() and num_free() functions of the fifo interface. The same SystemC HLS source code worked well with 2013.2.

 

I'm attaching the source code and synthesis step error message for your reference. You may create a HLS project with ScTest.h and ScTest.cpp as design files, and the rest for testbench.

 

Our native gcc version is 4.6.3, and its configuration is attached as well.

 

Thanks for your help, and I'm looking forward to your response.

 

=========================== Design Source ======================

ScTest.h

#ifndef _SCTEST_HLS_H_
#define _SCTEST_HLS_H_

#include "systemc.h"

SC_MODULE(ScTest)
{
  sc_fifo_in<bool>              s_axis_data_in_1b;
  sc_fifo_out<bool>             m_axis_data_out_1b;

  sc_in_clk                     clk;
  sc_in<bool>                   clken;
  sc_in<bool>                   reset;

  SC_HAS_PROCESS(ScTest);
  ScTest(sc_module_name nm)
    : sc_module(nm)
  {
    SC_CTHREAD(data_proc, clk.pos());
      reset_signal_is(reset, true);
  }

  ~ScTest()
  {}

  void data_proc();
};

#endif

 

ScTest.cpp

#include "ScTest.h"

void ScTest::data_proc()
{
#pragma HLS resource core=AXI4Stream variable=s_axis_data_in_1b
#pragma HLS resource core=AXI4Stream variable=m_axis_data_out_1b

  // reset behavior
  wait();

  while(true)
  {
    // non-blocking behavior
    if(s_axis_data_in_1b->num_available() && m_axis_data_out_1b->num_free())
    {
      bool bit = s_axis_data_in_1b->read();
      m_axis_data_out_1b->write(bit);
    }
    wait();
  }
}

=========================== Error Message ======================

 

In file included from ScTest.cpp:1:
In file included from ScTest.cpp:1:
In file included from ./ScTest.h:4:
In file included from /opt/Xilinx/Vivado_HLS/2013.3/common/technology/autopilot/ap_sysc/systemc.h:1:
In file included from /opt/Xilinx/Vivado_HLS/2013.3/common/technology/autopilot/ap_sysc/ap_systemc.h:51:
/opt/Xilinx/Vivado_HLS/2013.3/common/technology/autopilot/ap_sysc/ap_sc_core.h:189:20: error: call to function '_ssdm_op_TLM_CAN_GET' that is neither visible in the template definition nor found by argument-dependent lookup
return _ssdm_op_TLM_CAN_GET(Val);
^
ScTest.cpp:14:27: note: in instantiation of member function '_ap_sc_::sc_core::sc_fifo_in_if<bool>::num_available' requested here
if(s_axis_data_in_1b->num_available() && m_axis_data_out_1b->num_free())
^
/opt/Xilinx/Vivado_HLS/2013.3/common/technology/autopilot/ap_sysc/ap_sc_extras.h:96:44: note: '_ssdm_op_TLM_CAN_GET' should be declared prior to the call site
inline __attribute__((always_inline)) bool _ssdm_op_TLM_CAN_GET(volatile T& P) {
^
In file included from /home/ypan/VivadoProjects/ScTest/prj2013.3/solution1/.autopilot/db/ScTest.pragma.1.cpp:1:
In file included from ScTest.cpp:1:
In file included from ScTest.cpp:1:
In file included from ./ScTest.h:4:
In file included from /opt/Xilinx/Vivado_HLS/2013.3/common/technology/autopilot/ap_sysc/systemc.h:1:
In file included from /opt/Xilinx/Vivado_HLS/2013.3/common/technology/autopilot/ap_sysc/ap_systemc.h:51:
/opt/Xilinx/Vivado_HLS/2013.3/common/technology/autopilot/ap_sysc/ap_sc_core.h:210:20: error: call to function '_ssdm_op_TLM_CAN_PUT' that is neither visible in the template definition nor found by argument-dependent lookup
return _ssdm_op_TLM_CAN_PUT(Val);
^
ScTest.cpp:14:66: note: in instantiation of member function '_ap_sc_::sc_core::sc_fifo_out_if<bool>::num_free' requested here
if(s_axis_data_in_1b->num_available() && m_axis_data_out_1b->num_free())
^
/opt/Xilinx/Vivado_HLS/2013.3/common/technology/autopilot/ap_sysc/ap_sc_extras.h:101:44: note: '_ssdm_op_TLM_CAN_PUT' should be declared prior to the call site
inline __attribute__((always_inline)) bool _ssdm_op_TLM_CAN_PUT(volatile T& P) {
^
2 errors generated.
Compilation of the preprocessed source 'ScTest.g' failed
while executing
"csynth_design"
(file "/home/ypan/VivadoProjects/ScTest/prj2013.3/solution1/csynth.tcl" line 17)
@I [LIC-101] Checked in feature [VIVADO_HLS]

 

========================= GCC configuration =========================

$ gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
0 Kudos
5 Replies
Visitor panyu
Visitor
6,517 Views
Registered: ‎01-04-2013

Re: SystemC FIFO Synthesis issue in 2013.3

The entire ScTest project is attached here.

0 Kudos
Moderator
Moderator
6,509 Views
Registered: ‎04-17-2011

Re: SystemC FIFO Synthesis issue in 2013.3

The archive misses few files as I am seeing different errors when trying to synthesize the code in 2013.3. Go to File > Archive Project and attach that.
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Visitor panyu
Visitor
6,503 Views
Registered: ‎01-04-2013

Re: SystemC FIFO Synthesis issue in 2013.3

@Debraj, here you go with the archived project.

 

Thanks

0 Kudos
Visitor panyu
Visitor
6,480 Views
Registered: ‎01-04-2013

Re: SystemC FIFO Synthesis issue in 2013.3

Hi @Debraj, any leads on the issue?

0 Kudos
Moderator
Moderator
6,452 Views
Registered: ‎04-17-2011

Re: SystemC FIFO Synthesis issue in 2013.3

Sorry for the delay. I tried but getting a different error, let me re-create the project to see the exact issue.

@I [HLS-10] Analyzing design file 'ScTest.cpp' ...
In file included from ScTest.cpp:1:
In file included from ./ScTest.h:4:
In file included from ./systemc.h:244:
./systemc:68:10: fatal error: 'sysc/kernel/sc_cmnhdr.h' file not found
#include "sysc/kernel/sc_cmnhdr.h"
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos