wasim6691 Posted January 7, 2018 Report Share Posted January 7, 2018 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. Quote Link to comment Share on other sites More sharing options...
maehne Posted January 7, 2018 Report Share Posted January 7, 2018 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. Quote Link to comment Share on other sites More sharing options...
wasim6691 Posted January 7, 2018 Author Report Share Posted January 7, 2018 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 Quote Link to comment Share on other sites More sharing options...
maehne Posted January 7, 2018 Report Share Posted January 7, 2018 You can find the requested example in the above cited clause 5.5.6 of IEEE Std 1666-2011. Quote Link to comment Share on other sites More sharing options...
maehne Posted January 7, 2018 Report Share Posted January 7, 2018 By the way, Visual Studio 2013 already has some support for C++'11 including Lambdas: https://msdn.microsoft.com/en-us/library/hh567368.aspx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.