Jump to content
rahuljn

primitive and hierarchical channel

Recommended Posts

Hi Guys,
I am a bit confused on the primitive and hierarchical channel
In primitive channels we have request-update/update but not in hierarchical channel.
Is it mandatory to have request-update/update for primitive channels ? Why ?
Why it is not needed for hierarchical channel

Thanks
RahulJn

Share this post


Link to post
Share on other sites

A channel is simply a class that implements a SystemC interface.

 

A primitive channel implements an interface and is derived from from sc_prim_channel, and can thus have access to the scheduler (evaluate update).

 

A hierarchical channel implements an interface and is derived from sc_module, and can thus have all the features of an sc_module (processes, hierarchy etc).

 

There'd be no point in deriving from sc_prim_channel and then not implementing the update/request-update behaviour.

 

If you want a channel that is not a primitive channel, and is not a hierarchical channel, you would typically implement an interface but derive from sc_object.

 

 

regards

Alan

 

P.S. To answer your questions more specifically - request_update and update are not pure virtual, so you could ignore them. Though why would you ignore them? If you don't want them, derive from sc_object instead.

A hierarchical channel is derived from sc_module. sc_module does not have request_update/update, so you can't use them.

Share this post


Link to post
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...