Register verification method and device, electronic equipment and storage medium
By obtaining the access skip information of the register to be tested and the target verification type in the register queue, skipping the registers that do not require verification, and checking through single-bit scans, the problem of low efficiency in traditional register queue verification is solved, achieving a more efficient and Exact verification process.
Patent Information
- Application Number
- CN202410999309.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-07-24
AI Technical Summary
There is a lot of repetitive work in the traditional register queue verification method, resulting in low efficiency, especially as the chip size increases and the number and types of registers increase.
By obtaining the target verification type, use the register model to obtain the access skip information corresponding to the register under test in the register queue under test and the target verification type, conduct verification based on the access skip information of the register queue under test, and skip the tests that do not need to be executed. register, and performs single-bit scan checks by generating random values and comparing results to improve verification efficiency.
It reduces repetitive work in register queue verification, improves verification efficiency, and makes verification more comprehensive and accurate.
Smart Images

Figure CN118550779A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of registers, and in particular to a register verification method, device, electronic device and storage medium. Background Art
[0002] The register in an integrated circuit (IC) is a component used to store temporary data and is usually integrated inside the chip. In the field of integrated circuit design verification, the functional verification of the register module is an extremely important part. Verifiers can verify the correctness and stability of the register in the entire system through integrated testing.
[0003] At present, verifiers usually use Universal Verification Methodology (UVM) to verify registers. UVM provides a wealth of functions and methods to support register verification, which helps verifiers to effectively verify the functions and operations of registers. However, with the development of industrial technology, the scale of chips is getting larger and larger, the number and types of registers are also increasing, and the verification workload of register modules is gradually increasing. Due to the different types of registers, there may be different access types, such as read, read-only but not write, and other access types. The traditional method of verifying the function of registers verifies each register to be tested in the register queue to be verified one by one. Therefore, there may be a lot of repetitive verification work, which makes the verification efficiency of the register queue low. Summary of the invention
[0004] The purpose of the present application is to provide a register verification method, device, electronic device and storage medium, which are used to solve the problem that in the traditional technology, there may be a large amount of repetitive work in the verification process of the register queue, resulting in low verification efficiency.
[0005] In order to achieve the above-mentioned object, the first aspect of the present application provides a register verification method, the verification method comprising: Get the target verification type; Obtain access skip information corresponding to the register to be tested and the target verification type in the register to be tested queue through the register model; Verifying the register queue to be tested based on the access skip information of the register to be tested of the register queue to be tested; Generate a first random value according to a target bit field of a target register to be tested in the register to be tested queue in sequence, the target register to be tested is a register to be tested that does not skip read and write accesses, and the target bit field to be tested is a bit field to be tested that does not skip read and write accesses; Read back a first return value of the target register to be tested, and compare the first return value with the first random value to obtain a first comparison result; Invert each bit of the first random value in sequence, write it into the target register to be tested and read back the second return value of the register to be tested, and compare the second return value with the inverted first random value to obtain a second comparison result; obtain a scan inspection result of the target bit field to be tested according to the first comparison result and the second comparison result; A single-bit scan check result of the target register to be tested is obtained based on the scan check result of the target register to be tested.
[0006] In an embodiment of the present application, the verification method further includes the step of constructing a register model, which includes: Define the subclasses derived from the UVM base class; Define the skip enumeration type, access skip record function and judge skip function in the subclass; The access skip record function is called according to the access attributes of the sample register and each sample bit field of the sample register, and the access attributes of the sample register and the sample bit field and the corresponding skip enumeration type are added to the mapping table to obtain the register model.
[0007] In an embodiment of the present application, skipping the enumeration type includes at least one of the following: Skip reset initialization check, skip write access, and skip read and write access.
[0008] In an embodiment of the present application, obtaining access skip information corresponding to the register to be tested and the target verification type in the register to be tested queue through the register model includes: Obtaining access attributes of the registers to be tested in the register queue to be tested; Determining, by means of the mapping table, whether the register to be tested has a skip access tag corresponding to the target verification type; In the case where the register to be tested has a skip access tag corresponding to the target verification type, access skip information of the register to be tested is determined. In an embodiment of the present application, verifying the register queue to be tested based on the access skip information of the register to be tested of the register queue to be tested includes: determining in sequence whether the skip access information of the register to be tested or the bit field to be tested of the register to be tested matches the target verification type; In the case where the skip access information of the register to be tested matches the target verification type, skipping the access to the register to be tested; and in the case where the skip access information of the register to be tested does not match the target verification type, executing the step of accessing the register to be tested; When the skip access information of the bit field to be tested matches the target verification type, skip access to the bit field to be tested; and when the skip access information of the bit field to be tested does not match the target verification type, perform the step of accessing the bit field to be tested.
[0009] In an embodiment of the present application, the verification method further includes: Generate second random values in sequence and write them into target registers to be tested in the register to be tested queue, where the target registers to be tested are registers to be tested that do not skip read and write accesses; For each target register to be tested, read back the third return value of all registers to be tested in the register to be tested queue, and compare and analyze the third return value with the second random value to obtain an address overlap check result of the target register to be tested; Based on the address overlap check results of all target registers to be tested in the register queue to be tested, the address overlap check result of the register queue to be tested is obtained.
[0010] A second aspect of the present application provides a register verification device, the register verification device comprising: An acquisition module, configured to acquire a target verification type; A determination module is configured to obtain access skip information corresponding to the target verification type and the register to be tested in the register to be tested queue through a register model; A verification module is configured to verify the register queue to be tested based on the access skip information of the register to be tested in the register queue to be tested; generate a first random value according to the target bit field to be tested of the target register to be tested in the register queue to be tested, the target register to be tested is a register to be tested that does not skip read and write accesses, and the target bit field to be tested is a bit field to be tested that does not skip read and write accesses; read back the first return value of the target register to be tested, compare the first return value with the first random value to obtain a first comparison result; invert each bit of the first random value in turn, write it into the target register to be tested and read back the second return value of the register to be tested, respectively compare the second return value with the inverted first random value to obtain a second comparison result; obtain a scan check result of the target bit field to be tested according to the first comparison result and the second comparison result; obtain a single-bit scan check result of the target register to be tested queue based on the scan check result of the target register to be tested.
[0011] A third aspect of the present application provides an electronic device, including: a memory configured to store instructions; and The processor is configured to call instructions from a memory and implement the above register verification method when executing the instructions.
[0012] A fourth aspect of the present application provides a machine-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the processor is configured to execute the above-mentioned register verification method.
[0013] In summary, the register verification method provided by the present application uses a register model that can determine access skip information according to the access attribute of the register to be tested, obtains the access skip information corresponding to the target verification type in the register queue, and verifies the register queue to be tested based on the access skip information of the register to be tested, thereby skipping the register to be tested that does not need to be accessed. On this basis, a first random value is generated according to the target bit field of the target register to be tested in the register queue to be tested, and the first return value of the target register to be tested is read back, and the first return value is compared with the first random value to obtain a first comparison result. Then, each bit of the first random value is inverted in turn, written into the target register to be tested and the second return value of the register to be tested is read back. Then, the second return value is compared with the inverted first random value to obtain a second comparison result. Then, the scan inspection result of the target bit field to be tested is obtained according to the first comparison result and the second comparison result. Finally, the single-bit scan inspection result of the target register queue to be tested is obtained based on the scan inspection result of the target register to be tested. In this way, the verification of the register queue can be made more comprehensive and accurate on the basis of reducing the repetitive work of register queue verification, thereby improving the efficiency of register queue verification.
[0014] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A schematic diagram of an application scenario of a register verification method provided in an embodiment of the present application; Figure 2 A flowchart of a register verification method provided in an embodiment of the present application; Figure 3 A flowchart of a method for building a register model provided in an embodiment of the present application; Figure 4 A flowchart of a register address overlap checking method provided in an embodiment of the present application; Figure 5A schematic diagram of the structure of a register verification device provided in an embodiment of the present application; Figure 6 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0018] In the description of the present application, it should be understood that the terms "first" and "second" are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined. In the present application, the word "exemplary" is used to mean "used as an example, illustration or description". Any embodiment described as "exemplary" in the present application is not necessarily interpreted as being more preferred or more advantageous than other embodiments. In order to enable any technician in the field to implement and use the present application, the following description is given. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can also be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid unnecessary details that make the description of the present application obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the present application.
[0019] The register verification method in the embodiment of the present application is applied to a register verification device, and the register verification device is arranged in an electronic device; the electronic device can be a terminal, such as a mobile phone or a tablet computer, and the electronic device can also be a computer, a server, or a service cluster composed of multiple servers.
[0020] like Figure 1 As shown, Figure 1 A schematic diagram of an application scenario of a register verification method provided in an embodiment of the present application. The application scenario of the register verification method in the embodiment of the present application includes an electronic device 100, in which a register verification device is integrated to run a computer-readable storage medium corresponding to the register verification method to execute the steps of the register verification method.
[0021] Understandably, Figure 1 The electronic devices in the application scenario of the register verification method shown, or the devices included in the electronic devices, do not constitute a limitation on the embodiments of the present application, that is, the number of devices and types of devices included in the application scenario of the register verification method, or the number of devices and types of devices included in each device do not affect the overall implementation of the technical solution in the embodiments of the present application, and can all be regarded as equivalent replacements or derivatives of the technical solution claimed to be protected in the embodiments of the present application.
[0022] The electronic device 100 in the embodiment of the present application may be an independent device, or a device network or device cluster composed of devices. For example, the electronic device 100 described in the embodiment of the present application includes but is not limited to a computer, a network host, a single network device, a plurality of network device sets or a cloud device composed of a plurality of devices. The cloud device is composed of a large number of computers or network devices based on cloud computing.
[0023] Those skilled in the art will understand that Figure 1 The application scenario shown in the figure is only an application scenario corresponding to the technical solution of the present application, and does not constitute a limitation on the application scenario of the technical solution of the present application. Other application scenarios may also include Figure 1 More or fewer electronic devices shown in, or electronic device network connection relationships, such as Figure 1 Only one electronic device is shown. It can be understood that the scenario of the register verification method may also include one or more other electronic devices, which are not limited here. The electronic device 100 may also include a memory and a processor. The memory is used to store information related to the register verification method, and the processor is used to execute the steps corresponding to the method.
[0024] In addition, in the application scenario of the register verification method in the embodiment of the present application, the electronic device 100 may be provided with a display device, or the electronic device 100 may not be provided with a display device and may be communicated with an external display device 200, and the display device 200 is used to output the result of the execution of the register verification method in the electronic device. The electronic device 100 may access a backend database 300. The backend database 300 may be a local memory of the electronic device 100, or may be a cloud database set in the cloud, and the backend database 300 may store information related to the register verification method.
[0025] It should be noted that Figure 1 The application scenario of the register verification method shown is only an example. The application scenario of the register verification method described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application.
[0026] Based on the application scenario of the above register verification method, an embodiment of the register verification method is proposed, which is described in detail below with reference to the accompanying drawings.
[0027] Figure 2 A flowchart of a register verification method provided in an embodiment of the present application. Figure 2 As shown, an embodiment of the present application provides a register verification method, which may include steps 201-208, etc., which are described in detail below.
[0028] Step 201: Get the target verification type.
[0029] In an embodiment of the present application, the verification of a register may include multiple verification types, and the verification type refers to the functional type of the register to be tested that needs to be verified. The verification type may include, but is not limited to: reset initial value check, write access, and read access. Among them, the reset initial value check refers to the processor reading back the value of the register to be tested after reset and comparing it with the default reset value. Write access refers to write access to the register to be tested or the bit field to be tested. Read-write access refers to writing data to the register to be tested using the front-door access method, and then reading the result using the back-door access method and comparing it with the default read-write value to obtain a comparison result. The target verification type refers to the verification type that currently needs to be tested among multiple verification types.
[0030] Step 202: Obtain access skip information corresponding to the register to be tested and the target verification type in the register to be tested queue through the register model.
[0031] In the embodiment of the present application, register verification can be performed on one or more registers in the data set, but verification of multiple registers does not necessarily need to be performed at the same time, and can be performed in batches. Therefore, the processor of the electronic device in the embodiment of the present application can obtain the range of registers that need to be verified, and select registers within the range from multiple registers in the data set as registers to be tested based on the range, and the queue composed of multiple registers to be tested is the register queue to be tested.
[0032] In one example, the processor may receive a set range of registers to be tested, for example, the range of registers to be tested may be all registers in a data set, a portion of a random number of registers, or a specified range of registers. The registers in the set range of the data set are put into a queue test_csrs[$] to form a queue of registers to be tested test_csrs[$], and the registers in the queue of registers to be tested test_csrs[$] are the registers to be tested. The processor verifies all or part of the registers in the queue of registers to be tested according to the needs of the verification personnel, which can improve the flexibility of verifying the registers.
[0033] Further, after the processor determines the register to be tested, the register to be tested of the register queue test_csrs[$] can be verified by the register model to perform the verification of the target verification type. In UVM verification, a register model is introduced, and the register model provides some tasks, and the interaction of the register model and the register to be tested can be completed in batches, so that the verification personnel can better organize and configure the register. In an embodiment of the present application, the register model can be a kind of improved register model based on UVM, and the register model not only includes the information such as the name, starting position, access mode, etc. of each bit field of various types of registers, but also includes the access skip information of each type of register, so as to facilitate skipping some registers to be tested that do not meet the access requirements or the bit field to be tested of the register to be tested in the traversal read-write access.
[0034] In the embodiment of the present application, the access attribute of the register to be tested is the rules and permissions indicating how the register to be tested is read and written in the program. The access attribute of the register to be tested may include but is not limited to read / write, read-only, and write-only.
[0035] In an embodiment of the present application, the bit field to be verified in the register to be tested is the bit field to be tested. The access skip information includes not only the access skip information of the register to be tested itself but also the access skip information of each bit field to be tested contained in the register to be tested. Among them, the access skip information is information indicating whether the register to be tested or the bit field to be tested needs to skip access and the specific access skip method. For example, if the current register to be tested needs to skip read and write access, the access skip information of the current register to be tested is indication information representing skipping read and write access; or if a bit field to be tested in the current register needs to skip read access, the access skip information of the current bit field to be tested is indication information representing skipping read access.
[0036] The register model of the embodiment of the present application stores access skip information corresponding to access attributes of multiple types of registers, so that the processor can determine the access skip information corresponding to the register to be tested according to the access attributes of different registers to be tested.
[0037] Step 203: Verify the register queue to be tested based on the access skip information of the register to be tested in the register queue to be tested.
[0038] Based on the above-mentioned register model, the processor of the embodiment of the present application provides a set of register verification test sequences (sequence). The verification test sequence represents a set of methods for comprehensively verifying the characteristics of the register to be tested, and the processor can automatically perform the verification of the register to be tested according to the verification test sequence. For all the registers to be tested, the processor needs to first determine whether it is necessary to skip the target verification type based on the access skip information of the register to be tested and the corresponding bit field to be tested. If it does not need to be skipped, the verification of the target verification type is directly performed. Otherwise, if the register or some bit fields to be tested need to skip the target verification type, then the verification of the register to be tested in the target verification type is skipped or the verification of the bit field to be tested in the target verification type is skipped. In this way, based on the access skip information of each register to be tested in the register queue to be tested, the register queue to be tested is verified, so that automatic traversal verification of the register queue to be tested can be realized, and repetitive work can be reduced.
[0039] In summary, the register verification method provided by the embodiment of the present application obtains the access skip information corresponding to the target verification type in the register queue, verifies the register queue to be tested based on the access skip information of the register to be tested, thereby skipping the register to be tested that does not need to be accessed. In this way, the repetitive work of register queue verification can be reduced and the efficiency of register queue verification can be improved.
[0040] In the embodiment of the present application, a verification sequence for a single-bit scan check is also added. Single-bit check refers to the process of verifying a single bit of a register through a special scan chain structure and verification mode in integrated circuit design. Before performing a single-bit scan check, the embodiment of the present application needs to first determine whether to skip access based on the access skip information of the register to be tested and the bit field to be tested, so as to reduce repetitive verification and enable a more comprehensive verification of the register to be tested. The verification method for a single-bit scan check may include steps 204-208, which are described in detail below.
[0041] Step 204, generating a first random value according to the target bit fields of the target registers to be tested in the register queue, wherein the target registers to be tested are registers to be tested that do not skip read and write accesses, and the target bit fields to be tested are bit fields to be tested that do not skip read and write accesses; Step 205, read back the first return value of the target register to be tested, and compare the first return value with the first random value to obtain a first comparison result; Step 206, invert each bit of the first random value in turn, write the value into the target register to be tested, read back the second return value of the register to be tested, and compare the second return value with the inverted first random value to obtain a second comparison result; Step 207, obtaining a scan inspection result of the target register to be tested according to the first comparison result and the second comparison result; Step 208: Obtain a single-bit scan check result of the register queue to be tested based on the scan check result of the target register to be tested.
[0042] In the embodiment of the present application, for each register to be tested, the processor will verify each bit field. Before verification, the processor will first determine whether the current register to be tested needs to skip read and write accesses and whether each bit field to be tested of the current register to be tested needs to skip read and write accesses. In other words, the single-bit scan check is performed on the register to be tested and the bit field to be tested that does not skip read and write accesses, that is, the single-bit scan check is only performed on the target register to be tested and the target bit field to be tested, and there is no need to verify all registers to be tested and all bit fields to be tested, thereby reducing repetitive work.
[0043] The single-bit scan check result refers to the comparison result of the output value of each target bit field to be tested and the expected output state. If the output of the target bit field to be tested is the same as the expected output state, it means that there is no problem with the current verification. If it is different, it means that there is a fault in the current verification. In an embodiment of the present application, the first random value refers to a random value used for a single-bit scan check, and the first random value is generated based on the target bit field to be tested of the target register to be tested. For example, if the target register to be tested has 5 target bit fields to be tested, a five-bit first random value can be generated. The embodiment of the present application implements a scan check of each target bit field to be tested by respectively using the first random value and inverting each bit of the first random value.
[0044] Specifically, the processor first writes the first random value into the target register to be tested to obtain a first return value. The first return value refers to the output value of the target register to be tested in which the first random value is written. The first comparison result can be obtained by comparing the first return value with the first random value. Then, the processor inverts each bit of the first random value to obtain a second return value. The second return value refers to the output value of the target register to be tested in which the inverted first random value is written. The second comparison result can be obtained by comparing the second return value of each bit with the first random value inverted after the current bit is inverted. In an example, the lowest bit of the first random value can be inverted, and the first random value inverted after the lowest bit is inverted can be written into the target register to be tested; then the higher bits are inverted in turn, and the first random value inverted after the higher bits are inverted is written into the target register to be tested, and this step is repeated until all bits are flipped and traversed. For example, if the target register to be tested has 5 target bit fields to be tested, the generated first random value has 5 bits, including the 0th bit (i.e., bit0), the 1st bit (i.e., bit1), the 2nd bit (i.e., bit2), the 3rd bit (i.e., bit3) and the 4th bit (i.e., bit4). After the first random value is written into the target register to be tested, the first return value is returned to obtain the first comparison result. Next, the 0th bit of the first random value, that is, the lowest bit, is inverted and input into the target register to be tested to obtain the inverted return value of the 0th bit, so as to obtain the inverted comparison result of the 0th bit. Then, the 1st bit of the first random value, that is, the higher bit, is inverted and input into the target register to be tested to obtain the inverted return value of the 2nd bit, so as to obtain the inverted comparison result of the 1st bit. Repeat this step until the inverted comparison result of the 4th bit is obtained. The inverted comparison result of the 1st to 4th bits is the second comparison result. Then, according to the first comparison result and the second comparison result, the scan check result of the current target bit field to be tested can be obtained. After the processor obtains the single-bit scan check result of the current target register to be tested according to the above-mentioned scan check method, the next target register to be tested can be subjected to a single-bit scan check until all target registers to be tested are traversed to complete the single-bit scan check of the register queue to be tested. It should be noted that the above single-bit scanning inspection step is only an example, and other methods that can complete the single-bit scanning inspection may also be used. Moreover, the order of inverting the first random value is not limited to the above order, and may be arranged arbitrarily according to requirements.
[0045] In one example, the process of single-bit scan check in a sequence may include: after starting the sequence, parsing the register model, determining the range of the register to be tested in the database according to the requirements, and placing the register to be tested in the register queue to be tested test_csrs[$]; taking out a register to be tested from the register queue to be tested test_csrs[$], and judging whether it is necessary to skip the read-write access check; if necessary, skip the read-write access check, and then transfer to the next register for judgment, otherwise, proceed to the next step; parsing the target register to be tested, placing the target bit field to be tested in the target register to be tested into the field queue field[$], taking out a bit field to be tested from the field queue field[$], and judging whether the read-write access check needs to be skipped; if necessary, skip the read-write access check, and then transfer to the next register for judgment, otherwise, proceed to the next step; parsing the target register to be tested, placing the target bit field to be tested in the target register to be tested into the field queue field[$], taking out a bit field to be tested from the field queue field[$], and judging whether the Whether the bit field to be tested needs to skip the read and write access check; if necessary, skip the read and write access check, otherwise, proceed to the next step; generate a first random value and write it into the target register to be tested, read back the first return value of the target register to be tested, and compare it with the first random value to obtain the first comparison result; invert the lowest bit of the first random value, read back the second return value of the target register to be tested again, and compare it with the first random value after the lowest bit is inverted, to obtain the second comparison result; then invert the higher bit of the first random value, read back the second return value of the target register to be tested, and compare it with the first random value after the higher bit is inverted, to obtain the second comparison result of the higher bit; perform the inversion operation on each bit in turn until all bits of the target register to be tested are flipped and traversed. Based on the first comparison result and the second comparison result, the scan check result of the current target register to be tested is obtained. Next, the processor performs the above judgment process on the next target register to be tested, first judging whether the target register to be tested needs to skip the read and write access check, then judging whether the bit field to be tested of the target register to be tested needs to skip the read and write access check, and finally performing read and write access until all target registers to be tested in the register queue to be tested test_csrs[$] are traversed. The embodiment of the present application verifies each target register to be tested based on the access skip information of each register and each bit field in the register queue through a single-bit scan check, which can make the verification of the register queue more comprehensive and accurate while reducing the number of verifications.
[0046] Figure 3 A flowchart of a method for building a register model provided in an embodiment of the present application. In an embodiment of the present application, the verification method further includes a step of building a register model, which may include steps 301-303, etc., which are described in detail below.
[0047] Step 301, define the subclass derived from the UVM base class; Step 302: define the skip enumeration type, access skip record function and judge skip function in the subclass; Step 303: call the access skip record function according to the access attributes of the sample register and each sample bit field of the sample register, add the access attributes of the sample register and the sample bit field and the corresponding skip enumeration type to the mapping table, and obtain the register model.
[0048] In an embodiment of the present application, the processor may first define a subclass derived from the initial UVM base class uvm_object. In one example, the description of defining the subclass csr_excl_item derived from uvm_object may be: classcsr_excl_item extends uvm_object. Then, the skip enumeration type, the access skip record function, and the judgment skip function are defined in the derived subclass.
[0049] The skip enumeration type refers to the access type that needs to be skipped, which may include but is not limited to at least one of the following: skip reset initial value check, skip write access, and skip read and write access. Skipping the reset initial value check does not require comparing the value of the register to be tested after reset with the default reset value. Skipping write access refers to skipping the write access function of the register to be tested or the bit field to be tested. Skipping read and write access refers to skipping the read and write access of the register to be tested or the bit field to be tested.
[0050] Taking skipping reset initial value check, skipping write access, and skipping read and write access as examples, in one example, the description of the subclass derived from the UVM base class is defined as follows.
[0051] typedef enum bit [2:0] { CsrNoExcl = 3'b000, CsrExclInitCheck = 3'b001, CsrExclWrite = 3'b010, CsrExclWriteCheck = 3'b100, } csr_excl_type_e The above description defines an enumeration type called csr_excl_type_e, which contains four enumeration values: each enumeration value is represented by 3 bits. The first enumeration value is CsrNoExcl, which means not skipping any access, and the corresponding binary value is 000; the second enumeration value is CsrExclInitCheck, which means skipping the reset initial value check, and the corresponding binary value is 001; the third enumeration value is CsrExclWrite, which means skipping write access, and the corresponding binary value is 010; the fourth enumeration value is CsrExclWriteCheck, which means skipping read and write access, and the corresponding binary value is 100.
[0052] The access skip record function is a function that adds the access attribute of the register or bit field to be skipped and the skip enumeration type corresponding to the access attribute to the mapping table. As an example, the description of defining the access skip record function can be: virtual function void add_excl(string obj, csr_excl_type_e csr_excl_type).
[0053] This description defines a virtual function named add_excl, which includes two parameters obj and csr_excl_type and has a return type of void. This description is used to add an exclusion item to the object to skip unnecessary information.
[0054] The skip judgment function is a function that judges whether a register or a bit field needs to be skipped. For example, if the skip enumeration type of the register is the same as the target verification type, it returns 1; if the skip enumeration type of the register is different from the target verification type, it returns 0. For example, the description of defining the skip judgment function can be: functionbit has_excl(input string obj, input csr_excl_type_e csr_excl_type, output bit is_excl).
[0055] This description defines a function called has_excl, which includes three parameters: obj, csr_excl_type_e, and is_excl, and the return type is bit. This description is used to check whether an object has an exclusion of the specified type and return the result through the is_excl parameter.
[0056] After the subclass defines the skip enumeration type, access skip record function, and judgment skip function, the processor can pass the above subclass in the build function. In this way, there is no need to change the base class of the register model. The defined access skip subclass is directly passed in, and the access skip information is added according to the access attributes of the sample register and sample bit field, making the construction of the register model simpler and more efficient. Among them, the sample register and sample bit field are both sample data used to build the register model.
[0057] Specifically, the processor can call the access skip record function according to the access attributes of the sample register and each sample bit field of the sample register, determine the type of access that needs to be skipped according to the type of the sample register and the sample register, and add the access attributes of the sample register and the sample bit field and the corresponding skip enumeration type to the mapping table, which is a set for recording the correspondence between the register access attributes and the skip enumeration type. Finally, the register model can be obtained based on the above mapping table. The register model of the embodiment of the present application includes a mapping table of different types of registers and the bit fields of each register and their corresponding skip enumeration types, so that in the subsequent verification of the register, the access type that needs to be skipped can be obtained according to the access attributes of the register to be tested, thereby improving the verification efficiency of the register to be tested.
[0058] The following example takes the sample register as the three_field_reg register. The three_field_reg register includes three fields, of which the lowest two bits are fieldA, the next three bits are fieldB, the next four bits are fieldC, and the remaining bits are unused. In addition, the access mode of fieldA is RW, the access mode of fieldB is WO, and the access mode of fieldC is RO. In the construction function, the defined access skip subclass is passed in, and the access skip record function is called according to the access attribute of the sample register or sample bit field to add the access attribute of the relevant bit field and its corresponding skip enumeration type to the mapping table. For fieldA, both read and write access can be performed, so no access needs to be skipped; for filedB, write access can be performed but read access will fail, so read and write access need to be skipped; for filedC, read access can be performed but write access is not effective, so write access is skipped.
[0059] In an example, the description of building a register model of the above three_field_reg may be: class three_field_reg extends uvm_reg; rand uvm_reg_field fieldA; rand uvm_reg_field fieldB; rand uvm_reg_field fieldC; `uvm_object_utils(three_field_reg) function new(input string name="three_field_reg"); super.new(name, 16, UVM_NO_COVERAGE); endfunction virtual function void build(csr_excl_item csr_excl = null); fieldA = uvm_reg_field::type_id::create("fieldA"); fieldA.configure(this, 2, 0, "RW", 1, 0, 1, 1, 1); fieldB = uvm_reg_field::type_id::create("fieldB"); fieldB.configure(this, 3, 2, "WO", 1, 0, 1, 1, 1); csr_excl.add_excl(fieldB.get_full_name(), CsrExclWriteCheck); fieldC = uvm_reg_field::type_id::create("fieldC"); fieldC.configure(this, 4, 5, "RO", 1, 0, 1, 1, 1); csr_excl.add_excl(fieldC.get_full_name(), CsrExclWrite); endfunction endclass The above description defines a subclass named three_field_reg, which inherits from the base class uvm_reg and contains three random variables, namely three sample bit fields fieldA, fieldB and fieldC. The access skip record function is called according to the access attribute of each sample bit field, and the three sample bit fields are initialized and configured in the construction function. For fieldA, both read and write access can be performed without skipping any access; for filedB, read and write access are skipped; for filedC, write access is skipped.
[0060] The following is an example of a sample register two_field_reg register. The two_field_reg register includes two fields, of which the lowest two bits are fieldD and the next three bits are fieldE. The access mode of fieldD and fieldE is RO, that is, fieldD and fieldE only support RO access. Therefore, the access attribute of the register and the corresponding skip enumeration type can also be directly added to the mapping table in the register block reg_block.
[0061] In an example, the description of building a register model of the above two_field_reg may be: class reg_model extends uvm_reg_block; rand two_field_reg ro_reg; `uvm_object_utils(reg_model) function new(input string name="reg_model"); super.new(name, UVM_NO_COVERAGE); endfunction virtual function void build(csr_excl_item csr_excl = null); default_map=create_map("default_map",0,2, UVM_LITTLE_ENDIAN, 0); ro_reg = two_field_reg::type_id::create("ro_reg"); ro_reg.configure(this, null, ""); ro_reg.build(csr_excl); default_map.add_reg(ro_reg, 0, "RO"); csr_excl.add_excl(ro_reg.get_full_name(), CsrExclWrite); endfunction endclass The above description defines a subclass of reg_model, which inherits from the base class uvm_reg_block. In the class constructor, the base class constructor is called and some initialization operations are performed. In the construction function, a mapping object and a register object are created, and corresponding configuration and construction operations are performed, so that fieldD and fieldE skip write access.
[0062] It should be noted that the manner in which the register model is constructed in the embodiment of the present application is not limited to the manner exemplified above, and may also be other construction methods that enable the target register to include access skip information. The target register constructed in the embodiment of the present application includes a mapping table of different types of registers and the bit fields of each register and its corresponding skip enumeration type, so that in the subsequent verification of the register, the processor can obtain the access type that needs to be skipped according to the access attribute of the register to be tested, thereby improving the verification efficiency of the register to be tested.
[0063] In the embodiment of the present application, in step 202, obtaining access skip information corresponding to the register to be tested and the target verification type in the register to be tested queue through the register model may include: Obtain access attributes of the registers to be tested in the register queue to be tested; Determine whether the register to be tested has a skip access tag corresponding to the target verification type; In the case where a skip access tag corresponding to the target verification type exists in the register to be tested, the access skip information of the register to be tested is determined. In an embodiment of the present application, the access skip information may include a skip access tag, and the skip access tag refers to a tag that exists for skipping the target verification type. In the case where the register to be tested does not have a skip access tag, it indicates that the current register to be tested needs to execute the access function of the target verification type, and therefore, there is no need to perform the operation of skipping the access of the target verification type. In the case where a skip access tag exists in the register to be tested, it indicates that the current register to be tested needs to skip the access function of the target verification type. Therefore, the specific skipping method of the register to be tested can be further determined, for example, whether to directly skip the register to be tested or to skip certain bit fields to be tested in the register to be tested, etc.
[0064] In the embodiment of the present application, step 203, verifying the register queue to be tested based on the access skip information of the register to be tested of the register queue to be tested may include: determining in sequence whether the skip access information of the register to be tested or the bit field to be tested of the register to be tested matches the target verification type; In the case where the skip access information of the register to be tested matches the target verification type, skipping the access to the register to be tested; and in the case where the skip access information of the register to be tested does not match the target verification type, executing the step of accessing the register to be tested; When the skip access information of the bit field to be tested matches the target verification type, skip access to the bit field to be tested; and when the skip access information of the bit field to be tested does not match the target verification type, perform the step of accessing the bit field to be tested.
[0065] In an embodiment of the present application, the skip access information may refer to the skip enumeration type corresponding to the register to be tested or the bit field of the register to be tested. During the verification process, the processor will verify the register queue to be tested according to a preset verification test sequence, for example, first perform a reset initial value check, then perform write access and read access, etc. For each target verification type, the processor will compare the current target verification type with the skip enumeration type of the register to be tested or the bit field to be tested in the register queue to be tested. For each register to be tested, when the skip enumeration type of the register to be tested is the same as the current target verification type, it means that the access to the register to be tested needs to be skipped under the target verification type. At this time, the processor can return 1 to perform the skip operation; when the skip enumeration type of the register to be tested is different from the target verification type, it means that the access to the register to be tested does not need to be skipped under the target verification type, and the access to the register to be tested can be performed. Therefore, the processor can return 0 to perform the verification operation. Similarly, for the bit field to be tested, when the skip enumeration type of the bit field to be tested is the same as the target verification type, it means that the access to the bit field to be tested needs to be skipped under the target verification type. At this time, the processor can return 1 to perform the skip operation; when the skip enumeration type of the bit field to be tested is different from the target verification type, it means that the access to the bit field to be tested does not need to be skipped under the target verification type, and the access to the bit field to be tested can be performed. Therefore, the processor can return 0 to perform the verification operation. In this way, based on the mapping table of the register model, the skip enumeration type of each register to be tested or the bit field to be tested is determined, so as to determine whether the register to be tested or the bit field to be tested needs to be accessed, and verification is performed on demand, so that automatic traversal verification of the register to be tested and each bit field to be tested of the register to be tested can be realized, which not only reduces the probability of error but also reduces repetitive work.
[0066] Based on the above register model, an embodiment of the present application provides a set of register verification test sequences. For all the registers to be tested, in the sequence, the processor first determines whether the register to be tested or the bit field to be tested needs to skip the access of the target verification type. If it does not need to be skipped, the verification of the target verification type is directly performed; if it needs to be skipped, the verification of the register to be tested in the target verification type is skipped or the verification of the bit field to be tested in the target verification type is skipped. By giving priority to skipping access, the registers to be tested can be traversed and accessed as needed to reduce repetitive verifications and improve the efficiency of register queue verification.
[0067] In one example, the read and write access process in a sequence may include: after starting the sequence, parsing the register model, determining the range of the register to be tested in the database according to the requirements, and placing the register to be tested in the register queue to be tested test_csrs[$]; taking out a register to be tested from the register queue to be tested test_csrs[$], and judging whether it is necessary to skip the read and write access check; if necessary, skip the read and write access check, and then transfer to the next register for judgment, otherwise, proceed to the next step, wherein the description of this step may be has_excl(test_csr[i], CsrExclWriteCheck); then, generating an initial random value and writing it into the register to be tested, the initial random value is the random value for skipping the read and write access step, reading back the value of the register to be tested and judging it with the initial random value to obtain a read and write access comparison result; then, the processor repeats the above judgment process for the next register to be tested, first judging whether it is necessary to skip the read and write access check, and then performing read and write access, until all the registers to be tested in the register queue to be tested test_csrs[$] are traversed.
[0068] The embodiment of the present application also adds a verification sequence for address overlap check. The address overlap check is to ensure that the registers to be tested in the register queue to be tested do not have overlapping address spaces to reduce conflicts or uncertain behaviors in read and write operations. Before performing the address overlap check, the embodiment of the present application needs to first determine the skip access based on the access skip information of the register to be tested and the bit field to be tested, so as to reduce repetitive verification and perform a more comprehensive verification of the register to be tested.
[0069] Figure 4 A flowchart of a register address overlap checking method provided in an embodiment of the present application. Figure 4 As shown, in the embodiment of the present application, the verification method for address overlap check may include steps 401-403, etc., which are described in detail below.
[0070] Step 401, sequentially generate second random values and write them into target registers to be tested in the register queue to be tested, where the target registers to be tested are registers to be tested that do not skip read and write accesses; Step 402: for each target register to be tested, read back the third return value of all the registers to be tested in the register to be tested queue, and compare and analyze the third return value with the second random value to obtain the address overlap check result of the target register to be tested; Step 403: Based on the address overlap check results of all target registers to be tested in the register queue to be tested, obtain the address overlap check result of the register queue to be tested.
[0071] In an embodiment of the present application, in the register queue to be tested, if there is an overlap in the address space of two registers to be tested, it may cause conflicts or uncertain behaviors in the read and write operations of the registers to be tested. Therefore, the embodiment of the present application also needs to check the address overlap of the registers to be tested to ensure that there is no overlapping address space. For each register to be tested, the processor will still first determine whether it is necessary to skip the read and write access, so that the address overlap check is only performed on the target register to be tested that does not need to skip the read and write access, so as to reduce repetitive work.
[0072] The address overlap check result refers to whether the output values of all target registers to be tested in the register queue to be tested are the same. If they are the same, it means that the registers to be tested have address overlap. Otherwise, it means that the registers to be tested do not have address overlap, and the verification result is qualified. In an embodiment of the present application, the second random value refers to a random value used for address overlap check, and the third return value refers to the return value of all registers to be tested after the second random value is written. For each target register to be tested, the embodiment of the present application will randomly generate a second random value and input it into the target register to be tested, and then receive the third return value returned by all registers to be tested, so as to determine whether there is an address overlap. If the same value exists in the third return value, it means that there is an address overlap. On the contrary, if the same value does not exist in the third return value, it means that there is no address overlap. Then, the processor traverses all target registers to be tested in turn to complete the address overlap check of the register queue to be tested.
[0073] In one example, the process of address overlap check in a sequence may include: after starting the sequence, parsing the register model, determining the range of the registers to be tested in the database according to the requirements, and placing the registers to be tested in the register queue to be tested test_csrs[$]; taking out a register to be tested from the register queue to be tested test_csrs[$], and judging whether it is necessary to skip the read and write access check; if necessary, skip the read and write access check, and then transfer to the next register to be tested for judgment, otherwise, proceed to the next step; generate a second random value and write it to the target register to be tested, read back the values of all the registers to be tested in the register queue to be tested test_csrs[$] and obtain the fourth return result; then, repeat the above steps for the next target register to be tested until all the target registers to be tested in the register queue to be tested test_csrs[$] are traversed. The embodiment of the present application can make the verification of the register queue more comprehensive and reduce the probability of failure in the verification of the register queue by checking the address overlap, on the basis of reducing the number of verifications.
[0074] Figure 5 This is a schematic diagram of the structure of a register verification device provided in an embodiment of the present application. Figure 5 As shown, the embodiment of the present application provides a register verification device 500, which uses the above-mentioned register verification method to verify the register to be tested. The register verification device 500 may include: An acquisition module 501 is configured to acquire a target verification type; The determination module 502 is configured to obtain access skip information corresponding to the target verification type of the register to be tested in the register to be tested queue through a register model; The verification module 503 is configured to verify the register queue to be tested based on the access skip information of the register to be tested in the register queue to be tested; generate a first random value according to the target bit field to be tested of the target register to be tested in the register queue to be tested, the target register to be tested is a register to be tested that does not skip read and write accesses, and the target bit field to be tested is a bit field to be tested that does not skip read and write accesses; read back the first return value of the target register to be tested, compare the first return value with the first random value to obtain a first comparison result; invert each bit of the first random value in turn, write it into the target register to be tested and read back the second return value of the register to be tested, and compare the second return value with the inverted first random value to obtain a second comparison result; obtain a scan check result of the target bit field to be tested according to the first comparison result and the second comparison result; obtain a single-bit scan check result of the target register to be tested queue based on the scan check result of the target register to be tested.
[0075] The acquisition module 501, determination module 502 and verification module 503 can be used to execute steps 201-208 in the above method embodiment respectively. The detailed implementation schemes of these modules can refer to the introduction of the corresponding method steps and will not be repeated here.
[0076] The register verification device provided by the present application uses a register model that can determine access skip information according to the access attribute of the register to be tested, obtains the access skip information corresponding to the target verification type in the register queue, and verifies the register queue to be tested based on the access skip information of the register to be tested, thereby skipping the register to be tested that does not need to be accessed. In this way, the repetitive work of register queue verification can be reduced and the efficiency of register queue verification can be improved.
[0077] Figure 6 FIG. 6 is a structural block diagram of an electronic device 600 provided in an embodiment of the present application. Figure 6 As shown, an embodiment of the present application provides an electronic device 600, which may include: Memory 610, configured to store instructions; and The processor 620 is configured to call instructions from the memory 610 and implement the above register verification method when executing the instructions.
[0078] An embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the processor is configured to execute the above-mentioned register verification method.
[0079] Since the instructions stored in the electronic device and the machine-readable storage medium can execute the steps in any register verification method provided in the embodiments of the present application, the beneficial effects that can be achieved by any register verification method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0080] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0081] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0082] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0083] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0084] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0085] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0086] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0087] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0088] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A register verification method, characterized in that: The verification method comprises: Get the target verification type; Acquire access skip information corresponding to the target verification type and the register to be tested in the register to be tested queue through the register model; verifying the register queue to be tested based on the access skip information of the register to be tested of the register queue to be tested; Generate a first random value according to a target bit field of a target register to be tested in the register to be tested queue in sequence, wherein the target register to be tested is a register to be tested that does not skip read and write accesses, and the target bit field to be tested is a bit field to be tested that does not skip read and write accesses; Reading back a first return value of the target register to be tested, and comparing the first return value with the first random value to obtain a first comparison result; Invert each bit of the first random value in sequence, write the value into the target register to be tested, read back the second return value of the register to be tested, and compare the second return value with the inverted first random value to obtain a second comparison result; Obtaining a scan inspection result of the target register to be tested according to the first comparison result and the second comparison result; A single-bit scan check result of the register queue to be tested is obtained based on the scan check result of the target register to be tested.
2. The verification method according to claim 1, characterized in that: The verification method further comprises the step of constructing the register model, the step comprising: Define the subclasses derived from the UVM base class; In the subclass, a skip enumeration type, a skip record access function and a skip judgment function are defined; The access skip record function is called according to the access attributes of the sample register and each sample bit field of the sample register, and the access attributes of the sample register and the sample bit field and the corresponding skip enumeration type are added to the mapping table to obtain the register model.
3. The verification method according to claim 2, characterized in that: The skip enumeration type includes at least one of the following: Skip reset initialization check, skip write access, and skip read and write access.
4. The verification method according to claim 2, characterized in that: The acquiring, through the register model, access skip information corresponding to the register to be tested in the register to be tested queue and the target verification type comprises: Obtaining access attributes of the registers to be tested in the register queue to be tested; Determining, by means of the mapping table, whether the register to be tested has a skip access tag corresponding to the target verification type; In a case where the register to be tested has a skip access tag corresponding to the target verification type, access skip information of the register to be tested is determined.
5. The verification method according to claim 4, characterized in that: The verifying the register queue to be tested based on the access skip information of the register to be tested of the register queue to be tested comprises: determining in sequence whether the skip access information of the register to be tested or the bit field to be tested of the register to be tested matches the target verification type; In the case where the skip access information of the register to be tested matches the target verification type, skipping the access to the register to be tested; and in the case where the skip access information of the register to be tested does not match the target verification type, executing the step of accessing the register to be tested; When the skip access information of the bit field to be tested matches the target verification type, skip access to the bit field to be tested; and when the skip access information of the bit field to be tested does not match the target verification type, perform a step of accessing the bit field to be tested.
6. The verification method according to claim 1, characterized in that: The verification method further comprises: Generate second random values in sequence and write them into target registers to be tested in the registers to be tested queue, wherein the target registers to be tested are registers to be tested that do not skip read and write accesses; For each target register to be tested, read back the third return value of all the registers to be tested in the register to be tested queue, and compare and analyze the third return value with the second random value to obtain an address overlap check result of the target register to be tested; Based on the address overlap check results of all target registers to be tested in the register queue to be tested, an address overlap check result of the register queue to be tested is obtained.
7. A register verification device, characterized in that: The register verification device comprises: An acquisition module, configured to acquire a target verification type; A determination module is configured to obtain access skip information corresponding to the target verification type and the register to be tested in the register to be tested queue through a register model; A verification module is configured to verify the register queue to be tested based on the access skip information of the register to be tested in the register queue to be tested; generate a first random value according to the target bit field to be tested of the target register to be tested in the register queue to be tested, the target register to be tested is a register to be tested that does not skip read and write accesses, and the target bit field to be tested is a bit field to be tested that does not skip read and write accesses; read back the first return value of the target register to be tested, compare the first return value with the first random value to obtain a first comparison result; invert each bit of the first random value in turn, write it into the target register to be tested and read back the second return value of the register to be tested, respectively compare the second return value with the inverted first random value to obtain a second comparison result; obtain a scan check result of the target register to be tested according to the first comparison result and the second comparison result; obtain a single-bit scan check result of the register queue to be tested based on the scan check result of the target register to be tested.
8. An electronic device, characterized in that: include: a memory configured to store instructions; as well as A processor is configured to call the instruction from the memory and implement the register verification method according to any one of claims 1 to 6 when executing the instruction.
9. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions, which, when executed by a processor, enable the processor to be configured to execute the register verification method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Physical access control
CA2814254A1
Device, method and integrated circuit chip for controlling access for register
CN101078998A
Data access method, module, processor and terminal device for hybrid memory
CN104346293A
Memory management method, reproducing device
JP2004071029A
Buffered memory module with implicit to explicit memory command expansion
SG121391A1
