Jump to content
wasim6691

Passing Arguments in the process in SystemC

Recommended Posts

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.

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) 

 

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

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

×