Top Banner
Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav 1 ,Anupam Maurya 2 , Prabhat Kumar 3 , Juhi 4 , VerifLabs 1,2 , VerifWorks 3 , Vecima Networks 4 , © Accellera Systems Initiative 1
24

Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

Jul 25, 2018

Download

Documents

hoangkiet
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

Intelligent Coverage Driven, modern verification for VHDL based designs in

native VHDL with OSVVMVijay Mukund Srivastav1,Anupam Maurya2, Prabhat Kumar3, Juhi4,

VerifLabs1,2, VerifWorks3 , Vecima Networks4,

© Accellera Systems Initiative 1

Page 2: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

Agenda• VHDL usage in the industry• Modern DV challenges• Functional Coverage• Constrained Random generation• Assertion Based Verification• Looking ahead: UVM-VHDL?

© Accellera Systems Initiative 2

Page 3: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

VHDL usage in the industry• VHDL is preferred HDL for:

– FPGA– Some ASICs– Defence labs– Aerospace etc.

• Modern FPGAs are multi-million gate equivalent

• So verifying them in simulation is critical

© Accellera Systems Initiative 3

Page 4: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

Recent FPGA survey

© Accellera Systems Initiative 4

Source:

Page 5: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

Modern design-verification• DV (Design-Verification) as a field has grown by leaps

and bounds– Directed Testing Constrained Radom Verification (CRV)– Waveform check Assertion Based Verification (ABV)– Manual test list Coverage Driven Verification (CDV)

• Common technologies – applicable to all HDL based designs

• SystemVerilog/UVM – popular for Verilog/SV RTL• VHDL Equally capable language as SystemVerilog• UVM OSVVM is an option for VHDL designs

© Accellera Systems Initiative 5

Page 6: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

What is OSVVM?• Open Source VHDL Verification Methodology. • Implemented in VHDL-2008 or VHDL-2002• Works with regular VHDL simulators.• Packages are FREE.• Packages + Methodology for:

– Functional Coverage (FC)– Constrained Random (CR)– Intelligent Coverage - Test generation using FC

holes• Mixes well with other approaches (directed,

algorithmic, file, random)• Works in any VHDL test bench.• Readable by All (in particular RTL engineers).

© Accellera Systems Initiative 6

Page 7: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

OSVVM in a nut-shell

• AlertLogPkgMessaging utilities (a la UVM – Log)• CoveragePkg API for Functional Coverage

definitions• RandomPkg Constrained Random generation• VerifWorks is adding a UVM-layer on top of OSVVM

– uvm_info* is now available!– Will be donated if there is enough industry interest

• Assertions in native VHDL (erstwhile PSL) and/or SVA

© Accellera Systems Initiative 7

Page 8: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

AXI4-Lite Memory controller• AXI4-Lite protocol• RTL in VHDL• VIP implemented using

OSVVM• VerifWorks’s AXI4-Lite

Assertion-IP is plugged-in– PSL version– Native in VHDL 2008

© Accellera Systems Initiative 8

MemoryController

TB

MemoryDUT

mem_ifTOP

Page 9: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

What is Functional Coverage?• A process in which user specifies the goal explicitly –

“what to look for”• OSVVM provides a package with APIs to capture the

“goal”• User has to identify “what to cover” and also “code

them” using the new APIs – Coverage Model• A tool then monitors the simulation run, annotates the

“coverage model” on-the-fly

© Accellera Systems Initiative 9

Page 10: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

FCOV Process

© Accellera Systems Initiative 10

Identify the coverage plan(based on DUT Spec, test plan)

For each plan-item, identify•“when” to cover•“what” to cover

Code the coverage model using OSVVM API

Run simulation, collect coverageRefine cov model

Analyze the coverage results

Add more tests

Page 11: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

OSVVM Coverage Package API

© Accellera Systems Initiative 11

Page 12: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

AXI4-Lite Memory Controller FCOV model

© Accellera Systems Initiative 12

Page 13: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

Cross coverage

© Accellera Systems Initiative 13

Page 14: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

CVC Copyright 2010 www.cvcblr.com 14

Random vs. Directed testing

• Directed tests exercise a specific scenario– You direct the test– You explicitly orchestrate the interactions– What if you miss something?

• Injecting randomness exposes corner cases• Multiple adoption strategies• Specify variables to be randomized• Tool generates random values

Page 15: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

CVC Copyright 2010 www.cvcblr.com 15

Constraint Random generation

• Pure random is hardly useful – takes too long to do something useful

• Need constraints to create interesting scenarios• Procedural constraints are flexible and powerful

– Simple flow– Most engineers understand procedural programming– Easy to debug – Native in VHDL language

• Use OSVVM.RandomPkg.all;

Page 16: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

• Restrict the values inside a defined “set”• Applications:

– CSR – Configuration & Status Registers – values, modes etc.– Test modes– instructions etc.

CVC Copyright 2015 www.cvcblr.com

v_pkt_len := rng_v.RandUnsigned ((64, 128, 256, 1023)

);

Using set membership in constraints

-- Randomly select a value within a set of valuesimpure function RandUnsigned (A : integer_vector ; Size : natural) return Unsigned;

Page 17: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

Constrained Random Gen – OSVVM style

© Accellera Systems Initiative 17

Source: OSVVM User Guide

Page 18: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

CRV-CDV dilemma

© Accellera Systems Initiative 18

• Ω - “very large” sample set.• π - probability distribution over Ω.

Goal: Sample points x∈Ω at random from distribution π.

Page 19: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

Intelligent Coverage driven Random Generation

• Use FCOV model as a guide to random generation• Works well for input, stimulus coverage space• Randomly select holes in Functional Coverage Model

© Accellera Systems Initiative 19

Cov.RandCovPoint - API

Page 20: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

Intelligent CDV

© Accellera Systems Initiative 20

• Use FCOV model as a guide to random generation

• Randomly select holes in Functional Coverage Model

• Achieves in “n” iterations

Page 21: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

Assertion Based Verification in VHDL

• Temporal assertions capability from IEEE 1850-PSL VHDL 2008

• All the modern verification technologies are now available to VHDL users natively – No additional cost (of a mixed language simulator for

instance).

© Accellera Systems Initiative 21

Page 22: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

UVM-VHDL via OSVVM?• UVM layer on top of OSVVM packages?• OSVVM provides good packages - like

SV’s – Constrained Random features– Coverage model etc.

• PSL provides ABV features in VHDL (a la SVA)

• UVM is popular in SV world, can we add UVM-VHDL?

© Accellera Systems Initiative 22

Page 23: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

UVM-VHDL layer around OSVVM• VerifWorks has developed basic UVM package• Covers messaging• Run time verbosity control (a la +uvm_verbosity)

© Accellera Systems Initiative 23

OSVVM UVMALWAYS UVM_NONE

PASSED UVM_LOW

FINAL UVM_MEDIUM

INFO UVM_HIGH

DEBUG UVM_FULL

Page 24: Intelligent Coverage Driven, modern verification for … · Intelligent Coverage Driven, modern verification for VHDL based designs in native VHDL with OSVVM Vijay Mukund Srivastav

Questions ?

© Accellera Systems Initiative 24