|
|
1 //+++++++++++++++++++++++++++++++++++++++++++++++++
2 // DUT With assertions
3 //+++++++++++++++++++++++++++++++++++++++++++++++++
4 module negation_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 always @ (posedge clk)
18 gnt <= req;
19 //=================================================
20 // Test Vector generation
21 //=================================================
22 initial begin
23 req <= 0;
24 #3 req <= 1;
25 #5 req <= 0;
26 #1 $finish;
27 end
28 //=================================================
29 // A negation property
30 //=================================================
31 property negation_prop;
32 @ (posedge clk)
33 not (req ##1 gnt);
34 endproperty
35 //=================================================
36 // Assertion Directive Layer
37 //=================================================
38 negation_assert : assert property (negation_prop);
39
40 endmodule
You could download file negation_assertion.sv here
|