Digital-analog port inspection method, device, equipment and medium
Through script generation of interfaces, inspection rules and test cases, the automated inspection of digital and analog ports is realized, which solves the problems of low efficiency and high maintenance costs of digital and analog port connection inspection in the existing technology, and improves the efficiency and completeness of digital and analog interface verification. sex.
Patent Information
- Application Number
- CN202411495893.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2024-11-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing digital-to-analog hybrid chip verification, digital-to-analog port connection inspection is inefficient and error-prone, and the maintenance cost is high during the verification process, delaying chip iteration.
Through script generation interfaces, inspection rules and test cases, automation is integrated into the verification environment to realize automated inspection of digital and analog ports.
It improves the efficiency and completeness of digital-to-analog interface inspection, simplifies the version iteration process, and reduces maintenance costs.
Smart Images

Figure CN119003259A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of integrated circuit technology, and in particular to a method, device, equipment and medium for checking digital and analog ports. Background Art
[0002] In a digital-analog hybrid chip, the digital module usually needs to send a large number of control signals to the analog circuit to control the analog circuit. Whether these signals can be correctly transmitted to the analog circuit, that is, whether the digital-analog port connection is accurate, is the key to whether the analog circuit can work properly. Therefore, how to check the connection of the digital-analog port signal becomes an important issue that needs to be considered in the verification of digital-analog hybrid chips. At present, in the verification of most mixed-signal chips, the common method for checking the connection of digital and analog ports is to compare them manually with the naked eye. However, if there are a large number of such control signals, this manual inspection method is inefficient and prone to errors. Another method is to use assertions to check the signal values of analog ports by forcing digital port signals. The main problems of this method are low efficiency and low reusability. It is very time-consuming to write assertion checks for a large number of control signals. In addition, during the verification process, digital designers often modify and upgrade certain ports. At this time, the verification personnel need to continuously modify the port check assertion code that has been written, which will cause high maintenance costs and delay chip iteration.
[0003] Therefore, there is an urgent need for a digital-analog port inspection method, device, equipment and medium to improve the above-mentioned problems. Summary of the invention
[0004] The object of the present invention is to provide a digital-analog port inspection method, device, equipment and medium, which can fully verify the digital-analog port and improve the efficiency and completeness of digital-analog interface inspection and verification.
[0005] In a first aspect, the present invention provides a method for checking a digital-analog port, comprising: Get the port signal of the digital and analog port to be tested, and generate the corresponding interface through the script; Generate corresponding inspection rules and test cases through the script; The interface, check rules and test cases are integrated into a verification environment through the script, so as to utilize the script to automatically check the digital and analog ports to be tested.
[0006] The method of the present invention has the following beneficial effects: obtaining the port signal of the digital-analog port to be tested, and generating the corresponding interface through the script; generating the corresponding inspection rules and test cases through the script; integrating the interface, inspection rules and test cases into the verification environment through the script, so as to use the script to perform automatic inspection on the digital-analog port to be tested. The script is used to automatically process the generated interface, inspection rules and test cases, and integrate them into the verification environment, which not only realizes the full verification of the digital-analog interface, but also improves the efficiency and completeness of the digital-analog interface inspection and verification.
[0007] Optionally, obtaining the port signal of the digital and analog port to be tested and generating the corresponding interface through the script includes: Get the port signal of the digital and analog port to be tested, and extract the port parameters through the script; The corresponding interface is generated by the script according to the port parameters. The beneficial effect is that the port parameters are extracted by the script; and the corresponding interface is generated by the script according to the port parameters, thereby improving the efficiency of digital-analog interface inspection and verification.
[0008] Optionally, generating corresponding inspection rules through the script includes: Determine whether there is a register corresponding to the digital-analog port to be tested through the script, and if so, configure the value of the register to be a first set value, and determine whether the value of the interface is a second set value; If the value of the interface is the second set value, configuring the value of the register to be the third set value, and determining whether the value of the interface is the fourth set value; If the value of the interface is the fourth set value, the check is passed. Its beneficial effect is that by generating corresponding check rules through the script, when the port is modified during the verification process, rapid iteration of the version can be achieved.
[0009] Optionally, the first setting value is different from the third setting value, and the second setting value is different from the fourth setting value; and / or the first set value and the second set value are the same; And / or the third setting value and the fourth setting value are the same.
[0010] Optionally, generating corresponding test cases through the script includes: The script is used to process the digital and analog ports and registers to be tested and generate corresponding test cases.
[0011] Optionally, the port parameters include port width and / or name.
[0012] Optionally, the script is a Python script.
[0013] In a second aspect, the present invention provides a digital-analog port inspection device, which includes modules / units for executing any possible design method of the first aspect. These modules / units can be implemented by hardware, or by hardware executing corresponding software implementations.
[0014] In a third aspect, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a program that can be run on the processor, and when the program is executed by the processor, the electronic device implements a method for executing any possible design of any of the above aspects.
[0015] In a fourth aspect, the present invention provides a readable storage medium, wherein the readable storage medium stores a program, and when the program is executed, it implements any possible design method of any of the above aspects.
[0016] For the beneficial effects of the second to fourth aspects, reference may be made to the description of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of a method for checking a digital-analog port provided by an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a digital-analog port inspection device provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention; Figure 4 A schematic diagram of the implementation process of the digital-analog port checking method provided in an embodiment of the present invention; Figure 5 A schematic diagram of a port check provided by an embodiment of the present invention; Figure 6 A schematic diagram of a port check waveform provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be understood by people with general skills in the field to which the present invention belongs. "Including" and similar words used in this article mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0019] In view of the inconvenience of current digital-analog hybrid chip verification, the digital-analog port inspection method provided by the present invention can achieve full verification of the digital-analog interface and improve the efficiency and completeness of the digital-analog interface inspection and verification. The technical scheme in the embodiment of the present invention is described below in conjunction with the drawings in the embodiment of the present invention. Among them, in the description of the embodiment of the present invention, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present invention. The singular expressions "a", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present invention, "at least one", "one or more" refer to one or more (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0020] References to "one embodiment" or "some embodiments" described in this specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", and "in some other embodiments" that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connected" includes direct and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0021] In the embodiments of the present invention, "exemplarily" or "for example" is used to indicate an example, illustration or description. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of "exemplarily" or "for example" is intended to present the relevant concepts in a specific way.
[0022] like Figure 1 As shown, the present invention provides a digital-analog port inspection method, comprising: S101, obtaining a port signal of a digital-analog port to be tested, and generating a corresponding interface through a script.
[0023] In some embodiments, the script is a Python script.
[0024] In some embodiments, in order to improve the efficiency of digital-to-analog interface inspection and verification, obtaining the port signal of the digital-to-analog port to be tested, and generating the corresponding interface through a script includes: obtaining the port signal of the digital-to-analog port to be tested, and extracting the port parameters through a script; generating the corresponding interface through the script according to the port parameters.
[0025] In some embodiments, the port parameters include port width and / or name.
[0026] S102: Generate corresponding inspection rules and test cases through the script.
[0027] In some embodiments, in order to achieve rapid iteration of versions when the port is modified during the verification process, the corresponding check rules generated by the script include: judging by the script whether there is a register corresponding to the digital-analog port to be tested, if so, configuring the value of the register to be a first setting value, and judging whether the value of the interface is a second setting value; if the value of the interface is the second setting value, configuring the value of the register to be a third setting value, and judging whether the value of the interface is a fourth setting value; if the value of the interface is the fourth setting value, the check passes. For example, Figure 6 As shown, it can be seen that the digital-to-analog port to be tested is triggered by high level and low level in sequence. If the value of the register cannot be transferred to the digital-to-analog port, it proves that there is a problem with the connection of the digital-to-analog port, which improves the efficiency and completeness of the digital-to-analog interface verification.
[0028] In some specific embodiments, the first setting value is different from the third setting value, and the second setting value is different from the fourth setting value; and / or the first setting value is the same as the second setting value; and / or the third setting value is the same as the fourth setting value. Exemplarily, the first setting value and the second setting value are the same and are 0, and the third setting value and the fourth setting value are the same and are 1.
[0029] In some embodiments, generating corresponding test cases through the script includes: processing the digital and analog ports and registers to be tested through the script to generate corresponding test cases.
[0030] S103: Integrate the interface, check rules and test cases into a verification environment through the script, so as to use the script to automatically check the digital and analog ports to be tested.
[0031] For ease of understanding, this embodiment further describes the specific implementation process of the above method in combination with a specific application scenario system. Figure 4As shown, this embodiment takes the verification of a digital-analog hybrid chip as an example. In this embodiment, the script adopts a Python script. The first set value and the second set value are the same and are 0, and the third set value and the fourth set value are the same and are 1. The specific steps are as follows: Step a, using a script to extract the port signal of the analog module port of the digital-analog hybrid chip, and generating a corresponding interface according to the port width and name; Step b, use the script to generate the inspection code according to the module input port. The inspection process is as follows: Figure 5 As shown: (1) Determine whether there is a register corresponding to the port; (2) If it exists, set all 0s to the register and check whether the interface is 0 (i.e., determine whether the port corresponding to the interface is 0); (3) If the all-0 check passes (Pass), set all 1s to the register and check whether the interface is all 1s. Otherwise, the check fails (Fail); Step c: The main difficulties in using scripts to automatically generate inspection codes containing inspection rules are: (1) Port names may change and may not be exactly the same as registers; (2) Some port names may exist in multiple register models; (3) Some port values cannot be determined by a single register; The above problems require special processing by the script, such as adding suffixes to port names, fixedly searching for a certain register model, and presetting values for some registers.
[0032] Step d, after solving the above problems, integrate the test cases and interfaces automatically generated by the script into the verification environment, and then perform simulation verification, analyze the log and waveform. The simulation waveform is as follows: Figure 6 As shown, it can be seen that the ports of the analog module are triggered by high levels and low levels in sequence. If the register configuration value cannot be passed to the digital-to-analog port, it proves that there is a problem with the connection of the digital-to-analog port.
[0033] The advantage of the embodiment of the present invention is that test cases can be generated by automatically processing digital-analog ports and registers according to the script, thereby achieving full verification of the digital-analog interface. This method can significantly improve the efficiency and completeness of digital-analog interface verification, and if the port is modified during the verification process, the script can be used to regenerate the inspection code to achieve rapid iteration of the version. This method is also suitable for the transmission inspection of a large number of port signals between modules.
[0034] like Figure 2As shown, based on the above-mentioned digital-analog port inspection method, the present invention provides a digital-analog port inspection device, including: an acquisition unit 201, used to obtain the port signal of the digital-analog port to be tested, and generate a corresponding interface through a script; a processing unit 202, used to generate corresponding inspection rules and test cases through the script; a testing unit 203, used to integrate the interface, inspection rules and test cases into a verification environment through the script, so as to use the script to perform automated inspection on the digital-analog port to be tested. Exemplarily, the acquisition unit 201 is used to obtain the port signal of the digital and analog port to be tested, and extract the port parameters (such as port width and name) through a Python script; the corresponding interface is generated through the script according to the port parameters; the processing unit 202 is used to determine whether there is a register corresponding to the digital and analog port to be tested through the script, if so, configure the value of the register to 0, and determine whether the value of the interface is 0; if the value of the interface is 0, configure the value of the register to 1, and determine whether the value of the interface is 1; if the value of the interface is 1, the check passes; and the digital and analog ports and registers to be tested are processed through the script to generate corresponding test cases, and the testing unit 203 is used to integrate the interface, inspection rules and test cases into the verification environment through the script, so as to use the script to perform automated inspection on the digital and analog ports to be tested.
[0035] It should be understood that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here. In addition, the use of suffixes such as "module", "component" or "unit" used to represent elements is only for the purpose of facilitating the description of the present invention, and has no specific meaning in itself. Therefore, "module", "component" or "unit" can be used in a mixed manner. The terminal can be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as mobile phones, tablet computers, laptops, PDAs, portable media players (PMP), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs and desktop computers. The subsequent description will be described by taking the mobile terminal as an example, and those skilled in the art will understand that, in addition to components specifically used for mobile purposes, the construction according to the embodiment of the present invention can also be applied to fixed types of terminals.
[0036] In some other embodiments of the present invention, an electronic device 300 is disclosed. Figure 3As shown, it may include: one or more processors 301; memory 302; display 303; one or more applications (not shown); and one or more computer programs 304. The above-mentioned components may be connected via one or more communication buses 305. The one or more computer programs 304 are stored in the above-mentioned memory 302 and configured to be executed by the one or more processors 301. The one or more computer programs 304 include instructions, which may be used to execute the following instructions: Figure 1 The various steps in the corresponding embodiments.
[0037] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0038] The memory 302 may be an internal storage unit of the electronic device 300, such as a hard disk or memory of the electronic device 300. The memory 302 may also be an external storage device of the electronic device 300, such as a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), etc. equipped on the electronic device 300. Further, the memory 302 may also include both an internal storage unit of the electronic device 300 and an external storage device. The memory 302 is used to store computer programs and other programs and data required by the electronic device. The memory 302 may also be used to temporarily store data that has been output or is to be output.
[0039] The computer program 304 may be divided into one or more modules / units. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions. The instruction segments are used to describe the execution process of the computer program 304 in the electronic device 300 .
[0040] In addition to the above structure, those skilled in the art can understand that Figure 3It is only an example of the electronic device 300 and does not constitute a limitation of the electronic device 300. The electronic device 300 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0041] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0042] Based on the above embodiments, the present invention further discloses a computer-readable storage medium on which at least one computer program is stored. When the computer program is executed by a processor, the digital-analog port checking method in the above embodiments is implemented.
[0043] A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing the processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disk, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0044] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0045] In summary, the digital-analog port inspection method, device, equipment and medium disclosed in the present invention not only realize the full verification of the digital-analog interface, but also improve the efficiency and completeness of the digital-analog interface inspection and verification.
[0046] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for checking a digital-analog port, characterized in that: include: Get the port signal of the digital and analog port to be tested, and generate the corresponding interface through the script; Generate corresponding inspection rules and test cases through the script; The interface, check rules and test cases are integrated into a verification environment through the script, so as to utilize the script to automatically check the digital and analog ports to be tested.
2. The method according to claim 1, characterized in that Obtain the port signal of the digital and analog port to be tested, and generate the corresponding interface through the script including: Get the port signal of the digital and analog port to be tested, and extract the port parameters through the script; A corresponding interface is generated through the script according to the port parameters.
3. The method according to claim 1, characterized in that: The corresponding inspection rules generated by the script include: Determine whether there is a register corresponding to the digital-analog port to be tested through the script, and if so, configure the value of the register to be a first set value, and determine whether the value of the interface is a second set value; If the value of the interface is the second set value, configuring the value of the register to be the third set value, and determining whether the value of the interface is the fourth set value; If the value of the interface is the fourth set value, the check passes.
4. The method according to claim 3, characterized in that The first setting value is different from the third setting value, and the second setting value is different from the fourth setting value; and / or the first set value and the second set value are the same; And / or the third setting value and the fourth setting value are the same.
5. The method according to claim 1, characterized in that The corresponding test cases generated by the script include: The script is used to process the digital and analog ports and registers to be tested and generate corresponding test cases.
6. The method according to claim 2, characterized in that The port parameters include port width and / or name.
7. The method according to claim 1, characterized in that The script is a Python script.
8. A digital-analog port inspection device, used in the method according to any one of claims 1 to 7, characterized in that: include: The acquisition unit is used to obtain the port signal of the digital and analog port to be tested, and generate the corresponding interface through the script; A processing unit, used to generate corresponding inspection rules and test cases through the script; The test unit is used to integrate the interface, check rules and test cases into the verification environment through the script, so as to use the script to perform automated checks on the digital and analog ports to be tested.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores a program executable on the processor, and when the program is executed by the processor, the electronic device implements the method according to any one of claims 1 to 7.
10. A readable storage medium, wherein a program is stored in the readable storage medium, characterized in that: When the program is executed, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
MicroPython-based miniature test platform, test method and storage medium
CN113868069A
Packaging method and device for reusable UVM verification environment, equipment and medium
CN113900642A
Verification method and platform based on combination of UVM and FPV, terminal and storage medium
CN115687108A
Chip verification platform and method for multi-scene multiplexing of digital-analog chip
CN116842890A
Verification system and method for digital-analog hybrid chip
CN117669457A
