Académique Documents
Professionnel Documents
Culture Documents
property P6;
@(posedge clk)
sig1 |-> ##2(sig2 && sig3) ##1 !sig2 ##1 !sig3;
endproperty
sequence S1;
##2(sig2 && sig3); // notice that there is no clock
endsequence
sequence S2;
!sig2 ##1 !sig3; // notice that there is no clock
endsequence
property P6;
@(posedge clk)
sig1 |-> S1 ##1 S2; // S1 and S2 make use of P6 clock. ##n always
endproperty // works wrt a clock edge.
property P7;
@(posedge clk)
data1 |-> S6(sig1, sig2);
endproperty
Parameterized property
property P9(z,m,n);
@(posedge clk)
z |->S6 (m, n); // sequence S6 is as defined above
endproperty
property p1(p,q,r,s,t);
@(posedge clk)
s1(p,q,r) |-> s2(s,t);
endproperty
sequence s2;
##2 sig2 ##3 sig4;
endsequence
property p1;
@(posedge clk)
data1 |-> s1 and s2;
endproperty
sequence s4;
sig3 ##8 sig4;
endsequence
propery p1;
@(posedge clk)
in1 |-> s3 within s4;
Endproperty
The within construct in the example above allows the definition of a sequence
contained within another sequence.
The starting matching point of s3 must happen after the starting matching point of
s4. The ending matching point of s3 must happen before the ending matching point
of s4.
SLIDE OWNER SHOW TITLE mm/dd/yy – CYPRESS CONFIDENTIAL 8
System Verilog Assertions
• The througout operator:
=================
sequence s31;
( ##1 (!a&&!b) ##1 (c[->3]) ##1 (a&&b) );
endsequence
property p31;
@(posedge clk) $fell(start) |-> (!start) throughout s31;
endproperty
• One cycle after that, signals "a" and "b" are expected to be low, and they are in
clock cycle 17. From this point signal, "c" is expected to repeat itself three times.
• We get two repeats on clock cycles 18 and 20. But on clock 21, before the third
repeat on signal "c" arrives, the signal "start" is detected high and the check fails
at clock cycle 21.
• The "throughout" condition was violated here and hence the check fails.
It is possible to use a local variable within a property. Such variables are often
made use of in writing assertions / properties.
property p1;
int x;
@(posedge clk)
##1(sig1, x=sig2) |-> ##6 out1 == (x+1);
endproperty
x=sig2: this expression stores the value of sig2 in x for use later in the property.
SVA provides several built-in functions to check for some of the most common
design conditions.