Test method and system based on variable combination time sequence function coverage
A test method and system based on a variable combination time sequence function coverage are provided, where the method includes: constructing a variable combination time sequence function coverage structure, and using the variable combination time sequence function coverage structure as a random constraint; determining a random seed of each value range of each variable in the variable combination time sequence function coverage structure; sequentially obtaining a time point as a current time point based on a time sequence of the variable combination time sequence function coverage structure; obtaining a value segment of each variable at the current time point from the variable combination time sequence function coverage structure, to form a variable combination structure at the current time point; and for the variable combination structure at the current time point, generating a random excitation of each variable to perform testing in a current scenario.
1 . A test method based on a variable combination time sequence function coverage, comprising:
constructing a variable combination time sequence function coverage structure based on an actual verification requirement, and using the variable combination time sequence function coverage structure as a random constraint, wherein the variable combination time sequence function coverage structure is used to represent a relationship in which a single variable varies with time or a relationship in which a combination of at least two variables varies with time;
determining a random seed of each value range of each variable in the variable combination time sequence function coverage structure;
sequentially obtaining a time point as a current time point based on a time sequence of the variable combination time sequence function coverage structure;
obtaining a value segment of each variable at the current time point from the variable combination time sequence function coverage structure, to form a variable combination structure at the current time point;
for the variable combination structure at the current time point, generating a random excitation of each variable based on a corresponding random seed to perform testing in a current scenario for chip verification; and
repeating the steps of sequentially obtaining a time point as a current time point based on a time sequence of the variable combination time sequence function coverage structure, obtaining a value segment of each variable at the current time point from the variable combination time sequence function coverage structure, to form a variable combination structure at the current time point, and for the variable combination structure at the current time point, generating a random excitation of each variable based on a corresponding random seed to perform testing in a current scenario for chip verification, until the entire time sequence is traversed;
wherein the method further comprises:
outputting a test result of a chip to be verified;
wherein the random seed is used to ensure that a random excitation generated in each test is capable of being reproduced.
2 . The test method based on a variable combination time sequence function coverage according to claim 1 , wherein the constructed variable combination time sequence function coverage structure is a three-layer structure;
curly brackets “{ }” are used at a first layer to indicate a time sequence of one variable or a combined time sequence of at least two variables;
square brackets “[ ]” are used at a second layer to indicate all value segments of each variable;
square brackets “[ ]” are used at a third layer to indicate a value range and/or a weight of each value segment; and
quantities of value segments of the variables are the same, and are equal to a time sequence length.
3 . The test method based on a variable combination time sequence function coverage according to claim 2 , wherein the weight is used to represent a repetition quantity of the value range, and is represented by adding “*W” after the square brackets “[ ]” of the value range, and W represents a weight value.
4 . The test method based on a variable combination time sequence function coverage according to claim 3 , wherein the weight value W is less than or equal to the time sequence length N.
5 . The test method based on a variable combination time sequence function coverage according to claim 4 , wherein when the weight value W is equal to the time sequence length N, a default value is obtained.
6 . The test method based on a variable combination time sequence function coverage according to claim 2 , wherein the value range comprises a numerical value range in which first and last numerical values are equal or a numerical value range in which first and last numerical values are unequal.
7 . The test method based on a variable combination time sequence function coverage according to claim 1 , wherein the generated random excitation is as follows:
if the value range of the variable is a single numerical value, the single numerical value is directly returned as the random excitation; or
if the value range of the variable is a numerical value range, a random number is generated in the numerical value range as the random excitation.
8 . The test method based on a variable combination time sequence function coverage according to claim 3 , wherein when the weight value Wis 0 , it indicates that a value range corresponding to the weight value is ignored, and the value range does not belong to a part of a sequence; and
when the weight value W has a negative sign, the negative sign indicates an invalid sequence, and provided that a weight value W of a value range in a sequence has a negative sign, it indicates that the sequence is an invalid sequence.
9 . A test system based on a variable combination time sequence function coverage, comprising:
one or more processors; and
a non-transitory computer-readable storage medium storing instructions that, when executed by the one or more processors, cause the one or more processors to:
construct a variable combination time sequence function coverage structure based on an actual verification requirement, and use the variable combination time sequence function coverage structure as a random constraint, wherein the variable combination time sequence function coverage structure is used to represent a relationship in which a single variable varies with time or a relationship in which a combination of at least two variables varies with time;
determine a random seed of each value range of each variable in the variable combination time sequence function coverage structure;
sequentially obtain a time point as a current time point based on a time sequence of the variable combination time sequence function coverage structure, and obtain a value segment of each variable at the current time point from the variable combination time sequence function coverage structure, to form a variable combination structure at the current time point;
for the variable combination structure at the current time point, generate a random excitation of each variable based on a corresponding random seed to perform testing in a current scenario for chip verification;
repeat the sequentially obtaining a time point, the obtaining a value segment of each variable at the current time point, for the variable combination structure at the current time point, the generating a random excitation of each variable, until the entire time sequence is traversed; and
output a test result of a chip to be verified;
wherein the random seed is used to ensure that the random excitation correspondingly generated is capable of being reproduced.
10 . The test system based on a variable combination time sequence function coverage according to claim 9 , wherein the constructed variable combination time sequence function coverage structure is a three-layer structure;
curly brackets “{ }” are used at a first layer to indicate a time sequence of one variable or a combined time sequence of at least two variables;
square brackets “[ ]” are used at a second layer to indicate all value segments of each variable;
square brackets “[ ]” are used at a third layer to indicate a value range and/or a weight of each value segment; and
quantities of value segments of the variables are the same, and are equal to a time sequence length.
11 . The test system based on a variable combination time sequence function coverage according to claim 10 , wherein the weight is used to represent a repetition quantity of the value range, and is represented by adding “*W” after the square brackets “[ ]” of the value range, and W represents a weight value.
12 . The test system based on a variable combination time sequence function coverage according to claim 11 , wherein the weight value W is less than or equal to the time sequence length N.
13 . The test system based on a variable combination time sequence function coverage according to claim 12 , wherein when the weight value W is equal to the time sequence length N, a default value is obtained.
14 . The test system based on a variable combination time sequence function coverage according to claim 10 , wherein the value range comprises a numerical value range in which first and last numerical values are equal or a numerical value range in which first and last numerical values are unequal.
15 . The test system based on a variable combination time sequence function coverage according to claim 9 , wherein the generated random excitation is as follows:
if the value range of the variable is a single numerical value, the single numerical value is directly returned as the random excitation; or
if the value range of the variable is a numerical value range, a random number is generated in the numerical value range as the random excitation.
16 . The test system based on a variable combination time sequence function coverage according to claim 11 , wherein when the weight value W is 0, it indicates that a value range corresponding to the weight value is ignored, and the value range does not belong to a part of a sequence; and
when the weight value W has a negative sign, the negative sign indicates an invalid sequence, and provided that a weight value W of a value range in a sequence has a negative sign, it indicates that the sequence is an invalid sequence.