Jump to content
Sign in to follow this  
carter

some queston of simple_fifo.cpp

Recommended Posts

Hi

I'looking at simple_fifo.cpp.also i have a lot of questions.

1.in the sc_main() function, what is mean of "top top1("Top1");

2.in the "class top : public sc_module",

I can find "top(sc_module_name name) : sc_module(name)"

But i not sure what have mean of this line?

Share this post


Link to post
Share on other sites

1. Is an instance of the class top with the instance name top1 and the module name "Top1".

 

2. top (sc_module_name name) : sc_module(name)

 

is the class constructor, pushing the module name into the base class, sc_module. It is mandatory for all modules to be given a string name, and this name is stored in the base class sc_module.

 

regards

Alan

Share this post


Link to post
Share on other sites

Hi

I'looking at simple_fifo.cpp.also i have a lot of questions.

1.in the sc_main() function, what is mean of "top top1("Top1");

2.in the "class top : public sc_module",

I can find "top(sc_module_name name) : sc_module(name)"

But i not sure what have mean of this line?

Hello Sir,

There are plenty of very good C++ references both

hard copy and electronic. Please check one of them

out.

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
Sign in to follow this  

×