Equipment address control method and device

By determining and adjusting the device address during device switching, the communication anomaly caused by address duplication on the PCIe expansion card was resolved, enabling normal device communication and efficient address conflict handling.

CN122027604APending Publication Date: 2026-05-12LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LENOVO (BEIJING) LTD
Filing Date
2026-01-28
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

With the increasing use of PCIe expansion cards in servers, the problem of duplicate expansion device addresses causing communication errors has arisen.

Method used

By determining the device address information on the expansion board and expansion card when the switching equipment is in the disconnected and connected states, and adjusting the address information of the target device when conflicts exist, address conflicts can be avoided.

Benefits of technology

This ensures that devices on the expansion board and expansion card can communicate normally, simplifies the address conflict judgment process, and improves processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122027604A_ABST
    Figure CN122027604A_ABST
Patent Text Reader

Abstract

The invention discloses a device address control method and device, the device at least comprises an expansion board connected with a server, the expansion board is provided with a switch device and an expansion card plugged on the expansion board, a serial signal output by the server is transmitted to the expansion card through the switch device on the expansion board, and the serial signal is transmitted to the server through the expansion card. A plurality of first devices are inserted into the expansion board, and a plurality of second devices are arranged on the expansion card; determining first address information of each piece of first equipment on the expansion board under the condition that the switch equipment is in the off state; when the switch device is in the connection state, determining second address information of each second device on the expansion card through the serial signal; and if it is determined that the first address information of the first target device in the plurality of first devices conflicts with the second address information of the second target device in the plurality of second devices, adjusting the first address information of the first target device.
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 device address control method and apparatus. Background Technology

[0002] With the evolution of server technology, more and more PCIe (Peripheral Component Interconnect Express) expansion cards are being introduced into server configurations. This increases the probability that the addresses of the expansion devices on the PCIe expansion cards will overlap with the device addresses on the motherboard or expansion board riser, leading to abnormal device communication. Summary of the Invention

[0003] In view of the above, this application provides a device address control method and apparatus, the specific scheme of which is as follows:

[0004] A device address control method is applied to a device address control device, the device address control device comprising at least: an expansion board connected to a server, the expansion board having a switching device and an expansion card plugged into the expansion board, a serial signal output by the server being transmitted to the expansion card through the switching device on the expansion board, a plurality of first devices plugged into the expansion board, and a plurality of second devices being provided on the expansion card, the method comprising:

[0005] When the switching device is in the off state, determine the first address information of each first device on the expansion board;

[0006] When the switching device is in a connected state, the second address information of each second device on the expansion card is determined by a serial signal;

[0007] Compare the first address information and the second address information to obtain the comparison result;

[0008] If the comparison result indicates that there is a conflict between the first address information of the first target device among the plurality of first devices and the second address information of the second target device among the plurality of second devices, the first address information of the first target device is adjusted.

[0009] Furthermore, it also includes:

[0010] In response to the server being in the target state, the state of the switching device is adjusted to put the switching device in the off state;

[0011] Wherein, adjusting the state of the switching device to put the switching device in the off state includes:

[0012] Adjust the state of the enable signal of the switching device to a first state, wherein the first state is an disabled state;

[0013] In response to the enable signal being in the first state, the switching device is adjusted to the off state.

[0014] Furthermore, it also includes:

[0015] After determining the first address information, the state of the switching device is changed from the disconnected state to the connected state;

[0016] The step of adjusting the state of the switching device from an open state to an open state includes:

[0017] Adjust the state of the enable signal of the switching device to the second state, whereby the second state is the enable state;

[0018] In response to the enable signal being in the second state, the switching device is adjusted to the connected state.

[0019] Furthermore, when the switching device is in a connected state, determining the second address information of each second device on the expansion card includes:

[0020] Output a reset signal to the expansion board to reset each first device on the expansion board;

[0021] The detection signal is transmitted to the expansion card via the switching device;

[0022] Obtain at least one response signal transmitted by the expansion card through the switching device in response to the probe signal, wherein the probe signal is a serial signal;

[0023] The address information corresponding to each of the at least one response signal is determined, and the address information corresponding to each of the at least one response signal is determined as the second address information of each second device on the expansion card.

[0024] Furthermore, determining the first address information of each first device on the expansion board includes:

[0025] Determine the type of the expansion board;

[0026] The first address information of each first device on the expansion board is determined based on the type of the expansion board.

[0027] Furthermore, determining the type of the expansion board includes:

[0028] Obtain the level status information of each input / output pin among the multiple input / output pins of the expansion chip on the expansion board;

[0029] Based on the pre-stored correspondence between level state combinations and expansion board types, a first type corresponding to the level state combination of the expansion chip is determined, and the first type is determined as the type of the expansion board. The level state combination of the expansion chip consists of the level state information of each input / output pin of the expansion chip.

[0030] Furthermore, determining the first address information of each first device on the expansion board based on the type of the expansion board includes:

[0031] Obtain a list of addresses containing the first address information of each first device corresponding to different types of expansion boards, which is stored in advance.

[0032] Based on the address list, determine the first address information for each first device corresponding to the first type of expansion board.

[0033] Furthermore, it also includes:

[0034] If the comparison result indicates that there is no conflict between any of the first address information and the second address information, a cancel reset signal is output to the expansion board.

[0035] Furthermore, adjusting the first address information of the first target device includes:

[0036] Adjust the state of the switching device from connected to disconnected and output a level adjustment command;

[0037] The level adjustment command adjusts the level information of the pins of the first target device that are in conflict, so as to adjust the first address information of the first target device based on the change in the level information of the pins of the first target device.

[0038] A device address control device, comprising:

[0039] An expansion board, connected to a server, on which multiple first devices are plugged in;

[0040] A switching device is mounted on the expansion board;

[0041] An expansion card is plugged into the expansion board. The expansion card is equipped with multiple second devices. The serial signal output by the server is transmitted to the expansion card through a switching device on the expansion board.

[0042] The controller is configured to determine the first address information of each first device when the switching device is in the off state, and determine the second address information of each second device through a serial signal when the switching device is in the connected state, compare the first address information and the second address information to obtain a comparison result, and if the comparison result indicates that the first address information of the first target device among the plurality of first devices conflicts with the second address information of the second target device among the plurality of second devices, adjust the first address information of the first target device. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying 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.

[0044] Figure 1 This is a schematic diagram of the structure of a device address control device disclosed in an embodiment of this application;

[0045] Figure 2 This is a flowchart of a device address control method disclosed in an embodiment of this application;

[0046] Figure 3 This is a flowchart of a device address control method disclosed in an embodiment of this application;

[0047] Figure 4 This is a flowchart of a device address control method disclosed in an embodiment of this application;

[0048] Figure 5 This is a schematic diagram of the interior of the expansion board in the device address control device on which the device address control method disclosed in this application is based;

[0049] Figure 6 This is a flowchart of a device address control method disclosed in an embodiment of this application;

[0050] Figure 7 This is a schematic diagram of the structure of a device address control device disclosed in an embodiment of this application. Detailed Implementation

[0051] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0052] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0053] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0054] This application discloses a device address control method, applied to a device address control device. A schematic diagram of the device address control device is shown below. Figure 1 As shown, the device address control device includes at least: an expansion board 11 connected to the server, a switch device 12 and an expansion card 13 plugged into the expansion board 11, the serial signal output by the server is transmitted to the expansion card 13 through the switch device 12 on the expansion board 11, a plurality of first devices 14 are plugged into the expansion board 11, and a plurality of second devices 15 are provided on the expansion card 13.

[0055] The server can specifically be a motherboard (MB), a baseboard management controller (BMC), or a field-programmable gate array (FPGA) chip. The expansion board can specifically be a riser card, an important expansion adapter card used to convert horizontal PCIe slots on the server to a vertical orientation, ensuring more expansion devices can be installed within limited chassis space; the expansion card can specifically be a PCIe (High-Speed ​​Peripheral Component Interconnect) card.

[0056] The switching device is located on the expansion board. It can control the communication of multiple second devices on the expansion card. If the switching device is connected, the multiple second devices on the expansion card are in a communicable state, and the serial signal on the expansion board can be transmitted to the second devices on the expansion card. If the switching device is disconnected, the expansion card is disconnected from the expansion board, and the serial signal on the expansion board cannot be transmitted to any of the second devices on the expansion card.

[0057] The server can output commands, which can be transmitted via serial signals to a first device plugged into an expansion board or a second device plugged into an expansion card, in order to respond to the server's output commands. The first device can specifically be a temperature sensor, a voltage monitoring chip, an EEPROM, etc., while the second device can specifically be a functional device, such as a graphics processing unit (GPU), a network card, an FPGA accelerator, etc. Furthermore, multiple first devices and multiple expansion cards can be plugged into the expansion board.

[0058] The expansion board can be connected to multiple first devices, and the addresses of the different first devices are different. At the same time, the expansion card can be connected to multiple second devices, and the addresses of the different second devices are also different.

[0059] When multiple first devices and expansion cards are plugged into the expansion board, and multiple second devices are plugged into the expansion card, there may be a problem of duplicate addresses between the first devices and the second devices, which will lead to communication abnormalities.

[0060] Based on this, this embodiment discloses a device address control method, the flowchart of which is as follows: Figure 2 As shown, it includes:

[0061] Step S21: When the switching device is in the off state, determine the first address information of each first device on the expansion board;

[0062] Step S22: When the switching device is in the connected state, determine the second address information of each second device on the expansion card through a serial signal;

[0063] Step S23: Compare the first address information and the second address information to obtain the comparison result;

[0064] Step S24: If the comparison result indicates that there is a conflict between the first address information of the first target device among multiple first devices and the second address information of the second target device among multiple second devices, adjust the first address information of the first target device.

[0065] Since the switching device is used to control the on / off state of the expansion card, when the switching device is in the connected state, the serial signal transmitted by the expansion board can be received by the second device on the expansion card. At the same time, any second device on the expansion card can also transmit signals through the expansion board to realize the communication connection status of each second device on the expansion card. When the switching device is in the disconnected state, the serial signal transmitted by the expansion board cannot reach any second device on the expansion card, and each second device on the expansion card cannot transmit signals to the expansion board.

[0066] When the switching device is in the off state, since the I2C communication of each second device on the expansion card is completely disconnected, the server can determine the first address information of each first device on the expansion board through serial signals (i.e. signals transmitted via the I2C bus) when the switching device is in the off state.

[0067] The server outputs a serial signal to the expansion board. At this time, the serial signal can reach each device plugged into the expansion board, that is, each first device plugged into the expansion board. At the same time, it can also reach the switch device. The other end of the switch device is connected to the expansion card. However, since the switch device is in the off state, the serial signal cannot be transmitted to the expansion card or to any second device plugged into the expansion card after reaching the switch device. Therefore, when the switch device is in the off state, the serial signal output by the server can only reach each first device plugged into the expansion board, so as to determine the first address information of each first device on the expansion board based on the serial signal that can only reach each first device on the expansion board.

[0068] When the switching device is in the connected state, the I2C communication of each second device on the expansion card is fully connected. Therefore, when the switching device is in the connected state, the server can determine the second address information of each second device on the expansion card through the serial signal (i.e. the signal transmitted through the I2C bus).

[0069] The server outputs a serial signal to the expansion board, which can reach the switching device. Since the switching device is in a connected state, the serial signal can reach the expansion card through the switching device and be transmitted to each second device on the expansion card so as to determine the second address information of each second device on the expansion card based on the serial signal transmitted to the expansion card.

[0070] After obtaining the first address information of each first device and the second address information of each second device, it is necessary to compare each first address information with each second address information to obtain the comparison result.

[0071] For example: If there are 3 first devices, then there are 3 first address information entries: first address information 1 for first device 1, first address information 2 for first device 2, and first address information 3 for first device 3. If there are 5 second devices, then there are 5 second address information entries: second address information 1 for second device 1, second address information 2 for second device 2, second address information 3 for second device 3, second address information 4 for second device 4, and second address information 5 for second device 5. First address information 1 can be compared with second address information 1, second address information 2, second address information 3, second address information 4, and second address information 5 respectively. A comparison is performed to determine whether the first address information 1 conflicts with multiple second address information; then, the first address information 2 is compared with the second address information 1, second address information 2, second address information 3, second address information 4, and second address information 5 respectively to determine whether the first address information 2 conflicts with multiple second address information; then, the first address information 3 is compared with the second address information 1, second address information 2, second address information 3, second address information 4, and second address information 5 respectively to determine whether the first address information 3 conflicts with multiple second address information, thereby obtaining the comparison result of each first address information with each second address information.

[0072] If the comparison result indicates that there is no conflict between each first address information and each second address information, the server can continue to execute the subsequent process, and the process of determining whether there is a conflict between device addresses ends; if the comparison result indicates that there is a conflict between the first address information of the first target device among multiple first devices and the second address information of the second target device among multiple second devices, the first address information of the first target device needs to be adjusted to avoid the situation where there is a conflict between the address information of multiple first devices and the address information of the second device.

[0073] For example, if there is a conflict between the first address information 2 and the second address information 3, such as if the first address information 2 and the second address information 3 are the same, then during communication, when it is necessary to access the first device 2 at the address information 2, access is made based on the first address information 2. However, since the first address information 2 and the second address information 3 are the same, it may not be possible to access the first device 2. Instead, access is made based on the address information corresponding to the second address information 3. Therefore, in this case, the address information of the first device 2 needs to be adjusted so that the adjusted address information of the first address information 2 does not conflict with the second address information 3, i.e., they are different, to avoid the situation where one of the devices cannot be accessed.

[0074] The device address control method disclosed in this embodiment is applied to a device address control device. The device address control device includes at least: an expansion board connected to a server, a switch device and an expansion card plugged into the expansion board, a serial signal output by the server being transmitted to the expansion card through the switch device on the expansion board, multiple first devices plugged into the expansion board, and multiple second devices on the expansion card. The device address control method is used to determine the first address information of each first device on the expansion board when the switch device is in an off state, and to determine the second address information of each second device on the expansion card through the serial signal when the switch device is in a connected state. If it is determined that the first address information of the first target device among the multiple first devices conflicts with the second address information of the second target device among the multiple second devices, the first address information of the first target device needs to be adjusted to avoid the conflict between the addresses of the multiple first devices and the address of any second device, thereby ensuring normal device communication.

[0075] This embodiment discloses a device address control method, applied to a device address control device. A schematic diagram of the device address control device is shown below. Figure 1 As shown, the flowchart of the device address control method disclosed in this embodiment can be seen as follows: Figure 3 As shown, it includes:

[0076] Step S31: In response to the server being in the target state, adjust the state of the switching device to make the switching device in the off state;

[0077] Step S32: When the switching device is in the off state, determine the first address information of each first device on the expansion board;

[0078] Step S33: When the switching device is in the connected state, determine the second address information of each second device on the expansion card through a serial signal;

[0079] Step S34: Compare the first address information and the second address information to obtain the comparison result;

[0080] Step S35: If the comparison result indicates that there is a conflict between the first address information of the first target device among multiple first devices and the second address information of the second target device among multiple second devices, adjust the first address information of the first target device.

[0081] The device address control method disclosed in this embodiment is applied to a device address control device. The device address control device includes at least: an expansion board connected to a server, a switch device and an expansion card plugged into the expansion board, a serial signal output by the server being transmitted to the expansion card through the switch device on the expansion board, a plurality of first devices plugged into the expansion board, and a plurality of second devices on the expansion card.

[0082] When the switching device is in the off state, the first address information of each first device on the expansion board is determined; when the switching device is in the connected state, the second address information of each second device on the expansion card is determined by a serial signal; if it is determined that the first address information of the first target device among multiple first devices conflicts with the second address information of the second target device among multiple second devices, the first address information of the first target device is adjusted to avoid the situation where the address information of multiple first devices conflicts with the address information of any second device, thereby ensuring normal communication of the devices.

[0083] Specifically, when the server is in the target state, the state of the switching device can be adjusted to make the switching device in the off state, thereby determining the first address information of each first device on the expansion board; and after determining the first address information of each first device on the expansion board, the state of the switching device can be adjusted to make it in the connected state, thereby determining the second address information of each second device on the expansion card.

[0084] Alternatively, when the server is in the target state, the state of the switching device is adjusted to put the switching device in the connected state, thereby determining the second address information of each second device on the expansion card; and after determining the second address information of each second device on the expansion card, the state of the switching device is further adjusted to put it in the disconnected state, thereby determining the first address information of each first device on the expansion board.

[0085] Specifically, the server is in the target state, which can be defined as follows: the server is in the power-on initialization phase. During this phase, the server compares the first address information of each first device on the expansion board with the second address information of each second device on the expansion card to determine if there are any conflicting address information. In other words, every time the server initializes, it checks for conflicting address information to ensure that each first device and each second device can communicate normally after the server starts operating.

[0086] In addition, adjusting the state of the switching device to put it in the off state can be specifically done by: adjusting the state of the enable signal of the switching device to a first state, which is an disabled state; and adjusting the switching device to the off state in response to the state of the enable signal being in the first state.

[0087] Adjusting the state of a switchgear can be achieved by adjusting the state of its enable signal. That is, the server transmits an enable signal to the switchgear, and the state of the enable signal transmitted by the server is different from the current state of the switchgear's enable signal, thus adjusting the state of the switchgear.

[0088] If the transmitted enable signal is in the first state, i.e., the disabled state (e.g., the enable signal EN (or RST) is low), the switching device receives the enable signal of the first state. Based on the enable signal of the first state, the switching device is in the off state. When the switching device is in the off state, the I2C communication between the switching device and the expansion card on the expansion board is disconnected. That is, the second devices on the expansion card cannot perform I2C communication. At this time, the other functions of the expansion card and the second devices on the expansion card are not affected.

[0089] If the transmitted enable signal is in the second state, i.e., the enable state (e.g., the enable signal EN (or RST) is high), the switching device receives the enable signal of the second state. Based on the enable signal of the second state, the switching device is in the connected state. When the switching device is in the connected state, the I2C communication of each second device on the expansion card that is connected to the expansion board through the switching device is in the connected state, that is, each second device on the expansion card can realize I2C communication.

[0090] Furthermore, in the device address control method disclosed in this embodiment, if it is necessary to determine whether there is a conflict between the first address information of multiple first devices and the second address information of multiple second devices, the switching device is first made to be in the off state, and then the switching device is made to be in the connected state. When the server is in the target state, it is necessary to first determine the current state of the switching device. If it is in the connected state, it is necessary to output an enable signal of the first state to the switching device so that the switching device is adjusted from the connected state to the off state based on the enable signal of the first state. If it is in the off state, the server does not need to output an enable signal to the switching device, but directly determines the first address information of each first device on the expansion board. After determining the first address information of each first device, the server needs to output an enable signal of the second state to the switching device so that the switching device is adjusted from the off state to the connected state based on the enable signal of the second state, so as to determine the second address information of each second device on the expansion card.

[0091] Correspondingly, if the switching device is first put into a connected state and then put into a disconnected state when determining whether there is a conflict between address information, then when the server is in the target state, it needs to first determine the current state of the switching device. If it is in a connected state, the server does not need to output an enable signal to the switching device, but directly determines the second address information of each second device on the expansion card; if it is in a disconnected state, the server needs to output an enable signal for the second state to the switching device so that the switching device can adjust from the disconnected state to the connected state based on the enable signal for the second state; and after determining the second address information of each second device, the server needs to output an enable signal for the first state to the switching device so that the switching device can adjust from the connected state to the disconnected state based on the enable signal for the first state, so as to determine the first address information of each first device on the expansion board.

[0092] The device address control method disclosed in this embodiment is applied to a device address control device. The device address control device includes at least: an expansion board connected to a server, a switch device and an expansion card plugged into the expansion board, a serial signal output by the server being transmitted to the expansion card through the switch device on the expansion board, multiple first devices plugged into the expansion board, and multiple second devices on the expansion card. The device address control method is used to adjust the state of the switch device when the server is in a target state, so that the switch device is in a disconnected state. When the switch device is in a disconnected state, the first address information of each first device on the expansion board is determined. When the switch device is in a connected state, the second address information of each second device on the expansion card is determined through the serial signal. If it is determined that the first address information of the first target device among the multiple first devices conflicts with the second address information of the second target device among the multiple second devices, the first address information of the first target device needs to be adjusted to avoid the situation where the addresses of multiple first devices conflict with the address of any second device, thereby ensuring normal device communication. In addition, the determination of whether there is an address conflict is only performed when the server is in a target state, eliminating the need for multiple determinations of whether there is a conflict between the address information of the devices, simplifying the processing flow and improving processing efficiency.

[0093] This embodiment discloses a device address control method, applied to a device address control device. A schematic diagram of the device address control device is shown below. Figure 1 As shown, the flowchart of the device address control method disclosed in this embodiment can be seen as follows: Figure 4 As shown, it includes:

[0094] Step S41: When the switching device is in the off state, determine the first address information of each first device on the expansion board;

[0095] Step S42: After determining the first address information, change the state of the switching device from the disconnected state to the connected state;

[0096] Step S43: Output a reset signal to the expansion board to reset each first device on the expansion board;

[0097] Step S44: Transmit the detection signal to the expansion card via the switching device;

[0098] Step S45: Obtain at least one response signal transmitted by the expansion card through the switching device in response to the probe signal, wherein the probe signal is a serial signal;

[0099] Step S46: Determine the address information corresponding to each of the at least one response signals, and determine the address information corresponding to each of the at least one response signals as the second address information of each second device on the expansion card;

[0100] Step S47: Compare the first address information and the second address information to obtain the comparison result;

[0101] Step S48: If the comparison result indicates that there is a conflict between the first address information of the first target device among multiple first devices and the second address information of the second target device among multiple second devices, adjust the first address information of the first target device.

[0102] The device address control method disclosed in this embodiment is applied to a device address control device. The device address control device includes at least: an expansion board connected to a server, a switch device and an expansion card plugged into the expansion board, a serial signal output by the server being transmitted to the expansion card through the switch device on the expansion board, a plurality of first devices plugged into the expansion board, and a plurality of second devices on the expansion card.

[0103] When the switching device is in the off state, the first address information of each first device on the expansion board is determined; when the switching device is in the connected state, the second address information of each second device on the expansion card is determined by a serial signal; if it is determined that the first address information of the first target device among multiple first devices conflicts with the second address information of the second target device among multiple second devices, the first address information of the first target device is adjusted to avoid the situation where the address information of multiple first devices conflicts with the address information of any second device, thereby ensuring normal communication of the devices.

[0104] Specifically, determining the second address information of each second device can be achieved by: adjusting the state of the switching device from the disconnected state to the connected state; outputting a reset signal to the expansion board to reset each first device on the expansion board; transmitting a probe signal to the expansion card through the switching device to obtain at least one response signal transmitted by the expansion card through the switching device in response to the probe signal, wherein the probe signal is a serial signal; determining the address information corresponding to each of the at least one response signal; and determining the address information corresponding to each of the at least one response signal as the second address information of each second device on the expansion card.

[0105] It should be noted that the order of the two steps—adjusting the state of the switching device from the disconnected state to the connected state and outputting a reset signal to the expansion board to reset each first device on the expansion board—is not limited. The state of the switching device can be adjusted first, and then the first device on the expansion board can be reset; or the first device on the expansion board can be reset first, and then the state of the switching device can be adjusted; or the state of the switching device and the first device on the expansion board can be adjusted simultaneously.

[0106] After the reset signal is output to the expansion board, each first device on the expansion board can be reset based on the reset signal. After the first device is reset, it cannot respond. Therefore, when the switch device is in the connected state, when the server outputs a probe signal (the probe signal is a serial signal transmitted via I2C communication) to the expansion board, the multiple first devices on the expansion board will not respond to the probe signal. At this time, only the multiple second devices on the expansion card can respond to the probe signal.

[0107] After the probe signal is transmitted to the expansion card through the switching device, each second device on the expansion card can receive the probe signal. After receiving the probe signal, the second device will respond to the probe signal and output an answer signal to the expansion card. The answer signal transmitted to the expansion card includes the address information of the second device that output the answer signal. The expansion card transmits each received answer signal to the server through the switching device so that the server can determine the second address information of each second device that fed back the answer signal based on each received answer signal.

[0108] The expansion card may include multiple channels. When the expansion card transmits probe signals, the server can transmit the probe signals to each second device of each channel in sequence according to the channel order of the expansion card, so that the server can receive the response signal of each second device of each channel on the expansion card.

[0109] After determining the first address information of each first device on the expansion board and the second address information of each second device on the expansion card, the first address information and the second address information are compared to obtain a comparison result. If the comparison result indicates that there is a conflict between the first address information of the first target device among the multiple first devices and the second address information of the second target device among the multiple second devices, the first address information of the first target device is adjusted.

[0110] Furthermore, if the comparison result indicates that there is no conflict between any first address information and second address information, a reset signal is output to the expansion board so that each first device on the expansion board can resume I2C communication, that is, to ensure that each first device on the expansion board can communicate with the server via I2C communication. At the same time, since the switching device is in the connected state, each second device on the expansion card can also communicate with the server via I2C communication to ensure normal communication of each device.

[0111] The device address control method disclosed in this embodiment is applied to a device address control device. In this method, when the switching device is in the off state, the first address information of each first device on the expansion board is determined, and when the switching device is in the connected state, the second address information of each second device on the expansion card is determined, so as to compare the first address information with the second address information. When it is determined that there is conflicting address information, the first address information in the conflicting address information is adjusted. The second address information of each second device on the expansion card can be determined by transmitting a probe signal to the expansion card and receiving the response information of each second device on the expansion card based on the probe signal, so as to determine the second address information of each second device based on the response information, thereby ensuring the accuracy of the determination of the second address information of each second device, thereby ensuring accurate judgment in the judgment of whether there is a conflict between the first address information and the second address information, avoiding the situation where the addresses of multiple first devices conflict with the address of any second device, thereby ensuring normal device communication.

[0112] Furthermore, in the device address control method disclosed in this embodiment, adjusting the first address information of the first target device can be specifically as follows:

[0113] The switching device is changed from connected to disconnected, and a level adjustment command is output. The level adjustment command adjusts the level information of the pins of the first target device that are in conflict, so that the first address information of the first target device can be adjusted based on the change in the level information of the pins of the first target device.

[0114] When the server determines, based on the comparison results, that there is a conflict between the first address information of the first target device and the second address information of the second target device, it needs to adjust the first address information of the first target device so that the adjusted first address information of the first target device no longer conflicts with the second address information of the second target device. Furthermore, the adjusted first address information of the first target device does not conflict with the second address information of any second device, thereby ensuring that the devices can communicate normally and avoiding situations where the devices cannot communicate normally due to address conflicts.

[0115] The address information of each first device on the expansion board is related to the address pin of the first device. The address information of the first device can be adjusted by adjusting the address pin of the first device. The adjustment of the address pin of the first device mainly involves adjusting the level information of the address pin of the first device, such as adjusting the level of a certain pin from low level to high level, or adjusting the level of a certain pin from high level to low level, or adjusting the level of several pins.

[0116] Therefore, when it is determined that the first address information of the first target device needs to be adjusted, the level information of at least some pins of the first target device can be directly adjusted to achieve the adjustment of the first address information of the first target device.

[0117] Adjusting the voltage levels of at least some pins of the first target device can be achieved by outputting address control instructions from the server. These address control instructions control the voltage levels of at least some pins of the first target device. The address control instructions first reach the I / O expander on the expansion board, and then the expansion chip adjusts the voltage levels of at least some pins of the first target device.

[0118] like Figure 5 The diagram shown is an internal schematic of the expansion board in the device address control device upon which the device address control method disclosed in this embodiment is based. It may include: a switching device 51, multiple first devices 52, and an expansion chip 53. Figure 5 The diagram also shows an expansion card plugged into an expansion board. The server can perform sideband control on the expansion board, which may include: the server outputting an enable signal (ENABLE / RST) to a switching device 51, the server outputting an address control command (Address) to an expansion chip 53, and the expansion chip 53 transmitting level information (Address Pin) of at least some pins to a first target device in the first device based on the address control command; additionally, the server can also communicate via I2C with a second device on the expansion card, with the expansion chip 53, and with the first device 52 via the switching device 51.

[0119] Specifically, the switching device 51 can be an I2C switching chip, such as the 9617 / 9545 switching chip.

[0120] It should be noted that when adjusting the first address information of the first target device, the adjustment must be made with reference to the address information of other first devices besides the first target device and each second device. This is to avoid conflicts between the adjusted first address information of the first target device and the first address information of any other first device or the second address information of any other second device, thus ensuring that the adjusted first address information of the first target device does not conflict with the address information of any other first device or any other second device. Specifically, this can be done by recording the pin level information of each first device and the pin level information of each second device. When adjusting the pin level information of the first target device, it must be ensured that the adjusted pin level information of the first target device does not conflict with the pin level information of any other first device besides the first target device or the pin level information of any other second device (no conflict, specifically, it can be different).

[0121] This embodiment discloses a device address control method, applied to a device address control device. A schematic diagram of the device address control device is shown below. Figure 1 As shown, the flowchart of the device address control method disclosed in this embodiment can be seen as follows: Figure 6 As shown, it includes:

[0122] Step S61: When the switching equipment is in the off state, determine the type of expansion board;

[0123] Step S62: Determine the first address information of each first device on the expansion board based on the type of the expansion board;

[0124] Step S63: When the switching device is in the connected state, determine the second address information of each second device on the expansion card through a serial signal;

[0125] Step S64: Compare the first address information and the second address information to obtain the comparison result;

[0126] Step S65: If the comparison result indicates that there is a conflict between the first address information of the first target device among multiple first devices and the second address information of the second target device among multiple second devices, adjust the first address information of the first target device.

[0127] The device address control method disclosed in this embodiment is applied to a device address control device. The device address control device includes at least: an expansion board connected to a server, a switch device and an expansion card plugged into the expansion board, a serial signal output by the server being transmitted to the expansion card through the switch device on the expansion board, a plurality of first devices plugged into the expansion board, and a plurality of second devices on the expansion card.

[0128] When the switching device is in the off state, the first address information of each first device on the expansion board is determined; when the switching device is in the connected state, the second address information of each second device on the expansion card is determined by a serial signal; if it is determined that the first address information of the first target device among multiple first devices conflicts with the second address information of the second target device among multiple second devices, the first address information of the first target device is adjusted to avoid the situation where the address information of multiple first devices conflicts with the address information of any second device, thereby ensuring normal communication of the devices.

[0129] Specifically, determining the first address information of each first device on the expansion board can be achieved by: determining the type of the expansion board, and determining the first address information of each first device on the expansion board based on the type of the expansion board.

[0130] Expansion boards can include multiple different types. The address information corresponding to the same type of first device plugged into different types of expansion boards is different. Therefore, it is necessary to first determine the type of expansion board. After the type of expansion board is determined, the address information of each first device plugged into the expansion board can be directly determined, thereby accurately determining the first address information of each first device.

[0131] Specifically, determining the type of expansion board can be achieved by: obtaining the level state information of each input / output pin among the multiple input / output pins of the expansion chip on the expansion board; determining the first type corresponding to the level state combination of the expansion chip based on the pre-stored correspondence between the level state combinations and the expansion board type; and determining the first type as the type of expansion board. The level state combination of the expansion chip is composed of the level state information of each input / output pin of the expansion chip.

[0132] The type of expansion board is determined by the expansion chip on the expansion board. The voltage levels of each pin of the expansion chip are different on different types of expansion boards. Therefore, it is necessary to first obtain the voltage level information of each pin (i.e., each input and output pin) of the expansion chip on the expansion board, and then combine the voltage level information of each pin on the expansion chip to obtain the voltage level combination corresponding to the expansion chip.

[0133] Since it is pre-determined that the voltage level combinations corresponding to the expansion chips on different types of expansion boards are different, the correspondence between voltage level combinations and expansion board types can be pre-stored. For example, the first expansion board type corresponds to the first voltage level combination, the second expansion board type corresponds to the second voltage level combination, and the third expansion board type corresponds to the third voltage level combination. After determining the voltage level combination of the expansion chip on the expansion board of the type to be determined, the pre-stored correspondence between voltage level combinations and expansion board types is queried based on this voltage level combination to determine the type of the expansion board of the type to be determined. For example, if the voltage level combination of the expansion chip on the expansion board of the type to be determined matches the second voltage level combination corresponding to the second expansion board type (e.g., the same), then the second expansion board type can be determined as the type of the expansion board of the type to be determined.

[0134] To determine the voltage level of each pin of the expansion chip, the server must first access the expansion chip before it can determine the voltage level of each pin.

[0135] Since the type of expansion board is determined based on the expansion chip, in order to determine the type of expansion board, the switching device must first be turned off to avoid the address information of the expansion chip conflicting with the address information of a second device on the expansion card, which would result in the inability to effectively identify the type of expansion board.

[0136] Determining the first address information of each first device on the expansion board based on the type of expansion board can be specifically achieved by: obtaining a list of pre-stored first address information of each first device corresponding to different types of expansion boards; and determining the first address information of each first device corresponding to the first type of expansion board based on the address list.

[0137] The location where the first device of each type is plugged in is different on different types of expansion boards, which results in different address information for the first device of each type on different types of expansion boards. Therefore, an address list of address information for the first device of each type on each type of expansion board can be stored in advance. After determining the type of the current expansion board, the first address information of each first device plugged into the expansion board can be determined by querying the address list corresponding to the expansion board of that type.

[0138] The device address control method disclosed in this embodiment determines the first address information of each first device on the expansion board based on the type of the expansion board when the switching device is in the off state. When the switching device is in the connected state, it determines the second address information of each second device on the expansion card. When it is determined that the first address information of a first target device among multiple first devices conflicts with the second address information of a second target device among multiple second devices, the first address information of the first target device is adjusted to avoid the situation where the devices cannot communicate normally due to the conflict between the first address information and the second address information. Determining the first address information of each first device on the expansion board by the type of the expansion board ensures the accuracy of the determination of the first address information of each first device, thereby ensuring accurate judgment in the determination of whether there is a conflict between the first address information and the second address information, avoiding the situation where the addresses of multiple first devices conflict with the address of any second device, and thus ensuring normal device communication.

[0139] This embodiment discloses a device address control device, the structural schematic diagram of which is shown below. Figure 7 As shown, it includes:

[0140] Expansion board 71, switchgear 72, expansion card 73, and controller 74.

[0141] Among them, expansion board 71 is connected to the server, and multiple first devices are plugged into expansion board 71;

[0142] Switchgear 72 is mounted on expansion board 71;

[0143] Expansion card 73 is plugged into expansion board 71. Multiple second devices are provided on expansion card 73. The serial signal output by the server is transmitted to expansion card 73 through switching device 72 on expansion board 71.

[0144] The controller 74 is used to determine the first address information of each first device when the switching device 72 is in the off state, and to determine the second address information of each second device through a serial signal when the switching device 72 is in the connected state. It compares the first address information and the second address information to obtain a comparison result. If the comparison result indicates that there is a conflict between the first address information of the first target device among the multiple first devices and the second address information of the second target device among the multiple second devices, it adjusts the first address information of the first target device.

[0145] Furthermore, the controller is also used for:

[0146] In response to the server being in the target state, adjust the state of the switching device to put the switching device in the off state;

[0147] The step of adjusting the state of the switching device to put the switching device in the off state includes: adjusting the state of the enable signal of the switching device to a first state, the first state being an disabled state; and adjusting the switching device to the off state in response to the state of the enable signal being in the first state.

[0148] Furthermore, the controller is also used for:

[0149] After determining the first address information, the status of the switching device is changed from the disconnected state to the connected state;

[0150] The process of changing the state of the switching device from the disconnected state to the connected state includes: adjusting the state of the enable signal of the switching device to a second state, wherein the second state is the enable state; and adjusting the switching device to the connected state in response to the state of the enable signal being in the second state.

[0151] Furthermore, the controller is used for:

[0152] Output a reset signal to the expansion board to reset each first device on the expansion board; transmit a probe signal to the expansion card via a switching device; obtain at least one response signal transmitted by the expansion card via the switching device in response to the probe signal, wherein the probe signal is a serial signal; determine the address information corresponding to each of the at least one response signal, and determine the address information corresponding to each of the at least one response signal as the second address information of each second device on the expansion card.

[0153] Furthermore, the controller is used for:

[0154] Determine the type of expansion board; based on the type of expansion board, determine the first address information of each first device on the expansion board.

[0155] Furthermore, the controller is used for:

[0156] Obtain the level state information of each input / output pin among the multiple input / output pins of the expansion chip on the expansion board; based on the pre-stored correspondence between the level state combinations and the expansion board type, determine the first type corresponding to the level state combination of the expansion chip, and determine the first type as the type of the expansion board. The level state combination of the expansion chip is composed of the level state information of each input / output pin of the expansion chip.

[0157] Furthermore, the controller is used for:

[0158] Obtain a list of pre-stored first address information for each first device corresponding to different types of expansion boards; determine the first address information for each first device corresponding to the first type of expansion board based on the address list.

[0159] Furthermore, the controller is also used for:

[0160] If the comparison result indicates that there is no conflict between any first address information and second address information, a cancel reset signal is output to the expansion board.

[0161] Furthermore, the controller is used for:

[0162] The switching device is changed from connected to disconnected, and a level adjustment command is output. The level adjustment command adjusts the level information of the pins of the first target device that are in conflict, so that the first address information of the first target device can be adjusted based on the change in the level information of the pins of the first target device.

[0163] It should be noted that the controller in the device address control device disclosed in this embodiment can be a controller on the expansion board, or it can be a server outside the expansion board used to control the expansion board; no specific limitation is made here.

[0164] The device address control device disclosed in this embodiment is implemented based on the device address control method disclosed in the above embodiment, and will not be described again here.

[0165] The device address control device disclosed in this embodiment includes: an expansion board connected to a server, a switch device and an expansion card plugged into the expansion board, a serial signal output by the server being transmitted to the expansion card through the switch device on the expansion board, multiple first devices plugged into the expansion board, and multiple second devices on the expansion card. When the switch device is in an off state, the first address information of each first device on the expansion board is determined. When the switch device is in a connected state, the second address information of each second device on the expansion card is determined through the serial signal. If it is determined that the first address information of a first target device among the multiple first devices conflicts with the second address information of a second target device among the multiple second devices, the first address information of the first target device needs to be adjusted to avoid conflicts between the addresses of multiple first devices and the address of any second device, thereby ensuring normal device communication.

[0166] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0167] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0168] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0169] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A device address control method, applied to a device address control device, the device address control device comprising at least: An expansion board connected to a server, the expansion board having a switching device and an expansion card plugged into the expansion board, the serial signal output by the server being transmitted to the expansion card through the switching device on the expansion board, the expansion board having multiple first devices plugged into it, and the expansion card having multiple second devices, the method comprising: When the switching device is in the off state, determine the first address information of each first device on the expansion board; When the switching device is in a connected state, the second address information of each second device on the expansion card is determined by a serial signal; Compare the first address information and the second address information to obtain the comparison result; If the comparison result indicates that there is a conflict between the first address information of the first target device among the plurality of first devices and the second address information of the second target device among the plurality of second devices, the first address information of the first target device is adjusted.

2. The method according to claim 1, further comprising: In response to the server being in the target state, the state of the switching device is adjusted to put the switching device in the off state; Wherein, adjusting the state of the switching device to put the switching device in the off state includes: Adjust the state of the enable signal of the switching device to a first state, wherein the first state is an disabled state; In response to the enable signal being in the first state, the switching device is adjusted to the off state.

3. The method according to claim 1, further comprising: After determining the first address information, the state of the switching device is changed from the disconnected state to the connected state; The step of adjusting the state of the switching device from an open state to an open state includes: Adjust the state of the enable signal of the switching device to the second state, whereby the second state is the enable state; In response to the enable signal being in the second state, the switching device is adjusted to the connected state.

4. The method according to claim 3, wherein determining the second address information of each second device on the expansion card when the switching device is in a connected state includes: Output a reset signal to the expansion board to reset each first device on the expansion board; The detection signal is transmitted to the expansion card via the switching device; Obtain at least one response signal transmitted by the expansion card through the switching device in response to the probe signal, wherein the probe signal is a serial signal; The address information corresponding to each of the at least one response signal is determined, and the address information corresponding to each of the at least one response signal is determined as the second address information of each second device on the expansion card.

5. The method according to claim 1, wherein determining the first address information of each first device on the expansion board includes: Determine the type of the expansion board; The first address information of each first device on the expansion board is determined based on the type of the expansion board.

6. The method according to claim 5, wherein determining the type of the expansion board comprises: Obtain the level status information of each input / output pin among the multiple input / output pins of the expansion chip on the expansion board; Based on the pre-stored correspondence between level state combinations and expansion board types, a first type corresponding to the level state combination of the expansion chip is determined, and the first type is determined as the type of the expansion board. The level state combination of the expansion chip consists of the level state information of each input / output pin of the expansion chip.

7. The method according to claim 5, wherein determining the first address information of each first device on the expansion board based on the type of the expansion board includes: Obtain a list of addresses containing the first address information of each first device corresponding to different types of expansion boards, which is stored in advance. Based on the address list, determine the first address information for each first device corresponding to the first type of expansion board.

8. The method according to claim 4, further comprising: If the comparison result indicates that there is no conflict between any of the first address information and the second address information, a cancel reset signal is output to the expansion board.

9. The method according to claim 1, wherein adjusting the first address information of the first target device includes: Adjust the state of the switching device from connected to disconnected and output a level adjustment command; The level adjustment command adjusts the level information of the pins of the first target device that are in conflict, so as to adjust the first address information of the first target device based on the change in the level information of the pins of the first target device.

10. A device address control apparatus, comprising: An expansion board, connected to a server, on which multiple first devices are plugged in; A switching device is mounted on the expansion board; An expansion card is plugged into the expansion board. The expansion card is equipped with multiple second devices. The serial signal output by the server is transmitted to the expansion card through a switching device on the expansion board. The controller is configured to determine the first address information of each first device when the switching device is in the off state, and determine the second address information of each second device through a serial signal when the switching device is in the connected state, compare the first address information and the second address information to obtain a comparison result, and if the comparison result indicates that the first address information of the first target device among the plurality of first devices conflicts with the second address information of the second target device among the plurality of second devices, adjust the first address information of the first target device.