# US 2008/0189528 A1 · System, Method and Software Application for the Generation of Verification Programs

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0189528 A1
- Document ID: US20080189528A1
- Status: Published application
- Kind: A1
- Application number: 11/670,876
- Filed: 2007-02-02
- Published: 2008-08-07
- Earliest claimed: 2007-02-02
- Assignees: MIPS Technologies, Inc.
- Inventors: James H. Robinson
- Web page: https://patentgrep.com/patent/US20080189528A1

## CPC

- G06F 11/263: Generation of test inputs, e.g. test vectors, patterns or sequences {; with adaptation of the tested hardware for testability with external testers}
- G06F 11/2236: {to test CPU or processors}
- G06F 30/39: Circuit design at the physical level (physical level design for reconfigurable circuits G06F30/347)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system, method and software application according to the present invention creates complex, interesting, self checking and sturdy verification programs. A self-checking random verification program automatically generates appropriate register and memory reference values, inserts checkpoints and gathers and reports results to test CPU designs. With appropriate templates and simulator, the SRVP framework is largely independent of the CPU architecture and can be utilized to generate randomly generated self-checking verification programs for any CPU architecture and any CPU instruction set.

## Claims

### Claim 1

A method for the generation of a verification program for a central processing unit (CPU), comprising randomly generating at least one instruction executable on the CPU, providing the randomly generated instruction to a CPU simulator, whereby the simulator returns both a status of the CPU after the instruction has been executed and a suggestion for change of a prior state of the CPU to modify the effect of the at least one instruction.

### Claim 2 (depends on 1)

The method in accordance with claim 1, further comprising classifying the status of the at least one instruction into a type.

### Claim 3 (depends on 1)

The method in accordance with claim 1, further comprising selecting the status of the instruction type from the group consisting of a normal type, a branch type, an exception type and an unpredictable type.

### Claim 4 (depends on 3)

The method in accordance with claim 3, further comprising, if the status is of a normal type, writing the at least one instruction to the verification program.

### Claim 5 (depends on 4)

A method in accordance with claim 4, further comprising, if the status of the at least one instruction is unpredictable, determining change information arranged to render the instruction predictable.

### Claim 6 (depends on 4)

The method in accordance with claim 4, further comprising, inserting change information into the verification program to render the at least one instruction predictable.

### Claim 7 (depends on 6)

The method in accordance with claim 6, whereby inserting the change information includes inserting register setting code to set at least one register prior to the execution of the at least one instruction.

### Claim 8 (depends on 7)

The method in accordance with claim 7, whereby inserting change information includes inserting memory mapping information to set at least one memory address to be referenced by the at least one instruction.

### Claim 9 (depends on 8)

The method in accordance with claim 8, whereby the memory address is one of a physical and a virtual address.

### Claim 10 (depends on 4)

The method in accordance with claim 4, further comprising, if the status of the instruction is a branch, inserting branch handling instructions into the verification program.

### Claim 11 (depends on 4)

The method in accordance with claim 4, further comprising, if the status of the instruction is an exception, inserting exception handling instructions into the verification program.

### Claim 12 (depends on 1)

The method in accordance with claim 1, further comprising inserting into the verification program at least one instruction arranged to return the status of the CPU.

### Claim 13 (depends on 1)

The method in accordance with claim 1, whereby the CPU utilizes a MIPS instruction set.

### Claim 14

A system for the generation of a verification program for a CPU, comprising a generator arranged to generate at least one instruction executable on the CPU, and a simulator arranged to receive the randomly generated instruction, wherein the simulator returns a status of the CPU after the instruction has been executed and a suggestion for change of a prior state of the CPU to modify the effect of the at least one instruction.

### Claim 15 (depends on 14)

A system in accordance with claim 14, further comprising a classifying module arranged to classify the status of the at least one instruction as one of a normal type, a branch type, an exception type and an unpredictable type.

### Claim 16 (depends on 14)

A system in accordance with claim 14, further comprising a writing module arranged to, if the status is of a normal type, write the at least one instruction to the verification program.

### Claim 17 (depends on 14)

A system in accordance with claim 14, further comprising a reporting module arranged to, if the status of the instruction is unpredictable, determine change information arranged to render the instruction predictable.

### Claim 18 (depends on 17)

A system in accordance with claim 17, wherein the change information module causes the change information to be inserted into the verification program to render the at least one instruction predictable.

### Claim 19 (depends on 17)

A system in accordance with claim 17, wherein the change information includes register setting code arranged to set at least one register prior to the execution of the at least one instruction.

### Claim 20 (depends on 17)

A system in accordance with claim 17, wherein the change information includes memory mapping information to set at least one memory address to be referenced by the at least one instruction.

### Claim 21 (depends on 20)

A system in accordance with claim 20, wherein the memory address is one of a physical and a virtual address.

### Claim 22 (depends on 21)

A system in accordance with claim 21, wherein the change information includes, if the status of the instruction is a branch, branch handling instructions.

### Claim 23 (depends on 21)

A system in accordance with claim 21, wherein the change information includes, if the status of the instruction is an exception, exception handling instructions.

### Claim 24 (depends on 14)

A system in accordance with claim 14, further comprising a checkpoint module arranged to insert into the verification program at least one instruction arranged to return the status of the CPU.

### Claim 25 (depends on 24)

A system in accordance with claim 24, wherein the checkpoint module executes at a privilege level different from the privilege level of the at least one instruction.

### Claim 26

A randomly generated program arranged to verify the operation of a CPU, comprising at least one randomly generated instruction and at least one checkpoint arranged to verify the status of the CPU once the randomly generated instruction has been executed.

### Claim 27 (depends on 26)

The randomly generated program of claim 26 further comprising a plurality of random instructions associated with a plurality of threads for verifying multiple threads of execution.

### Claim 28 (depends on 27)

The randomly generated software application of claim 27 further comprising synchronizing instructions suggested by the simulator to generate predictable results.

### Claim 29 (depends on 26)

The randomly generated software application of claim 26 further comprising creating a plurality of random instructions for concurrently verifying the operation of at least one additional CPU.

### Claim 30 (depends on 27)

The randomly generated software application of claim 27 further comprising synchronizing instructions suggested by the simulator to generate predictable results.

### Claim 31

A method for verifying the architecture of a CPU comprising randomly generating a plurality of executable instructions that include at least one load instruction or one store instruction that access a random value in a base register to determine the memory location for the load or store operation wherein:
if a physical address (PA) is being read from for the first time, inserting code to initialize the memory location at the physical address to a known value;
if a virtual address (VA) is mapped by a translation lookaside buffer (TLB), and there is no corresponding valid entry in the TLB at the time the instruction is executed, inserting code in a prior checkpoint to populate the TLB, and mapping the load to an available PA;
selecting an immediate offset value in a load or store instruction to align the computed VA; and
if the VA is unmapped, discarding the load instruction if the PA is in a region of memory otherwise required by the test.

### Claim 32 (depends on 31)

The method of claim 31 further comprising selecting an immediate offset for a load or a store instruction to tune the number of alignment exceptions and to cause load and store instructions to access a selected subset of cache lines.

### Claim 33 (depends on 31)

The method of claim 31 wherein the value in the base register is generated by a prior sequence of instructions.

### Claim 34 (depends on 31)

A computer readable medium containing executable instructions that implement the method in accordance with claim 31.
