ysap

How can I derive a SystemC class from another SystemC class?

3 posts in this topic

Is it possible to define a SC class as a derivative of another SC class?

For example, a simple D-Flipflop (latch) implementation will have d and clk inputs and a q output. I want to define an Enabled-Latch on top of that class adding the en input and changing the sampling method accordingly. Is this possible?

 

(For reference, question also posted in http://stackoverflow.com/q/37127066/274579but no replies yet)

Share this post


Link to post
Share on other sites

 

Is it possible to define a SC class as a derivative of another SC class?

For example, a simple D-Flipflop (latch) implementation will have d and clk inputs and a q output. I want to define an Enabled-Latch on top of that class adding the en input and changing the sampling method accordingly. Is this possible?

 

(For reference, question also posted in http://stackoverflow.com/q/37127066/274579but no replies yet)

Absolutely. Please note that SystemC is just a C++ library, so that whatever you can do with

the parent language, will also work here.

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