Test system execution method, device, equipment, system and storage medium
By turning on the in-position detection function of the PCIe switch in the automated test system, turning off the hot-swap interrupt function, and using the microcontroller unit to report the status information of the board and optical module, the system's differentiation in the implementation of PCIe resource pre-allocation and hot-swap of the board is solved, and the violent hot-swap of the board and the hot-restart of the test machine is realized, and the system's fault recovery ability and scalability are improved.
Patent Information
- Application Number
- CN202311255088.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-03-28
AI Technical Summary
There are differences in existing automated test systems in PCIe resource pre-allocation and board hot-swap implementations between the host and the test head, resulting in insufficient system failure recovery capabilities, scalability and flexibility.
The computer operating system enables the in-place detection function of the downstream port of the PCIe switch, turns off the hot-swap interrupt function, and polls the status information of the test board and optical module using the microcontroller unit, and reports it to the computer operating system to control the hot-swap service operation of the automated test system.
It realizes violent hot plugging of boards and hot restart of test machines in automated test systems, improves the system's timely recovery ability for faults, and enhances the scalability and flexibility of the test system.
Smart Images

Figure CN119718810A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated testing technology, and in particular to a test system execution method, device, equipment, system and storage medium. Background Art
[0002] In the field of ATE (Automated Test Equipment), with the increase of test capacity and test capability of test machines, the architecture of test machines is becoming more and more complex. Generally, a test head is composed of multiple business boards. The existing automated test system is usually composed of a host and a test head, and the host and the test head may also include a switch. The devices are connected through a high-speed serial computer expansion bus standard (Peripheral Component Interconnect express, PCIe) bus.
[0003] However, in the existing automated test system, when the computer operating system in the host is Windows, the pre-allocation of PCIe resources depends entirely on the system itself, and not all hosts support violent hot-plugging of boards. Some existing hosts are booted through the Basic Input Output System (BIOS), which can effectively identify the downstream port resources of the switch and allocate interrupt resources to achieve violent hot-plugging of boards. However, there are another part of the hosts that are booted through the Unified Extensible Firmware Interface (UEFI), which cannot accurately distinguish the upstream and downstream ports of the switch, and does not support the allocation of interrupt resources to the downstream ports. Secondly, due to the differences in the central processing unit (CPU) and chipsets between different hosts, the pre-allocation results of PCIe resources by different hosts will also be inconsistent.
[0004] Since different hosts implement violent hot swapping of boards differently, the system's ability to recover from failures in a timely manner is reduced, and the scalability and flexibility of the test system are reduced. Summary of the invention
[0005] The present invention provides a test system execution method, device, equipment, system and storage medium, which can realize hot plugging of test system boards and hot restart of test machines, ensure the timely recovery capability of the automated test system to faults, and improve the scalability and flexibility of the test system.
[0006] According to one aspect of the present invention, a test system execution method is provided, which is applied to an automated test system, wherein the automated test system includes a host and a test head; the host includes a computer and a first PCIe switch; the test head includes a backplane and at least one test board; the backplane includes a second PCIe switch and a microcontroller unit; the first PCIe switch and the second PCIe switch are connected via a PCIe bus; a port of the bus includes a plurality of optical modules; the method includes:
[0007] Through the computer operating system, enable the in-place detection function of the downstream port of the PCIe switch and disable the hot-swap interrupt function of the downstream port of the PCIe switch;
[0008] The microcontroller unit polls the status information of each test board and / or optical module, and reports the status information to the computer operating system after detecting a change in the status information;
[0009] The computer operating system is used to control the hot-swap service operation in the automated test system according to the status information.
[0010] According to another aspect of the present invention, a test system execution device is provided, which is applied to an automated test system, wherein the automated test system includes a host and a test head; the host includes a computer and a first PCIe switch; the test head includes a backplane and at least one test board; the backplane includes a second PCIe switch and a microcontroller unit; the first PCIe switch and the second PCIe switch are connected via a PCIe bus; a port of the bus includes a plurality of optical modules; the device includes:
[0011] The function control module is used to enable the in-place detection function of the downstream port of the PCIe switch and disable the hot plug interrupt function of the downstream port of the PCIe switch through the computer operating system;
[0012] An information polling module is used to poll the status information of each test board and / or optical module through the micro control unit, and report the status information to the computer operating system after detecting that the status information has changed;
[0013] The service control module is used to control the hot-swap service operation in the automated test system according to the status information through the computer operating system.
[0014] According to another aspect of the present invention, there is provided a computer device, comprising:
[0015] one or more processors;
[0016] A storage device for storing one or more programs;
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the test system execution method described in any embodiment of the present invention when executing the programs.
[0018] According to another aspect of the present invention, there is provided an automated testing system, the system comprising the host and the test head according to any embodiment of the present invention;
[0019] The computer in the host is connected to the first PCIe switch via a PCIe bus; the second PCIe switch and the microcontroller unit are connected to each test board via the PCIe bus respectively;
[0020] The micro control unit is connected to the computer via a network.
[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the test system execution method described in any embodiment of the present invention is implemented.
[0022] The technical solution provided by the embodiment of the present invention is to open the in-place detection function of the downstream port of the PCIe switch through the computer operating system, close the hot plug function of the downstream port of the PCIe switch, poll the status information of each test board and / or optical module through the micro control unit, and after detecting that the status information has changed, report the status information to the computer operating system, and control the hot plug service operation in the automated test system according to the status information through the computer operating system. The technical means can make the computer no longer allocate interrupt resources for the downstream port of the PCIe switch, that is, when the board or optical module is inserted / removed in the test system, the PCIe switch can no longer actively respond to the hot plug transaction. Therefore, even if different computers have differences in the realization of hot plug of the board, the status information after the change of each test board and / or optical module can still be reported to the computer operating system through the micro control unit, so that the computer operating system can control the hot plug service operation in the automated test system according to the status information. Thus, the violent hot plug of the board in the automated test system and the hot restart of the test machine can be realized, the timely recovery capability of the automated test system to the fault is guaranteed, and the expansibility and flexibility of the test system are improved.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 It is a structural schematic diagram of an automated testing system in the prior art;
[0026] Figure 2 is a flow chart of a test system execution method provided according to an embodiment of the present invention;
[0027] Figure 3 is a structural schematic diagram of an automated testing system provided according to an embodiment of the present invention;
[0028] Figure 4 is a flow chart of another test system execution method provided in an embodiment of the present invention;
[0029] Figure 5 is a schematic diagram of a scenario applicable to a test system execution method provided in an embodiment of the present invention;
[0030] Figure 6 is a flow chart of another test system execution method provided in an embodiment of the present invention;
[0031] Figure 7 is a schematic diagram of a scenario applicable to another test system execution method provided in an embodiment of the present invention;
[0032] Figure 8 is a flow chart of another test system execution method provided in an embodiment of the present invention;
[0033] Fig. 9 is a schematic diagram of a scenario applicable to another test system execution method provided in an embodiment of the present invention;
[0034] Fig.10 is a flow chart of another test system execution method provided in an embodiment of the present invention;
[0035] Fig.11 is a schematic diagram of a scenario applicable to another test system execution method provided in an embodiment of the present invention;
[0036] Fig.12 is a structural schematic diagram of a test system execution device provided according to an embodiment of the present invention;
[0037] Fig.13 It is a structural diagram of a computer device for implementing the test system execution method of an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not 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 should fall within the scope of protection of the present invention.
[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0040] Hot-Plugging or Hot Swap is live plugging and unplugging, which allows users to remove or insert boards without shutting down the system or cutting off the power, thereby improving the system's ability to recover from failures in a timely manner, scalability, and flexibility. There are two types of hot-plugging: notification hot-plugging and violent hot-plugging. Notification hot-plugging requires the system to be notified through software instructions first. After the system software is ready, it notifies the user and then completes the operation of inserting or removing the board. Violent hot-plugging is the operation of directly inserting or removing the board without any notification.
[0041] In the existing automated test system, not all hosts support violent hot swapping of boards. Some hosts can identify the downstream port resources of the switch and allocate interrupt resources to realize the violent hot swapping function of boards. However, some hosts cannot accurately distinguish the upstream and downstream ports of the switch, and do not support the allocation of interrupt resources to the downstream ports, so the violent hot swapping function of boards cannot be fully realized.
[0042] Figure 1 It is a structural diagram of an automated testing system in the prior art. Figure 1As shown, the test system can be composed of a host and a test head. The host includes a personal computer (PC) and a switch. The test head includes a switch and multiple test boards (EndPoint). Each device is connected via a PCIe bus. Figure 1 In the test, if the computer is booted through BIOS and can effectively identify the downstream port resources of the switch and then allocate interrupt resources, the automated test system can realize the violent hot swap function of the board. On the contrary, if the computer is booted through UEFI and cannot accurately distinguish the upstream and downstream ports of the switch, and does not support the allocation of interrupt resources to the downstream ports, the automated test system will not be able to fully realize the violent hot swap function of the board. This reduces the ability of the automated test system to recover from faults in a timely manner and reduces the scalability and flexibility of the test system.
[0043] Embodiment 1
[0044] Figure 2 This is a flow chart of a test system execution method provided in the first embodiment of the present invention. This embodiment is applicable to the case where an automatic test system implements hot swapping of boards and test heads. The method can be executed by a test system execution device, which can be implemented in the form of hardware and / or software. The test system execution device can be configured in an automated test system. The structural diagram of the automated test system is shown in FIG. Figure 3 As shown, the automated test system includes a host and a test head; the host includes a computer (PC) and a first PCIe switch; the test head includes a backplane and at least one test board (End Point); the backplane includes a second PCIe switch and a microcontroller unit (MCU); the first PCIe switch and the second PCIe switch are connected via a PCIe bus; and the port of the bus includes a plurality of optical modules.
[0045] like Figure 2 As shown, the test system execution method includes:
[0046] Step 110: Enable the in-place detection function of the downstream port of the PCIe switch and disable the hot-plug interrupt function of the downstream port of the PCIe switch through the computer operating system.
[0047] In this embodiment, specifically, the slot control register and slot status register corresponding to the PCIe switch can be initialized through the computer operating system to ensure that the present detection enable of the PCIe switch is set to 1 to enable the in-place detection function of the downstream port of the PCIe switch. At the same time, the hot plug interrupt enable of the PCIe switch can also be set to 0 through the computer operating system to disable the hot plug interrupt function of the downstream port of the PCIe switch. In addition, the computer operating system is also used to disable other functions related to hot plugging in the PCIe switch.
[0048] Step 120: poll the status information of each test board and / or optical module through the micro control unit, and report the status information to the computer operating system after detecting that the status information has changed.
[0049] In this embodiment, specifically, the microcontroller unit can obtain the status information corresponding to each test board, or optical module, or the test board and the optical module at the same time through a general-purpose input / output (GPIO) port, and after detecting that the status information has changed, report the status information to the computer operating system.
[0050] In a specific embodiment, the state information may include a present signal and a power good signal. The present signal indicates whether the board or optical module is in place, and the power good signal indicates power supply characteristics.
[0051] Step 130: Control the hot-swap service operation in the automated test system according to the status information through the computer operating system.
[0052] In this embodiment, the computer operating system can identify the insertion events and removal events corresponding to the board and / or optical module based on the status information, and control the hot plug service operation in the automated test system based on the events, thereby realizing the hot plug of the board and hot restart of the test machine.
[0053] In the present embodiment, by disposing a micro-control unit on the backplane in the test head, closing the hot-plug interrupt function of the downstream port of the PCIe switch, and reporting the status information of each test board and / or optical module to the computer operating system by the micro-control unit, the computer can no longer allocate interrupt resources for the downstream port of the PCIe switch. That is, when inserting / removing a board or optical module in the test system, the PCIe switch can no longer actively respond to hot-plug transactions. Therefore, even if different computers have differences in the realization of hot-plugging of boards, the status information after the changes of each test board and / or optical module can still be reported to the computer operating system by the micro-control unit, so that the computer operating system can control the hot-plug service operation in the automated test system according to the status information, thus realizing the violent hot-plugging of boards and the hot restart of the test machine in the automated test system.
[0054] The technical solution provided by the embodiment of the present invention enables the in-place detection function of the downstream port of the PCIe switch and disables the hot-swap function of the downstream port of the PCIe switch through a computer operating system, polls the status information of each test board and / or optical module through a microcontroller unit, and reports the status information to the computer operating system after detecting that the status information has changed. Through the computer operating system, a technical means for controlling the operation of the hot-swap service in the automated test system according to the status information can be used to realize violent hot-swap of boards in the automated test system and hot restart of the test machine, thereby ensuring the timely recovery capability of the automated test system to faults and improving the scalability and flexibility of the test system.
[0055] In actual applications, when a board in a test head in an automated test system is damaged, the prior art requires the automated test system to be powered off and then the damaged board to be replaced. Compared with the prior art, the technical solution of this embodiment can extend the working time of the test head and facilitate maintenance of the test system by implementing violent hot swapping of the board through the above means.
[0056] Secondly, the existing automated test system needs to power on the boards in all slots of the test head during testing. Even if the test items do not require testing of all slots, the existing system cannot realize the arbitrary disassembly of the boards. Compared with the prior art, the technical solution of this embodiment can dynamically configure the boards in each slot of the test head after realizing the violent hot plugging of boards by the above means, thereby saving the resource consumption caused by the test system during the test process. In addition, the above-mentioned test system execution method can support violent hot plugging of boards and test heads without causing damage to the test machine. Therefore, when the boards or test heads are violently pulled out accidentally, they will not be seriously damaged, thereby ensuring the smooth progress of the test.
[0057] Embodiment 2
[0058] Figure 4 This is a flow chart of a test system execution method provided in the second embodiment of the present invention. This embodiment further refines the board insertion process in the above embodiment. Figure 5 A schematic diagram of a scenario applicable to a test system execution method provided in Embodiment 2 of the present invention. Figure 4 As shown, the method includes:
[0059] Step 210: Enable the in-place detection function of the downstream port of the PCIe switch and disable the hot-plug interrupt function of the downstream port of the PCIe switch through the computer operating system.
[0060] In this embodiment, after the hot-plug interrupt function of the downstream port of the PCIe switch and other functions related to hot-plug are disabled, the downstream port of the PCIe switch may be initialized through the computer operating system.
[0061] Step 220: poll the presence signal and power status signal of each test board through the micro control unit, and when a new board is inserted into the test head based on the presence signal and the power status signal, report the status information of the new board to the computer operating system.
[0062] Step 230, through the computer operating system, read the slot status register according to the status information of the new board, and determine whether the link status in the test system has changed according to the reading result; if so, load the board driver corresponding to the new board through the operating system, and reset the maximum payload corresponding to each link.
[0063] In this embodiment, if the link status in the test system changes, the computer operating system can call the system command pnputil / scan-devices to load the board driver corresponding to the new board. At the same time, in order to ensure smooth communication of each link in the test system, the maximum payload size (MPS) of each link can also be reset through the computer operating system.
[0064] The technical solution provided by the embodiment of the present invention is to enable the in-place detection function of the downstream port of the PCIe switch and disable the hot plug function and other functions related to hot plug of the downstream port of the PCIe switch through a computer operating system (OS); the system initializes the downstream port of the PCIe switch according to demand; the microcontroller unit polls the in-place signal and power status signal of each test board, and detects that a new board is inserted into the test head according to the in-place signal and the power status signal (for example, the microcontroller unit detects that the in-place signal of the test board is set and the voltage status signal is set), reports the status information of the new board to the computer operating system, reads the slot status register according to the status information of the new board through the computer operating system, and judges whether the link status in the test system has changed according to the reading result; if so, the board driver corresponding to the new board is loaded through the operating system, and the technical means of resetting the maximum effective load corresponding to each link can realize the violent hot insertion of the test system board, ensure the timely recovery capability of the automated test system to faults, and improve the scalability and flexibility of the test system.
[0065] Embodiment 3
[0066] Figure 6 This is a flow chart of a test system execution method provided in Embodiment 3 of the present invention. This embodiment further refines the process of removing the board in the above embodiment. Figure 7 A schematic diagram of a scenario applicable to a test system execution method provided in Embodiment 3 of the present invention. Figure 6 As shown, the method includes:
[0067] Step 310: Enable the in-place detection function of the downstream port of the PCIe switch and disable the hot-plug interrupt function of the downstream port of the PCIe switch through the computer operating system.
[0068] In this embodiment, after the hot-plug interrupt function of the downstream port of the PCIe switch and other functions related to hot-plug are disabled, the downstream port of the PCIe switch may be initialized through the computer operating system.
[0069] Step 320: poll the presence signal and power status signal of each test board through the micro control unit, and report the status information of the target board to the operating system when detecting that the target board in the test head is removed based on the presence signal and the power status signal.
[0070] In this embodiment, if the micro control unit detects that the target board in the test head is removed, the status information of the target board may be reported to the operating system through a preset network interface.
[0071] Step 330, through the computer operating system, read the slot status register according to the status information of the target board, and determine whether the link status in the test system has changed according to the reading result; if so, uninstall the board driver corresponding to the target board through the operating system, and reset the downstream ports of each PCIe switch.
[0072] In this embodiment, if the link status in the test system changes, the computer operating system can call the system command pnputil / scan-devices to uninstall the board driver corresponding to the target board and reset the downstream ports of each PCIe switch.
[0073] The technical solution provided by the embodiment of the present invention is to enable the in-place detection function of the downstream port of the PCIe switch through the computer operating system, disable the hot plug function of the downstream port of the PCIe switch, poll the in-place signal and the power status signal of each test board through the micro control unit, and when it is detected that the target board in the test head is removed according to the in-place signal and the power status signal, the status information of the target board is reported to the operating system, and the slot status register is read according to the status information of the target board through the computer operating system, and it is judged according to the reading result whether the link status in the test system has changed; if so, the board driver corresponding to the target board is uninstalled through the operating system, and the downstream ports of each PCIe switch are reset. The technical means can realize the violent hot removal of the test system board, ensure the timely recovery capability of the automated test system to faults, and improve the expansibility and flexibility of the test system.
[0074] Embodiment 4
[0075] Figure 8 This is a flow chart of a test system execution method provided in Embodiment 4 of the present invention. This embodiment further refines the process of test head insertion in the above embodiment. Fig. 9 A schematic diagram of a scenario applicable to a test system execution method provided in Embodiment 4 of the present invention. Figure 8 As shown, the method includes:
[0076] Step 410: Enable the in-place detection function of the downstream port of the PCIe switch and disable the hot-plug interrupt function of the downstream port of the PCIe switch through the computer operating system.
[0077] In this embodiment, after disabling the hot-plug interrupt function of the downstream port of the PCIe switch and other functions related to hot-plugging, the PCIe resources corresponding to each PCIe switch can be allocated during the startup phase of the computer operating system.
[0078] Step 420: poll the link status of each optical module through the micro control unit, and when it is detected based on the link status that the test head is reinserted into the host, report the insertion event corresponding to the test head to the computer operating system.
[0079] In a specific embodiment, the link status of each optical module can be obtained by the microcontroller unit according to the IO pin, and then the link corresponding to each optical module can be judged whether it is connected by reading the loss of signal indicator (LOS indicator) in the register. If the LOS indicator reports an error for a long time, it can be considered that the optical module is removed; conversely, if it does not report an error for a long time, it can be considered that the link corresponding to the optical module is connected.
[0080] Step 430, through the computer operating system, read the host downstream port link status register according to the insertion event, and determine whether the link status corresponding to the host meets the preset requirements based on the reading result; if so, load the driver corresponding to the board on the test head through the operating system, and reconfigure the routing table items corresponding to each PCIe switch.
[0081] In this embodiment, after the computer operating system receives the insertion event, the link status may not meet the preset requirements due to the inconsistent insertion time of each optical module. Therefore, it is necessary to read the host downstream port link status register. If the link status meets the preset requirements, call the system command pnputil / scan-devices to load the driver corresponding to the test head. After the driver is successfully loaded, the computer operating system can re-send PCIe configuration messages (such as bus, bar space, and MSI interrupt resources, etc.) to each board, and generate routing table entries corresponding to each PCIe switch according to the configuration message.
[0082] In one implementation of this embodiment, judging whether the status of each link corresponding to the host meets the preset requirements according to the reading results includes: judging whether the width and link speed of each link corresponding to the host meet the preset requirements according to the reading results.
[0083] In a specific embodiment, after determining whether the link status corresponding to the host meets the preset requirements based on the reading results, it also includes: if not, restarting the host port according to the registers corresponding to each PCIe switch, and controlling each link interface to negotiate until the link status meets the preset requirements.
[0084] The technical solution provided by the embodiment of the present invention enables the in-place detection function of the downstream port of the PCIe switch and disables the hot-swap function of the downstream port of the PCIe switch through a computer operating system, polls the link status of each optical module through a microcontroller unit, and detects that the test head is reinserted into the host according to the link status, reports the insertion event corresponding to the test head to the computer operating system, reads the host downstream port link status register according to the insertion event through the computer operating system, and judges whether the respective link statuses corresponding to the host meet the preset requirements according to the reading result; if so, the driver corresponding to the board on the test head is loaded through the operating system, and the technical means of reconfiguring the routing table items corresponding to each PCIe switch can be used to realize the hot restart of the test machine, ensure the timely recovery capability of the automated test system to faults, and improve the scalability and flexibility of the test system.
[0085] Embodiment 5
[0086] Fig.10 This is a flow chart of a test system execution method provided in Embodiment 5 of the present invention. This embodiment further refines the process of removing the test head in the above embodiment. Fig.11 A schematic diagram of a scenario applicable to a test system execution method provided in Embodiment 5 of the present invention. Fig.10 As shown, the method includes:
[0087] Step 510: Enable the in-place detection function of the downstream port of the PCIe switch and disable the hot-plug interrupt function of the downstream port of the PCIe switch through the computer operating system.
[0088] In this embodiment, after disabling the hot-plug interrupt function of the downstream port of the PCIe switch and other functions related to hot-plugging, the PCIe resources corresponding to each PCIe switch can be allocated during the startup phase of the computer operating system.
[0089] Step 520: poll the link status of each optical module through the micro control unit, and when it is detected that the test head is removed according to the link status, report the removal event corresponding to the test head to the computer operating system.
[0090] In this embodiment, the link state of the optical module may include an insertion state and a power-on state.
[0091] Step 530: read the host downstream port link status register according to the removal event through the computer operating system, and determine whether the status of each link corresponding to the host has changed according to the reading result; if so, uninstall the driver corresponding to the board on the test head through the operating system, and reset the downstream ports of each PCIe switch.
[0092] In this embodiment, specifically, if the link status corresponding to the host changes, the system command pnputil / scan-devices may be called to uninstall the driver corresponding to the board on the test head.
[0093] The technical solution provided by the embodiment of the present invention enables the in-place detection function of the downstream port of the PCIe switch and disables the hot plug function of the downstream port of the PCIe switch through a computer operating system, polls the link status of each optical module through a microcontroller unit, and when the test head is detected to be removed according to the link status, reports a removal event corresponding to the test head to the computer operating system, reads the host downstream port link status register according to the removal event through the computer operating system, and determines whether the states of each link corresponding to the host have changed according to the reading result; if so, uninstalls the driver corresponding to the board on the test head through the operating system, resets the downstream ports of each PCIe switch, and scans the board and updates the device resource table. The technical means can realize the hot removal of the test machine, ensure the timely recovery capability of the automated test system to faults, and improve the scalability and flexibility of the test system.
[0094] Embodiment 6
[0095] Fig.12 A structural schematic diagram of a test system execution device provided for Embodiment 6 of the present invention is applied to the automated test system described in any embodiment of the present invention, wherein the automated test system includes a host and a test head; the host includes a computer and a first PCIe switch; the test head includes a backplane and at least one test board; the backplane includes a second PCIe switch and a microcontroller unit; the first PCIe switch and the second PCIe switch are connected via a PCIe bus; the port of the bus includes a plurality of optical modules. The device includes: a function control module 610, an information polling module 620, and a service control module 630.
[0096] The function control module 610 is used to enable the in-place detection function of the downstream port of the PCIe switch and disable the hot-plug interrupt function of the downstream port of the PCIe switch through the computer operating system;
[0097] The information polling module 620 is used to poll the status information of each test board and / or optical module through the micro control unit, and report the status information to the computer operating system after detecting that the status information changes;
[0098] The service control module 630 is used to control the hot-swap service operation in the automated test system according to the status information through the computer operating system.
[0099] The technical solution provided by the embodiment of the present invention enables the in-place detection function of the downstream port of the PCIe switch and disables the hot-swap function of the downstream port of the PCIe switch through a computer operating system, polls the status information of each test board and / or optical module through a microcontroller unit, and reports the status information to the computer operating system after detecting that the status information has changed. Through the computer operating system, a technical means for controlling the operation of the hot-swap service in the automated test system according to the status information can be used to realize violent hot-swap of boards in the automated test system and hot restart of the test machine, thereby ensuring the timely recovery capability of the automated test system to faults and improving the scalability and flexibility of the test system.
[0100] Based on the above embodiment, the information polling module 620 includes:
[0101] A new board detection unit is used to poll the presence signal and power status signal of each test board through the micro control unit, and when a new board is inserted into the test head according to the presence signal and the power status signal, report the status information of the new board to the computer operating system;
[0102] The board removal detection unit is used to poll the presence signal and power status signal of each test board through the micro control unit, and when it detects that the target board in the test head is removed according to the presence signal and the power status signal, report the status information of the target board to the operating system;
[0103] The test head insertion detection unit is used to poll the link status of each optical module through the micro control unit, and when the test head is reinserted into the host according to the link status, the insertion event corresponding to the test head is reported to the computer operating system;
[0104] The test head removal detection unit is used to poll the link status of each optical module through the micro control unit, and when the test head is detected to be removed according to the link status, report the removal event corresponding to the test head to the computer operating system.
[0105] The service control module 630 includes:
[0106] The card driver loading unit is used to read the slot status register according to the status information of the new card through the computer operating system, and judge whether the link status in the test system has changed according to the reading result; if so, load the card driver corresponding to the new card through the operating system, and reset the maximum payload corresponding to each link;
[0107] The card driver unloading unit is used to read the slot status register according to the status information of the target card through the computer operating system, and judge whether the link status in the test system has changed according to the reading result; if so, the card driver corresponding to the target card is unloaded through the operating system, and the downstream port of each PCIe switch is reset;
[0108] The test head driver loading unit is used to read the host downstream port link status register according to the insertion event through the computer operating system, and judge whether the status of each link corresponding to the host meets the preset requirements according to the reading result; if so, load the driver corresponding to the board on the test head through the operating system, and reconfigure the routing table items corresponding to each PCIe switch;
[0109] The link judgment unit is used to judge whether the link width and link speed corresponding to the host meet the preset requirements according to the reading result; if not, restart the host port according to the register corresponding to each PCIe switch, and control each link interface to negotiate until the status of each link meets the preset requirements;
[0110] The test head driver unloading unit is used to read the host downstream port link status register according to the removal event through the computer operating system, and determine whether the status of each link corresponding to the host has changed according to the reading result; if so, the driver corresponding to the board on the test head is unloaded through the operating system, and the downstream port of each PCIe switch is reset.
[0111] The above device can execute the methods provided by all the above embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing the above methods. For technical details not fully described in the embodiments of the present invention, please refer to the methods provided by all the above embodiments of the present invention.
[0112] Embodiment 7
[0113] Fig.13 A schematic diagram of a computer device 10 that can be used to implement an embodiment of the present invention is shown. The computer device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The computer device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0114] like Fig.13As shown, the computer device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the computer device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0115] A number of components in the computer device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the computer device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0116] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the test system execution method.
[0117] In some embodiments, the test system execution method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the computer device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the test system execution method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the test system execution method in any other appropriate manner (e.g., by means of firmware).
[0118] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0119] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0120] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0121] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0122] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0123] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0124] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0125] Embodiment 8
[0126] Figure 31 is a schematic diagram of the structure of an automated test system provided according to an embodiment of the present invention. The automated test system includes a host and a test head as described in any embodiment of the present invention. The computer in the host is connected to the first PCIe switch via a PCIe bus; the second PCIe switch and the microcontroller unit are connected to each test board via a PCIe bus; and the microcontroller unit and the computer are connected via a network.
[0127] Specifically, the micro control unit can be connected to the computer via Transmission Control Protocol / Internet Protocol (TCP / IP).
[0128] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A test system execution method, characterized in that: Applied in an automated test system, the automated test system comprises a host and a test head; the host comprises a computer and a first PCIe switch; the test head comprises a backplane and at least one test board; the backplane comprises a second PCIe switch and a micro control unit; The first PCIe switch and the second PCIe switch are connected via a PCIe bus; The port of the bus includes a plurality of optical modules; the method includes: Through the computer operating system, enable the in-place detection function of the downstream port of the PCIe switch and disable the hot-swap interrupt function of the downstream port of the PCIe switch; By means of the microcontroller unit, the status information of each test board and / or optical module is polled, and after detecting a change in the status information, the status information is reported to the computer operating system; The computer operating system is used to control the hot-swap service operation in the automated test system according to the status information.
2. The method according to claim 1, characterized in that By means of the microcontroller unit, the status information of each test board and / or optical module is polled, and after detecting that the status information changes, the status information is reported to the computer operating system, including: The microcontroller unit polls the in-position signal and the power status signal of each test board, and when a new board is inserted into the test head according to the in-position signal and the power status signal, reports the status information of the new board to the computer operating system; By means of the computer operating system, the hot-swap service operation in the automated test system is controlled according to the state information, including: Reading the slot status register according to the status information of the new board through the computer operating system, and judging whether the link status in the test system has changed according to the reading result; If so, the board driver corresponding to the new board is loaded through the operating system, and the maximum effective load corresponding to each link is reset.
3. The method according to claim 1, characterized in that By means of the microcontroller unit, the status information of each test board and / or optical module is polled, and after detecting that the status information changes, the status information is reported to the computer operating system, including: The microcontroller unit polls the in-position signal and the power status signal of each test board, and when it is detected that the target board in the test head is removed according to the in-position signal and the power status signal, the status information of the target board is reported to the operating system; By means of the computer operating system, the hot-swap service operation in the automated test system is controlled according to the state information, including: By means of the computer operating system, the slot status register is read according to the status information of the target board, and it is determined whether the link status in the test system has changed according to the reading result; If yes, the board driver corresponding to the target board is uninstalled through the operating system, and the downstream ports of each PCIe switch are reset.
4. The method according to claim 1, characterized in that: By means of the microcontroller unit, the status information of each test board and / or optical module is polled, and after detecting that the status information changes, the status information is reported to the computer operating system, including: The microcontroller unit polls the link status of each optical module, and when the test head is detected to be reinserted into the host according to the link status, an insertion event corresponding to the test head is reported to the computer operating system; By means of the computer operating system, the hot-swap service operation in the automated test system is controlled according to the state information, including: Through the computer operating system, according to the insertion event, the host downstream port link status register is read, and according to the reading result, it is determined whether the status of each link corresponding to the host meets the preset requirements; If yes, the driver corresponding to the board on the test head is loaded through the operating system, and the routing table items corresponding to each PCIe switch are reconfigured.
5. The method according to claim 1, characterized in that By means of the microcontroller unit, the status information of each test board and / or optical module is polled, and after detecting that the status information changes, the status information is reported to the computer operating system, including: The micro control unit polls the link status of each optical module, and when the removal of the test head is detected according to the link status, the removal event corresponding to the test head is reported to the computer operating system; By means of the computer operating system, the hot-swap service operation in the automated test system is controlled according to the state information, including: By means of the computer operating system, according to the removal event, the host downstream port link status register is read, and according to the reading result, it is determined whether the status of each link corresponding to the host has changed; If yes, the driver corresponding to the board on the test head is uninstalled through the operating system, and the downstream ports of each PCIe switch are reset.
6. The method according to claim 4, characterized in that According to the read results, it is determined whether the status of each link corresponding to the host meets the preset requirements, including: According to the reading result, it is determined whether the link width and link speed corresponding to the host meet the preset requirements; After judging whether the status of each link corresponding to the host meets the preset requirements according to the reading result, the following is also included: If not, the host port is restarted according to the registers corresponding to each PCIe switch, and each link interface is controlled to negotiate until the status of each link meets the preset requirements.
7. A test system execution device, characterized in that: Applied in an automated test system, the automated test system comprises a host and a test head; the host comprises a computer and a first PCIe switch; the test head comprises a backplane and at least one test board; the backplane comprises a second PCIe switch and a micro control unit; The first PCIe switch and the second PCIe switch are connected via a PCIe bus; The port of the bus includes a plurality of optical modules; the device includes: The function control module is used to enable the in-place detection function of the downstream port of the PCIe switch and disable the hot plug interrupt function of the downstream port of the PCIe switch through the computer operating system; An information polling module is used to poll the status information of each test board and / or optical module through the micro control unit, and report the status information to the computer operating system after detecting that the status information has changed; The service control module is used to control the hot-swap service operation in the automated test system according to the status information through the computer operating system.
8. A computer device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the test system execution method according to any one of claims 1 to 6 when executing the programs.
9. An automated testing system, comprising the host and the test head according to any one of claims 1 to 6; characterized in that: The computer in the host is connected to the first PCIe switch via a PCIe bus; the second PCIe switch and the microcontroller unit are connected to each test board via the PCIe bus respectively; The micro control unit is connected to the computer via a network.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the test system execution method as described in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Hot plug control system and method, electronic equipment and storage medium
CN120508521A