An incentive method, device and system for verifying merge function
By controlling the depth and weight of the excitation pool, multiple merge function verification scenarios are constructed, the problem of a single scenario of existing verification methods is solved, the reliability and flexibility of verification is improved, and more comprehensive verification results are achieved.
Patent Information
- Application Number
- CN202311740242.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2043-12-15
AI Technical Summary
The existing method of verification merge function is extremely limited. The simulated scenarios are single and multiple reasonable verification scenarios cannot be constructed, resulting in insufficient verification reliability.
By controlling the depth of the excitation pool and the weight of the excitation, a variety of merge function verification scenarios are constructed, and the excitation pool is used to quickly and conveniently generate and send excitations to achieve the construction of multiple scenarios.
Improves the reliability and flexibility of verification, and can build a variety of merge function verification scenarios, including a single command, multiple command interspersion and mixed sending scenarios, indirectly controlling the number of commands on merged within the gap time before formal access to memory. Improves the breadth and reliability of verification.
Smart Images

Figure CN117709250B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of chip verification, and in particular relates to an incentive method, device and system for verifying a merge function. Background Art
[0002] In the chip verification process based on UVM (Universal Verification Methodology), the UVM Sequence mechanism is used to generate incentives and plays a huge role in the verification environment. In almost all verification methods, creating sufficiently random transactions (sequence items) is the most commonly used means, but in order to cover the test points, it is necessary to constrain the randomness of the transactions. From the perspective of specific implementation, the constraints on incentives can be divided into intra-incentive constraints and inter-incentive constraints. Among them, intra-incentive constraints refer to the randomization of a single transaction, and there is no connection between transactions and no influence on each other; inter-incentive constraints refer to the connection between multiple transactions, not separate individuals, which is often used in the directional verification of certain functions of the chip.
[0003] In high-speed network chips, in order to increase the speed of accessing memory, commands accessing the same address are merged together to form a merge chain. In this way, only one command after the merge is needed to access the content of the corresponding address, usually using the chain head to access, which greatly saves time. From the perspective of verification, it is necessary to construct multiple similar commands to read and write RAM and send them at similar times to construct an environment to verify this merge function. The current common construction method is to push a constructed stimulus into a queue for temporary storage at the same time as it is issued, and then take it out of the queue the next time a command is sent. This construction method can meet the most basic merge requirements, but it has great limitations and the simulated scenario is single. Summary of the invention
[0004] In order to solve the problem that the existing method of verifying the merge function is extremely limited and the simulated scenario is single, the present invention provides an incentive method, device and system for verifying the merge function. The incentive method proposed in the present invention can construct a variety of merge scenarios by controlling the depth of the incentive pool and the weight of the incentive to improve the reliability of verification.
[0005] The present invention is achieved through the following technical solutions:
[0006] An incentive method for verifying a merge function, the incentive method comprising:
[0007] Initialization step: randomly instantiate the number of incentive bins in the incentive pool, each of which stores incentive-related information in the form of a class, including the information of the incentive itself, the weight of the incentive that needs to be reused in subsequent package issuance, and the ID number of the incentive; and the incentive pool is initially empty by default;
[0008] Incentive pool detection step A: determine whether the incentive pool is empty. If it is empty, execute the incentive generation and sending steps; otherwise, execute the incentive pool detection step B;
[0009] Incentive generation and sending step: Generate a random incentive according to specific needs, store the generated random incentive in the incentive bin, and assign a weight; then send the generated random incentive, reduce the weight value in the corresponding incentive bin by 1, return to execute the incentive pool detection step A, and prepare for the next incentive sending;
[0010] Incentive pool detection step B: determine whether the incentive pool is full, if not, return to execute the incentive generation and sending steps, otherwise execute the incentive withdrawal and sending steps;
[0011] Incentive extraction and sending step: randomly extract incentives from the incentive bin according to the weight and send them out, and reduce the weight value in the corresponding incentive bin by 1, then return to execute the incentive pool detection step A to prepare for the next incentive sending.
[0012] In the existing chip verification process, the constructed stimulus is pushed into a queue for temporary storage when it is issued, and then taken out of the queue when the command is sent next time. This stimulus generation method can only construct a single merge scenario, and its practical application is limited. The stimulus method proposed in the present invention can quickly and conveniently construct multiple merge function verification scenarios through the stimulus pool, provide a more comprehensive verification scenario, and improve the reliability of verification.
[0013] As a preferred embodiment, the incentive extraction and sending steps of the present invention specifically include:
[0014] Put the ID numbers of each incentive bin in the incentive pool, whose number is equal to their respective weights, into a queue;
[0015] Call the shuffle function of the queue to disrupt the order, and then take out the first ID number from the head of the queue;
[0016] The incentive information stored in the incentive bin corresponding to the ID number of the queue head is extracted as the incentive issued.
[0017] As a preferred embodiment, after issuing the incentive and reducing the weight value in the corresponding incentive bin by 1, the present invention further includes:
[0018] If the weight value has been reduced to 0, the content of the corresponding incentive bin will be cleared.
[0019] As a preferred embodiment, the incentive method of the present invention further includes:
[0020] The weight value of the incentive in any incentive bin in the incentive pool is set to 1, and the corresponding incentive is used as an interference command to form a scenario in which interference commands are interspersed among multiple commands that can be merged.
[0021] As a preferred embodiment, the incentive method of the present invention further includes:
[0022] The number of instantiated incentive bins in the incentive pool is reduced, and the weight value of the incentive in each incentive bin is increased, so as to form a scenario in which a relatively large number of commands are merged in the gap time before formally accessing the memory.
[0023] As a preferred embodiment, the incentive method of the present invention further includes:
[0024] The number of instantiated incentive bins in the incentive pool is increased, and the weight value of the incentive in each incentive bin is reduced, so as to form a scenario in which the number of commands merged in the gap time before formally accessing the memory is relatively small.
[0025] As a preferred embodiment, the weights assigned by the present invention are generated randomly.
[0026] In a second aspect, the present invention proposes an incentive device for verifying a merge function, the incentive device comprising:
[0027] An initialization unit, the initialization unit is configured to execute: randomly instantiate the number of incentive bins in the incentive pool and drive the first detection unit to work; each of the incentive bins stores incentive-related information in the form of a class, including information about the incentive itself, a weight of the incentive that needs to be reused in subsequent packet issuance, and an ID number of the incentive; and the incentive pool is initially empty by default;
[0028] A first detection unit, wherein the first detection unit is configured to: determine whether the stimulus pool is empty, and if so, drive the stimulus generation unit to work, otherwise, drive the second detection unit to work;
[0029] An incentive generation unit, the incentive generation unit is configured to execute: generating a random incentive according to specific requirements, storing the generated random incentive in an incentive bin, assigning a weight, and then driving the incentive sending unit to work;
[0030] A second detection unit, the second detection unit is configured to execute: determining whether the stimulus pool is full, and if not, driving the stimulus generation unit to work, otherwise driving the stimulus extraction unit to work;
[0031] An incentive taking unit, the incentive taking unit being configured to perform: randomly taking out incentives from the incentive bin according to weights and driving the incentive sending unit to work;
[0032] and an excitation sending unit, wherein the excitation sending unit is configured to execute: sending an excitation, reducing the weight value in the corresponding excitation bin by 1, and then driving the first detection unit to work and prepare for the next excitation sending.
[0033] As a preferred embodiment, the stimulus sending unit of the present invention is further configured to execute:
[0034] If the weight value has been reduced to 0, the content in the corresponding incentive bin will be cleared.
[0035] In a third aspect, the present invention proposes a high-speed network chip verification system, wherein the verification system includes the excitation device described in the present invention.
[0036] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0037] 1. The incentive technology proposed in the present invention can quickly and conveniently construct various merge function verification scenarios by randomly instantiating the depth of the incentive pool and controlling the incentive weight. For example, it can construct not only the scenario of sending multiple incentives merged into one command, but also the scenario of inserting interference commands into multiple incentives merged into one command, and the scenario of sending multiple incentives merged into multiple commands in a mixed manner. It has extremely high flexibility and applicability.
[0038] 2. The present invention proposes an incentive technology, which can also indirectly control the number of commands merged in the gap time before formally accessing the memory by randomly controlling the depth of the incentive pool and the size of the weight value. For example, the number of commands merged can be reduced by increasing the depth of the incentive pool and reducing the weight value. The number of commands merged can also be increased by reducing the depth of the incentive pool and increasing the weight value, so as to improve the breadth and reliability of verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0040] Figure 1 The figure is a flow chart of the excitation method according to an embodiment of the present invention.
[0041] Figure 2 An example of an incentive pool structure exemplified by an embodiment of the present invention.
[0042] Figure 3It is a principle block diagram of the excitation device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0044] Example:
[0045] In the existing chip verification process, the constructed stimulus is pushed into a queue for temporary storage when it is issued, and then taken out from the queue when the command is sent next time. This stimulus generation method can only construct a single merge scenario, and its practical application is limited. In view of this, this embodiment proposes a stimulus method for verifying the merge function. The stimulus method proposed in this embodiment can quickly and conveniently construct a variety of merge function verification scenarios through a stimulus pool, provide a more comprehensive verification scenario, and improve the reliability of verification.
[0046] like Figure 1 As shown, the incentive method proposed in this embodiment specifically includes the following steps:
[0047] Step 1: Randomly instantiate the depth of the incentive pool. The depth of the incentive pool is the number of incentive stores in the incentive pool. Each incentive store stores detailed information of the incentive in the form of a class, including the information of the incentive itself (Message), the weight of the incentive that needs to be reused in subsequent package issuance (Weight), and the ID number of the incentive (used to distinguish different incentive information). The incentive pool is initially empty by default. Figure 2 The incentive pool structure shown in the figure can instantiate three incentive stores, whose IDs are 1, 2, and 3 respectively; the incentive weight in the incentive store with ID 1 is n1, and the incentive information is info1; the incentive weight in the incentive store with ID 2 is n2, and the incentive information is info2; the incentive weight in the incentive store with ID 3 is n3, and the incentive information is info3. It should be noted that Figure 2 This is only an exemplary description and does not limit the structure of the incentive pool.
[0048] Step 2, determine whether the incentive pool is empty, if it is empty, proceed to step 3, otherwise proceed to step 4.
[0049] Step 3: Generate a random incentive according to specific needs, store the generated random incentive in the incentive bin, and assign a weight. Then send the generated random incentive, reduce the weight value in the corresponding incentive bin by 1, return to step 2, and prepare for the next incentive to be sent. The assigned weight is generated randomly.
[0050] Step 4, determine whether the incentive pool is full. If not, return to step 3, otherwise, go to step 5.
[0051] Step 5: Randomly take out incentives from the incentive bin according to the weight and send them out, and reduce the weight value in the corresponding incentive bin by 1, and return to execute step 2 to prepare for the next incentive sending.
[0052] The incentive method proposed in this embodiment can form a variety of scenarios for verifying the merge function through a randomly instantiated incentive pool and combining the incentive weight. For example, if the depth of the incentive pool is 1, that is, the number of incentive bins instantiated in the incentive pool is 1, a single merge chain can be constructed, and the number of commands on the merge chain is determined by the incentive weight setting; if the depth of the incentive pool is an integer greater than 1, that is, the number of incentive bins instantiated in the incentive pool is an integer greater than 1, multiple merge chains can be constructed. The incentive method proposed in this embodiment can construct a more comprehensive verification scenario more quickly and conveniently, and improve the reliability of verification.
[0053] Furthermore, after issuing the incentive and reducing the weight value in the corresponding incentive bin by 1, the method further includes: if the weight value has been reduced to 0, clearing the content of the incentive bin.
[0054] Furthermore, the step of randomly taking out incentives from the incentive bin according to the weight specifically includes:
[0055] Put the ID numbers of each incentive bin in the incentive pool equal to their respective weights into a queue;
[0056] Call the queue function shuffle to disrupt the order, and then take the first ID number from the head of the queue;
[0057] Extract the incentive information stored in the incentive bin corresponding to the ID number taken out. Figure 2 Taking the incentive pool shown as an example, if there are only three incentive bins in the incentive pool, according to the above-mentioned withdrawal method, there are n1 1s, n2 2s, and n3 3s in the queue. After random shuffling, if 1 is taken out, info1 is selected as the incentive information and sent out.
[0058] Furthermore, the excitation method proposed in this embodiment sets the weight of the excitation in any excitation bin in the excitation pool to 1, and the excitation is an interference command. For example, two excitation bins are instantiated in the excitation pool, and the weight of the excitation in one excitation bin is 10, and the weight of the excitation in the other excitation bin is 1. Then, in the excitation process, the excitation with a weight of 1 is an interference command, that is, a scenario is constructed in which other interference commands are interspersed in sending multiple stimuli that can be merged, so as to verify whether the DUT can identify the function of the interference command, thereby improving the diversity and reliability of verification.
[0059] Furthermore, in a normal merge access, a gap period is required from receiving a command to formally accessing the memory. During this period, the commands that can be merged will be hung on a merge chain. Commands that exceed this period, even if they have the same message as members on the merge chain, will not be hung on this chain, but will start a new chain. Based on this, the incentive method proposed in this embodiment can also indirectly control the number of incentives that can be merged during this gap period by randomly controlling the number of incentive bins in the incentive pool and the weight of the incentive. Including: (1) If you want to control the number of commands that can be merged during the gap period before formally accessing the memory (RAM), you can reduce the number of instantiated incentive bins and increase the weight value of the incentive of each incentive bin. For example, if you instantiate an incentive bin and set the weight value of the incentive of the incentive bin to 10, the number of commands that can be merged during the gap period before formally accessing the memory can be as high as 10. That is, only one incentive bin is set, and the probability of being randomly selected is 100%. (2) If the number of commands merged into the control in the gap time before formally accessing the memory (RAM) is small, the number of instantiated excitation bins can be increased and the excitation weight value of each excitation bin can be reduced. For example, if three excitation bins are instantiated, the excitation weight values of the excitation bins are set to 2, 4, 5, etc. In this way, there are many excitation bins and small weight values, and the probability of being random is much smaller, so the number of commands merged is small.
[0060] The incentive method proposed in this embodiment is extremely flexible and applicable. By randomly controlling the number of incentive bins and the size of weight values, a variety of scenarios for verifying the merge function can be formed, thereby improving the breadth and reliability of verification.
[0061] Based on the same technical field as above, this embodiment also proposes an incentive device for verifying the merge function, such as Figure 3 As shown, the excitation device of this embodiment includes:
[0062] An initialization unit is configured to execute the following commands: randomly instantiate the depth of the incentive pool and drive the first detection unit to work. The depth of the incentive pool is the number of incentive bins (incentive stores) in the incentive pool. Each incentive bin stores detailed incentive information in the form of a class, including the information of the incentive itself (Message), the weight of the incentive that needs to be reused in subsequent packet issuance (Weight), and the ID number of the incentive bin (used to distinguish different incentive information); and the incentive pool is initially empty by default.
[0063] The first detection unit is configured to execute the following command: determine whether the excitation pool is empty, if it is empty, drive the excitation generation unit to work, otherwise drive the second detection unit to work.
[0064] The incentive generation unit is configured to execute the following commands: generate a random incentive according to specific needs, store the generated random incentive in the incentive bin, assign a weight, and then drive the incentive sending unit to work; the assigned weight is randomly generated.
[0065] The second detection unit is configured to execute the following command: determine whether the excitation pool is full, if not, drive the excitation generation unit to work, otherwise drive the excitation extraction unit to work.
[0066] The incentive extraction unit is configured to execute the following command: randomly extract incentives from the incentive bin according to the weight and drive the incentive sending unit to work.
[0067] And an excitation sending unit, which is configured to execute the following command: send out an excitation, reduce the weight value in the corresponding excitation bin by 1, and drive the first detection unit to work and prepare for the next excitation sending.
[0068] Furthermore, the stimulus sending unit is further configured to execute the following command:
[0069] If the weight value has been reduced to 0, the content of the incentive bin will be cleared.
[0070] This embodiment also proposes a high-speed network chip verification system, which uses the above-mentioned stimulus device to provide a stimulus for verifying a merge function for a DUT (Design under Test).
[0071] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0072] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0073] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0074] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0075] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An incentive method for verifying a merge function, characterized in that: The incentive method includes: Initialization step: randomly instantiate the number of incentive bins in the incentive pool, each of which stores incentive-related information in the form of a class, including the information of the incentive itself, the weight of the incentive that needs to be reused in subsequent package issuance, and the ID number of the incentive; and the incentive pool is initially empty by default; Incentive pool detection step A: determine whether the incentive pool is empty. If it is empty, execute the incentive generation and sending steps; otherwise, execute the incentive pool detection step B; Incentive generation and sending step: Generate a random incentive according to specific needs, store the generated random incentive in the incentive bin, and assign a weight; then send the generated random incentive, reduce the weight value in the corresponding incentive bin by 1, return to execute the incentive pool detection step A, and prepare for the next incentive sending; Incentive pool detection step B: determine whether the incentive pool is full, if not, return to execute the incentive generation and sending steps, otherwise execute the incentive withdrawal and sending steps; Incentive extraction and sending step: randomly extract incentives from the incentive bin according to the weight and send them out, and reduce the weight value in the corresponding incentive bin by 1, then return to execute the incentive pool detection step A, and prepare for the next incentive sending; the incentive extraction and sending step specifically includes: Put the ID number in each incentive bin in the incentive pool into a queue, and the number of each ID number put into the queue is its corresponding weight; Call the shuffle function of the queue to disrupt the order, and then take out the first ID number from the head of the queue; Extracting the incentive information stored in the incentive bin corresponding to the ID number of the queue head as the incentive to be issued; The incentive method further comprises: The number of instantiated incentive bins in the incentive pool is reduced, and the weight value of the incentive in each incentive bin is increased, so as to form a scenario in which a relatively large number of commands are merged in the gap time before formally accessing the memory; or, The incentive method further comprises: The number of instantiated incentive bins in the incentive pool is increased, and the weight value of the incentive in each incentive bin is reduced, so as to form a scenario in which the number of commands merged in the gap time before formally accessing the memory is relatively small.
2. The method for verifying the merge function according to claim 1, characterized in that: After the incentive is issued and the weight value in the corresponding incentive bin is reduced by 1, the following steps are also included: If the weight value has been reduced to 0, the content of the corresponding incentive bin will be cleared.
3. The incentive method for verifying the merge function according to claim 1, characterized in that: The incentive method further comprises: The weight value of the incentive in any incentive bin in the incentive pool is set to 1, and the corresponding incentive is used as an interference command to form a scenario in which interference commands are interspersed among multiple commands that can be merged.
4. An incentive method for verifying a merge function according to any one of claims 1 to 3, characterized in that: The assigned weights are generated randomly.
5. An incentive device for verifying a merge function, characterized in that: The excitation device comprises: An initialization unit, the initialization unit is configured to execute: randomly instantiate the number of incentive bins in the incentive pool and drive the first detection unit to work; each of the incentive bins stores incentive-related information in the form of a class, including information about the incentive itself, a weight of the incentive that needs to be reused in subsequent packet issuance, and an ID number of the incentive; and the incentive pool is initially empty by default; A first detection unit, wherein the first detection unit is configured to: determine whether the stimulus pool is empty, and if so, drive the stimulus generation unit to work, otherwise, drive the second detection unit to work; An incentive generation unit, the incentive generation unit is configured to execute: generating a random incentive according to specific requirements, storing the generated random incentive in an incentive bin, assigning a weight, and then driving the incentive sending unit to work; A second detection unit, the second detection unit is configured to execute: determining whether the stimulus pool is full, and if not, driving the stimulus generation unit to work, otherwise driving the stimulus extraction unit to work; An incentive taking unit, the incentive taking unit being configured to perform: randomly taking out incentives from the incentive bin according to weights and driving the incentive sending unit to work; and an excitation sending unit, the excitation sending unit being configured to execute: sending an excitation, reducing the weight value in the corresponding excitation bin by 1, and then driving the first detection unit to work and prepare for the next excitation sending; The stimulus extraction unit is specifically configured to execute: Put the ID number in each incentive bin in the incentive pool into a queue, and the number of each ID number put into the queue is its corresponding weight; Call the shuffle function of the queue to disrupt the order, and then take out the first ID number from the head of the queue; Extracting the incentive information stored in the incentive bin corresponding to the ID number of the queue head as the incentive to be issued; The initialization unit is further configured to: The number of instantiated incentive bins in the incentive pool is reduced, and the weight value of the incentive in each incentive bin is increased, so as to form a scenario in which a relatively large number of commands are merged in the gap time before formally accessing the memory; or, The number of instantiated incentive bins in the incentive pool is increased, and the weight value of the incentive in each incentive bin is reduced, so as to form a scenario in which the number of commands merged in the gap time before formally accessing the memory is relatively small.
6. The incentive device for verifying the merge function according to claim 5, characterized in that: The stimulus sending unit is further configured to execute: If the weight value has been reduced to 0, the content in the corresponding incentive bin will be cleared.
7. A high-speed network chip verification system, characterized in that: The verification system comprises the incentive device according to claim 5 or 6.
