Jump to content

primitive and hierarchical channel


rahuljn

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

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.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...