Multi-Layer RISC-V Assembly Generator for Verification Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current verification processes for RISC-V processors using random instruction stream generators are inefficient due to unnecessary sequences and potential early failures, which can invalidate subsequent tests and fail to cover all corner cases, leading to reduced efficiency and potential errors.

Innovation Solution

A multi-layered random assembly code generator (RACG) with specific constraints and weighted values for each layer, capable of generating random instruction sequences that mimic real-world scenarios, combined with a feedback mechanism to discard repeated sequences and ensure only new sequences are tested, thereby improving verification efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a standard random instruction stream generator is used to verify the RISC-V processor, then the full range of instructions can be tested including extreme corner cases, but the verification process becomes inefficient due to unnecessary sequences and potential early failures

Engineering Contradiction:
Improveverification accuracyVSAvoidverification efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The verification process is segmented into multiple independent layers (instruction generation layer, sequence composition layer, execution layer). Each layer handles specific aspects of test generation independently, allowing parallel processing and reducing bottlenecks. The instruction stream is divided into manageable segments that can be generated and verified separately, improving overall verification efficiency while maintaining comprehensive coverage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary analysis of the processor architecture and identifies critical verification paths before generating random instruction streams. Test sequences are pre-filtered to exclude obviously invalid or redundant instructions, and the generator is configured with knowledge of the processor's instruction set architecture to produce meaningful test cases from the outset, avoiding wasted verification cycles on impossible or trivial sequences.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If the amount of generated instructions/sequences is reduced to speed up verification, then the verification process becomes faster, but corner cases may not be covered leading to errors

Engineering Contradiction:
Improveverification speedVSAvoidcorner case coverage
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The verification system dynamically adjusts the volume and complexity of generated instruction sequences based on progress through the verification process. Early stages generate larger volumes of diverse instructions to ensure comprehensive coverage, while later stages focus on targeted testing of specific paths. The system monitors coverage metrics and automatically modifies generation parameters to maintain optimal balance between speed and coverage throughout the verification process.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes parameters of the instruction generator during verification, including instruction frequency, sequence length, and complexity levels. By dynamically adjusting these parameters, the system can generate sufficient test coverage for corner cases while avoiding excessive generation of redundant sequences. Parameter adaptation allows the verification process to maintain high efficiency without sacrificing comprehensive coverage.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20240378027A1Self-checking random assembly generator for RISC-v processor
Publication Date: 2024.11.14 MEDIATEK SINGAPORE PTE LTD
  • US20240378027A1 patent drawing
  • US20240378027A1 patent drawing
  • US20240378027A1 patent drawing

AI summary

A random assembly code generator (RACG) for generating an assembly code for a RISC-V processor includes: a multi-layer structure, wherein each layer has a specific and individual set of constraints defining a set of instructions which can be generated by each layer. The RACG is arranged to generate a random instruction for each layer of the multi-layer structure according to the specific and individual set of constraints, combine the generated random instructions into a random instruction sequence, and convert the random instruction sequence to an assembly code for the RISC-V processor.