Func Verif Overview New
Func Verif Overview New
Overview
Subir K. Roy
International Institute of Information Technology,
Bangalore
Verification, What Is It?
Verification
1996
300K gates
Code Verify (30 ~ Synthesis
40%) P&R
2000
1M SoC
Code Verify (50 ~ 80%) SynthesisP&R
Verification methodology manual, 2000-
TransEDA
6
Percentage of Total Flaws
Noise
12%
Slow Path
13%
Cost of
Fixing
a Problem
Verification complexity
SOC
Complex
ASIC
Medium
Small ASIC
ASIC
10
Design complexity System-on-a-chip verification, 2001 – P.Rashinkar
Completion Metrics; How do we know when
the verification is done?
• Emotionally, or Intuitively;
– Out of money? Exhausted?
– Competition’s product is there.
– Software people are happy with your hardware.
– There have been no bugs reported for two weeks.
• More rigorous criteria;
– All tests passed
– Test Plan Coverage
– Functional Coverage
– Code Coverage
– Bug Rates have flattened toward bottom.
Current Status and Challenges of SoC Verification
for Embedded Systems Market - Chong-Min Kyung,
IEEE International SOC Conference, 2003
Verification Challenges
Prototyping
Emulation
Hardware
Accelerated
Simulation
Simulation
Basic Semi-formal
verification Verification
tool Formal
Verification
Source : Cadence
A Complex Multimedia SOC
Source : Cadence
Tegra4i
Application Processor For Multimedia Systems
Cores : 12
3D Stereo
Full Programmability
System-On-a-Chip ( SoC )
Cell Phone
Set-Top Boxes, TV Chips, …
Car on-board system…
Full systems
Hardware with its embedded software
Execution
Environment settings, testbench development
Test scenarios implementation
Assertions development
Simulation runs
Proof runs
Reporting and risk assessments
Functional Verification Overview About Existing
Methodologies - François Cerisier 2010
Verification Planning - What is it?
Verification Plan
Specifies how the design will be tested
Priorities
Results
Coverage
Bugs found,
Bugs fixed,
Bugs left (workaround),
Bugs deferred or postponed
Verification holes
Specification
readings
Designer’s
Interpretation
Designer’s own
Verification
Coding
Design
Design
No-Bug Bug
Verification
False True
Test Fails
Negative Positive
Specification
readings readings
Designer’s DV Engineer’s
Interpretation Interpretation
Coding Verification
Design
Simulations
Simple integration tests
Pros: controllability, debug
Cons: runtime
a = 1;
#20 b = 1; Some part of the
$display (“status is = %d”,c); design is tested
... repeatedly.
Combinational Combinational
Combinational
logic logic
logic
Cycle-based Event-driven
Timing resolution Clock cycle User-defined minimum
delay
Evaluation time point Rising/falling/both At the occurrence of
clock edges events
Evaluation node Every flip-flop At the output of every
boundary logic gate on the event
propagation path
Simulation time Proportional to the Proportional to the
(number of cycles) number of events (circuit
times (C/L size * size* no. of cycles*event
number of F/F’s) density)
Random Stimuli
Easy way to automate
Poor quality:
Can generate invalid inputs
Might never reach desired functionality
Needs:
Controlling randomness → Constraints
Measuring what has been done → Coverage
Automate behavior verification → Checks
→ Coverage Driven Verification
Input
Coverage Generation
Output
Generation
Test Scenario
Transaction Master
Generator BFM DUT
Seed
struct arbiter_transaction_s {
address : uint(bits:32);
data : uint(bits:32);
direction : [READ,WRITE];
delay : uint;
};
Instruction opcode
Instruction operands
Specifying a constraint :
A in [3..14]
C in [12..15]
A<B
B<C
Directed
The ADD64 opcode
Address = MAIN_CFG_REG_ADDR
Constrained
Opcode in [ add , sub , mul , div , mac ]
var tr : arbiter_transaction_s;
gen tr keeping {
speed == SLOW → .delay in [10..20];
speed == MEDIUM → .delay in [5..9];
speed == FAST → .delay in [0..4];
speed == RANDOM → .delay in [0..20];
};
drive(tr);
Sequence MAIN
do sequence keeping {
.kind == INIT;
};
for ii from 1 to 100 {
do sequence keeping {
.kind == RANDOM;
.speed in [FAST, VERY_FAST];
};
};
Sequences allow one to elevate the test scenario
abstraction level to a higher level view of the features
or application use-cases to be exercised.
Functional Verification Overview About Existing
Methodologies - François Cerisier 2010
Checking Outputs
Scoreboard or Data
Test Scenario Ref. Model Check
Seed
Protocol
Checker
Pass/Fail
Source : Specman Training Material Report
Basic Scoreboard Implementation
Struct transaction {
address : address_t;
data : data_t;};
…
scoreboard : list keyed(address) of transaction;
…
on input_event {
var t : transaction = new;
t.address = ‘i_addr’;
t.data = ‘t.data’;
scoreboard.add(t);
};
on output_event {
if not scoreboard.key_exist(‘o_addr’) then
error(“Unable to find address in scoreboard”);
else
check that scoreboard.first(.addr = “o_addr”).data
Functional Verification= “o_data”;
Overview About Existing
Methodologies - François Cerisier 2010
}
Protocol Checking
assert my_protocol_checker;
Code Coverage
➢ Has all RTL code been simulated ?
Functional Coverage
➢ Has all configuration been used ?
➢ …
Paths:
C1 and ( C3 or C4 ) → exec line 1 and 3
C2 and ( C3 or C4 ) → exec line 2 and 3
C1 and C5 → exec line 1 and 4
C2 and C5 → exec line 2 and 4
‘a’ toggle = 50 %
Functional Verification Overview About Existing
Methodologies - François Cerisier 2010
Code Coverage : Analysis
➢ Non-Covered Lines:
➢ Not tested
➢ Useless / dead code
➢ Covered lines
➢ Executed
!req
IDLE
req
gnt
GNT REQ
gnt !gnt
WAIT
Goal:
➢ Describe verification in terms of functionality
Problem:
➢ How do we describe functionality ?
➢ Instructions / Transactions,
➢ Configuration that need to be tested,
➢ Architectural limits that need to be tested (corner
cases)
➢ Any functional aspects of the design
Scoreboard or Data
Test Scenario Ref. Model Check
Seed
Monitor Protocol
Checker
Functional Coverage DB
Pass/Fail
Report
Source : Specman Training Material
Functional Coverage
We want to cover:
➢ All opcodes followed by all opcodes
➢ Checked
➢ Monitored
Pros:
➢ Automatic test generation to cover possible
interesting corner case scenarios
➢ To catch very tricky bugs that are difficult to
anticipate.
Cons:
➢ Traceability and reproducibility
➢ What is verification ?
➢ A task which tries to minimize bugs
➢ Why is verification needed ?
➢ Because no-one is perfect
➢ Because designs are just too complex
➢ What do we verify ?
➢ Everything
➢ When do we verify ?
➢ The earlier the better
➢ Who does the verification ?
➢ A verification expert
➢ How do we verify?
➢ System Verification
➢ Coverage Driven Verification
➢ Formal Verification
➢ Graph Base Verification
Functional Verification Overview About Existing
Methodologies - François Cerisier 2010
Thank You