# US 2023/0055523 A1 · Method, apparatus, and storage medium for generating test cases

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

- Number: US 2023/0055523 A1
- Document ID: US20230055523A1
- Status: Published application
- Kind: A1
- Application number: 17/876,312
- Filed: 2022-07-28
- Published: 2023-02-23
- Earliest claimed: 2021-08-18
- Assignees: Xepic Corporation Limited
- Applicants: Xepic Corporation Limited
- Inventors: Shichao GAO; Huiping WU
- Web page: https://patentgrep.com/patent/US20230055523A1

## CPC

- G06F 11/3676: {for coverage analysis}
- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the present disclosure provide a method, an apparatus, and a storage medium for generating a plurality of test cases by a Portable Stimulus Standard (PSS) tool in a PSS environment. The test cases are used to test a logic system design. The method comprises: acquiring a configuration file and a coverage target of the logic system design; generating a scenario model according to the configuration file; generating the plurality of test cases according to the scenario model; determining whether the plurality of test cases satisfy the coverage target; in response to the plurality of test cases failing to satisfy the coverage target, determining a difference between the plurality of test cases and the coverage target; and updating the scenario model according to the difference.

## Claims

### Claim 1

A method for generating a plurality of test cases by a Portable Stimulus Standard (PSS) tool in a PSS environment, wherein the test cases are used to test a logic system design, the method comprising:
acquiring a configuration file and a coverage target of the logic system design;
generating a scenario model according to the configuration file;
generating the plurality of test cases according to the scenario model;
determining whether the plurality of test cases satisfy the coverage target;
in response to the plurality of test cases failing to satisfy the coverage target, determining a difference between the plurality of test cases and the coverage target; and
updating the scenario model according to the difference.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
generating a coverage test file according to the coverage target, wherein the coverage test file includes contents of the coverage test and a plurality of coverage bins.

### Claim 3 (depends on 2)

The method of claim 2, wherein determining whether the plurality of test cases satisfy the coverage target further comprises:
acquiring test content descriptions of the plurality of test cases based on the plurality of test cases;
comparing the test content descriptions with the coverage test file to obtain a comparison result; and
statically determining whether the plurality of test cases satisfy the coverage target according to the comparison result.

### Claim 4 (depends on 3)

The method of claim 3, wherein comparing the test content descriptions with the coverage test file further comprises:
comparing the test content descriptions with each of the coverage bins.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
in response to the plurality of test cases satisfying a predetermined condition, outputting the plurality of test cases to test the logic system design in a test environment.

### Claim 6 (depends on 1)

The method of claim 1, wherein the coverage target includes a user-defined coverage target or a default coverage target generated based on the configuration file.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
receiving the user-defined coverage target, wherein the user-defined coverage target is described in SystemVerilog language; and
converting the user-defined coverage target into the coverage target, wherein the coverage target is the coverage target in the PSS environment.

### Claim 8 (depends on 1)

The method of claim 1, wherein the configuration file includes descriptions of a plurality of functions of the logic system design, and the coverage target includes test contents corresponding to the plurality of functions.

### Claim 9 (depends on 8)

The method of claim 8, wherein:
the scenario model further includes scenario descriptions and constraints; and
updating the scenario model according to the difference further comprises:
determining, from the text contents, difference test contents associated with the difference; and
modifying the scenario model according to the difference test contents, including updating the constraints according to the difference test contents.

### Claim 10

An apparatus for generating a plurality of test cases by a Portable Stimulus Standard (PSS) tool in a PSS environment, wherein the test cases are used to test a logic system design, the apparatus comprising:
a memory storing a set of instructions; and
at least one processor, configured to execute the set of instructions to:
acquire a configuration file and a coverage target of the logic system design;
generate a scenario model according to the configuration file;
generate the plurality of test cases according to the scenario model;
determine whether the plurality of test cases satisfy the coverage target;
in response to the plurality of test cases failing to satisfy the coverage target, determine a difference between the plurality of test cases and the coverage target; and
update the scenario model according to the difference.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein the at least one processor is further configured to execute the set of instructions to:
generate a coverage test file according to the coverage target, wherein the coverage test file includes contents of the coverage test and a plurality of coverage bins.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the at least one processor is further configured to execute the set of instructions to:
acquire test content descriptions of the plurality of test cases based on the plurality of test cases;
compare the test content descriptions with the coverage test file to obtain a comparison result; and
statically determine whether the plurality of test cases satisfy the coverage target according to the comparison result.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein the at least one processor is further configured to execute the set of instructions to:
compare the test content descriptions with each of the coverage bins.

### Claim 14 (depends on 10)

The apparatus of claim 10, wherein the at least one processor is further configured to execute the set of instructions to:
in response to the plurality of test cases satisfying a predetermined condition, output the plurality of test cases to test the logic system design in a test environment.

### Claim 15 (depends on 10)

The apparatus of claim 10, wherein the coverage target includes a user-defined coverage target or a default coverage target generated based on the configuration file.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the at least one processor is further configured to execute the set of instructions to:
receive the user-defined coverage target, wherein the user-defined coverage target is described in System Verilog language; and
convert the user-defined coverage target into the coverage target, wherein the coverage target is the coverage target in the PSS environment.

### Claim 17 (depends on 10)

The apparatus of claim 10, wherein the configuration file includes descriptions of a plurality of functions of the logic system design, and the coverage target includes test contents corresponding to the plurality of functions.

### Claim 18 (depends on 17)

The apparatus of claim 17, wherein:
the scenario model further includes scenario descriptions and constraints; and
the at least one processor is further configured to execute the set of instructions to:
determine, from the test contents, difference test contents associated with the difference; and
modify the scenario model according to the difference test contents, including updating the constraints according to the difference test contents.

### Claim 19

A non-transitory computer-readable storage medium storing a set of instructions that, when executed by a processor, causes the processor to perform a method for generating a plurality of test cases by a Portable Stimulus Standard (PSS) tool in a PSS environment, wherein the test cases are used to test a logic system design, the method comprising:
acquiring a configuration file and a coverage target of the logic system design;
generating a scenario model according to the configuration file;
generating the plurality of test cases according to the scenario model;
determining whether the plurality of test cases satisfy the coverage target;
in response to the plurality of test cases failing to satisfy the coverage target, determining a difference between the plurality of test cases and the coverage target; and
updating the scenario model according to the difference.
