AiroldiR Posted July 9, 2014 Report Share Posted July 9, 2014 Hi, I'm fairly new to systemsC and I've a problem with a port binding that I cannot solve. In fact, I cannot understand why it consider a port as not bound. I checked other threads about binding errors, but I dind't find a solution for my case. the module I created is the following: SC_MODULE (RF) { sc_in<sc_uint<32> > datain; sc_in<sc_uint<4> > fir_instr; sc_in<bool> clk; sc_in<bool> reset; sc_out<sc_uint<32> > q; and its instance in the main() is as follow: int sc_main (int argc, char* argv[]) { sc_signal<bool> clock; sc_signal<bool> reset; sc_signal<sc_uint<32> > datain1; sc_signal<sc_uint<4> > fir_instr; sc_signal<sc_uint<32> > q; RF FF("SRF2"); FF.datain(datain1); FF.fir_instr(fir_instr); FF.clk(clock); FF.reset(reset); FF.q(q); when I compile the code I get no errors but during the execution I get the following error: Error: (E112) get interface failed: port is not bound: port 'SRF.port_1' (sc_in) my understanding is that it doesn't find the binding for "fir_instr" but I don't understand why. Can somebody help me? Thanks, Roberto Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted July 9, 2014 Report Share Posted July 9, 2014 You've not shown the constructor of your RF module. Make sure not to access the "fir_instr" port from there. If you need to perform some initialization after the port has been bound, have a look at the "end_of_elaboration" or "start_of_simulation" callbacks. Greetings from Oldenburg, Philipp Rubal Singh 1 Quote Link to comment Share on other sites More sharing options...
AiroldiR Posted July 9, 2014 Author Report Share Posted July 9, 2014 Hi Philipp, yes, I was reading the port within the constructor of the RF module. I moved it into a SC_METHOD and now everything is working fine. Thanks a lot for the help. Cheers, Roberto Quote Link to comment Share on other sites More sharing options...
kihtrak Posted March 5, 2016 Report Share Posted March 5, 2016 Hello there, Am facing the same issue. Info: (I703) tracing timescale unit set: 1 ns (decoder.vcd) Error: (E109) complete binding failed: port not bound: port 'Waveform.port_2' (sc_out) In file: ../../../../src/sysc/communication/sc_port.cpp:231 What does this mean? I have bounded both ports of the driver(concerned) module to the top module (no port is left unbounded ). Is there something else that I need to change? Quote Link to comment Share on other sites More sharing options...
apfitch Posted March 5, 2016 Report Share Posted March 5, 2016 When you say "both ports" you imply two ports. The error message says the *third* port in the object labelled "Waveform" is not bound. Please look for the third port and check it is bound, regards Alan P.S. The ports are automatically named starting from 0, so port_2 must be the third port. Quote Link to comment Share on other sites More sharing options...
kihtrak Posted March 6, 2016 Report Share Posted March 6, 2016 Hello Alan, The "driver" module has just two ports. //File:driver.h #include "systemc.h" SC_MODULE (driver) { sc_out<bool> d_enable ; sc_out<sc_uint<2> > d_select; sc_uint<2> pattern; void prc_driver(); SC_CTOR(driver) { SC_THREAD(prc_driver); } }; Still I don't know why the error has popped up this way! Please help me solve this issue. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
apfitch Posted March 6, 2016 Report Share Posted March 6, 2016 In the other thread, Stephan said he successfully compiled and ran your code: http://forums.accellera.org/topic/5446-vcd-file-not-generated/?p=12917 So I don't understand why it doesn't compile and run for you. Perhaps there's a problem with the way you are compiling your code. Try deleting all the object files and starting again. regards Alan Quote Link to comment Share on other sites More sharing options...
kihtrak Posted March 6, 2016 Report Share Posted March 6, 2016 Hello Alan, As told by Stephen, he could run the code successfully! But, am not able to understand why it doesn't run for me. I even tried deleting all the object files, moved the source codes to a new directory and compiled again. But, still am getting the same error. What possibly would be the issue, can you please help me solve this? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
kihtrak Posted March 7, 2016 Report Share Posted March 7, 2016 Hello Alan, Finally, I got the output! Thanks for the help! Have a question, after "make", a file is created of this type- "driver.h.gch". What type of file is this ? Quote Link to comment Share on other sites More sharing options...
apfitch Posted March 7, 2016 Report Share Posted March 7, 2016 Glad you got it working. .gch is nothing to do with SystemC - try google, regards Alan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.