Block-Level Code Coverage for Conditional Circuit Simulation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current code coverage tools fail to effectively analyze code blocks in integrated circuit designs that are conditionally executed based on configuration parameters, leading to incomplete testing and inefficient simulation processes due to the removal of unused code blocks during optimization.
Innovation Solution
A method and system for simulating circuit designs that identify and evaluate conditional code blocks by generating simulation models with specific configuration parameter values, determining expressions for each block to assess execution, and storing data on realized code blocks, thereby enabling block-level code coverage analysis and improving testing efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If code blocks are removed during optimization based on configuration parameters, then simulation efficiency is improved, but code coverage analysis becomes incomplete
Solution Approach 1:
The system performs preliminary analysis to determine which code blocks will be executed for each configuration parameter set before simulation. This allows the simulation tool to pre-identify executable code blocks and preserve their information even when other blocks are removed during optimization, ensuring complete code coverage tracking without compromising simulation efficiency
Solution Approach 2:
The invention introduces an intermediary mechanism that tracks code block execution status separately from the simulation optimization process. This intermediary layer maintains information about all code blocks regardless of whether they are removed during optimization, allowing complete code coverage analysis while still benefiting from optimization-induced efficiency improvements
2Loss of information
If all code blocks are retained in simulation models, then code coverage analysis is complete, but simulation complexity and processing time increase
Solution Approach 1:
The system segments code blocks into executable and non-executable categories based on configuration parameter analysis. By dividing the code base in this way, the simulation model retains only the necessary executable blocks for each configuration, reducing complexity while maintaining complete code coverage tracking through separate metadata about all original code blocks
Solution Approach 2:
The invention applies local quality by tailoring the simulation model content to each specific configuration parameter set. For each configuration, only the relevant executable code blocks are included in the simulation model, while information about all code blocks is preserved through separate tracking mechanisms, thus reducing local model complexity without sacrificing overall code coverage analysis
3Loss of information
If configuration parameters are varied to test all code blocks, then code coverage is improved, but testing time and resources increase
Solution Approach 1:
The system performs preliminary determination of executable code blocks for each configuration parameter set before actual simulation. This pre-analysis allows the system to identify which code blocks will be executed under each configuration, enabling efficient test case selection that achieves complete code coverage with minimal configuration variations and reduced testing time
Solution Approach 2:
The invention implements feedback mechanisms that use the determined expressions about code block executability to guide subsequent testing decisions. By analyzing which code blocks are executable under different configurations, the system can provide feedback to select the most efficient test cases, achieving complete code coverage while minimizing the number of simulation runs required
Data Source
AI summary
Various example implementations are directed to methods and systems for simulating circuit designs having configuration parameters. According to one example implementation, code blocks of a circuit design for which execution of operations described by the code blocks is conditioned on a value of one or more of a set of configuration parameters, are identified. For each identified code block, a respective expression is determined that indicates whether or not the code block will be executed for different sets of values of the set of configuration parameters. The circuit design is simulated for a first set of values for the configuration parameters. The simulation is performed using a model that omits code blocks that describe sets of operations that will not be executed. The determined expressions are evaluated to determine whether or not each identified code block was realized in the simulation model.


