Trung tâm đào tạo thiết kế vi mạch Semicon


  • ĐĂNG KÝ TÀI KHOẢN ĐỂ TRUY CẬP NHIỀU TÀI LIỆU HƠN!
  • Đăng ký
    *
    *
    *
    *
    *
    Fields marked with an asterisk (*) are required.
semicon_lab.jpg

TYPES OF COVERAGE METRICS

Email In PDF.

Coverage 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 effectiveness of constrained random testbenches. 

Types of coverage metrics – 

  1. Code Coverage
  2. Functional Coverage

Let’s understand the types of coverage more deeply

Code Coverage: It is a metric used to measure how much the RTL code is exercised by a given test suite. Code coverage is automatically extracted by the simulator when enabled.

Types of Code Coverage:  

  • Statement/Line coverage: This measures how many statements (lines) are covered during the 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 measured 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

  • 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. Block coverage looks similar to statement coverage with the difference being that block coverage looks for coverage on a group of statements. 

In the same example code as shown below you can see there are three blocks of code.

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

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 for all possible cases of A, B and C that can cause results to be true or false. The expression coverage gives a measure of if all the rows of this truth table are covered.

  • Toggle coverage: It measures how well the signals and ports in the RTL design are toggled during the simulation run. It will also help in identifying any unused signals that does not change value.
  • FSM coverage: FSM coverage measures whether all of the states and all possible transitions in a given state machine are covered during a simulation.

Functional Coverage: It 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 specifications.

Bạn Có Đam Mê Với Vi Mạch hay Nhúng      -     Bạn Muốn Trau Dồi Thêm Kĩ Năng

Mong Muốn Có Thêm Cơ Hội Trong Công Việc

Và Trở Thành Một Người Có Giá Trị Hơn

Bạn Chưa Biết Phương Thức Nào Nhanh Chóng Để Đạt Được Chúng

Hãy Để Chúng Tôi Hỗ Trợ Cho Bạn. SEMICON  

 

Lần cập nhật cuối ( Thứ ba, 29 Tháng 3 2022 00:57 )  

Related Articles

Chat Zalo