# US 2009/0222250 A1 · Hard/Soft Cooperative Verifying Simulator

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

- Number: US 2009/0222250 A1
- Document ID: US20090222250A1
- Status: Published application
- Kind: A1
- Application number: 12/039,005
- Filed: 2008-02-28
- Published: 2009-09-03
- Earliest claimed: 2008-02-28
- Assignees: Oki Electric Industry Co., Ltd.
- Inventors: Noriyoshi ITO
- Web page: https://patentgrep.com/patent/US20090222250A1

## CPC

- G06F 30/33: Design verification, e.g. functional simulation or model checking
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present invention provides a hard/soft cooperative verifying simulator based on a SystemC simulator, capable of reducing overhead of context switching control thereby to shorten processing time. Time keepers for controlling simulation times of a plurality of threads are provided corresponding to the threads generated as simulation models for hardware and software. Each of the time keepers has a variable which holds a simulation time for each thread, a variable which holds a summation time, and a break request queue which stores a break time and its corresponding break method therein. The time keeper manages both variables and the queue in response to six types of method invocations from the thread, and invokes a wait function of the SystemC simulator when necessary. It is thus possible to reduce the number of times that a wait function invocation is performed, and shorten the entire processing time.

## Claims

### Claim 1

A C language-based hard/soft cooperative verifying simulator for performing cooperative verification of hardware and software, comprising:
a plurality of time keepers provided every plurality of threads constituting simulation models corresponding to the hardware and software and each provided with a first variable for holding a simulation time, a second variable for holding a summation time, a break request queue for storing break requests, each of which consists of a pair of a break time and a break method, corresponding thereto, and a processing function in order to control a simulation time of each of the threads to which said time keepers correspond respectively; and
a C language-based simulator body which advances each managed system time by a given required time in response to a request issued from each of the time keepers and controls context switching between the threads being operated in parallel.

### Claim 2 (depends on 1)

The C language-based hard/soft cooperative verifying simulator according to claim 1, wherein each of the time keepers includes:
a first function which returns a simulation time of the first variable in response to an invocation;
a second function which returns a value obtained by subtracting the summation time from the simulation time as the system time in response to an invocation;
a third function which advances a system time of the simulator body with a summation time of the second variable as the required time in response to an invocation and thereafter clears the second variable to zero;
a fourth function which registers a given break time, a break system time and a break method in the break request queue;
a fifth function which, when the break request queue is empty, adds an elapsed time given as an argument to the simulation time to advance the simulation time and adds the elapsed time to the summation time to update the summation time; adds the elapsed time to the simulation time to advance the simulation time when the break request queue exists and the simulation time is less than a break time; and invokes, within the break request queue, a break method in which a break time is greater than or equal to a simulation time, when the break request queue exists and the simulation time is greater than or equal to a break time; and
a sixth function which, when the time given as an argument is greater than the current simulation time, invokes the fifth function with a difference between the time and a post-renewal simulation time being taken as an argument.

### Claim 3 (depends on 2)

The C language-based hard/soft cooperative verifying simulator according to claim 2, wherein when the break request queue exists and the updated simulation time reaches a break time stored at the head of the break request queue, the fifth function invokes each break method in order from the head of the break request queue and thereafter adds the summation time to the corresponding simulation time to advance the simulation time and adds the elapsed time to the summation time to update the summation time, and when the updated summation time exceeds a predetermined threshold value, the fifth function invokes the third function.

### Claim 4 (depends on 2)

The C language-based hard/soft cooperative verifying simulator according to claim 2, which is provided with a time keeper integrated module including:
a seventh function which invokes the fourth function over a time keeper designated by a time keeper identifier;
an eighth function which invokes the third function over the time keeper designated by the time keeper identifier;
a ninth function which invokes the fifth function over the time keeper designated by the time keeper identifier;
a tenth function which invokes the first function over the time keeper designated by the time keeper identifier; and
an eleventh function which invokes the sixth function over the time keeper designated by the time keeper identifier.

### Claim 5 (depends on 2)

The C language-based hard/soft cooperative verifying simulator according to claim 2, which is provided with a time keeper integrated module including:
a seventh function which invokes the fourth function over a time keeper designated by a time keeper identifier;
an eighth function which invokes the third function over the time keeper designated by the time keeper identifier;
a ninth function which invokes the fifth function over the time keeper designated by the time keeper identifier;
a tenth function which invokes the first function over the time keeper designated by the time keeper identifier; and
an eleventh function which invokes the sixth function over the time keeper designated by the time keeper identifier.

### Claim 6 (depends on 4)

The C language-based hard/soft cooperative verifying simulator according to claim 4, wherein each of the time keeper includes:
a third variable indicating whether a state of a corresponding thread is in a sleep state or an operating state;
a twelfth function which sets the third variable to the sleep state;
a thirteenth function which sets the third variable to the operating state; and
a fourteenth function which returns the third variable as a returned value.

### Claim 7 (depends on 5)

The C language-based hard/soft cooperative verifying simulator according to claim 5, wherein each of the time keeper includes:
a third variable indicating whether a state of a corresponding thread is in a sleep state or an operating state;
a twelfth function which sets the third variable to the sleep state;
a thirteenth function which sets the third variable to the operating state; and
a fourteenth function which returns the third variable as a returned value.
