Two-dimensional sequence construction method and system

By defining self-contained two-dimensional transactions and randomly generated one-dimensional transactions in UVM verification methodology and constructing two-dimensional sequences, the problem of poor accessibility between UVM transactions is solved, and the reusability and integration of UVM transactions is improved.

CN119201365BActive Publication Date: 2025-05-02PENG TI STORAGE TECH (NANJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411699406.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-05-02
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

In UVM verification methodology, the prior art is difficult to effectively solve the problem of poor accessibility between UVM transactions, resulting in the dispersion of interrelated UVM transactions and difficulty in centralized reuse.

Method used

By defining the self-contained two-dimensional transaction j_seq_item at the uvm_sequence_item level, randomly generating the number of two-dimensional transactions and the number of one-dimensional transactions, constructing a two-dimensional sequence, using random constraints to access the variables of each transaction, and achieving the association of each sequence.

Benefits of technology

It improves the reusability and integration of UVM transactions, making the sequence_item more usable and can more effectively develop UVM complex sequences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201365B_ABST
    Figure CN119201365B_ABST
Patent Text Reader

Abstract

The invention discloses a two-dimensional sequence construction method and a system thereof, belonging to the technical field of UVM sequence development, comprising: defining a self-contained two-dimensional transaction at the uvm_sequence_item level; defining the type of a two-dimensional transaction member variable as j_seq_item; randomly generating the number of two-dimensional transactions and creating a two-dimensional transaction array according to the number of two-dimensional transactions; randomly generating the number of one-dimensional transactions in each two-dimensional transaction array, randomly generating a one-dimensional transaction type array according to the number of one-dimensional transactions, and randomly generating a one-dimensional transaction instantiation array according to the one-dimensional transaction type array; after traversing the two-dimensional transaction array, obtaining a one-dimensional transaction instantiation array, the two-dimensional sequence construction method and the system thereof can use random constraints to access the variables of each transaction, thereby achieving the association of each sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of UVM sequence development, and in particular relates to a two-dimensional sequence construction method and a system thereof. Background Art

[0002] In UVM verification methodology, a single UVM transaction (uvm_sequence_item) is mainly implemented by defining and adopting random constraints. If you want to implement a UVM sequence (UVM sequence), you usually integrate several UVM sequences into a UVM sequence library (uvm_sequence_library). This method of connecting several UVM sequences in series makes the correlation of each UVM transaction (uvm_sequence_item) itself very poor, which brings a lot of inconvenience to random constraints. For example, each UVM sequence must meet a specific address pattern or operation type. The existing method usually satisfies this correlation by constraining each UVM transaction (uvm_sequence_item) separately. This makes these interrelated UVM transactions (uvm_sequence_item) very scattered, making it inconvenient to centrally and effectively reuse them.

[0003] like Figure 8 As shown, the concatenation of UVM sequences (uvm_sequence) to form a UVM sequence library (uvm_sequence_library) is currently a more common method, such as Figure 6 , Figure 7 The implementation based on UVM sequence shown makes the sequences relatively independent, which determines that the transactions corresponding to each sequence are also random and independent; it makes the accessibility between UVM transactions (uvm_sequence_item) poor. Therefore, it is necessary to develop a new two-dimensional sequence construction method and system to solve the existing problems. Summary of the invention

[0004] The object of the present invention is to provide a two-dimensional sequence construction method and system thereof to solve the problem of poor accessibility between UVM transactions.

[0005] To achieve the above object, the present invention provides the following technical solution: a two-dimensional sequence construction method,

[0006] Define a self-contained two-dimensional transaction j_seq_item at the uvm_sequence_item level; define the type of the two-dimensional transaction member variable as j_seq_item;

[0007] Randomly generate the number of two-dimensional transactions j_items_sz and create a two-dimensional transaction array j_items according to the number of two-dimensional transactions j_items_sz;

[0008] Randomly generate the number of one-dimensional transactions b_items_sz in each two-dimensional transaction array j_items, randomly generate a one-dimensional transaction type array b_items_seq_typ[] based on the number of one-dimensional transactions b_items_sz, and randomly generate a one-dimensional transaction instantiation array b_items based on the one-dimensional transaction type array b_items_seq_typ[];

[0009] After traversing the two-dimensional transaction array j_items, we get the one-dimensional transaction instantiation array b_items[];

[0010] Among them, j_items_sz represents the number of two-dimensional transactions j_seq_item, j_items[] is an instantiation array of two-dimensional transactions of type j_seq_item in the class, b_items_sz represents the number of one-dimensional transactions b_seq_item in each two-dimensional transaction, b_items_seq_typ[] is a one-dimensional transaction of type b_seq_item in the one-dimensional transaction type array of the two-dimensional transaction j_seq_item class; b_items is an instantiation array of one-dimensional transactions in a two-dimensional transaction of type b_seq_item.

[0011] Preferably, the randomization of the two-dimensional transaction j_seq_item includes: j_seq_item is the type name of the two-dimensional transaction. In SystemVerilog, as long as the member of each class defines the attribute rand, it can call randomize() for randomization. Therefore, there is no need to distinguish between the randomization type name and the transaction type name. Specifically, a two-dimensional transaction becomes a randomized two-dimensional transaction after calling the random function randomize().

[0012] Define a two-dimensional transaction j_seq_item, including the number of two-dimensional transactions j_items_sz and the two-dimensional transaction array j_items of this type;

[0013] Define the one-dimensional transaction instance array b_items[] of the one-dimensional transaction b_seq_item type and the size b_items_sz of the one-dimensional transaction instance array b_items[]. Define the M dimension of the two-dimensional sequence by the number of two-dimensional transactions j_items_sz, and define the N dimension of the two-dimensional sequence by the number of one-dimensional transactions b_items_sz. The abbreviation of base_seq_item is b_seq_item, which corresponds to the type of one-dimensional transaction.

[0014] According to the number of two-dimensional transactions j_items_sz, M two-dimensional transactions j_seq_item with the number of two-dimensional transactions j_items_sz are randomly generated and stored in the two-dimensional transaction array j_items array;

[0015] Traverse the two-dimensional transaction array j_items array, and store the one-dimensional transaction base_seq_item of the random N one-dimensional transactions b_items_sz corresponding to the number of one-dimensional transactions b_items_sz in the one-dimensional transaction instance array b_items, thereby completing the random production of M * N two-dimensional transactions.

[0016] Preferably, the method for transitioning the two-dimensional transaction j_seq_item to the one-dimensional transaction b_seq_item includes: after the two-dimensional transaction j_seq_item is completed randomly, the two-dimensional sequence uses the M dimension in the two-dimensional transaction array j_items[] and the N dimension in the one-dimensional transaction array b_items[], and the corresponding base_seq_item is sent to the one-dimensional sequencer and then sent to the driver through the port of the one-dimensional sequencer.

[0017] Preferably, the two-dimensional sequence constructed by the two-dimensional transaction runs in a one-dimensional sequence generator.

[0018] The present invention further provides a two-dimensional sequence construction system, comprising:

[0019] 2D transaction definition module, used to define self-contained 2D transactions at the uvm_sequence_item level;

[0020] The member variable definition module is used to define the type of the two-dimensional transaction member variables of the j_seq_item class;

[0021] A creation module is used to randomly generate the number of two-dimensional transactions and create a two-dimensional transaction array according to the number of two-dimensional transactions;

[0022] A random module is used to randomly generate the number of one-dimensional transactions in each two-dimensional transaction array, randomly generate a one-dimensional transaction type array according to the number of one-dimensional transactions, and randomly generate a one-dimensional transaction instantiation array according to the one-dimensional transaction type array;

[0023] The traversal module is used to traverse the two-dimensional transaction array and obtain a one-dimensional transaction instantiation array.

[0024] The technical effects and advantages of the present invention are as follows: the two-dimensional sequence construction method and the system thereof define a self-contained two-dimensional transaction 2D sequence_item at the uvm_sequence_item level, can use random constraints to access variables of each transaction, thereby achieving the association of each sequence, and the user can apply factoryoverride to each uvm_object at the testcase layer; the array of the self-class and the array of the other class are defined in the class declaration, so that the association of each self-class and the other class can be in the definition of the same class, so that the usability of sequence_item is stronger, and it is applied to the development of UVM complex sequences and can improve the reusability and integration of UVM transactions. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic diagram of the connection between the two-dimensional sequence of the present invention and the transaction driver in the top layer of the test;

[0026] Figure 2 It is a schematic diagram of the random flow of two-dimensional sequence of the present invention;

[0027] Figure 3 This is a schematic diagram of the association between the one-dimensional transaction bitem[j+2:j] and the two-dimensional transaction j_items[i] of the present invention;

[0028] Figure 4 The structure and random schematic diagram of the two-dimensional sequence of the present invention;

[0029] Figure 5 A schematic diagram of converting a two-dimensional sequence into a one-dimensional sequence according to the present invention;

[0030] Figure 6 It is a schematic diagram of a one-dimensional sequence in the prior art;

[0031] Figure 7 It is a random schematic diagram of a one-dimensional sequence in the prior art;

[0032] Figure 8 It is a schematic diagram of UVM sequence library in the prior art;

[0033] Fig. 9 The two-dimensional sequence factory of the present invention is covered;

[0034] Fig.10 The two-dimensional sequence factory of the present invention covers and reuses the one-dimensional sequencer. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] The present invention provides Figure 1 , Figure 2 , Figure 3 , Figure 5 A two-dimensional sequence construction method is shown in which a two-dimensional sequence is constructed using two-dimensional transactions and runs in a one-dimensional sequence generator.

[0037] like Figure 4 As shown, a self-contained two-dimensional transaction j_seq_item is defined at the uvm_sequence_item level; the type of the two-dimensional transaction member variable is defined as j_seq_item;

[0038] Randomly generate the number of two-dimensional transactions j_items_sz and create a two-dimensional transaction array j_items according to the number of two-dimensional transactions j_items_sz;

[0039] Randomly generate the number b_items_sz of one-dimensional transactions in each two-dimensional transaction array j_items, randomly generate a one-dimensional transaction type array b_items_seq_typ[] based on the number b_items_sz of one-dimensional transactions, and randomly generate a one-dimensional transaction instantiation array b_items based on the one-dimensional transaction type array b_items_seq_typ[]. Randomly generate a one-dimensional transaction type array based on b_item_sz, each element in this array corresponds to the label of each transaction in the one-dimensional transaction to be constructed, and this label is indicated by b_items_seq_typ[i].

[0040] After traversing the two-dimensional transaction array j_items, we get the one-dimensional transaction instantiation array b_items[]. After traversing the two-dimensional transaction array, each two-dimensional transaction corresponds to a one-dimensional transaction instantiation array, so the instance of this two-dimensional transaction finally contains j_item_sz b_items[]. This corresponds to M*N.

[0041] Among them, j_items_sz represents the number of two-dimensional transactions j_seq_item, j_items[] is a two-dimensional transaction, its type is j_seq_item, and it is an instantiation array in the class. b_items_sz represents the number of one-dimensional transactions b_seq_item in each two-dimensional transaction, b_items_seq_typ[] is a one-dimensional transaction, its type is b_seq_item, and it is an array of one-dimensional transaction types in the two-dimensional transaction class; b_items is an instantiation array of one-dimensional transactions in a two-dimensional transaction, and its type is b_seq_item.

[0042] Self-contained means that the class itself is included in the members of the defined class, which is the difference between a class and a set. In addition, only true classes do not allow members to contain other classes. You can refer to Russell's paradox for more information about sets.

[0043] like Figure 2 As shown, the randomization of the two-dimensional transaction j_seq_item includes: j_seq_item is the type name of the two-dimensional transaction. In SystemVerilog, as long as the member of each class defines the rand attribute, it can call randomize() for randomization. Therefore, there is no need to distinguish between the randomization type name and the transaction type name. Specifically, a two-dimensional transaction becomes a randomized two-dimensional transaction after calling the random function randomize().

[0044] Define a two-dimensional transaction j_seq_item, including the number of two-dimensional transactions j_items_sz and the two-dimensional transaction array j_items of this type;

[0045] Define the one-dimensional transaction instance array b_items[] of the one-dimensional transaction b_seq_item type and the size b_items_sz of the one-dimensional transaction instance array b_items[]. Define the M dimension of the two-dimensional sequence through the number of two-dimensional transactions j_items_sz, and define the N dimension of the two-dimensional sequence through the number of one-dimensional transactions b_items_sz. b_seq_item is abbreviated as base_seq_item, which corresponds to the type of one-dimensional transaction.

[0046] According to the number of two-dimensional transactions j_items_sz, Mj_items_sz two-dimensional transactions j_seq_item are randomly generated and stored in the two-dimensional transaction array j_items;

[0047] Traverse the two-dimensional transaction array j_items, and store the random Nb_items_sz one-dimensional transactions base_seq_item corresponding to each two-dimensional transaction array j_item in the one-dimensional transaction instance array b_items according to the number of one-dimensional transactions b_items_sz, thereby completing the random production of M * N two-dimensional transactions.

[0048] The method for transitioning the two-dimensional transaction j_seq_item to the one-dimensional transaction b_seq_item includes: after the two-dimensional transaction j_seq_item is completed randomly, the two-dimensional sequence 2D sequence uses the M dimension in the two-dimensional transaction array j_items[] and the N dimension in the one-dimensional transaction array b_items[], and the corresponding base_seq_item is sent to the one-dimensional sequencer and then sent to the driver through the port of the one-dimensional sequencer.

[0049] After j_seq_item is randomized, first define j_seq_item sequence, then define corresponding base_seq_item sequence according to b_items, and finally let base sequence use each b_items to send base_seq_item to sequencer, transaction driver. Since j_seq_item completes the randomization of b_seq_item, this can make the translation logic of j_sequence to b_sequence very direct, realize the two-dimensional randomization (M dimension) of self-contained two-dimensional transaction j_seq_item, and transition to the randomization (N dimension) of one-dimensional transaction b_seq_item through recursive method, and then send it through the one-dimensional sequencer.

[0050] In addition, at the test case level, users can use UVM factories to perform factory type overrides on the two-dimensional transaction type j_seq_item and the one-dimensional transaction type b_seq_item to implement new two-dimensional sequences. Fig. 9 As shown in the figure, by expanding the two-dimensional transaction type, the size of the two-dimensional sequence is changed from M*N to X*Y; at the same time, the one-dimensional transaction type is expanded, and the one-dimensional transaction is changed from the corresponding type to a new one-dimensional transaction type, and finally the reconstruction of the entire two-dimensional sequence is realized. Fig.10 As shown, the new two-dimensional sequence after factory overlay can still send transactions to the monitor through the previous one-dimensional sequencer.

[0051] This embodiment is typically applied to the case of combined sequences, such as erase-prog-readsequence_item and program, erase, suspend, resume sequence_item.

[0052] At the same time, the two-dimensional sequence needs to be converted into a corresponding one-dimensional sequence set. Since the two-dimensional transaction j_seq_item can be extended from the one-dimensional transaction base_seq_item, the two-dimensional sequencer j_sequencer can reuse the one-dimensional sequencer b_sequencer.

[0053] The present invention further provides a two-dimensional sequence construction system, comprising:

[0054] A self-contained two-dimensional transaction definition module for defining self-contained two-dimensional transactions at the uvm_sequence_item level;

[0055] The member variable definition module is used to define the type of the two-dimensional transaction member variables of the j_seq_item class;

[0056] A creation module is used to randomly generate the number of two-dimensional transactions and create a two-dimensional transaction array according to the number of two-dimensional transactions;

[0057] A random module is used to randomly generate the number of one-dimensional transactions in each two-dimensional transaction array, randomly generate a one-dimensional transaction type array according to the number of one-dimensional transactions, and randomly generate a one-dimensional transaction instantiation array according to the one-dimensional transaction type array;

[0058] The traversal module is used to traverse the two-dimensional transaction array and obtain a one-dimensional transaction instantiation array.

[0059] The two-dimensional sequence construction method and system thereof define a self-contained two-dimensional transaction 2D sequence_item at the uvm_sequence_item level, can use random constraints to access variables of each transaction, so as to achieve the association of each sequence, and the user can apply factory override to each uvm_object at the testcase layer; adopt the method of defining the array of the self-class and the array of the other class in the class declaration, so that the association of the other class of each self-class can be in the definition of the same class, so that the usability of sequence_item is stronger, and it is applied to the development of UVM complex sequences and can improve the reusability and integration of UVM transactions.

[0060] Chinese-English comparison table in this application:

[0061] sequence_item: transaction;

[0062] randomize: random;

[0063] 1D sequence: one-dimensional sequence;

[0064] 2D sequence: two-dimensional sequence;

[0065] Sequencer: sequence generator;

[0066] UVM factory: UVM factory;

[0067] UVM factory type override: UVM factory type override;

[0068] Driver: transaction driver;

[0069] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A two-dimensional sequence construction method, characterized in that: include: Define a self-contained two-dimensional transaction at the uvm_sequence_item level; Define the type of the two-dimensional transaction member variable as j_seq_item; Randomly generate the number of two-dimensional transactions and create a two-dimensional transaction array according to the number of two-dimensional transactions; Randomly generate the number of one-dimensional transactions in each two-dimensional transaction array, randomly generate a one-dimensional transaction type array according to the number of one-dimensional transactions, and randomly generate a one-dimensional transaction instantiation array according to the one-dimensional transaction type array; After traversing the two-dimensional transaction array, a one-dimensional transaction instantiation array is obtained; The randomization of the two-dimensional transaction includes: Define a two-dimensional transaction, including the number of two-dimensional transactions and an array of two-dimensional transactions of this type; Define the size of the one-dimensional transaction type array and the one-dimensional transaction instance array; define the M dimension of the two-dimensional sequence by the number of two-dimensional transactions, and define the N dimension of the two-dimensional sequence by the number of one-dimensional transactions; According to the number of two-dimensional transactions, M two-dimensional transactions are randomly generated and stored in the two-dimensional transaction array; Traversing the two-dimensional transaction array, each two-dimensional transaction array stores random N one-dimensional transactions corresponding to the number of one-dimensional transactions in the one-dimensional transaction instance array, thereby completing the random production of M*N two-dimensional transactions; the method for transitioning from two-dimensional transactions to one-dimensional transactions includes: after the two-dimensional transaction is completed randomly, the two-dimensional sequence uses M dimensions in the two-dimensional transaction array and N dimensions in the one-dimensional transaction array, and the corresponding one-dimensional transaction is sent to the one-dimensional sequencer, and then sent to the driver through the port of the one-dimensional sequencer; the two-dimensional sequence constructed by the two-dimensional transaction runs in the one-dimensional sequence generator.

2. A system for implementing the two-dimensional sequence construction method according to claim 1, characterized in that: The system comprises: 2D transaction definition module, used to define self-contained 2D transactions at the uvm_sequence_item level; The member variable definition module is used to define the type of the two-dimensional transaction member variables of the j_seq_item class; A creation module is used to randomly generate the number of two-dimensional transactions and create a two-dimensional transaction array according to the number of two-dimensional transactions; A random module is used to randomly generate the number of one-dimensional transactions in each two-dimensional transaction array, randomly generate a one-dimensional transaction type array according to the number of one-dimensional transactions, and randomly generate a one-dimensional transaction instantiation array according to the one-dimensional transaction type array; The traversal module is used to traverse the two-dimensional transaction array and obtain a one-dimensional transaction instantiation array.

Citation Information

Patent Citations

  • Multi-dimensional register generation method and system based on UVM register model

    CN117519793A

  • Horizontal multiplexing platform based on UVM and construction method thereof

    CN118054933A