Compiler Optimization for Unreachable Code Targets in HDL
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Quantity of substance
If traditional constant propagation techniques are used, then resource usage is controlled, but unreachable code discovery capability is limited
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.
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.
3Productivity
If unreachable coverage targets are removed, then testing time is reduced, but code coverage completeness may be compromised
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.
Data Source
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.