HOME       UP       PREV       NEXT (TLM Modelling: Adding The Timing Annotations)  

SystemC Kernel Time Stamp

Let's use an EDS kernel with its tnow variable defined by the head of the event queue. This is our main reference time stamp, but let's try not to use the kernel very much, only entering it when inter-module communication is needed. This reduces context swap overhead (I know it's all in user space but it is a computed branch that does not get predicted) and we can run a large number of ISS instructions at one time, giving good use of the caches on the modelling workstation.

In SystemC, we can always print the current time with:

  cout << ``Time now is : `` << simcontext()->time_stamp() << `` \n'';

(C) 2008-10, DJ Greaves, University of Cambridge, Computer Laboratory.