Method and apparatus for transmitting single-board hardware information of distributed devices
By transmitting hardware information in distributed communication devices through the I2C bus and serial code stream, the complex access problem between the main control board and the interface board or network board is solved, simplifying the transmission of hardware information and ensuring data transmission even in the event of power failure.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEW H3C TECH CO LTD
- Filing Date
- 2023-02-28
- Publication Date
- 2026-05-05
AI Technical Summary
In distributed communication devices, the main control board accesses the power management chip of the interface board or network board via the CAN bus, which is highly complex to debug, has many backplane traces, and is complex to implement, requiring a lot of hardware and software integration.
Hardware information is transmitted between different boards via the I2C bus. By using the data conversion between serial code stream and I2C signal, hardware register data can be read between different boards, avoiding the use of the complex CAN bus.
It enables the transfer of hardware memory data between different boards, simplifies the data transfer process, and can still transmit hardware information normally even if the IPC channel fails due to power failure.
Smart Images

Figure CN116841941B_ABST
Abstract
Description
Technical Field
[0001] This application relates to communication technology, specifically a method and apparatus for transmitting single-board hardware information of distributed devices. Background Technology
[0002] The distributed communication device consists of multiple single boards with different functions, such as the main control board 21 and interface boards / network boards. The processor of the interface board / network board generates IPC messages with fault information recorded on the board and sends them to the CPU of the main control board 21 via the IPC chip of the board and the IPC chip of the main control board 21. The CPU of the main control board 21 analyzes and locates the cause of the fault.
[0003] When one of the power supplies on the interface board / network board of the distributed communication device fails, the IPC chip and CPU chip of the interface board / network board will power down to meet the chip power-down sequence. However, the power management chip and the power-on controller are powered separately. The power management chip outputs a changing PG (power good) signal through the power-on controller to set the register on the main control board 21 that records the power status of the interface board / network board to a value indicating a power failure. The CPU of the main control board 21 communicates via the CAN (Controller Area Network) bus and I... 2 C accesses the power management chip, obtains information recorded in the power management chip's registers, and locates power failures on the interface board / network board.
[0004] The main control board 21 can also, when the IPC (Inter-Processor Communication) chip on the interface board / network board is not powered on, communicate via the CAN bus and I... 2 The C bus obtains information stored in the registers of other hardware devices on the interface board / network board, thereby locating the interface board / network board and acquiring / analyzing its operating status.
[0005] However, the debugging interface of the CPU of the main control board 21 accessing the power management chip of the interface board / network board via the CAN bus is more complex, with more backplane wiring, more complex function implementation, and more hardware and software integration functions involved. Summary of the Invention
[0006] The purpose of this application is to provide a method and apparatus for transmitting single-board hardware information of distributed devices, which enables transmission of information via I / O when the IPC chip is not powered on. 2 C performs read and write operations on the interface board / network board hardware.
[0007] To achieve the above objectives, this application provides a method for transmitting single-board hardware information of a distributed device, the method comprising receiving a first I having a write control bit from another single-board. 2C controller sets serial code command word; parses the first I 2 The C controller sets the serial code command word to carry the address of the device to be written; parse the first I 2 The C controller sets the register address corresponding to the register address width in the serial code command word; parsing the first I 2 The C controller sets the write data width in the serial command word; receives one or more write data serial command words from another board; receives the first I from another board. 2 The C controller starts the serial command word; parses the data to be written carried by one or more serial command words; the number of bytes of the data to be written is less than or equal to the width of the data to be written; through I 2 The C bus writes the parsed data to the register on the hardware device corresponding to the address of the register being written to.
[0008] To achieve the above objectives, this application also provides a device for transmitting single-board hardware information of a distributed device, the device including a serial code stream module and an I... 2 Module C; wherein, the serial stream module is used to receive the first I with write control bits from another board. 2 C controller sets serial code command word; parses the first I 2 The C controller sets the serial code command word to carry the address of the device to be written; parse the first I 2 The C controller sets the register address corresponding to the register address width in the serial code command word; parsing the first I 2 The C controller sets the write data width in the serial command word; receives one or more write data serial command words from another board; receives the first I from another board. 2 C controller starts the serial command word; parses the data to be written carried by more than one serial command word; the number of bytes of the data to be written is less than or equal to the width of the data to be written; I 2 The C module is used to communicate via I 2 The C bus writes the parsed data to the register on the hardware device corresponding to the address of the register being written to.
[0009] The beneficial effect of this application is that, through serial code stream and I... 2 This application enables data conversion between C signals, allowing data reading from hardware registers on different boards of a distributed communication device. It eliminates the need for complex CAN buses to transmit data between the hardware memories of different boards. Even if the IPC channels between different boards fail due to power loss, this application can still achieve data transmission between the hardware memories of different boards. Attached Figure Description
[0010] Figure 1A flowchart illustrating an embodiment of the method for transmitting single-board hardware information of a distributed device provided in this application;
[0011] Figure 2 A schematic diagram of an embodiment of the power management chip information of the service board of the distributed device provided in this application;
[0012] Figure 3 This is a schematic diagram of an embodiment of the device for transmitting single-board hardware information of a distributed device provided in this application. Detailed Implementation
[0013] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.
[0014] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.
[0015] Figure 1 The present application provides an embodiment of a method for transmitting single-board hardware information of a distributed device, including:
[0016] Step 101: Receive I with write control bit from another board. 2 C controller sets the serial code command word;
[0017] Step 102, parse I 2 The C controller sets the serial code command word to carry the address of the device to be written;
[0018] Step 103, parse I 2 The register address to be written to corresponds to the register address width in the C controller's serial code command word;
[0019] Step 104, parse I 2 The C controller sets the width of the data to be written in the serial code command word;
[0020] Step 105: Receive one or more data string code command words written from another board;
[0021] Step 106, receive I from another board 2 C controller start serial code command word;
[0022] Step 107: Parse the written data carried by one or more written data string code command words; the number of bytes of the written data is less than or equal to the width of the written data.
[0023] Step 108, via I 2 The C bus writes the parsed data to the register on the hardware device corresponding to the address of the register being written to.
[0024] Figure 1 The beneficial effects of the embodiments are demonstrated through the serial code stream and I 2 This application enables data conversion between C signals, allowing data reading from hardware registers on different boards of a distributed communication device. It eliminates the need for complex CAN buses to transmit data between the hardware memories of different boards. Even if the IPC channels between different boards fail due to power loss, this application can still achieve data transmission between the hardware memories of different boards.
[0025] Figure 2 This is a schematic diagram of an embodiment of transmitting power management chip information of a service board of a distributed device provided in this application.
[0026] In the distributed communication device, the main control board 21 and the service board / network board 20 use the IPC channel established by the IPC chips on their respective boards as the information exchange channel. When the power supply of the service board / network board 20 fails, the IPC chip and CPU of the service board / network board 20 will shut down according to the chip power-down sequence as protection chips, and will be unable to transmit information of the power management chip to the main control board 21 through the IPC channel.
[0027] The service board / network board 20 continuously uploads the PG (power good) signal, which indicates that the power supply is normal, to the main control board 21 via a serial code stream. The software of the main control board 21 polls and accesses the logic registers on the main control board 21 that store the power status of each service board, and obtains the power status of the service board at any time.
[0028] When the power supply to the service board / network board 20 fails, both the IPC chip and CPU lose power (to meet the chip power-down timing requirements and protect the chip). The power management chip and power-on control module 23 are powered independently and can operate normally. The power-on control module 23 sends a serial code stream of the PG indicating a power-on abnormality on the service board to the main control board 21. When the main control board 21 determines that the service board is experiencing a power-on abnormality based on the changing PG signal, it sends the serial code stream to the power-on control module 23 implemented by the CPLD. The power-on control module 23 then processes the serial code stream and the IPC chip... 2 The C signal is converted to transmit read / write information between the main control board 21 and the power management chip to access the power management chip.
[0029] Figure 2 In this circuit, the serial line between the main control board 21 and the service board / network board 20 consists of two unidirectional lines, and their protocol definitions are shown in Table 1 below:
[0030] start bit[7:0] bit[15:8] bit[23:16] bit[31:24] bit[39:32] stop 0 CMD BYTE0 BYTE1 BYTE2 BYTE3 0
[0031] Table 1
[0032] In the serial code stream, bits [7:0] are defined as the serial code stream CMD (command word), and bits [39:8] are defined as the data transmission content.
[0033] Based on the format of the serial code stream defined in Table 1, the definition of the serial code stream sent from the main control board 21 to the power-on control module 23 in this embodiment is shown in Table 2 below:
[0034]
[0035] Table 2
[0036] In Table 2, the value of the CMD byte, I 2 C controller reset command word and I 2 The values of bytes 0-3 of the C controller start command word are only used for Figure 2 The implementation details can be customized according to business needs.
[0037] I 2 In the C controller setting command word, if the width of the custom register address in byte 3 is 2 bytes, then register address 0 and register address 1 in bytes 1 and 2 can represent the lower 8 bits and the higher 8 bits of the register address; if the width of the custom register address in byte 3 is 1 byte, then register address 0 in byte 1 represents the register address.
[0038] I 2 In the C controller setting command word, if the width of the custom byte 3 data is 4 bytes, then define an I... 2 The CMD value of the C controller's write data command word is shown in Table 2 as 0B xxxx xxxx xxxx xxxx. If the custom data width is 8 bytes, then another custom I... 2 The CMD (Command Name) of the C controller's write data command word is, for example, 0C xxxx xxxx xxxxxxxx; the data of the command word with CMD 0B is stored first, and the data of the command word with CMD 0C is stored second; when the custom data width of byte 3 is 16 bytes, two additional I... 2 The C controller write data command words contain CMD0D and CMD0E, respectively, representing the stored data to be written.
[0039] Based on the serial stream format defined in Table 1, the serial stream sent from the service board / network board 20 to the main control board 21 in this embodiment is customized as shown in Table 2 below:
[0040] command word CMD BYTE0 BYTE1 BYTE2 BYTE3 <![CDATA[I 2 C controller reads data 1]]> 11 RDATA0 RDATA1 RDATA2 RDATA3 <![CDATA[I 2 C controller reads data 2]]> 12 RDATA4 RDATA5 RDATA6 RDATA7 <![CDATA[I 2 C controller reads data 3]]> 13 RDATA8 RDATA9 RDATA10 RDATA11 <![CDATA[I 2 C controller reads data 4]]> 14 RDATA12 RDATA13 RDATA14 RDATA15
[0041] Table 2
[0042] A single frame of a serial bitstream can transmit 4 bytes of data. In this embodiment, multiple I... 2 C controller reads data command word, each I 2 The CMD identifier of the read data command word indicates the storage order of the data being read. When the data to be read from the register of the power management chip is 13 bytes, the power-on control module 23 on the service board / network board 20 sequentially sends I... 2 The C controller reads data command words 11, 12, 13, and 14; among them, the RDATA13-15 values of bytes 1-3 of command word 14 are all FF.
[0043] Figure 2 When the main control board 21 determines that the service board / network board 20 has a power-on abnormality, it needs to read the power fault information recorded in the register of the power management chip.
[0044] The main control board 21 first sends out the serial code stream 09CB 05 00 28 (hexadecimal).
[0045] The power-on control module 23 of the service board / network board 20 receives the aforementioned serial stream, and the serial stream module 231 identifies I based on the CMD value 09 (hexadecimal) of the received serial stream. 2 The C controller sets the command word. Based on the high seven bits (1100101) of the value of byte 0 "CB" (hexadecimal), it identifies the device address of the power management chip as 65. Based on the low one bit (1) of the value of byte 0 "CB", it identifies the read operation. Based on the high three bits (001) of the value of byte 3 "28", it identifies the register address width as 1 byte and the low 5th bit (01000) as 8 bytes. Based on the identified register width of 1 byte, it obtains the register address as 05 from the value of byte 1 "05".
[0046] Main control board 21 sends I again 2 The C controller starts the serial code stream 0A FF FF FF FF.
[0047] The power-on control module 23 of the service board / network board 20 2 Module C232 initiates a read operation on the power management chip.
[0048] I 2 Module C 232 sends a start signal, then sends the identified power management chip device address (65) + write operation flag W (the high seven bits are the device address 65, and the low 1 is the write operation flag 0), and receives the response signal from the power management chip.
[0049] I2 Module C232 sends the register address to be read (05); receives the response signal from the power management chip.
[0050] I 2 Module C 232 sends the power management chip device address (65) + read operation flag R (the high seven bits are the device address 65, and the low 1 is the read operation flag 1), and receives the response signal from the power management chip.
[0051] I 2 After receiving the response signal from the power management chip, module C 232 begins receiving data sent by the power management chip. It stores the first byte of data received in the first data register of the serial code module (not shown in the diagram), i.e., the register corresponding to command word CMD11; then it stores the received byte in the second data register, i.e., the register corresponding to CMD12; when I... 2 When the C module 232 reads the last byte, that is, when the width of the received data is 8 bytes, it generates a high-level no-acknowledge signal for one clock cycle, the data transmission ends, the I2C module's (used as a serial code stream upload start) flag is set to 1, and the bus is suspended.
[0052] The serial stream module 231 sends serial streams 11XX XX XX XX (hexadecimal) and 12XX XXXX XX to the main control board 21; byte 0 to byte 3 of these two serial streams each carry four bytes of data to be read.
[0053] The main control board needs to write data into a register of the power management chip on the service board / network board 20 and send the serial code stream 09CA 06 00 28 (hexadecimal) to the power-on control module 23.
[0054] The power-on control module 23 of the service board / network board 20 receives the aforementioned serial stream, and the serial stream module 231 identifies I based on the CMD value 09 (hexadecimal) of the received serial stream. 2 The C controller sets the command word. Based on the high seven bits (1100101) of the value of byte 0 "CA" (hexadecimal), it identifies the device address of the power management chip as 65. Based on the low one bit (0) of the value of byte 0 "CA", it identifies the write operation. Based on the high three bits (001) of the value of byte 3 "24", it identifies the register address width as 1 byte and the low 5th bit (00100) as 4 bytes. Based on the identified register width of 1 byte, it obtains the register address from the value of byte 1 "06".
[0055] The main control board 21 needs to send the data to be written to the power-on control module 23 via a serial code stream 0B XX XX XX XX (hexadecimal).
[0056] The serial stream module 231 of the power-on control module 23 of the service board / network board 20 identifies I based on the CMD value 0B (hexadecimal) of the received serial stream. 2 When the C controller writes data, it retrieves 4 bytes of data to be written based on the values of bytes 0-3.
[0057] The main control board 21 sends the serial code stream 0A FF FF FF FF to the service board / network board 20, and the power-on control module 23's I... 2 Module C232 initiates a read operation on the power management chip.
[0058] I 2 Module C 232 sends the power management chip device address (e.g., 65 above) + W and receives a response signal from the power management chip;
[0059] I 2 Module C232 sends the register address to which data needs to be written (e.g., 06 above); receives the response signal from the power management chip;
[0060] I 2 After receiving the response signal from the power management chip, module C 232 begins writing the data stored in the serial stream 0B register into I. 2 C device (I) 2 C sends the data to be written sequentially according to the data bit width: DA0, DA1, DA2, and DA3.
[0061] To prevent the power management chip from crashing, the main control board 21 can send a serial code stream to reset it. The main control board sends two frames of command words: the first frame is 08F0 FF FF FF; the second frame is 0A FF FF FF FF. The serial code stream module 231 of the power-on control module 23 notifies I. 2 Module C 232 sends a reset signal to notify I 2 Module C232 sends an SCL signal for 9 clock cycles. The main control board does not need to send an I signal containing the power management chip address. 2 C controller setting command word 09H (device address of power management chip).
[0062] Figure 2 Taking the main control board 21 of the distributed communication device reading the power management chip data of the service board / network board 20 as an example, it does so through serial code stream and I... 2 Data conversion between C signals enables data reading from hardware registers on different boards, which can be based on... Figure 2The illustrated embodiment enables the main control board 21 of the distributed communication device to read register data from other devices on the service board / network board 20, or for the service board / network board 20 to read register data from hardware devices on other service boards / network boards 20. This application eliminates the need for a complex CAN bus to transmit data between the hardware memories of different boards when the IPC channel between boards fails.
[0063] Figure 3 This is a schematic diagram of an embodiment of the apparatus for transmitting single-board hardware information of a distributed device provided in this application. The apparatus 30 includes a serial stream module 31 and an I... 2 Module C 32.
[0064] Serial stream module 31 is used to receive a first I with write control bits from another board. 2 C controller sets serial code command word; parses the first I 2 The C controller sets the serial code command word to carry the address of the device to be written; parse the first I 2 The C controller sets the register address corresponding to the register address width in the serial code command word; parsing the first I 2 The C controller sets the write data width in the serial command word; receives one or more write data serial command words from another board; receives the first I from another board. 2 C controller starts the serial code command word; parses the written data carried by more than one written data serial code command word; the number of bytes of the written data is less than or equal to the written data width;
[0065] I 2 C module 32, used for I 2 The C bus writes the parsed data to the register on the hardware device corresponding to the address of the register being written to.
[0066] The serial stream module 31 is also used to receive a second I with read control bits from another board. 2 C controller sets serial code command word; parses the second I 2 The C controller sets the serial command word to carry the address of the device being read; parses the second I 2 The C controller sets the register address to be read corresponding to the register address width in the serial code command word; parsing the second I 2 The C controller sets the read data width in the serial command word; it receives the second I from another board. 2 C controller start serial code command word; I 2 Module C32 is also used for I 2The C bus receives data stored in the register corresponding to the address of the read register sent by the hardware device corresponding to the address of the read device; the serial code stream module 31 is also used to sequentially write the received data storage into each uplink data register and send the data stored in each full uplink data register to another board through one or more uplink data serial code command words; I 2 Module C32 is also used to stop accessing the I-channel when the total number of bytes received equals the width of the data to be read. 2 C-bus reception.
[0067] The serial stream module 31 is also used to receive I signals with read control bits from another board. 2 C controller reset serial code command word; receive third I from another board 2 C controller start serial code command word; I 2 Module C32 is also used for I 2 The C bus sends a reset signal for nine clock cycles.
[0068] The serial code stream module 31 receives multiple data serial code command words to be written from another board, and the command words are ordered according to the type of the data serial code command words, which is the storage order of the written data.
[0069] The serial stream module 31 also sends multiple uplink data serial code command words to another board and sets the type command words of multiple uplink data serial code command words according to the storage order of the read data.
[0070] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for transmitting single-board hardware information of a distributed device, characterized in that, The method includes, Receive the first I with write control bit from another board. 2 C controller sets the serial code command word; Analysis of the first I 2 The C controller sets the serial code command word to carry the address of the device to be written; Analysis of the first I 2 The register address to be written to corresponds to the register address width in the C controller's serial code command word; Analysis of the first I 2 The C controller sets the width of the data to be written in the serial code command word; Receive one or more written data string command words from the other board; Receive the first I from the other single board 2 C controller start serial code command word; Parse the written data carried by the one or more written data string code command words; the number of bytes of the written data is less than or equal to the width of the written data; Through I 2 The C bus writes the parsed data to the register on the hardware device corresponding to the address of the written register.
2. The method according to claim 1, characterized in that, The method further includes; Receive a second I with read control bit from the other board. 2 C controller sets the serial code command word; Analysis of the second I 2 The C controller sets the serial code command word to carry the address of the device being read; Analysis of the second I 2 The register address to be read corresponds to the register address width in the C controller's serial code command word; Analysis of the second I 2 The C controller sets the read data width in the serial code command word; Receive a second I from the other single board 2 C controller start serial code command word; Through the I 2 The C bus receives data stored in the register corresponding to the address of the read register sent by the hardware device corresponding to the address of the read device; The received data is sequentially written into each uplink data register, and the data stored in each full uplink data register is sent to the other board through one or more uplink data serial code command words; When the total number of bytes of received data equals the read data width, stop using the I... 2 C-bus reception.
3. The method according to claim 1, characterized in that, The method also includes, Receive I with read control bit from the other board 2 C controller reset serial code command word; Receive the third I from the other single board 2 C controller start serial code command word; Through the I 2 The C bus sends a reset signal for nine clock cycles.
4. The method according to claim 1, characterized in that, The other board receives multiple data serial number command words to be written, and sets the type command words of multiple data serial number command words according to the storage order of the written data.
5. The method according to claim 2, characterized in that, The uplink data serial number command word is multiple, and the type command word of the multiple uplink data serial number command words is set according to the storage order of the data being read.
6. A device for transmitting single-board hardware information of a distributed device, characterized in that, The serial stream module is used to receive the first I with write control bits from another board. 2 C controller sets serial code command word; parses the first I 2 The C controller sets the serial code command word to carry the address of the device to be written; parses the first I 2 The C controller sets the register address corresponding to the register address width in the serial code command word; parse the first I 2 The C controller sets the write data width in the serial code command word; it receives one or more write data serial code command words from the other board; Receive the first I from the other single board 2 The controller starts the serial number command word; it parses the data to be written carried by the one or more serial number command words; the number of bytes of the data to be written is less than or equal to the width of the data to be written; I 2 The C module is used to communicate via I 2 The C bus writes the parsed data to the register on the hardware device corresponding to the address of the written register.
7. The apparatus according to claim 6, characterized in that, The serial stream module is also used to receive a second I with read control bits from the other board. 2 C controller sets the serial code command word; parses the second I 2 The C controller sets the address of the device being read carried in the serial command word; it parses the second I... 2 The C controller sets the register address to be read corresponding to the register address width in the serial code command word; parse the second I 2 The C controller sets the read data width in the serial code command word; it receives the second I from the other board. 2 C controller start serial code command word; The I 2 The C module is also used to communicate via the I 2 The C bus receives data stored in the register corresponding to the address of the read register sent by the hardware device corresponding to the address of the read device; The serial code stream module is also used to sequentially write the received data storage into each uplink data register and send the data stored in each full uplink data register to the other board through one or more uplink data serial code command words; The I 2 The C module is also used to stop accessing the I module when the total number of bytes of received data equals the read data width. 2 C-bus reception.
8. The apparatus according to claim 6, characterized in that, The serial code stream module is also used to receive I signals with read control bits from the other board. 2 C controller reset serial code command word; receive third I from the other single board 2 C controller start serial code command word; The I 2 The C module is also used to communicate via the I 2 The C bus sends a reset signal for nine clock cycles.
9. The apparatus according to claim 7, characterized in that, The serial code stream module receives multiple data serial code command words from the other board, and the order of the command words according to their type corresponds to the storage order of the written data.
10. The apparatus according to claim 7, characterized in that, The serial stream module also sends multiple uplink data serial code command words to the other board and sets the type command words of multiple uplink data serial code command words according to the storage order of the read data.
Citation Information
Patent Citations
A communication method between upper device and lower device
CN101193118A
Software layer for communication between RS-232 to I2C translation IC and a host
CN101208678A