Course Formal Assertion Based Verification Session Formal Model Checking Meslinger
Course Formal Assertion Based Verification Session Formal Model Checking Meslinger
[email protected] | www.verificationacademy.com
Session Overview
In this session you will learn …
• Model Checking Overview
• ABC’s of Applying Formal
Backgrounder Review
How Complete is Your Verification?
• Advanced testbench environments …
• Can take a long time to setup and get working
• Cannot traverse every part of a design’s state space
• The longer a bug goes undetected
• The more expensive it is to find
• The harder it is to fix
• The longer it takes to validate
Measure Coverage
Simulation Testbench
// SystemVerilog Assertion
1000000011101011011011110111
A [31:0] property p_comp;
@(posedge clk)
E E |-> (A==B);
101010001000110101110100101
B [31:0] endproperty
assert property (p_comp);
Custom
USB
CPU DSP Ethernet Protocol Core
Controller
Front-end
Memory Custom
Core
DMA Back-end
AMBA AHB
PCI-Express
Slave IF Slave IF
PCI-E PHY
UART GPIO
Power-Management,
Clock, Reset, Test, Analog
Initial state
No
Design
Assertions
Model
How Formal Explores the State Space
State Space
Custom
USB
CPU DSP Ethernet Protocol Core
Controller
Front-end
Memory Custom
Core
DMA Back-end
AMBA AHB
PCI-Express
Slave IF Slave IF
PCI-E PHY
UART GPIO
Power-Management,
Clock, Reset, Test, Analog
Initial state
SVA Assertion
S35
assert property (@(posedge clk)
$rose(S35) |=> S35[1:4] ##1 !S35 );
40 state FSM
12 inputs
> 4.5 years @ 1 vector/ns
Simulation Formal
Time Time
formal Formal
compile Model
S’n+1(x) = S’n(x) + Sn+1(x)
P iff !$x S’n(x) & !P(x)
…
… formal
Formal
analysis
Results
© Mentor Graphics Corporation, all rights reserved.
Formal Results
• Inconclusive 0
• Bounded Proof
Proven Depth M M
• Proof
• Firing(CEX)
N
• Covered
• Uncoverable Any Input/Infinite Depth CEX with Depth N
© Mentor Graphics Corporation, all rights reserved.
Expectations for Formal Results
• Will my true assertion be proven?
• Mutex/LEC checks are easy (localized logic)
• Inductive checks are easy (localized in time)
• End to end check are difficult (long latency)
• Scoreboard checks are difficult (lots of state)
• Will my false assertion fire?
• The start state can impact if a CEX is found
• Most CEX are found within 10’s of cycles
• CEX have been found to 100’s or 1000’s of cycles
© Mentor Graphics Corporation, all rights reserved.
Questa® Property Checking (“PropCheck”)
• Mathematically prove the DUT=Spec
• For all inputs and for all time
• Advantages
• Industry leading performance
• Integrated with Questa® Verification Manager/UCDB
[email protected] | www.verificationacademy.com