quick.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

   

space.gif

   

space.gif

  ../images/main/bullet_star_pink.gif $ Operator

$ Operator is used when something needs to be checked till end of simulation. $ denoted till end of simulation. It like saying, something will happen eventually before end of simulation.

   

space.gif

Personally I don't think this is a good idea, its better to use a know upper limit then putting bound less value.

   

space.gif

   

space.gif

  ../images/main/4blue_dots_bullets.gif Example : $ Operator
   

space.gif


  1 //+++++++++++++++++++++++++++++++++++++++++++++++++
  2 //   DUT With assertions
  3 //+++++++++++++++++++++++++++++++++++++++++++++++++
  4 module unbound_assertion();
  5 logic clk = 0;
  6 logic req,reset, gnt;
  7 
  8 always  #1  clk ++;
  9 
 10 //=================================================
 11 // Sequence Layer
 12 //=================================================
 13 sequence req_gnt_seq;
 14   req ##[1:$] gnt;
 15 endsequence
 16 //=================================================
 17 // Property Specification Layer
 18 //=================================================
 19 property req_gnt_prop;
 20   @ (posedge clk) 
 21     disable iff (reset)
 22       req |-> req_gnt_seq;
 23 endproperty
 24 //=================================================
 25 // Assertion Directive Layer
 26 //=================================================
 27 req_gnt_assert : assert property (req_gnt_prop);
 28 
 29 initial begin
 30   $display("@%0dns Asserting reset",$time);
 31   reset <= 1;
 32   req <= 0;
 33   gnt <= 0;
 34   $display("@%0dns Deasserting reset",$time);
 35    #20  reset <= 0;
 36   // Make the assertion pass
 37    #100  @ (posedge clk) req  <= 1;
 38   $display("@%0dns Asserting req",$time);
 39   repeat (100) @(posedge clk);
 40   @ (posedge clk) req <= 0;
 41   $display("@%0dns Deasserting req",$time);
 42   repeat (2) @ (posedge clk);
 43   $display("@%0dns Asserting gnt",$time);
 44   gnt <= 1;
 45   @ (posedge clk) gnt <= 0;
 46   $display("@%0dns Deasserting gnt",$time);
 47    #100  @ (posedge clk) req  <= 1;
 48   $display("@%0dns Asserting req",$time);
 49   repeat (5) @ (posedge clk);
 50   req <= 0;
 51   $display("@%0dns Deasserting req",$time);
 52    #100  $finish;
 53 end
 54 
 55 endmodule
You could download file unbound_assertion.sv here
   

space.gif

  ../images/main/4blue_dots_bullets.gif Simulation : $ Operator
   

space.gif

 @0ns Asserting reset
 @0ns Deasserting reset
 @121ns Asserting req
 @323ns Deasserting req
 @327ns Asserting gnt
 @329ns Deasserting gnt
 @429ns Asserting req
 @439ns Deasserting req
   

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