Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Template class in System C

Status
Not open for further replies.

arfaengg

Newbie level 4
Joined
Mar 16, 2015
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
60
// My systemC using template class code is below. When I do C-synthesis on vivado, I get the Error
Please anyone help sooner where the problem resides.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "systemc.h"
 
template <class T> SC_MODULE(DF_ADDER)
{
    sc_fifo_in<T> input1;
    sc_fifo_in<T> input2;
    sc_fifo_out<T> output;
    
    void process()
    {
        //while(1)
            output.write(input1.read() +input2.read());
    }
    
    SC_CTOR(DF_ADDER)
    {
        SC_METHOD(process);
        sensitive<<input1<<input2;
    }
    
};



ERROR:

Code dot - [expand]
1
2
3
4
5
DF_ADDER.cpp: In constructor 'DF_ADDER<T>::DF_ADDER(_ap_sc_::sc_core::sc_module_name)':
DF_ADDER.cpp:17: error: incomplete type 'aesl_keep_name_class' used in nested name specifier
Compilation of the preprocessed source 'DF_ADDER.g' failed
    while executing
"csynth_design"

 
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top