2012 DVCon SystemVerilog 2012 Paper
2012 DVCon SystemVerilog 2012 Paper
2012 DVCon SystemVerilog 2012 Paper
Tom Fitzpatrick
Verification Evangelist
Mentor Graphics, Corp.
Waltham, Massachussettes
[email protected]
hardware
design,
I. INTRODUCTION
SystemVerilog has become a primary language for the
design and verification of digital hardware designs.
SystemVerilog was first introduced in 2002 as an Accellera
standard that specified a large number of extensions to the
Verilog-2001 Hardware Description Language[1]. These
extensions added both new modeling and verification
capabilities to Verilog. In 2005, the IEEE standardized
these extensions as the 1800-2005 SystemVerilog
standard[2]. A brief description of these extensions can be
found in [3] and [4]. The base Verilog language remained a
separate standard, IEEE 1364-2005. The 1800-2005
t_base = reset_trans::new;
typedef struct {
real field1;
bit field2;
} T;
module top;
interconnect a, b, c, d, e, f, r1, r2, r3;
i1 (a, b, r1);
i2 (c, d, r2);
i3 (e, f, r3);
module test;
// Redefine SIZE for each usage of packet_t
P#(16)::pakcet_t small_pkt;
P#(1024)::pakcet_t large_pkt;
...
endmodule
D. Coverage enhancements
There are three significant new features in the proposed
SystemVerilog-2012 that enhance the ability to specify
functional coverage. These enhancements were specified
in one Mantis item in the SystemVerilog standard
committees data base, but are listed separately in this
paper (that same Mantis item also made many clarification
changes affecting SystemVerilog functional coverage).
1. Coverpoint variables (Mantis 2506)
In previous versions of SystemVerilog, a coverpoint
could have an optional label. This label was a simple name
that had limited usage; primarily just in cross coverage
specifications and in coverage reports. An example is:
covergroup cg5;
Hue: coverpoint pixel_hue;
Addr: coverpoint pixel_addr + offset;
endgroup
E. Assertion enhancements
Ten of the new features in the proposed SystemVerilog2012 standard enhance or provide new capabilities in
SystemVerilog assertions.
1. Additional data types in assertions (Mantis 2328)
Previous versions of SystemVerilog did not allow
assertions to use real (floating point) values, or dynamic
arrays such as strings and queues. The proposed
SystemVerilog-2012 standard removes these restrictions.
The following simple example references a queue element
as part of an assertion something that could not be done
this way in earlier versions of SystemVerilog.
byte q[$];
property p1;
$rose(write) |-> q[0];
endproperty
checker check_mutex(
input sequence s1,
input cond, event clk=$inferred_clock);
default clocking cb @clk; endclocking
let r = s1.triggered; // not allowed in SV-2009
a1: assert property (cond |=> r);
endchecker
always_latch,
and
always_ff
Note that we extend the uvm_driver to include userdefined functionality to specify exactly how the driver will
convert the sequence item it receives through the
seq_item_port.get_next_item() call into pin-level
activity to communicate to the DUT. It is usually not
necessary to extend the uvm_sequencer because the
default functionality of the uvm_sequencer is sufficient
for most applications.
The sequence itself communicates with the driver via
the start_item()/finish_item() (and optionally
get_response()) methods, each of which relies on the