dilawar Posted May 10, 2019 Report Share Posted May 10, 2019 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. Quote Link to comment Share on other sites More sharing options...
Eyck Posted May 10, 2019 Report Share Posted May 10, 2019 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 Quote Link to comment Share on other sites More sharing options...
dilawar Posted May 11, 2019 Author Report Share Posted May 11, 2019 Quote Ports in itself are only some kind of a proxy or function-forewarder. Thanks. This is informative hint. cheers, Dilawar 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.