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 Disjunction

A disjumction operator or is used for a disjunction property. It works like a logical or operator, where atleast one of the property evauates to true, then disjunction property evaluates to true. Below example shows that.

   

space.gif

   

space.gif

  ../images/main/4blue_dots_bullets.gif Example : Disjunction
   

space.gif


  1 //+++++++++++++++++++++++++++++++++++++++++++++++++
  2 //   DUT With assertions
  3 //+++++++++++++++++++++++++++++++++++++++++++++++++
  4 module disjunction_assertion();
  5 
  6 logic req,gnt,clk;
  7 //=================================================
  8 //  Clock generator
  9 //=================================================
 10 initial begin
 11  clk = 0; 
 12  forever  #1  clk ++;
 13 end
 14 //=================================================
 15 // Simple DUT behaviour
 16 //=================================================
 17 logic gnt2;
 18 initial begin
 19   gnt2 <= 0; gnt <= 0;
 20 end
 21 always @ (posedge clk)
 22 begin
 23   gnt2 <= req;
 24   gnt  <= gnt2;
 25 end
 26 //=================================================
 27 // Test Vector generation
 28 //=================================================
 29 initial begin
 30   req <= 0;
 31    #3  req <= 1;
 32    #5  req <= 0;
 33    #1  $finish;
 34 end
 35 //=================================================
 36 // A disjunction property
 37 //=================================================
 38 property delay1;
 39     req  ##1  gnt;
 40 endproperty
 41 property delay2;
 42     req  ##2  gnt;
 43 endproperty
 44 // See the OR operator
 45 property disjunction_prop;
 46   @ (posedge clk)
 47     delay1 or delay2;
 48 endproperty
 49 //=================================================
 50 // Assertion Directive Layer
 51 //=================================================
 52 disjunction_assert : assert property (disjunction_prop);
 53 
 54 endmodule
You could download file disjunction_assertion.sv here
   

space.gif

  ../images/main/4blue_dots_bullets.gif Simulation : Disjunction
   

space.gif

 "disjunction_assertion.sv", 52: 
 disjunction_assertion.disjunction_assert: started at 1s failed at 1s
         Offending 'req'
 "disjunction_assertion.sv", 52: 
 disjunction_assertion.disjunction_assert: started at 3s failed at 3s
         Offending 'req'
 $finish called from file "disjunction_assertion.sv", line 33.
 
   

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