madhuri Posted June 28, 2013 Report Posted June 28, 2013 Hello, I am a newbi to systemc based modeling. I have been trying to find a way to create approximately timed TLM models but with no luck. Could you please tell me where do i start from. How can i go about creating approximately timed TLM models. Kind Regards Madhuri Quote
apfitch Posted July 1, 2013 Report Posted July 1, 2013 Hi Madhuri, unfortunately creating approximately timed TLM models is probably the most complex thing you can do in SystemC. There's some information on our website http://www.doulos.com/knowhow/systemc/tlm2/, including an approximately timed example. regards Alan P.S. Of course if you want to create a virtual platform from other people's TLM2 IP, you can just by a virtual platform tool from an EDA vendor, buy the IP, and (hopefully) just drag and drop. Quote
madhuri Posted September 13, 2013 Author Report Posted September 13, 2013 Hello Alan, I need a some clarification regarding how the notion of time is implemented in a TLM model. For example, i am creating a TLM model of a comparator. The model that i am planning to create is a LT model of a commercially available comparator called TS9001. On giving the respective inputs to the comparator, the actual comparator takes some amount of time (typically 10 us) to give a 1 at the output. Hence, when i create a model of this, how do i bring in the notion of time? What do you mean when you say a model is loosely timed or approximately timed? I know the basic difference, but i don't understand how the notion of time introduce. Function sc_time_stamp() keeps track of the current, when called at the end of the main program, does it say for how long the simulation has run? Can i directly relate this to how the physical model works? Please Clarify. I hope i have made myself clear. Regards Madhuri Quote
apfitch Posted September 14, 2013 Report Posted September 14, 2013 Hi Madhuri, how you model time depends on how efficient you want your model to be, and how accurate. The simplest model would be to add a wait(10, SC_NS) inside the function call that models the comparator. Regarding LT vs AT, there's a good outline in the SystemC LRM (which you can download free via Accellera). The key idea of LT (loosely timed) is that events in the model don't have to happen at the exact time when they would occur in reality - for instance an initiator may run ahead of sc_time_stamp() by "refusing" to call wait, and so not letting any other thread run. The idea of AT (approximately timed) is essentially that modelled events happen at the sc_time_stamp() when they would really happen in the thing you are modelling. I don't understand what you mean when you say "Function sc_time_stamp() keeps track of the current, when called at the end of the main program, does it say for how long the simulation has run?" If I understand correctly, then calling sc_time_stamp() after sc_start() has returned would return the simulated time value at the end of simulation. For instance if you simulated a time of a million years, sc_time_stamp() would return 1 million years. Of course the amount of CPU time used by your computer would (I hope!) be much less. regards Alan Philipp A Hartmann 1 Quote
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.