Sie sind auf Seite 1von 133

Introduction to

Questa AutoCheck,
CoverCheck, and Formal
Connectivity Checking
Chris Rockwood
Verification Technologist
Design Verification Technology Division
April 2014

Agenda

Questa AutoCheck

Automatic formal checks for common design issues

Questa CoverCheck

Formal analysis to improve code coverage


Also targets SVA covergroups (new in 10.3 release)

Connectivity Checking with Questa Formal


Exhaustive validation of SoC connectivity

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa Platform

Mentor Graphics Functional Verification Solutions

A broad arsenal of
verification solutions

Seamless integration of
formal and simulation

Common compilers

Common GUI features

Unified Coverage Database


2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa Formal-based Technologies


A full range of formal solutions
Higher
Effort

Property
Checking

Automated
Applications

Fully
Automatic

Low
Effort

I/F Protocols
Control Logic
Data Integrity
Post-Silicon Debug
Connectivity
Register Map Checks
Design Constraints
Assertion Generation
Reset and X-States
Improve Coverage
Automatic Checks
CDC Verification
2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa Formal-based Technologies


A full range of formal solutions
Higher
Effort

Property
Checking

Automated
Applications

Fully
Automatic

Low
Effort

I/F Protocols
Control Logic
Data Integrity
Post-Silicon Debug
Connectivity
Register Map Checks
Design Constraints
Assertion Generation
Reset and X-States
Improve Coverage
Automatic Checks
CDC Verification
2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Agenda

Questa AutoCheck

Automatic formal checks for common design issues

Questa CoverCheck

Formal analysis to improve code coverage


Also targets SVA covergroups (new in 10.3 release)

Connectivity Checking with Questa Formal


Exhaustive validation of SoC connectivity

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa Formal-based Technologies


A full range of formal solutions
Higher
Effort

Property
Checking

Automated
Applications

Fully
Automatic

Low
Effort

I/F Protocols
Control Logic
Data Integrity
Post-Silicon Debug
Connectivity
Register Map Checks
Design Constraints
Assertion Generation
Reset and X-States
Improve Coverage
Automatic Checks
CDC Verification
2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Automatic Checks

Easy-to-use, predefined checks for common problems

Push-button functional verification


for checks such as:
RTL
Initialization Checks
- Uninitialized registers
- X propagation/reachability
Functional Issue Checks
- Combinational loops
- Case statement checks
- Arithmetic checks
- Bus checks
- FSM checks

Verilog,
VHDL,
SystemVerilog

Coverage Reachability Checks


- Unreachable Logic
- Unreachable FSM state
- Unreachable FSM transition
- Register stuck at constant
2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Automatic Checks

Easy-to-use, predefined checks for common problems

Push-button functional verification


for checks such as:
RTL
Initialization Checks
- Uninitialized registers
- X propagation/reachability
Functional Issue Checks
- Combinational loops
- Case statement checks
- Arithmetic checks
- Bus checks
- FSM checks
Coverage Reachability Checks
- Unreachable Logic
- Unreachable FSM state
- Unreachable FSM transition
- Register stuck at constant

Verilog,
VHDL,
SystemVerilog

Synthesized
Netlist

No testbench
No assertions
No constraints (initially)
Assumptions optional

Includes design functionality, design configurations,


operating conditions, and initialization sequence

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

Formal
Netlist

www.mentor.com

Company Confidential

Finding Bugs with Simulation


Timeline

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Finding Bugs with Simulation


Timeline

Develop RTL

RTL

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Finding Bugs with Simulation


Timeline

Develop RTL
Develop testbench

Testbench

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

RTL

Company Confidential

Finding Bugs with Simulation


Timeline

Develop RTL
Develop testbench
Run simulation

Testbench
Simulate

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

RTL

www.mentor.com

Company Confidential

Finding Bugs with Simulation


Timeline

Develop RTL
Develop testbench

Testbench

RTL

Simulate

Run simulation
Measure results

Coverage

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Finding Bugs with Simulation


Timeline

Develop RTL
Develop testbench

Testbench

RTL

Simulate

Run simulation
Measure results
Analyze results

Coverage

Analyze

Bug?

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Finding Bugs with Simulation


Timeline

Develop RTL
Develop testbench

Testbench

RTL

Simulate

Run simulation
Measure results
Analyze results

Analyze

Coverage

Bug?

Time to find bugs can be too long


Simulation cannot find all bugs
2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Finding Bugs with Questa AutoCheck


Timeline

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Finding Bugs with Questa AutoCheck


Timeline

Develop RTL
RTL

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Finding Bugs with Questa AutoCheck


Timeline

Develop RTL
RTL

Run AutoCheck

AutoCheck

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Finding Bugs with Questa AutoCheck


Timeline

Develop RTL
RTL

Run AutoCheck

AutoCheck

Analyze results
Bug?

Analyze

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Finding Bugs with Questa AutoCheck


Timeline

Develop RTL
Run AutoCheck
Analyze results
Bug?

RTL

You can use


AutoCheck
as soon as you
have your RTL
code

AutoCheck

2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Analyze

Company Confidential

Finding Bugs with Questa AutoCheck


Timeline

Develop RTL
Run AutoCheck
Analyze results
Bug?

RTL

You can use


AutoCheck
as soon as you
have your RTL
code

AutoCheck

Analyze

Shortest time to find bugs


Finds bugs that simulation misses!
2014 Mentor Graphics Corp.

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa AutoCheck
Questa

Automated design checking for:

Common design errors


Coverage closure issues
The functional impact of Xs

2014 Mentor Graphics Corp.

10

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa AutoCheck
Questa

Automated design checking for:

Common design errors


Coverage closure issues
The functional impact of Xs

No testbench required

You can use it whenever you have RTL available for your
block/chip and BEFORE you simulate

2014 Mentor Graphics Corp.

10

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa AutoCheck
Questa

Automated design checking for:

Common design errors


Coverage closure issues
The functional impact of Xs

No testbench required

You can use it whenever you have RTL available for your
block/chip and BEFORE you simulate

No need to write assertions

Assertions are automatically generated by Questa AutoCheck and


used/proved under the hood

2014 Mentor Graphics Corp.

10

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa AutoCheck
Questa

Automated design checking for:

Common design errors


Coverage closure issues
The functional impact of Xs

No testbench required

You can use it whenever you have RTL available for your
block/chip and BEFORE you simulate

No need to write assertions

Assertions are automatically generated by Questa AutoCheck and


used/proved under the hood

Easy to run
2014 Mentor Graphics Corp.

10

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Arithmetic and Bus Checks

Arithmetic checks

Overflow checks
Division by 0 checks

Various bus checks

Multiple drivers active


No driver active

Clear reporting of violations

Easy debugging

Show waveforms
Source code view

2014 Mentor Graphics Corp.

11

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Arithmetic and Bus Checks

Arithmetic checks

Overflow checks
Division by 0 checks

Overflow happens here

Various bus checks

Multiple drivers active


No driver active

Clear reporting of violations

Easy debugging

Show waveforms
Source code view

2014 Mentor Graphics Corp.

11

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Combinational Feedback Loop Check

Combinational feedback loops (CFLs) may simulate at the RTL level


without problems

Bad behavior only shows in simulation with back-annotated timing or


ultimately in silicon

Easy to debug

Finds CFLs early

Schematic view spans modules


Direct link to source code

Saves debug time later


Prevent respins
Checks sequential control logic

2014 Mentor Graphics Corp.

12

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Combinational Feedback Loop Check

Combinational feedback loops (CFLs) may simulate at the RTL level


without problems

Bad behavior only shows in simulation with back-annotated timing or


ultimately in silicon

Easy to debug

Finds CFLs early

Schematic view spans modules


Direct link to source code

Saves debug time later


Prevent respins
Checks sequential control logic

Loops can span multiple


levels of logic and modules

2014 Mentor Graphics Corp.

12

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: Dead Code

Sometimes dead code is due to a complex functional bug


in the design and should be resolved

Example: AutoCheck will find this; most lint tools wont:


always @(posedge clk or negedge rstn)
if (!rstn)

en1 <= 1'b0;

else

en1 <= FSMst[0] ? 1'b1 : 1'b0;

always @(posedge clk or negedge rstn)


if (!rstn)
else

en2 <= 1'b0;

case (FSMst)
3'b100: en2 <= 1'b1; 3'b010: en2 <= 1'b1;
3'b001: en2 <= 1'b0; default: en2 <= 1'b0; endcase

assign sel = en1 && en2;


always @*
if (sel) pmux <= d1;
else

pmux <= d0;


2014 Mentor Graphics Corp.

13

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: Dead Code

Sometimes dead code is due to a complex functional bug


in the design and should be resolved

Example: AutoCheck will find this; most lint tools wont:


always @(posedge clk or negedge rstn)
if (!rstn)

en1 <= 1'b0;

else

en1 <= FSMst[0] ? 1'b1 : 1'b0;

always @(posedge clk or negedge rstn)


if (!rstn)
else

en2 <= 1'b0;

case (FSMst)
3'b100: en2 <= 1'b1; 3'b010: en2 <= 1'b1;

always 0

3'b001: en2 <= 1'b0; default: en2 <= 1'b0; endcase

assign sel = en1 && en2;


always @*
if (sel) pmux <= d1;
else

dead code

pmux <= d0;


2014 Mentor Graphics Corp.

13

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: FSM Deadlock with Dead Code

Sometimes checks are related

Simple FSM Deadlock conditions due to incorrect structure


can be found by lint tools and Questa AutoCheck

More complex sequential logic causing FSM Deadlock and


Dead Code can only be found by Questa AutoCheck

case (cstate)
3'b001: if (en)
nstate <= 3'b010;
else
nstate <= 3'b001;
3'b010: nstate <= 3'b100;
3'b100: if (bar)
nstate <= 3'b100;
else
nstate <= 3'b100;
default: nstate <= 3'b001;
endcase

FSM.v

Complex
Sequential
Logic

bar

2014 Mentor Graphics Corp.

14

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: FSM Deadlock with Dead Code

Sometimes checks are related

Simple FSM Deadlock conditions due to incorrect structure


can be found by lint tools and Questa AutoCheck

More complex sequential logic causing FSM Deadlock and


Dead Code can only be found by Questa AutoCheck

case (cstate)
3'b001: if (en)
nstate <= 3'b010;
else
nstate <= 3'b001;
3'b010: nstate <= 3'b100;
3'b100: if (bar)
nstate <= 3'b100;
else
nstate <= 3'b100;
default: nstate <= 3'b001;
endcase

FSM.v

Complex
Sequential
Logic

bar

Typo in FSM,
FSM structurally incorrect

Lint and
AutoCheck
Catch it

2014 Mentor Graphics Corp.

14

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: FSM Deadlock with Dead Code

Sometimes checks are related

Simple FSM Deadlock conditions due to incorrect structure


can be found by lint tools and Questa AutoCheck

More complex sequential logic causing FSM Deadlock and


Dead Code can only be found by Questa AutoCheck

case (cstate)
3'b001: if (en)
nstate <= 3'b010;
else
nstate <= 3'b001;
3'b010: nstate <= 3'b100;
3'b100: if (bar)
nstate <= 3'b001;
3'b100;
else
nstate <= 3'b100;
default: nstate <= 3'b001;
endcase

FSM.v

Complex
Sequential
Logic

bar

Lint and
AutoCheck
Catch it

2014 Mentor Graphics Corp.

14

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: FSM Deadlock with Dead Code

Sometimes checks are related

Simple FSM Deadlock conditions due to incorrect structure


can be found by lint tools and Questa AutoCheck

More complex sequential logic causing FSM Deadlock and


Dead Code can only be found by Questa AutoCheck

case (cstate)
3'b001: if (en)
nstate <= 3'b010;
else
nstate <= 3'b001;
3'b010: nstate <= 3'b100;
3'b100: if (bar)
nstate <= 3'b001;
3'b100;
else
nstate <= 3'b100;
default: nstate <= 3'b001;
endcase

FSM.v

Complex
Sequential
Logic

bar

bar stuck; FSM Deadlock,


FSM structurally correct

FSM.v

Lint
and
Only
AutoCheck
AutoCheck
Catch itit
catches

2014 Mentor Graphics Corp.

14

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: FSM Unreachable State/Transition

Lint finds simple case; only AutoCheck finds complex case


process (clk,rstn) begin
if (rstn = '0') then start <= '0'; inA_r <= '0';
elsif (clk'event and clk = '1') then
start <= inA and inB; inA_r <= inA;
process (clk,rstn) begin
if (rstn = '0') then enable <= '0';
elsif (clk'event and clk = '1') then
enable <= not inA_r and inB and start;
process (cstate,start,enable) begin case (cstate) is
when idle => if (start = '1') then nstate <= go;
else nstate <= idle; end if;
when go

=> nstate <= cont;

when cont => if (enable = '1') then nstate <= idle;

else nstate <= idle; end if;


when pass => nstate <= idle;
2014 Mentor Graphics Corp.

15

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: FSM Unreachable State/Transition

Lint finds simple case; only AutoCheck finds complex case


process (clk,rstn) begin
if (rstn = '0') then start <= '0'; inA_r <= '0';
elsif (clk'event and clk = '1') then
start <= inA and inB; inA_r <= inA;
process (clk,rstn) begin
if (rstn = '0') then enable <= '0';
elsif (clk'event and clk = '1') then
enable <= not inA_r and inB and start;
process (cstate,start,enable) begin case (cstate) is
when idle => if (start = '1') then nstate <= go;
else nstate <= idle; end if;
when go

=> nstate <= cont;

when cont => if (enable = '1') then nstate <= idle;

typo

else nstate <= idle; end if;


when pass => nstate <= idle;
2014 Mentor Graphics Corp.

15

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: FSM Unreachable State/Transition

Lint finds simple case; only AutoCheck finds complex case


process (clk,rstn) begin
if (rstn = '0') then start <= '0'; inA_r <= '0';
elsif (clk'event and clk = '1') then
start <= inA and inB; inA_r <= inA;
process (clk,rstn) begin
if (rstn = '0') then enable <= '0';
elsif (clk'event and clk = '1') then
enable <= not inA_r and inB and start;
process (cstate,start,enable) begin case (cstate) is
when idle => if (start = '1') then nstate <= go;
else nstate <= idle; end if;
when go

=> nstate <= cont;

when cont => if (enable = '1') then nstate <= pass;

good

else nstate <= idle; end if;


when pass => nstate <= idle;
2014 Mentor Graphics Corp.

15

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: FSM Unreachable State/Transition

Lint finds simple case; only AutoCheck finds complex case


process (clk,rstn) begin
if (rstn = '0') then start <= '0'; inA_r <= '0';
elsif (clk'event and clk = '1') then
start <= inA and inB; inA_r <= inA;
process (clk,rstn) begin
if (rstn = '0') then enable <= '0';

unreachable

elsif (clk'event and clk = '1') then


enable
always
0

<= not inA_r and inB and start;

process (cstate,start,enable) begin case (cstate) is


when idle => if (start = '1') then nstate <= go;
else nstate <= idle; end if;
when go

=> nstate <= cont;

when cont => if (enable = '1') then nstate <= pass;

good

else nstate <= idle; end if;


when pass => nstate <= idle;
2014 Mentor Graphics Corp.

15

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Other Miscellaneous Design Checks

Various register checks


Multiply-driven signals
Stuck-at checks

Develop RTL
Run AutoCheck

Clock-in-data checks

Undriven logic checks

Illegal range checks

Case statement checks

and other RTL, structural, and formal checks!

Analyze results
Bug?

2014 Mentor Graphics Corp.

16

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Other Miscellaneous Design Checks

Various register checks


Multiply-driven signals
Stuck-at checks

Develop RTL
Run AutoCheck

Clock-in-data checks

Undriven logic checks

Illegal range checks

Case statement checks

and other RTL, structural, and formal checks!

Analyze results
Bug?

AutoCheck finds design problems early


2014 Mentor Graphics Corp.

16

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

AutoCheck: Intuitive Debug

2014 Mentor Graphics Corp.

17

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

AutoCheck: Intuitive Debug

Select
Category

2014 Mentor Graphics Corp.

17

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

AutoCheck: Intuitive Debug

Select
Category

RMB choose
menu item to show
source/schematic/
FSM/waveforms

2014 Mentor Graphics Corp.

17

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Conclusion

Simulation alone is not enough

It takes too long to find bugs


Not all bugs will be found in simulation

2014 Mentor Graphics Corp.

18

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Conclusion

Simulation alone is not enough

It takes too long to find bugs


Not all bugs will be found in simulation

Questa

Automated design checking for:

Common design errors


Coverage closure issues
The functional impact of Xs

2014 Mentor Graphics Corp.

18

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Conclusion

Simulation alone is not enough

It takes too long to find bugs


Not all bugs will be found in simulation

Questa

Automated design checking for:

Common design errors


Coverage closure issues
The functional impact of Xs

The shortest time to find bugs


Finds critical bugs that simulation cant find
2014 Mentor Graphics Corp.

18

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Agenda

Questa AutoCheck

Automatic formal checks for common design issues

Questa CoverCheck

Formal analysis to improve code coverage


Also targets SVA covergroups (new in 10.3 release)

Connectivity Checking with Questa Formal


Exhaustive validation of SoC connectivity

2014 Mentor Graphics Corp.

19

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa Formal-based Technologies


A full range of formal solutions
Higher
Effort

Property
Checking

Automated
Applications

Fully
Automatic

Low
Effort

I/F Protocols
Control Logic
Data Integrity
Post-Silicon Debug
Connectivity
Register Map Checks
Design Constraints
Assertion Generation
Reset and X-States
Improve Coverage
Automatic Checks
CDC Verification
2014 Mentor Graphics Corp.

20

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Automatic Checks: CoverCheck

Easy-to-use predefined checks for common problems

Push-button functional verification for checks such as:


Initialization Checks
- Uninitialized registers
- X propagation/reachability
Functional Issue Checks
- Combinational loops
- Arithmetic checks
- Bus checks
-

RTL

Verilog,
VHDL,
SystemVerilog

Coverage Reachability Checks


- Statement
- Branch
- Condition
- Expression
- FSM
- Toggle
- Covergroups (New in 10.3)
2014 Mentor Graphics Corp.

21

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Automatic Checks: CoverCheck

Easy-to-use predefined checks for common problems

Push-button functional verification for checks such as:


Initialization Checks
- Uninitialized registers
- X propagation/reachability
Functional Issue Checks
- Combinational loops
- Arithmetic checks
- Bus checks
-
Coverage Reachability Checks
- Statement
- Branch
- Condition
- Expression
- FSM
- Toggle
- Covergroups (New in 10.3)

RTL

Verilog,
VHDL,
SystemVerilog

Synthesized
Netlist

No testbench
No assertions
No constraints (initially)
Assumptions optional

Includes design functionality, design configurations,


operating conditions, and initialization sequence

2014 Mentor Graphics Corp.

21

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

Formal
Netlist

www.mentor.com

Company Confidential

Coverage Metrics

Basic: Code/FSM/Assertion Coverage

Checks that all RTL has been exercised


Checks that all assertions have been exercised

Semi-automated: Transaction/Structural Coverage

Checks that all types of transactions have occurred


Ensures that the tests have sufficiently stressed the design

Advanced: Functional Coverage

Checks that all requirements for the design have been tested
Does the design work in all scenarios?

All of these coverage types are measured and tracked to


determine when verification is complete and the chip is
ready to tape out or go into the lab

2014 Mentor Graphics Corp.

22

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Coverage Metric Holes

Code/FSM/Assertion Coverage

Functional dead code and unreachable FSM states/transitions


Unreachable covergroup bins
Modes of the design that create dead code
Time can be wasted trying to hit these holes!

Transaction/Structural Coverage

Testbench doesnt stress the design enough


Incomplete functional models dont exercise all transactions

Functional Coverage

Incomplete specification or planning; lack of knowledge or time

Proper test planning can mitigate these challenges

Making use of static verification techniques such as


Questa CoverCheck can minimize time to closure
2014 Mentor Graphics Corp.

23

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Code Coverage: Statement (s)

Counts the execution of each statement on a line


Even if multiple statements

Example:
always @(posedge clk or negedge rstn)

reg <= dat;

C <= A && B;

Report style based on number of Statements


Enabled Coverage

Active

Hits

Misses

% Covered

----------------

------

----

------

---------

415

387

28

93.2

Stmts

2014 Mentor Graphics Corp.

24

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Code Coverage: Statement (s)

Counts the execution of each statement on a line


Even if multiple statements

Example:
always @(posedge clk or negedge rstn)

reg <= dat;


Count the statements
and the number of
times each one is hit

C <= A && B;

Report style based on number of Statements


Enabled Coverage

Active

Hits

Misses

% Covered

----------------

------

----

------

---------

415

387

28

93.2

Stmts

2014 Mentor Graphics Corp.

24

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Code Coverage: Branch (b)

Counts the execution of each conditional if/then/else


and case statement
All true and false branches are considered
Each (if/else if/else | case) element counts as a branch

Example (if statement):


if (!rstn)
q <= 1b0;
else
q <= d;

Report style based on number of branches

Enabled Coverage

Active

Hits

Misses % Covered

----------------

------

----

------ ---------

47

45

Branches

2
2014 Mentor Graphics Corp.

25

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

95.7
Company Confidential

Code Coverage: Branch (b)

Counts the execution of each conditional if/then/else


and case statement
All true and false branches are considered
Each (if/else if/else | case) element counts as a branch

Example (if statement):


if (!rstn)
q <= 1b0;
else
q <= d;

Count total coming


into if statement,
count times each
branch taken

Report style based on number of branches

Enabled Coverage

Active

Hits

Misses % Covered

----------------

------

----

------ ---------

47

45

Branches

2
2014 Mentor Graphics Corp.

25

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

95.7
Company Confidential

Code Coverage: Condition (c)

Analyzes decisions made in if and ternary statements


Considered an extension of branch coverage

Example:
if (ce && we)
1
0/1

Report style based on Focused Expression Coverage

Enabled Coverage

Active

Hits

Misses

% Covered

----------------

------

----

------

---------

16

13

81.2

FEC Condition Terms

2014 Mentor Graphics Corp.

26

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Code Coverage: Condition (c)

Analyzes decisions made in if and ternary statements


Considered an extension of branch coverage

Example:

All FEC conditions


must be hit:

if (ce && we)


1
0/1

ce = 0,1; we = 0,1

ce is uncovered:
Never hit 0

Report style based on Focused Expression Coverage

Enabled Coverage

Active

Hits

Misses

% Covered

----------------

------

----

------

---------

16

13

81.2

FEC Condition Terms

2014 Mentor Graphics Corp.

26

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Code Coverage: Expression (e)


Analyzes expressions on the right hand side of an
assignment
Example:

wire C = A && B
1
0/1

Report style based on Focused Expression Coverage

Enabled Coverage

Active

Hits

Misses

% Covered

----------------

------

----

------

---------

25

14

11

56.0

FEC Condition Terms

2014 Mentor Graphics Corp.

27

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Code Coverage: Expression (e)


Analyzes expressions on the right hand side of an
assignment
All FEC conditions
Example:

must be hit:

wire C = A && B
1
0/1

A = 0,1; B = 0,1

A is uncovered:
Never hit 0

Report style based on Focused Expression Coverage

Enabled Coverage

Active

Hits

Misses

% Covered

----------------

------

----

------

---------

25

14

11

56.0

FEC Condition Terms

2014 Mentor Graphics Corp.

27

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Code Coverage: Toggle (t)


Counts each time a logic node transitions from one state
to another
Example:

reg FF_A;
always @(posedge clk)
FF_A <= din;

Report style based on Toggle Bins

Enabled Coverage

Active

Hits

Misses

% Covered

----------------

------

----

------

---------

356

351

98.5

Toggle Bins

2014 Mentor Graphics Corp.

28

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Code Coverage: Toggle (t)


Counts each time a logic node transitions from one state
to another
To be covered,
Example:
FF_A must toggle:

0 to 1 and 1 to 0
bin
bin

reg FF_A;
always @(posedge clk)
FF_A <= din;

Report style based on Toggle Bins

Enabled Coverage

Active

Hits

Misses

% Covered

----------------

------

----

------

---------

356

351

98.5

Toggle Bins

2014 Mentor Graphics Corp.

28

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Code Coverage: FSM (f)


Counts the states and transitions of each FSM
Example:

FSM States: S1; S2; S3


FSM Transitions: S1 S1; S1 S2;
S2 S3; S2 S1; S3 S1

29

Report style based on FSM States and Transitions


Enabled Coverage

Active

Hits

Misses

% Covered

----------------

------

----

------

---------

States

100.0

Transitions

80.0

2014 Mentor Graphics Corp.

Company Confidential

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Code Coverage: FSM (f)


Counts the states and transitions of each FSM
Example:

All states and


transitions must be hit

FSM States: S1; S2; S3


FSM Transitions: S1 S1; S1 S2;
S2 S3; S2 S1; S3 S1
This transition not
exercised (uncovered)

29

Report style based on FSM States and Transitions


Enabled Coverage

Active

Hits

Misses

% Covered

----------------

------

----

------

---------

States

100.0

Transitions

80.0

2014 Mentor Graphics Corp.

Company Confidential

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Typical Coverage Closure Methods

Fix design issues that prevent coverage from being


achieved

Run more vectors to hit missing coverage

Directed tests
Constrained-random tests
Intelligent testbench generation (e.g., Questa inFact)
Spend a lot of time analyzing and applying new vectors

Add exclusions by hand

Sometimes the simulator can add automated exclusions

Use an automated flow to generate exclusions for


coverage elements that are impossible to hit

2014 Mentor Graphics Corp.

30

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Checks for Coverage Exclusions

Coverage Model

2014 Mentor Graphics Corp.

31

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Checks for Coverage Exclusions

Branch

Unreachable if/else and case branches

Coverage Model

2014 Mentor Graphics Corp.

31

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Checks for Coverage Exclusions

Branch

Unreachable if/else and case branches

Condition/Expression

Unreachable FEC conditions

Coverage Model

2014 Mentor Graphics Corp.

31

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Checks for Coverage Exclusions

Branch

Unreachable if/else and case branches

Condition/Expression

Unreachable FEC conditions

Statement

Unreachable lines of code

Coverage Model

2014 Mentor Graphics Corp.

31

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Checks for Coverage Exclusions

Branch

Unreachable if/else and case branches

Condition/Expression

Unreachable FEC conditions

Statement

Unreachable lines of code

Toggle

Unreachable register transitions

Coverage Model

2014 Mentor Graphics Corp.

31

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Checks for Coverage Exclusions

Branch

Unreachable if/else and case branches

Condition/Expression

Unreachable FEC conditions

Statement

Unreachable lines of code

Toggle

Unreachable register transitions

Coverage Model

FSM

Unreachable FSM states and transitions

2014 Mentor Graphics Corp.

31

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Checks for Coverage Exclusions

Branch

Unreachable if/else and case branches

Condition/Expression

Unreachable FEC conditions

Statement

Unreachable lines of code

Toggle

Unreachable register transitions

Coverage Model

FSM

Unreachable FSM states and transitions

Covergroups (new in 10.3)

Unreachable covergroup bins

2014 Mentor Graphics Corp.

31

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Checks for Coverage Exclusions

Branch

Unreachable if/else and case branches

Condition/Expression

Unreachable FEC conditions

Statement

Unreachable lines of code

Toggle

Unreachable register transitions

Coverage Model

FSM

Unreachable FSM states and transitions

Covergroups (new in 10.3)

Unreachable covergroup bins

Unreachable items are automatically excluded


from your coverage model
2014 Mentor Graphics Corp.

31

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

CoverCheck Example Statement Coverage

Dead code easily slips into the design


Especially after changes are made

Dead code often identifies incorrect assumptions

Can lead to critical bugs due to differing interpretation of design


requirements

May synthesize into logic that is not needed

2014 Mentor Graphics Corp.

32

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

CoverCheck Example Statement Coverage

Dead code easily slips into the design


Especially after changes are made

Dead code often identifies incorrect assumptions

Can lead to critical bugs due to differing interpretation of design


requirements

May synthesize into logic that is not needed


reg [1:0] R;
always @* begin
if (a)
R = 2'b00;
else if (b) R = 2'b01;
else
R = 2'b11;
end

R can never be 2b10

2014 Mentor Graphics Corp.

32

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

CoverCheck Example Statement Coverage

Dead code easily slips into the design


Especially after changes are made

Dead code often identifies incorrect assumptions

Can lead to critical bugs due to differing interpretation of design


requirements

May synthesize into logic that is not needed


reg [1:0] R;
always @* begin
if (a)
R = 2'b00;
else if (b) R = 2'b01;
else
R = 2'b11;
end

R can never be 2b10

Hence, this statement


can never be reached

reg T;
always @* begin
T = 1'bX;
case (R)
2'b00:
T
2'b01:
T
2'b10:
T
2'b11:
T
endcase
end

2014 Mentor Graphics Corp.

32

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

=
=
=
=

1'b0;
1'b1;
1'b1;
1'b0;

Company Confidential

Questa CoverCheck: Before Simulation

Use formal analysis as a stand-alone tool to target coverage


RTL

CoverCheck

2014 Mentor Graphics Corp.

33

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa CoverCheck: Before Simulation

Use formal analysis as a stand-alone tool to target coverage


RTL

CoverCheck

Coverage Exclusions

TB
Coverage
Results

Simulation

2014 Mentor Graphics Corp.

33

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa CoverCheck: Before Simulation

Use formal analysis as a stand-alone tool to target coverage


RTL

CoverCheck

Coverage Exclusions

TB
Coverage
Results

Simulation

2014 Mentor Graphics Corp.

33

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa CoverCheck: Before Simulation

Use formal analysis as a stand-alone tool to target coverage


RTL

CoverCheck

Coverage Exclusions

TB
Coverage
Results

Simulation

This flow can be inefficient


because all coverage items
in the RTL code are targeted
by CoverCheck, which is
computationally expensive
2014 Mentor Graphics Corp.

33

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa CoverCheck: After Simulation


Use formal analysis to improve simulation results
RTL

Simulation

TB

2014 Mentor Graphics Corp.

34

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa CoverCheck: After Simulation


Use formal analysis to improve simulation results
RTL

Simulation

TB
Coverage
Results

2014 Mentor Graphics Corp.

34

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa CoverCheck: After Simulation


Use formal analysis to improve simulation results
RTL

Simulation

TB
Coverage
Results

CoverCheck

2014 Mentor Graphics Corp.

34

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa CoverCheck: After Simulation


Use formal analysis to improve simulation results
RTL

Simulation

TB
Coverage
Results

Coverage Exclusions

CoverCheck

2014 Mentor Graphics Corp.

34

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa CoverCheck: After Simulation


Use formal analysis to improve simulation results
RTL

Simulation

TB

This flow is optimal because


only the coverage items that
were not hit in simulation
are targeted by CoverCheck

Coverage
Results

Coverage Exclusions

CoverCheck

2014 Mentor Graphics Corp.

34

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

CoverCheck Results in qverify GUI

2014 Mentor Graphics Corp.

35

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

CoverCheck Results in qverify GUI

Unreachable FSM state


Double-click or RMB, Show FSM to
visualize

2014 Mentor Graphics Corp.

35

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

CoverCheck Results: Covergroups

2014 Mentor Graphics Corp.

36

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

CoverCheck Results: Covergroups

Covergroup results in separate tab


2014 Mentor Graphics Corp.

36

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: Generated Exclusion File


ex.do

#
#

Generated Exclusion File

#
coverage exclude -du work.pci_wb_slave -srcfile /project/design/rtl/vlog/pci_wb_slave.v
-linerange 757 -item s 1 -comment "CoverCheck:Statement"
coverage exclude -du work.pci_wb_slave_unit -srcfile project/design/rtl/vlog/pci_wb_slave_unit.v
-fecexprrow 703 2 -item 1 -comment "CoverCheck:Expression"
coverage exclude -du work.pci_wb_slave -srcfile /project/design/rtl/vlog/pci_wb_slave.v
-feccondrow 886 1 -item 1 -comment "CoverCheck:Condition"
coverage exclude -du work.pci_conf_space -togglenode pci_ba0_bit31_12\[12\] -trans 10
-comment "CoverCheck:Toggle"
coverage exclude -du work.pci_wb_slave -fstate c_state S_CONF_READ
-comment "CoverCheck:FSM"
coverage exclude -cvgpath {/SYSTEM/bridge32_top/bridge/i_pci_target_unit/.../cp/auto[0]}
-comment "CoverCheck:Coverbin"
...
2014 Mentor Graphics Corp.

37

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Example: Generated Exclusion File


ex.do

#
#

Generated Exclusion File

#
coverage exclude -du work.pci_wb_slave -srcfile /project/design/rtl/vlog/pci_wb_slave.v
-linerange 757 -item s 1 -comment "CoverCheck:Statement"
coverage exclude -du work.pci_wb_slave_unit -srcfile project/design/rtl/vlog/pci_wb_slave_unit.v
-fecexprrow 703 2 -item 1 -comment "CoverCheck:Expression"
coverage exclude -du work.pci_wb_slave -srcfile /project/design/rtl/vlog/pci_wb_slave.v
-feccondrow 886 1 -item 1 -comment "CoverCheck:Condition"
coverage exclude -du work.pci_conf_space -togglenode pci_ba0_bit31_12\[12\] -trans 10
-comment "CoverCheck:Toggle"
coverage exclude -du work.pci_wb_slave -fstate c_state S_CONF_READ

New in 10.3

-comment "CoverCheck:FSM"
coverage exclude -cvgpath {/SYSTEM/bridge32_top/bridge/i_pci_target_unit/.../cp/auto[0]}
-comment "CoverCheck:Coverbin"
...
2014 Mentor Graphics Corp.

37

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Exclude Coverage After Simulation


Simulation has been previously run and a sim.ucdb exists
Apply the exclude file to the UCDB with vsim

Read in the old .ucdb, apply the exclusions, write out a new .ucdb

Example:
> vsim -c -viewcov sim.ucdb \
-do do ex.do; \
coverage save sim_w_excludes.ucdb; exit

2014 Mentor Graphics Corp.

38

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Exclude Coverage After Simulation


Simulation has been previously run and a sim.ucdb exists
Apply the exclude file to the UCDB with vsim

Read in the old .ucdb, apply the exclusions, write out a new .ucdb

Example:
> vsim -c -viewcov sim.ucdb \
Apply the exclusions
-do do ex.do; \
coverage save sim_w_excludes.ucdb; exit

2014 Mentor Graphics Corp.

38

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Simulation Coverage Before/After Exclusions


Coverage Report Summary by design unit:
Original Run

Design Unit: work.pci_target32_sm


Enabled Coverage
---------------Stmts
Branches
FEC Condition Terms
FEC Expression Terms
FSMs
States
Transitions
Toggle Bins

Active
-----98
22
0
186

Hits
---93
21
0
57

3
5
106

3
4
76

TOTAL COVERGROUP COVERAGE: 43.7%

Misses % Covered
------ --------5
94.8
1
95.4
0
100.0
129
30.6
90.0
0
100.0
1
80.0
30
71.6

COVERGROUP TYPES: 4

Total Coverage By Design Unit (filtered view): 46.7%

With exclusions

Design Unit: work.pci_target32_sm


Enabled Coverage
---------------Stmts
Branches
FEC Condition Terms
FEC Expression Terms
FSMs
States
Transitions
Toggle Bins

Active
-----93
21
0
186

Hits
---93
21
0
58

3
5
106

3
4
76

TOTAL COVERGROUP COVERAGE: 59.8%

Misses % Covered
------ --------0
100.0
0
100.0
0
100.0
128
31.1
90.0
0
100.0
1
80.0
30
71.6

COVERGROUP TYPES: 4

Total Coverage By Design Unit (filtered view): 51.3%


2014 Mentor Graphics Corp.

39

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

CoverCheck Success at Rockwell Collins

CoverCheck was evaluated and purchased last year

This purchase was outside the normal contract renewal cycle


CoverCheck was new in 2013, not part of the old Questa Formal

First design used for evaluation was not an ideal application


In-house design; had gone through requirements-based
verification, so code coverage misses were very small
Only 3 unreachable coverage items were found

Evaluation on third-party IP was dramatically more successful


Not all functions of DDR3 and PCIe IP blocks are used

Some inputs tied to 0/1; some registers set to fixed values

Code coverage was only 55% when CoverCheck was first used

6% improvement within hours (vs. 2 weeks using manual exclusions)


Thousands of exclusions generated within days (vs. months)

CoverCheck is ideally suited for some designs


Is your design one of them?

2014 Mentor Graphics Corp.

40

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa CoverCheck Benefits

Schedule
predictability

Save project time that would have been spent manually


reviewing the coverage holes

Improved
metrics

Automatically eliminate code that was never meant to be


exercised
Tune measurement to the relevant modes of operation

Improved
design quality

Witness waveforms eliminate danger of ignoring


coverage holes that are reachable
Complexity measurement guides design for verification

Elimination of
waiver rot

Manually generated waivers have to be maintained as


the code changes

2014 Mentor Graphics Corp.

41

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Agenda

Questa AutoCheck

Automatic formal checks for common design issues

Questa CoverCheck

Formal analysis to improve code coverage


Also targets SVA covergroups (new in 10.3 release)

Connectivity Checking with Questa Formal


Exhaustive validation of SoC connectivity

2014 Mentor Graphics Corp.

42

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa Formal-based Technologies


A full range of formal solutions
Higher
Effort

Property
Checking

Automated
Applications

Fully
Automatic

Low
Effort

I/F Protocols
Control Logic
Data Integrity
Post-Silicon Debug
Connectivity
Register Map Checks
Design Constraints
Assertion Generation
Reset and X-States
Improve Coverage
Automatic Checks
CDC Verification
2014 Mentor Graphics Corp.

43

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

SoC Connectivity Validation


PHY

PHY

PHY

PHY

CPU

USB

Ethernet

Protocol

Custom
Core

MasterIF

SlaveIF

MasterIF

MasterIF

SlaveIF

Arbiter

AMBAAHB/AXI
MasterIF

MasterIF

CPU

Memory
DMA

Main Clock Domain

Bridge

Sub
Clock
Domain

AMBAAPB
SlaveIF

SlaveIF

UART

GPIO

Bridge

PCI
Express
PHY

2014 Mentor Graphics Corp.

44

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

SoC Connectivity Validation


Pin-constrained I/O pad muxing
Application
On-chip bus connectivity

PHY

PHY

PHY

PHY

CPU

USB

Ethernet

Protocol

Custom
Core

MasterIF

SlaveIF

MasterIF

MasterIF

SlaveIF

Arbiter

Objective

Check bus and I/O pad connections


Check all modes of operation

AMBAAHB/AXI
MasterIF

MasterIF

CPU

Memory
DMA

Main Clock Domain

Bridge

Sub
Clock
Domain

AMBAAPB
SlaveIF

SlaveIF

UART

GPIO

Bridge

PCI
Express
PHY

Challenge

100s to 1000s of connections


Tedious to check in simulation

Benefit of
Formal
Approach

Considers all modes of operation


Able to catch corner-case scenarios

2014 Mentor Graphics Corp.

44

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

SoC Connectivity Validation


Pin-constrained I/O pad muxing
Application
On-chip bus connectivity

PHY

PHY

PHY

PHY

CPU

USB

Ethernet

Protocol

Custom
Core

MasterIF

SlaveIF

MasterIF

MasterIF

SlaveIF

Arbiter

Objective

Check bus and I/O pad connections


Check all modes of operation

AMBAAHB/AXI
MasterIF

MasterIF

CPU

Memory
DMA

Main Clock Domain

Bridge

Sub
Clock
Domain

AMBAAPB
SlaveIF

SlaveIF

UART

GPIO

Bridge

PCI
Express
PHY

Challenge

100s to 1000s of connections


Tedious to check in simulation

Benefit of
Formal
Approach

Considers all modes of operation


Able to catch corner-case scenarios

2014 Mentor Graphics Corp.

44

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

SoC Connectivity Validation


Pin-constrained I/O pad muxing
Application
On-chip bus connectivity

PHY

PHY

PHY

PHY

CPU

USB

Ethernet

Protocol

Custom
Core

MasterIF

SlaveIF

MasterIF

MasterIF

SlaveIF

Arbiter

Objective

Check bus and I/O pad connections


Check all modes of operation

AMBAAHB/AXI
MasterIF

MasterIF

CPU

Memory
DMA

Main Clock Domain

Bridge

Sub
Clock
Domain

AMBAAPB
SlaveIF

SlaveIF

UART

GPIO

Bridge

PCI
Express
PHY

Challenge

100s to 1000s of connections


Tedious to check in simulation

Benefit of
Formal
Approach

Considers all modes of operation


Able to catch corner-case scenarios

2014 Mentor Graphics Corp.

44

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

SoC Connectivity Validation


Pin-constrained I/O pad muxing
Application
On-chip bus connectivity

PHY

PHY

PHY

PHY

CPU

USB

Ethernet

Protocol

Custom
Core

MasterIF

SlaveIF

MasterIF

MasterIF

SlaveIF

Arbiter

Objective

Check bus and I/O pad connections


Check all modes of operation

AMBAAHB/AXI
MasterIF

MasterIF

CPU

Memory
DMA

Main Clock Domain

Bridge

Sub
Clock
Domain

AMBAAPB
SlaveIF

SlaveIF

UART

GPIO

Bridge

PCI
Express
PHY

Challenge

100s to 1000s of connections


Tedious to check in simulation

Benefit of
Formal
Approach

Considers all modes of operation


Able to catch corner-case scenarios

2014 Mentor Graphics Corp.

44

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Connectivity Applications

Pin-constrained I/O pads (pin multiplexing)

On-chip bus connectivity in SoC designs

Power rails

DFT and related test logic

Memory-related signals

Pure combinational logic functions

SoC/ASIC/FPGA designs all have applications

Other

2014 Mentor Graphics Corp.

45

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

ConnectivityCheck in Questa Formal

Easily, quickly and thoroughly verify connectivity

Courtesy of Mark Handover


2014 Mentor Graphics Corp.

46

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

ConnectivityCheck in Questa Formal

Easily, quickly and thoroughly verify connectivity

Checker
Keyword

Source

Destination

connect

Signal 1

Signal 2

connect_dly

Signal 1

Signal 2

cond

Signal 1

Signal 2

cond_dly

Signal 1

Signal 2

Mutex

Signal 1

tied_high

Signal 1

tied_low

Signal 1

Condition

Delay

Delay Value
Condition
Signal
Condition
Signal

Delay Value

Create Connectivity spec (.csv, .tsv)

Courtesy of Mark Handover


2014 Mentor Graphics Corp.

46

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

ConnectivityCheck in Questa Formal

Easily, quickly and thoroughly verify connectivity

Checker
Keyword

Source

Destination

connect

Signal 1

Signal 2

connect_dly

Signal 1

Signal 2

cond

Signal 1

Signal 2

cond_dly

Signal 1

Signal 2

Mutex

Signal 1

tied_high

Signal 1

tied_low

Signal 1

Condition

Delay

Delay Value
Condition
Signal
Condition
Signal

Delay Value

Auto-generate
assertions and
testplan

Create Connectivity spec (.csv, .tsv)

Courtesy of Mark Handover


2014 Mentor Graphics Corp.

46

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

ConnectivityCheck in Questa Formal

Easily, quickly and thoroughly verify connectivity

Checker
Keyword

Source

Destination

connect

Signal 1

Signal 2

connect_dly

Signal 1

Signal 2

cond

Signal 1

Signal 2

cond_dly

Signal 1

Signal 2

Mutex

Signal 1

tied_high

Signal 1

tied_low

Signal 1

Condition

Delay

RTL
Delay Value
Condition
Signal
Condition
Signal

Delay Value

Create Connectivity spec (.csv, .tsv)

Exhaustively Check Connectivity

Auto-generate
assertions and
testplan

Questa
Formal

No testbench needed
14 automatically generated check types
+ coverage + testplan

Courtesy of Mark Handover


2014 Mentor Graphics Corp.

46

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

ConnectivityCheck in Questa Formal

Easily, quickly and thoroughly verify connectivity

Checker
Keyword

Source

Destination

connect

Signal 1

Signal 2

connect_dly

Signal 1

Signal 2

cond

Signal 1

Signal 2

cond_dly

Signal 1

Signal 2

Mutex

Signal 1

tied_high

Signal 1

tied_low

Signal 1

Condition

Delay

RTL
Delay Value
Condition
Signal
Condition
Signal

Delay Value

Create Connectivity spec (.csv, .tsv)

Exhaustively Check Connectivity

Auto-generate
assertions and
testplan

Questa
Formal

No testbench needed
14 automatically generated check types
+ coverage + testplan

Questa VM

Faster than using simulation cycles

Courtesy of Mark Handover


2014 Mentor Graphics Corp.

46

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Types of Connectivity Bugs

Source connected to the wrong destination


Directly or conditionally

Source connected to destination with scrambled bits


Directly or conditionally

Breaks in connectivity due to design function


Directly or conditionally

Connections to incorrect logic levels

Coverage to check whether bits of a connection are stuck

2014 Mentor Graphics Corp.

47

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Connectivity Validation: Problem/Solution

Problem: Old methods are no longer adequate


Manual checking

Not feasible any more; designs are too large and complex

Simulation

Takes time to set up a test suite


Connectivity is usually tested indirectly, not directly
Not exhaustive

Solution: A semi-automated formal verification flow

2014 Mentor Graphics Corp.

48

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Connectivity Validation: Problem/Solution

Problem: Old methods are no longer adequate


Manual checking

Not feasible any more; designs are too large and complex

Simulation

Takes time to set up a test suite


Connectivity is usually tested indirectly, not directly
Not exhaustive

Solution: A semi-automated formal verification flow

Define connectivity in a common format (usually a spreadsheet)

2014 Mentor Graphics Corp.

48

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Connectivity Validation: Problem/Solution

Problem: Old methods are no longer adequate


Manual checking

Not feasible any more; designs are too large and complex

Simulation

Takes time to set up a test suite


Connectivity is usually tested indirectly, not directly
Not exhaustive

Solution: A semi-automated formal verification flow

Define connectivity in a common format (usually a spreadsheet)


Automatically translate specified connections into properties

2014 Mentor Graphics Corp.

48

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Connectivity Validation: Problem/Solution

Problem: Old methods are no longer adequate


Manual checking

Not feasible any more; designs are too large and complex

Simulation

Takes time to set up a test suite


Connectivity is usually tested indirectly, not directly
Not exhaustive

Solution: A semi-automated formal verification flow

Define connectivity in a common format (usually a spreadsheet)


Automatically translate specified connections into properties
Connect properties to design with minimal effort by the user

2014 Mentor Graphics Corp.

48

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Connectivity Validation: Problem/Solution

Problem: Old methods are no longer adequate


Manual checking

Not feasible any more; designs are too large and complex

Simulation

Takes time to set up a test suite


Connectivity is usually tested indirectly, not directly
Not exhaustive

Solution: A semi-automated formal verification flow

Define connectivity in a common format (usually a spreadsheet)


Automatically translate specified connections into properties
Connect properties to design with minimal effort by the user
Run formal analysis

2014 Mentor Graphics Corp.

48

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Connectivity Validation: Problem/Solution

Problem: Old methods are no longer adequate


Manual checking

Not feasible any more; designs are too large and complex

Simulation

Takes time to set up a test suite


Connectivity is usually tested indirectly, not directly
Not exhaustive

Solution: A semi-automated formal verification flow

Define connectivity in a common format (usually a spreadsheet)


Automatically translate specified connections into properties
Connect properties to design with minimal effort by the user
Run formal analysis
View and debug results

2014 Mentor Graphics Corp.

48

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Connectivity Check Types


Point to Point Connectivity

connect

Direct connect

connect_dly

Connect with delay

connect_inv

All signals inverted

connect_allsame

src[N:0]

dest[N:0]

src[N:0]

dest[N:0]

src[N:0]

dest[N:0]

src[N:0]

dest[M:0]

All 0s or all 1s

2014 Mentor Graphics Corp.

49

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Connectivity Check Types

Conditional Point to Point Connectivity

Direct connect

src[N:0]

cond

dest[N:0]

conditionally

cond_dly

src[N:0]

dest[N:0]

Connect with delay

conditionally

cond_inv

src[N:0]

All signals inverted

dest[N:0]

conditionally

cond_allsame

All 0s or all 1s

src[N:0]

dest[M:0]

conditionally
2014 Mentor Graphics Corp.

50

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Connectivity Check Types


Specific Connectivity

mutex

cond_mutex

tied_high

cond_tied_high

tied_low

cond_tied_low

00010

src[N:0]

00010

cond
src[N:0]

src[N:0]

cond
src[N:0]

src[N:0]

cond

2014 Mentor Graphics Corp.

51

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

src[N:0]

www.mentor.com

Company Confidential

Connectivity Check Types


Coverage

Coverage

Important to ensure absence of stuck bits on connections

Example

Consider the check:


if cond is true, then src is connected to dest
cond |-> src == dest
This checks the conditional connection between src and dest
But will be proven even if cond is stuck high

Cover properties are used to ensure all bits can toggle


cover property ( @($global_clock)
cover property ( @($global_clock)

$rose(cond[i]) );
$fell(cond[i]) );

2014 Mentor Graphics Corp.

52

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa Formal Connectivity Flow


Connectivity Table
(.tsv/.csv)

qconnect_check

work

qconnect_checkers.sv
qconnect_bind.sv

vlog/vcom

RTL

formal
compile

formal
verify

2014 Mentor Graphics Corp.

53

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa Formal Connectivity Flow


Connectivity Table
(.tsv/.csv)

qconnect_check

work

qconnect_checkers.sv
qconnect_bind.sv

vlog/vcom

RTL

formal
compile

formal
verify

2014 Mentor Graphics Corp.

53

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Connectivity Specification Format

Table header names and type names guide the script

Signal names for src/dest/cond must use SV top-down hierarchical references, can be constant Verilog values
Condition can be a signal or expression, delay is number of clock cycles
Comment with # and white spaces are permitted

type

src

dest

cond

delay

connect

signal

signal

connect_dly

signal

signal

connect_inv

signal

signal

connect_allsame

signal

signal

cond

signal

signal

signal/expression

cond_dly

signal

signal

signal/expression

cond_inv

signal

signal

signal/expression

cond_allsame

signal

signal

signal/expression

mutex

signal

cond_mutex

signal

tied_high

signal

cond_tied_high

signal

tied_low

signal

cond_tied_low

signal

signal/expression

signal/expression

signal/expression
2014 Mentor Graphics Corp.

54

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa Formal Connectivity Flow


Connectivity Table
(.tsv/.csv)

qconnect_check

work

qconnect_checkers.sv
qconnect_bind.sv

vlog/vcom

RTL

formal
compile

formal
verify

2014 Mentor Graphics Corp.

55

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa Formal Connectivity Flow


Connectivity Table
(.tsv/.csv)

qconnect_check

work

qconnect_checkers.sv
qconnect_bind.sv

vlog/vcom

RTL

formal
compile

formal
verify

2014 Mentor Graphics Corp.

55

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Debug Connectivity Results in Questa Formal

qverify log_conn/formal_verify.db

2014 Mentor Graphics Corp.

56

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Debug Connectivity Results in Questa Formal

qverify log_conn/formal_verify.db

View Source
(with annotation)

2014 Mentor Graphics Corp.

56

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Debug Connectivity Results in Questa Formal

qverify log_conn/formal_verify.db

View Source
(with annotation)

View Waveforms

2014 Mentor Graphics Corp.

56

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Debug Connectivity Results in Questa Formal

qverify log_conn/formal_verify.db

View Source
(with annotation)

View Waveforms

View Schematics

2014 Mentor Graphics Corp.

56

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

Questa Formal-based Technologies


A full range of formal solutions
Higher
Effort

Property
Checking

Automated
Applications

Fully
Automatic

Low
Effort

I/F Protocols
Control Logic
Data Integrity
Post-Silicon Debug
Connectivity
Register Map Checks
Design Constraints
Assertion Generation
Reset and X-States
Improve Coverage
Automatic Checks
CDC Verification
2014 Mentor Graphics Corp.

57

Rockwell Collins Technology Day 2014 | Questa Formal-based Technologies

www.mentor.com

Company Confidential

2014 Mentor Graphics Corp.

www.mentor.com

Company Confidential

Das könnte Ihnen auch gefallen