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

It is worth noting that a hierarchical channel is really just an sc_module that implements an sc_interface. It's purpose is for creating complex abstract channels (e.g. PCIe or AXI). Primitive channels are for smaller (primitive) transfers such as wires (i.e. sc_signal<>).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×