katang Posted May 17, 2017 Report Share Posted May 17, 2017 In my C++ programs, I used to pass pointers between parents and children, in form that in parent I create Child* MyChild(this); that the child constructor saves the received pointer, so they can mutually refer to each other. I understand that I can do the same if I add the name of the object. In C++, there is some difference if I create an object on the stack (or global) and on the heap. What is the difference in SystemC between them (also in using resources, wiring and speed of execution). What is the "best" way of connecting submodules (wiring, data transfer, and speed)? Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted May 18, 2017 Report Share Posted May 18, 2017 Hello @katang, In SystemC the parent and child relationship is intrinsically handled by the Kernel. Kindly refer the SystemC LRM Section 3.3.3.4 for more details. Their should be no differences in stack and heap allocated objects. As for the last part it is not very clear what you are asking. Can you elaborate more on the last part? Regards, Ameya Vikram Singh Quote Link to comment Share on other sites More sharing options...
katang Posted May 18, 2017 Author Report Share Posted May 18, 2017 Hello @Ameya, thanks for the hint. I found https://github.com/systemc/systemc-2.3/blob/master/docs/LRM.pdf which is 12 years old, from outside V2.3, from inside V2.1. Is it the up-to-date version? Concerning my question. Using modules, has its price both in SW and HW. In SW, parameters are passed, stack space used and the execution is slowed down when compared to the "inline" implementation. In HW, instead of using hierarchical design, I can also include the body of the sub-modules, which may result in hard-to understand, inflexible but more effective designs, say using direct wiring rather than using ports, I guess. BTW, during synthesis, "inline" has any effect? Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted May 18, 2017 Report Share Posted May 18, 2017 For an up-to-date documentation of SystemC, please refer to the IEEE Std. 1666-2011, available free of charge (thanks to the Accellera Systems Initiative) from http://standards.ieee.org/getieee/1666/download/1666-2011.pdf. 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.