TDEB Top Bar

Trending
Semiconductor Industry News — The Digital Electronics Blog
Follow Us

TDEB Masthead

The Semiconductor Hub

Semiconductors.  Chips and Systems.  Innovation.

Indexed by leading Search Engines, AI and referenced by Engineers worldwide 500+ Articles 10M+ Pageviews 30+ Reports 50+ Citations

The World of HVLs and VIPs: Verification Languages and Verification IP

mg
by
0
Share Facebook X LinkedIn WhatsApp Email

Hardware verification languages (HVLs) and verification IP (VIP) are the two ideas that moved chip verification from hand-written directed tests to reusable, randomized testbenches. An HVL such as SystemVerilog or e adds randomization, constraints, coverage and object-oriented code to the testbench. A VIP is a ready-made, protocol-aware verification component, for example for PCIe or USB, built on a standard methodology so it plugs into any compliant testbench. This post was written in December 2009, when that shift was under way; notes on what has happened since are in the deep dive.

Over the last decade functional verification of ASIC systems has witnessed a paradigm shift in verification methodologies.

Key takeaways

  • Directed tests do not scale to million-gate designs and beyond; constrained random stimulus with functional coverage does.
  • HVLs add high-level programming features plus built-in constructs for randomization, constraints, coverage and connection to the HDL design.
  • In 2009 SystemVerilog (with OVM or VMM) and e (Specman, with eRM) were the leading choices.
  • VIPs let a team verify standard interfaces on a SoC without writing a protocol model from scratch.
  • It is the methodology, more than the language, that decides which VIPs will fit your testbench. Since 2011 that methodology is mostly UVM.

From directed tests to HVLs

Until the late 1990s, verification project requirements were met by traditional testbenches written using an HDL (hardware description language, used for coding the design) or a software language like C. These test environments supported directed testing by generating a pre-calculated stream of input data, focusing only on the desired coverage points in the design.

As the design size and complexity grew exponentially, with a million-gate design becoming the norm, the directed verification approach clearly became cumbersome. It is an almost impossible task to manually code the test vectors to test a million-gate design under all operating conditions. Ever more aggressive project schedules also pushed in favor of a powerful yet easy to develop test environment. Hardware verification languages came as a boon to solve these problems.

HVLs typically include features of high-level programming languages like C++ or Java, and in addition they support built-in constructs which help you develop the environment with fewer lines of code. It is much easier to generate random or constrained random stimuli as needed, and the built-in HDL interface support lets you connect the environment to the DUT (design under test) directly.

SystemVerilog, e and their methodologies

Of the handful of HVL choices available in the market, SystemVerilog and the e language (Specman) are the most popular and widely adopted by semiconductor companies. The reason these two languages became the preferred choice is not just the language features but the accompanying methodology prescribed by the EDA vendors (for example OVM and VMM for SystemVerilog, and eRM for e). These methodologies provide guidelines to build modular, reusable and extensible verification modules which support plug-and-play development.

Why SoCs need verification IP

With most silicon designs today adopting the SoC (System-on-Chip) methodology, where several design IPs are integrated on a single chip, there is a new requirement for corresponding verification IPs (VIP). By taking advantage of the VIPs available in the market, the verification team can build a test environment for a complex SoC with minimal resource and time utilization.

A standard verification methodology serves as a common platform for the various third-party VIP developers and their customers. So it is actually the verification methodology rather than the language which influences the decision on VIP selection. Some methodologies have made it possible to integrate verification modules written in different languages, so that you don't have to discard any legacy code (you may have to make it methodology compliant though).

Adoption, as seen in 2009

When this post was written, VIPs and verification methodologies were still relatively new concepts in the verification world and were being tried out in experimental phases by semiconductor companies. Not all of the industry leaders had adopted these methodologies completely, probably because of the overhead in training their current workforce and replacing legacy code. Here's hoping that the EDA vendors enhance their methodologies to make them more developer friendly.

Deep dive: the numbers and details

This part holds the comparison tables, a worked example, a code sketch and what has changed since 2009. Skip it if the overview is all you need.

Directed versus constrained random testing

AspectDirected testingConstrained random with coverage
StimulusWritten by hand for each scenarioGenerated by a solver within legal constraints
FindsBugs the engineer thought ofAlso corner cases nobody listed
Measure of progressNumber of tests passingFunctional and code coverage closure
CheckingExpected values often coded into each testSelf-checking scoreboards and reference models
Scales to large designsPoorlyWell, with compute farms running many seeds

A small illustration

Take a packet interface with a length field of 1 to 1,500 bytes, four priority levels and an optional error flag. That is 1,500 x 4 x 2 = 12,000 combinations before considering back-pressure or timing. Writing 12,000 directed tests is not realistic. A constrained random test describes only the legal ranges, perhaps with weights to favor the edges (lengths 1, 2, 1,499, 1,500), and a coverage model records which bins have been hit. The team then adds constraints or seeds until coverage closes. The numbers here are illustrative.

What constrained random looks like in code

A minimal SystemVerilog sketch of the packet example above: the class declares random fields and the legal ranges, the solver picks values, and a covergroup records which bins were hit.

class packet;
  rand bit [10:0] len;      // 1 to 1,500 bytes
  rand bit [1:0]  prio;     // four priority levels
  rand bit        err;      // optional error flag
  constraint c_len { len inside {[1:1500]};
                     len dist { [1:2] := 10, [3:1498] := 1, [1499:1500] := 10 }; }
  constraint c_err { err dist { 0 := 95, 1 := 5 }; }
endclass

covergroup pkt_cov with function sample(packet p);
  cp_len  : coverpoint p.len  { bins small = {[1:64]}; bins mid = {[65:1499]}; bins max = {1500}; }
  cp_prio : coverpoint p.prio;
  cp_err  : coverpoint p.err;
  cross cp_prio, cp_err;
endgroup

The weights favor the edge lengths, the error flag fires in about 5% of packets, and the cross of priority and error gives 4 x 2 = 8 bins to close. A UVM sequence would create, randomize and send such packets through a driver, while a monitor rebuilds them for the scoreboard and coverage.

The methodologies side by side

NameLanguageOrigin
eRM (e Reuse Methodology)e (Specman)Verisity, early 2000s; Verisity was acquired by Cadence in 2005
VMM (Verification Methodology Manual)SystemVerilogSynopsys with ARM, 2006
OVM (Open Verification Methodology)SystemVerilogCadence and Mentor Graphics, 2008
UVM (Universal Verification Methodology)SystemVerilogAccellera, UVM 1.0 in 2011, built mainly on OVM; later standardized as IEEE 1800.2

What is inside a VIP

ComponentJob
Sequence libraryReady-made legal and error traffic for the protocol
DriverTurns transactions into pin-level activity on the interface
MonitorWatches the pins and rebuilds transactions for checking
Protocol checkersFlag any violation of the interface specification
Coverage modelRecords which protocol features and corner cases were exercised
ConfigurationSelects modes, speeds, options and active or passive use

Choosing a VIP: questions reviewers ask

  • Which version of the protocol specification does it cover, and which optional features?
  • Is it native to your methodology, or wrapped from another language?
  • Does it ship a coverage model mapped to the specification, and a compliance test suite?
  • How good are the error messages when your design breaks the protocol?
  • Does it run on your simulator, and at what speed cost?

What has changed since

  • One methodology won. Accellera released UVM 1.0 in February 2011 (see the Accellera UVM downloads page for every release since), combining ideas from OVM and VMM. The IEEE approved it as IEEE Std 1800.2 in 2017 (Accellera press release, April 11, 2017), and the current edition is IEEE 1800.2-2020. It is the default for SystemVerilog testbenches.
  • SystemVerilog kept evolving. The language standard IEEE 1800 was revised several times; the current edition is IEEE 1800-2023, published in February 2024. e is standardized as IEEE 1647, last revised in 2019, and is still used, though less widely.
  • Commercial VIP is routine. The large EDA vendors and several specialist firms sell VIP for PCIe, CXL, USB, DDR and LPDDR, Ethernet, MIPI, AMBA and many other interfaces.
  • Beyond simulation. Formal verification, emulation and the Accellera Portable Stimulus Standard now sit alongside UVM, and some VIPs target emulation or formal as well.

FAQ

Is SystemVerilog an HDL or an HVL? Both. It extends Verilog for design and adds classes, randomization, constraints, coverage and assertions for verification.

What is the difference between design IP and verification IP? Design IP becomes part of the chip, for example a PCIe controller. Verification IP is testbench code that drives and checks that interface in simulation and never goes into silicon.

Do I still need directed tests? Yes, for bring-up, specific bug reproductions and features that random stimulus rarely reaches. Most teams use mostly random tests with a set of directed ones.

Share Facebook X LinkedIn WhatsApp Email

Post a Comment

0 Comments

Your comments will be moderated before it appears here.

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Learn more
Ok, Go it!