Instruction Sequence Generator for CPU Data Hazard Verification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Pre-silicon verification of CPU designs is resource-intensive and challenging due to the large number of states and functions, making it difficult to efficiently verify the correct resolution of data hazards.

Innovation Solution

An instruction sequence generator (ISG) is configured to automatically generate instruction sequences containing specifiable data hazards by tracking register access history and using it to create test programs that exercise CPU designs effectively.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If manual generation of instruction sequences with data hazards is performed, then verification coverage can be achieved, but the process becomes tedious and intractable

Engineering Contradiction:
Improveverification accuracyVSAvoidmanual effort
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The instruction sequence generator automatically tracks register access history and generates instruction sequences with data hazards without manual intervention. The system serves itself by maintaining internal state (register usage history) and autonomously creating test cases that exercise data hazard resolution pathways.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system pre-generates instruction sequences containing specific data hazard patterns before actual verification begins. By preparing test sequences in advance with controlled data hazards, the verification process can systematically evaluate CPU behavior under known hazard conditions without ad-hoc manual creation during testing.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If high randomness is used in generating instruction sequences, then more states can be covered, but the generation becomes intractable when performed manually

Engineering Contradiction:
Improvestate coverageVSAvoidgeneration complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The instruction sequence generator dynamically adapts its behavior based on the desired level of randomness and data hazard specifications. The system can adjust between more deterministic generation (for specific hazard patterns) and higher randomness (for broader state coverage) without requiring manual reconfiguration, managing complexity through automated parameter control.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The register access history tracking mechanism serves as an intermediary between the random instruction generation and the data hazard verification. It mediates by recording actual register usage patterns and using this information to guide subsequent instruction generation, ensuring that random sequences actually produce the intended data hazards rather than requiring manual crafting of each sequence.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If complete verification of CPU design is performed, then all functions and states can be tested, but resource consumption increases significantly

Engineering Contradiction:
Improveverification completenessVSAvoidmemory and processing resources
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The system extracts and isolates specific data hazard scenarios from the complete CPU verification space. Rather than attempting to verify all possible instruction sequences simultaneously, it extracts targeted test cases focusing on data dependency resolution, thereby reducing the memory and processing resources required while maintaining verification effectiveness for critical pathways.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The instruction sequence generator performs partial verification by focusing specifically on data hazard resolution rather than attempting exhaustive verification of all CPU functions. This selective approach uses fewer resources while still providing high-value verification of the data hazard handling logic, which is a critical but specific aspect of CPU correctness.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS12210879B2Data hazard generation
Publication Date: 2025.01.28 HUAWEI TECH CO LTD
  • US12210879B2 patent drawing
  • US12210879B2 patent drawing
  • US12210879B2 patent drawing

AI summary

Implementations are directed to methods, systems, and computer-readable media for data hazard generation for instruction sequence generation. In one aspect, a computer-implemented method includes: obtaining data hazard information defining a data hazard to be generated during computer instruction generation, the data hazard specifying a data dependency between a first instruction and a second instruction occurring after the first instruction, and generating, based on the data hazard information and register usage data of a plurality of registers, an instruction for execution in a current processing cycle that satisfies the data dependency specified by the data hazard. The register usage data specifies, for each register of the plurality of registers, whether data was read from or written into the register in a plurality of processing cycles preceding the current processing cycle.