Jump to content

Deleting a binding


dilawar

Recommended Posts

Hi,

I am dynamically populating a network of SC_MODULES inside a global modele `net`. As soon as I create a module `x`, I bind all ports to x (say `a` and `b`) to `sc_signal` x.a and x.b in `net`. When I simulate, all SC_MODULEs run independently and I can see values of `sc_signal`s changing when port value changes. So far so good! This has the advantage and end-user does not have to bind all the ports (many of them are really not essential).

Now I wish to connect port `a` and `b` of module `x` to port of `m` and `n` of module `y`.  Any new binding will raise an error since I am allowing maximum of 1 binding. I can change the number of binding to 2 but I am not sure if it will cost me run time penalty. If penalty is not significant I can go with this.  Anyway I was wordering, how can delete the previous binding on port `m` and `n`? Deleting the signal `y.m` and `y.n` is sufficient?

If it is not possible, I'll think of something else.

Link to comment
Share on other sites

Hi,

deleting a binding is not supported.

You did not detail your scenario in terms of producer and consumer. Ports in itself are only some kind of a proxy or function-forewarder. So if you have a producer having a sc_out you cannot bind it to some sc_in port of a consumer. You alway have to have a signal in between. Or in terms of C++ a port just forwards function (an interface) but you need to have an element implementing or providing these functions (an implementation).

Bottomline: To connect some producer/writer to a consumer/reader thus fowarding a signal write you need to have a signal in between.

Best regards

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...