Jump to content

Passing Arguments in the process in SystemC

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.

Share this post

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

Share this post

Link to post
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

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