Communication method, communication system and readable storage medium
By adding multiplexer between the substrate management controller and the target device and bridging between the target device and the external device, the problem of the large number of buses required for communication between the substrate management controller and the external device is solved, and the reduction is achieved The effect of pin occupancy reduces the resource consumption and cost of CPLD.
Patent Information
- Application Number
- CN202411208776.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-11-22
AI Technical Summary
Communication between existing substrate management controllers (BMCs) and external devices requires a large amount of buses, resulting in increased consumption of pins and logic resources of CPLDs, resulting in difficulty in selecting and cost increase.
By adding a first multiplexer between the BMC and the target device and adding a second multiplexer between the target device and the external device, the multiselectror is used to achieve bridging of the communication link, reducing the target device and The pin occupies the external device and uses a multiplexer to control and switch the communication link.
It realizes that without increasing the number of buses, the number of pins required for communication between the substrate management controller and external devices is reduced, the pin and logic resource consumption of CPLDs is reduced, and the on-board space and cost are saved.
Smart Images

Figure CN119003433A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of telecommunication technology, and in particular to a communication method, a communication system and a readable storage medium. Background Art
[0002] BMC (Baseboard Management Controller) is an indispensable part of modern server, data center equipment, network equipment and other hardware systems. BMC is a dedicated microcontroller that connects peripheral devices and equipment through the I2C (Inter-Integrated Circuit) bus to monitor and manage the server system's hardware status, health, power management, heat dissipation, fault detection and other information.
[0003] Due to the increasing demands for security monitoring, level conversion, and cross-board design, most of the I2C buses currently output by the BMC are processed by the CPLD (Complex Programmable Logic Device) before being forwarded to the back-end devices, which requires more CPLD pins and poses challenges to the selection and cost of the CPLD.
[0004] In summary, how to use fewer buses to solve problems such as communication between a baseboard management controller and external devices is a technical problem that technicians in this field urgently need to solve. Summary of the invention
[0005] The purpose of the present application is to provide a communication method, apparatus, device and readable storage medium, which can use fewer buses to achieve communication between a baseboard management controller and an external device, thereby reducing the pins of the target device between the baseboard management controller and the external device.
[0006] In order to solve the above technical problems, this application provides the following technical solutions:
[0007] A communication method is applied to a target device of a communication system, wherein the target device is connected to a baseboard management controller, the target device is respectively connected to a control port in a first multiplexer and a control port in a second multiplexer, a plurality of strobe ports in the first multiplexer are connected to a plurality of communication ports of the baseboard controller, and a plurality of strobe ports in the second multiplexer are connected to external devices;
[0008] The method comprises:
[0009] Receiving a communication connection request sent by the baseboard management controller;
[0010] Parsing the communication connection request to determine the communication link to be connected;
[0011] Determine a first switch state and a second switch state corresponding to the communication link;
[0012] Sending a strobe signal corresponding to the first switch state to a control port of the first multiplexer, and sending a strobe signal corresponding to the second switch state to a control port of the second multiplexer;
[0013] After the switch gating is completed, a response message indicating that the communication link is connected is fed back to the baseboard management controller, so that the baseboard management controller can communicate with the target external device through the communication link.
[0014] Preferably, it also includes:
[0015] Receiving a communication disconnection request sent by the baseboard management controller;
[0016] Sending a disconnect control signal to the control port of the first multiplexer, and sending a disconnect control signal to the control port of the second multiplexer;
[0017] After the switch is disconnected, a response message indicating that the communication link has been disconnected is fed back to the baseboard management controller.
[0018] Preferably, parsing the communication connection request and determining the communication link to be connected includes:
[0019] Parsing the communication connection request, determining a target communication port from a plurality of communication ports of the baseboard management controller, and determining the target external device from a plurality of external devices;
[0020] Determining a first strobe port from the plurality of strobe ports of the first multiplexer according to a connection relationship between the plurality of strobe ports of the first multiplexer and the plurality of communication ports of the baseboard management controller;
[0021] Determining a second strobe port from the plurality of strobe ports of the second multiplexer according to a connection relationship between the plurality of strobe ports of the second multiplexer and the plurality of external devices;
[0022] The communication link is determined using the target communication port of the baseboard management controller, the first strobe port, the control port of the first multiplexer, the target device, the control port of the first multiplexer, the second strobe port and the target external device.
[0023] Preferably, determining the first switch state and the second switch state corresponding to the communication link includes:
[0024] Determining the first switch state using the first strobe port;
[0025] The second switch state is determined using the second strobe port.
[0026] Preferably, it includes:
[0027] A strobe port of the first multiplexer is connected to a communication port of the baseboard management controller via a data bus;
[0028] A selection port of the second multiplexer is connected to a communication port of the external device via a data bus;
[0029] The first multiplexer is connected to the target device via a data bus;
[0030] The second multiplexer is connected to the target device via a data bus.
[0031] Preferably, it also includes:
[0032] Receiving a communication connection replacement request sent by the baseboard management controller;
[0033] parsing the communication connection request to determine a target communication link to be replaced;
[0034] Determining a third switch state and a fourth switch state corresponding to the target communication link;
[0035] Determining whether the first switch state is the same as the third switch state;
[0036] If yes, determining that the switch gating of the first multiplexer is completed;
[0037] If not, sending a gating signal corresponding to the third switch state to the control port of the first multiplexer;
[0038] Determining whether the second switch state is the same as the fourth switch state;
[0039] If yes, determining that the switch gating of the second multiplexer is completed;
[0040] If not, sending a gating signal corresponding to the fourth switch state to the control port of the second multiplexer;
[0041] After the switch gating is completed, a response message is fed back to the baseboard management controller indicating that the communication link has been replaced to the target communication link.
[0042] Preferably, it also includes:
[0043] Data transmitted via the communication link is level-converted and / or encrypted.
[0044] A communication system, comprising:
[0045] A target device, the target device is connected to a baseboard management controller, the target device is respectively connected to a control port in a first multiplexer and a control port in a second multiplexer, a plurality of strobe ports in the first multiplexer are connected to a plurality of communication ports of the baseboard controller, and a plurality of strobe ports in the second multiplexer are connected to external devices;
[0046] The steps of the above communication method are performed in the target device.
[0047] Preferably, it includes:
[0048] In the printed circuit board, the first multiplexer is placed close to the baseboard management controller, and the second multiplexer is placed close to the external device.
[0049] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above communication method are implemented.
[0050] A computer program product comprises a computer program / instruction, which implements the steps of the above communication method when executed by a processor.
[0051] The method provided by the embodiment of the present application is applied in a target device of a communication system, the target device is connected to a baseboard management controller, the target device is respectively connected to a control port in a first multiplexer and a control port in a second multiplexer, a plurality of strobe ports in the first multiplexer are connected to a plurality of communication ports of the baseboard controller, and a plurality of strobe ports in the second multiplexer are connected to external devices; the method comprises: receiving a communication connection request sent by the baseboard management controller; parsing the communication connection request to determine a communication link to be connected; determining a first switch state and a second switch state corresponding to the communication link; sending a strobe signal corresponding to the first switch state to the control port of the first multiplexer, and sending a strobe signal corresponding to the second switch state to the control port of the second multiplexer; after completing the switch strobe, feeding back a response message to the baseboard management controller indicating that the communication link is connected, so that the baseboard management controller can communicate with the target external device through the communication link.
[0052] In the present application, the baseboard management controller in the communication system is not directly connected to the target device, but is bridged between the two through the first multiplexer, and the gating port of the first multiplexer is connected to the communication port of the baseboard management controller, and the control port of the first multiplexer is connected to the target device, so that the baseboard management controller can be reduced to occupy more pins of the target device. Correspondingly, for an external device, the target device is connected through the second multiplexer, and its connection method is similar to that of the first multiplexer, so that the external device can be reduced to occupy more pins of the target device. When the target device receives the communication connection request sent by the baseboard management controller, the communication link to be connected can be determined by parsing the communication connection request. Then, the first switch state and the second switch state corresponding to the communication link are determined. By sending a gating signal corresponding to the first switch state to the control port of the first multiplexer, and sending a gating signal corresponding to the second switch state to the control port of the second multiplexer, the control multiplexer is controlled to connect the corresponding gating port, so as to achieve the smooth communication link. After the switch gating is completed, a response message that the communication link is connected is fed back to the baseboard management controller, so that the baseboard management controller can communicate with the target external device through the communication link.
[0053] Technical effect: By adding a multiplexer, the present application can achieve that the baseboard management controller does not affect the communication with the external device through the target device, and at the same time, it can greatly reduce the pins occupied by the target device.
[0054] Correspondingly, the embodiments of the present application also provide a communication system, a readable storage medium and a computer program product corresponding to the above-mentioned communication method, which have the above-mentioned technical effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 This is a flow chart of an implementation of a communication method in an embodiment of the present application;
[0057] Figure 2 A schematic diagram of a communication system in an embodiment of the present application;
[0058] Figure 3 is a schematic diagram of a communication system;
[0059] Figure 4A schematic diagram of a communication link in a communication system in an embodiment of the present application;
[0060] Figure 5 This is a specific implementation flow chart of a communication method in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0062] Please refer to Figure 1 , Figure 1 is a flow chart of a communication method in an embodiment of the present application, which can be applied to Figure 2 In the target device in the communication system shown, the target device can be specifically a CPLD, the target device is connected to the baseboard management controller, the target device is respectively connected to the control port in the first multiplexer and the control port in the second multiplexer, the multiple enable ports in the first multiplexer are connected to the multiple communication ports of the baseboard controller, and the multiple enable ports in the second multiplexer are connected to external devices.
[0063] The control port in the multiplexer can receive a strobe signal sent by the target device, thereby controlling the on and off of the strobe port in the multiplexer. The control port can also transmit communication data to and from the CPLD.
[0064] That is, in this embodiment, when the target device is a CPLD, data communication between the BMC and the CPLD requires only one bus through the first multiplexer. For the convenience of control, a direct bus is maintained between the BMC and the CPLD for a long time. In other words, the CPLD only needs one bus to connect to the BMC and only needs one bus to connect to the first multiplexer. In contrast, for the external device side, the CPLD only needs to maintain a bus connection with the second multiplexer to achieve communication. That is, the number of buses connected between the CPLD and the first multiplexer, and between the CPLD and the second multiplexer is far less than the number of buses directly connecting the BMC to the CPLD, and the number of buses directly connecting the CPLD to the external device.
[0065] When there is no need for communication between the BMC and the external device connected through the CPLD, the BMC and the CPLD can be kept open through a bus. When the BMC and the external device need to communicate, it is only necessary to control the first multiplexer and the second multiplexer to temporarily establish a communication connection.
[0066] In a specific embodiment of the present application, a first multiplexer's enable port is connected to a communication port of a baseboard management controller via a data bus; a second multiplexer's enable port is connected to a communication port of an external device via a data bus; the first multiplexer and the target device are connected via a data bus; and the second multiplexer and the target device are connected via a data bus.
[0067] The following takes the I2C bus as an example to describe the communication system in detail.
[0068] Please refer to Figure 3 There is a dedicated I2C bus for communication between BMC and CPLD, and other I2C buses are processed internally by CPLD and then forwarded to back-end devices, such as level conversion, data monitoring and other different processing requirements.
[0069] A single I2C bus needs to occupy 4 pins and corresponding logic resources after being processed by CPLD, and the number of pins and corresponding logic resources increases exponentially when there are multiple I2C buses. As server designs become more and more complex, the number of CPLD pins and logic resources required are increasing, which brings challenges to the selection of CPLD. Choosing a low-specification one cannot meet the design requirements, and choosing a high-specification one will occupy board space and increase costs.
[0070] In the embodiment of the present application, Figure 2 A multiplexer is added on the basis of the functions shown, with minor hardware changes. At the same time, the software logic between the BMC and the CPLD is coordinated, thereby reducing the number of CPLD pins and the consumption of logic resources, facilitating PCB routing, saving board space, and reducing costs.
[0071] Specifically, in the embodiment of the present application, a multiplexer is added between the BMC and the CPLD, so that the CPLD can communicate with the multiple I2C buses of the BMC through one I2C bus. A multiplexer is added between the CPLD and the device, so that the CPLD can communicate with multiple DEVICEs through one I2C bus.
[0072] Commonly used multiplexers have 4-way, 8-way and other specifications. The following is an example of a 4-way specification. The function of the multiplexer is mainly to control the connection relationship between channel A and four channels B / C / D / E. All channels can be disconnected or connected, or one or more channels can be connected at the same time.
[0073] The following is a description of a method for communicating based on the above communication system, that is, the method includes the following steps:
[0074] S101: Receive a communication connection request sent by a baseboard management controller.
[0075] According to the requirements of the I2C bus protocol, there cannot be duplicate addresses or multiple devices sending data at the same time on the same bus, so the channel switching of the first multiplexer needs to be consistent with the communication requirements of the I2C bus. As the I2C master device, the BMC will actively initiate access to the DEVICE device, so the software logic cooperation between the BMC and the CPLD is required to complete the gating control of the Switch.
[0076] By default, CPLD disconnects all channels of the two multiplexers. When BMC needs to access an external device, it first sends the name of the I2C bus to be accessed to CPLD through I2C0.
[0077] For example, the CPLD performs channel switching control by sending an I2C instruction to channel A of the multiplexer, that is, the communication connection request may be specifically an I2C instruction, and the I2C instruction carries the name of the I2C bus to be accessed.
[0078] S102: parse the communication connection request and determine the communication link to be connected.
[0079] After receiving the communication connection request, the CPLD first analyzes the communication connection request to determine the communication link that needs to be connected. The communication link can also be defined by the starting port and the end port of the I2C bus.
[0080] In a specific implementation of the present application, parsing a communication connection request and determining a communication link to be connected includes:
[0081] Parsing the communication connection request, determining a target communication port from a plurality of communication ports of the baseboard management controller, and determining a target external device from a plurality of external devices;
[0082] Determining a first strobe port from the plurality of strobe ports of the first multiplexer according to a connection relationship between the plurality of strobe ports of the first multiplexer and the plurality of communication ports of the baseboard management controller;
[0083] Determining a second strobe port from the plurality of strobe ports of the second multiplexer according to a connection relationship between the plurality of strobe ports of the second multiplexer and the plurality of external devices;
[0084] A communication link is determined using a target communication port of a baseboard management controller, a first strobe port, a control port of a first multiplexer, a target device, a control port of the first multiplexer, a second strobe port and a target external device.
[0085] For ease of description, the above steps are combined for explanation below.
[0086] By parsing the communication connection request, it is possible to determine which I2C port in the BMC needs to be connected this time and the target external device to be connected.
[0087] like Figure 2 As shown, the multiple strobe ports of the multiplexer and the multiple communication ports of the baseboard management controller are connected with an I2C bus. After the target communication port is determined, the first strobe port can be determined from the multiple strobe ports of the first multiplexer according to the connection relationship between the multiple strobe ports of the first multiplexer and the multiple communication ports of the baseboard management controller.
[0088] Correspondingly, the multiple strobe ports of the second multiplexer are also connected to corresponding external devices. Therefore, according to the connection relationship between the multiple strobe ports of the second multiplexer and the multiple external devices, the second strobe port can be determined from the multiple strobe ports of the second multiplexer.
[0089] The communication link, namely the target communication port of the BMC, the first strobe port, the control port of the first multiplexer, the CPLD, the control port of the first multiplexer, the second strobe port and the target external device, determines the communication link.
[0090] like Figure 4 The bold lines shown correspond to the communication links, namely, I2C4 of BMC+selection port E of the first multiplexer+control port of the first multiplexer+CPLD+control port of the second multiplexer+selection port D of the second multiplexer+device 3.
[0091] S103: Determine a first switch state and a second switch state corresponding to the communication link.
[0092] After the communication link is determined, it can be clear which channel of the first multiplexer needs to be selected and which channel of the second multiplexer needs to be selected. The selection status corresponds to the first switch state and the second switch state.
[0093] In a specific implementation of the present application, determining a first switch state and a second switch state corresponding to a communication link includes:
[0094] Determining a first switch state using a first strobe port;
[0095] The second switch state is determined using the second strobe port.
[0096] That is, based on the first strobe port that needs to be connected, the first switch state can be determined, that is, the first switch state requires the first strobe port to be turned on. Correspondingly, based on the second strobe port, the second switch state can be determined.
[0097] S104 , sending a selection signal corresponding to the first switch state to the control port of the first multiplexer, and sending a selection signal corresponding to the second switch state to the control port of the second multiplexer.
[0098] After the first switch state and the second switch state are determined, a selection signal can be sent to the multiplexer through the control port of the multiplexer, so that the multiplexer selects the corresponding channel.
[0099] S105 . After the switch is enabled, a response message that the communication link is enabled is fed back to the baseboard management controller, so that the baseboard management controller can communicate with the target external device through the communication link.
[0100] After completing the switch selection, the CPLD can feed back a response message to the BMC indicating that the communication link is open.
[0101] After receiving the response message, the BMC can communicate with the target external device through the communication link.
[0102] In a specific implementation of the present application, it also includes: performing level conversion and / or encryption monitoring on data transmitted through the communication link. In other words, the CPLD needs to perform at least one of level conversion and encryption monitoring on the data transmitted through the communication link, so as to ensure unimpeded communication or stable data transmission.
[0103] In a specific implementation of the present application, it also includes:
[0104] receiving a communication disconnection request sent by a baseboard management controller;
[0105] Sending a disconnect control signal to the control port of the first multiplexer, and sending a disconnect control signal to the control port of the second multiplexer;
[0106] After the switch is disconnected, a response message indicating that the communication link has been disconnected is fed back to the baseboard management controller.
[0107] For ease of description, the above three steps are combined for explanation below.
[0108] In an embodiment of the present application, after the BMC completes communication with the device through the connection link, the CMC can send a communication disconnection request to the CPLD. After receiving the communication disconnection request, the CPLD can send a disconnection control signal to the control port of the multiplexer. In this way, the multiplexer can disconnect the connected selection port. After completing the switch disconnection, the CPLD feeds back a response message that the communication link has been disconnected to the BMC, so that the BMC obtains the current communication connection disconnected state.
[0109] The method provided by the embodiment of the present application is applied in a target device of a communication system, the target device is connected to a baseboard management controller, the target device is respectively connected to a control port in a first multiplexer and a control port in a second multiplexer, a plurality of strobe ports in the first multiplexer are connected to a plurality of communication ports of the baseboard controller, and a plurality of strobe ports in the second multiplexer are connected to external devices; the method comprises: receiving a communication connection request sent by the baseboard management controller; parsing the communication connection request to determine a communication link to be connected; determining a first switch state and a second switch state corresponding to the communication link; sending a strobe signal corresponding to the first switch state to the control port of the first multiplexer, and sending a strobe signal corresponding to the second switch state to the control port of the second multiplexer; after completing the switch strobe, feeding back a response message to the baseboard management controller indicating that the communication link is connected, so that the baseboard management controller can communicate with the target external device through the communication link.
[0110] In the present application, the baseboard management controller in the communication system is not directly connected to the target device, but is bridged between the two through the first multiplexer, and the gating port of the first multiplexer is connected to the communication port of the baseboard management controller, and the control port of the first multiplexer is connected to the target device, so that the baseboard management controller can be reduced to occupy more pins of the target device. Correspondingly, for an external device, the target device is connected through the second multiplexer, and its connection method is similar to that of the first multiplexer, so that the external device can be reduced to occupy more pins of the target device. When the target device receives the communication connection request sent by the baseboard management controller, the communication link to be connected can be determined by parsing the communication connection request. Then, the first switch state and the second switch state corresponding to the communication link are determined. By sending a gating signal corresponding to the first switch state to the control port of the first multiplexer, and sending a gating signal corresponding to the second switch state to the control port of the second multiplexer, the control multiplexer is controlled to connect the corresponding gating port, so as to achieve the smooth communication link. After the switch gating is completed, a response message that the communication link is connected is fed back to the baseboard management controller, so that the baseboard management controller can communicate with the target external device through the communication link.
[0111] Technical effect: By adding a multiplexer, the present application can achieve that the baseboard management controller does not affect the communication with the external device through the target device, and at the same time, it can greatly reduce the pins occupied by the target device.
[0112] It should be noted that, based on the above embodiments, the embodiments of the present application also provide corresponding improved solutions. In the preferred / improved embodiments, the same steps or corresponding steps as those in the above embodiments can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be described one by one in the preferred / improved embodiments of this article.
[0113] In a specific implementation of the present application, the communication connection is also switched, and the specific implementation process includes:
[0114] receiving a communication connection replacement request sent by a baseboard management controller;
[0115] Parsing the communication connection request and determining the target communication link to be replaced;
[0116] Determine a third switch state and a fourth switch state corresponding to the target communication link;
[0117] Determining whether the first switch state is the same as the third switch state;
[0118] If yes, determining that the switch gating of the first multiplexer is completed;
[0119] If not, sending a gating signal corresponding to the third switch state to the control port of the first multiplexer;
[0120] Determining whether the second switch state is the same as the fourth switch state;
[0121] If yes, determining that the switch gating of the second multiplexer is completed;
[0122] If not, sending a gating signal corresponding to the fourth switch state to the control port of the second multiplexer;
[0123] After the switch gating is completed, a response message indicating that the communication link has been replaced to the target communication link is fed back to the baseboard management controller.
[0124] For ease of description, the above steps are combined for explanation below.
[0125] After BMC has accessed the target external device, when it needs to switch to another external device, it can send the name of the I2C bus to be accessed to CPLD through I2C0. That is, CPLD can receive the request to change the communication connection.
[0126] After receiving the request to change the communication connection, CPLD controls the multiplexer to disconnect the previous channel, and then switches to the corresponding channel, and so on to perform subsequent operations. After BMC completes access to all devices, it notifies CPLD through I2C0 to disconnect all channels. After CPLD completes processing, it feeds back the results to BMC. In this way, the current round of operations has been processed, and the subsequent BMC needs to access DEVICE can be processed according to the same logic.
[0127] In a specific implementation of the present application, the total number of the first multiplexer and the second multiplexer is greater than 2. That is to say, more multiplexers can be added according to actual application needs, and the added placement position can be connected to the second multiplexer or the first multiplexer. If a multi-way controller with a placement position and a connection relationship with the second multiplexer is added separately, communication with more external devices can be expanded. If a multi-way controller with a placement position and a connection relationship with the first multiplexer and the second multiplexer is added at the same time, at least 2 communication links can be provided for parallel communication.
[0128] Multiple I2C devices can be connected to one I2C bus of BMC. Figure 2 The device in the BMC represents a series of multiple devices, such as backplane, power chip, PSU, etc., and is not limited to a single device. The access relationship between the BMC I2C bus and the device can be flexibly adjusted according to needs. A set of CPLD codes can be shared without hardware changes, and it is no longer limited by hardware circuits and CPLD code logic design.
[0129] The dedicated I2C bus between BMC and CPLD is not limited to I2C0, and other buses can also be selected according to actual needs. BMC generally has more than 10 I2C buses. In this embodiment, only a few of them are selected for example. Other buses that need to be processed by CPLD can also be designed according to the above description. In addition, a multiplexer of corresponding specifications can be selected according to the number of I2C buses actually required. If the number of buses is larger, more CPLD pins and logic resources can be saved, the CPLD package size can be reduced, and the board space can be saved.
[0130] When laying out the PCB, place the multiplexer between the BMC and CPLD close to the BMC, and place the multiplexer between the CPLD and the DEVICE close to the device. This way, the multiple I2C buses that originally required long-distance PCB routing can be reduced to just one I2C bus, making PCB routing easier.
[0131] To facilitate those skilled in the art to better understand and implement the communication method provided in the embodiment of the present application, the communication method is described in detail below with reference to a specific scenario as an example.
[0132] Please refer to Figure 5By default, CPLD disconnects all channels of the two switches (i.e., multiplexers). When BMC needs to access an external device (DEVICE), it first sends the name of the I2C bus to be accessed to CPLD through I2C0. After receiving the instruction, CPLD controls Switch0 and Switch1 to switch to the corresponding channels respectively, and then feeds back the result of the switching to BMC. After receiving the returned result, BMC starts to access the corresponding device.
[0133] When BMC needs to switch to other DEVICEs after accessing the device, it will also send the name of the I2C bus to be accessed to CPLD through I2C0. After receiving the instruction, CPLD controls two switches to disconnect the previous channel and then switch to the corresponding channel, and so on to perform subsequent operations. After BMC completes access to all DEVICEs, it notifies CPLD through I2C0 to disconnect all channels. After CPLD completes processing, it feeds back the results to BMC. In this way, the current round of operations has been processed, and the subsequent BMC needs to access DEVICEs according to the same logic.
[0134] Select the Switch according to the number of I2C buses and the number of channels that can be supported. The following example uses a 4-channel specification. CPLD controls the switching of I2C Switch A channel (control port) and four channels B / C / D / E (selection ports) according to the corresponding relationship between the BMC bus and the DEVICE, as shown in Table 1. The corresponding relationship between the BMC bus and the DEVICE can be adjusted according to the needs and is not limited to the following table.
[0135] Table 1, Table 1 is the I2C Switch control table
[0136]
[0137] It can be seen that the I2C Switch is added on the basis of retaining the existing functions, and the hardware changes are relatively small. At the same time, the software logic between the BMC and the CPLD is coordinated, thereby reducing the number of CPLD pins and the consumption of logic resources, facilitating PCB routing, saving board space, and reducing costs.
[0138] Corresponding to the above method embodiment, the embodiment of the present application further provides a communication system, and the communication system described below and the communication method described above can refer to each other.
[0139] See also Figure 2 As shown, the system includes:
[0140] Target device 101, the target device is connected to baseboard management controller 102, the target device is respectively connected to control port 20 in first multiplexer 103 and control port in second multiplexer 104, multiple strobe ports 10 in first multiplexer are connected to multiple communication ports of baseboard controller, and multiple strobe ports in second multiplexer are connected to external device 105;
[0141] The steps of the communication method described in the above embodiment are executed in the target device.
[0142] In a specific implementation of the present application, in a printed circuit board, the first multiplexer is placed close to the baseboard management controller (especially close to its communication port 30), and the second multiplexer is placed close to the external device.
[0143] The communication system has the following technical effects:
[0144] 1. Add multiplexers between BMC and CPLD and between CPLD and DEVICE respectively, with minor hardware changes. At the same time, the software logic between BMC and CPLD is coordinated to reduce the number of CPLD pins and the consumption of logic resources, reduce costs, reduce the size of CPLD package, and save board space.
[0145] 2. The access relationship between the BMC's I2C bus and the device can be flexibly adjusted according to demand. A set of CPLD codes can be shared without changing the hardware, and it is no longer limited by the hardware circuit and CPLD code logic design.
[0146] 3. When laying out the PCB, place the multiplexer between the BMC and CPLD close to the BMC, and place the multiplexer between the CPLD and the DEVICE close to the DEVICE. In this way, the multi-channel I2C bus that originally required long-distance PCB routing can be reduced to a single I2C bus, which facilitates PCB routing.
[0147] Corresponding to the above method embodiment, the embodiment of the present application further provides a readable storage medium. The readable storage medium described below and the communication method described above can refer to each other.
[0148] A readable storage medium stores a computer program, which implements the steps of the communication method of the above method embodiment when the computer program is executed by a processor.
[0149] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0150] Corresponding to the above method embodiment, the embodiment of the present application further provides a computer program product. The computer program product described below and the communication method described above can refer to each other.
[0151] A computer program product includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the above communication method are implemented.
[0152] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0153] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0154] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0155] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0156] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A communication method, characterized in that: In a target device applied to a communication system, the target device is connected to a baseboard management controller, the target device is respectively connected to a control port in a first multiplexer and a control port in a second multiplexer, a plurality of strobe ports in the first multiplexer are connected to a plurality of communication ports of the baseboard controller, and a plurality of strobe ports in the second multiplexer are connected to external devices; The method comprises: Receiving a communication connection request sent by the baseboard management controller; Parsing the communication connection request to determine the communication link to be connected; Determine a first switch state and a second switch state corresponding to the communication link; Sending a strobe signal corresponding to the first switch state to a control port of the first multiplexer, and sending a strobe signal corresponding to the second switch state to a control port of the second multiplexer; After the switch gating is completed, a response message indicating that the communication link is connected is fed back to the baseboard management controller, so that the baseboard management controller can communicate with the target external device through the communication link.
2. The method according to claim 1, characterized in that Also includes: Receiving a communication disconnection request sent by the baseboard management controller; Sending a disconnect control signal to the control port of the first multiplexer, and sending a disconnect control signal to the control port of the second multiplexer; After the switch is disconnected, a response message indicating that the communication link has been disconnected is fed back to the baseboard management controller.
3. The method according to claim 1, characterized in that Parsing the communication connection request and determining the communication link to be connected includes: Parsing the communication connection request, determining a target communication port from a plurality of communication ports of the baseboard management controller, and determining the target external device from a plurality of external devices; Determining a first strobe port from the plurality of strobe ports of the first multiplexer according to a connection relationship between the plurality of strobe ports of the first multiplexer and the plurality of communication ports of the baseboard management controller; Determining a second strobe port from the plurality of strobe ports of the second multiplexer according to a connection relationship between the plurality of strobe ports of the second multiplexer and the plurality of external devices; The communication link is determined using the target communication port of the baseboard management controller, the first strobe port, the control port of the first multiplexer, the target device, the control port of the first multiplexer, the second strobe port and the target external device.
4. The method according to claim 3, characterized in that Determining a first switch state and a second switch state corresponding to the communication link includes: Determining the first switch state using the first strobe port; The second switch state is determined using the second strobe port.
5. The method according to claim 1, characterized in that include: A strobe port of the first multiplexer is connected to a communication port of the baseboard management controller via a data bus; A selection port of the second multiplexer is connected to a communication port of the external device via a data bus; The first multiplexer is connected to the target device via a data bus; The second multiplexer is connected to the target device via a data bus.
6. The method according to claim 1, characterized in that Also includes: Receiving a communication connection replacement request sent by the baseboard management controller; parsing the communication connection request to determine a target communication link to be replaced; Determining a third switch state and a fourth switch state corresponding to the target communication link; Determining whether the first switch state is the same as the third switch state; If yes, determining that the switch gating of the first multiplexer is completed; If not, sending a gating signal corresponding to the third switch state to the control port of the first multiplexer; Determining whether the second switch state is the same as the fourth switch state; If yes, determining that the switch gating of the second multiplexer is completed; If not, sending a gating signal corresponding to the fourth switch state to the control port of the second multiplexer; After the switch gating is completed, a response message is fed back to the baseboard management controller indicating that the communication link has been replaced to the target communication link.
7. The method according to any one of claims 1 to 6, characterized in that: Also includes: Data transmitted via the communication link is level-converted and / or encrypted.
8. A communication system, characterized in that: include: A target device, the target device is connected to a baseboard management controller, the target device is respectively connected to a control port in a first multiplexer and a control port in a second multiplexer, a plurality of strobe ports in the first multiplexer are connected to a plurality of communication ports of the baseboard controller, and a plurality of strobe ports in the second multiplexer are connected to external devices; The steps of the communication method according to any one of claims 1 to 7 are performed in the target device.
9. The communication system according to claim 8, characterized in that: include: In the printed circuit board, the first multiplexer is placed close to the baseboard management controller, and the second multiplexer is placed close to the external device.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the communication method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
IC equipment control method and system
CN121681439A
I²C Equipment Control Methods and Systems
CN121681439B
