Automatic verification method for small MCU chip

By calling DUAL_DUT to connect to the PAD port of a small MCU chip, the problem that the chip cannot test multiple interface modules at the same time is solved, efficient automated verification is achieved, simplifying the verification process and reducing costs.

CN119829349APending Publication Date: 2025-04-15JIANGSU HUACHUANG MICROSYSTEM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411969209.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

Due to PAD port limitation, small MCU chips cannot test multiple interface modules simultaneously, resulting in complex verification, low efficiency and high cost.

Method used

By calling one or more DUAL_DUT, the PAD port of DUAL_DUT is connected to the PAD port of DUT one by one, and multiple interface modules of the MCU chip are tested, including tests of I2C, SPI, UART and GPIO interfaces.

Benefits of technology

Simultaneous testing of multiple interface modules of small MCU chips is realized, which improves verification efficiency, simplifies the verification process, shortens the chip R&D cycle and saves time and costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829349A_ABST
    Figure CN119829349A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic verification method for a small MCU (Microprogrammed Control Unit) chip, which comprises the following steps of: S1, testing a plurality of interface modules of the MCU chip by calling one or more DUALDUTs; s2, a host program and a sending program are written in the normalmemory.rom file through a C language, and then the generated normalmemory.rom file is loaded into a DUT storage device; and S3, according to the master-slave function, the host program, the sending and receiving function and the sending program, generating a normalmemory.rom file, loading the normalmemory.rom file into each DUALDUT memory, and then calling each DUALDUT through a tbprotop.v file. According to the invention, by calling one or more DUALDUTs, the problem that a plurality of interface modules cannot be tested at the same time by a small MCU chip due to the limitation of a PAD port is solved, the verification efficiency of the small MCU chip is improved, and the research and development cycle of the chip is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip technology, and in particular to an automatic verification method for a small MCU chip. Background Art

[0002] In recent years, with the rapid development of integrated circuit technology, MCU, or microcontroller, has been applied to various industries to realize the intelligence, miniaturization and low power consumption of products, and plays an important role in military, aerospace, Internet and smart home. MCU is a highly integrated computer system, which usually includes key components such as processor, memory, input and output interface, all of which are integrated on a single chip. From the project establishment stage to the final mass production stage, a chip needs to go through the processes of chip design, manufacturing, packaging, testing, etc. Among them, chip design is an extremely important part of the whole process, and IC verification is the key to chip design. In the process of small MCU chip development, it is often characterized by fast iteration and short cycle. Due to PAD limitations, conventional verification platforms cannot measure multiple interface modules at the same time for small MCUs, and can only test a single peripheral, which makes the verification of MCU complicated and inefficient. Therefore, developing an automated verification platform for small MCUs can shorten the chip development cycle and improve work efficiency.

[0003] At present, there is a general MCU chip function verification system based on FPGA, which mainly includes a main verification board, a function board, a host computer, a power supply and a test instrument; the main verification board and the function board are connected through an interface to verify the MCU chip function, the test instrument includes an oscilloscope, a multimeter, a spectrum analyzer and a logic analyzer, which are used for system debugging and auxiliary verification of test results, and the host computer is used to compile and download the main verification board program and generate a verification report.

[0004] However, the existing MCU chip function verification system contains at least the following three problems: 1) The verification work is complicated. This FPGA-based general MCU chip function verification system requires various test instruments to debug the system and assist in verifying the test results during the MCU chip verification process. The verification process is relatively complicated. 2) Low verification efficiency: This FPGA-based general MCU chip function verification system cannot test multiple functions of the MCU chip at the same time when testing the MCU chip function. It can only test each function separately, which leads to low test efficiency. 3) High cost: The testing process of this FPGA-based general-purpose MCU chip function verification system requires FPGA chips, various test instruments, and multiple circuits, and the testing cost is relatively high. Summary of the invention

[0005] In view of the above three problems, the purpose of the present invention is to propose an automated verification method for small MCU chips. By calling one or more DUAL_DUTs, the problem that small MCU chips cannot test multiple interface modules at the same time due to PAD port limitations is solved, and different small MCU chips can be verified by transplanting DUAL_DUT, thereby ensuring the completeness, functionality and correctness of the verification work. At the same time, the verification environment is highly portable, which simplifies the verification work of the MCU chip, improves the verification efficiency of the small MCU chip, shortens the chip development cycle, and saves time costs.

[0006] This is achieved through the following technical solutions: An automated verification method for a small MCU chip, the method comprising the following steps: S1, by calling one or more DUAL_DUTs, connecting the PAD ports of the DUAL_DUTs with the PAD ports of the DUTs in a one-to-one correspondence, testing multiple interface modules of the MCU chip, including testing the master-slave mode of an I2C interface and an SPI interface, testing the sending and receiving functions of a UART interface, and testing the multiplexing function of a GPIO interface; wherein the DUT comprises an I2C interface, an SPI interface, a UART interface, a bus, a GPIO interface, an APB interface, a CPU core, and a Flash memory; when testing multiple functions, the DUT acts as a slave, DUAL_DUT1 and DUAL_DUT2 act as hosts, the DUT acts as a receiving end, and the DUAL_DUT3 acts as a sending end; S2, when testing, firstly writing a host program and a sending program in the normal_memory.rom file in C language, and then writing the host program and the sending program in the tb_soc _top.v file, use the $readmemh system task to load the above-generated normal_memory.rom file into the Flash memory of the DUT, where the content of the normal_memory.rom file includes the multiplexing of each group of GPIO interfaces; S3, in the DUT, generate the normal_memory.rom file according to the master-slave function and host program of the I2C interface and SPI interface and the sending and receiving function and sending program of the UART, the normal_memory.rom file includes: C code of the slave program and the receiving program, and then load the normal_memory.rom file into the SRAM memory and Flash memory in each DUAL_DUT; finally, call each DUAL_DUT in the tb_soc_top.v file, and automatically connect the PAD ports between the DUT and the DUAL_DUT, and set the relevant macro definitions.

[0007] Through the above process, the present invention can complete the test of the master-slave mode of the I2C interface and the SPI interface, the test of the sending and receiving function of the UART interface, and the test of the GPIO interface multiplexing function at one time, thereby improving the verification efficiency of the small MCU chip and shortening the chip development cycle.

[0008] Preferably, in step S1, the DUT is used to test and evaluate the communication performance of the MCU chip, and the test contents include: transmission rate, delay, signal strength, signal-to-noise ratio and channel capacity. The DUT can obtain relevant data of the communication performance of the small MCU chip, so as to evaluate the correctness and stability of the communication performance of the small MCU chip and improve the production quality of the small MCU chip.

[0009] Preferably, in step S2, the normal_memory.rom file is used to store the programs run by the DUT and each DUAL_DUT and to load the programs for the CPU in the DUT and DUAL_DUT to call; the tb_soc_top.v file is used to load the programs and paths of the normal_memory.rom file and to set macro definitions. The programs generated by the C language in the DUT and DUAL_DUT can be stored through the normal_memory.rom file, which improves the accuracy and reliability of the programs; each DUAL_DUT can be called through the tb_soc_top.v file to test the interface module, ensuring that the verification work of the small MCU chip can be completed stably.

[0010] Preferably, in step S2, the $readmemh system task is used to read data from the normal_memory.rom file into the Flash memory of the DUT, and the read content includes: blank bits, comment lines, and binary and hexadecimal numbers. The $readmemh system task can accurately store the program in the normal_memory.rom file into the Flash memory, thereby improving the integrity and correctness of the program.

[0011] Preferably, in step S3, any macro definition is used to define an identifier as a specific text sequence, and before the C language program is compiled, the identifier appearing in the host program, the slave program, the sending program and the receiving program is replaced with the text sequence by the preprocessor in DUAL_DUT. By performing macro definition on the program code, the readability and maintainability of the program code are improved, and the modification of the program code is facilitated.

[0012] Compared with the prior art, the present invention has the following beneficial effects: The technical solution of the present invention tests multiple interface modules of the MCU chip by calling one or more DUAL_DUTs and making one-to-one correspondence between the PAD ports of the DUAL_DUT and the PAD ports of the DUT, thereby solving the problem that a small MCU chip cannot test multiple interface modules simultaneously due to the limitation of the PAD ports, and different small MCU chips can be verified by transplanting the DUAL_DUT, thereby ensuring the completeness, functionality and correctness of the verification work, and at the same time, the verification environment has high portability, which simplifies the verification work of the MCU chip, improves the verification efficiency of the small MCU chip, shortens the chip development cycle, and saves time cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a flowchart of an automated verification method for small MCU chips; Figure 2 The figure is a schematic diagram of the connection between the DUT and each DUAL_DUT interface in an automated verification method for small MCU chips. DETAILED DESCRIPTION

[0014] The technical solutions in the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0015] like Figure 1 As shown, it is a flowchart of an automated verification method for small MCU chips. By calling DUAL_DUT, multiple interface modules of the MCU chip are tested; first, a host program or a sending program is written in C language in each DUAL_DUT, and the program is stored in the normal_memory.rom file, and then the normal_memory.rom file generated above is loaded into the Flash memory of the DUT; in the DUT, according to the master-slave function and host program of the I2C interface and the SPI interface, as well as the sending and receiving function and sending program of the UART, the normal_memory.rom file is generated, and the normal_memory.rom file is loaded into the memory of each DUAL_DUT, and then each DUAL_DUT is called through the tb_soc_top.v file. Among them, DUT stands for Design Under Test, which refers to the design to be tested, usually refers to the chip, circuit board or system to be tested, and here refers to the small MCU chip to be tested; DUAL_DUT here also means a small MCU chip, which is obtained by copying the DUT and has the same structure and performance as the DUT.

[0016] The method specifically comprises the following steps: S1. By calling one or more DUAL_DUTs in the verification environment, the PAD ports of DUAL_DUT are connected one by one with the PAD ports of DUT. DUAL_DUT has rich peripheral interfaces, which are used to test multiple interface modules of MCU chips, including the master-slave mode test of I2C interface and SPI interface, the test of UART interface sending and receiving function, and the test of GPIO interface multiplexing function. When testing multiple functions, DUT acts as a slave, DUAL_DUT1 and DUAL_DUT2 act as hosts, DUT acts as a receiver, and DUAL_DUT3 acts as a transmitter.

[0017] like Figure 2 As shown, it is a schematic diagram of the connection between DUT and each DUAL_DUT interface in an automated verification method for a small MCU chip, the I2C interface in the DUT is connected to the I2C1 interface in DUAL_DUT1, the SPI interface in the DUT is connected to the SPI2 interface in DUAL_DUT2, and the UART interface in the DUT is connected to the UART3 interface in DUAL_DUT3; wherein, DUT is the small MCU chip to be tested, DUAL_DUT1, DUAL_DUT2 and DUAL_DUT3 are DUTs called in the small MCU chip verification environment, and are used to test different interface functions of the small MCU chip.

[0018] Among them, a DUT includes an I2C interface, an SPI interface, a UART interface, a bus, a GPIO interface, an APB interface, a CPU core and a Flash memory; a DUAL_DUT1 includes an I2C1 interface, an SPI1 interface, an UART1 interface, a bus 1, a GPIO1 interface, an APB1 interface, a CPU core 1 and a Flash1 memory; a DUAL_DUT2 includes an I2C2 interface, an SPI2 interface, an UART2 interface, a bus 2, a GPIO2 interface, an APB2 interface, a CPU core 2 and a Flash2 memory; a DUAL_DUT3 includes an I2C3 interface, an SPI3 interface, an UART3 interface, a bus 3, a GPIO3 interface, an APB3 interface, a CPU core 3 and a Flash3 memory; specifically, the I2C interface, the full name of which is Inter-Integrated Circuit, is a serial communication protocol, which is mainly used to connect microcontrollers and other peripheral devices, mainly including: sensors, memories and displays, etc.; the SPI interface, the full name of which is Serial Peripheral Interface, is a high-speed, full-duplex, synchronous communication interface, which realizes data transmission between the host and the slave through four signal lines; UART interface, full name Universal Asynchronous Receiver and Transmitter, is a serial communication interface, which uses two signal lines for data transmission and supports full-duplex communication; GPIO interface, full name General Purpose Input / Output, is a general input and output interface, which can realize multiple functions such as digital input, digital output, analog input and analog output; APB interface, full name Advanced Peripheral Bus, is a low-cost interface optimized for minimum power consumption and reduced interface complexity. At the same time, GPIO interface multiplexing refers to the realization of multiple different functions on a single GPIO pin. By configuring GPIO interface multiplexing, the same GPIO pin can be used for different functions, switching from the original GPIO input / output function to other functions.

[0019] In this embodiment, the present invention tests and evaluates the communication performance of the small MCU chip by using DUT and DUAL_DUT1, DUAL_DUT2, and DUAL_DUT3. The test contents mainly include: transmission rate, delay, signal strength, signal-to-noise ratio, and channel capacity. According to the test results, relevant data of the communication performance of the small MCU chip is obtained to evaluate the correctness and stability of the communication performance of the small MCU chip and improve the production quality of the small MCU chip.

[0020] S2. When testing, first write the host program and the sending program in the normal_memory.rom file using C language, and then use the $readmemh system task in the tb_soc_top.v file to load the normal_memory.rom file generated above into the Flash memory of the DUT. Among them, the normal_memory.rom file is used to store the programs run by the DUT and each DUAL_DUT, and to load the programs for the CPU in the DUT and DUAL_DUT to call, and the content of the normal_memory.rom file includes the multiplexing of each group of GPIO interfaces; the tb_soc_top.v file is used to load the program and path of the normal_memory.rom file and to set macro definitions; the $readmemh system task is used to read data from the normal_memory.rom file into the Flash memory of the DUT, and the read content includes: blank bits, comment lines, and binary and hexadecimal numbers.

[0021] In this embodiment, when the present invention tests the interface module of a small MCU chip, the normal_memory.rom file is a data file stored in a read-only memory, and the data file can only read data but not write data. The program generated by the C language in the DUT and DUAL_DUT can be stored through the normal_memory.rom file, thereby improving the accuracy and reliability of the program; the tb_soc_top.v file is the top-level file of the chip verification, and each DUAL_DUT can be called through the tb_soc_top.v file to test the interface module, thereby ensuring that the verification work of the small MCU chip can be stably completed; the $readmemh system task is a system task in the hardware description language, and the hardware description language is a language used to describe the structure and function of a digital circuit. The $readmemh system task can accurately store the program in the normal_memory.rom file in the Flash memory, thereby improving the integrity and correctness of the program.

[0022] S3. In the DUT, according to the master-slave function and host program of the I2C interface and the SPI interface and the sending and receiving function and the sending program of the UART, the normal_memory.rom file is generated. The normal_memory.rom file includes: C code of the slave program and the receiving program, and then the data in the normal_memory.rom file is read into the corresponding SRAM memory and Flash memory in each DUAL_DUT through the $readmemh system task; finally, each DUAL_DUT is called in the tb_soc_top.v file, and the PAD port connection between the DUT and the corresponding DUAL_DUT is automated, and the relevant macro definitions are set at the same time; wherein any macro definition is used to define an identifier as a specific text sequence, and before the C language program is compiled, the identifier appearing in the host program, the slave program, the sending program and the receiving program is replaced with a text sequence by the preprocessor in the DUAL_DUT.

[0023] In this embodiment, in C language, macro definition is a preprocessing instruction. The present invention replaces identifiers in the program with text sequences by setting multiple macro definitions in the tb_soc_top.v file, thereby improving the readability and maintainability of the program code and facilitating the modification of the program code.

[0024] To summarize, the present invention calls one or more DUAL_DUTs, matches the PAD ports of the DUAL_DUTs with the PAD ports of the DUTs one by one, and tests multiple interface modules of the MCU chip, thereby solving the problem that small MCU chips cannot test multiple interface modules at the same time due to PAD port limitations. Moreover, for different small MCU chips, verification can be performed by transplanting DUAL_DUT, thereby ensuring the completeness, functionality and correctness of the verification work. At the same time, the verification environment is highly portable, which simplifies the verification work of the MCU chip, improves the verification efficiency of the small MCU chip, shortens the chip development cycle, saves time costs, and has significant progress.

[0025] The above embodiments are only for illustrating the technical idea of ​​the present invention, and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the present invention.

Claims

1. An automated verification method for a small MCU chip, characterized in that: The method comprises the following steps: S1. By calling one or more DUAL_DUTs, the PAD ports of DUAL_DUTs are connected to the PAD ports of DUTs in a one-to-one correspondence, and multiple interface modules of the MCU chip are tested, including the master-slave mode test of the I2C interface and the SPI interface, the test of the sending and receiving functions of the UART interface, and the test of the multiplexing function of the GPIO interface; wherein the DUT includes an I2C interface, an SPI interface, a UART interface, a bus, a GPIO interface, an APB interface, a CPU core, and a Flash memory. When testing multiple functions, the DUT acts as a slave, DUAL_DUT1 and DUAL_DUT2 act as hosts, the DUT acts as a receiving end, and the DUAL_DUT3 acts as a transmitting end; S2. When testing, first write the host program and the sending program in the normal_memory.rom file using C language, and then use the $readmemh system task in the tb_soc_top.v file to load the normal_memory.rom file generated above into the Flash memory of the DUT, where the content of the normal_memory.rom file includes the multiplexing of each group of GPIO interfaces; S3. In the DUT, according to the master-slave function and host program of the I2C interface and SPI interface and the sending and receiving function and sending program of the UART, the normal_memory.rom file is generated. The normal_memory.rom file includes: C code of the slave program and the receiving program. Then the normal_memory.rom file is loaded into the SRAM memory and Flash memory in each DUAL_DUT; finally, each DUAL_DUT is called in the tb_soc_top.v file, and the PAD port connection between the DUT and the DUAL_DUT is automatically connected, and the relevant macro definitions are set.

2. The automated verification method for a small MCU chip according to claim 1, characterized in that: In step S1, the DUT is used to test and evaluate the communication performance of the MCU chip. The test contents include: transmission rate, delay, signal strength, signal-to-noise ratio and channel capacity.

3. The automated verification method for a small MCU chip according to claim 1, characterized in that: In step S2, the normal_memory.rom file is used to store the programs run by the DUT and each DUAL_DUT and to load the programs for the CPUs in the DUT and DUAL_DUT to call; the tb_soc_top.v file is used to load the programs and paths of the normal_memory.rom file and to set macro definitions.

4. The automated verification method for a small MCU chip according to claim 1, characterized in that: In step S2, the $readmemh system task is used to read data from the normal_memory.rom file into the Flash memory of the DUT. The read content includes: blank bits, comment lines, and binary and hexadecimal numbers.

5. The automated verification method for a small MCU chip according to claim 1, characterized in that: In step S3, any macro definition is used to define an identifier as a specific text sequence. Before the C language program is compiled, the identifier appearing in the host program, the slave program, the sending program and the receiving program is replaced with the text sequence using the preprocessor in DUAL_DUT.