Hi everyone,
Thanks to you, I was able to advance. I have follow your advice and I succeeded to synthesize a FFT function in pure C++ with Vivado HLS.
Now, I would like to insert this function in a structure SystemC. For do this I have create a little project "multiplication" . But I think I have difficulties to understand the "SC_CTOR"... I have try to create standard constructor like in C++ but SystemC don't like my constructor ^^
module.cpp
#include "module.h"
using namespace std;
void MULT::multiplication(void)
{
result = A * B;
}
void MULT::afficherResult() const
{
cout << A << " * " << B << " = " << result << endl;
}
MULT::MULT() : A(4), B(5), result(0)
{}
MULT::MULT(int var_a, int var_b) : A(var_a), B(var_b), result(0)
{}
module.h
#include "systemc.h"
#include <iostream>
SC_MODULE(MULT)
{
public:
// Constructeur
MULT(int var_a, int var_b);
MULT();
//SC_CTOR(MULT);
void multiplication(void);
void afficherResult() const;
private:
int A, B, result;
};
main.cpp
#include "module.h"
int sc_main(int argc, char* argv[])
{
MULT mult1;
mult1.multiplication();
// Print result
mult1.afficherResult();
return 0;
}
With this code I have the following error :
Error: (E533) module name stack is empty: did you forget to add a sc_module_name parameter to your module constructor?
Why this code work if I declare a classic C++ class but it doesn't with a SC_MODULE? With SystemC we cannot create constructor like that ?
Best regards