Jump to content

Passing Arguments in the process in SystemC


wasim6691

Recommended Posts

 

void Wcache0::getAddrForSingleWeight(const channel_t co, kernel_t kernel_1,
	                                 const weightaddr_t ci_offset,
	                                 PEID_t &PEID, blockID_t &blockID,
	                                 rowID_t &rowID,
	                                  weightID_t &weightID) 

 

Hi,  Can we pass arguments inside the process in SystemC. If Yes then how we have to register the process in the constructor? Thanks . Below is the MODULE Wcache0  and I am trying to write getAddrForSingleWeight process which will be called inside another process which is register as SC_THREAD.

Link to comment
Share on other sites

You can use sc_bind() for this purpose, which is described in clause 5.5.6 of IEEE Std 1666-2011. Though, you might need to use sc_spawn instead of SC_THREAD to register your process with the SystemC kernel. If your compiler supports C++'11, you can also use a Lambda function instead of sc_bind(). Cf. to the Doulos white paper "What C++11 means to SystemC?" by David C. Black for details.

Link to comment
Share on other sites

I am using Visual Studio for Desktop 2013 Version Which I think do not support GCC compiler. C++11 I think cannot be installed on Windows version.  I have to use sc_spawn to register the process now. Can You please give me some good tutorial about how to use sc_spawn for registering the process. I am searching on web but did not got the good tutorial so far. Thanks

Link to comment
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.

×
×
  • Create New...