Compiler Optimization for Unreachable Code Targets in HDL

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In electronic design automation, achieving high code coverage for hardware description languages (HDL) is hindered by unreachable code targets that require manual identification and removal, which is time-consuming and error-prone, and traditional constant propagation techniques are limited in discovering unreachable code.

Innovation Solution

A method that identifies and propagates impossible values through a program to determine unreachable targets, allowing for their removal from the synthesis and testing processes, thereby enhancing code coverage by focusing on reachable targets.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If manual identification and removal of unreachable coverage targets is performed, then code coverage accuracy is improved, but time consumption and error rate increase

Engineering Contradiction:
Improvecode coverage accuracyVSAvoidtime consumption
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs automatic analysis to identify unreachable coverage targets without requiring manual intervention. The compiler autonomously analyzes the HDL code, determines unreachable targets, and removes them from the coverage measurement, eliminating the need for manual identification while maintaining accuracy.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The invention changes the approach from manual analysis to automated compiler-based analysis. By using compiler optimizations and data flow analysis, the system automatically determines unreachable targets based on program semantics and execution paths, transforming a manual process into an automated one.

Inventive Principle:
Principle #35Parameter changes

2Quantity of substance

If traditional constant propagation techniques are used, then resource usage is controlled, but unreachable code discovery capability is limited

Engineering Contradiction:
Improveunreachable code discovery capabilityVSAvoidCPU time and memory usage
Core Design Contradiction:
Quantity of substanceVSUse of energy by moving object

Solution Approach 1:

The invention extracts and removes only the unreachable coverage targets from the measurement process. By separating reachable and unreachable targets through automated analysis, the system focuses resources on measuring only the relevant code coverage, improving discovery capability while managing computational resources efficiently.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The compiler performs preliminary analysis during the compilation process to identify unreachable targets before actual testing begins. This preliminary determination of unreachable code allows the testing phase to focus only on reachable targets, improving discovery capability without proportionally increasing testing resource consumption.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If unreachable coverage targets are removed, then testing time is reduced, but code coverage completeness may be compromised

Engineering Contradiction:
Improvetesting speedVSAvoidcode coverage completeness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system uses compiler analysis to provide feedback about which coverage targets are unreachable based on program semantics and data flow. This feedback mechanism ensures that only truly unreachable targets are removed, maintaining coverage completeness while enabling faster testing by excluding impossible targets from the measurement process.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS9378000B1Determination of unreachable elements in a design
Publication Date: 2016.06.28 SYNOPSYS INC

AI summary

A method and apparatus for performing compiler optimizations is described. The method determines one or more impossible values for a variable in a program code based on a plurality of values of the variable. The method propagates the one or more impossible values for the variable throughout the program code. The method identifies a set of unreachable targets in the program code based on the propagated impossible values for the variable. The method removes objects associated with the set of unreachable targets.