cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
424 Views
Registered: ‎07-30-2020

C Synthesis on Vitis HLS with systemC

Dear all,

I'm trying to create a block on Vitis HLS using systemC.

During the C Simulation, everything goes well but when I try to run the C synthesis, I have the error below :

ERROR: [HLS 200-637] SystemC input is not supported
SystemC is not supported!
while executing
"source XXX/7_Segments/initial/csynth.tcl"
invoked from within
"hls::XXX/7_Segments/initial/csynth.tcl"
("uplevel" body line 1)
invoked from within
"uplevel 1 hls::main {*}$args"
(procedure "hls_proc" line 5)
invoked from within
"hls_proc $argv"

The objective is to create a block ip to switch on four leds with a switchs.

 

#include <iostream>
#include <systemc.h>

using namespace std;

#include"test.cpp"

int sc_main (int argc , char *argv[]){
	counter* cnt;
	instance(cnt);



	return 0;
}

7_segment_tb.cpp (test bench)

 

#ifndef __SEGMENT__
#define __SEGMENT__

using namespace std;

#include <systemc.h>
#include "ap_int.h"

//void instance(counter* cnt, sc_signal <bool> clk, sc_signal <sc_uint<1>> swt[4], sc_signal <sc_uint<1>> led[4]);

SC_MODULE(counter){
	//Ports :
	 sc_in <bool> clock;
	 sc_in <sc_uint<1>> swt[4];
	 sc_out<sc_uint<1>> led[4];


	void switch_to_led();

	//Constructor
	SC_CTOR(counter){
		SC_METHOD(switch_to_led);
	    sensitive_pos << clock;
	 }
};



#endif

7_segment.h

 

 

#include "7_segment.h"


void counter::switch_to_led(){
		led[0].write(swt[0].read());
		led[1].write(swt[1].read());
		led[2].write(swt[2].read());
		led[3].write(swt[3].read());
}

7_segment.cpp

 

#include "7_segment.h"


inline void instance(counter* cnt){
	sc_signal <bool> clk;
	sc_signal <sc_uint<1>> swt[4];
	sc_signal <sc_uint<1>> led[4];


	cnt = new counter("Counter");
	cnt->clock(clk);
	for(int i = 0; i<4; i++){
		cnt->swt[i](swt[i]);
		cnt->led[i](led[i]);
	}
};

test.cpp (instance is my top function)

Could you please help me with this issue ?

 

Adri

 

0 Kudos
3 Replies
Highlighted
Moderator
Moderator
348 Views
Registered: ‎11-21-2018

Hi @Adri 

Unfortunately System C support is deprecated in Vitis HLS. Please see the following AR for details: 

https://www.xilinx.com/support/answers/73613.html

If your design includes IP blocks generated by Vivado HLS based on a SystemC source description, you will still be able to reuse these blocks in the 2020.1/2020.2 tools (IP Integrator and Vivado).

If you wish to continue designing with SystemC, one option is to use a third-party SystemC high-level synthesis tools.

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Highlighted
Visitor
Visitor
264 Views
Registered: ‎07-30-2020

Hi @aoifem ,

Many thanks for your answer.

Could you tell me why SystemC is depreciated in Vitis HLS, please ?

Adri

0 Kudos
Highlighted
Moderator
Moderator
210 Views
Registered: ‎11-21-2018

Hi @Adri 

The decision was a marketing decision so I'm not sure on the details. It could have been that there was more demand for C and C++ solutions. 

 

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**