8 Functional Verification

download 8 Functional Verification

of 42

Transcript of 8 Functional Verification

  • 8/10/2019 8 Functional Verification

    1/42

    1

  • 8/10/2019 8 Functional Verification

    2/42

    2

    Functional verification

    Marcin KazmierczakSwitchCore AB

  • 8/10/2019 8 Functional Verification

    3/42

    3

    SwitchCore today

    Fab-less semiconductor company Develops integrated switching devices with advanced

    QoS functionality for the gigabit Ethernet market. In-house back-end and full-custom design

    85 employees Offices in Lund, Stockholm, San Jose, Boston and

    Singapore

  • 8/10/2019 8 Functional Verification

    4/42

    4

    Design flow

    Specification RTL-DesignBlock-level

    Simulations

    Top-level

    Regression

    Synthesis

    Regression

    Tests netlist

    Floorplanning

    Layout

    Static Timing

    AnalysisDRC Tape Out

  • 8/10/2019 8 Functional Verification

    5/42

    5

    Verification Flow

    Specification

    Verification Plan

    Beh

    RTL coding

    TB

    RTL debug

    TC

    Ext sim

  • 8/10/2019 8 Functional Verification

    6/42

    6

    Why verify?

    Check that the design meets the specification Standards Bugs cause re-spin

    Cost Time

  • 8/10/2019 8 Functional Verification

    7/42

    7

    Cost of bug

    Block design Chip simulation

    More debug May require change in algorithm

    Silicon in lab Most often requires new tape-out Expensive

    At customer environment Very expensive Reputation

  • 8/10/2019 8 Functional Verification

    8/42

    8

    Simulate Stimulate a device from its inputs Monitor outputs for expected behaviour

    Show that the DUT works correctly for all validcombinations of inputs

    Functional simulation

    DUT

  • 8/10/2019 8 Functional Verification

    9/42

    9

    Testbench environment

    Software based simulation environment Resembles hardware lab

    Pattern generators Logic analyzers

    Bus-functional models Harness

  • 8/10/2019 8 Functional Verification

    10/42

    10

    Harness

    Testbench environment

    DUT

    BFM

    Engine (Scoreboard, Parser)

    Testcases

    BFM BFM

  • 8/10/2019 8 Functional Verification

    11/42

    11

    Bus-functional models

    Interfaces with DUT Raises level of abstraction Easier debug

    Encapsulation Protocol checking Error-injection Reuse

    PHY

    sendFrame (N, Size)setParam (N, VAL)setCOL (VAL)

  • 8/10/2019 8 Functional Verification

    12/42

    12

    Testcases

    Direct testcases Test isolated function Automated result

    Language Calls high-level routines intestbench

    Stimuli

    PASSFAIL

    TB ENGINE

    Expectedoutput

  • 8/10/2019 8 Functional Verification

    13/42

    13

    Verification plan

    General specification Features Definition of testcases

    Conformance test plan Specification of environment Allocation of resources Goals

    Difficult to plan all activities Block-level verification plan

  • 8/10/2019 8 Functional Verification

    14/42

    14

    Behavioural model

    External functionality High-level software

    constructs Keep it simple Shorter development time Faster simulations Debug testcases

    Archictectural issues Differences from RTL

    RTL

    BFM BFM

    BEH

  • 8/10/2019 8 Functional Verification

    15/42

    15

    Regression

    Test suite Automation Run on regular basis

    Verify added functionality Check that nothing already verified is broken Repeatable

  • 8/10/2019 8 Functional Verification

    16/42

    16

    Observability

    Propagation Detection

    DUT

  • 8/10/2019 8 Functional Verification

    17/42

    17

    Triggering an error condition Coverage

    Controllability

    DUT

  • 8/10/2019 8 Functional Verification

    18/42

    18

    Code coverage

    Statement Branch Path

    Quality measure of test suite Deficiencies? Hardware concurrency

  • 8/10/2019 8 Functional Verification

    19/42

    19

    Functional coverage

    State machine States Transitions

    Transactions CPU interfaces

    Sequences Frames Cpu accesses

    Combinations

  • 8/10/2019 8 Functional Verification

    20/42

    20

    Extended verification

    Testplan Basic sanity Functions Stress

    Fill coverage holes Random simulation When are we done?

  • 8/10/2019 8 Functional Verification

    21/42

    21

    Random simulation

    Stress the device (realistic environment) Internal interactions Hit corner-case

    Requires more advanced environment Parameters Error-injection Repeatable

    Run-time

  • 8/10/2019 8 Functional Verification

    22/42

    22

    Random simulation

    Requirements on verification environment

    DUT

    BFM

    BFM BFM

    Randomparameters

    Expectedresult

    PASS ?FAIL ?

    constraintsseed

  • 8/10/2019 8 Functional Verification

    23/42

    23

    Generation

    Bus-functional models Higher-level of abstraction Identification

    Sequence numbers

    Coverage Frame types Sequences

  • 8/10/2019 8 Functional Verification

    24/42

    24

    Checking

    Protocol checkers Bus-functional models Standards

    DUTBFM BFM

    Protocol violation

  • 8/10/2019 8 Functional Verification

    25/42

    25

    Checking

    Scoreboard Transfer function Expected data Comparison function

    Identification On-the-fly checking Difficulties? DUTBFM BFM

    Scoreboard Match/Comparison

  • 8/10/2019 8 Functional Verification

    26/42

    26

    Parsing

    Testcases written in proprietary format (SwitchCore) Easy to change and re-run Pre-processing of testcases (Perl)

    Testcase TestfilePre-processor

  • 8/10/2019 8 Functional Verification

    27/42

    27

    HDL Testbenches

    HDLs (Verilog/VHDL) can be powerful with advancedcoding style

    Known languages But not efficient in testbench coding Deficiencies

    Non re-rentrant tasks in Verilog No powerful primitives

  • 8/10/2019 8 Functional Verification

    28/42

    28

    Specman/E

    Powerful primitives Functional Coverage Points Randomization Methodology No upfront definition of testcases Verisity (www.verisity.com)

  • 8/10/2019 8 Functional Verification

    29/42

    29

    Functional Coverage Points

    Generated stimuli Frame types

    State machines Signals

    Values

    Transactions Cpu access

    Sequence / Combination of events Crossing coverage points

  • 8/10/2019 8 Functional Verification

    30/42

    30

    Vera

    Verilog based Object-oriented Randomization functions Checking Synopsis (www.synopsis.com)

  • 8/10/2019 8 Functional Verification

    31/42

    31

    TestBuilder

    C++ Class-library Generation / checking Open-source Integration with NC-Verilog Cadence (www.cadence.com)

  • 8/10/2019 8 Functional Verification

    32/42

    32

    Formal Verification

    Mathematical Proof properties Exhaustive Size Properties

    Equivalence checking

    netlist - netlist RTL - netlist

  • 8/10/2019 8 Functional Verification

    33/42

  • 8/10/2019 8 Functional Verification

    34/42

    34

    Semi-Formal Verification

    Increase controllability Formally check if assertions can be violated Used with assertions during RTL simulations Not exhaustive Zero-in (www.0-in.com)

  • 8/10/2019 8 Functional Verification

    35/42

    35

    System simulation

    Board level (several ASICs) Interfaces Interactions Boundaries? Simulation models

    PHY Q NP IF

    RAM

    uP

  • 8/10/2019 8 Functional Verification

    36/42

    36

    Emulation

    System of FPGAs Faster simulation Software/Hardware co-verification Difficulties

    Generation Checking

    Longer iteration time Size of design?

    Very expensive www.quickturn.com

  • 8/10/2019 8 Functional Verification

    37/42

    37

    When are we done?

    How do we know that we have checked everything? Functions tested Bug rate Coverage Very difficult question...

  • 8/10/2019 8 Functional Verification

    38/42

    38

    Bugs

    Bug tracking important Categories

    Minor Respin

    DOA (Dead-On-Arrival)

  • 8/10/2019 8 Functional Verification

    39/42

    39

    SwitchCore

    ModelSim Simulation on RTL and netlist (with timing) Netlist simulation are very slow Static timing analysis more efficient in finding timing

    issues

  • 8/10/2019 8 Functional Verification

    40/42

    40

    SwitchCore

    Block-level testbenches Multi-block testbenches Top-level testbench Regression suite Random tests

  • 8/10/2019 8 Functional Verification

    41/42

  • 8/10/2019 8 Functional Verification

    42/42

    42

    Future

    Random simulation Testcase generation Closed-loop random generation Formal methods Hybrid methods (e.g. Semi-formal) Less RTL coding Verification more and more important