A server and a distributed hardware control system thereof

By employing a distributed hardware control system in the server and utilizing switching circuits to control the upgrade interface of programmable logic devices, the communication efficiency of the CPLD and the effective execution of firmware upgrades are ensured without consuming excessive interface resources. This solves the problems of I2C address conflicts and bus congestion in existing technologies and improves the reliability of the system structure.

CN123157648APending Publication Date: 2026-11-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611659563.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-26
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In a server, how can we ensure the communication efficiency of the CPLD and the effective execution of firmware upgrades without consuming too many interface resources, and avoid communication problems caused by I2C address conflicts or bus congestion?

Method used

A distributed hardware control system is adopted. By connecting the communication interface and upgrade interface of each programmable logic device to the same communication bus, and using a switching circuit to control the on and off of the upgrade interface, it is ensured that each device has a different communication address and the same upgrade address. The main controller distinguishes access through the communication address and conducts the switching circuit to perform firmware upgrade when needed.

Benefits of technology

This approach improves the communication efficiency and firmware upgrade reliability of the CPLD while sharing bus resources and interfaces, avoids address conflicts and bus congestion, and reduces system architecture risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157648A_ABST
    Figure CN123157648A_ABST
Patent Text Reader

Abstract

This application discloses a server and its distributed hardware control system, applied in the field of computer technology. It includes: multiple programmable logic devices (PLDs) and multiple corresponding switching circuits; the communication interfaces of each PLD are connected to the same communication bus of the main controller, and each upgrade interface is connected to the communication bus through a corresponding switching circuit; the communication addresses of each PLD are different, but their upgrade addresses are the same; the PLDs are used to: receive an upgrade command sent by the main controller through their own communication interface, control the corresponding switching circuit to turn on, and receive firmware upgrade data sent by the main controller according to the upgrade address and perform firmware upgrade through the turned-on switching circuit and their own upgrade interface. This application's solution, while reducing bus resources and interface usage, enables normal communication between PLDs and selective firmware upgrades, while ensuring reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a server and its distributed hardware control system. Background Technology

[0002] In servers and other devices, the increasing richness and complexity of functions have led to a significant increase in the demand for logic resources and I / O (Input / Output) resources of CPLDs (Complex Programmable Logic Devices). Distributed architectures with multiple CPLDs are gradually becoming the mainstream solution. One current approach is to connect each CPLD directly and independently to a dedicated I2C (Inter-Integrated Circuit) line of the BMC (Baseboard Management Controller). The BMC can manage each CPLD in parallel, and in scenarios where multiple CPLDs need firmware updates, the upgrade operation can be performed synchronously, fundamentally avoiding communication problems caused by I2C address conflicts or bus congestion between CPLDs. However, this approach requires a significant amount of BMC interface resources.

[0003] Therefore, how to ensure the communication efficiency of the CPLD and the effective execution of firmware upgrades, as well as the reliability of the system structure, without consuming excessive interface resources, is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] This application provides a server and its distributed hardware control system to ensure the communication efficiency of the CPLD and the effective execution of firmware upgrades without consuming excessive interface resources, thereby ensuring the reliability of the system structure.

[0005] This application provides a distributed hardware control system, including: a plurality of programmable logic devices and a plurality of switching circuits corresponding one-to-one with the plurality of programmable logic devices; Each of the programmable logic devices has its own communication interface and upgrade interface. Each of the communication interfaces is connected to the same communication bus of the main controller, and each of the upgrade interfaces is connected to the communication bus through a corresponding switching circuit. Each of the switch circuits has a control terminal connected to a corresponding programmable logic device, and by default, each programmable logic device controls its corresponding switch circuit to be in the off state; the communication addresses of each programmable logic device are different from each other, and the upgrade addresses of each programmable logic device are the same, but the upgrade addresses are different from each of the communication addresses; Any programmable logic device is configured to: receive an upgrade command sent by the main controller through its own communication interface, control the corresponding switching circuit to be turned on, and receive firmware upgrade data sent by the main controller according to the upgrade address and perform firmware upgrade through the turned-on switching circuit and its own upgrade interface.

[0006] This application also provides a server, including a main controller and a distributed hardware control system as described above.

[0007] Applying the technical solution provided in this application, the communication interfaces of multiple programmable logic devices are all connected to the same communication bus of the main controller, and the communication addresses of each programmable logic device are different. Therefore, the main controller can distinguish and access each programmable logic device through its communication address, reducing bus resources and the interface occupation of the main controller. Furthermore, it can be seen that this application does not use a centralized bus switch, thus reducing risk and ensuring the reliability of the system structure. To ensure the effective implementation of the firmware upgrade function, the upgrade interface of each programmable logic device in this application is connected to the communication bus through a corresponding switch circuit. The switch circuit is controlled by the corresponding programmable logic device and remains off by default, disconnecting upgrade interfaces with the same upgrade address from the communication bus. When no upgrade is needed, the normal communication between the main controller and each programmable logic device will not be affected. When an upgrade is required, the programmable logic device to be upgraded can receive the upgrade command through its own communication interface and activate the corresponding switch circuit. The main controller can then send firmware upgrade data to the programmable logic device according to a unified upgrade address. Since the remaining switch circuits remain off by default, access conflicts caused by the same upgrade address can be avoided. In addition, the upgrade address is different from each other communication address, which makes upgrade access different from daily communication addressing.

[0008] Therefore, it can be seen that the proposed solution, while sharing the same communication bus, thereby reducing bus resources and the interface occupation of the main controller, can realize normal communication and selective firmware upgrades of various programmable logic devices, and does not require a centralized bus switch for channel management, thus ensuring the reliability of the system structure. Attached Figure Description

[0009] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1This is a schematic diagram of a BMC with multiple CPLDs mounted under one I2C channel in one embodiment. Figure 2 This is a schematic diagram of the structure of a distributed hardware control system provided in a specific embodiment of the present invention; Figure 3 A schematic diagram of the structure of a distributed hardware control system provided in another specific embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a distributed hardware control system provided in another specific embodiment of the present invention. Detailed Implementation

[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0012] It should be noted that in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence. To enable those skilled in the art to better understand the present application, the following detailed description, in conjunction with the accompanying drawings and specific embodiments, further illustrates the present application.

[0013] See also Figure 1 This diagram illustrates one specific implementation where multiple CPLDs are connected to the same I2C bus on the BMC. To ensure each CPLD has an independent communication address and firmware upgrade address to avoid communication failures and upgrade errors, this implementation uses a bus switch between the BMC and each CPLD. Figure 1Specifically, this involves the I2C switch PCA9548. Using this I2C switch, multiple CPLDs can be connected to different channels of the switch, saving interface resources. However, the most direct impact of this approach is increased communication latency and decreased throughput efficiency. This is because channel switching is required when accessing different CPLDs, and after switching, the I2C bus needs a significant stabilization time to eliminate voltage jitter. Furthermore, the communication paths of all CPLDs rely on the same bus switch, which serves as the sole hub connecting the BMC and all CPLDs. Its failure will affect communication between all downstream CPLDs and the BMC.

[0014] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of a distributed hardware control system provided in a specific embodiment of the present invention. The distributed hardware control system may include: a plurality of programmable logic devices 10 and a plurality of switching circuits 20 corresponding one-to-one with the plurality of programmable logic devices 10. Each programmable logic device 10 has its own communication interface and upgrade interface. Each communication interface is connected to the same communication bus of the main controller, and each upgrade interface is connected to the communication bus through a corresponding switch circuit 20. The control terminal of each switch circuit 20 is connected to the corresponding programmable logic device 10, and in the default state, each programmable logic device 10 controls the corresponding switch circuit 20 to be in the off state; the communication addresses of each programmable logic device 10 are different from each other, and the upgrade addresses of each programmable logic device 10 are the same, and the upgrade addresses are different from each communication address. Any programmable logic device 10 is used to: after receiving an upgrade command sent by the main controller through its own communication interface, control the corresponding switch circuit 20 to be turned on, and through the turned-on switch circuit 20 and its own upgrade interface, receive firmware upgrade data sent by the main controller according to the upgrade address and perform firmware upgrade.

[0015] Specifically, the programmable logic device 10 in this application is typically a CPLD, the main controller is a BMC, and multiple CPLDs can be located on the same board or distributed across different boards connected by the communication bus. In practical applications, different CPLDs can respectively undertake hardware control functions such as power timing management, status monitoring, or interface expansion, forming a distributed hardware control system. The communication bus is typically I2C, for example... Figure 3 In this example, the communication bus is specifically I2C, the main controller is BMC, and each programmable logic device 10 is a CPLD. The CPLD specifically controls the on / off state of the corresponding switching circuit 20 through the enable terminal EN.

[0016] Taking the example of a BMC managing multiple CPLDs via a single communication bus, the programmable logic device 10 has its own communication interface and upgrade interface. The communication interface is mainly used for the BMC's regular access and management of the CPLDs, while the upgrade interface can be used for firmware upgrades. In this application, the communication interfaces of different CPLDs can be directly connected to the same communication bus, while the upgrade interfaces of different CPLDs are connected to the same communication bus via their respective switch circuits 20. Therefore, it can be seen that when a switch circuit 20 is turned off, it disconnects the connection between the upgrade interface of the corresponding CPLD and the communication bus, but does not disconnect the connection between the communication interface of that CPLD and the communication bus.

[0017] Each programmable logic device (PLD) 10 has a unique communication address, while its upgrade address is the same but distinct from all communication addresses. For clarity, consider three CPLDs as an example. Let's denote their communication addresses as A1, A2, and A3, and their upgrade address as A0. A1, A2, A3, and A0 are all unique. Therefore, when the BMC sends a command using one of the communication addresses, the CPLD with that address will process the command, avoiding communication address conflicts. Conversely, when the BMC performs an upgrade access using A0, the firmware upgrade data can be received by the CPLD whose upgrade interface is already connected.

[0018] By default, each programmable logic device 10 controls its corresponding switch circuit 20 to be in the off state. That is, after the programmable logic device 10 completes normal initialization, it will control the corresponding switch circuit 20 to be in the off state if no firmware upgrade is required. If none of the programmable logic devices 10 currently require firmware upgrades, all switch circuits 20 remain disconnected, and the main controller performs daily management of each programmable logic device 10 through different communication addresses.

[0019] During an upgrade, the main controller first identifies the programmable logic device (PLD) 10 to be upgraded and sends an upgrade command via the PLD 10's communication address. Upon receiving the upgrade command, the PLD 10 activates its corresponding switching circuit 20. At this time, the main controller does not send upgrade commands to other PLDs 10; therefore, all other switching circuits 20 remain off. Subsequently, the main controller sends firmware upgrade data via a common upgrade address. This firmware upgrade data travels through the activated switching circuit 20 to the upgrade interface of the PLD 10, where the relevant configuration circuits complete the firmware upgrade data writing, thus achieving the firmware upgrade.

[0020] In practical applications, if multiple programmable logic devices 10 need to be upgraded, they can be upgraded sequentially according to the principle described above. That is, only the switching circuit 20 of one programmable logic device 10 to be upgraded is turned on at a time. After the upgrade is completed, the corresponding switching circuit 20 is turned off, and then the switching circuit 20 of the next programmable logic device 10 to be upgraded is turned on.

[0021] As can be seen, in this application, for routine communication between the main controller and the programmable logic device 10, the programmable logic device 10 to be communicated can be selected through different communication addresses. For firmware upgrades, path selection is achieved through the switching circuits 20 controlled by each programmable logic device 10. Furthermore, all programmable logic devices 10 share the same communication bus and the same upgrade address, and there is no need to set a centralized channel selection switch on the communication bus. Therefore, it can reduce bus resource occupation and eliminate the need for channel switching through channel selection switches.

[0022] In one specific embodiment of the present invention, any programmable logic device 10 can also be used for: After the firmware upgrade is completed, the upgraded firmware is reloaded, and when the initialization is completed after reloading, the corresponding switch circuit 20 is restored to the default off state.

[0023] In this implementation, after the firmware upgrade data is written, the programmable logic device 10 can receive a reload command sent by the main controller, or trigger its own reload rules to load the upgraded firmware and then execute the corresponding initialization process. There are various specific reload methods, such as configuration refresh, reset, or power-down restart, which can be set according to actual needs.

[0024] Upon completion of initialization, the programmable logic device 10 controls the corresponding switch circuit 20 to return to its default off state, allowing the main controller to continue upgrading other programmable logic devices 10 via the same upgrade address. Furthermore, this implementation automatically controls the corresponding switch circuit 20 to return to its default off state upon completion of initialization, eliminating the need for the main controller to send a separate command to shut down the switch circuit 20. This results in higher efficiency and reliability, effectively and reliably restoring the corresponding switch circuit 20 to its off state and achieving mutual isolation between upgrade interfaces.

[0025] In one specific embodiment of the present invention, any programmable logic device 10 is further configured to: When the corresponding switch circuit 20 is in the off state and receives a query command sent by the main controller through its own communication interface, it sends the corresponding status feedback data to the main controller through its own communication interface. When the corresponding switch circuit 20 is in the off state and receives a control command sent by the main controller through its own communication interface, the operation specified by the control command is executed.

[0026] In this implementation, the main controller can send a query command according to the communication address of a programmable logic device 10. The programmable logic device 10 can read the corresponding status register and return status feedback data such as operating status, acquisition results, or alarm status through the communication interface. It also supports the main controller sending control commands, and the programmable logic device 10 can execute the operations specified by the control commands, such as updating the corresponding control register or setting the hardware control functions it undertakes. Furthermore, this implementation is performed when the switching circuit 20 is in the off state, which avoids errors that may easily occur when performing related operations during the upgrade process.

[0027] In one specific embodiment of the present invention, the firmware upgrade data is the firmware upgrade data selected by the main controller from a preset firmware upgrade file library according to the programmable logic device 10 to be upgraded; wherein, when the main controller performs a firmware upgrade on any programmable logic device 10, it calls the same upgrade program.

[0028] This implementation takes into account that different programmable logic devices 10 use the same upgrade address. Therefore, for the main controller, the same upgrade program can be used to upgrade different programmable logic devices 10. It is only necessary to send the required firmware upgrade data to the programmable logic device 10 according to its needs. This can effectively reduce the workload of maintaining multiple upgrade programs separately and facilitate the unified management of the upgrade process of different devices.

[0029] The firmware upgrade data is selected by the main controller from a preset firmware upgrade file library based on the programmable logic device 10 to be upgraded. In other words, in this embodiment, the firmware upgrade file library can be used to centrally manage the firmware upgrade content required by different programmable logic devices 10. For example, it may include multiple independently stored firmware files, or it may include multiple sub-files, as long as the main controller can obtain the firmware upgrade data required by the programmable logic device 10 to be upgraded. In practical applications, the main controller may determine the firmware upgrade data required by the programmable logic device 10 to be upgraded based on factors such as its model, function, or board configuration.

[0030] In one specific embodiment of the present invention, any programmable logic device 10 can also be used for: When the address adjustment is triggered, the communication address is adjusted according to the preset adjustment rules, and the adjusted communication address is different from the communication address and upgrade address of the other programmable logic devices 10.

[0031] This implementation supports the adjustment of communication addresses, improving the flexibility of the solution. For example, when the configuration of the programmable logic device 10 or the board configuration changes, the original communication address may no longer be suitable for the current address allocation, thus allowing the communication address to be updated after triggering an address adjustment.

[0032] For example, when an address adjustment is triggered, the main controller can determine the new communication address of the programmable logic device 10 that needs to have its communication address adjusted. Then, the main controller sends an address adjustment instruction containing the new communication address to the programmable logic device 10 through the original communication address. The programmable logic device 10 can then update its own communication address configuration according to preset rules.

[0033] In one specific embodiment of the present invention, the upgrade instruction carries a device model identifier and a function configuration identifier corresponding to the firmware upgrade data. Any programmable logic device 10 is further configured to: after receiving an upgrade instruction through its own communication interface, compare the device model identifier and function configuration identifier in the upgrade instruction with the device model identifier and function configuration identifier stored in its own memory; if the consistency comparison is successful, control the corresponding switch circuit 20 to be turned on; otherwise, keep the corresponding switch circuit 20 in the off state and feed back error alarm information to the main controller.

[0034] This implementation takes into account that in practical applications, if a firmware model or functional configuration mismatch is selected when choosing firmware upgrade data, incorrect firmware may be sent to the programmable logic device 10. To address this, this implementation adds a check step before activating the corresponding switching circuit 20, enabling the programmable logic device 10 to verify the upgrade content based on its own information, thus improving the reliability of the upgrade.

[0035] Specifically, the device model identifier can indicate the device model to which the firmware is applicable, and the function configuration identifier can indicate the category of hardware control function or configuration category to which the firmware is applicable. For example, even if two programmable logic devices 10 have the same model, but perform different hardware control functions, such as power timing function and interface expansion function respectively, they can pre-store different function configuration identifiers.

[0036] Therefore, after the main controller selects the firmware upgrade data, it can obtain these two identifiers from the corresponding firmware description information and send them to the programmable logic device 10 along with the upgrade command. The programmable logic device 10 can compare the device model identifier and the function configuration identifier separately. Only when both comparisons pass will the corresponding switch circuit 20 be turned on to perform the firmware upgrade. Otherwise, the corresponding switch circuit 20 will remain in the off state, and an error alarm message will be fed back so that the main controller can stop the upgrade or be set to reselect the firmware upgrade data.

[0037] In one specific embodiment of the present invention, any programmable logic device 10 is further configured to: The timing starts after the corresponding switch circuit 20 is turned on, and restarts each time an upgrade hold command sent by the main controller is received through its own communication interface. When the preset duration is reached, the corresponding switch circuit 20 is restored to the off state.

[0038] This implementation takes into account that if the main controller does not continue to send firmware upgrade data after the upgrade begins, or if the upgrade process is abnormally interrupted and subsequent operations are not completed, resulting in the corresponding switch circuit 20 not being turned off, the conducting switch circuit 20 may affect the subsequent upgrade of other programmable logic devices 10.

[0039] In this embodiment, when the programmable logic device 10 controls the corresponding switching circuit 20 to be turned on, it can reset the timing value to zero and start timing again. While the switching circuit 20 is on, that is, during the upgrade process, the main controller can send an upgrade hold command through the communication address of the programmable logic device 10, for example, periodically. This allows the programmable logic device 10 to reset the timing value to zero and restart timing each time it receives an upgrade hold command. If the timing duration reaches a preset duration and no upgrade hold command is received again during this period, regardless of whether the upgrade is completed normally or an abnormality has occurred, the programmable logic device 10 will consider the upgrade process to end and control the corresponding switching circuit 20 to return to the off state.

[0040] Therefore, as long as the programmable logic device 10 can normally control the on / off state of the corresponding switch circuit 20, whether the upgrade process itself is abnormal or the main controller has a problem, the switch circuit 20 can be automatically shut down after the timeout, and the switch circuit 20 will not occupy the common upgrade address for a long time.

[0041] In one specific embodiment of the present invention, when any programmable logic device 10 is in a fault state in which it is unable to control the on / off state of the corresponding switching circuit 20, the switching circuit 20 corresponding to the programmable logic device 10 is in a conducting state.

[0042] This implementation takes into account that the solution relies on the programmable logic device 10 to actively initiate the upgrade path. However, in some cases, if the programmable logic device 10 malfunctions and loses its control over the switching circuit 20, it may be unable to perform operations such as turning on the switch after receiving an upgrade command. In this implementation, if the programmable logic device 10 is in a fault state where it cannot control the on / off state of the corresponding switching circuit 20, the corresponding switching circuit 20 can automatically be turned on. This allows the firmware upgrade of the programmable logic device 10 to still be performed under such circumstances, effectively improving the reliability of the solution and reducing the risk of failing to establish an upgrade path due to a malfunction of the programmable logic device 10.

[0043] Furthermore, it should be noted that the specific implementation of this method can be set according to actual needs. Usually, it is necessary to reasonably set the structure and connection relationship of the switching circuit 20, because when the programmable logic device 10 is in a fault state where it cannot control the on / off state of the corresponding switching circuit 20, the switching circuit 20 can be automatically turned on. That is, at this time, the control capability of the programmable logic device 10 cannot be relied upon.

[0044] For example, in one specific embodiment of the present invention, see [reference needed]. Figure 4 The communication bus includes clock lines and data lines, and any switching circuit 20 includes: a first switching transistor Q1, a second switching transistor Q2, a first pull-up resistor R1, and a second pull-up resistor R2. The first terminal of the first switch Q1 is connected to the clock line, and the second terminal of the first switch Q1 is connected to the clock pin of the upgrade interface of the corresponding programmable logic device 10. The first terminal of the second switch Q2 is connected to the data line, and the second terminal of the second switch Q2 is connected to the data pin of the upgrade interface of the corresponding programmable logic device 10. The control terminal of the first switch Q1 is connected to the first enable pin of the corresponding programmable logic device 10 and the first terminal of the first pull-up resistor R1, respectively. The control terminal of the second switch Q2 is connected to the second enable pin of the corresponding programmable logic device 10 and the first terminal of the second pull-up resistor R2, respectively. The second terminal of the first pull-up resistor R1 and the second terminal of the second pull-up resistor R2 are both connected to the pull-up power supply.

[0045] In this implementation, considering that the communication bus is typically I2C, the communication bus includes clock lines and data lines. Figure 4 These are denoted as SCL and SDA. For clock and data lines, this implementation uses the same principle to enable the switching transistors on the line to automatically turn on when the programmable logic device 10 is in a fault state where it cannot control the on / off state of the corresponding switching circuit 20.

[0046] Specifically, the first switch Q1 is positioned between the clock line of the communication bus and the clock pin of the upgrade interface, and the second switch Q2 is positioned between the data line of the communication bus and the data pin of the upgrade interface. The two switches together constitute the switching circuit 20 corresponding to a certain programmable logic device 10. During upgrades, the first switch Q1 and the second switch Q2 need to be turned on, thereby connecting the two signal paths required by the upgrade interface of the programmable logic device 10. During shutdowns, the first switch Q1 and the second switch Q2 also need to be turned off, thereby disconnecting these two signal paths.

[0047] The first pull-up resistor R1 and the second pull-up resistor R2 are respectively set at the control terminals of the first switch Q1 and the second switch Q2, so that the control terminals still have a certain bias level when the corresponding enable pins are released from the drive, and will be pulled high when there is no drive capability, thereby realizing the automatic conduction of the first switch Q1 and the second switch Q2. The pull-up power supply is in Figure 4 It is written as VDD in Chinese.

[0048] Specifically, the first switch Q1 and the second switch Q2 can both be N-type transistors. The first terminal of the first switch Q1 and the second switch Q2 is their own drain, their own second terminal is their own source, and their own control terminal is their own gate. Any programmable logic device 10 is specifically used to: in the default state, pull the gates of the corresponding first switch Q1 and second switch Q2 low through the first enable pin and the second enable pin respectively, so that both the first switch Q1 and the second switch Q2 are turned off; After receiving the upgrade command sent by the main controller through its own communication interface, the first enable pin and the second enable pin respectively control the gate of the corresponding first switch Q1 and the second switch Q2 to a high level, so that both the first switch Q1 and the second switch Q2 are turned on.

[0049] Figure 4 In the example, the first switch Q1 and the second switch Q2 are both N-type transistors, specifically NMOS transistors. After normal initialization, the first enable pin and the second enable pin output a low level, pulling the gates of the two NMOS transistors low respectively. Therefore, even with pull-up resistors, the first switch Q1 and the second switch Q2 can still be kept off by a valid low level drive on the enable pin. When an upgrade is required, the programmable logic device 10 will control the gates of the first switch Q1 and the second switch Q2 to a high level, so that the clock line and data line are connected to the upgrade interface through the corresponding switches. When the programmable logic device 10 does not have driving capability, the gates of the first switch Q1 and the second switch Q2 will be pulled high, thereby achieving automatic turn-on of the first switch Q1 and the second switch Q2.

[0050] Figure 4 For ease of viewing, only one programmable logic device 10 and its corresponding switching circuit 20 are shown. It is understood that other programmable logic devices 10 and their corresponding switching circuits 20 connected to the I2C bus can also adopt the same structure. Moreover, the switching circuit 20 in this embodiment can be implemented by resistors and switching transistors, which is simple in structure and highly reliable.

[0051] Applying the technical solution provided in this application, the communication interfaces of multiple programmable logic devices are all connected to the same communication bus of the main controller, and the communication addresses of each programmable logic device are different. Therefore, the main controller can distinguish and access each programmable logic device through its communication address, reducing bus resources and the interface occupation of the main controller. Furthermore, it can be seen that this application does not use a centralized bus switch, thus reducing risk and ensuring the reliability of the system structure. To ensure the effective implementation of the firmware upgrade function, the upgrade interface of each programmable logic device in this application is connected to the communication bus through a corresponding switch circuit. The switch circuit is controlled by the corresponding programmable logic device and remains off by default, disconnecting upgrade interfaces with the same upgrade address from the communication bus. When no upgrade is needed, the normal communication between the main controller and each programmable logic device will not be affected. When an upgrade is required, the programmable logic device to be upgraded can receive the upgrade command through its own communication interface and activate the corresponding switch circuit. The main controller can then send firmware upgrade data to the programmable logic device according to a unified upgrade address. Since the remaining switch circuits remain off by default, access conflicts caused by the same upgrade address can be avoided. In addition, the upgrade address is different from each other communication address, which makes upgrade access different from daily communication addressing.

[0052] Therefore, it can be seen that the proposed solution, while sharing the same communication bus, thereby reducing bus resources and the interface occupation of the main controller, can realize normal communication and selective firmware upgrades of various programmable logic devices, and does not require a centralized bus switch for channel management, thus ensuring the reliability of the system structure.

[0053] Corresponding to the above embodiments of the distributed hardware control system, this embodiment of the invention also provides a server, including a main controller and a distributed hardware control system as described in any of the above embodiments, which can be referred to in correspondence with the above description, and will not be repeated here.

[0054] Corresponding to the above embodiments of the distributed hardware control system, this embodiment of the invention also provides a firmware upgrade method, which can be applied to any programmable logic device in the distributed hardware control system as described in any of the above embodiments, and includes the following steps: After receiving the upgrade command sent by the main controller through its own communication interface, it controls the corresponding switching circuit to be turned on. Through the conductive switching circuit and its own upgrade interface, it receives firmware upgrade data sent by the main controller according to the upgrade address and performs firmware upgrade.

[0055] In one specific embodiment of the present invention, it further includes: After the firmware upgrade is completed, the upgraded firmware is reloaded, and upon completion of initialization after reloading, the corresponding switch circuit is restored to the default off state.

[0056] In one specific embodiment of the present invention, it further includes: When the corresponding switching circuit is in the off state and a query command sent by the main controller is received through its own communication interface, the corresponding status feedback data is sent to the main controller through its own communication interface. When the corresponding switching circuit is in the off state and a control command sent by the main controller is received through its own communication interface, the operation specified by the control command is executed.

[0057] In one specific embodiment of the present invention, the firmware upgrade data is firmware upgrade data selected by the main controller from a preset firmware upgrade file library according to the programmable logic device to be upgraded; wherein, when the main controller performs a firmware upgrade on any of the programmable logic devices, it calls the same upgrade program.

[0058] In one specific embodiment of the present invention, it further includes: When address adjustment is triggered, the communication address is adjusted according to the preset adjustment rules, and the adjusted communication address is different from the communication addresses of other programmable logic devices and the upgrade address.

[0059] In one specific embodiment of the present invention, it further includes: The timing begins after the corresponding switching circuit is turned on, and restarts each time an upgrade hold command sent by the main controller is received through its own communication interface. When the preset duration is reached, the corresponding switch circuit is restored to the off state.

[0060] In one specific embodiment of the present invention, when any of the programmable logic devices is in a fault state where the on / off state of the corresponding switching circuit cannot be controlled, the switching circuit corresponding to the programmable logic device is in a conducting state.

[0061] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0062] The foregoing has provided a detailed description of a server and its distributed hardware control system provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only intended to help understand the technical solutions and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A distributed hardware control system, characterized by, include: Multiple programmable logic devices and multiple switching circuits corresponding one-to-one with the multiple programmable logic devices; Each of the programmable logic devices has its own communication interface and upgrade interface. Each of the communication interfaces is connected to the same communication bus of the main controller, and each of the upgrade interfaces is connected to the communication bus through a corresponding switching circuit. Each of the switch circuits has a control terminal connected to a corresponding programmable logic device, and by default, each programmable logic device controls its corresponding switch circuit to be in the off state; the communication addresses of each programmable logic device are different from each other, and the upgrade addresses of each programmable logic device are the same, but the upgrade addresses are different from each of the communication addresses; Any programmable logic device is configured to: receive an upgrade command sent by the main controller through its own communication interface, control the corresponding switching circuit to be turned on, and receive firmware upgrade data sent by the main controller according to the upgrade address and perform firmware upgrade through the turned-on switching circuit and its own upgrade interface.

2. The distributed hardware control system of claim 1, wherein, Any programmable logic device is also used for: After the firmware upgrade is completed, the upgraded firmware is reloaded, and upon completion of initialization after reloading, the corresponding switch circuit is restored to the default off state.

3. The distributed hardware control system of claim 1, wherein, Any of the programmable logic devices described above are also used for: When the corresponding switching circuit is in the off state and a query command sent by the main controller is received through its own communication interface, the corresponding status feedback data is sent to the main controller through its own communication interface. When the corresponding switching circuit is in the off state and a control command sent by the main controller is received through its own communication interface, the operation specified by the control command is executed.

4. The distributed hardware control system of claim 1, wherein, The firmware upgrade data is selected by the main controller from a preset firmware upgrade file library based on the programmable logic device to be upgraded; wherein, when the main controller performs a firmware upgrade on any of the programmable logic devices, it calls the same upgrade program.

5. The distributed hardware control system of claim 1, wherein, Any of the programmable logic devices described above are also used for: When address adjustment is triggered, the communication address is adjusted according to the preset adjustment rules, and the adjusted communication address is different from the communication addresses of other programmable logic devices and the upgrade address.

6. The distributed hardware control system of claim 1, wherein, Any of the programmable logic devices described above are also used for: The timing begins after the corresponding switching circuit is turned on, and restarts each time an upgrade hold command sent by the main controller is received through its own communication interface. When the preset duration is reached, the corresponding switch circuit is restored to the off state.

7. The distributed hardware control system according to any one of claims 1 to 6, characterized in that, When any of the programmable logic devices is in a fault state where the corresponding switching circuit cannot be controlled, the switching circuit corresponding to the programmable logic device is in a conducting state.

8. The distributed hardware control system according to claim 7, characterized in that, The communication bus includes a clock line and a data line, and any of the switching circuits includes: a first switching transistor, a second switching transistor, a first pull-up resistor, and a second pull-up resistor; The first terminal of the first switching transistor is connected to the clock line, and the second terminal of the first switching transistor is connected to the clock pin of the upgrade interface of the corresponding programmable logic device. The first end of the second switch is connected to the data line, and the second end of the second switch is connected to the data pin of the upgrade interface of the corresponding programmable logic device. The control terminal of the first switch is connected to the first enable pin of the corresponding programmable logic device and the first terminal of the first pull-up resistor, respectively. The control terminal of the second switch is connected to the second enable pin of the corresponding programmable logic device and the first terminal of the second pull-up resistor, respectively. The second terminals of the first pull-up resistor and the second pull-up resistor are both connected to the pull-up power supply.

9. The distributed hardware control system according to claim 8, characterized in that, Both the first and second switching transistors are N-type transistors. The first terminal of each of the first and second switching transistors is its own drain, the second terminal of each of the first and second switching transistors is its own source, and the control terminal of each of the two switching transistors is its own gate. Any of the programmable logic devices is specifically used to: in the default state, pull the gates of the corresponding first switch and second switch low through the first enable pin and the second enable pin respectively, so that both the first switch and the second switch are turned off; After receiving the upgrade command sent by the main controller through its own communication interface, the first enable pin and the second enable pin respectively control the gate of the corresponding first switch and the second switch to be at a high level, so that the first switch and the second switch are both turned on.

10. A server, characterized in that, It includes a main controller and a distributed hardware control system as described in any one of claims 1 to 9.