SVA Quick Reference
Product Version: IUS 11.1
Release Date: December 2011
This quick reference describes the SystemVerilog Assertion constructs
supported by Cadence Design Systems. For more information about
SystemVerilog Assertions, see the Assertion Writing Guide.
Note: Numbers in parentheses indicate the section in the IEEE
1800-2005 Standard for SystemVerilog for the given construct.
Binding
bind target bind_obj [ (params)] bind_inst (ports) ;
(17.15) Attaches a SystemVerilog module or interface to
a Verilog module or interface instance, or to a VHDL
entity/architecture. Multiple targets supported. Example:
bind fifo fifo_full v1(clk,empty,full);
bind top.dut.fifo1 fifo_full v2(clk,empty,full);
bind fifo:fifo1,fifo2 fifo_full v3(clk,empty,full);
Immediate Assertions
[ label : ] assert (boolean_expr) [ action_block ] ;
(17.2) Tests an expression when the statement is
executed in the procedural code. Example:
enable_set_during_read_op_only : assert
(state >= ‘start_read && state <= ‘finish_read);
else $warning("Enable set when state => %b",
state);
Declarations
sequence identifier [ argument_list ] ;
sequence_expr [ seq_op sequence_expr ] ... ;
endsequence [ : identifier ]
(17.6) Declares a sequence expression that can be used
in property declarations. Local variables are permitted.
Example:
sequence BusReq (bit REQ=0, bit ACK=0);
REQ ##[1:3] ACK;
endsequence
property identifier [ argument_list ] ;
[ clock_expr ] [ disable_clause ] property_expr ;
endproperty [ : identifier ]
(17.11) Declares a condition or sequence to be verified
during simulation. Local variables are permitted.
Example:
property P6 (bit AA, BB=‘true, EN=1);
@(negedge clk)
EN -> (BB ##1 c) |=> (AA ##[1:2] (d||AA));
endproperty
[ identifier: ] [ (argument_list) ]
(17.11) Creates an instance of a property declaration.
Example:
property P1;
@(event) a && b ##1 !a && !b;
endproperty
property P2;
@(posedge clk) rst |-> P1;
endproperty
Directives
[ label : ] assert property (prop_expr) [ action_block ] ;
(17.13.1) Checks a property during verification. Example:
property P5 (AA);
@(negedge clk) (b ##1 c) |=>
(AA ##[1:2] (d||AA));
endproperty
assert property (P5(a));
[label:] assume property (prop_expr) [ action_block ] ;
(17.13.2) Constrains the inputs considered for the
property during verification. In simulation, treated like
assert. Example:
A1: assume (@(ena) !rst);
[label:] cover property (prop_expr) [ pass_statement ] ;
[label:] cover sequence (seq_expr) [ pass_statement ] ;
(17.13.3) Monitors the property or sequence for coverage
and reports statistics. The statement is executed when
the property succeeds. Cover sequence reports all
matches. Example:
C1: cover property (@(event) a |-> b ##[2:5] c);
expect Statement
expect (prop_expr) [ action_block ] ;
(17.16) Blocks the current process until the property
succeeds or fails. Example:
expect( @(posedge clk) ##[1:10]
top.TX_Monitor.data == value ) success = 1;
else success = 0;
Clock Expressions
@( {{posedge | negedge} clock | expression} )
(17.14) Declares an event or event expression to use for
sampling assertion variable values. Multiple clocks
(17.12), and clocks inferred from an
always block
containing only assertions, are supported. Examples:
assert property @(posedge clk1) (a ##1 b) |=>
@(posedge clk2) (c ##1 d));
endproperty
assert property ( @(posedge clk1) (a ##1 b) |=>
@(posedge clk2) (c ##1 d) );
always @(posedge clk) begin
assert property ( (a ##1 b) |=> (c ##1 d) );
assert property ( (a[*3]) |=> ~c );
cover property ( (a ##1 b ##1 c) |=>
(d[*2:4]) );
end
Default Clocking Blocks
default clocking [clk_identifier]
{identifier | clk_expression} ;
clocking_items
end clocking
default clocking clk_identifier
(17.14) Specifies the clock or event that controls property
evaluation. Example:
default clocking master_clk @(posedge clk);
property p4; (a |=> ##2 b); endproperty
assert property (p4);
endclocking
Disable Clause
disable iff (boolean_expr)
default disable iff (boolean_expr)
(17.11) Specifies a reset expression. Checking of the
property is terminated asynchronously when the
expression is true. Example:
property P4;
@(negedge clk) disable iff (rst)
(c) |-> (##[max-1:$] d);
endproperty
Property Expressions
sequence_expr |-> property_expr
(17.11.2) The property expression must be true in the
last cycle that the sequence expression is true
(overlapping). Example:
property P4;
@(negedge clk)
disable iff (rst)
(c) |-> (##[max-1:$] d);
endproperty
sequence_expr |=> property_expr
(17.11.2) The property expression must be true in the
first cycle after the sequence expression is true.
Example:
property property P5 (AA);
@(negedge clk)
(b ##1 c) |=> (AA ##[1:2] (d||AA));
endproperty
property_expr and property_expr
(17.11) Returns true if both property expressions are
true. Example:
@(c) v |=> (w ##1 @(d) x) and (y ##1 z)
not property_expr
(17.11) Returns the opposite of the value returned by the
property_expr. Example:
property abcd;
@(posedge clk) a |-> not (b ##1 c ##1 d);
endproperty
if (expression) property_expr1 [ else property_expr2]
(17.11) If expression is true, property_expr1 must
hold; property_expr1 does not need to hold when
expression is false. If expression is false,
property_expr2 must hold, if it exists. Example:
property P2;
@ (negedge clk)
if (a)
b |=> c;
else
d |=> e;
endproperty
Sequence Operators
sequence_expr1 and sequence_expr2
(17.7.4) Both sequences must occur, but the end times of
the operands can be different. Example:
(a ##2 b) and (c ##2 d ##2 e) ;