UVM Ready: Transitioning Mixed-Signal Verification Environments to Universal Verification Methodology

Similar documents
UVM Ready: Transitioning Mixed-Signal Verification Environments to Universal Verification Methodology

Easier UVM Functional Verification for Mainstream Designers

Easy migration between frameworks using UVM Multi- Language (UVM-ML) Dr. Mike Bartley, Test and Verification Solutions

The Verification Future needs an Easier UVM

SVA in a UVM Class-based Environment by Ben Cohen, author, consultant, and trainer

Verification Prowess with the UVM Harness

Universal Verification Methodology(UVM)

VCS AMS. Mixed-Signal Verification Solution. Overview. testing with transistor-level accuracy. Introduction. Performance. Multicore Technology

With great power comes great responsibility:

5 Developing Acceleratable Universal Verification Components (UVCs)

Getting Started with UVM. Agenda

UVM Rapid Adoption: A Practical Subset of UVM. Stuart Sutherland, Sutherland-HDL, Inc. Tom Fitzpatrick, Mentor Graphics Corp.

Configuring a Date with a Model

OVM/UVM Update. Universal Verification Methodology. Open Verification Methodology. Tom Fitzpatrick Verification Technologist Mentor Graphics Corp.

Development of UVM based Reusabe Verification Environment for SHA-3 Cryptographic Core

Next Generation Design and Verification Today UVM REG: Path Towards Coverage Automation in AMS Simulations

Integrate Ethernet QVIP in a Few Hours: an A-to-Z Guide by Prashant Dixit, Questa VIP Product Team, Mentor Graphics

Easier UVM Making Verification Methodology More Productive. John Aynsley, Dr David Long, Doulos

UVM hardware assisted acceleration with FPGA co-emulation

REAL VALUE MODELING FOR IMPROVING THE VERIFICATION PERFORMANCE

Getting Started with OVM 2.0

UVM-SystemC Standardization Status and Latest Developments

Verification Prowess with the UVM Harness

A Systematic Approach to Creating Behavioral Models CDNLive, March, 2015 Bob Peruzzi, Joe Medero

An Evaluation of the Advantages of Moving from a VHDL to a UVM Testbench by Shaela Rahman, Baker Hughes

IOT is IOMSLPT for Verification Engineers

Comprehensive AMS Verification using Octave, Real Number Modelling and UVM

package uvm_svid_monitor_package; import uvm_pkg::*; // //svid_transmit_packet_configuration

Warren Anderson Ravi Ram AMD Vijay Akkaraju Synopsys

Making it Easy to Deploy the UVM by Dr. Christoph Sühnel, frobas GmbH

Sunburst Design - SystemVerilog UVM Verification Training by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc.

Stitching UVM Testbenches into Integration-Level

Equivalence Validation of Analog Behavioral Models

UVM for VHDL. Fast-track Verilog for VHDL Users. Cont.

SystemVerilog Virtual Classes, Methods, Interfaces and Their Use in Verification and UVM

Creating Stimulus and Stimulating Creativity:

Module- or Class-Based URM? A Pragmatic Guide to Creating Verification Environments in SystemVerilog. Paradigm Works, Inc. Dr.

Vertical Reuse of functional verification from subsystem to SoC level (with seamless SoC emulation)

SystemC Standardization Update Including UVM for SystemC Introduction to the Universal Verification Methodology in SystemC

Small, Maintainable Tests

Advanced Verification Topics. Bishnupriya Bhattacharya John Decker Gary Hall Nick Heaton Yaron Kashai Neyaz Khan Zeev Kirshenbaum Efrat Shneydor

Hiding the Guts by Ray Salemi, Senior Verification Consultant, Mentor Graphics

User Experience with UVM

Modeling Usable & Reusable Transactors in SystemVerilog Janick Bergeron, Scientist

Beyond UVM Registers Better, Faster, Smarter

Generation of UVM compliant Test Benches for Automotive Systems using IP-XACT with UVM-SystemC and SystemC AMS

The Top Most Common SystemVerilog Constrained Random Gotchas

LEVERAGING A NEW PORTABLE STIMULUS APPROACH Graph or rule based stimulus descriptions

Formal Contribution towards Coverage Closure. Deepak Pant May 2013

Mixed Signal Verification Transistor to SoC

Boost Verification Results by Bridging the Hardware/Software Testbench Gap

Simulation-Based FlexRay TM Conformance Testing - An OVM Success Story

Real Portable Models for System/Verilog/A/AMS

Automating Root-Cause Analysis to Reduce Time to Find Bugs by Up to 50%

Want a Boost in your Regression Throughput? Simulate common setup phase only once.

Simplified UVM for FPGA Reliability UVM for Sufficient Elemental Analysis in DO-254 Flows by Shashi Bhutada, Mentor Graphics

UVM Tips & Tricks. By: Shankar Arora. Logic Fruit Technologies. White Paper

Verification of Digital Systems, Spring UVM Basics

Simulation-Based FlexRay TM Conformance Testing using OVM. Mark Litterick Senior Consultant and Co-Founder, Verilab

Efficient methods for analog mixed signal verification Interface handling methods, trade-offs and guidelines

A mixed signal verification platform to verify I/O designs

Slicing Through the UVM's Red Tape A Frustrated User's Survival Guide

Seven Separate Sequence Styles Speed Stimulus Scenarios

Efficient Failure Triage with Automated Debug: a Case Study by Sean Safarpour, Evean Qin, and Mustafa Abbas, Vennsa Technologies Inc.

My Testbench Used to Break! Now it Bends: Adapting to Changing Design Configurations

Applying Stimulus & Sampling Outputs UVM Verification Testing Techniques

AMS Behavioral Modeling

SVA Advanced Topics: SVAUnit and Assertions for Formal

FlexRay TM Conformance Testing using OVM

FPGA chip verification using UVM

Fast Track to Productivity Using Questa Verification IP by David Aerne and Ankur Jain, Verification Technologists, Mentor Graphics

Using bind for Class-based Testbench Reuse with Mixed- Language Designs

UVM Tips and Tricks - Runtime Tips

Perplexing Parameter Permutation Problems? Immunize Your Testbench

Reuse MATLAB Functions and Simulink Models in UVM Environments with Automatic SystemVerilog DPI Component Generation

Self- Tuning Coverage

This paper was presented at DVCon-Europe in November It received the conference Best Paper award based on audience voting.

SVA Alternative for Complex Assertions

Figure 5. HDL BFM interface with HVL proxy class

OVERVIEW: ============================================================ REPLACE

A Generic UVM Scoreboard by Jacob Andersen, CTO, Kevin Seffensen, Consultant and UVM Specialist, Peter Jensen, Managing Director, SyoSil ApS

Universal Verification Methodology (UVM) 10:05am 10:45am Sharon Rosenberg UVM Concepts and Architecture

Advancing system-level verification using UVM in SystemC

Slaying the UVM Reuse Dragon Issues and Strategies for Achieving UVM Reuse

DVCon India 2016 Abstract submission template. Taking UVM to wider user base the open-source way Name: Nagasundaram Thillaivasagam

Stick a fork in It: Applications for SystemVerilog Dynamic Processes. Doug Smith and David Long Doulos

Tackling Verification Challenges with Interconnect Validation Tool

Simulation-Based FlexRay TM Conformance Testing an OVM success story

Cadence Inverter Transistor Sizing Tutorial Cadence Inverter Ocean Introduction Cadence Inverter Corners Tutorial Cadence Inverter VerilogA Tutorial

Design and Verification of Slave Block in Ethernet Management Interface using UVM

AN INTRODUCTION TO UNIT TESTING

Analog Verification Concepts: Industrial Deployment Case Studies

Efficient Verification of Mixed-Signal SerDes IP Using UVM

Mastering Unexpected Situations Safely. Chassis & Safety Vehicle Dynamics

HDL Introduction and Reuse

SystemVerilog 3.1: It s What The DAVEs In Your Company Asked For

Please! Can someone make UVM easy to use?

Index. A a (atto) 154 above event 120, 207 restrictions 178

Open Verification Methodology (OVM)

Verification of AHB Protocol using UVM

Transcription:

UVM Ready: Transitioning Mixed-Signal Verification Environments to Universal Verification Methodology Arthur FREITAS Régis SANTONJA Accellera Systems Initiative 1

Outline Intro Pre-UVM, Module- Based Environment UVM Environment Accellera Systems Initiative 2

Introduction Our products top level is an analog schematic Verification requires several mixed-mode top-level simulations We describe here how we augmented our existing analog self-checking verification framework with UVM UVM gives us the power to verify hard-to-imagine mode transitions, digital configurations and analog setups Accellera Systems Initiative 3

Outline Intro Pre-UVM, Module- Based Environment UVM Environment Accellera Systems Initiative 4

PRE-UVM ENVIRONMENT Traditionally, most of the analog verification relied on waveform inspection Many analog engineers have limited knowledge of design verification languages Advanced verification methodologies are digital centric Maintaining two top-level verification environments to leverage the man power of analog designers and verification engineers is inpratical Accellera Systems Initiative 5

PRE-UVM ENVIRONMENT Pre-uvm environment used a domain specific language (DSL) based on: Pre-processor macros SystemVerilog APIs Testbench resources controlled by OOMR from the testcase file Verlilog configurations define the abstraction level of the DUT All testcase information centralized in a single file Accellera Systems Initiative 6

PRE-UVM ENVIRONMENT Accellera Systems Initiative 7

Voltage Divider Example (DUT) File: vdiv_ams.v /* voltage divider using 2 resistors*/ `include "constants.vams" `include "disciplines.vams" module vdiv(in,out,gnd); input in, gnd; output out; electrical in, out,gnd; //voltage divider using to resistors to gnd, out is the mid-point Resistor #(1K) r1(in,out); Resistor #(1K) r2(out,gnd); endmodule File: vdiv_wreal.vams /* voltage divider in wreal abstraction Assumes that the output impedance of the previous stage is low and that the input impedance of the next stage is high */ module vdiv(in,out,gnd); input in, gnd; output out; wreal in, out; assign out = (in gnd) / 2.0; endmodule Accellera Systems Initiative 8

Voltage Divider Example (TB) File: vbatt.vams /* This is the v source to drive the dut */ `include "constants.vams" `include "disciplines.vams" module vbatt(output out); electrical out; parameter real trise = 1us; parameter real tfall = 500n; parameter real Rout = 1m; real vout; //controlled by analog real v; //controlled by digital task set_vbat (input real val); v = val; endtask analog begin vout =transition(v,0,trise,tfall); I(out) <+ (V(out) - vout)/rout; end endmodule //low output impedance Task to set vbatt by OOMR Voltage Source with a series R File: tb.vams /* This is the testbench */ `include "constants.vams" `include "disciplines.vams" module tb; test test(); //this is our testcase instance wreal vout; //coerce vout to wreal (infers a CM) electrical gnd; vbatt vbatt(w1); //v source to drive the dut vdiv dut(.in(w1),.out(vout),.gnd(gnd) ); analog begin V(gnd) <+ 0; end endmodule Accellera Systems Initiative 9

Accellera Systems Initiative Voltage Divider Example (Testcase) File: test.sv /* This is the testcase file comprising the stimuli, checks, the design configuration, and sim options */ /*API macro defines. Listing the macros here just for illustration. Normally you put them in a separate file which is included here. */ `define V *1.0 Macros defining the `define mv *1e-3 APIs of our analog `define wait_for(t) #(t); verification language `define set_vbatt(vc) tb.vbatt.set_vbat(vc); `define check_v_min_max(s,mi,ma) begin \ if (mi <= s && s <= ma) begin $display( "check ok: %g < %g < %g", mi,s,ma); \ end else begin $display( "ERROR: %g < %g < %g", mi,s,ma); errcnt++; end end module test; int errcnt; initial begin `wait_for(1ns); //ramp up to 12V `set_vbatt(12`v) `wait_for(2us); //perform analog check `check_v_min_max(tb.vout, 5.8`V, 6.1`V) Directed Test comprising stimulus and checks end endmodule //now down to 6V `set_vbatt(600`mv); `wait_for(1us); //perform analog check `check_v_min_max(tb.vout, 290`mV, 310`mV) `wait_for(2us); $display( "SIMULATION %sed!, (errcnt == 0)? "PASS : FAIL ); $stop; Allows for checking internal nodes of the DUT // please notice that you can use `defines to make configurations more readable // for example `define DUT_IS_WREAL instance tb.dut liblist wreallib; `define DUT_IS_ELECT instance tb.dut liblist amslib; Design configuration in verilog config topcfg; syntax allowing users to choose the abstraction level of DUT design simlib.tb; blocks. default liblist simlib amslib wreallib; //setting dut to ELECTRICAL abstraction. ` DUT_IS_ELECT endconfig //user can put here simulation options as verilog comments so that a pre-processor script can take them into account //for example: temp=130 10

Outline Intro Pre-UVM, Module- Based Environment UVM Environment Accellera Systems Initiative 11

Prerequisite: THE UVM ENVIRONMENT Backwards compatibility with well-established verification framework Ability to write directed tests with the same syntax and format that our analog engineers are familiarized with Re-use as much as possible the existing framework (e.g., analog mixed-signal drivers, simulation launching scripts, etc) Be able to extend the framework to full-fledged UVM Accellera Systems Initiative 12

THE UVM ENVIRONMENT Implementation embodiment: Existing mixed-signal drivers shared among UVM and module based tests UVM drivers outsource signal wiggling through task calls Proxy systemverilog interfaces link to existing MS drivers Keep same testcase format by using extern virtual tasks Accellera Systems Initiative 13

THE UVM ENVIRONMENT Accellera Systems Initiative 14

Transaction and Sequence for our Voltage Source Example File: vbatt_transaction.sv, class vbatt_transaction extends uvm_sequence_item; // the voltages rand real vbatt; `uvm_object_utils_begin(vbatt_transaction) `uvm_field_real(vbatt, UVM_DEFAULT) `uvm_object_utils_end function new (string name = "vbatt_transaction"); super.new(name); endfunction endclass Radom real number to drive voltages File: vbatt_sequence.sv class vbatt_seq extends uvm_sequence #(vbatt_transaction); // the voltages rand real s_b; `uvm_object_utils(vbatt_seq) // Constructor // Sequence body definition virtual task body(); Generic sequence which can be constrained by the user `uvm_do_with(req, {req.vbatt == s_b; } ) endtask // Constraints go here (-1V < = Vbatt <= 15V) constraint default_vbatt_voltage { s_b >= -1.0 && s_b <= 15.0; } // pre and post body to raise and drop objections endclass Accellera Systems Initiative 15

UVM Driver and Proxy Interface File: vbatt_driver.sv class vbatt_driver extends uvm_driver #(vbatt_transaction); protected virtual interface vbatt_if vif; `uvm_component_utils(vbatt_driver) // Constructor; Build Phase task run_phase(uvm_phase phase); super.run_phase(phase); forever begin // Get new item from the sequencer seq_item_port.get_next_item(req); // Drive the item vif.vbatt = req.vbatt; // Communicate item done to the sequencer seq_item_port.item_done(); end endtask endclass interface vbatt_if ( ); // Import UVM package import uvm_pkg::*; `include "uvm_macros.svh" File: vbatt_if.sv real vbatt; // Control events event new_drv_values; /* used by the monitor to detect changes and by the module TB to drive vbatt */ always @( vbatt ) begin #1 new_drv_values; // triggers module API `uvm_info("if", "Change on drive vbatt",uvm_low); end endinterface Event to trigger external modulebased driver Accellera Systems Initiative 16

UVM Top module and Generic Test module tb_uvm_top; import uvm_pkg::*; import vbatt_pkg::*; File: uvm_top_module.sv vbatt_if vbatt_if_i(); //interface instantiation always @(vbatt_if_i. new_drv_values) begin /*detect transactions redirect to legacy module-based driver */ end tb.vbatt.set_vbat(vbatt_if_i.vbatt); initial begin OOMR to module-based driver Virtual Interface drive event uvm_config_db #(virtual interface vbatt_if)::set( null, "*.*env*", "vif", vbatt_if_i); //always run the test case provided by user run_test("my_env_test"); end endmodule `include "uvm_macros.svh" import uvm_pkg::*; import vbatt_pkg::*; `include "uvm_tb.sv" File: uvm_env_test.sv class my_env_test extends uvm_test; `uvm_component_utils(my_env_test) vbatt_tb vbatt_tb_h; vbatt_sequencer seqr; // Constructor, Build Phase, Connect Phase /* The actual testcase is implemented in an external task provided by the user via command line */ extern virtual task scenario(); virtual task run_phase(uvm_phase phase); phase.raise_objection(.obj(this)); scenario(); // Actual testcase provided by the user phase.drop_objection(.obj(this)); endtask endclass External task provided by the user Accellera Systems Initiative 17

Directed Tests using UVM The infrastructure allows: Execute the existing legacy tests Create constrained-random scenarios EXAMPLE: Module based api: `define set_vbatt(vc) tb.vbatt.set_vbat(vc); API translation for UVM testcase: `define set_vbatt(vc) assert(vbseq.randomize() \ with {vbseq.s_b == vc; }); \ vbseq.start(vbseqr); Accellera Systems Initiative 18

Accellera Systems Initiative Voltage Divider Example (UVM Testcase) File: uvm_test.sv /* This is the UVM testcase file comprising the stimuli, checks and the design configuration */ `ifndef COMPILE_CONFIG /*API macro defines. Listing the macros here just for illustration. Normally you put them in a separate file which is included here. */ `define V *1.0 Macros defining the `define mv *1e-3 APIs of our analog `define wait_for(t) #(t); verification language //mapping set_vbatt macro to UVM constraint `define set_vbatt(vc) assert(vbseq.randomize() with {vbseq.s_b == vc; }); \ vbseq.start(vbseqr); `define check_v_min_max(s,mi,ma) begin\ if (mi <= s && s <= ma) begin \ $display( "check ok: %g < %g < %g", mi,s,ma);\ end else begin \ $display( "ERROR: %g < %g < %g", mi,s,ma); \ `uvm_error("vout_err", "VOUT out of range");\ end end task uvm_env_test::scenario(); //initializing the UVM env vbatt_seq vbseq; vbatt_sequencer vbseqr; vbseqr = vbatt_tb_h.env.agent.sequencer; Outsourcing error handling to the UVM environment with uvm_error macro EXTERNAL Task called by the uvm_env_test class vbseq = vbatt_seq::type_id::create(.name("vbseq"),.contxt(get_full_name())); `wait_for(1ns); //ramp up to 12V `set_vbatt(12`v) `wait_for(2us); //perform analog check `check_v_min_max(tb.vout, 5.8`V, 6.1`V) //now down to 6V `set_vbatt(600`mv); `wait_for(1us); //perform analog check `check_v_min_max(tb.vout, 290`mV, 310`mV) `wait_for(2us); endtask `else //!`ifndef COMPILE_CONFIG `define DUT_IS_WREAL instance tb.dut liblist wreallib; `define DUT_IS_ELECT instance tb.dut liblist amslib; config topcfg; design simlib.tb; default liblist simlib amslib wreallib; ` DUT_IS_WREAL endconfig `endif //temp=27 19 Same Syntax can be used to write legacy directed tests

METHODOLOGY ACHIEVEMENTS AND ROADMAP Waveform Inspections Self-checking Analog Verification Mixed-Signal UVM Ready: 2013 Mixed-Signal UVM: 2015 Good enough for small analog ICs Schematic-based testbench No regression testing Mostly SPICE configurations Adequate to mixedsignal ICs Programmable textbased testbench Regression testing Mixed SPICE, Wreal and Verilog-ams configurations Backwards compatible to module-based method Port digital block-level UVM tests to the top-level UVM register layer integration Simple top-level randomizations Mixed SPICE, Wreal and Verilog-ams configurations Full-fledged UVM Result predictors, assertions and Scoreboards Randomization to verify mode transitions, digital configurations and analog setups Mainly Wreal configurations and limited use of SPICE and Verilog-ams models Accellera Systems Initiative 20

Conclusion Successful transition of mixed-signal verification environment to UVM Methodology backwards compatible with traditional module-based framework Users can choose what environment to use all information required to describe mixed-signal simulation is gathered in 1 single file Block-level UVM can be easily ported to the top level Massive amount of test vectors can be produced with very little effort Accellera Systems Initiative 21

Questions Finalize slide set with questions slide Accellera Systems Initiative 22

References [1] A. Freitas Real-Valued Mixed-Signal Verification: An Abstraction Adjustable Methodology CDNLive EMEA 2013, Munich. [2] 1800-2012 - IEEE Standard for SystemVerilog-- Unified Hardware Design, Specification, and Verification Language, IEEE Computer Society, USA, 2012. [3] Standard Universal Verification Methodology Class Reference, Release 1.2, Accellera System Initiative, USA, 2014. Accellera Systems Initiative 23

DESIGN CONFIGURATION AT ELABORATION TIME Accellera Systems Initiative 24

Typical UVM Environment Source: verificationacademy.com Accellera Systems Initiative 25