Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What's the use of code coverage?

2025-03-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what is the use of code coverage". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the use of code coverage"?

Code coverage originates from software testing, which can describe the degree of code coverage during testing.

Unlike functional coverage, the analysis and statistics of Code coverage is an automatic process. Therefore, integrating Code coverage into the existing simulation process is very simple and does not require changes to the current design or test platform.

Achieving 100% Code coverage during regression run means that the test platform provides the incentive to activate all the structures in the RTL code, but there may be some unverified features in the design and there is still a functional Bug.

Code coverage metrics can not analyze functional verification, but because of the automation advantages of Code coverage, it is still a very important verification indicator in the verification process.

Code Coverage Typ

Toggle Coverage

Toggle Coverage is used to measure the number of times per bit toggle of register or wire.

Viewing Toggle Coverage analysis reports is laborious and of little value, and is usually used to check the connection between IP. In addition, Toggle Coverage is also useful for control signals such as one-hot selection.

Line Coverage

Line Coverage is used to analyze which lines of RTL code are executed during simulation.

Line Coverage analysis usually finds that some code has never been executed because of the bug or some IP-specific configuration in the code. For invalid code, you can choose to filter it out during Line Coverage statistics and focus only on the relevant code.

Statement Coverage

Statement Coverage is used to analyze which statements in RTL code are executed during simulation. Statement Coverage is more useful than Line Coverage because a statement (Statement) usually spans multiple lines of Line code-or multiple statements can be in one line of code.

Branch Coverage

Branch Coverage (also known as decision coverage) is the coverage of Boolean expressions in analysis control structures, such as if,case,while,repeat,forever,for and loop statements.

Finite-State Machine Coverage

Today's code coverage analysis tools can identify finite state machines in RTL source code. Therefore, the tool can automatically extract FSM code coverage metrics. For example, the number of times you enter each state in the state machine, the number of times you transition from one state (transition) to another

The purpose of collecting and analyzing code coverage metrics is to identify parts of RTL code that are not executed in the current verification environment.

From a project perspective, it's usually best to wait until the RTL implementation is nearing completion before you start collecting and analyzing code coverage, otherwise you may waste a lot of meaningless time because of changes to the RTL code.

Before you start collecting code coverage, run some simulations to solve other problems in the code coverage process.

Thank you for your reading, the above is the content of "what is the use of code coverage". After the study of this article, I believe you have a deeper understanding of what the use of code coverage is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 233

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report