History
SystemVerilog started with the donation of the Superlog language toDesign features
Data lifetime
There are two types of data lifetime specified in SystemVerilog:static
" keyword in the declaration before the type, e.g., "static int x;
". The "automatic
" keyword is used in the same way.
New data types
Enhanced variable types add new capability to Verilog's "reg" type:my_pack
may be used in expressions as a six-bit integer. The dimensions to the right of the name (32 in this case) are referred to as "unpacked" dimensions. As in Verilog-2001, any number of unpacked dimensions is permitted.
Enumerated data types (enums
) allow numeric quantities to be assigned meaningful names. Variables declared to be of enumerated type cannot be assigned to variables of a different enumerated type without logic :0/code> in this case) which is used to represent the enumeration value. The meta-values X and Z can be used here, possibly to represent illegal states. The built-in function name()
returns an ASCII string for the current enumerated value, which is useful in validation and testing.
New integer types: SystemVerilog defines byte
, shortint
, int
and longint
as two-state signed integral types having 8, 16, 32, and 64 bits respectively. A bit
type is a variable-width two-state type that works much like logic
. Two-state types lack the X and Z metavalues of classical Verilog; working with these types may result in faster simulation.
Struct
In computer science, a record (also called a structure, struct, or compound data) is a basic data structure. Records in a database or spreadsheet are usually called "rows".
A record is a collection of ''fields'', possibly of different data types ...
ures and unions work much like they do in the C programming language
''The C Programming Language'' (sometimes termed ''K&R'', after its authors' initials) is a computer programming book written by Brian Kernighan and Dennis Ritchie, the latter of whom originally designed and implemented the language, as well as ...
. SystemVerilog enhancements include the packed attribute and the tagged attribute. The tagged
attribute allows runtime tracking of which member(s) of a union are currently in use. The packed
attribute causes the structure or union to be mapped 1:1 onto a packed array of bits. The contents of struct
data types occupy a continuous block of memory with no gaps, similar to bitfields in C and C++:
typedef struct packed FP;
FP zero = 64'b0;
As shown in this example, SystemVerilog also supports typedef
typedef is a reserved keyword in the programming languages C, C++, and Objective-C. It is used to create an additional name (''alias'') for another data type, but does not create a new type, except in the obscure case of a qualified typedef of ...
s, as in C and C++.
Procedural blocks
SystemVerilog introduces three new procedural blocks intended to model hardware
Hardware may refer to:
Technology Computing and electronics
* Electronic hardware, interconnected electronic components which perform analog or logic operations
** Digital electronics, electronics that operate on digital signals
*** Computer hard ...
: always_comb
(to model combinational logic
In automata theory, combinational logic (also referred to as time-independent logic or combinatorial logic) is a type of digital logic which is implemented by Boolean circuits, where the output is a pure function of the present input only. This ...
), always_ff
(for flip-flops
Flip-flops are a type of light sandal, typically worn as a form of casual footwear. They consist of a flat sole held loosely on the foot by a Y-shaped strap known as a toe thong that passes between the first and second toes and around both side ...
), and always_latch
(for latches). Whereas Verilog used a single, general-purpose always
block to model different types of hardware structures, each of SystemVerilog's new blocks is intended to model a specific type of hardware, by imposing semantic restrictions to ensure that hardware described by the blocks matches the intended usage of the model. An HDL compiler or verification program can take extra steps to ensure that only the intended type of behavior occurs.
An always_comb
block models combinational logic
In automata theory, combinational logic (also referred to as time-independent logic or combinatorial logic) is a type of digital logic which is implemented by Boolean circuits, where the output is a pure function of the present input only. This ...
. The simulator infers the sensitivity list to be all variables from the contained statements:
always_comb begin
tmp = b * b - 4 * a * c;
no_root = (tmp < 0);
end
An always_latch
block models level-sensitive latches. Again, the sensitivity list is inferred from the code:
always_latch
if (en) q <= d;
An always_ff
block models synchronous logic
In digital electronics, a synchronous circuit is a digital circuit in which the changes in the state of memory elements are synchronized by a clock signal. In a sequential digital logic circuit, data are stored in memory devices called flip-flo ...
(especially edge-sensitive sequential logic
In automata theory, sequential logic is a type of logic circuit whose output depends on the present value of its input signals and on the sequence of past inputs, the input history. This is in contrast to '' combinational logic'', whose output ...
):
always_ff @(posedge clk)
count <= count + 1;
Electronic design automation
Electronic design automation (EDA), also referred to as electronic computer-aided design (ECAD), is a category of software tools for designing electronic systems such as integrated circuits and printed circuit boards. The tools work together ...
(EDA) tools can verify the design's intent by checking that the hardware model does not violate any block usage semantics. For example, the new blocks restrict assignment to a variable by allowing only one source, whereas Verilog's always
block permitted assignment from multiple procedural sources.
Interfaces
For small designs, the Verilog ''port'' compactly describes a module's connectivity with the surrounding environment. But major blocks within a large design hierarchy typically possess port counts in the thousands. SystemVerilog introduces concept of interfaces
Interface or interfacing may refer to:
Academic journals
* ''Interface'' (journal), by the Electrochemical Society
* ''Interface, Journal of Applied Linguistics'', now merged with ''ITL International Journal of Applied Linguistics''
* '' Inte ...
to both reduce the redundancy of port-name declarations between connected modules, as well as group and abstract
Abstract may refer to:
* ''Abstract'' (album), 1962 album by Joe Harriott
* Abstract of title a summary of the documents affecting title to parcel of land
* Abstract (law), a summary of a legal document
* Abstract (summary), in academic publishi ...
related signals into a user-declared bundle. Additional concept is modport, that shows direction of logic connections.
Example:
interface intf;
logic a;
logic b;
modport in (input a, output b);
modport out (input b, output a);
endinterface
module top;
intf i ();
u_a m1 (.i1(i.in));
u_b m2 (.i2(i.out));
endmodule
module u_a (intf.in i1);
endmodule
module u_b (intf.out i2);
endmodule
Verification features
The following verification features are typically not synthesizable, meaning they cannot be implemented in hardware based on HDL code. Instead, they assist in the creation of extensible, flexible test bench
A test bench or testing workbench is an environment used to verify the correctness or soundness of a design or model.
The term has its roots in the testing of electronic devices, where an engineer would sit at a lab bench with tools for measurem ...
es.
New data types
The string
data type represents a variable-length text string
String or strings may refer to:
*String (structure), a long flexible structure made from threads twisted together, which is used to tie, bind, or hang other objects
Arts, entertainment, and media Films
* ''Strings'' (1991 film), a Canadian anim ...
. For example:
string s1 = "Hello";
string s2 = "world";
string p = ".?!";
string s3 = ; // string concatenation
$display(" d%s", s3.len(), s3); // simulation will print: " 3Hello, world!"
In addition to the static array used in design, SystemVerilog offers dynamic array
In computer science, a dynamic array, growable array, resizable array, dynamic table, mutable array, or array list is a random access, variable-size list data structure that allows elements to be added or removed. It is supplied with standard lib ...
s, associative arrays
In computer science, an associative array, map, symbol table, or dictionary is an abstract data type that stores a collection of (key, value) pairs, such that each possible key appears at most once in the collection. In mathematical terms an a ...
and queues:
int cmdline_elements; // # elements for dynamic array
int da[]; // dynamic array
int ai[int]; // associative array, indexed by int
int as[string]; // associative array, indexed by string
int qa[$]; // queue, indexed as an array, or by built-in methods
initial begin
cmdline_elements = 16;
da = new cmdline_elements // Allocate array with 16 elements
end
A dynamic array works much like an unpacked array, but offers the advantage of being dynamically allocated at runtime (as shown above.) Whereas a packed array's size must be known at compile time (from a constant or expression of constants), the dynamic array size can be initialized from another runtime variable, allowing the array to be sized and resize arbitrarily as needed.
An associative array can be thought of as a binary search tree
In computer science, a binary search tree (BST), also called an ordered or sorted binary tree, is a rooted binary tree data structure with the key of each internal node being greater than all the keys in the respective node's left subtree and ...
with a user-specified key type and data type. The key implies an ordering
Order, ORDER or Orders may refer to:
* Categorization, the process in which ideas and objects are recognized, differentiated, and understood
* Heterarchy, a system of organization wherein the elements have the potential to be ranked a number of d ...
; the elements of an associative array can be read out in lexicographic order. Finally, a queue provides much of the functionality of the C++ STL deque type: elements can be added and removed from either end efficiently. These primitives allow the creation of complex data structures required for scoreboarding Scoreboarding is a centralized method, first used in the CDC 6600 computer, for dynamically scheduling instructions so that they can execute out of order when there are no conflicts and the hardware is available.
In a scoreboard, the data depende ...
a large design.
Classes
SystemVerilog provides an object-oriented programming
Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
model.
In SystemVerilog, classes support a single-inheritance model, but may implement functionality similar to multiple-inheritance through the use of so-called "interface classes" (identical in concept to the interface
feature of Java). Classes can be parameterized by type, providing the basic function of C++ templates
Templates are a feature of the C++ programming language that allows functions and classes to operate with generic types. This allows a function or class to work on many different data types without being rewritten for each one.
The C++ Stand ...
. However, template specialization and function template
Templates are a feature of the C++ programming language that allows functions and classes to operate with generic types. This allows a function or class to work on many different data types without being rewritten for each one.
The C++ Stand ...
s are not supported.
SystemVerilog's polymorphism
Polymorphism, polymorphic, polymorph, polymorphous, or polymorphy may refer to:
Computing
* Polymorphism (computer science), the ability in programming to present the same programming interface for differing underlying forms
* Ad hoc polymorphis ...
features are similar to those of C++: the programmer may specifically write a virtual
function to have a derived class gain control of the function. See virtual function
In object-oriented programming, in languages such as C++, and Object Pascal, a virtual function or virtual method is an inheritable and overridable function or method for which dynamic dispatch is facilitated. This concept is an important ...
for further information.
Encapsulation and data hiding
In computer science, information hiding is the principle of segregation of the ''design decisions'' in a computer program that are most likely to change, thus protecting other parts of the program from extensive modification if the design decisio ...
is accomplished using the local
and protected
keywords, which must be applied to any item that is to be hidden. By default, all class properties are public
In public relations and communication science, publics are groups of individual people, and the public (a.k.a. the general public) is the totality of such groupings. This is a different concept to the sociological concept of the ''Öffentlichk ...
.
Class instances are dynamically created with the new
keyword. A constructor
Constructor may refer to:
Science and technology
* Constructor (object-oriented programming), object-organizing method
* Constructors (Formula One), person or group who builds the chassis of a car in auto racing, especially Formula One
* Construc ...
denoted by function new
can be defined. SystemVerilog has automatic garbage collection
Waste collection is a part of the process of waste management. It is the transfer of solid waste from the point of use and disposal to the point of treatment or landfill. Waste collection also includes the curbside collection of recyclable ...
, so there is no language facility to explicitly destroy instances created by the new operator
New is an adjective referring to something recently made, discovered, or created.
New or NEW may refer to:
Music
* New, singer of K-pop group The Boyz
Albums and EPs
* ''New'' (album), by Paul McCartney, 2013
* ''New'' (EP), by Regurgitator ...
.
Example:
virtual class Memory;
virtual function bit 1:0read(bit 1:0addr); endfunction
virtual function void write(bit 1:0addr, bit 1:0data); endfunction
endclass
class SRAM #(parameter AWIDTH=10) extends Memory;
bit 1:0mem <
virtual function bit 1:0read(bit 1:0addr);
return mem ddr
endfunction
virtual function void write(bit 1:0addr, bit 1:0data);
mem ddr= data;
endfunction
endclass
Constrained random generation
Integer quantities, defined either in a class definition or as stand-alone variables in some lexical scope, can be assigned random values based on a set of constraints. This feature is useful for creating randomized scenarios for verification.
Within class definitions, the rand
and randc
modifiers signal variables that are to undergo randomization. randc
specifies permutation
In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or p ...
-based randomization, where a variable will take on all possible values once before any value is repeated. Variables without modifiers are not randomized.
class eth_frame;
rand bit 7:0dest;
rand bit 7:0src;
rand bit 5:0f_type;
rand byte payload[];
bit 1:0 fcs;
rand bit 1:0fcs_corrupt;
constraint basic
constraint good_fr
endclass
In this example, the fcs
field is not randomized; in practice it will be computed with a CRC generator, and the fcs_corrupt
field used to corrupt it to inject FCS errors. The two constraints shown are applicable to conforming Ethernet frame
In computer networking, an Ethernet frame is a data link layer protocol data unit and uses the underlying Ethernet physical layer transport mechanisms. In other words, a data unit on an Ethernet link transports an Ethernet frame as its payloa ...
s. Constraints may be selectively enabled; this feature would be required in the example above to generate corrupt frames. Constraints may be arbitrarily complex, involving interrelationships among variables, implications, and iteration. The SystemVerilog constraint solver
Constraint programming (CP) is a paradigm for solving combinatorial problems that draws on a wide range of techniques from artificial intelligence, computer science, and operations research. In constraint programming, users declaratively state th ...
is required to find a solution if one exists, but makes no guarantees as to the time it will require to do so as this is in general an NP-hard
In computational complexity theory, NP-hardness ( non-deterministic polynomial-time hardness) is the defining property of a class of problems that are informally "at least as hard as the hardest problems in NP". A simple example of an NP-hard pr ...
problem (boolean satisfiability
In logic and computer science, the Boolean satisfiability problem (sometimes called propositional satisfiability problem and abbreviated SATISFIABILITY, SAT or B-SAT) is the problem of determining if there exists an interpretation that satisfi ...
).
Randomization methods
In each SystemVerilog class there are 3 predefined methods for randomization: pre_randomize, randomize and post_randomize. The randomize method is called by the user for randomization of the class variables. The pre_randomize method is called by the randomize method before the randomization and the post_randomize method is called by the randomize method after randomization.
class eth_frame;
rand bit 7:0dest;
rand bit 7:0src;
rand bit 5:0f_type;
rand byte payload[];
bit 1:0 fcs;
rand bit corrupted_frame;
constraint basic
function void post_randomize()
this.calculate_fcs(); // update the fcs field according to the randomized frame
if (corrupted_frame) // if this frame should be corrupted
this.corrupt_fcs(); // corrupt the fcs
endfunction
endclass
Controlling constraints
The constraint_mode() and the random_mode() methods are used to control the randomization. constraint_mode() is used to turn a specific constraint on and off and the random_mode is used to turn a randomization of a specific variable on or off. The below code describes and procedurally tests an Ethernet frame
In computer networking, an Ethernet frame is a data link layer protocol data unit and uses the underlying Ethernet physical layer transport mechanisms. In other words, a data unit on an Ethernet link transports an Ethernet frame as its payloa ...
:
class eth_frame;
rand bit 7:0dest;
rand bit 7:0src;
rand bit 5:0f_type;
rand byte payload[];
bit 1:0 fcs;
rand bit corrupted_frame;
constraint basic
constraint one_src_cst
constraint dist_to_fcs
endclass
.
.
.
eth_frame my_frame;
my_frame.one_src_cst.constraint_mode(0); // the constraint one_src_cst will not be taken into account
my_frame.f_type.random_mode(0); // the f_type variable will not be randomized for this frame instance.
my_frame.randomize();
Assertions
Assertions are useful for verifying properties of a design that manifest themselves after a specific condition or state is reached. SystemVerilog has its own assertion specification language, similar to Property Specification Language Property Specification Language (PSL) is a temporal logic extending linear temporal logic with a range of operators for both ease of expression and enhancement of expressive power. PSL makes an extensive use of regular expressions and syntactic suga ...
. The subset of SystemVerilog language constructs that serves assertion is commonly called SystemVerilog Assertion or SVA.SystemVerilog Assertion: Introduction
/ref>
SystemVerilog assertions are built from sequences and properties. Properties are a superset of sequences; any sequence may be used as if it were a property, although this is not typically useful.
Sequences consist of boolean expressions
In computer science, a Boolean expression is an expression used in programming languages that produces a Boolean value when evaluated. A Boolean value is either true or false. A Boolean expression may be composed of a combination of the Boolean con ...
augmented with temporal operators. The simplest temporal operator is the ##
operator which performs a concatenation:
sequence S1;
@(posedge clk) req ##1 gnt;
endsequence
This sequence matches if the gnt
signal goes high one clock cycle after req
goes high. Note that all sequence operations are synchronous to a clock.
Other sequential operators include repetition operators, as well as various conjunctions. These operators allow the designer to express complex relationships among design components.
An assertion works by continually attempting to evaluate a sequence or property. An assertion fails if the property fails. The sequence above will fail whenever req
is low. To accurately express the requirement that gnt
follow req
a property is required:
property req_gnt;
@(posedge clk) req , => gnt;
endproperty
assert_req_gnt: assert property (req_gnt) else $error("req not followed by gnt.");
This example shows an implication operator , =>
. The clause to the left of the implication is called the antecedent
An antecedent is a preceding event, condition, cause, phrase, or word.
The etymology is from the Latin noun ''antecedentem'' meaning "something preceding", which comes from the preposition ''ante'' ("before") and the verb ''cedere'' ("to go").
...
and the clause to the right is called the consequent
A consequent is the second half of a hypothetical proposition. In the standard form of such a proposition, it is the part that follows "then". In an implication, if ''P'' implies ''Q'', then ''P'' is called the antecedent and ''Q'' is called t ...
. Evaluation
Evaluation is a
systematic determination and assessment of a subject's merit, worth and significance, using criteria governed by a set of standards. It can assist an organization, program, design, project or any other intervention or initiative ...
of an implication starts through repeated attempts to evaluate the antecedent. When the antecedent succeeds, the consequent is attempted, and the success of the assertion depends on the success of the consequent. In this example, the consequent won't be attempted until req
goes high, after which the property will fail if gnt
is not high on the following clock.
In addition to assertions, SystemVerilog supports assumptions and coverage of properties. An assumption establishes a condition that a formal logic
Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the science of deductively valid inferences or of logical truths. It is a formal science investigating how conclusions follow from premise ...
proving tool must assume to be true. An assertion specifies a property that must be proven true. In simulation
A simulation is the imitation of the operation of a real-world process or system over time. Simulations require the use of models; the model represents the key characteristics or behaviors of the selected system or process, whereas the ...
, both assertions and assumptions are verified against test stimuli. Property coverage allows the verification engineer to verify that assertions are accurately monitoring the design.
Coverage
Coverage as applied to hardware verification languages refers to the collection of statistics based on sampling events within the simulation. Coverage is used to determine when the device under test A device under test (DUT), also known as equipment under test (EUT) and unit under test (UUT), is a manufactured product undergoing testing, either at first manufacture or later during its life cycle as part of ongoing functional testing and calibra ...
(DUT) has been exposed to a sufficient variety of stimuli that there is a high confidence that the DUT is functioning correctly. Note that this differs from code coverage
In computer science, test coverage is a percentage measure of the degree to which the source code of a program is executed when a particular test suite is run. A program with high test coverage has more of its source code executed during testing ...
which instruments the design code to ensure that all lines of code in the design have been executed. Functional coverage ensures that all desired corner
Corner may refer to:
People
* Corner (surname)
* House of Cornaro, a noble Venetian family (''Corner'' in Venetian dialect)
Places
* Corner, Alabama, a community in the United States
* Corner Inlet, Victoria, Australia
* Corner River, a tributar ...
and edge case
An edge case is a problem or situation that occurs only at an extreme (maximum or minimum) operating parameter. For example, a stereo speaker might noticeably distort audio when played at maximum volume, even in the absence of any other extreme ...
s in the design space have been explored.
A SystemVerilog coverage group creates a database of "bins" that store a histogram
A histogram is an approximate representation of the distribution of numerical data. The term was first introduced by Karl Pearson. To construct a histogram, the first step is to " bin" (or " bucket") the range of values—that is, divide the ent ...
of values of an associated variable. Cross-coverage can also be defined, which creates a histogram representing the Cartesian product
In mathematics, specifically set theory, the Cartesian product of two sets ''A'' and ''B'', denoted ''A''×''B'', is the set of all ordered pairs where ''a'' is in ''A'' and ''b'' is in ''B''. In terms of set-builder notation, that is
: A\ ...
of multiple variables.
A sampling event controls when a sample is taken. The sampling event can be a Verilog event, the entry or exit of a block of code, or a call to the sample
method of the coverage group. Care is required to ensure that data are sampled only when meaningful.
For example:
class eth_frame;
// Definitions as above
covergroup cov;
coverpoint dest
coverpoint f_type
psize: coverpoint payload.size
sz_x_t: cross f_type, psize;
endgroup
endclass
In this example, the verification engineer is interested in the distribution of broadcast and unicast frames, the size/f_type field and the payload size. The ranges in the payload size coverpoint reflect the interesting corner cases, including minimum and maximum size frames.
Synchronization
A complex test environment consists of reusable verification components that must communicate with one another. Verilog's 'event
Event may refer to:
Gatherings of people
* Ceremony, an event of ritual significance, performed on a special occasion
* Convention (meeting), a gathering of individuals engaged in some common interest
* Event management, the organization of ev ...
' primitive allowed different blocks of procedural statements to trigger each other, but enforcing thread synchronization was up to the programmer's (clever) usage. SystemVerilog offers two primitives specifically for interthread synchronization: ''mailbox
Mailbox may refer to:
* Letter box (also known as a letter plate, letter hole, deed or mail slot), a private receptacle for ''incoming'' mail
* Post box (also known as a drop box), a public receptacle for ''outgoing'' mail
** Pillar box, a fre ...
'' and ''semaphore
Semaphore (; ) is the use of an apparatus to create a visual signal transmitted over distance. A semaphore can be performed with devices including: fire, lights, flags, sunlight, and moving arms. Semaphores can be used for telegraphy when ar ...
''. The mailbox is modeled as a FIFO message queue. Optionally, the FIFO can be type-parameterized so that only objects of the specified type may be passed through it. Typically, objects are class instances representing '' transactions'': elementary operations (for example, sending a frame) that are executed by the verification components. The semaphore is modeled as a counting semaphore
In computer science, a semaphore is a variable or abstract data type used to control access to a common resource by multiple threads and avoid critical section problems in a concurrent system such as a multitasking operating system. Semaphores ...
.
General improvements to classical Verilog
In addition to the new features above, SystemVerilog enhances the usability of Verilog's existing language features. The following are some of these enhancements:
*The procedural assignment operator
Assignment, assign or The Assignment may refer to:
* Homework
* Sex assignment
* The process of sending National Basketball Association players to its development league; see
Computing
* Assignment (computer science), a type of modification ...
s (<=, =) can now operate directly on arrays.
*Port (inout, input, output) definitions are now expanded to support a wider variety of data type
In computer science and computer programming, a data type (or simply type) is a set of possible values and a set of allowed operations on it. A data type tells the compiler or interpreter how the programmer intends to use the data. Most progra ...
s: struct
In computer science, a record (also called a structure, struct, or compound data) is a basic data structure. Records in a database or spreadsheet are usually called "rows".
A record is a collection of ''fields'', possibly of different data types ...
, enum
Telephone number mapping is a system of unifying the international telephone number system of the public switched telephone network with the Internet addressing and identification name spaces. Internationally, telephone numbers are systematicall ...
, real
Real may refer to:
Currencies
* Brazilian real (R$)
* Central American Republic real
* Mexican real
* Portuguese real
* Spanish real
* Spanish colonial real
Music Albums
* ''Real'' (L'Arc-en-Ciel album) (2000)
* ''Real'' (Bright album) (201 ...
, and multi-dimensional types are supported.
*The for loop
In computer science a for-loop or for loop is a control flow statement for specifying iteration. Specifically, a for loop functions by running a section of code repeatedly until a certain condition has been satisfied.
For-loops have two par ...
construct now allows automatic variable declaration inside the for statement. Loop flow control is improved by the ''continue'' and ''break'' statements.
*SystemVerilog adds a ''do''/while loop to the ''while'' loop construct.
* Constant variables, i.e. those designated as non-changing during runtime, can be designated by use of ''const
In some programming languages, const is a type qualifier (a keyword applied to a data type) that indicates that the data is read-only. While this can be used to declare constants, in the C family of languages differs from similar constructs i ...
''.
* Variable initialization can now operate on arrays.
*Increment and decrement operators
Increment and decrement operators are unary operators that ''add'' or ''subtract'' one, to or from their operand, respectively.
They are commonly implemented in imperative programming languages. C-like languages feature two versions (pre- and ...
(x++
, ++x
, x--
, --x
) are supported in SystemVerilog, as are other compound assignment operators (x += a
, x -= a
, x *= a
, x /= a
, x %= a
, x <<= a
, x >>= a
, x &= a
, x ^= a
, x , = a
) as in C and descendants.
*The preprocessor has improved `define macro
Macro (or MACRO) may refer to:
Science and technology
* Macroscopic, subjects visible to the eye
* Macro photography, a type of close-up photography
* Image macro, a picture with text superimposed
* Monopole, Astrophysics and Cosmic Ray Observat ...
-substitution capabilities, specifically substitution within literal-strings (""), as well as concatenation of multiple macro-tokens into a single word.
*The fork/join construct has been expanded with ''join_none'' and ''join_any''.
*Additions to the `timescale directive allow simulation timescale to be controlled more predictably in a large simulation environment, with each source file
In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
using a local timescale.
*Task ports can now be declared ''ref''. A reference gives the task body direct access to the source arguments in the caller's scope, known as "pass by reference
In a programming language, an evaluation strategy is a set of rules for evaluating expressions. The term is often used to refer to the more specific notion of a ''parameter-passing strategy'' that defines the kind of value that is passed to the f ...
" in computer programming. Since it is operating on the original variable itself, rather than a copy of the argument's value, the task/function can modify variables (but not nets) in the caller's scope in real time. The inout/output port declarations pass variables by value, and defer updating the caller-scope variable until the moment the task exits.
*Functions can now be declared ''void
Void may refer to:
Science, engineering, and technology
* Void (astronomy), the spaces between galaxy filaments that contain no galaxies
* Void (composites), a pore that remains unoccupied in a composite material
* Void, synonym for vacuum, a ...
'', which means it returns
Return may refer to:
In business, economics, and finance
* Return on investment (ROI), the financial gain after an expense.
* Rate of return, the financial term for the profit or loss derived from an investment
* Tax return, a blank document o ...
no value.
*Parameters
A parameter (), generally, is any characteristic that can help in defining or classifying a particular system (meaning an event, project, object, situation, etc.). That is, a parameter is an element of a system that is useful, or critical, when ...
can be declared any type, including user-defined ''typedef''s.
Besides this, SystemVerilog allows convenient interface to foreign languages (like C/C++), by SystemVerilog DPI
SystemVerilog DPI (Direct Programming Interface) is an interface which can be used to interface SystemVerilog with foreign languages. These foreign languages can be C, C++, SystemC as well as others. DPIs consist of two layers: a SystemVerilog ...
(Direct Programming Interface).
Verification and synthesis software
In the design verification role, SystemVerilog is widely used in the chip-design industry. The three largest EDA vendors (Cadence Design Systems
Cadence Design Systems, Inc. (stylized as cādence), headquartered in San Jose, California, is an American multinational computational software company, founded in 1988 by the merger of SDA Systems and ECAD, Inc. The company produces software, ...
, Mentor Graphics
Siemens EDA is a US-based electronic design automation (EDA) multinational corporation for electrical engineering and electronics, headquartered in Wilsonville, Oregon. Founded in 1981 as Mentor Graphics, the company was acquired by Siemens ...
, Synopsys
Synopsys is an American electronic design automation (EDA) company that focuses on silicon design and verification, silicon intellectual property and software security and quality. Products include tools for logic synthesis and physical desig ...
) have incorporated SystemVerilog into their mixed-language HDL simulators. Although no simulator can yet claim support for the entire SystemVerilog Language Reference Manual, making testbench interoperability
Interoperability is a characteristic of a product or system to work with other products or systems. While the term was initially defined for information technology or systems engineering services to allow for information exchange, a broader def ...
a challenge, efforts to promote cross-vendor compatibility are underway. In 2008, Cadence and Mentor released the Open Verification Methodology, an open-source class-library and usage-framework to facilitate the development of re-usable testbenches and canned verification-IP. Synopsys, which had been the first to publish a SystemVerilog class-library (VMM), subsequently responded by opening its proprietary VMM to the general public. Many third-party providers have announced or already released SystemVerilog verification IP.
In the design synthesis role (transformation of a hardware-design description into a gate-netlist
In electronic design, a netlist is a description of the connectivity of an electronic circuit. In its simplest form, a netlist consists of a list of the electronic components in a circuit and a list of the nodes they are connected to. A netwo ...
), SystemVerilog adoption has been slow. Many design teams use design flows which involve multiple tools from different vendors. Most design teams cannot migrate to SystemVerilog RTL-design until their entire front-end tool suite ( linters, formal verification
In the context of hardware and software systems, formal verification is the act of proving or disproving the correctness of intended algorithms underlying a system with respect to a certain formal specification or property, using formal met ...
and automated test structure generators) support a common language subset.
See also
*List of HDL simulators
HDL simulators are software packages that simulate expressions written in one of the hardware description languages, such as VHDL, Verilog, SystemVerilog.
This page is intended to list current and historical HDL simulators, accelerators, emulat ...
(Search for SV2005)
*Verilog-AMS
Verilog-AMS is a derivative of the Verilog hardware description language that includes analog and mixed-signal extensions (AMS) in order to define the behavior of analog and mixed-signal systems. It extends the event-based simulator loops of Veril ...
*e (verification language)
e is a hardware verification language (HVL) which is tailored to implementing highly flexible and reusable verification testbenches.
History
''e'' was first developed in 1992 in Israel by Yoav Hollander for his Specman software. In 1995 he ...
*SpecC
SpecC is a System Description Language (SDL), or System-level Design Language (SLDL), and is an extension of the ANSI C programming language. It is used to aid the design and specification of digital embedded systems, providing improved productiv ...
*Accellera
Accellera Systems Initiative (Accellera) is a standards organization that supports a mix of user and vendor standards and open interfaces development in the area of electronic design automation (EDA) and integrated circuit (IC) design and manufact ...
* SystemC
*SystemRDL
The SystemRDL language, supported by the SPIRIT Consortium, was specifically designed to describe and implement a wide variety of control status registers. Using SystemRDL, developers can automatically generate and synchronize register views for ...
References
*
*
*
*
*
*
*
*
* Spear, Chris
"SystemVerilog for Verification"
Springer, New York City, NY.
* Stuart Sutherland, Simon Davidmann, Peter Flake
"SystemVerilog for Design Second Edition: A Guide to Using SystemVerilog for Hardware Design and Modeling"
Springer, New York City, NY.
* Ben Cohen, Srinivasan Venkataramanan, Ajeetha Kumari and Lisa Pipe
SystemVerilog Assertions Handbook, 4th Edition, 2016- http://SystemVerilog.us
* Ben Cohen Srinivasan Venkataramanan and Ajeetha Kumar
A Pragmatic Approach to VMM Adoption, - http://SystemVerilog.us
* Erik Seligman and Tom Schuber
Formal Verification: An Essential Toolkit for Modern VLSI Design, Jul 24, 2015,
External links
;IEEE Standard Reference
The most recent SystemVerilog standard documents ar
available at no cost from IEEExplore
1800-2017 - IEEE Standard for SystemVerilog--Unified Hardware Design, Specification, and Verification Language
;Tutorials
SystemVerilog Tutorial for Beginners
;Standards Development
IEEE P1800
– Working group for SystemVerilog
* Sites used before IEEE 1800-2005
*
SystemVerilog official website
*
SystemVerilog Technical Committees
;Language Extensions
Verilog AUTOs
– An open source meta-comment system to simplify maintaining Verilog code
;Online Tools
EDA Playground
– Run SystemVerilog from a web browser (free online IDE)
sverule
– A SystemVerilog BNF Navigator (current to IEEE 1800-2012)
;Other Tools
SVUnit
– unit test framework for developers writing code in SystemVerilog. Verify SystemVerilog modules, classes and interfaces in isolation.
sv2v
- open-source converter from SystemVerilog to Verilog
{{DEFAULTSORT:Systemverilog
Hardware description languages
Hardware verification languages
System description languages
Programming languages created in 2002