Jump to content

euphony

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. euphony

    euphony

    yeah thank you. i got it:)
  2. euphony

    euphony

    Hi, I'm trying to implement a FIR Filter with a series of FIR node and the data_in of every fir node is connected to the data_out of the next fir node and the last data_out is connected to the data_in of the accumulator. I've implemented the code but during runtime it's giving an error Error: (E109) complete binding failed: port not bound: port 'FIR_NOD[17].port_4' (sc_out) here my NUM_TAP is 18 I'm attaching the code with this message. It seems to me that I have connected the ports correctly. Please help #include "systemc.h" #include "type.h" #include "mem.h" #include "fir_node.h" #include "accumulator.h" #include "main.h" int sc_main(int argc, char* argv[]) { int i; char nodeName[19]; //signals to connect data and mul ports sc_signal<data_type> data_sig[NUM_TAP + 1]; sc_signal<data_type> mul_sig[NUM_TAP]; sc_signal<data_type> result; //system clock sc_clock* sys_clock; //pointer for modules Memory* mem; FirNode* firnodes[NUM_TAP]; Accumulator* accu; // create global clock sys_clock = new sc_clock("SYSTEM_CLOCK", 1, SC_NS); //Construct Memory and Accumulator modules mem = new Memory("MEMORY"); accu = new Accumulator("ACCUMULATOR"); //Construct FirNodes (assign coefficient to each node) for (i = 0; i < NUM_TAP; i++) { sprintf(nodeName, "FIR_NOD[%d]", i); firnodes = new FirNode(nodeName, COEFF); } //connect ports of memory mem->data_read(data_sig[0]); mem->clock(*sys_clock); mem->data_write(result); //[Missing] connect ports of fir_nodes for (i=0;i<NUM_TAP;i++) { firnodes->data_in(data_sig); firnodes->mul_out(mul_sig); firnodes->clock(*sys_clock); firnodes->data_out(data_sig[i+1]); } //connect ports of accumulator accu->clock(*sys_clock); accu->data_in(data_sig[NUM_TAP]); for (i = 0; i < NUM_TAP; i++) { accu->mul_in(mul_sig); } accu->data_out(result); //start simulation sc_start(300, SC_NS); return 0; } please suggest as of what changes i can make
×
×
  • Create New...