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 Time Literals

Time is written in integer or fixed point format, followed without a space by a time unit. The time literal is interpreted as a realtime value scaled to the current time unit and rounded to the current time precision. Following are time literals examples.

   

space.gif

  • 1ns
  • 1.4ps
  • 0.01ns
   

space.gif

   

space.gif

  ../images/main/bullet_star_pink.gif Example - Time Literals
   

space.gif


  1 `timescale 100ps/10ps
  2 module time_literals ();
  3 
  4 time a;
  5 initial begin
  6   $monitor ("@ %g a = %t", $time, a);
  7    #1  a =  1ns;
  8    #1  a =  0.2ns;
  9    #1  a =  300ps;
 10    #1  $finish;
 11 end
 12 
 13 endmodule
You could download file time_literals.sv here
   

space.gif

  ../images/main/bullet_star_pink.gif Simulator Output
   

space.gif

 @ 0 a =                    0
 @ 1 a =                  100
 @ 2 a =                   20
 @ 3 a =                   30
   

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