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

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.

Sign in to follow this  

×
×
  • Create New...