Register attribute verification method and device for microcontroller chip
By obtaining and converting the register attribute table into a register model, and using the register verification model to cyclically verify the register domain of the microcontroller chip, the problem of difficult maintenance and low efficiency in special attribute verification in the existing technology is solved, and efficient register attribute verification is achieved.
Patent Information
- Application Number
- CN202410823673.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-15
AI Technical Summary
The existing technology's special attribute verification method for register fields in microcontroller chips is difficult to maintain and has low efficiency. As the complexity of chip design and the number of special attributes increase, the verification efficiency decreases significantly.
By obtaining the register attribute table of the microcontroller chip, convert it into a register model, and use the register verification model to loop through each register domain to verify special attributes, and use the public register model for merging and access, providing an easy-to-maintain verification process and high efficiency. verification method.
It implements an easy-to-maintain verification method for special attributes in microcontroller chips, improves verification efficiency, simplifies the management and verification process of register models, and reduces maintenance costs.
Smart Images

Figure CN118779173A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of register verification, for example, to a register property verification method and device for a microcontroller chip. Background Art
[0002] There are multiple registers in a microcontroller chip. A register may contain one or more register fields. The register verification model can verify the properties of the register fields.
[0003] The attributes of some register domains are special attributes other than the regular attributes defined by the register verification model. In related technologies, a single register-directed verification method is usually used to verify the special attributes of the register domain. However, this verification method for special attributes is difficult to maintain and has low efficiency.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0006] The embodiments of the present disclosure provide a register attribute verification method and device for a microcontroller chip, which is easy to maintain and highly efficient in verifying special attributes.
[0007] According to a first aspect of the present disclosure, a register attribute verification method for a microcontroller chip is provided, characterized in that it includes:
[0008] Acquire a register attribute table of a microcontroller chip, wherein the register attribute table records register fields in the microcontroller chip that have the same special attributes;
[0009] Convert the register attribute table into a register model;
[0010] The register verification model is used to cyclically obtain each register field in the register model, and each time a register field is obtained, a special attribute of the obtained register field is verified.
[0011] In some embodiments, there are multiple register attribute tables, a single register attribute table records register fields with the same special attributes in the microcontroller chip, and different register attribute tables record different special attributes of register fields.
[0012] In some embodiments, converting the register attribute table into a register model includes:
[0013] Convert multiple register attribute tables into corresponding register models respectively;
[0014] All register models are merged into the same common register model, where the common register model serves as a container for all register models and provides access and operation interfaces.
[0015] In some embodiments, the register verification model is used to cyclically obtain each register field in the register model, and each time a register field is obtained, a special attribute of the obtained register field is verified, including:
[0016] Calling each register model in turn, and executing a verification process for the currently called register model, wherein the verification process includes: using the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, verifying a special attribute of the obtained register domain;
[0017] In some embodiments, the register verification model is used to cyclically obtain each register field in the register model, and each time a register field is obtained, a special attribute of the obtained register field is verified, including:
[0018] A verification process is synchronously executed on each register model, wherein the verification process includes: using the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, verifying a special attribute of the obtained register domain.
[0019] In some embodiments, the register verification model is used to cyclically obtain each register field in the register model, and each time a register field is obtained, a special attribute of the obtained register field is verified, including:
[0020] Write test tasks based on the logical characteristics of the special attributes of the register fields in the register model;
[0021] The register verification model is used to cyclically obtain each register domain in the register model. Each time a register domain is obtained, a test task is used to verify the special properties of the obtained register domain.
[0022] In some embodiments, obtaining a register attribute table of a microcontroller chip includes:
[0023] Using the general properties defined by the register verification model as a reference, the register fields with special properties in the microcontroller chip are identified;
[0024] The register fields with the same special attributes are extracted, and the register fields with the same special attributes are filled in a table to obtain a register attribute table.
[0025] In some embodiments, before looping and acquiring each register field in the register model using the register verification model, the method further includes:
[0026] The access rights of the special attributes of the register domain in the microcontroller chip are defined as read-write, and the access rights of the general attributes of the register domain in the microcontroller chip are defined as read-only.
[0027] According to a second aspect of the present disclosure, there is provided a register attribute verification device for a microcontroller chip, comprising:
[0028] A table acquisition module is configured to acquire a register attribute table of a microcontroller chip, wherein the register attribute table records register fields in the microcontroller chip that have the same special attributes;
[0029] a model acquisition module configured to convert the register attribute table into a register model;
[0030] The verification execution module is configured to use the register verification model to cyclically obtain each register domain in the register model, and verify the special attributes of each register domain obtained.
[0031] According to a third aspect of the present disclosure, a register property verification device for a microcontroller chip is provided, comprising a processor and a memory storing program instructions, wherein the processor is configured to execute the register property verification method for a microcontroller chip provided by the first aspect of the present disclosure when running the program instructions.
[0032] The register attribute verification method and device for a microcontroller chip provided by the embodiments of the present disclosure can achieve the following technical effects:
[0033] The disclosed embodiment can record register fields with the same special attributes in a microcontroller chip in a register attribute table, and then convert the register attribute table into a register model. Since a register model contains register fields with the same special attributes, subsequent attribute verification is easier to maintain, and the register verification model is allowed to loop through each register field in a register model and verify the special attributes of the acquired register fields, greatly improving the verification efficiency of special attributes.
[0034] The foregoing general description and the following description are exemplary and explanatory only and are not intended to limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0036] Figure 1 is a schematic diagram of a register attribute verification method for a microcontroller chip provided by an embodiment of the present disclosure;
[0037] Figure 2 is a schematic diagram of another register attribute verification method for a microcontroller chip provided by an embodiment of the present disclosure;
[0038] Figure 3 is a schematic diagram of another register attribute verification method for a microcontroller chip provided by an embodiment of the present disclosure;
[0039] Figure 4 is a schematic diagram of another register attribute verification method for a microcontroller chip provided by an embodiment of the present disclosure;
[0040] Figure 5 is a schematic diagram of a register property verification device for a microcontroller chip provided by an embodiment of the present disclosure;
[0041] Figure 6 It is a schematic diagram of another register property verification device for a microcontroller chip provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0043] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0044] Unless otherwise stated, the term "plurality" means two or more.
[0045] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0046] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0047] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0048] There are multiple registers in a microcontroller chip. A register may contain one or more register fields. The register verification model can verify the properties of the register fields.
[0049] The properties of some register fields are special properties beyond the regular properties defined by the register verification model. In the related art, a single register directional verification method is usually used to verify the special properties of the register field. However, as chip design becomes more and more complex, the number of register fields with special properties increases, and the register fields become more and more complex, which makes the verification method of special properties in the related art difficult to maintain and inefficient.
[0050] The embodiment of the present disclosure provides a register attribute verification device for a microcontroller chip, which can verify the special attributes of a register field in a register of the microcontroller chip.
[0051] In conjunction with the register attribute verification device for a microcontroller chip provided by the embodiment of the present disclosure (hereinafter referred to as the device), the embodiment of the present disclosure provides a register attribute verification method for a microcontroller chip. Figure 1 As shown, the register attribute verification method for a microcontroller chip provided by the embodiment of the present disclosure includes:
[0052] S101, the device obtains a register attribute table of a microcontroller chip.
[0053] In the embodiment of the present disclosure, the register attribute table records the register domains with the same special attributes in the microcontroller chip. Among them, there are multiple registers in the microcontroller chip, and a register may contain one or more register domains. The embodiment of the present disclosure uses the attributes defined by the register verification model as regular attributes and the attributes not defined by the register verification model as special attributes. Here, multiple register domains recorded in a register attribute table all have the same special attributes, and each register domain belongs to the same register or to different registers.
[0054] In some embodiments, there are multiple register attribute tables, a single register attribute table records register fields with the same special attributes in the microcontroller chip, and different register attribute tables record different special attributes of register fields.
[0055] In some embodiments, a register attribute table can be automatically generated by running a script. Specifically, obtaining a register attribute table of a microcontroller chip includes: the device uses the conventional attributes defined by the register verification model as a reference to identify register fields with special attributes in the microcontroller chip; extracting register fields with the same special attributes, and filling the register fields with the same special attributes in a table to obtain a register attribute table.
[0056] Here, the attributes not defined by the register verification model are regarded as special attributes, so it is possible to determine whether the attributes of the register domain in the microcontroller chip are regular attributes defined by the register verification model. If it is determined that the attributes of the register domain are not regular attributes defined by the register verification model, the attributes of the register domain are determined to be special attributes. After identifying each register domain with special attributes, the register domains with the same special attributes are extracted and filled in the table, thereby obtaining a register attribute table.
[0057] In some embodiments, the register attribute table can be obtained by manually filling in. Specifically, in response to the user's register field information filling operation, the device fills in the register fields with the same special attributes in the table to obtain the register attribute table.
[0058] In some embodiments, the register attribute table may be an Excel table or other types of tables.
[0059] S102, the device converts the register attribute table into a register model.
[0060] In the disclosed embodiment, the format of the register model is determined according to the type of register verification model used subsequently. For example, the register verification model may be a UVM (Universal Verification Methodology) register model, and the register model may be a uvm_reg_block class in the UVM register model.
[0061] S103, the device uses the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, the special attribute of the obtained register domain is verified.
[0062] In the disclosed embodiment, multiple register fields recorded in a register attribute table all have the same special attribute. The device uses the register verification model to cyclically obtain each register field in the register model in order. Specifically, the device uses the register verification model to obtain a register field in the register model and verifies the special attribute of the register field. Then, the device uses the register verification model to obtain the next register field in the register model and verifies it until the special attributes of all register fields in the register model are verified.
[0063] In the embodiment of the present disclosure, taking the register verification model as the UVM register model as an example, all register fields can be obtained using uvm_reg_block.get_register(register[$]) and register.get_fields(fields[$]) statements.
[0064] The register attribute verification method for a microcontroller chip provided by the embodiment of the present disclosure can record the register fields with the same special attributes in the microcontroller chip in a register attribute table, and then the register attribute table can be converted into a register model. Since a register model contains register fields with the same special attributes, this makes subsequent attribute verification easier to maintain, and allows the register verification model to loop through each register field in the register model in a register model, and verify the special attributes of the acquired register fields, greatly improving the verification efficiency of special attributes.
[0065] In some embodiments, there are multiple register attribute tables. Converting the register attribute table into a register model includes: converting the multiple register attribute tables into corresponding register models respectively; merging all register models into the same common register model, wherein the common register model serves as a container for all register models and provides an access and operation interface.
[0066] In some embodiments, the number of register attribute tables is multiple. Using the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, verifying the special attributes of the obtained register domain, includes: calling each register model in turn, and executing a verification process for the currently called register model, wherein the verification process includes: using the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, verifying the special attributes of the obtained register domain.
[0067] In some embodiments, the number of register attribute tables is multiple. Using the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, verifying the special attributes of the obtained register domain, includes: synchronously executing a verification process on each register model, wherein the verification process includes: using the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, verifying the special attributes of the obtained register domain.
[0068] In some cases, the number of register attribute tables is multiple. The present disclosure provides another register attribute verification method for a microcontroller chip. Figure 2 As shown, the register attribute verification method for a microcontroller chip provided by the embodiment of the present disclosure includes:
[0069] S201, the device obtains multiple register attribute tables of the microcontroller chip.
[0070] In the embodiment of the present disclosure, a single register attribute table records register domains with the same special attributes in a microcontroller chip, and different register attribute tables record different special attributes of register domains. A microcontroller chip has multiple registers, and a register may contain one or more register domains. The embodiment of the present disclosure uses the attributes defined by the register verification model as regular attributes and the attributes not defined by the register verification model as special attributes. Here, multiple register domains recorded in a register attribute table all have the same special attributes, and each register domain belongs to the same register or to different registers.
[0071] S202, the device converts multiple register attribute tables into corresponding register models respectively.
[0072] S203: The device merges all register models into the same common register model.
[0073] In the disclosed embodiment, the common register model serves as a container for all register models and provides interfaces for accessing and operating each register model.
[0074] Here, by merging all register models into the same common register model, a clear hierarchical structure can be constructed, which facilitates clear hierarchical management of register models. Moreover, by merging all register models into the same common register model, resource sharing can be promoted. For example, address mapping tables can be shared, which reduces repeated mapping work and makes address conversion logic more concise and efficient. In addition, the common register model provides an interface for accessing and operating each register model, which simplifies the configuration and control process and also simplifies the access path.
[0075] S204, the device calls each register model in sequence, and executes a verification process for the currently called register model.
[0076] In the disclosed embodiment, each register model is called in sequence, and a verification process is executed for the currently called register model, including: determining the calling order of each register model according to the characteristic information of each register model; calling each register model in sequence according to the calling order of each register model, and executing a verification process for the currently called register model.
[0077] Optionally, the characteristic information of the register model includes: the number of register domains in the register model, and / or the frequency of use of the register domains in the register model. The calling order of the register model is positively correlated with the number of register domains in the register model; that is, the more register domains there are in the register model, the higher the calling order of the register model. The calling order of the register model is positively correlated with the frequency of use of the register domains in the register model; that is, the higher the frequency of use of the register domains in the register model, the higher the calling order of the register model.
[0078] In the embodiment of the present disclosure, the verification process includes: using the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, verifying a special attribute of the obtained register domain.
[0079] In some cases, the number of register attribute tables is multiple. The present disclosure provides another register attribute verification method for a microcontroller chip. Figure 3 As shown, the register attribute verification method for a microcontroller chip provided by the embodiment of the present disclosure includes:
[0080] S301, the device obtains multiple register attribute tables of a microcontroller chip.
[0081] In the embodiment of the present disclosure, a single register attribute table records register domains with the same special attributes in a microcontroller chip, and different register attribute tables record different special attributes of register domains. A microcontroller chip has multiple registers, and a register may contain one or more register domains. The embodiment of the present disclosure uses the attributes defined by the register verification model as regular attributes and the attributes not defined by the register verification model as special attributes. Here, multiple register domains recorded in a register attribute table all have the same special attributes, and each register domain belongs to the same register or to different registers.
[0082] S302, the device converts multiple register attribute tables into corresponding register models respectively.
[0083] S303, the device merges all register models into the same common register model.
[0084] S304, the device synchronously executes the verification process for each register model.
[0085] In the embodiment of the present disclosure, the verification process includes: using the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, verifying a special attribute of the obtained register domain.
[0086] In some embodiments, a register verification model is used to loop through each register field in a register model, and each time a register field is obtained, special properties of the obtained register field are verified, including: writing a test task according to the logical characteristics of the special properties of the register field in the register model; and using a register verification model to loop through each register field in a register model, and each time a register field is obtained, using a test task to verify the special properties of the obtained register field.
[0087] The present disclosure provides another register attribute verification method for a microcontroller chip. Figure 4 As shown, the register attribute verification method for a microcontroller chip provided by the embodiment of the present disclosure includes:
[0088] S401, the device obtains a register attribute table of a microcontroller chip.
[0089] S402, the device converts the register attribute table into a register model.
[0090] S403, the device writes a test task according to the logical characteristics of the special attributes of the register field in the register model.
[0091] S404, the device uses the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, the test task is used to verify the special attributes of the obtained register domain.
[0092] In the disclosed embodiment, register domains with the same special attributes are grouped in one register model, and one test task can be written for one register model, which reduces the number of test tasks, improves the writing efficiency of test tasks, and facilitates the maintenance of test tasks. By using the register verification model to loop through each register domain in the register model and using the test task to verify the special attributes, the verification process of multiple register domains can be efficiently completed.
[0093] In some embodiments, before using the register verification model to loop to obtain each register field in the register model, it also includes: defining the access rights of the special attributes of the register field in the microcontroller chip as readable and writable (RW, Read-Write), and defining the access rights of the regular attributes of the register field in the microcontroller chip as read-only (RO, Read-Only).
[0094] By pre-defining different types of access rights for special attributes that need to be verified and regular attributes that do not need to be verified, special attributes can be read and written for verification, while regular attributes can only be read. By distinguishing the access rights of special attributes and regular attributes, the verification process can quickly identify the special attributes of the register domain and verify them, improving verification efficiency.
[0095] Combination Figure 5 As shown, an embodiment of the present disclosure provides a register attribute verification device 500 for a microcontroller chip. The register attribute verification device 500 includes a table acquisition module 501 , a model acquisition module 502 and a verification execution module 503 .
[0096] The table acquisition module 501 is configured to acquire a register attribute table of a microcontroller chip, wherein the register attribute table records register fields in the microcontroller chip that have the same special attributes.
[0097] The model acquisition module 502 is configured to convert the register attribute table into a register model.
[0098] The verification execution module 503 is configured to use the register verification model to cyclically obtain each register domain in the register model, and verify the special attributes of each register domain obtained.
[0099] The register attribute verification device for a microcontroller chip provided by the embodiment of the present disclosure can record the register fields with the same special attributes in the microcontroller chip in a register attribute table, and then the register attribute table can be converted into a register model. Since a register model contains register fields with the same special attributes, this makes subsequent attribute verification easier to maintain, and allows the register verification model to cyclically obtain each register field in the register model in a register model, and verify the special attributes of the obtained register fields, greatly improving the verification efficiency of special attributes.
[0100] In some embodiments, there are multiple register attribute tables, a single register attribute table records register fields with the same special attributes in the microcontroller chip, and different register attribute tables record different special attributes of register fields.
[0101] In some embodiments, the model acquisition module 502 is configured to:
[0102] Convert multiple register attribute tables into corresponding register models respectively;
[0103] All register models are merged into the same common register model, where the common register model serves as a container for all register models and provides access and operation interfaces.
[0104] In some embodiments, the verification execution module 503 is configured to: sequentially call each register model, and execute a verification process for the currently called register model, wherein the verification process includes: cyclically acquiring each register domain in the register model using the register verification model, and each time a register domain is acquired, verifying a special attribute of the acquired register domain;
[0105] In some embodiments, the verification execution module 503 is configured to: determine the calling order of each register model based on the characteristic information of each register model, wherein the characteristic information of the register model includes: the number of register fields in the register model, and / or, the register fields in the register model; based on the calling order of each register model, call each register model in sequence.
[0106] In some embodiments, the verification execution module 503 is configured to: synchronously execute the verification process for each register model, wherein the verification process includes: using the register verification model to cyclically obtain each register field in the register model, and each time a register field is obtained, verifying the special attributes of the obtained register field.
[0107] In some embodiments, the verification execution module 503 is configured to: write a test task based on the logical characteristics of the special attributes of the register field in the register model; use the register verification model to loop through each register field in the register model, and each time a register field is obtained, use the test task to verify the special attributes of the obtained register field.
[0108] In some embodiments, the table acquisition module 501 is configured to: identify register fields with special attributes in the microcontroller chip using the general attributes defined by the register verification model as a reference; extract register fields with the same special attributes, and fill in the register fields with the same special attributes in a table to obtain a register attribute table.
[0109] In some embodiments, the verification execution module 503 is configured to: define the access rights of special attributes of the register field in the microcontroller chip as read-write, and define the access rights of regular attributes of the register field in the microcontroller chip as read-only.
[0110] Combination Figure 6 As shown, the register attribute verification device 600 for a microcontroller chip provided by the embodiment of the present disclosure includes a processor 601 and a memory 602. Optionally, the register attribute verification device 600 may also include a communication interface 603 and a bus 604. Among them, the processor 601, the communication interface 603, and the memory 602 can communicate with each other through the bus 604. The communication interface 603 can be used for information transmission. The processor 601 can call the logic instructions in the memory 602 to implement the steps performed in the above corresponding embodiments.
[0111] In addition, the logic instructions in the memory 602 described above may be implemented in the form of software functional units and when sold or used as independent products, may be stored in a computer-readable storage medium.
[0112] The memory 602 is a computer-readable storage medium that can be used to store software programs, computer executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. The processor 601 executes functional applications and data processing by running the program instructions / modules stored in the memory 602, that is, implementing the steps performed in the above corresponding embodiments.
[0113] The memory 602 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 602 may include a high-speed random access memory and may also include a non-volatile memory.
[0114] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute a register property verification method for a microcontroller chip.
[0115] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes.
[0116] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0117] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0118] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0119] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A register attribute verification method for a microcontroller chip, characterized in that: include: Acquire a register attribute table of a microcontroller chip, wherein the register attribute table records register fields in the microcontroller chip that have the same special attributes; Convert the register attribute table into a register model; The register verification model is used to cyclically obtain each register field in the register model, and each time a register field is obtained, a special attribute of the obtained register field is verified.
2. The method according to claim 1, characterized in that There are multiple register attribute tables. A single register attribute table records register fields with the same special attributes in the microcontroller chip. Different register attribute tables record different special attributes of register fields.
3. The method according to claim 2, characterized in that Convert the register attribute table to a register model, including: Convert multiple register attribute tables into corresponding register models respectively; All register models are merged into the same common register model, where the common register model serves as a container for all register models and provides access and operation interfaces.
4. The method according to claim 2, characterized in that: The register verification model is used to loop through each register field in the register model. Each time a register field is obtained, the special properties of the obtained register field are verified, including: Each register model is called in sequence, and a verification process is executed for the currently called register model, wherein the verification process includes: using the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, the special attributes of the obtained register domain are verified.
5. The method according to claim 2, characterized in that: The register verification model is used to loop through each register field in the register model. Each time a register field is obtained, the special properties of the obtained register field are verified, including: A verification process is synchronously executed on each register model, wherein the verification process includes: using the register verification model to cyclically obtain each register domain in the register model, and each time a register domain is obtained, verifying a special attribute of the obtained register domain.
6. The method according to any one of claims 1 to 5, characterized in that: The register verification model is used to loop through each register field in the register model. Each time a register field is obtained, the special properties of the obtained register field are verified, including: Write test tasks based on the logical characteristics of the special attributes of the register fields in the register model; The register verification model is used to cyclically obtain each register domain in the register model. Each time a register domain is obtained, a test task is used to verify the special properties of the obtained register domain.
7. The method according to any one of claims 1 to 5, characterized in that: Get the register attribute table of the microcontroller chip, including: Using the general properties defined by the register verification model as a reference, the register fields with special properties in the microcontroller chip are identified; The register fields with the same special attributes are extracted, and the register fields with the same special attributes are filled in a table to obtain a register attribute table.
8. The method according to any one of claims 1 to 5, characterized in that: Before using the register verification model to loop and obtain each register domain in the register model, it also includes: The access rights of the special attributes of the register domain in the microcontroller chip are defined as read-write, and the access rights of the general attributes of the register domain in the microcontroller chip are defined as read-only.
9. A register attribute verification device for a microcontroller chip, characterized in that: include: A table acquisition module is configured to acquire a register attribute table of a microcontroller chip, wherein the register attribute table records register fields in the microcontroller chip that have the same special attributes; a model acquisition module configured to convert the register attribute table into a register model; The verification execution module is configured to use the register verification model to cyclically obtain each register domain in the register model, and verify the special attributes of each register domain obtained.
10. A register attribute verification device for a microcontroller chip, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the register attribute verification method for a microcontroller chip as claimed in any one of claims 1 to 8 when running the program instructions.
