Intro
This post will take a closer look of the FIR example project we discussed in Cadence HLS Stratus IDE Basic: How to Use the Example FIR Project
Topics include cynw_p2p channel for input and output data, specify design latency (HLS_CONSTRAIN_LATENCY), HLS_DPOPT_REGION, HLS_PIPELINE_LOOP, etc.
FIR project source codes are:
The guts of fir filter is defined in fir.h and fir.cc. Below is fir.h.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
#ifndef _FIR_H_ #define _FIR_H_ #include <cynw_p2p.h> #include "defines.h" SC_MODULE(fir) { public: // Declare the clock and reset ports sc_in_clk clk; sc_in < bool > rst; sc_in < CoeffTable > coeffs; // Declare the input port and the output port. // The template specializations <input_t or output_t> configure the // modular interfaces to carry the desired datatypes. cynw_p2p < input_t, ioConfig >::in din; // The input port cynw_p2p < output_t, ioConfig >::out dout; // The output port SC_CTOR(fir):clk("clk"), rst("rst"), coeffs("coeffs"), din("din"), dout("dout") { SC_CTHREAD(FirThread, clk.pos()); reset_signal_is(rst, 0); // Connect the clk and rst signals to the modular interface ports din.clk_rst(clk, rst); dout.clk_rst(clk, rst); } protected: void FirThread(); // the thread function }; #endif // _FIR_H_ |
The following is site premium content.
Use points to gain access. You can either purchase points or contribute content and use contribution points to gain access.
Use points to gain access. You can either purchase points or contribute content and use contribution points to gain access.
Highlights: 9928 words, 14 images

Continue: Synthesized SystemC and RTL code
- Contents
- 1. Intro
- 2. Synthesized SystemC and RTL code
- 3. HLS_CONSTRAIN_LATENCY
- 4. HLS_PIPELINE_LOOP
Groups:
Tags:
Do you have videos like these for other softwares?