Jump to content

Teddy Minz

Members
  • Content Count

    7
  • Joined

  • Last visited

About Teddy Minz

  • Rank
    Member

Profile Information

  • Location
    .France
  1. Teddy Minz

    Synthetizable FFT function in SystemC

    Thanks a lot @Roman Popov !
  2. Teddy Minz

    Synthetizable FFT function in SystemC

    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
  3. Teddy Minz

    Synthetizable FFT function in SystemC

    I didn't use Xilinx's LogiCore because I want to compare the execution time of a VHDL design generated from SystemC-encoded FFT block with the execution time of a FFT block on CPU and precisely with a design who use Xilinx's IP. The objective isn't to have high accuracy but just an order of magnitude between this 3 methods. At the base I didn't want to reinvent the wheel. I thought I could get a SystemC-encoded FFT block and compared it fairly quickly. Excuse me, my questions are maybe silly but I really want to understand. If I code a FFT in pure C++ shall I have problems for testing ? When I code in SystemC I can declare input/output with "sc_in" and "sc_out" and I find them when I import my IP within Vivado. How I can do that in pure C++ ?
  4. Teddy Minz

    Synthetizable FFT function in SystemC

    Thanks for your answer. Sorry for my question maybe evident. Effectively, I begin with SystemC and I am not yet very comfortable with the HLS tools. Nevertheless, is my approach good? I want to say, Is cut the FFT's mathematical formula will allow me to implement it ? Is the simpler way to do this ? The goal is to code a FFT with SystemC and not to use the logicore provided by Xilinx. I've see a fft's library but it need Xilinx's Logicore.
  5. Hi everyone, As part of my job I try to implement a FFT function in my ZedBoard. I found some example including one in the SystemC folder unfortunately not synthesizable. Furthermore, I use a free version of Vivado HLS and this tool is very restrictive (few things are synthesizable). So, I will going to have to code my own version of this function (8k/16k/32k FFT). For doing this, I started by cut the FFT's mathematical formula and try to code a exponential function. I realized I can't use the "math.h" library and then I have to code all with only logic gates. At this level, I prefer to code directly in VHDL. Does anyone have a experience with this synthesis tool and can give me a simpler way to achieve my goal ? Maybe I see the problem of the wrong angle. Best regards
  6. Teddy Minz

    SystemC implementation from C-code sources

    Thank you for your answer. I want to use SystemC for HW/SW exploration at algorithm level. As part of my project the HW architecture are already chosen. Now, I want to implement a C-Algorithm in this architecture and optimize its execution time. All I have for the moment is a C algorithm and input data. At first, I want to use Vivado HLS for synthesis and later maybe SpaceStudio for HW/SW partitioning. Alright, thank you.
  7. Hi everyone, As part of my job, I try to implement a algorithm write in C on a FPGA. To do this, I would like to use SystemC but I'm a beginner. I already have read courses and do some applications on youtube with my linux terminal. It taught me how to do an application from end-to-end but in my case I did not code the algorithm. In deed, with bottom-up processing (VHDL to SystemC) I can manage but with top-down processing (C to SystemC) I don't know how to do/test that. So I think I have to encapsulate the C functions in SystemC modules. At first, can I encapsulate all this functions in the same module ? Which information is needed of the algorithm to realize my SystemC model ? How can I test my code at behavior level ? Do you have any documentations or advice to help me ? Thanks in advance for the help and guidance!
×