Register object access method, global index construction method, and related products

CN122614749APending Publication Date: 2026-08-21CHENGDU HAIGUANG INTEGRATED CIRCUIT DESIGN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610769427.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-29
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

这导致传统访问寄存器对象的方法将会严重拖慢仿真速度,严重影响验证效率

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122614749A_ABST
    Figure CN122614749A_ABST
Patent Text Reader

Abstract

The application provides a register object access method in a verification process, a global index construction method and device of a register object, an electronic device, a computer readable storage medium and a computer program product, relates to the chip verification technical field, and through pre-acquiring the pointers of all register objects, the global index of each register object is obtained based on the pointer of each register object, so that when register object access is required in the subsequent verification process, the access is directly based on the global index of the register object, thereby obtaining efficient register object access efficiency, and further improving the simulation speed and the verification efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of chip verification technology, and more specifically, to a method for accessing register objects during the verification process, a method for constructing a global index of register objects, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] In UVM (Universal Verification Methodology), the Register Abstraction Layer (RAL) is a core component of the verification environment. It manages all registers in the design and provides a standardized access interface. Most components in the verification environment frequently access register objects through the RAL. Traditional methods for accessing register objects primarily involve looping through all registers in a block (corresponding to the `uvm_reg_block` class in the RAL, a container for storing register objects) and returning them to a queue. Then, the returned queue is used to match the desired `reg_name` (register name). If a match is found, the register object is returned.

[0003] With the rapid development of semiconductor technology, the complexity of modern chip design is increasing exponentially, with a dramatic increase in the number of internal functional modules and registers within these modules. This causes traditional methods of accessing register objects to severely slow down simulation speed and significantly impact verification efficiency. Summary of the Invention

[0004] The purpose of this application is to provide a method for accessing register objects during the verification process, a method for constructing a global index of register objects, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product, so as to improve the efficiency of accessing register objects during the verification process.

[0005] This application provides a register object access method during a verification process, comprising: in response to receiving a target access identifier of a register object to be accessed, finding a target global index matching the target access identifier from a pre-saved global index set of register objects; and obtaining and returning the register object to be accessed based on the target global index.

[0006] In the above implementation scheme, by pre-constructing and saving a global index set of register objects, during the verification process, when a register object (i.e., the register object to be accessed) needs to be accessed, it is only necessary to find the target global index that matches the target access identifier from the pre-saved global index set of register objects based on the target access identifier of the register object to be accessed, and then directly find the register object to be accessed based on the target global index and return it. Compared with the traditional scheme, the register object to be accessed can be located directly through the target global index, without having to loop through all registers under the block and put them into a queue for return, and without having to loop through the returned queue to match the desired reg_name. The access efficiency of register objects is higher. In the case of the exponential increase in the complexity of modern chip design, it can effectively improve the simulation speed and verification efficiency.

[0007] Optionally, each global index included in the global index set is an array; the elements in the array are pointers to register objects.

[0008] In the above implementation, the global index is stored in an array, and the elements in the array are directly stored as pointers to register objects. This allows the register object to be accessed to be obtained and returned directly based on the elements in the array, thereby further improving the access efficiency of register objects.

[0009] Optionally, the array is a two-dimensional array; the first element of the two-dimensional array is a unique identifier of the target functional module, and the second element of the two-dimensional array is an identifier of the target register object; wherein: the target register object is the register object corresponding to the two-dimensional array; the target functional module is the functional module to which the hardware register corresponding to the target register object belongs. In the above implementation, by using the unique identifier of the target functional module and the identifier of the target register object together as a global index, the location of the register object can be effectively indexed, thereby accurately locating and obtaining the register object to be accessed.

[0010] Optionally, the unique identifier of the target functional module is: the unique instance identifier of the target functional module, instance_id; the identifier of the target register object is: the register name of the target register object, reg_name.

[0011] In the above implementation, by constructing a global index for the register object using both instance_id and reg_name, each register object can be uniquely located using instance_id and reg_name, thus reducing the risk of logical conflicts. Furthermore, instance_id and reg_name can be obtained by normally traversing block instances, thereby reducing the difficulty of constructing the global index and facilitating its widespread use in industrial applications.

[0012] Optionally, obtaining and returning the register object to be accessed based on the target global index includes: obtaining the register object to be accessed from the address represented by the target global index; and returning the register object to be accessed.

[0013] In the above implementation, the register object to be accessed is obtained from the address represented by the target global index and returned, which can quickly obtain the register object to be accessed, thereby improving the efficiency of register object access.

[0014] This application also provides a method for constructing a global index of register objects, including: obtaining pointers to all register objects; and obtaining a global index of each register object based on the pointer of each register object.

[0015] In the above implementation, pointers to all register objects are obtained, and then the global index of each register object is derived based on the pointer to each register object. This allows for quick location of any register object during subsequent verification by finding its global index. Compared to traditional methods, this approach directly locates the desired register object using its target global index, eliminating the need to loop through all registers in the block and queue them for return, as well as the need to repeatedly match the desired `reg_name` in the returned queue. This significantly improves register object access efficiency, effectively increasing simulation speed and verification efficiency in the context of exponentially increasing complexity in modern chip design.

[0016] Optionally, obtaining the global index of each register object based on the pointer of each register object includes: for each register object, caching the pointer of the register object as a value in an array to obtain the global index of the register object.

[0017] In the above implementation, by directly caching the pointer of the register object as a value in the array, the global index of the register object is obtained. In this way, when accessing it later, the register object can be directly obtained and returned based on the element in the array, thereby further improving the access efficiency of the register object.

[0018] Optionally, the pointer of each register object includes: a unique identifier of the target functional module and an identifier of the register object; the target functional module is: the functional module to which the hardware register corresponding to the register object belongs; the array is a two-dimensional array; for each register object, the pointer of the register object is cached as a value in the array to obtain the global index of the register object, including: for each register object, the unique identifier of the target functional module of the register object is cached as the value of the first element of the two-dimensional array at the first element, and the identifier of the register object is cached as the value of the second element of the two-dimensional array at the second element to obtain the global index of the register object.

[0019] In the above implementation, by using the unique identifier of the target functional module and the identifier of the target register object together as a global index, the location of the register object can be effectively indexed, so that the location and acquisition of the register object to be accessed can be accurately realized when accessing the register in the future.

[0020] Optionally, the unique identifier of the target functional module is: the unique instance identifier of the target functional module, instance_id; the identifier of the register object is: the register name of the register object, reg_name.

[0021] In the above implementation, by constructing a global index for the register object using `instance_id` and `reg_name`, each register object can be uniquely located using `instance_id` and `reg_name`, thus reducing the risk of logical conflicts. Furthermore, `instance_id` and `reg_name` themselves can be obtained as pointers to register objects during normal traversal of block instances, thereby reducing the difficulty of constructing the global index and facilitating its widespread use in industrial applications.

[0022] Optionally, obtain pointers to all register objects, including: obtaining all uvm_reg_block instances; traversing all uvm_reg_block instances to obtain pointers to all register objects.

[0023] `uvm_reg_block` is a class in UVM's Register Abstraction Layer (RAL) used to model register blocks, and an instance of `uvm_reg_block` is a concrete object of this class, containing multiple register objects obtained through modeling. Therefore, in the above implementation, by traversing the `uvm_reg_block` instances, pointers to all register objects can be obtained quickly and comprehensively, thereby reducing the time required to construct a global index of all register objects and improving verification efficiency.

[0024] This application embodiment also provides a register object access device in the verification process, including: a lookup module, used to find a target global index matching the target access identifier from a pre-saved global index set of register objects in response to receiving a target access identifier of the register object to be accessed; and a feedback module, used to obtain and return the register object to be accessed according to the target global index.

[0025] This application also provides a global index construction apparatus for register objects, including: an acquisition module for acquiring pointers to all register objects; and a construction module for obtaining a global index of each register object based on the pointer of each register object.

[0026] This application also provides an electronic device, including a processor and a memory, wherein the processor is configured to execute one or more programs stored in the memory to implement the register object access method in the verification process described above or the global index construction method for register objects described above.

[0027] This application also provides a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the register object access method in the verification process described above or the global index construction method for register objects described above.

[0028] This application also provides a computer program product, which includes a computer program. When the computer program is run by a central processing unit, the central processing unit executes the register object access method or the global index construction method of the register object in any of the above-mentioned verification processes. Attached Figure Description

[0029] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 A flowchart illustrating the basic process of a global index construction method for a register object provided in this application embodiment; Figure 2 A schematic diagram of the structure of a two-dimensional array provided in an embodiment of this application; Figure 3A flowchart illustrating a method for accessing a register object during the verification process, provided in an embodiment of this application; Figure 4 This application provides a schematic flowchart illustrating a specific method for constructing a global index of a register object. Figure 5 A schematic diagram of the basic structure of a register object access device provided in an embodiment of this application; Figure 6 A schematic diagram of the basic structure of a global index construction device provided in this application embodiment; Figure 7 This is a schematic diagram of the basic structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0031] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0032] To facilitate understanding of the solutions and advantages of the embodiments of this application, some relevant technical terms that may be used will be explained below: The verification object refers to the object that needs to be simulated and verified. It can be the chip itself (such as a system-level system) or an important component in the chip (such as NOC (Network-On-Chip)).

[0033] Functional modules refer to the circuit modules within a verification object that implement specific functions. For example, on-chip interconnect networks typically include functional modules such as routing strategies, consistency maintenance, flow control, and debug interfaces. Functional modules usually contain a large number of hardware registers.

[0034] A register object is an abstraction that models a single hardware register. In UVM RAL, a register object can be an instance of the uvm_reg class (the base class used to model a single hardware register) or a derived class.

[0035] A pointer to a register object; a handle to the register object.

[0036] uvm_reg_block refers to the class used in UVM RAL for modeling register blocks. An instance of uvm_reg_block is a concrete object of this uvm_reg_block class, which contains multiple register objects obtained through modeling.

[0037] In verification scenarios involving chips or critical chip components (such as on-chip interconnect networks), during the verification phase, most components in the verification environment frequently need to access register objects via the RAL (Register Access Layer). Traditional methods for accessing register objects are complex to operate, inefficient in obtaining register objects, severely slowing down simulation speed and significantly impacting verification efficiency.

[0038] To improve the access efficiency of register objects, thereby increasing simulation speed and verification efficiency, this application provides a method for constructing a global index of register objects and a method for accessing register objects during the verification process. By pre-constructing and saving the global index of register objects, the required register object can be quickly obtained and returned during the verification process using the pre-saved global index. Compared with traditional solutions, it is not necessary to loop through all registers under the block and put them into a queue for return, nor is it necessary to loop through the returned queue to match the desired reg_name. The access efficiency of register objects is higher, which can effectively improve simulation speed and verification efficiency in the context of the exponential increase in the complexity of modern chip design.

[0039] See also Figure 1 As shown, Figure 1 This is a basic flowchart illustrating a method for constructing a global index of a register object provided in this application embodiment, including: S101: Get pointers to all register objects.

[0040] In this embodiment of the application, when verifying the verification object, after the build_phase or RAL construction is completed, the register object already exists in the system, so that pointers to all register objects can be obtained.

[0041] That is, the global index construction method for the register object in this application embodiment should be executed after the register object is created and before the first access to the register object, so that the register object can be accessed normally during subsequent verification. For example, it can be completed in build_phase, connect_phase (connection phase) or user-defined initialization function (used to complete initialization), but this is not a limitation.

[0042] In some optional embodiments of this application, after the RAL is established, in order to obtain pointers to all register objects, all current uvm_reg_block instances in the verification system can be obtained, and then all uvm_reg_block instances can be traversed to obtain pointers to all register objects.

[0043] Optionally, the configuration file of the verification object can be obtained, and then all uvm_reg_block instances currently in the verification system can be obtained through the configuration file.

[0044] Alternatively, the environment handle of the current verification environment of the verification system can be obtained, thereby obtaining all the uvm_reg_block instances currently in the verification system through the environment handle.

[0045] S102: Obtain the global index of each register object based on the pointer of each register object.

[0046] In this embodiment of the application, after obtaining the global index of each register object, the global index of each register object can be saved as a set of global indexes of register objects, so as to access the register objects in the subsequent verification process.

[0047] In one optional embodiment of this application, for each register object, a pointer to the register object can be cached as a value in an array to obtain a global index of the register object. This allows subsequent access to the register object directly from the elements in the array, thereby further improving the access efficiency of the register object.

[0048] For example, a pointer to a register object may include a unique identifier for the target functional module and an identifier for the register object itself. The target functional module refers to the functional module to which the hardware register corresponding to the register object belongs. For instance, suppose register object A is a register object modeled from hardware register a, and hardware register a belongs to functional module 1; then the target functional module of register object A is functional module 1.

[0049] When the pointer to a register object can include both the unique identifier of the target functional module and the identifier of the register object, a two-dimensional array can be used as a global index. In this case, for each register object, the unique identifier of the target functional module of the register object can be cached as the value of the first element of the two-dimensional array, and the identifier of the register object can be cached as the value of the second element of the two-dimensional array, thus obtaining the global index of the register object.

[0050] The unique identifier of the target functional module can be, but is not limited to, the unique instance identifier `instance_id`, and the identifier of the register object can be, but is not limited to, the register name `reg_name`. When using `instance_id` and `reg_name` as the values ​​of the first and second elements respectively, considering that `instance_id` is usually an integer and `reg_name` is usually a string, the first element of the two-dimensional array can be defined as an integer (`int`) element, and the second element as a string (`string`) element. For an example, see [link to example]. Figure 2 As shown, the array structure is [int][string].

[0051] In the embodiments of this application, the positions of the first element and the second element do not necessarily have an order restriction. For example Figure 2 As shown, the first element can come first, and the second element can come last. However, it is also possible for the second element to come first, and the first element to come last.

[0052] It is understood that the above is only one optional implementation method. In practical applications, global indexes of each register object can also be constructed in other ways.

[0053] For example, the unique identifier of the target functional module and the identifier of the register object can be processed into a single value and written into a one-dimensional array. For instance, `instance_id` and `reg_name` can be concatenated into a single composite key and written into the one-dimensional array. Subsequently, when accessing the register object, simply concatenate `instance_id` and `reg_name` from the target access identifier of the register object to be accessed into a single composite key, and then find the target one-dimensional array containing this single composite key in the global index set of register objects to index the desired register object.

[0054] For example, in addition to the unique identifier of the target functional module and the identifier of the register object, other information can be added and written into a higher-dimensional array as a global index for the register object. For instance, a register domain identifier can be added to `instance_id` and `reg_name`, and written into three elements of the three-dimensional array respectively. Subsequently, when accessing the register object, it is only necessary to index the desired register object by finding a target three-dimensional array containing the register domain identifier, `instance_id`, and `reg_name` from the target access identifier of the register object, which simultaneously contains all three in the global index set of the register object.

[0055] Alternatively, the pointer to the register object can be written to the array without directly using it as the value. For example, an address offset can be applied based on the unique identifier of the target functional module and the identifier of the register object. For instance, a first offset value and a second offset value can be pre-set. The instance_id plus the first offset value is written to the first element of the two-dimensional array, and the reg_name plus the second offset value is written to the second element of the two-dimensional array, serving as the pointer to the register object. Subsequently, when accessing the register object, simply add the instance_id plus the first offset value and the reg_name plus the second offset value from the target access identifier of the register object to be accessed. The target two-dimensional array containing both (instance_id + first offset value, reg_name + second offset value) in the global index set of the register object can then be used to index the desired register object.

[0056] Of course, in some alternative implementations, the global index may not be used as a pointer, but rather the correspondence between the global index of each register object and the pointer of the register object may be further recorded. Then, after obtaining the target global index, the pointer of the register object to be accessed can be found based on the correspondence, and the register object to be accessed can be obtained.

[0057] Considering that current verification tools do not have a component for constructing a global index of register objects, the above method can be encapsulated as a function and set in the verification tool in this embodiment.

[0058] Further, see Figure 3 As shown, Figure 3 A method for accessing register objects during the verification process is shown, including: S301: In response to receiving the target access identifier of the register object to be accessed, find the target global index that matches the target access identifier from the pre-saved global index set of register objects.

[0059] In this embodiment, the global index set of register objects can be constructed according to the global index construction method of register objects provided above. Obtaining the global index of each register object means obtaining the global index set of register objects.

[0060] In this embodiment of the application, a new function (e.g., denoted as get_reg_obj_fast()) can be constructed to replace the get_registers() (function used to loop through all registers under the block and put them into a queue and return) plus the traversal matching function get_reg_obj() (function used to loop through the returned queue to match the reg_name of the register object to be accessed and return the matched register object) required in the traditional scheme, so as to realize the register object access method in the verification process provided by this embodiment of the application.

[0061] During the verification process, when a component requests access to a certain register object (i.e., the register object to be accessed), it can pass the target access identifier of the register object to be accessed to the function get_reg_obj_fast() that implements the scheme of this application. This allows the function get_reg_obj_fast() to traverse the pre-saved global index set of register objects, find the target global index that matches the target access identifier, and obtain and return the register object to be accessed.

[0062] S302: Obtain and return the register object to be accessed based on the target global index.

[0063] In this embodiment of the application, the register object to be accessed can be obtained from the address represented by the target global index, and then the register object to be accessed can be returned.

[0064] It is understandable that this is where the register object to be accessed is returned to the component that sent the target access identifier of the register object to be accessed.

[0065] It is understood that in the embodiments of this application, when the pointer of the register object is cached as a value in an array for each register object to obtain the global index of the register object, the elements in the array are pointers to the register objects, and the address represented by the target global index is the target global index itself. Thus, the register object to be accessed can be directly obtained and returned based on the target global index.

[0066] It is understandable that when the array is a two-dimensional array, the first element of the two-dimensional array is the unique identifier of the target functional module, and the second element is the identifier of the target register object, the target access identifier of the register object to be accessed contains the identifier of the register object to be accessed and the unique identifier of the functional module to which the hardware register corresponding to the register object to be accessed belongs.

[0067] For example, assuming the two-dimensional array includes instance_id and reg_name, the target access identifier of the register object to be accessed contains the instance_id of the functional module to which the hardware register corresponding to the register object to be accessed belongs and the reg_name of the register object to be accessed.

[0068] Based on the solution of this application embodiment, during the verification process, when it is necessary to access any register object, the register can be quickly located by finding the global index of the register object. Compared with the traditional solution, the register object to be accessed can be directly located through the target global index without having to loop through all registers under the block and put them into the queue for return, and without having to loop through the returned queue to match the desired reg_name. The access efficiency of register objects is higher. In the case of the exponential increase in the complexity of modern chip design, it can effectively improve the simulation speed and verification efficiency.

[0069] To facilitate understanding of the solutions in the embodiments of this application, a specific example is provided below to illustrate the solutions of the embodiments of this application. The solutions in the embodiments of this application include the following main steps: 1. Create a two-dimensional array: In the top-level class of the RAL model (such as df_ral), a two-dimensional array is created as a global index for register objects. The two elements of the two-dimensional array are instance_id and reg_name. instance_id is of type int, serving as the first-level index and representing the unique instance identifier of the functional module to which the hardware register corresponding to the register object belongs. reg_name is of type string, serving as the second-level index and representing the register name. The elements in the two-dimensional array are pointers to uvm_reg classes, storing the index of the register object.

[0070] 2. Construct a two-dimensional array: During the environment initialization phase (such as after build_phase or RAL model construction), a one-time index building operation is performed. Specifically, this involves iterating through all uvm_reg_block instances (obtainable via configuration file or environment handle), calling the get_registers() function of the uvm_reg_block instance, obtaining pointers to all register objects (including instance_id and reg_name), and caching these pointers as values ​​in a two-dimensional array. The process is as follows: Figure 4 As shown, it includes: First, obtain all uvm_reg_block instances. Assume the number of uvm_reg_block instances is n, and initially denote i=0.

[0071] Next, iterate through all register objects in the current uvm_reg_block instance (i.e., uvm_reg_block instance i). Assume the number of register objects is m, and initially set j=0.

[0072] Determine if the instance_id and reg_name of register object j have been written into the two-dimensional array. If yes, check if j is greater than or equal to m-1. If not, write the instance_id and reg_name of register object j into the two-dimensional array, and then check if j is greater than or equal to m-1.

[0073] If j is less than m-1, then execute j= j+1, and then continue to check whether the instance_id and reg_name of register object j have been written into the two-dimensional array.

[0074] If j is greater than or equal to m-1, then execute i=i+1, and then check if i is greater than or equal to n.

[0075] If i is less than n, then jump to the step of traversing all register objects in the current uvm_reg_block instance (i.e., uvm_reg_block instance i).

[0076] If i is greater than or equal to n, then the process ends.

[0077] 3. Construct the register access function get_reg_obj_fast(): The original functions get_registers() and get_reg_obj() are replaced with a new interface function get_reg_obj_fast() that queries through an index. For details on the function, please refer to the above description in the embodiments of this application.

[0078] 4. Integration and Invocation: In all verification components that require access to register objects (such as sequences, drivers, monitors, and scoreboards), the original register object lookup logic is replaced with get_reg_obj_fast(instance_id, reg_name), thereby achieving performance optimization for the entire verification environment.

[0079] Implementing the above method improves simulation speed, with significant optimization effects in scenarios involving millions of register object accesses. It also enhances debugging efficiency, shortening the runtime of individual cases (projects) and accelerating error reproduction. Furthermore, it speeds up regression testing, reducing the overall regression cycle and supporting high-frequency, rapid iterative verification. Moreover, the solution in this application has strong compatibility, requiring no modification to the UVM source code and easily adaptable for use in existing projects.

[0080] Based on the same inventive concept, this application also provides a register object access device 500 and a global index construction device 60 for register objects during the verification process. Please refer to... Figure 5 and Figure 6 As shown, Figure 5 It shows the use of Figure 3 The apparatus of the method shown Figure 6 It shows the use of Figure 1 The apparatus of the method shown. It should be understood that the specific functions of apparatus 500 and 600 are described above; to avoid repetition, detailed descriptions are appropriately omitted here. Apparatus 500 and 600 include at least one software functional module that can be stored in memory or embedded in the operating system of apparatus 500 and 600 in the form of software or firmware. Specifically: See Figure 5 As shown, the device 500 includes: a lookup module 501 and a feedback module 502. Wherein: The lookup module 501 is used to find a target global index that matches the target access identifier from a pre-saved global index set of register objects in response to receiving a target access identifier of the register object to be accessed; Feedback module 502 is used to obtain and return the register object to be accessed based on the target global index.

[0081] In one feasible embodiment of this application, each global index included in the global index set is an array; the elements in the array are pointers to register objects.

[0082] In one exemplary embodiment of this feasible implementation, the array is a two-dimensional array; the first element of the two-dimensional array is a unique identifier of the target functional module, and the second element of the two-dimensional array is an identifier of the target register object; wherein: the target register object is the register object corresponding to the two-dimensional array; the target functional module is the functional module to which the hardware register corresponding to the target register object belongs.

[0083] In this exemplary embodiment, optionally, the unique identifier of the target functional module is: the unique instance identifier of the target functional module, instance_id; and the identifier of the target register object is: the register name of the target register object, reg_name.

[0084] In one feasible embodiment of this application, the feedback module 502 is specifically used to: obtain the register object to be accessed from the address represented by the target global index; and return the register object to be accessed.

[0085] See Figure 6 As shown, the device 600 includes: an acquisition module 601 and a construction module 602. Wherein: Module 601 is used to obtain pointers to all register objects; Module 602 is used to obtain the global index of each register object based on the pointer of each register object.

[0086] In one feasible implementation of this application, the construction module 602 is specifically used to: cache the pointer of the register object as a value in an array for each register object, thereby obtaining the global index of the register object.

[0087] In one exemplary embodiment of this feasible implementation, the pointer of each register object includes: a unique identifier of the target functional module and an identifier of the register object; the target functional module is: the functional module to which the hardware register corresponding to the register object belongs; the array is a two-dimensional array; the construction module 602 is specifically used to: for each register object, cache the unique identifier of the target functional module of the register object as the value of the first element of the two-dimensional array at the first element, and cache the identifier of the register object as the value of the second element of the two-dimensional array at the second element, thereby obtaining the global index of the register object.

[0088] In this exemplary embodiment, optionally, the unique identifier of the target functional module is: the unique instance identifier of the target functional module, instance_id; and the identifier of the register object is: the register name of the register object, reg_name.

[0089] In one feasible implementation of this application, the acquisition module 601 is specifically used to: acquire all uvm_reg_block instances; traverse all uvm_reg_block instances to obtain pointers to all register objects.

[0090] It should be understood that, for the sake of brevity, some of the content described in the method embodiments will not be repeated in this device embodiment.

[0091] Based on the same inventive concept, this application also provides an electronic device, see [link to relevant documentation]. Figure 7 As shown, it includes a processor 701 and a memory 702. Wherein: The processor 701 is used to execute one or more programs stored in the memory 702 to implement the global index construction method of the above-mentioned register object or to implement the register object access method in the above-mentioned verification process.

[0092] It is understood that processor 701 can be a data processing core of GPU (Graphics Processing Unit), CPU (Central Processing Unit), AI (Artificial Intelligence) processor, NPU (Neural Network Processing Unit), ISP (Image Signal Processor), DPU (Display Processing Unit), VPU (Video Processing Unit), DSP (Digital Signal Processor), etc., or it can be a processor chip used in scenarios such as large-scale data computation. Memory 702 can be RAM (Random Access Memory), ROM (Read-Only Memory), or flash memory. The above are merely examples and should not be construed as limiting this application.

[0093] It's understandable. Figure 7 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 7 The more or fewer components shown, or having the same Figure 7 Different configurations are shown. For example, it may also have an internal communication bus for communication between the processor 701 and the memory 702; or it may have an external communication interface, such as a USB (Universal Serial Bus) interface, a CAN (Controller Area Network) bus interface, etc.; or it may have an information display component such as a display screen, but this is not a limitation.

[0094] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium, such as a floppy disk, optical disk, hard disk, flash memory, USB flash drive, SD (Secure Digital Memory Card), MMC (Multimedia Card), etc., in which one or more programs implementing the above-described steps are stored. These one or more programs can be executed by one or more processors to implement the global index construction method for the register object or the register object access method in the verification process described above. Further details will not be elaborated here.

[0095] Based on the same inventive concept, this application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the global index construction method of the above-mentioned register object or the register object access method in the above-mentioned verification process. For details, please refer to the above-mentioned method embodiments, which will not be repeated here.

[0096] In the embodiments of this application, the computer program product may be, but is not limited to, firmware installation packages, software installation packages, components in existing software, etc.

[0097] It should be understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0098] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated.

[0099] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the connections shown or discussed between each other can be through some interfaces, indirect connections between devices or units, and can be electrical, mechanical, or other forms.

[0100] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0101] In this article, "multiple" refers to two or more.

[0102] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method of verifying register object access in a process, characterized by, include: In response to receiving a target access identifier for a register object to be accessed, a target global index matching the target access identifier is found from a pre-saved global index set of register objects; The target global index is used to obtain and return the register object to be accessed.

2. The method of claim 1, wherein, Each global index included in the global index set is an array; the elements in the array are pointers to register objects.

3. The method of claim 2, wherein the method further comprises: The array is a two-dimensional array; the first element of the two-dimensional array is a unique identifier of the target functional module, and the second element of the two-dimensional array is an identifier of the target register object; Wherein: the target register object is the register object corresponding to the two-dimensional array; the target functional module is the functional module to which the hardware register corresponding to the target register object belongs.

4. The register object access method in the verification process as described in claim 3, characterized in that, The unique identifier of the target functional module is: the unique instance identifier of the target functional module, instance_id; The identifier of the target register object is: the register name reg_name of the target register object.

5. A method of accessing a register object in a verification process according to any one of claims 1 to 4, wherein, Obtaining and returning the register object to be accessed based on the target global index includes: Obtain the register object to be accessed from the address represented by the target global index; Return the register object to be accessed.

6. A method for building a global index of register objects, characterized in that, include: Get pointers to all register objects; The global index of each register object is obtained from the pointer of each register object.

7. The method of claim 6, wherein the global index of register objects is built by, The global index of each register object is obtained from the pointer of each register object, including: For each register object, the pointer of the register object is cached as a value in an array to obtain the global index of the register object.

8. The method of claim 7, wherein the global index of register objects is built by, Each pointer to a register object includes: a unique identifier of the target functional module and an identifier of the register object; the target functional module is: the functional module to which the hardware register corresponding to the register object belongs; the array is a two-dimensional array; For each register object, a pointer to the register object is cached as a value in an array to obtain the global index of the register object, including: For each register object, the unique identifier of the target functional module of the register object is cached as the value of the first element of the two-dimensional array, and the identifier of the register object is cached as the value of the second element of the two-dimensional array, thus obtaining the global index of the register object.

9. The method for constructing a global index of a register object as described in claim 8, characterized in that, The unique identifier of the target functional module is: the unique instance identifier of the target functional module, instance_id; The identifier of the register object is: the register name of the register object, reg_name.

10. The method of claim 6-9, wherein, Get pointers to all register objects, including: Get all uvm_reg_block instances; Iterate through all uvm_reg_block instances to obtain pointers to all register objects.

11. A register object access device in a verification process, characterized in that, include: The lookup module is used to find a target global index that matches the target access identifier from a pre-saved global index set of register objects in response to receiving a target access identifier of the register object to be accessed; The feedback module is used to obtain and return the register object to be accessed based on the target global index.

12. A global index construction apparatus for a register object, characterized in that, include: The get module is used to obtain pointers to all register objects; A module for building a global index for each register object based on a pointer to each register object.

13. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to execute one or more programs stored in the memory to implement the method as claimed in any one of claims 1-10.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the method as described in any one of claims 1-10.

15. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, causes the processor to perform the method according to any one of claims 1-10.