0% found this document useful (0 votes)
754 views5 pages

Interviews Question On Coverage in System Verilog - Hardware Design and Verification

This document discusses coverage in SystemVerilog and answers common interview questions about the topic. It defines coverage as a metric used to measure the completeness of verification. There are two main types of coverage: code coverage, which is automatically generated, and functional coverage, which is user-defined based on the design specification. The document then provides details on different types of code coverage and explains functional coverage in SystemVerilog.

Uploaded by

subhash
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
754 views5 pages

Interviews Question On Coverage in System Verilog - Hardware Design and Verification

This document discusses coverage in SystemVerilog and answers common interview questions about the topic. It defines coverage as a metric used to measure the completeness of verification. There are two main types of coverage: code coverage, which is automatically generated, and functional coverage, which is user-defined based on the design specification. The document then provides details on different types of code coverage and explains functional coverage in SystemVerilog.

Uploaded by

subhash
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 5

1/25/2020 Interviews question on coverage in system verilog ??

- Hardware Design and Verification

Hardware Design and Verification


(http://www.testbench4u.com/)
Hardware Design and Verification, HW Interview Questions, UVM testbench

Home (http://www.testbench4u.com) » Companies Related Questions (http://www.testbench4u.com/category/companies-related-questions/) » Interviews question on coverage in system verilog ??

Download PDF
Printable PDF (Free)

To View PDF
mypdf.online

OPEN

Interviews Question On Coverage In System Verilog ??


 Companies Related Questions (http://www.testbench4u.com/category/companies-related-questions/), System Verilog
(http://www.testbench4u.com/category/system-verilog/)   September 8, 2018
(http://www.testbench4u.com/2018/09/08/interviews-question-coverage-system-verilog/)  DV admin
(http://www.testbench4u.com/author/user/)  0 Comments (http://www.testbench4u.com/2018/09/08/interviews-question-
coverage-system-verilog/#respond)

What is coverage ?

Coverage is defined as the percentage of verification objectives that have been met. It is used as a metric for evaluating the progress
of a verification project. Coverage metric forms an important part of measuring progress in constrained random testbenches and also
provides good feedback to the quality and e ectiveness of constrained random testbenches. Broadly there are two types of coverage
metrics – Code Coverage and Functional Coverage. While code coverage is generated automatically by simulators, Functional
coverage is user defined and normally implemented using constructs supported by SystemVerilog language. This section has
questions related to the coverage concepts as well as the SystemVerilog language constructs used for implementing functional
coverage model.

1. What is the di erence between code coverage and functional coverage?

There are two types of coverage metrics commonly used in Functional Verification to measure the completeness and e iciency of
verification process.
1) Code Coverage: Code coverage is a metric used to measure the degree to which the design code (HDL model) is tested by a given
test suite. Code coverage is automatically extracted by the simulator when enabled.
2) Functional Coverage: Functional coverage is a user-defined metric that
measures how much of the design specification, as enumerated by features in the test plan, has been exercised. It can be used to
measure whether interesting scenarios, corner cases, specification invariants, or other applicable design conditions — captured as
features of the test plan — have been observed, validated, and tested. It is user-defined and not automatically inferred. It is also not
dependent on the design code as it is implemented based on design specification.

2. What are the di erent types of code coverage?

www.testbench4u.com/2018/09/08/interviews-question-coverage-system-verilog/ 1/5
1/25/2020 Interviews question on coverage in system verilog ?? - Hardware Design and Verification

Code coverage is a metric that measures how well the HDL code has been exercised by the test suite. Based on the di erent program
constructs, code coverage are of following types:

1) Statement/Line coverage: This measures how many statements (lines) are covered during simulation of tests. This is generally
considered important and is targeted to be 100% covered for verification closure. In the following example code, you can see there are
4 lines or statements which will be measure in statement/line coverage.

always @ (posedge clk) begin if( A > B) begin

//Line 1 Result = A – B;

//Line 2 end else begin

//Line 3 Result = A + B;

//Line 4 end end


2) Block coverage: A group of statements between a begin-end or if-else or case statement or while loop or for loop is called a block.
Block coverage measures whether these types of block codes are covered during simulation.

end
3) Branch/Decision coverage: Branch/Decision coverage evaluates conditions like if-else, case statements and the ternary operator (?:
) statements in the HDL code and measures if both true and false cases are covered.
4) Conditional Coverage and Expression coverage: Conditional coverage looks at all Boolean expressions in the HDL and counts the
number of times the expression was true or false. Expression coverage looks at the right-hand side of an assignment, evaluates all the
possible cases as a truth table and measures how well those cases are covered. Following is an expression of 3 boolean variables that
can cause the Result variable to be true of false Result = (A && B) || (C) You can create a truth table as follows for all possible cases of A,
B and C that can cause result to be true or false. The expression coverage gives a measure of if all the rows of this truth table are
covered.
5) Toggle coverage: Toggle coverage measures how well the signals and ports in the design are toggled during the simulation run. It
will also help in identifying any unused signals that does not change value.
6) FSM coverage: FSM coverage measures whether all of the states and all possible transitions or arcs in a given state machine are
covered during a simulation

Interview Question on AXI(Amba) protocol? (http://www.testbench4u.com/2018/09/08/interview-


question-axiamba-protocol/)
Formal Verification Interview questions and answers ? (http://www.testbench4u.com/2018/09/08/formal-
verification-interview-questions-answers/) 
LEAVE A REPLY
You must be logged in (http://www.testbench4u.com/wp-login.php?
redirect_to=https%3A%2F%2Fsummer-heart-0930.chufeiyun1688.workers.dev%3A443%2Fhttp%2Fwww.testbench4u.com%2F2018%2F09%2F08%2Finterviews-question-coverage-system-verilog%2F) to post a
comment.

Search for:

Search …

SEARCH

www.testbench4u.com/2018/09/08/interviews-question-coverage-system-verilog/ 2/5
1/25/2020 Interviews question on coverage in system verilog ?? - Hardware Design and Verification

Recent Posts
Important UVM questions for Hardware companies (http://www.testbench4u.com/2018/10/11/important-uvm-questions-for-hardware-companies/)

Tough system verilog questions (http://www.testbench4u.com/2018/10/10/tough-system-verilog-questions/)

Implement randc function using rand in system verilog ? (http://www.testbench4u.com/2018/10/10/implement-randc-function-using-rand-in-system-verilog/)

MESI protocol practical Example (http://www.testbench4u.com/2018/10/07/mesi-protocol-practical-example/)

Why gate simulation is needed even though STA (static time analysis ) is done? (http://www.testbench4u.com/2018/10/05/why-there-is-gate-simulation-needed-
even-though-sta-static-time-analysis-is-done/)

Please follow & like us :)

(http://15.206.170.85/feed/)
(http://www.specificfeeds.com/widgets/emailSubscribeEncFeed/d1FiL1gvb2doSHNORlZTMDZoTmdtSUc0U3k2MzNDT2ExMVV4ZFhIT3RyTE45OEFsSG9sM0t2SGZyVG

Categories
www.testbench4u.com/2018/09/08/interviews-question-coverage-system-verilog/ 3/5
1/25/2020 Interviews question on coverage in system verilog ?? - Hardware Design and Verification

AMBA (http://www.testbench4u.com/category/amba/)

Career Oppurtunity (http://www.testbench4u.com/category/career-oppurtunity/)

Companies Related Questions (http://www.testbench4u.com/category/companies-related-questions/)

Computer Archtecture (http://www.testbench4u.com/category/computer-archtecture/)

Formal Verification (http://www.testbench4u.com/category/formal-verification/)

Functional Verification (http://www.testbench4u.com/category/functional-verification/)

Programming Questions (http://www.testbench4u.com/category/programming-questions/)

Soc(System on Chip) (http://www.testbench4u.com/category/socsystem-on-chip/)

System Verilog (http://www.testbench4u.com/category/system-verilog/)

Uncategorized (http://www.testbench4u.com/category/uncategorized/)

UVM (http://www.testbench4u.com/category/uvm/)

Verilog (http://www.testbench4u.com/category/verilog/)

Email *

Subscribe

www.testbench4u.com/2018/09/08/interviews-question-coverage-system-verilog/ 4/5
1/25/2020 Interviews question on coverage in system verilog ?? - Hardware Design and Verification

Email *

Subscribe

Download PDF
To View PDF

mypdf.online OPEN

www.testbench4u.com/2018/09/08/interviews-question-coverage-system-verilog/ 5/5

You might also like