Jump to content
Khushi

sc_in/sc_out : hierarchical connections

Recommended Posts

Hi Guys

Is it possible to connect sc_in<bool> hierarchically to another sc_in<bool> (same for sc_out<bool> as well) ?

I tried the attached exmples

ex1.cpp  Error: (E109) complete binding failed: port not bound: port 'target.target_h.in' (sc_in)

ex2.cpp : Error: (E109) complete binding failed: 2 binds exceeds maximum of 1 allowed: port 'target.in_h' (sc_in)
 

Can you please help me ?

Thanks

Khushi

ex1.cpp

ex2.cpp

Share this post


Link to post
Share on other sites
28 minutes ago, Khushi said:

Is it possible to connect sc_in<bool> hierarchically to another sc_in<bool> (same for sc_out<bool> as well) ?

Yes, but direction of binds matters. 

For example if you want to bind  ( in0 -> in1 -> signal  ) then you will need to write:

in0 ( in1 );
in1 ( signal );

OR

in1 ( signal );
in0 ( in1 );

In your examples you bind like this:

Ex1:  port0 <- port1 -> signal  // port0 not binded

Ex2:  signal <- port0 -> signal  // port0 binded to 2 signals 

I agree that error message in first case is misleading.  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×