samng Posted January 28, 2014 Report Posted January 28, 2014 Hi, Sorry if this has been asked before. I have problem to get sc_module to compile with 2 tlm_blocking_put_if's but with different template types. I have the sc_module inherit tlm_blocking_put_if's like this: class Abc: sc_module, tlm_blocking_put_if<X>, tlm_blocking_put_if<Y> { ...... sc_export<tlm_blocking_put_if<X> > port1; sc_export<tlm_blocking_put_if<Y> > port2; ..... virtual void put(const X &t) { ....} virtual void put(const Y &t) { ....} ..... } Do you see anything wrong? Do I need to use tlm_tag? Thanks, Sam Quote
apfitch Posted January 28, 2014 Report Posted January 28, 2014 I can't see anything wrong. Can you post the error message? Alan P.S. tlm_tag is used to disambiguate functions that only differ by return type. As you're using the versions of put() which have different argument types, you should be OK. Quote
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.