Jump to content

Recommended Posts

Posted

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

Posted

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.

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...