cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
igriess
Visitor
Visitor
668 Views
Registered: ‎04-03-2019

Vivado HLS SystemC RTL Export Problem

I just started learning SystemC, and I am trying to create a basic 8-Tap moving average FIR filter. But I am having a bit of trouble with VHDL RTL export. The code synthesizes fine in Vivado HLS, and returns utilization numbers, max frequency, etc. But when I run RTL export and try to synthesize the VHDL in Vivado, it returns 0s for utilization, and timing analysis does not work. The runtime logs for Vivado synthesize return two different errors, which are listed below. I read somewhere on these forums that this can be caused by Vivado removing logic due to unconnected ports, but I have no idea how to fix that. I have run other smaller SystemC programs in Vivado HLS, and have had no problem exporting and getting utilization numbers in Vivado for them. Could someone please take a look at my code and let me know what I am doing wrong, and what I need to change?

 

WARNING: [Synth 8-3331] design FIRFilt_FIRFilt_tbkb has unconnected port reset
WARNING: [Synth 8-6014] Unused sequential element FIRFilt_tap_V_load_2_reg_452_reg was removed. [..VivadoFIR/FIRFilt/FIRFilt.srcs/sources_1/imports/vhdl/FIRFilt_prc_FIRFilt.vhd:154]

FIRFilt.cpp

#include "FIRFilt.h"

void FIRFilt::prc_FIRFilt() {
	dout_ack = false;
	for(int i=0;i<=7;i++){
		tap[i] = 0;
		wait();
	}
	yout.write(0);
	wait();
	while(1){
		din_req=true;
		do{wait();}
		while(!din_ack);

		x_in = xin.read();
		din_req=false;
		temp=tap[0]+tap[1];
		wait();
		for(int k=2; k<=7;k++){
			temp=temp+tap[k];
			wait();
		}
		temp=temp/16;
		for(int j=7;j>=1;j--){
			tap[j]=tap[j-1];
			wait();
		}
		y_out=temp;
		tap[0]=x_in;

		do{wait();}
		while(!dout_req);
		yout.write(y_out);
		dout_ack =true;
		wait();
		dout_ack=false;
	}
}

FIRFilt.h

#include "systemc.h"

typedef sc_uint<8> I8;


SC_MODULE(FIRFilt){
	sc_in<bool> clk, reset;
	sc_in<sc_uint<8> > xin;
	sc_out<sc_uint<8> > yout;
	sc_signal<bool>  din_req, din_ack, dout_req, dout_ack;
	sc_uint<8> temp;
	sc_uint<8> tap [8];
	sc_uint<8> x_in;
	sc_uint<8> y_out;

	void prc_FIRFilt();

	SC_CTOR (FIRFilt){
		SC_CTHREAD (prc_FIRFilt, clk.pos());
		reset_signal_is(reset, false);
	}
};

 

Tags (1)
0 Kudos
0 Replies