Data transmission rule verification method, device, equipment and storage medium
1. A data transmission rule verification method is characterized by comprising the following steps:
acquiring a to-be-tested data transmission rule of a to-be-tested design, wherein the to-be-tested data transmission rule at least comprises two transaction types to be tested;
configuring the transaction amount of a first transmission transaction in the two transaction types as a preset threshold value, and generating a first excitation of the first transmission transaction;
respectively sending a first excitation of the first transmission transaction to the design to be tested, and sending a second excitation of a second transmission transaction in the two transaction types to the design to be tested;
and respectively acquiring transmission result information of the design to be tested aiming at the first excitation and the second excitation, and verifying the completeness of the design to be tested about the transmission rule of the data to be tested based on the transmission result information.
2. The method according to claim 1, wherein the preset threshold is 0; the configuring the transaction amount of the first transmission transaction as a preset threshold value comprises:
configuring the design under test in a verification environment to allow the first transfer transaction to be transferred with a transaction amount of 0.
3. The method of claim 2, wherein configuring the design under test in the verification environment to allow transmission of the first transmission transaction with a transaction amount of 0 comprises:
and configuring the credit amount of the first transmission transaction of the design to be tested to be 0 in the verification environment.
4. The method of claim 2, wherein configuring the design under test in the verification environment to allow transmission of the first transmission transaction with a transaction amount of 0 comprises:
and configuring the enabling driving signal of the design to be tested to the first transmission transaction to be 0 in the verification environment.
5. The method of claim 1, wherein the sending a first stimulus for the first transmission transaction and a second stimulus for the second transmission transaction to the design under test, respectively, comprises:
and sending a first excitation of the first transmission transaction to the design to be tested, and then sending a second excitation of the second transmission transaction to the design to be tested.
6. The method of claim 5, further comprising, prior to said then sending a second stimulus for said second transfer transaction to said design under test:
and after sending the first excitation of the first transmission transaction to the design to be tested, waiting for a preset time length.
7. The method of claim 1, wherein the data transmission rule to be tested further comprises: a transaction amount requirement between the first transfer transaction and the second transfer transaction; the verifying the completeness of the design to be tested with respect to the data transmission rule to be tested based on the transmission result information includes:
and verifying whether the to-be-tested design meets the transaction amount requirement or not on the basis of the transmission result information.
8. The method of claim 7, wherein the transaction volume requirements comprise: the transaction amount of the second transmission transaction is larger than or equal to the transaction amount of the first transmission transaction; the verifying whether the to-be-tested design meets the transaction amount requirement on the to-be-tested data transmission rule based on the transmission result information comprises:
and if the transaction amount of the second transmission transaction in the transmission result information is larger than or equal to the preset threshold value, prompting that the verification is passed if the transmission rule of the to-be-tested data of the to-be-tested design conforms to the transaction amount requirement, otherwise, prompting that the verification is not passed if the transmission rule of the to-be-tested data of the to-be-tested design does not conform to the transaction amount requirement.
9. A data transmission rule verification apparatus, comprising:
the rule acquisition module is used for acquiring a to-be-tested data transmission rule of a to-be-tested design, wherein the to-be-tested data transmission rule at least comprises two transaction types to be tested;
a threshold configuration module, configured to configure a transaction amount of a first transmission transaction in the two transaction types as a preset threshold, and generate a first excitation of the first transmission transaction;
the transaction sending module is used for respectively sending a first excitation of the first transmission transaction to the design to be tested and sending a second excitation of a second transmission transaction in the two transaction types to the design to be tested;
and the rule verification module is used for respectively acquiring the transmission result information of the design to be tested aiming at the first excitation and the second excitation and verifying the completeness of the design to be tested about the transmission rule of the data to be tested based on the transmission result information.
10. The apparatus according to claim 9, wherein the preset threshold is 0; the threshold configuration module is configured to:
configuring the design under test in a verification environment to allow the first transfer transaction to be transferred with a transaction amount of 0.
11. The apparatus of claim 10, wherein the configuring of the design under test in the verification environment to allow transmission of the first transmission transaction with a transaction amount of 0 comprises:
and configuring the credit amount of the first transmission transaction of the design to be tested to be 0 in the verification environment.
12. The apparatus of claim 10, wherein the configuring of the design under test in the verification environment to allow transmission of the first transmission transaction with a transaction amount of 0 comprises:
and configuring the enabling driving signal of the design to be tested to the first transmission transaction to be 0 in the verification environment.
13. The apparatus of claim 9, wherein the transaction sending module is configured to:
and sending a first excitation of the first transmission transaction to the design to be tested, and then sending a second excitation of the second transmission transaction to the design to be tested.
14. The apparatus of claim 9, wherein the data transmission rule to be tested further comprises: a transaction amount requirement between the first transfer transaction and the second transfer transaction; the rule verification module is to:
and verifying whether the to-be-tested design meets the transaction amount requirement or not on the basis of the transmission result information.
15. The apparatus of claim 14, wherein the transaction volume requirements comprise: the transaction amount of the second transmission transaction is larger than or equal to the transaction amount of the first transmission transaction; the rule verification module is to:
and if the transaction amount of the second transmission transaction in the transmission result information is larger than or equal to the preset threshold value, prompting that the verification is passed if the transmission rule of the to-be-tested data of the to-be-tested design conforms to the transaction amount requirement, otherwise, prompting that the verification is not passed if the transmission rule of the to-be-tested data of the to-be-tested design does not conform to the transaction amount requirement.
16. An electronic device, comprising:
a memory to store a computer program;
a processor to execute the computer program to implement the method of any one of claims 1 to 8.
17. A non-transitory electronic device readable storage medium, comprising: program which, when run by an electronic device, causes the electronic device to perform the method of any one of claims 1 to 8.
Background
The chip verification is to adopt a corresponding verification language, a verification tool and a verification method to verify whether the chip design meets the requirement specification of chip definition or not before the chip is produced, whether the risk is completely released or not, and find and correct the corresponding defects.
In the chip verification process, a case of verifying a data transmission ordering rule (ordering rule) in a design is often encountered, where the ordering rule is specified in, for example, a PCIE (peripheral component interconnect express, a high-speed serial computer extended bus standard) protocol: forwarded transactions must exceed non-forwarded transactions (P must be able to pass NPs), and for such ordering rules, completeness verification is required for these rules to verify whether the chip design complies with the above rules. The general sequencing rule verification method adopts a large number of random modes to simulate the excitation of a random scene to the chip design to be tested, and then checks whether the sequencing rule is met according to the output result of the chip design to be tested.
However, in practical scenarios, it is difficult to cover all specific scenarios, and therefore the variety of stimuli cannot cover all possible scenarios, and thus the accuracy of the verification result needs to be improved.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, an apparatus, a device and a storage medium for verifying a data transmission rule, which can improve the accuracy of verifying the data transmission rule in a chip verification process.
A first aspect of the embodiments of the present application provides a method for verifying a data transmission rule, including: acquiring a to-be-tested data transmission rule of a to-be-tested design, wherein the to-be-tested data transmission rule at least comprises two transaction types to be tested; configuring the transaction amount of a first transmission transaction in the two transaction types as a preset threshold value, and generating a first excitation of the first transmission transaction; respectively sending a first excitation of the first transmission transaction to the design to be tested, and sending a second excitation of a second transmission transaction in the two transaction types to the design to be tested; and respectively acquiring transmission result information of the design to be tested aiming at the first excitation and the second excitation, and verifying the completeness of the design to be tested about the transmission rule of the data to be tested based on the transmission result information.
In one embodiment, the predetermined threshold is 0; the configuring the transaction amount of the first transmission transaction as a preset threshold value comprises: configuring the design under test in a verification environment to allow the first transfer transaction to be transferred with a transaction amount of 0.
In an embodiment, the configuring, in the verification environment, the design under test to allow the first transmission transaction to be transmitted with a transaction amount of 0 includes: and configuring the credit amount of the first transmission transaction of the design to be tested to be 0 in the verification environment.
In an embodiment, the configuring, in the verification environment, the design under test to allow the first transmission transaction to be transmitted with a transaction amount of 0 includes: and configuring the enabling driving signal of the design to be tested to the first transmission transaction to be 0 in the verification environment.
In an embodiment, the sending the first excitation of the first transmission transaction and the sending the second excitation of the second transmission transaction to the design under test respectively includes: and sending a first excitation of the first transmission transaction to the design to be tested, and then sending a second excitation of the second transmission transaction to the design to be tested.
In an embodiment, before the sending the second stimulus of the second transmission transaction to the design under test, the method further includes: and after sending the first excitation of the first transmission transaction to the design to be tested, waiting for a preset time length.
In an embodiment, the data transmission rule to be tested further includes: a transaction amount requirement between the first transfer transaction and the second transfer transaction; the verifying the completeness of the design to be tested with respect to the data transmission rule to be tested based on the transmission result information includes: and verifying whether the to-be-tested design meets the transaction amount requirement or not on the basis of the transmission result information.
In one embodiment, the transaction volume requirements include: the transaction amount of the second transmission transaction is larger than or equal to the transaction amount of the first transmission transaction; the verifying whether the to-be-tested design meets the transaction amount requirement on the to-be-tested data transmission rule based on the transmission result information comprises: and if the transaction amount of the second transmission transaction in the transmission result information is larger than or equal to the preset threshold value, prompting that the verification is passed if the transmission rule of the to-be-tested data of the to-be-tested design conforms to the transaction amount requirement, otherwise, prompting that the verification is not passed if the transmission rule of the to-be-tested data of the to-be-tested design does not conform to the transaction amount requirement.
A second aspect of the embodiments of the present application provides a data transmission rule verification apparatus, including: the rule acquisition module is used for acquiring a to-be-tested data transmission rule of a to-be-tested design, wherein the to-be-tested data transmission rule at least comprises two transaction types to be tested; a threshold configuration module, configured to configure a transaction amount of a first transmission transaction in the two transaction types as a preset threshold, and generate a first excitation of the first transmission transaction; the transaction sending module is used for respectively sending a first excitation of the first transmission transaction to the design to be tested and sending a second excitation of a second transmission transaction in the two transaction types to the design to be tested; and the rule verification module is used for respectively acquiring the transmission result information of the design to be tested aiming at the first excitation and the second excitation and verifying the completeness of the design to be tested about the transmission rule of the data to be tested based on the transmission result information.
In one embodiment, the predetermined threshold is 0; the threshold configuration module is configured to: configuring the design under test in a verification environment to allow the first transfer transaction to be transferred with a transaction amount of 0.
In an embodiment, the configuring, in the verification environment, the design under test to allow the first transmission transaction to be transmitted with a transaction amount of 0 includes: and configuring the credit amount of the first transmission transaction of the design to be tested to be 0 in the verification environment.
In an embodiment, the configuring, in the verification environment, the design under test to allow the first transmission transaction to be transmitted with a transaction amount of 0 includes: and configuring the enabling driving signal of the design to be tested to the first transmission transaction to be 0 in the verification environment.
In one embodiment, the transaction sending module is configured to: and sending a first excitation of the first transmission transaction to the design to be tested, and then sending a second excitation of the second transmission transaction to the design to be tested.
In an embodiment, the transaction sending module is further configured to wait for a preset time duration after sending the first excitation of the first transmission transaction to the design to be tested, and then send the second excitation of the second transmission transaction to the design to be tested.
In an embodiment, the data transmission rule to be tested further includes: a transaction amount requirement between the first transfer transaction and the second transfer transaction; the rule verification module is to: and verifying whether the to-be-tested design meets the transaction amount requirement or not on the basis of the transmission result information.
In one embodiment, the transaction volume requirements include: the transaction amount of the second transmission transaction is larger than or equal to the transaction amount of the first transmission transaction; the rule verification module is to: and if the transaction amount of the second transmission transaction in the transmission result information is larger than or equal to the preset threshold value, prompting that the verification is passed if the transmission rule of the to-be-tested data of the to-be-tested design conforms to the transaction amount requirement, otherwise, prompting that the verification is not passed if the transmission rule of the to-be-tested data of the to-be-tested design does not conform to the transaction amount requirement.
A third aspect of embodiments of the present application provides an electronic device, including: a memory to store a computer program; a processor configured to perform the method of the first aspect of the embodiments of the present application and any of the embodiments of the present application.
A fourth aspect of embodiments of the present application provides a non-transitory electronic device-readable storage medium, including: a program which, when run by an electronic device, causes the electronic device to perform the method of the first aspect of an embodiment of the present application and any embodiment thereof.
According to the data transmission rule verification method, the data transmission rule verification device, the data transmission rule verification equipment and the storage medium, in the chip verification process, the transaction amount of any transmission transaction in the data transmission rule to be tested is limited to be a certain value and is used as a comparison standard, then the two types of transmission transaction excitation are respectively sent to the design to be tested, then the transmission result information of the design to be tested aiming at the two types of excitation is collected, and the completeness of the design to be tested on the data transmission rule to be tested is verified according to the transmission result of the design to be tested. Therefore, the problem of incomplete coverage rate caused by a random transaction excitation mode in the prior art is solved, and the accuracy of chip verification is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating a chip verification scenario according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a data transmission rule verification method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a data transmission rule verification method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a data transmission rule verification apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, the terms "first," "second," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
As shown in fig. 1, the present embodiment provides an electronic apparatus 1 including: at least one processor 11 and a memory 12, one processor being exemplified in fig. 1. The processor 11 and the memory 12 are connected by a bus 10. The memory 12 stores instructions executable by the processor 11, and the instructions are executed by the processor 11, so that the electronic device 1 can execute all or part of the flow of the method in the embodiments described below, so as to verify the completeness of the design under test with respect to the transmission rule of the data under test.
In an embodiment, the electronic device 1 may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Please refer to fig. 2, which is a schematic diagram of a chip verification scenario according to an embodiment of the present application, wherein a DUT is instantiated in a verification environment 20, and a corresponding stimulus is sent to the DUT, and an output result of the DUT for the stimulus is collected, so as to verify whether the output result meets a requirement of chip design, if so, the verification is passed, otherwise, the verification is not passed, and a research and development staff is required to check a corresponding error for correction, thereby further improving the chip design.
In the chip verification process, data transmission rule (ordering rule) verification is often encountered, that is, whether the related data transmission function of the DUT to be tested meets the required data transmission rule is verified. For example, one data transmission rule in the PCIE protocol: the forwarded transaction P must exceed the non-forwarded transaction NP (i.e. P best be able to pass NP), and the common verification method is a large number of random excitation modes, so that the coverage rate is not comprehensive, and the verification result is not accurate enough.
In the embodiment of the application, a buffer (P buffer) for forwarding a transaction P and a buffer (NP buffer) for non-forwarding a transaction NP are arranged in a DUT to be designed, and the completeness verification of the DUT to be designed about the data transmission rule function is realized by limiting the credit of the transmission transaction in any one of two transaction types and adopting a control variable method, so that the verification accuracy can be improved.
Please refer to fig. 3, which is a data transmission rule verification method according to an embodiment of the present application, and the method can be executed by the electronic device 1 shown in fig. 1 and can be applied to the chip verification scenario shown in fig. 2 to more accurately verify the completeness of the DUT with respect to the data transmission rule. The method comprises the following steps:
step 301: acquiring a to-be-tested data transmission rule of a to-be-tested design DUT, wherein the to-be-tested data transmission rule at least comprises two transaction types to be tested.
In this step, the DUT to be designed may be a complete chip circuit design or a chip function module design, and the data transmission rule to be tested may be a data transmission rule specified by some data transmission protocol standards, such as a data transmission rule in the PCIE protocol: forwarded transactions P must be able to override non-forwarded transactions. Or a custom data transmission rule that needs to be met based on actual requirements to realize a certain function in the DUT to be designed. The data transmission rule includes at least two transaction types, such as a forwarding transaction P and a non-forwarding transaction NP in the data transmission rule in the PCIE protocol, that is, the rule is used to specify the transmission order between the two transactions.
Step 302: the transaction amount of the first transmission transaction in the two transaction types is configured to be a preset threshold value, and a first incentive of the first transmission transaction is generated.
In this step, the transaction amount may be a transmission amount of the data transmission transaction, such as the number of data transmissions or the sending amount. In an actual scenario, a transaction may be transmitted many times, which means that the transaction amount is large, and in the verification process, if the transaction is verified on one side every time, the task of the chip verification process is greatly increased, which is inefficient. In order to improve efficiency, the transaction amount of any data transmission transaction in the data transmission rule may be limited to a fixed value (preset threshold) in the verification environment 20, and the transmission transaction with the limited transaction amount is referred to as a first transmission transaction, so that the transaction amount of the first transmission transaction may be controlled to be unchanged, and then subsequent verification may be performed, which may greatly shorten verification process and improve verification efficiency.
Step 303: and respectively sending a first stimulus of the first transmission transaction to the design to be tested, and sending a second stimulus of a second transmission transaction in the two transaction types to the design to be tested.
In this step, after the transaction amount of the first transmission transaction is configured to be a fixed value, a first stimulus to the DUT to be tested can be generated for the first transmission transaction, a second stimulus to the DUT to be tested can be generated for the second transmission transaction, and the two stimuli are sent to the DUT to be tested, so that the DUT to be tested can perform a related test process. The excitation is an excitation signal, and in an actual scenario, the excitation signal may be a specific level signal or a pulse signal, which is not limited herein.
Step 304: and respectively acquiring transmission result information of the DUT to be designed aiming at the first excitation and the second excitation, and verifying the completeness of the DUT to be designed about the transmission rule of the data to be tested based on the transmission result information.
In this step, after the DUT receives the stimulus, it will perform corresponding actions based on the stimulus, for example, for the stimulus of the data transmission transaction, the DUT will perform transmission and sending of relevant data. The data transmission port of the DUT to be tested can be acquired in real time, data transmission result information is obtained, and for example, if a transmission transaction is sent out, an effective signal can be acquired on the corresponding port. The transmission result information may include the transmitted amount and data transmission direction of a certain transmission transaction, and then verify whether the transmission result information meets the requirements of the data transmission rule to be tested.
According to the data transmission rule verification method, in the chip verification process, the transaction quantity of any one transmission transaction in the to-be-tested data transmission rule is limited to be a certain value and is used as a comparison standard, then the two transmission transaction stimuli are sent to the to-be-tested design DUT respectively, then the transmission result information of the to-be-tested design DUT aiming at the two stimuli is collected, and the completeness of the to-be-tested data transmission rule of the to-be-tested design DUT is verified according to the transmission result of the to-be-tested design DUT. Therefore, the problem of incomplete coverage rate caused by a random transaction excitation mode in the prior art is solved, and the accuracy of chip verification is improved.
Please refer to fig. 4, which is a data transmission rule verification method according to an embodiment of the present application, the method may be executed by the electronic device 1 shown in fig. 1 and may be applied to the chip verification scenario shown in fig. 2 to more accurately verify the completeness of the DUT with respect to the data transmission rule to be tested. The method comprises the following steps:
step 401: acquiring a to-be-tested data transmission rule of a to-be-tested design DUT, wherein the to-be-tested data transmission rule at least comprises two transaction types to be tested. See the description of step 301 in the above embodiments for details.
Step 402: configuring the design under test DUT in the verification environment 20 allows the first transfer transaction to be transferred with a transaction amount of 0.
In this step, the preset threshold of the limited transaction amount may be 0, that is, the first transmission transaction may be directly blocked in the DUT to be tested and not be issued.
In one embodiment, step 402 may comprise: the credit amount of the first transfer transaction configuring the design under test DUT in the verification environment 20 is 0.
In a chip test scene, a data transmission process usually involves a data sending end and a data receiving end, and the sending end and the receiving end can mutually know how many data can be received by each other, for example, the receiving end informs the sending end that the sending end can only receive 10 read operations and 2 write operations through a signal, so that if the sending end has sent 2 write operations and wants to send the 3 rd write operation again, the sending end cannot send the write operation, and the write operation can only exist in the sending end temporarily and cannot be sent to the receiving end unless the receiving end tells the sending end can receive more write operations through the signal. The data transmission amount mutually specified between the transmitting end and the receiving end may be referred to as a credit amount. The amount of credits may vary from DUT to DUT for each design under test.
In an actual authentication scenario, there are typically 2 cases involved with data transfer rules, and an a transfer transaction may exceed a B transfer transaction, or an a transfer transaction cannot exceed a B transfer transaction. In any case, there is usually a credit (credit or ready) requirement in such DUT, and in order to verify the data transmission rules quickly, the credit of one of the transmission transactions may be used to limit the transaction amount. Assuming that the data transmission rule that the forwarding transaction specified in the PCIE protocol must exceed the non-forwarding transaction (P best be able to pass NP) is verified, the non-forwarding transaction (NP) may be used as the first transmission transaction, and the credit of the non-forwarding transaction (NP) may be directly configured to be 0. This type of transaction can only be blocked (kept) in the design and cannot be issued because there is no credit.
In one embodiment, step 402 may further include: the design under test DUT is configured in the verification environment 20 with an enable drive signal of 0 for the first transfer transaction. That is, in some scenarios, the transmission transaction is controlled by the enable signal, and therefore, the enable signal of the first transmission transaction may also be directly driven to 0, so that the first transmission transaction is blocked in the DUT to be tested and cannot be issued.
Step 403: the first stimulus of the first transmission transaction is sent to the design under test DUT, and then the second stimulus of the second transmission transaction is sent to the design under test DUT.
In this step, taking the verification that the forwarding transaction specified in the PCIE protocol must exceed the data transmission rule of the non-forwarding transaction (P best be to pass NP), the first stimulus of the non-forwarding transaction (NP) may be first sent to the design to be tested DUT, and after the preset duration is exceeded, the second stimulus of the forwarding transaction (P) may be sent to the design to be tested DUT. Wherein waiting the preset duration is to ensure that non-forwarded transactions (NPs) have become blocked in the design under test DUT. The preset duration may be determined according to the clock period of the DUT to be tested, and may be set to 1ms, for example. The excitation generation manner is described in detail in the above embodiment with reference to step 303.
Step 404: and verifying whether the DUT to be tested accords with the transaction quantity requirement with the data transmission rule to be tested or not based on the transmission result information.
In this step, the data transmission rule to be tested may further include: a transaction amount requirement between the first transfer transaction and the second transfer transaction. For example, a forwarding transaction specified in the PCIE protocol must exceed a non-forwarding transaction (P best be to pass NP), in which the transaction amount of the forwarding transaction must exceed the transaction amount of the non-forwarding transaction. The completeness of the DUT about the transmission rule of the data to be tested can be verified by verifying whether the transmission result information to be tested corresponds to the transaction amount requirement.
In one embodiment, the transaction volume requirements include: the transaction amount of the second transfer transaction is greater than or equal to the transaction amount of the first transfer transaction. Step 404 may include: and if the transaction quantity of the second transmission transaction in the transmission result information is larger than or equal to the preset threshold value, prompting that the DUT passes the verification when the transmission rule of the data to be tested accords with the transaction quantity requirement, otherwise, prompting that the DUT does not pass the verification when the transmission rule of the data to be tested does not accord with the transaction quantity requirement.
In this step, taking a data transmission rule that a forwarding transaction specified in the PCIE protocol must exceed a non-forwarding transaction (P best be to pass NP) as an example, if the forwarding transaction P exceeds the non-forwarding transaction NP by collecting a transmission port of the DUT to be designed, the DUT to be designed conforms to the transaction amount requirement with respect to the data transmission rule to be measured, and may prompt that the verification is passed, otherwise, prompt that the verification is not passed. For example, the forwarding transaction P is also always kept in the design and cannot be sent out, so that the verification is not passed, which indicates that an error may occur at a certain place of the DUT to be tested, and whether the DUT to be tested has a problem can be checked in time.
In an embodiment, assuming that a rule that a completed transaction specified in a PCIE protocol must exceed a non-forwarded transaction (Completion list be able to pass NP) is a data transmission rule to be tested, the following method may be adopted for verification in this embodiment:
1. the credit for non-forwarded transactions (NPs) is limited in the validation environment 20, allowing this type of transaction to be sent out in the design because no credit is available and cannot be sent out because it is blocked (retained) in the design at all times.
2. The DUT is then stimulated by a non-forwarding transaction (NP).
3. Waiting for a preset time length which is long enough to ensure that the non-forwarding transaction (NP) is blocked in the design, and then sending the excitation of the completion transaction (completion) to the DUT to be tested.
4. The verification whether the transaction (completion) is completed can be designed to be sent out, but the non-forwarding transaction (NP) is blocked in the DUT to be designed due to the loss of the credit amount and cannot be sent out. For example, transmission information may be collected on a data transmission port of a DUT to be designed, and it is determined whether a completed transaction (completion) is actually designed to be sent first, if so, it is indicated that the completed transaction exceeds a non-forwarded transaction (NP), and verification is prompted to pass, otherwise, verification is prompted to fail.
Please refer to fig. 5, which is a data transmission rule verification apparatus 500 according to an embodiment of the present application, and the apparatus can be applied to the electronic device 1 shown in fig. 1 and can be applied to the chip verification scenario shown in fig. 2 to more accurately verify the completeness of the DUT with respect to the data transmission rule to be tested. The device includes: the rule obtaining module 501, the threshold configuring module 502, the transaction sending module 503 and the rule verifying module 504 are as follows:
the rule obtaining module 501 is configured to obtain a to-be-tested data transmission rule of a to-be-tested design DUT, where the to-be-tested data transmission rule at least includes two transaction types to be tested.
The threshold configuration module 502 is configured to configure a transaction amount of a first transmission transaction of the two transaction types as a preset threshold, and generate a first excitation of the first transmission transaction.
The transaction sending module 503 is configured to send a first stimulus of a first transmission transaction to the DUT to be tested, and send a second stimulus of a second transmission transaction of the two transaction types to the DUT to be tested.
And the rule verification module 504 is configured to obtain transmission result information of the DUT to be designed for the first excitation and the second excitation, respectively, and verify the completeness of the DUT to be designed about the transmission rule of the data to be tested based on the transmission result information.
In one embodiment, the predetermined threshold is 0. The threshold configuration module 502 is configured to: configuring the design under test DUT in the verification environment 20 allows the first transfer transaction to be transferred with a transaction amount of 0.
In one embodiment, configuring the DUT to be designed under test in the verification environment 20 to allow the first transfer transaction to be transferred with a transaction amount of 0 includes: the credit amount of the first transfer transaction configuring the design under test DUT in the verification environment 20 is 0.
In one embodiment, configuring the DUT to be designed under test in the verification environment 20 to allow the first transfer transaction to be transferred with a transaction amount of 0 includes: the design under test DUT is configured in the verification environment 20 with an enable drive signal of 0 for the first transfer transaction.
In one embodiment, the transaction sending module 503 is configured to: the first stimulus of the first transmission transaction is sent to the design under test DUT, and then the second stimulus of the second transmission transaction is sent to the design under test DUT.
In an embodiment, the transaction sending module 503 is further configured to wait for a preset time duration after sending the first stimulus of the first transmission transaction to the DUT to be tested, and then send the second stimulus of the second transmission transaction to the DUT to be tested.
In an embodiment, the data transmission rule to be tested further includes: a transaction amount requirement between the first transfer transaction and the second transfer transaction. The rule validation module 504 is configured to: and verifying whether the DUT to be tested accords with the transaction quantity requirement with the data transmission rule to be tested or not based on the transmission result information.
In one embodiment, the transaction volume requirements include: the transaction amount of the second transfer transaction is greater than or equal to the transaction amount of the first transfer transaction. The rule validation module 504 is configured to: and if the transaction quantity of the second transmission transaction in the transmission result information is larger than or equal to the preset threshold value, prompting that the DUT passes the verification when the transmission rule of the data to be tested accords with the transaction quantity requirement, otherwise, prompting that the DUT does not pass the verification when the transmission rule of the data to be tested does not accord with the transaction quantity requirement.
For a detailed description of the data transmission rule verification apparatus 500, please refer to the description of the related method steps in the above embodiments.
An embodiment of the present invention further provides a non-transitory electronic device readable storage medium, including: a program that, when run on an electronic device, causes the electronic device to perform all or part of the procedures of the methods in the above-described embodiments. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like. The storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.