Implementation Method of Verification Model for Indirect Register Access
By creating indexers, indexers and linkers in the UVM verification platform and configuring front door access sequences, a flexible register indirect access verification model is implemented, solving the limitation that indexers and indexers must be register types in the prior art. , improves development efficiency and applicability.
Patent Information
- Application Number
- CN202210418195.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-21
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-04-21
AI Technical Summary
When implementing indirect register access, the indexer and the indexed person must be a register type, which cannot meet the actual chip project's indexer and the indexer may be a register domain segment, multiple register domain segment combinations or direct lines. The situation in the network leads to verification developers need to remodel, and there is repetitive work.
Create indexers, indexed, indexed linkers and indexed linkers in the UVM verification platform, implement indexed and indexed mappings through abstract classes and derived classes, encapsulate indexed linkers and indexed linkers, and configure front door access sequences to achieve indirect access to registers.
It provides a flexible register indirect access verification model, avoiding the limitation that indexer and indexed must be register type, improves the development efficiency of verification developers, and is suitable for various complex register access scenarios.
Smart Images

Figure CN114707449B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital chip design, and in particular to a verification model implementation method for register indirect access. Background Art
[0002] In digital chip design, it is often necessary to implement the logic of register indirect access. We can abstract its working principle and process, such as Figure 1 As shown, the indexer is used to provide the index position (index); the indexed unit is the indexed storage unit found according to the index position provided by the indexer. The coordinator is the so-called indirect access register, which is used to coordinate the work of the above two, that is, to read and write the coordinator, and then the coordinator will eventually read and write the indexed storage unit; first, we set the index position provided by the indexer to identify the position of the indexed unit, and then initiate the read and write operation on the coordinator, which is equivalent to indirectly completing the read and write access operation of the final indexed unit through the previously set position index.
[0003] Usually we build a verification platform based on UVM (Universal Verification Methodology), which provides some class library files of register models for verification developers to model the registers in DUT (Device Under Test). For this kind of indirect access to registers, UVM specifically provides the register class uvm_reg_indirect_data as a coordinator for verification developers to use for modeling, but the indexer and the indexed must both be register types. Verification personnel derive the register uvm_reg_indirect_data to create a coordinator, and then call its configure configuration method to set the indexer (register idx) and the indexed (register array reg_a) that need to be coordinated, write to register idx to set the index value, and read and write register uvm_reg_indirect_data to finally use the value of register idx as an index to read and write a target unit register in the indexed register array reg_a.
[0004] The existing solution provided by the above-mentioned UVM is generally feasible, but there is a limitation, that is, the indexer and the indexee must both be data types of registers. In other words, UVM does not provide users with a flexible implementation method for indirect register access, that is, the user defines what to use as the indexer and what to use as the indexee, and the scenarios of such indirect access in actual chip projects are ever-changing. The indexer and the indexee are often not necessarily a certain register. It may be a certain domain segment in the register, or a combination of multiple register domain segments, or it may be storage, or even a direct wire network. At this time, the existing solution is no longer feasible, which leads to the verification developer needing to re-model and implement this indirect register access behavior, which is repetitive work. Summary of the invention
[0005] According to an embodiment of the present invention, a verification model implementation method for register indirect access is provided, comprising the following steps:
[0006] Build a UVM verification platform, model the registers of the UVM verification platform, and obtain the register model;
[0007] Create an indexer and an indexee in the UVM verification platform. The indexer obtains the index position, and the indexee obtains the indexed storage unit.
[0008] Create an index linker in the UVM verification platform to map the index to specific hardware;
[0009] Create an indexed linker in the UVM verification platform to map the indexed linker to specific hardware;
[0010] Create a coordinator in the UVM verification platform to encapsulate the index linker and the indexed linker;
[0011] Create a front door access sequence in the UVM verification platform, and create a configuration method configure and a sequence execution task body in the front door access sequence to complete the conversion of the indirect access process to the register;
[0012] The register model performs read and write operations on indexers and coordinators to achieve indirect access to registers.
[0013] Furthermore, the coordinator is derived from the register class uvm_reg.
[0014] Furthermore, an index linker is created in the UVM verification platform to map the index to specific hardware, including the following sub-steps:
[0015] Create a parameterized abstract class index_worker in the UVM verification platform and create a get_index method and a set_index method in the abstract class index_worker. The get_index method is used to obtain the index value, and the set_index method is used to set the index value.
[0016] Inherit the abstract class index_worker and derive the abstract class index_worker to obtain the derived subclass my_index_worker;
[0017] Define the variable type of the specific hardware;
[0018] Create a set method to map the index to specific hardware, and implement the get_index method and the set_index method.
[0019] Furthermore, the data type of the index value of the abstract class index_worker defaults to an unsigned integer.
[0020] Further, creating an indexed linker in the UVM verification platform for mapping the indexed linker to specific hardware includes the following sub-steps:
[0021] Create a parameterized abstract class indexed_worker in the UVM verification platform;
[0022] Declare the indexed storage unit as an index queue, and create the get_object_entry method and the get_index_of_entry method in the index queue. The get_object_entry method is used to obtain the target indexed storage unit, and the get_index_of_entry method is used to obtain the index queue position of the storage unit.
[0023] Inherit and derive the abstract class indexed_worker to obtain the derived subclass my_indexed_worker;
[0024] Create a set method to map the index storage unit to specific hardware, and implement the get_object_entry method and the get_index_of_entry method.
[0025] Furthermore, the data type of the index value of the abstract class indexed_worker is unsigned integer by default, the data type of the indexed object of the abstract class indexed_worker is the default register type, and the subclasses of the abstract class indexed_worker can be set to other data types by passing in different parameters.
[0026] Further, the frontdoor access sequence is derived from the parent class uvm_reg_frontdoor, which is used to provide custom frontdoor access to registers and storage.
[0027] Furthermore, the register model performs read and write operations on the indexer and coordinator to achieve indirect access to the register, including the following sub-steps:
[0028] Declare and instantiate the index linker, indexed linker, indexer, indexed, coordinator and front door access sequence;
[0029] Call the index linker set method to set the index;
[0030] Call the set method of the indexed linker to set the indexed storage unit;
[0031] Call the coordinator, indirectly access the register's set_index_worker method and set_indexed_worker method, set the index linker and the indexed linker;
[0032] Traverse the storage units of the indexed one, and call the configuration method configure and the set_frontdoor method of the UVM verification platform to configure the front door access sequence to complete the sequence conversion of the register indirect access process.
[0033] The verification model implementation method for indirect access to registers according to an embodiment of the present invention avoids the application scenario limitation of indirect access to registers in the prior art, namely, the limitation that the indexer and the indexed must be of register type, and provides a verification model implementation method for indirect access to registers, which is convenient for verification developers to refer to for development and improves the development efficiency of verification personnel.
[0034] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a structural schematic diagram of the prior art;
[0036] Figure 2 A schematic diagram of the structure of a verification model implementation method for register indirect access according to an embodiment of the present invention;
[0037] Figure 3 A schematic diagram of a verification model implementation method for register indirect access according to an embodiment of the present invention;
[0038] Figure 4A flowchart of the steps of a verification model implementation method for register indirect access according to an embodiment of the present invention;
[0039] Figure 5 for Figure 4 A flowchart of the sub-steps of step S3;
[0040] Figure 6 for Figure 4 A flowchart of the sub-steps of step S4;
[0041] Figure 7 for Figure 4 Flow chart of the sub-steps of step S7. DETAILED DESCRIPTION
[0042] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings to further illustrate the present invention.
[0043] First, combine Figures 2 to 7 A verification model implementation method for register indirect access according to an embodiment of the present invention is described, which is used to access a chip and has a wide range of application scenarios.
[0044] like Figures 2 to 7 As shown, the verification model implementation method of register indirect access according to an embodiment of the present invention comprises the following steps:
[0045] In S1, Figures 2~4 As shown, a UVM verification platform is built, and the registers of the UVM verification platform are modeled to obtain a register model.
[0046] In S2, if Figures 2~4 As shown, an indexer and an indexee are created in the UVM verification platform, the indexer obtains the index position, and the indexee obtains the indexed storage unit.
[0047] In S3, such as Figures 2~4 As shown, an index linker is created in the UVM verification platform to map the index to specific hardware.
[0048] In S4, Figures 2~4 As shown, an indexed linker is created in the UVM verification platform to map the indexer to specific hardware.
[0049] In S5, Figures 2~4 As shown, a coordinator is created in the UVM verification platform to encapsulate the index linker and the indexed linker.
[0050] In S6, Figures 2~4As shown, a front door access sequence is created in the UVM verification platform, and a configuration method configure and a sequence execution task body are created in the front door access sequence to complete the conversion of the process of indirect access to the register. The configuration method configure is used to set the register for transmitting data, that is, the previous coordinator, and the index linker, the indexed linker, and the indexed storage unit to pass to the local member variable; the sequence execution task body is mainly used to complete the process conversion of indirect access to the register. The general process is to first write the indexed storage unit to be accessed in the end into the queue, and then call the get_index_of_entry method of the indexed linker to obtain the index position of the indexed storage unit, and then call the set_index method of the index linker to set the index position of the storage queue to be indirectly accessed by the register. After all the above settings are completed, the coordinator is finally called according to the read-write operation type of the indirect access to the register, that is, the register read-write access method of the indirect access register to complete the process conversion of the entire indirect access, which is equivalent to completing the modeling of the indirect access process of the register implemented in the original DUT.
[0051] In S7, Figures 2~4 As shown, the register model performs read and write operations on the indexer and the coordinator to achieve indirect access to the register.
[0052] Furthermore, the coordinator is derived from the register class uvm_reg.
[0053] Furthermore, an index linker is created in the UVM verification platform to map the index to specific hardware, including the following sub-steps:
[0054] In S31, if Figure 2~3 As shown in 5, a parameterized abstract class index_worker is created in the UVM verification platform, and a get_index method and a set_index method are created in the abstract class index_worker. The get_index method is used to obtain the index value, and the set_index method is used to set the index value.
[0055] In S32, if Figure 2~3 As shown in 5, the abstract class index_worker is inherited and derived from the abstract class index_worker to obtain the derived subclass my_index_worker. For example, in the case of mapping the index to a domain segment of a register, the get_mirrored_value() method of the register model can be called to obtain the value of the domain segment, that is, to obtain the index value. For setting the index value, which is equivalent to writing the value of the register domain segment, the write method can be called to complete the setting of the index value.
[0056] In S33, Figure 2~3 As shown in ,5, define the variable type of specific hardware.
[0057] In S34, Figure 2~3 As shown in 5, create a set method to map the index to specific hardware, and write and implement the get_index method and set_index method.
[0058] Furthermore, the data type of the index value of the abstract class index_worker defaults to an unsigned integer.
[0059] Further, creating an indexed linker in the UVM verification platform for mapping the indexed linker to specific hardware includes the following sub-steps:
[0060] In S41, if Figure 2~3 As shown in 6, a parameterized abstract class indexed_worker is created in the UVM verification platform.
[0061] In S42, if Figure 2~3 As shown in 6, the indexed storage unit is declared as an index queue, and the get_object_entry method and the get_index_of_entry method are created in the index queue. The get_object_entry method is used to obtain the target indexed storage unit, and the get_index_of_entry method is used to obtain the index queue position of the storage unit. The get_object_entry method and the get_index_of_entry method are implemented by their derived subclasses, that is, they are written and implemented by the verification developer according to the actual situation of the project.
[0062] In S43, if Figure 2~3 As shown in 6, the abstract class indexed_worker is inherited and derived to obtain the derived subclass my_indexed_worker.
[0063] In S44, if Figure 2~36, create a set method to map the indexed storage unit to specific hardware, and write and implement the get_object_entry method and the get_index_of_entry method. Similarly, first add a set method to map the indexed object, that is, the indexed storage unit, to specific hardware, and need to write and implement the get_object_entry and get_index_of_entry methods according to the actual situation of the project to obtain the target indexed storage unit and obtain the index queue position of the target indexed storage unit respectively. This process can be implemented through the array queue method. For example, in the case where the indexed storage unit is mapped to a certain storage, the input index value can be used as the index to index the element in the array storage, and then it is assigned to the declared space size of 1 The queue is returned to get the target indexed storage unit, and for obtaining the index queue position of the target indexed storage unit, the array queue method find_first_index can be called to find the index position corresponding to the indexed storage unit according to the item content of the element, that is, the input storage unit.
[0064] Furthermore, the data type of the index value of the abstract class indexed_worker defaults to an unsigned integer, the data type of the indexed object of the abstract class indexed_worker defaults to a register type, and the subclasses of the abstract class indexed_worker can be set to other data types by passing in different parameters.
[0065] Further, the frontdoor access sequence is derived from the parent class uvm_reg_frontdoor, which is used to provide custom frontdoor access to registers and storage.
[0066] Furthermore, the register model performs read and write operations on the indexer and coordinator to achieve indirect access to the register, including the following sub-steps:
[0067] In S71, if Figure 2~3 As shown in ,7, the declaration instantiates the index linker, indexed linker, indexer, indexed, coordinator and front door access sequence.
[0068] In S72, if Figure 2~3 As shown in 7, call the index linker set method to set the index.
[0069] In S73, if Figure 2~3 As shown in ,7, call the set method of the indexed linker to set the indexed storage unit.
[0070] In S74, Figure 2~3 As shown in 7, the coordinator is called to indirectly access the set_index_worker method and the set_indexed_worker method of the register to set the index linker and the indexed linker.
[0071] In S75, Figure 2~3 As shown in , 7, the storage units of the indexed are traversed, and the configuration method configure and the set_frontdoor method of the UVM verification platform are called to configure the front door access sequence, which is used to complete the sequence conversion of the register indirect access process, and finally the indexed storage unit can be directly read and written, thereby automatically initiating the following operations through the customized front door access sequence: first call the register read and write access method of the register model, and write the domain segment providing the index value in the index register to determine which position unit in the indexed storage array queue to perform indirect read and write access operations on, and then call the coordinator, that is, the read and write access method of the indirect access register to complete the indirect read and write access operations on the indexed storage unit. Of course, this indirect access method can also be used directly to initiate the target.
[0072] like Figure 3 As shown, we call the interface method of the register model to initiate a read or write access operation to the target register or storage, which will be converted into a general register transaction request type, including the read or write access type, access address, access data, and the status information of the read or write access operation. The data information of the general register transaction request type will be converted by the adapter into the request data of the transaction type on the register bus, and then the request data of the bus transaction type will be processed by the corresponding agent and driven to the interface of the DUT, thereby completing a read or write access to the target register or storage. It can be seen from the figure that the read or write access operation to the register or storage can be directly initiated by calling the interface method of the register model, and the read or write access sequence of the register or storage can be directly started on the corresponding register bus agent to complete the read or write access operation to the register or storage. A custom register access sequence is used to deal with special register access scenarios, that is, to construct arbitrarily complex register access behaviors through a custom register access sequence, and finally to implement direct read and write operations on the indexed storage unit. In other words, in the custom front-door access sequence, it is equivalent to first setting the specific hardware that provides the index, that is, giving an index value to be accessed, and then reading and writing the coordinator, that is, the indirect access register, so as to finally complete the read and write access operations on the indexed storage unit target.
[0073] Above, refer to Figures 2 to 7A verification model implementation method for indirect access to registers according to an embodiment of the present invention is described, which avoids the application scenario limitations of indirect access to registers in the prior art, namely, the limitation that the indexer and the indexed must be of register type, and provides a verification model implementation method for indirect access to registers, which is convenient for verification developers to refer to for development and improves the development efficiency of verification personnel.
[0074] It should be noted that, in this specification, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprises..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0075] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.
Claims
1. A verification model implementation method for indirect register access, It is characterized in that The following steps are included: Build a UVM verification platform, model the registers of the UVM verification platform, and obtain the register model; Creating an indexer and an indexee in the UVM verification platform, wherein the indexer obtains an index position, and the indexee obtains an indexed storage unit; Creating an index linker in the UVM verification platform for mapping the index to specific hardware; Creating an indexed linker in the UVM verification platform for mapping the indexed linker to the specific hardware; Creating a coordinator in the UVM verification platform to encapsulate the index linker and the indexed linker; A front door access sequence is created in the UVM verification platform, and a configuration method configure and a sequence execution task body are created in the front door access sequence to complete the conversion of the process of indirect access to the register; The register model performs read and write operations on the indexer and the coordinator to achieve indirect access to the register.
2. The verification model implementation method for register indirect access as claimed in claim 1, It is characterized in that The coordinator is derived from the register class uvm_reg.
3. The verification model implementation method of register indirect access as claimed in claim 1, It is characterized in that Creating an index linker in the UVM verification platform for mapping the index to specific hardware comprises the following sub-steps: Creating a parameterized abstract class index_worker in the UVM verification platform and creating a get_index method and a set_index method in the abstract class index_worker, wherein the get_index method is used to obtain an index value, and the set_index method is used to set the index value; Inherit the abstract class index_worker and derive the abstract class index_worker to obtain a derived subclass my_index_worker; Defining the variable type of the specific hardware; Create a set method to map the index to the specific hardware, and write and implement the get_index method and the set_index method.
4. The verification model implementation method of register indirect access as claimed in claim 3, It is characterized in that The data type of the index value of the abstract class index_worker is an unsigned integer.
5. The verification model implementation method of register indirect access as claimed in claim 1, It is characterized in that Creating an indexed linker in the UVM verification platform for mapping the indexed linker to the specific hardware comprises the following sub-steps: Create a parameterized abstract class indexed_worker in the UVM verification platform; Declare the indexed storage unit as an index queue, and create a get_object_entry method and a get_index_of_entry method in the index queue, wherein the get_object_entry method is used to obtain the target indexed storage unit, and the get_index_of_entry method is used to obtain the index queue position of the storage unit; Inherit and derive the abstract class indexed_worker to obtain the derived subclass my_indexed_worker; A set method is created to map the storage unit of the index to the specific hardware, and the get_object_entry method and the get_index_of_entry method are written and implemented.
6. The verification model implementation method for register indirect access as claimed in claim 5, It is characterized in that The data type of the index value of the abstract class indexed_worker is an unsigned integer by default, the data type of the indexed object of the abstract class indexed_worker is a register type by default, and the subclass of the abstract class indexed_worker can be set to other data types by passing in different parameters.
7. The verification model implementation method for register indirect access as claimed in claim 1, It is characterized in that The frontdoor access sequence is derived from a parent class uvm_reg_frontdoor, and the parent class uvm_reg_frontdoor is used to provide a custom frontdoor access to the registers and storage.
8. The verification model implementation method of register indirect access as claimed in claim 1, It is characterized in that The register model performs read and write operations on the indexer and the coordinator to achieve indirect access to the register, including the following sub-steps: Declare and instantiate the index linker, the indexed linker, the indexer, the indexed, the coordinator and the front door access sequence; Call the index linker set method to set the index; Calling the set method of the indexed linker to set the indexed storage unit; Call the coordinator, indirectly access the set_index_worker method and the set_indexed_worker method of the register, and set the index linker and the indexed linker; The storage units of the indexed object are traversed, and the configuration method configure and the set_frontdoor method of the UVM verification platform are called to configure the front door access sequence, so as to complete the sequence conversion of the register indirect access process.
