Processor automatic test control platform, control method and operation method
By splitting the test program into a subset and combining extensible communication protocols and image processing technology, the problem of processor memory limitation is solved, and the automatic program writing of full-function batch automatic testing of the processor is realized, which improves testing efficiency and applicability.
Patent Information
- Application Number
- CN202210309044.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-28
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-03-28
AI Technical Summary
The processor has a full-function automatic batch test and the full-function test cannot be completed at one time. The existing software cannot effectively control third-party software to perform complex program writing operations.
By splitting the full-function test program into a test subset smaller than the processor memory, and using extensible test communication protocols and image processing technology, the debugger is controlled to connect the software C-SkyDebugServer and download the debugging software CDK to automatically write the program.
Break through memory limitations, realize complex and full-function batch automatic testing, reduce time costs, improve test efficiency, and is suitable for memory-constrained processors, with strong practicality and adaptability.
Smart Images

Figure CN114661536B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of component function testing, and in particular to a processor automatic test control platform, a control method and an operation method. Background Art
[0002] The present invention is based on a domestically produced, independently controllable processor chip with a 32-bit RISC-V core, which includes multiple peripheral interfaces such as UART, Timer, CAN, SPI, GPIO, etc. The processor full-function batch automatic test platform is mainly used to implement full-function automatic testing of the processor chip before it leaves the factory, including automatic test recording, test result analysis, and test report generation, which helps to reduce time costs and improve test efficiency. The platform is composed of Figure 2 The current common testing method is to burn the embedded test program into the processor at one time, and then the host computer test platform software communicates with the processor to send control instructions and receive test results and status, ultimately achieving the purpose of automatically controlling the test process.
[0003] Because the full-function test that processors must undergo before leaving the factory covers many test items and has complex functions, the embedded test program executable file that needs to be burned into the processor takes up a large amount of space. At the same time, due to limited processor memory, the full-function test program cannot be stored as a whole, and therefore cannot be completed in one go. To solve this problem, the full-function test program can be split according to test functions, forming embedded test subroutines that take up less space and can complete one or more functional tests. These test subroutines can then be burned into the processor in multiple batches, and ultimately the test subroutines complete the full-function test coverage.
[0004] To implement the solution of programming the test subroutine into the processor in multiple times, the processor full-function batch automatic test host computer software must have the function of automatically programming the processor chip test program. The processor chip programming must be completed by jointly controlling the debugger connection software C-SkyDebugServer and downloading the debugging software CDK. The entire operation process is as follows:
[0005] First, the debugger connection software C-SkyDebugServer establishes a communication connection with the processor chip function test board through the JTAG debugger;
[0006] Secondly, the debugger connection software C-SkyDebugServer establishes a local communication network with the download debugging software CDK, realizing a complete communication link between the download debugging software and the processor chip function test board;
[0007] Finally, download the debugging software CDK to burn the program to the processor chip.
[0008] However, since these two software programs lack SDKs and output files, the host computer software for the processor's full-function batch automated testing cannot use conventional software control methods to complete the complex program burning process. Furthermore, it is also impossible to determine the processor chip's connection and download status reported by these two software programs. Therefore, controlling these two third-party software programs and determining their running results have become key issues in the processor's full-function batch automated testing task. Summary of the Invention
[0009] The present invention provides a processor automatic test control platform, control method and operation method, which are used to solve the technical problem of limited memory in full-function batch automatic testing of processors. By splitting the full-function test program, a processor full-function batch automatic test host computer software with the function of controlling the automatic burning of third-party software is developed. In addition, in conjunction with an extensible test communication protocol, the problem of limited processor memory can be effectively solved, and full-function batch automatic testing of processors can be completed, which has strong practicality.
[0010] In order to achieve the purpose of the present invention, the following technologies are proposed:
[0011] The present invention provides a processor automatic test control platform, including a host computer and a chip function test board;
[0012] The host computer includes the processor full-function batch automatic test host computer software controlled by the screen, debugger connection software C-SkyDebugServer and download debugging software CDK;
[0013] The chip function test board includes a single-chip microcomputer, a processor to be tested, and an FPGA;
[0014] in,
[0015] The processor full-function batch automatic test host computer software is connected to the programmable power supply through the serial port, and the programmable power supply is used to power the chip function test board;
[0016] The processor full-function batch automatic test host computer software is connected to the processor to be tested through the serial port;
[0017] The host computer software for full-function batch automatic testing of processors is also connected to the processor under test via USBCAN-E-mini;
[0018] The processor full-function batch automatic test host computer software is connected to the microcontroller through the serial port;
[0019] The debugger connection software C-SkyDebugServer is connected to the processor under test via JTAG;
[0020] The debugger connection software C-SkyDebugServer is connected to the downloaded debugging software CDK through a virtual network port.
[0021] The present invention also provides a control method for a processor automatic test control platform, which is implemented by the processor automatic test control platform and includes the steps of:
[0022] Step 1: Split the embedded software on the processor to be tested on the chip function test board into test subsets smaller than the processor memory according to the test function, and each test subset corresponds to an ID;
[0023] Step 2: Perform full-function batch automatic testing of the processor and control the host computer software through an extensible test communication protocol;
[0024] Step 3: Call and control the debugger connection software C-SkyDebugServer and the downloaded debugging software CDK through screen control;
[0025] Step 4: Use image processing technology to determine whether the debugger is connected to the C-SkyDebugServer software successfully, or whether the debugging software CDK is downloaded successfully;
[0026] Step 5: Return the debugger connection software C-SkyDebugServer connection result, or return the debugging software CDK download result.
[0027] Furthermore, the effective data lengths of the control instructions, test results, and test status data in the scalable test communication protocol are all variable lengths.
[0028] Furthermore, the formats of the scalable test communication protocols are composed of a frame header, a frame count, a frame length, a command type, a command identifier, valid data, a frame tail, and a checksum.
[0029] Furthermore, the command type displays that the current transmission content is control instructions, test results and test status data.
[0030] Furthermore, the instruction identifier and the necessary bytes in the valid data constitute the ID of the test item subset; and the length of the necessary bytes in the valid data can be extended to cover all test item subsets.
[0031] Furthermore, in step 3, the debugger connects to the software C-SkyDebugServer and downloads the debugging software CDK to call and control the following steps:
[0032] Step 3.1: Locate the button operation points of the debugger connection software C-SkyDebugServer and the download debugging software CDK software interface in each operation process link of the program burning, and convert multiple manual operation actions into their corresponding positioning coordinates;
[0033] Step 3.2, establish a separate operation thread, simulate mouse movement and clicks, replace user operations, realize the switch between the debugger connection software C-SkyDebugServer and the downloaded debugging software CDK, and the button clicks in the program burning process;
[0034] Step 3.3: After simulating the mouse operation, wait for a certain period of time, capture the interface images of the debugger connection software C-SkyDebugServer and the downloaded debugging software CDK by means of screen capture, and judge the software running results by image processing technology, according to the success or failure of the debugger connection software C-SkyDebugServer and the downloaded debugging software CDK operation results;
[0035] When the debugger connects to the software C-SkyDebugServer and downloads the debugging software CDK, the program will be burned. When the debugger connects to the software C-SkyDebugServer and downloads the debugging software CDK, the program will be retried.
[0036] Step 3.4, repeat steps 3.2 and 3.3 until the computer completes the JTAG connection, local communication network establishment and program burning.
[0037] Furthermore, in step 4, the steps of judging whether the debugger is connected to the software C-SkyDebugServer successfully or whether the debugging software CDK is downloaded successfully by using image processing technology are as follows:
[0038] Step 4.1, using the region of interest method of image processing technology to obtain a local image of the operating status and symbol area on the software interface in the image;
[0039] Step 4.2, remove noise and redundant information from the image;
[0040] Step 4.3, using the contour search method to obtain the contour information and geometric information in the processed local image;
[0041] In step 4.4, the difference in the image is converted into the connection status result of the debugger connection software C-SkyDebugServer and the download status result of the debugging software CDK through the contour information and geometric information in the local image.
[0042] The present invention also provides an operating method of a processor automatic test control platform, which is implemented by the processor automatic test control platform and includes the steps of:
[0043] Step a: Open the debugger, connect the software C-SkyDebugServer and download the debugging software CDK;
[0044] Step b: Open the full-function batch automatic test host computer software and start the automatic test of the processor chip;
[0045] Step c: Full-function batch automatic test of the host computer software to start the thread;
[0046] Step d: operate the control debugger to connect to the software C-SkyDebugServer or download the debugging software CDK;
[0047] Step e: Take a screenshot of the status of the debugger connecting to the C-SkyDebugServer software or downloading the debugging software CDK in step 4;
[0048] Step f, processing the state screenshot image of the debugger connection software C-SkyDebugServer or the downloaded debugging software CDK obtained in step 5, obtaining the geometry and contour information of the symbol image, and analyzing the running state;
[0049] Step g, judging the status of the debugger connecting to the software C-SkyDebugServer or downloading the debugging software CDK;
[0050] Step h: If the debugger successfully connects to the C-SkyDebugServer or downloads the CDK, it will return to the connection success or download success state.
[0051] If the debugger fails to connect to the C-SkyDebugServer or download the CDK, the system will return a connection failure or download failure status.
[0052] The advantages of the above technical solution are:
[0053] (1) The present invention can break through the memory limitation of the processor and realize complex full-function batch automatic testing, effectively reducing time costs and greatly improving testing efficiency. It can also be extended to other processors with limited memory and has strong practicality.
[0054] (2) The functional splitting and scalable test communication protocol technology adopted by the present invention can facilitate the adjustment of test function items at any time without modifying the platform hardware design and host computer software.
[0055] (3) The control technology of the debugger connection software C-SkyDebugServer and the judgment technology of the running result of the downloaded debugging software CDK adopted by the present invention can be generally applied to third-party software that cannot obtain SDK (Software Development Kit) and output files, and can be extended to other test restrictions. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings.
[0057] Figure 1 The block diagram shows the composition of a control platform for solving the memory limitation problem in full-function batch automatic testing of processors.
[0058] Figure 2 The block diagram of the processor full-function batch automatic testing platform is shown.
[0059] Figure 3 A flow chart of a control operation method for solving memory limitations in full-function batch automatic testing of processors is shown.
[0060] Figure 4 An extensible test communication protocol format is shown. DETAILED DESCRIPTION
[0061] Example 1
[0062] like Figure 1 As shown, this embodiment provides a processor automatic test control platform to solve the technical problem of memory limitation in full-function batch automatic testing of processors, which includes a host computer and a chip function test board.
[0063] The host computer includes the processor full-function batch automatic test host computer software controlled by the screen, debugger connection software C-SkyDebugServer and download debugging software CDK. The chip function test board includes the microcontroller, the processor to be tested and the FPGA.
[0064] The processor full-function batch automatic test host computer software is connected to the programmable power supply via a serial port. The programmable power supply is used to power the chip function test board. The processor full-function batch automatic test host computer software is connected to the processor under test via a serial port. The processor full-function batch automatic test host computer software is also connected to the processor under test via a USBCAN-E-mini. The processor full-function batch automatic test host computer software is connected to the microcontroller via a serial port. The debugger connection software C-SkyDebugServer is connected to the processor under test via JTAG. The debugger connection software C-SkyDebugServer is connected to the download debugging software CDK via a virtual network port.
[0065] Example 2
[0066] This embodiment provides a processor automatic test control method, which is implemented by a processor automatic test control platform, including the following steps:
[0067] Step 1: Split the embedded software on the processor under test on the chip functional test board into test subsets smaller than the processor's memory based on test functions, with each test subset corresponding to an ID. Because processor memory is limited and the executable program for the full-function test embedded software is too large to be burned and stored all at once, consideration is given to splitting the full-function test embedded software into test subsets smaller than the processor's memory based on test functions. Each test subset only needs to complete a single test item or multiple simple test items, and the test items in the test subset ultimately cover the full set of processor functions under test. Each test item in all test subsets has a unique ID, facilitating full-function batch automatic testing of the processor, controlled by the host computer software via an extensible test communication protocol. Splitting the embedded software test functions on the processor under test on the chip functional test board into test subsets smaller than the processor's memory is intended to produce a test project with independent test functions that can be burned into the processor. For example, the embedded software on the processor under test may need to complete test functions such as Coremark, Dhrystone, Cache, UART, Timer, and GPIO. However, due to the excessive number of integrated test functions, the test program occupies more space than the processor's memory, ultimately preventing integrated testing. The integrated test project is divided into test subsets based on functionality, creating separate projects for Coremark, Dhrystone, Cache, UART, Timer, and GPIO. These projects occupy less space than the processor's memory and can be downloaded for testing. Projects within a test subset are assigned uniform IDs. For example, in the example above, the Coremark project has ID 0x01, the Dhrystone project has ID 0x02, the Cache project has ID 0x03, the UART project has ID 0x04, the Timer project has ID 0x05, and the GPIO project has ID 0x06. The test subset IDs correspond to the 1-byte command type in the scalable test communication protocol, facilitating the differentiation and control of test items by the host computer software during automated batch testing of the processor's full functionality.
[0068] Step 2: Use the extensible test communication protocol to perform full-function batch automatic test of the host computer software. The effective data length of the control instructions, test results and test status data in the extensible test communication protocol are all variable length. The format of the extensible test communication protocol consists of a 4-byte frame header, a 2-byte frame count, a 2-byte frame length, a 1-byte command type, a 1-byte command identifier, a maximum of 20 bytes of effective data, a 4-byte frame tail and a 1-byte checksum (such as Figure 4 The command type indicates that the current transmission content is control instructions, test results, and test status data. The command identifier and the required bytes in the valid data constitute the ID of the test item subset. The required byte length of the valid data can be extended to cover the entire test item subset.
[0069] Step 3: Since the processor full-function batch automatic test host computer software, debugger connection software C-SkyDebugServer, and download debugging software CDK are installed on the host computer, the debugger connection software C-SkyDebugServer and download debugging software CDK can be called and controlled through screen control.
[0070] The steps for calling and controlling the debugger connection software C-SkyDebugServer and the download debugging software CDK are as follows: Step 3.1, locate the button operation points of the debugger connection software C-SkyDebugServer and the download debugging software CDK software interface in each operation process link in the program burning, and convert multiple human operation actions into their corresponding positioning coordinates; Step 3.2, establish a separate operation thread, simulate mouse movement and clicks, replace user operations, realize the switching of the debugger connection software C-SkyDebugServer and the download debugging software CDK and the button clicks in the program burning process; Step 3.3, wait for a certain time after simulating the mouse operation, and capture the screen. Obtain interface images of the debugger connection software C-SkyDebugServer and the download debugging software CDK, and use image processing technology to judge the software running results, based on the success or failure of the debugger connection software C-SkyDebugServer and the download debugging software CDK operation results; when the debugger connection software C-SkyDebugServer and the download debugging software CDK operation results are successful, the program will be burned; when the debugger connection software C-SkyDebugServer and the download debugging software CDK operation results are failed, a retry will be performed; step 3.4, repeat steps 3.2 and 3.3 until the computer completes the JTAG connection, local communication network establishment and program burning.
[0071] In step 4, since the debugger connection software C-SkyDebugServer and the downloadable debugging software CDK lack SDKs (software development kits) and output files, image processing techniques are used to determine whether the debugger connection software C-SkyDebugServer has successfully connected or whether the downloadable debugging software CDK has successfully downloaded. A comparison revealed significant differences in the operating status and symbol information displayed on the respective software interfaces for successful and failed processor chip connections, and for successful and failed program downloads.
[0072] The steps for determining whether the debugger is successfully connected to the C-SkyDebugServer software or whether the debugging software CDK is successfully downloaded using image processing technology are as follows: Step 4.1, using the region of interest method of image processing technology to obtain a local image of the running status and symbol area on the software interface in the image; Step 4.2, using image denoising and binarization methods to process the local image to remove noise and redundant information in the image; Step 4.3, using the contour search method to obtain contour information and geometric information in the processed local image; Step 4.4, using the contour information and geometric information in the local image, converting the image differences into the connection status results of the debugger connecting to the C-SkyDebugServer software and the download status results of the debugging software CDK.
[0073] Step 5: Return the debugger connection software C-SkyDebugServer connection result, or return the debugging software CDK download result.
[0074] Example 3
[0075] like Figure 3 As shown, a processor automatic test operation method is implemented based on a processor automatic test control platform, including the following steps:
[0076] Step a: Open the debugger, connect the software C-SkyDebugServer and download the debugging software CDK;
[0077] Step b: Open the full-function batch automatic test host computer software and start the automatic test of the processor chip;
[0078] Step c: Full-function batch automatic test of the host computer software to start the thread;
[0079] Step d: operate the control debugger to connect to the software C-SkyDebugServer or download the debugging software CDK;
[0080] Step e: Take a screenshot of the status of the debugger connecting to the C-SkyDebugServer software or downloading the debugging software CDK in step 4;
[0081] Step f, processing the state screenshot image of the debugger connection software C-SkyDebugServer or the downloaded debugging software CDK obtained in step 5, obtaining the geometry and contour information of the symbol image, and analyzing the running state;
[0082] Step g, judging the status of the debugger connecting to the software C-SkyDebugServer or downloading the debugging software CDK;
[0083] Step h: If the debugger successfully connects to the C-SkyDebugServer or downloads the CDK, it will return to the connection success or download success state.
[0084] If the debugger fails to connect to the C-SkyDebugServer or download the CDK, the system will return a connection failure or download failure status.
[0085] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. It is apparent that various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the present invention. Thus, the present invention is intended to encompass such modifications and variations as long as they fall within the scope of the claims and their equivalents.
Claims
1. A processor automatic test control method, wherein: The processor automatic test control platform includes a host computer and a chip function test board; The host computer includes the processor full-function batch automatic test host computer software controlled by the screen, debugger connection software C-SkyDebugServer and download debugging software CDK; The chip function test board includes a single-chip microcomputer, a processor to be tested, and an FPGA; in, The processor full-function batch automatic test host computer software is connected to the programmable power supply through the serial port, and the programmable power supply is used to power the chip function test board; The processor full-function batch automatic test host computer software is connected to the processor to be tested through the serial port; The host computer software for full-function batch automatic testing of processors is also connected to the processor under test via USBCAN-E-mini; The processor full-function batch automatic test host computer software is connected to the microcontroller through the serial port; The debugger connection software C-SkyDebugServer is connected to the processor under test via JTAG; The debugger connection software C-SkyDebugServer is connected to the download debugging software CDK through a virtual network port; it is characterized by being implemented through a processor automatic test control platform, including the steps of: Step 1: Split the embedded software on the processor to be tested on the chip function test board into test subsets smaller than the processor memory according to the test function, and each test subset corresponds to an ID; Step 2: Control the host computer software for batch automatic testing of the processor's full functions through an extensible test communication protocol; The effective data length of control instructions, test results and test status data in the scalable test communication protocol are all variable length; The format of the scalable test communication protocol consists of a 4-byte frame header, a 2-byte frame count, a 2-byte frame length, a 1-byte command type, a 1-byte instruction identifier, a maximum of 20 bytes of valid data, a 4-byte frame trailer, and a 1-byte checksum. The instruction identifier and the necessary bytes in the valid data constitute the ID of the test item subset; and the necessary byte length in the valid data can be extended to cover all test item subsets; Step 3: Call and control the debugger connection software C-SkyDebugServer and the downloaded debugging software CDK through screen control; Step 4: Use image processing technology to determine whether the debugger is connected to the C-SkyDebugServer software successfully, or whether the debugging software CDK is downloaded successfully; Step 5: Return the debugger connection result of the C-SkyDebugServer software, or return the download result of the debugging software CDK; In step 3, the steps for the debugger to connect to the software C-SkyDebugServer and download the debugging software CDK for calling and controlling are as follows: Step 3.1: Locate the button operation points of the debugger connection software C-SkyDebugServer and the download debugging software CDK software interface in each operation process link of the program burning, and convert multiple manual operation actions into their corresponding positioning coordinates; Step 3.2, establish a separate operation thread, simulate mouse movement and clicks, replace user operations, realize the switch between the debugger connection software C-SkyDebugServer and the downloaded debugging software CDK, and the button clicks in the program burning process; Step 3.3: After simulating the mouse operation, wait for a certain period of time, capture the interface images of the debugger connection software C-SkyDebugServer and the downloaded debugging software CDK by means of screen capture, and judge the software running results by image processing technology, according to the success or failure of the debugger connection software C-SkyDebugServer and the downloaded debugging software CDK operation results; When the debugger connects to the software C-SkyDebugServer and downloads the debugging software CDK, the program will be burned. When the debugger connects to the software C-SkyDebugServer and downloads the debugging software CDK, the program will be retried. Step 3.4, repeat steps 3.2 and 3.3 until the computer completes the JTAG connection, local communication network establishment and program burning; In step 4, the steps for judging whether the debugger is connected to the C-SkyDebugServer software successfully or whether the debugging software CDK is downloaded successfully are as follows: Step 4.1, using the region of interest method of image processing technology to obtain a local image of the operating status and symbol area on the software interface in the image; Step 4.2, remove noise and redundant information from the image; Step 4.3, using the contour search method to obtain the contour information and geometric information in the processed local image; In step 4.4, the difference in the image is converted into the connection status result of the debugger connection software C-SkyDebugServer and the download status result of the debugging software CDK through the contour information and geometric information in the local image.
2. The processor automatic test control method according to claim 1, characterized in that: The command type shows that the current transmission content is control instructions, test results and test status data.
3. A processor automatic test operation method, characterized in that: The method is implemented by the processor automatic test control platform described in claim 1, comprising the steps of: Step a: Open the debugger, connect the software C-SkyDebugServer and download the debugging software CDK; Step b: Open the full-function batch automatic test host computer software and start the automatic test of the processor chip; Step c: Full-function batch automatic test of the host computer software to start the thread; Step d: operate the control debugger to connect to the software C-SkyDebugServer or download the debugging software CDK; Step e: Take a screenshot of the status of the debugger connecting to the C-SkyDebugServer software or downloading the debugging software CDK in step 4; Step f, processing the state screenshot image of the debugger connection software C-SkyDebugServer or the downloaded debugging software CDK obtained in step 5, obtaining the geometry and contour information of the symbol image, and analyzing the running state; Step g, judging the status of the debugger connecting to the software C-SkyDebugServer or downloading the debugging software CDK; Step h: If the debugger successfully connects to the C-SkyDebugServer or downloads the CDK, it will return to the connection success or download success state. If the debugger fails to connect to the C-SkyDebugServer or download the CDK, the system will return a connection failure or download failure status.
Citation Information
Patent Citations
Automatic hardware testing method and automatic hardware testing system
CN102955723A
Data burning method of one-time programmable read-only memory (OTP ROM)
CN104598408A
Automatic software testing method and apparatus
CN104978270A