quick.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

   

space.gif

   

space.gif

  ../images/main/bulllet_4dots_orange.gif sc_time_stamp ()

The function sc_time_stamp return's the current simulation time. During elaboration and initialization the function will return a value of zero.

   

space.gif

   

space.gif

  ../images/main/bullet_star_pink.gif Example : sc_time_stamp()
   

space.gif


  1 #include <systemc.h>
  2 
  3 int sc_main (int argc, char* argv[]) {
  4   cout<<"Current time is "<< sc_time_stamp() << endl;
  5   sc_start(1);
  6   cout<<"Current time is "<< sc_time_stamp() << endl;
  7   sc_start(100);
  8   cout<<"Current time is "<< sc_time_stamp() << endl;
  9   sc_stop();
 10   cout<<"Current time is "<< sc_time_stamp() << endl;
 11   return 0;// Terminate simulation
 12 }
You could download file sc_time_stamp.cpp here
   

space.gif

  ../images/main/bullet_star_pink.gif Simulation Output : sc_time_stamp()
   

space.gif

 Current time is 0 s
 Current time is 1 ns
 Current time is 101 ns
 SystemC: simulation stopped by user.
 Current time is 101 ns
   

space.gif

   

space.gif

   

space.gif

   

space.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

  

Copyright © 1998-2014

Deepak Kumar Tala - All rights reserved

Do you have any Comment? mail me at:deepak@asic-world.com