WO2017032112A1 - Method for communicating with board having no central processing unit and communication device - Google Patents

Method for communicating with board having no central processing unit and communication device Download PDF

Info

Publication number
WO2017032112A1
WO2017032112A1 PCT/CN2016/083668 CN2016083668W WO2017032112A1 WO 2017032112 A1 WO2017032112 A1 WO 2017032112A1 CN 2016083668 W CN2016083668 W CN 2016083668W WO 2017032112 A1 WO2017032112 A1 WO 2017032112A1
Authority
WO
WIPO (PCT)
Prior art keywords
board
message
result
cpu
main control
Prior art date
Application number
PCT/CN2016/083668
Other languages
French (fr)
Chinese (zh)
Inventor
夏志雄
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017032112A1 publication Critical patent/WO2017032112A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks

Definitions

  • the present application relates to, but is not limited to, the field of inter-board communication technologies, and in particular, to a method and a communication device for communicating with a single-processorless board.
  • a main control board and multiple access boards together implement communication service functions.
  • On the access board there is a central processing unit CPU board.
  • the control program of the common CPU access board runs independently inside the board.
  • the main control board only needs to send control commands to the CPU board.
  • the control of the board can be implemented relatively simply.
  • the main purpose of the embodiments of the present invention is to provide a method and a communication device for communicating with a single processor without a central processing unit, which solves the technical problem that the CPU of the CPU cannot communicate with the main control board in the related art.
  • a method of communicating with a CPUless board comprising:
  • the CPU-free board After the CPU is not powered on, the CPU-free board sends an report message of the board information of the CPU-free board to the main control board. ;
  • the main control board allocates a single board proxy process for each CPUless board that is connected to the main control board and is in a power-on state.
  • the main control board sends a control packet to the corresponding CPUless board through the board proxy process, and controls the corresponding CPUless board to perform read processing or write processing.
  • the CPUless board receives the control packet sent by the main control board, and according to the received control The message is read or written.
  • the reporting packet and the control packet are Ethernet packets that are added with a preset virtual local area network VLAN identifier.
  • control message includes a write operation message and a read operation message.
  • the main control board sends a control packet to the corresponding CPUless board through the board proxy process to control the corresponding CPUless board to perform read processing or write processing, including:
  • the write operation message including the corresponding configuration value and the configuration address of the write operation is sent to the CPUless board.
  • the CPU-free board parses the configuration value and the matching address from the received write operation message, and configures the configuration value into the chip register corresponding to the configuration address.
  • the read operation message including the chip register address corresponding to the read operation is sent to the CPUless board.
  • the CPU-free board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message and sends the result message to the main control board.
  • the board proxy process of the main control board receives the result packet sent by the CPUless board, where the result packet is an Ethernet packet that adds a preset virtual local area network VLAN identifier.
  • the CPUless board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message, and sends the result message to the main control board.
  • the CPUless board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message, and sends the result message to the main control board.
  • the CPUless board receives the read operation message sent by the main control board.
  • the CPU-free board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message and sends the result message to the main control board.
  • the receiving, by the board proxy process of the main control board, the result packet sent by the CPUless board includes:
  • the board agent process of the main control board determines whether the result packet sent by the CPUless board is Ready
  • the board proxy process of the main control board receives the result packet sent by the CPUless board.
  • the read operation message and the result message include a type field.
  • the method further includes: after the step of the board proxy process of the main control board receiving the result packet sent by the CPUless board, the board proxy process of the main control board according to the received result message
  • the type field determines the result type of the result message.
  • a communication device includes a CPU board without a central processing unit and a main control board.
  • the CPU-less board includes: a message reporting module and a message communication module; the main control board includes: a process allocation module and a board agent process module; and the message reporting module is set to be a CPUless board.
  • the device sends the report message of the board information of the CPUless board to the process allocation module.
  • the process allocation module is configured to allocate a single board proxy process to each CPUless board that is connected to the main control board and is in a power-on state.
  • the board proxy process module is configured to send a control packet to the corresponding CPUless board through the board proxy process, and control the corresponding CPUless board to perform read processing or write processing;
  • the message communication module is configured to receive a control message sent by the board agent process module, and perform read processing or write processing according to the received control message.
  • the reporting packet and the control packet are Ethernet packets that are added with a preset virtual local area network VLAN identifier.
  • control message includes a write operation message and a read operation message.
  • the single board proxy process module includes a first write unit, a first read unit, and a result processing unit.
  • the message communication module includes a second write unit and a second read unit.
  • the first write unit is configured to send a write operation message including the write operation corresponding configuration value and the configuration address to the second when the CPU-free board performs a write operation by the board proxy process Write unit
  • the second write unit is configured to parse the configuration value and the matching address from the received write operation message, and configure the configuration value into a chip register corresponding to the configuration address.
  • the first reading unit is configured to perform the CPUless board through a board proxy process. During the read operation, a read operation message including the chip register address corresponding to the read operation is sent to the message communication module.
  • the second reading unit is configured to parse the chip register address from the received read operation message, and encapsulate the destination information corresponding to the chip register address into a result message and send the result message to the result processing unit.
  • the result processing unit is configured to receive the result message sent by the second read unit, where the result message is an Ethernet message that adds a preset virtual local area network VLAN identifier.
  • the second reading unit parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message, and sends the result message to the result processing unit.
  • the read operation message sent by the main control board is received.
  • the chip register address is parsed from the received read operation message, and the destination information corresponding to the chip register address is encapsulated into a result message and sent to the result processing unit.
  • the result processing unit that is sent by the result processing unit to the second reading unit includes:
  • the read operation message and the result message include a type field.
  • the single board agent process module further includes:
  • the type processing unit is configured to determine, after the result processing unit receives the result message sent by the CPUless board, the result type of the result message according to the type field in the received result message.
  • a computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the method of communicating with a CPU without a central processing unit.
  • the main control board allocates a single-board proxy process to each CPU-less board that is connected to the main control board and is in a power-on state.
  • the main control board passes the single-board proxy process to the corresponding CPU-free process according to requirements.
  • the board sends control packets to control the corresponding CPU-free board for read or write processing, so that communication between the CPU-free board and the main control board is implemented.
  • FIG. 1 is a schematic diagram showing the internal structure and control relationship of a CPUless single board and a main control board according to the present invention
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for communicating with a central processing unit without a central processing unit;
  • FIG. 3 is a schematic diagram of control of mutually exclusive access of a multi-thread simultaneous read operation
  • FIG. 4 is a schematic diagram of functional modules of a first embodiment of a communication device according to the present invention.
  • the hardware structure of the CPUless board and the main control board in the embodiment of the present invention is briefly introduced.
  • the CPUless board is not provided.
  • the CPU minimum system is not set, and the FPGA chip, the CPLD (Complex Programmable Logic Device) chip and the backplane (supporting the interconnection between the CPUless board and the main control board, And the two boards for the inter-board communication are directly connected to the circuit board that supports the CPU-free board and the main control board.
  • the CPLD chip without the CPU board is already burned at the factory.
  • the CPU-free board does not need to run the software program and the FPGA program.
  • the CPLD program is used together with the software program of the main control board to implement all the functions of the access board.
  • a single-board proxy process is enabled for each CPU-less card. The process is related to the CPU accessing most functions of the board.
  • the board is read and written by the board.
  • the CPLD chip of the board is completed. The process is described as follows:
  • the board proxy process on the main control board notifies the device and offset address that the CPU board should read or write through the Ethernet packet in the private Ethernet packet format.
  • the board agent on the standby main control board is also running, but the CPU-free board configuration query operation is not performed, and the dedicated Ethernet packets are not sent and received with the CPU-free board.
  • the information such as the rack map and alarm performance is synchronized to the standby main control board through the software system of the main control board.
  • the CPLD chip without the CPU board parses the dedicated Ethernet packet sent by the board agent of the main control board. After matching the destination MAC address, the pre-defined read and write operation type and operation address in the professional Ethernet packet are selected. , converted into a chip-specific interface such as I2C for operation.
  • the CPLD chip without a CPU board actively reports to the main control board periodically.
  • the CPLD chip of the CPU-free board is configured with the chip device register and remote upgrade according to the request of the configuration main control board. Query the alarm performance of the board according to the request of the main control board, and send it to the host through the dedicated Ethernet packet. Control board.
  • the packet format is a specific format because the CPU-free packet is processed by the CPLD chip. To distinguish between a normal S-port packet and a non-CPU-board communication packet, you need to tag a non-CPU card communication packet with a specific VLAN (that is, the above-mentioned dedicated Ethernet packet).
  • the packets of the CPU-free board are in the format of a short packet and cannot be consistent with the format of the S-port.
  • the packet is processed by the board CPLD and the board proxy process of the master CPU:
  • the board agent of the main control board directly calls the underlying Ethernet port driver to encapsulate the packet and send and receive packets.
  • the CPU of the main control board needs to modify the Ethernet port to drive the packet processing and add the VLAN.
  • the embodiment of the present invention provides a method for communicating with a central processing unit without a central processing unit.
  • the method for board communication includes steps S10-S40:
  • step S10 after the CPU is not powered on, the CPU-free board sends an report message containing the board information to the main control board.
  • the board information includes the board type, the board position, and the working status of the board.
  • the CPLD chip of the CPU-free board actively reports the information of the CPU-free board to the main control board. Reports the packet so that the main control board can update the status of the CPU-free board connected to it.
  • the CPLD chip without the CPU board configures the chip device register and remote upgrade according to the request of the main control board. Query the alarm performance of the board and send it to the main control board through the report packet (the packet is the Ethernet packet with the preset VLAN ID), so that there is no CPU between the board and the main control board. The communication is more timely and effective.
  • step S20 the main control board allocates a single board proxy process for each CPUless board connected to the power-on state.
  • the main control board enables and assigns a single-board proxy process to each of the CPU-free boards that are connected to the power-on state.
  • the board agent process can implement the most functions of the CPU and access the board. The functions of the driver, the read/write access board, and other functions are implemented by the single-board proxy process and the CPU-less single-board CPLD chip.
  • the main control board sends a control packet to the corresponding CPUless board through the board proxy process to control the corresponding CPUless board to perform read processing or write processing.
  • the control packet includes a write operation message and a read operation message.
  • the main control board sends control packets to the corresponding CPUless board through the board proxy process to control the corresponding CPUless board for read processing or write processing.
  • the main control board borrows the board proxy process to replace the CPU of the access board.
  • the main control board passes the board proxy process to the CPUless board according to the actual requirements.
  • the control packet is sent to control the corresponding CPU-free board for read processing or write processing, that is, communication between the main control board and the CPU-free board is implemented.
  • Step S40 The CPUless board receives the control message sent by the main control board, and performs read processing or write processing according to the received control message.
  • the report message and the control message are Ethernet packets that are added with the preset virtual local area network VLAN identifier.
  • the control packet received by the CPU-free board is processed by the board's CPLD chip.
  • the CPU-free board sends and receives packets without CPU flexibility. Therefore, the packet format is a specific format. To distinguish between a normal S-port packet and a communication packet without a CPU card (that is, a control packet), you need to tag a non-CPU card communication packet with a specific VLAN.
  • the packets of the CPU-free board are in the format of a short packet and cannot be consistent with the format of the S-port. It is a short message format different from the S port message.
  • the main control board allocates a single-board proxy process to each CPU-less board that is connected to the power-on state, and then the main control board passes the board proxy process to the corresponding CPUless board according to requirements.
  • the control packet is sent to control the corresponding CPUless board for read processing or write processing, so as to implement communication between the CPUless board and the main control board.
  • step S30 includes steps S31-S35:
  • step S31 when the main control board writes the CPU-free board through the board proxy process, the write operation packet including the configuration value and the configuration address of the write operation is sent to the CPUless board.
  • the main control board needs to communicate with the CPU-free board (that is, when the main control board needs to read or write to the CPU-free board), determine the board agent of the main control board to operate the CPU-free board.
  • the operation type (the operation type includes the read operation and the write operation), so as to determine the type of the control packet sent by the board agent process of the main control board to the CPUless board, that is, whether the sent control message is a write operation message or a read operation. Message.
  • the board agent When the main control board writes to the CPUless board through the board proxy process, the board agent enters The process will send a write operation packet with the corresponding configuration value and configuration address of the write operation (the packet is an Ethernet packet with the VLAN ID added) to the CPUless board.
  • the write operation is to configure the correct configuration value to the chip register of the CPUless board according to the requirement. It is relatively simple, as long as the destination MAC address is as follows (as shown in Table 1).
  • the media access control, the media access control layer, the VLAN, the virtual local area network (VLAN), the destination address of the board, and the operation code are correctly filled in.
  • the VLAN ID is added to the board proxy process running on the main control board.
  • the Ethernet packet is sent to the Ethernet port on the backplane.
  • the backplane then forwards the Ethernet packet with the VLAN ID to the CPLD chip without the CPU.
  • the CPLD chip parses the packet and reports it.
  • the configuration values in the text are configured on the physical layer and optical
  • step S32 the CPU-free board parses the configuration value and the matching address from the received write operation message, and configures the configuration value into the chip register corresponding to the configuration address.
  • the board proxy process of the main control board is the same as the PHY (physical layer) chip, the clock chip, the temperature sensor, and the optical module (such as SFP (Small Form Pluggable). Pull out the optical module), restore the clock settings, etc. for initial configuration. All the initialization operations are carried out through the adaptation layer, and then converted into corresponding Ethernet packets, carrying the chip and address of the operation in the payload of the Ethernet packet.
  • the board agent process converts these commands into the slot number, device number, write address, write data, and write operation code of different devices connected to the board.
  • the board proxy process sends the information about the same write operation to the adaptation layer for Ethernet encapsulation adaptation, and translates the slot number into a different destination MAC address, VLAN, device number, write address, write data, and operation code. Encapsulated into an Ethernet payload.
  • the Ethernet packet is sent to the corresponding CPU-free board through the L2 switch chip of the main control board.
  • the CPLD without the CPU board parses the packet and performs the corresponding device write processing.
  • the board agent receives the internal S port command sent from the internal S port of the main control board, and can set the port mode of the PHY, the mode of 1588, the recovery clock, and so on.
  • the board agent converts the command into an internal Ethernet packet of the corresponding board and sends it to the corresponding board.
  • the processing is the same as the initialization process.
  • step S33 when the main control board performs a read operation on the CPUless board through the board proxy process, the read operation message including the chip register address corresponding to the read operation is sent to the CPUless board.
  • the board agent process of the main control board When the board agent process of the main control board reads a CPU-free board, the board agent process of the main control board needs to query the value of the chip register of the CPU-free board, which will contain the corresponding read operation.
  • the read operation of the chip register address is sent to the CPU-free board.
  • the first step is as follows: The board agent process on the main control board sends a read operation message to the CPU-free board to query the CPU-free board.
  • the register and its address; the second step: the result of the CPLD chip construction query without the CPU board is sent back to the board agent process of the main control board.
  • the board proxy process of the main control board For the second step, the board proxy process of the main control board needs to enable a thread to receive the result packet sent by the CPUless board, and the first step of sending the read operation message and the second step receiving the result message.
  • the operations are performed in two threads.
  • Step S34 the CPU-free board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message and sends the result message to the main control board;
  • the CPU-free board parses the chip register address from the received read operation message, obtains the destination information corresponding to the address of the CPU-free board chip register address, and encapsulates the obtained destination information into an Ethernet packet format with the VLAN identifier added.
  • the result message is sent to the main control board in time.
  • the board proxy process of the main control board receives the result packet sent by the CPUless board, and the result packet is an Ethernet packet that adds the preset virtual local area network VLAN identifier.
  • the board agent process of the main control board receives the result packet of the CPU-free board, it is used for subsequent classification, parsing, or other processing, so that the main control board reads the CPU-free board.
  • the control packet is sent to the corresponding CPUless board through the board proxy process, so as to control the corresponding CPUless board to perform read processing or Write processing; when the board agent process of the main control board writes to the CPUless board, the write operation message is sent to the CPUless board, so that the CPUless board parses the write operation message and configures the configuration value.
  • the chip register corresponding to the configuration address when the board agent process of the main control board reads the CPU-free board, the read operation message is sent to the CPU-free board for the CPU-free board to be analyzed. After the operation message is sent back to the result packet, the main control board sends a read operation message or a write operation message to the CPU-free board.
  • the CPU board only parses and encapsulates the packets, and does not perform logic analysis and processing on the packets. This implements the read and write operations of the main control board to the CPU-free board, that is, the communication between the main control board and the CPU-free board is realized. .
  • step S34 includes steps S341-S342:
  • step S341 if no other read operation message is received and no result message is being encapsulated, the CPUless board receives the read operation message sent by the main control board.
  • step S342 the CPUless board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message and sends the result message to the main control board.
  • the main control board enables a single board proxy process to communicate with a CPUless board, and the board proxy process enables one thread to send read operation messages to the CPUless board, and one thread is responsible for receiving no CPU orders.
  • the result packet sent by the CPLD chip of the board when the CPLD chip of the CPU-free board receives the read operation message sent by the multiple threads at the same time, it detects whether the CPU-free board has received the read operation message at the current time and The read operation packet is also processed (that is, the result packet corresponding to the received read operation message is being encapsulated). If the CPU-free board has the result packet being encapsulated at the current time, the main control board is not sent.
  • the CPU-free board If the CPU-free board does not have a result packet being encapsulated at the current time, it continues to determine whether the CPU-free board receives the read operation message sent by multiple threads at the same time, if there are multiple When the thread sends a read operation message, it selects and parses a read operation report according to a preset rule (for example, determining the priority of the read operation message according to the arrival time of the read operation message, the length of the message, etc.). Text. Then, the corresponding destination information is found according to the parsed chip register address, and the destination information is encapsulated into a result message and sent to the main control board (the main control board that sends the parsed read operation message).
  • a preset rule for example, determining the priority of the read operation message according to the arrival time of the read operation message, the length of the message, etc.
  • step S35 includes step S351- S352:
  • step S351 the board proxy process of the main control board determines that the result packet sent by the CPUless board is No ready.
  • step S352 when the result packet sent by the CPUless board is ready, the board proxy process of the main control board receives the result packet sent by the CPUless board.
  • the CPLD reply result of the CPU-free board sends a packet to the board agent process of the main control board. If the main control board is in the process, the main control board is in the process. It is not necessary to obtain the result of the result message in the buffer before receiving the result message of the reply, so a delay protection process is needed here.
  • the board agent process of the main control board determines whether the result packet sent by the CPU-free board is ready. That is, the thread that is used by the board proxy process to receive the result packet receives the result report corresponding to the read operation message.
  • the result packet is marked with a ready flag (the flag is used to indicate that the result message is ready), and the thread used to send the read operation message in the board proxy process of the main control board detects the result message.
  • the board agent process of the main control board receives the result packet sent by the CPU-free board when the result packet sent by the CPU-free board is ready.
  • the thread that sends the read operation message After the thread that sends the read operation message does not detect the ready flag on the result message, it waits for the preset waiting time (for example, 5ms), continues to detect the ready flag on the result message, and so on, until the single control board
  • the thread used to send the read operation message in the board proxy process does not detect the ready flag on the result message or prompts the communication abnormality after a preset number of times (for example, 20 times).
  • the board agent process of the main control board determines whether the result packet sent by the CPU-free board is ready. When the result packet sent by the CPU-free board is ready, the board agent process of the main control board receives. The result packet sent by the CPU-free board prevents the main control board from receiving the result packet or receiving the incorrect result packet to continue the subsequent steps. This improves the accuracy of communication between the main control board and the CPU-free board.
  • step S35 further includes a step.
  • step S36
  • step S36 the board proxy process of the main control board determines the result type of the result packet according to the type field in the received result packet.
  • the type field is added to the operation packet. After the CPU does not parse the read operation packet, the CPU continues to maintain the type field and encapsulates the type field into the result packet (that is, the result packet also contains the corresponding read operation message.
  • the board agent process of the main control board determines the result type of the result packet according to the type field in the received result packet, and then performs batch and centralized processing on the result packets of different structure types.
  • the type field can be an IVH field in the Ethernet packet. This field is filled in when the read operation message is sent. The CPH chip response result message of the CPU-free board is automatically loaded with the filled IVH field value. This allows you to distinguish between different result types.
  • a type field is also added to the corresponding result packet, and the board proxy process of the main control board can send the result message according to the type field of the result packet.
  • the result packets of the same type are processed in batches, which improves the processing speed of the resulting packets and makes the communication between the main control board and the CPUless board more efficient.
  • the embodiment of the present invention further provides a communication device.
  • the communication device includes a CPU-free board 10 (the communication device may include multiple CPUless boards, The embodiment takes a CPUless board as an example) and the main control board 20.
  • the CPU-less board 10 includes a message reporting module 11 and a message communication module 12; the main control board 20 includes a process allocation module 21 and a board agent process module 22.
  • the process allocation module 21 is configured to allocate a single board proxy process to each CPUless board connected to the power-on state;
  • the process allocation module 21 of the main control board enables and allocates a single-board proxy process for each CPU-less board that is connected to the power-on state.
  • the board proxy process can implement most functions of the CPU. The functions of accessing the board and reading and writing accessing the board registers are implemented by the board proxy process and the CPU-less board CPLD chip.
  • the board agent process module 22 is configured to send a control packet to the CPUless board corresponding to the board proxy process to control the corresponding CPUless board to perform read processing or write processing.
  • the control packet includes a write operation message and a read operation message, and the main control board passes the single board proxy process module.
  • the control board sends a control packet to the corresponding CPU-free board to control the corresponding CPU-free board for read or write processing. That is, the main control board borrows the board proxy process instead of the CPU of the access board.
  • the control board sends a control packet to the CPU-free board through the board proxy process to control the corresponding CPU-free board for read processing.
  • write processing that is, communication between the main control board and the CPUless board is realized.
  • the packet reporting module 11 is configured to send the report message of the board information of the CPUless board to the main control board after the board is powered off by the CPU;
  • the board information includes the board type, the board position, and the working status of the board.
  • the packet reporting module 11 of the CPUless board actively reports to the main control board through the CPLD chip.
  • the status of the CPU-free board is updated, so that the main control board can update the status of the CPU-free board connected to it, so that the CPLD chip without the CPU board configures the chip device register and remote upgrade according to the request of the main control board.
  • query the alarm performance of the board and send the report packet to the main control board to send the CPU packet without the CPU. Communication with the main control board is more timely and effective.
  • the message communication module 12 is configured to receive the control message sent by the main control board, and perform read processing or write processing according to the received control message.
  • the report message and the control message are Ethernet packets that are added with the preset virtual local area network VLAN identifier.
  • the control packet received by the CPU-free board is processed by the board's CPLD chip.
  • the CPU-free board sends and receives packets without CPU flexibility. Therefore, the packet format is a specific format. To distinguish between a normal S-port packet and a communication packet without a CPU card (that is, a control packet), you need to tag a non-CPU card communication packet with a specific VLAN.
  • the packets of the CPU-free board are in the format of a short packet and cannot be consistent with the format of the S-port. It is a short message format different from the S port message.
  • the process allocation module 21 of the main control board 20 allocates a single board proxy process to each CPUless board 10 connected to the power-on state, and then the board agent process module of the main control board 20 The control packet is sent to the corresponding CPUless board through the board proxy process to control the corresponding CPUless board 10 to perform read processing or write processing, thereby implementing the between the CPUless board 10 and the main control board 20. Communication.
  • the control message includes a write operation message and a read operation message.
  • the board proxy process module 22 includes a first write unit 221, a first read unit 222, and a result processing unit 223.
  • the message communication module 12 includes a second write unit 121 and a second read unit 122.
  • the first write unit 221 is configured to send a write operation message including a corresponding configuration value and a configuration address of the write operation to the second write unit of the CPUless board when the CPU is not written by the board proxy process. .
  • the main control board needs to communicate with the CPU-free board (that is, when the main control board needs to read or write to the CPU-free board), determine the board agent of the main control board to operate the CPU-free board.
  • the operation type (the operation type includes the read operation and the write operation), so as to determine the type of the control packet sent by the board agent process of the main control board to the CPUless board, that is, whether the sent control message is a write operation message or a read operation. Message.
  • the first write unit 221 controls the board proxy process to include a write operation packet corresponding to the configuration value and the configuration address of the write operation (the message is added).
  • the Ethernet packets of the VLAN ID are sent to the CPU-free board.
  • the write operation is to configure the correct configuration value to the chip register of the CPUless board according to the requirement. It is relatively simple, as long as the destination MAC address is as follows (as shown in Table 1). The media access control, the media access control layer, the VLAN, the virtual local area network (VLAN), the destination address of the board, and the operation code are correctly filled in.
  • the VLAN ID is added to the board proxy process running on the main control board.
  • the Ethernet packet is sent to the Ethernet port on the backplane.
  • the backplane then forwards the Ethernet packet with the VLAN ID to the CPLD chip without the CPU.
  • the CPLD chip parses the packet and reports it.
  • the configuration values in the text are configured on the physical layer and optical module of the CPU-free board.
  • the first reading unit 222 is configured to send a read operation message including a chip register address corresponding to the read operation to the message communication module of the CPUless board when the CPU is not read by the board proxy process.
  • the board agent process of the main control board When the board agent process of the main control board performs a read operation on the CPUless board, that is, the board proxy process of the main control board needs to query the value of the chip register of the CPUless board, and the first read unit 222 will include the read operation.
  • the read operation message of the chip register address is sent to the CPUless board.
  • the first step is as follows: The first read unit 222 on the main control board controls the board proxy process to send read operation messages to the CPUless board. To query the CPU-free board chip register and its address; the second step: the result packet of the CPLD chip without the CPU board is sent back to the board agent process of the main control board.
  • the board proxy process of the main control board needs to enable a thread to receive the result packet sent by the CPUless board, and the first step of sending the read operation message and the second step receiving the result message.
  • the operations are performed in two threads.
  • the result processing unit 223 is configured to receive the result message sent by the second read unit of the CPUless board, wherein the result message is an Ethernet message added with the preset virtual local area network VLAN identifier.
  • the result processing unit 223 of the main control board controls the board agent process to receive the result packet of the CPU-free board back-up for subsequent classification, analysis, or other processing, thereby completing the reading of the CPU board by the main control board. operating.
  • the second writing unit 121 is configured to parse the configuration value and the matching address from the received write operation message, and configure the configuration value into the chip register corresponding to the configuration address.
  • the board proxy process of the main control board is the same as the PHY (physical layer) chip, the clock chip, the temperature sensor, and the optical module (such as SFP (Small Form Pluggable). Pull out the optical module), restore the clock settings, etc. for initial configuration. All the initialization operations are carried out through the adaptation layer, and then converted into corresponding Ethernet packets, carrying the chip and address of the operation in the payload of the Ethernet packet.
  • the second writing unit 121 controls the board proxy process to convert the commands into slot numbers, device numbers, write addresses, write data, and write operation codes for different devices connected to the board.
  • the second writing unit 121 controls the board proxy process to send the information about the same write operation to the adaptation layer for Ethernet encapsulation adaptation, and converts the slot number into a different destination MAC address, VLAN, device number, write address, Write data and opcodes are encapsulated into an Ethernet payload.
  • the Ethernet packet is sent to the corresponding CPU-free board through the L2 switch chip of the main control board.
  • the CPLD without the CPU board parses the packet and performs the corresponding device write processing.
  • the board agent receives the internal S port command sent from the internal S port of the main control board, and can set the port mode of the PHY, the mode of 1588, the recovery clock, and so on.
  • the board agent converts the command into an internal Ethernet packet of the corresponding board and sends it to the corresponding board.
  • the processing is the same as the initialization process.
  • the second reading unit 122 is configured to parse the chip register address from the received read operation message, and encapsulate the destination information corresponding to the chip register address into a result message and send the result message to the main control board.
  • the second read unit 122 of the CPUless board parses the chip register address from the received read operation message, obtains the destination information corresponding to the address of the CPU chipless chip register address, and encapsulates the obtained destination information into the added VLAN identifier.
  • the result packet of the Ethernet packet format is sent to the main control board in time.
  • the board agent process module 22 sends a control packet to the corresponding CPUless board to control the corresponding CPUless board to read. Processing or write processing; when the board proxy process of the main control board performs a write operation on the CPUless board, the first write unit 221 sends the write operation message to the CPUless board for the second of the CPUless board.
  • the write unit 121 parses the write operation message and configures the configuration value into the chip register corresponding to the configuration address.
  • the first read unit 222 reports the read operation.
  • the message is sent to the CPU-free board, so that the second read unit 122 of the CPU-free board sends back the result packet according to the parsed read operation message, so that the message exchanges between the main control board and the CPU-free board is performed.
  • the main control board sends a read operation message or a write operation message to the CPU-free board according to the actual requirements.
  • the CPU-free board only parses and encapsulates the packet, and does not perform logic analysis and processing on the packet, thus implementing the main control board pair.
  • the read operation and write operation of the CPU-free board realize the main No communication board and CPU board.
  • a third embodiment of the communication device is proposed.
  • the second reading unit 122 parses the chip register address from the received read operation message. Encapsulating the destination information corresponding to the chip register address into a result message sent to the result processing unit includes:
  • the chip register address is parsed from the received read operation message, and the destination information corresponding to the chip register address is encapsulated into a result message and sent to the result processing unit.
  • the main control board enables a single board proxy process to communicate with a CPUless board, and the board proxy process enables one thread to send read operation messages to the CPUless board, and one thread is responsible for receiving no CPU orders.
  • the result packet sent by the CPLD chip of the board when the CPLD chip of the CPU-free board receives the read operation message sent by the multiple threads at the same time, it detects whether the CPU-free board has received the read operation message at the current time and The read operation message is also processed (that is, the result message corresponding to the received read operation message is being encapsulated). If the CPU-free board has the result message being encapsulated at the current time, the second read unit 122 does not.
  • the second reading unit 122 receives the read operation message sent by the main control board; if the CPU-free board does not have the result packet being encapsulated at the current time, the second reading unit 122 continues to determine whether the CPU-free board receives multiple threads at the current time.
  • the read operation message sent if there are multiple threads to send the read operation message, the second reading unit 122 determines the priority of the read operation message according to the preset rule (for example, according to the arrival time of the read operation message, the length of the message, etc.) Level) Select and parse a read operation message. Then, the second reading unit 122 searches for the corresponding destination information according to the parsed chip register address, and sends the destination information packaged result message to the main control board (the main control board that sends the parsed read operation message).
  • a fourth embodiment of the communication device provides a fourth embodiment of the communication device.
  • the result processing unit 223 further receives the result message sent by the second read unit, including:
  • the CPLD reply result of the CPU-free board sends a packet to the board agent process of the main control board. If the main control board is in the process, the main control board is in the process. It is not necessary to obtain the result of the result message in the buffer before receiving the result message of the reply, so a delay protection process is needed here.
  • the result processing unit 223 of the main control board first determines whether the result message sent by the CPUless board is ready, that is, the thread dedicated to receiving the result message by the board proxy process (the result processing unit 223 controls the thread) is receiving.
  • the result message When the result message corresponding to the read operation message is received, the result message is marked with a ready flag (this flag is used to indicate that the result message is ready), and is used to send a read operation message in the board proxy process of the main control board.
  • the thread the first reading unit 222 controls the thread
  • detects the ready flag on the result packet that is, when the result message sent by the CPUless board is ready
  • the result processing unit 223 of the main control board receives the CPUless board.
  • the mark or the loop detection after a preset number of times (for example, 20 times) indicates that the communication is abnormal.
  • the result processing unit 223 of the main control board determines whether the result message sent by the CPUless board is ready. When the result message sent by the CPUless board is ready, the result processing unit 223 of the main control board receives. The result packet sent by the CPU-free board prevents the main control board from receiving the result packet or receiving the incorrect result packet to continue the subsequent steps. This improves the accuracy of communication between the main control board and the CPU-free board.
  • a fifth embodiment of the communication device provides a fifth embodiment of the communication device.
  • the read operation message and the result message include a type field.
  • the board agent process module 22 further includes:
  • the type processing unit 224 is configured to determine, after the result processing unit receives the result message sent by the CPUless board, the result type of the result message according to the type field in the received result message.
  • the processing after receiving the result message is different.
  • the result message needs to be classified, and the type field is added in the read operation message, and there is no CPU.
  • the board continues to maintain the type field after parsing the read operation packet, and encapsulates the type field into the result packet (that is, the result packet also contains the type field corresponding to the read operation message), and the type of the main control board
  • the processing unit 224 determines the result type of the result packet according to the type field in the received result packet, and then performs batch and centralized processing on the result packets of different structure types.
  • the type field can be an IVH field in the Ethernet packet. This field is filled in when the read operation message is sent.
  • the CPH chip response result message of the CPU-free board is automatically loaded with the filled IVH field value. This allows you to distinguish between different result types.
  • a type field is also added to the corresponding result message, and the type processing unit 224 of the main control board can send the result message according to the type field of the result message.
  • the categorization is performed, and the result packets of the same type are processed in batches to improve the processing speed of the result packets, so that the communication between the main control board and the CPUless board is more efficient.
  • a computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the method of communicating with a CPUless board.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium (such as ROM/RAM, disk). And an optical disc), including a method for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform each embodiment of the present invention.
  • a terminal device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • the device/function module/functional unit in the above embodiment When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the main control board allocates a single-board proxy process to each CPU-less board that is connected to the main control board and is in a power-on state.
  • the main control board passes the single-board proxy process to the corresponding CPU-free process according to requirements.
  • the board sends control packets to control the corresponding CPU-free board for read or write processing, so that communication between the CPU-free board and the main control board is implemented.

Abstract

Disclosed are a method and apparatus for communicating with a board having no Central Processing Unit (CPU). The method comprises: when a board having no CPU is powered on, the board having no CPU sends a report packet comprising signal board information thereof to a master control board; the master control board allocates a board proxy progress for each powered-on board having no CPU which is connected to the master control board; the master control board sends a control packet to the corresponding board having no CPU by means of the board proxy progress to control the corresponding board having no CPU to perform read processing or write processing.

Description

一种与无中央处理器单板通讯的方法及通讯设备Method and communication device for communicating with single-processor single board 技术领域Technical field
本申请涉及但不限于板间通讯技术领域,尤其涉及一种与无中央处理器单板通讯的方法及通讯设备。The present application relates to, but is not limited to, the field of inter-board communication technologies, and in particular, to a method and a communication device for communicating with a single-processorless board.
背景技术Background technique
在通讯设备中,一块主控板与多块接入单板一起实现通讯业务功能。接入单板目前普遍使用的是有中央处理器CPU单板,普通有CPU的接入单板的控制程序独立运行在单板内部,主控板仅需要将控制指令发送至有CPU单板,就可以相对简单地实现对单板的控制。In the communication device, a main control board and multiple access boards together implement communication service functions. On the access board, there is a central processing unit CPU board. The control program of the common CPU access board runs independently inside the board. The main control board only needs to send control commands to the CPU board. The control of the board can be implemented relatively simply.
随着通讯设备业务发展的需要,无CPU单板应运而生。无CPU单板的最大特点是:没有CPU、内存、FPGA(Field-Programmable Gate Array,现场可编程逻辑门阵列)芯片等,大大降低了接入单板的硬件成本。但是,由于无CPU单板没有CPU处理器,主控板无法与无CPU单板进行有效通讯。With the development of communication equipment business, no CPU boards came into being. The biggest feature of the CPU-free board is that there is no CPU, memory, or FPGA (Field-Programmable Gate Array) chip, which greatly reduces the hardware cost of accessing the board. However, because no CPU board has no CPU processor, the main control board cannot communicate effectively with the CPUless board.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例的主要目的在于提供一种与无中央处理器单板通讯的方法及通讯设备,解决了相关技术中无中央处理器CPU单板无法与主控板进行有效通讯的技术问题。The main purpose of the embodiments of the present invention is to provide a method and a communication device for communicating with a single processor without a central processing unit, which solves the technical problem that the CPU of the CPU cannot communicate with the main control board in the related art.
一种与无CPU单板通讯的方法,所述方法包括:A method of communicating with a CPUless board, the method comprising:
当无CPU单板上电后,所述无CPU单板将包含该无CPU单板的单板信息的上报报文发送至主控板。;After the CPU is not powered on, the CPU-free board sends an report message of the board information of the CPU-free board to the main control board. ;
所述主控板为每个与该主控板连接且处于上电状态的无CPU单板分配一个单板代理进程。The main control board allocates a single board proxy process for each CPUless board that is connected to the main control board and is in a power-on state.
所述主控板通过单板代理进程向对应的无CPU单板发送控制报文,通过所述控制报文控制对应的无CPU单板进行读处理或写处理。The main control board sends a control packet to the corresponding CPUless board through the board proxy process, and controls the corresponding CPUless board to perform read processing or write processing.
所述无CPU单板接收所述主控板发送的控制报文,并根据接收的控制 报文进行读处理或写处理。The CPUless board receives the control packet sent by the main control board, and according to the received control The message is read or written.
可选地,所述上报报文和控制报文为添加预设虚拟局域网VLAN标识的以太网报文。Optionally, the reporting packet and the control packet are Ethernet packets that are added with a preset virtual local area network VLAN identifier.
可选地,所述控制报文包括写操作报文和读操作报文。,Optionally, the control message includes a write operation message and a read operation message. ,
所述主控板通过单板代理进程向对应的无CPU单板发送控制报文,以控制对应的所述无CPU单板进行读处理或写处理包括:The main control board sends a control packet to the corresponding CPUless board through the board proxy process to control the corresponding CPUless board to perform read processing or write processing, including:
当所述主控板通过单板代理进程对所述无CPU单板进行写操作时,将包含所述写操作对应配置值和配置地址的写操作报文发送至所述无CPU单板。When the main control board writes the CPUless board through the board proxy process, the write operation message including the corresponding configuration value and the configuration address of the write operation is sent to the CPUless board.
所述无CPU单板从接收到的所述写操作报文中解析出配置值和匹配地址,并将该配置值配置到所述配置地址对应的芯片寄存器中。The CPU-free board parses the configuration value and the matching address from the received write operation message, and configures the configuration value into the chip register corresponding to the configuration address.
当所述主控板的单板代理进程对所述无CPU单板进行读操作时,将包含所述读操作对应的芯片寄存器地址的读操作报文发送至所述无CPU单板。When the board agent process of the main control board performs a read operation on the CPUless board, the read operation message including the chip register address corresponding to the read operation is sent to the CPUless board.
所述无CPU单板从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述主控板。The CPU-free board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message and sends the result message to the main control board.
所述主控板的单板代理进程接收所述无CPU单板发送的结果报文,其中,所述结果报文为添加预设虚拟局域网VLAN标识的以太网报文。The board proxy process of the main control board receives the result packet sent by the CPUless board, where the result packet is an Ethernet packet that adds a preset virtual local area network VLAN identifier.
可选地,所述无CPU单板从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述主控板包括:Optionally, the CPUless board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message, and sends the result message to the main control board. include:
如果当前没有接收到其它读操作报文且无正在封装的结果报文,则所述无CPU单板接收所述主控板发送的所述读操作报文。If no other read operation message is received and no result message is being encapsulated, the CPUless board receives the read operation message sent by the main control board.
所述无CPU单板从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述主控板。The CPU-free board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message and sends the result message to the main control board.
可选地,所述主控板的单板代理进程接收所述无CPU单板发送的结果报文包括:Optionally, the receiving, by the board proxy process of the main control board, the result packet sent by the CPUless board includes:
所述主控板的单板代理进程判断所述无CPU单板发送的结果报文是否 就绪;The board agent process of the main control board determines whether the result packet sent by the CPUless board is Ready
当所述无CPU单板发送的结果报文就绪时,所述主控板的单板代理进程接收所述无CPU单板发送的结果报文。When the result packet sent by the CPUless board is ready, the board proxy process of the main control board receives the result packet sent by the CPUless board.
可选地,所述读操作报文和结果报文中包含类型字段。Optionally, the read operation message and the result message include a type field.
所述方法还包括:在所述主控板的单板代理进程接收所述无CPU单板发送的结果报文的步骤之后所述主控板的单板代理进程根据接收的结果报文中的类型字段,确定该结果报文的结果类型。The method further includes: after the step of the board proxy process of the main control board receiving the result packet sent by the CPUless board, the board proxy process of the main control board according to the received result message The type field determines the result type of the result message.
一种通讯设备,所述通讯设备包括无中央处理器CPU单板和主控板。A communication device includes a CPU board without a central processing unit and a main control board.
所述无CPU单板包括:报文上报模块和报文通讯模块;所述主控板包括:进程分配模块和单板代理进程模块;所述报文上报模块,设置为当无CPU单板上电后,将包含该无CPU单板的单板信息的上报报文发送至进程分配模块;The CPU-less board includes: a message reporting module and a message communication module; the main control board includes: a process allocation module and a board agent process module; and the message reporting module is set to be a CPUless board. The device sends the report message of the board information of the CPUless board to the process allocation module.
所述进程分配模块,设置为每个与该主控板连接且处于上电状态的无CPU单板分配一个单板代理进程。The process allocation module is configured to allocate a single board proxy process to each CPUless board that is connected to the main control board and is in a power-on state.
所述单板代理进程模块,设置为通过所述单板代理进程向对应的无CPU单板发送控制报文,控制对应的无CPU单板进行读处理或写处理;The board proxy process module is configured to send a control packet to the corresponding CPUless board through the board proxy process, and control the corresponding CPUless board to perform read processing or write processing;
所述报文通讯模块,设置为接收所述单板代理进程模块发送的控制报文,并根据接收的控制报文进行读处理或写处理。The message communication module is configured to receive a control message sent by the board agent process module, and perform read processing or write processing according to the received control message.
可选地,所述上报报文和控制报文为添加预设虚拟局域网VLAN标识的以太网报文。Optionally, the reporting packet and the control packet are Ethernet packets that are added with a preset virtual local area network VLAN identifier.
可选地,所述控制报文包括写操作报文和读操作报文。Optionally, the control message includes a write operation message and a read operation message.
所述单板代理进程模块包括第一写单元、第一读单元和结果处理单元。The single board proxy process module includes a first write unit, a first read unit, and a result processing unit.
所述报文通讯模块包括第二写单元和第二读单元。The message communication module includes a second write unit and a second read unit.
所述第一写单元,设置为当通过单板代理进程对所述无CPU单板进行写操作时,将包含所述写操作对应配置值和配置地址的写操作报文发送至所述第二写单元;The first write unit is configured to send a write operation message including the write operation corresponding configuration value and the configuration address to the second when the CPU-free board performs a write operation by the board proxy process Write unit
所述第二写单元,设置为从接收到的所述写操作报文中解析出配置值和匹配地址,并将该配置值配置到所述配置地址对应的芯片寄存器中。The second write unit is configured to parse the configuration value and the matching address from the received write operation message, and configure the configuration value into a chip register corresponding to the configuration address.
所述第一读单元,设置为当通过单板代理进程对所述无CPU单板进行 读操作时,将包含所述读操作对应的芯片寄存器地址的读操作报文发送至所述报文通讯模块。The first reading unit is configured to perform the CPUless board through a board proxy process. During the read operation, a read operation message including the chip register address corresponding to the read operation is sent to the message communication module.
所述第二读单元,设置为从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述结果处理单元。The second reading unit is configured to parse the chip register address from the received read operation message, and encapsulate the destination information corresponding to the chip register address into a result message and send the result message to the result processing unit.
所述结果处理单元,设置为接收所述第二读单元发送的结果报文,其中,所述结果报文为添加预设虚拟局域网VLAN标识的以太网报文。The result processing unit is configured to receive the result message sent by the second read unit, where the result message is an Ethernet message that adds a preset virtual local area network VLAN identifier.
可选地,所述第二读单元从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述结果处理单元包括:Optionally, the second reading unit parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message, and sends the result message to the result processing unit. include:
如果当前没有接收到其它读操作报文且无正在封装的结果报文,则接收所述主控板发送的所述读操作报文。If the other read operation message is not received and there is no result message being encapsulated, the read operation message sent by the main control board is received.
从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述结果处理单元。The chip register address is parsed from the received read operation message, and the destination information corresponding to the chip register address is encapsulated into a result message and sent to the result processing unit.
可选地,所述结果处理单元接收所述第二读单元发送的结果报文包括:Optionally, the result processing unit that is sent by the result processing unit to the second reading unit includes:
判断所述无CPU单板发送的结果报文是否就绪;Determining whether the result packet sent by the CPUless board is ready;
当所述无CPU单板发送的结果报文就绪时,接收所述无CPU单板发送的结果报文。When the result packet sent by the CPUless board is ready, the result packet sent by the CPUless board is received.
可选地,所述读操作报文和结果报文中包含类型字段。Optionally, the read operation message and the result message include a type field.
所述单板代理进程模块还包括:The single board agent process module further includes:
类型处理单元,设置为在所述结果处理单元接收所述无CPU单板发送的结果报文之后,根据接收的结果报文中的类型字段,确定该结果报文的结果类型。The type processing unit is configured to determine, after the result processing unit receives the result message sent by the CPUless board, the result type of the result message according to the type field in the received result message.
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现所述的与无中央处理器CPU单板通讯的方法。A computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the method of communicating with a CPU without a central processing unit.
本发明实施例通过主控板为每个与该主控板连接且处于上电状态的无CPU单板分配一个单板代理进程,该主控板根据需求通过单板代理进程向对应的无CPU单板发送控制报文,以控制对应的无CPU单板进行读处理或写处理,从而实现无CPU单板与主控板之间的通讯。 In the embodiment of the present invention, the main control board allocates a single-board proxy process to each CPU-less board that is connected to the main control board and is in a power-on state. The main control board passes the single-board proxy process to the corresponding CPU-free process according to requirements. The board sends control packets to control the corresponding CPU-free board for read or write processing, so that communication between the CPU-free board and the main control board is implemented.
附图概述BRIEF abstract
图1为本发明无CPU单板和主控板内部结构和控制关系示意图;1 is a schematic diagram showing the internal structure and control relationship of a CPUless single board and a main control board according to the present invention;
图2为本发明与无中央处理器接入单板通讯的方法第一实施例的流程示意图;2 is a schematic flowchart of a first embodiment of a method for communicating with a central processing unit without a central processing unit;
图3为多线程同时读操作互斥访问的控制示意图;3 is a schematic diagram of control of mutually exclusive access of a multi-thread simultaneous read operation;
图4为本发明通讯设备第一实施例的功能模块示意图。4 is a schematic diagram of functional modules of a first embodiment of a communication device according to the present invention.
本发明的实施方式Embodiments of the invention
下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
为了更好地理解本发明实施例的技术方案,在此对本发明实施例无CPU单板和主控板的硬件结构进行简要介绍,参照图1和表1,在硬件上,无CPU单板上没有设置CPU最小系统,也没有设置FPGA芯片,无CPU单板的CPLD(Complex Programmable Logic Device,复杂可编程逻辑器件)芯片与背板(支撑无CPU单板和主控板之间的相互连接、并为所支撑的无CPU单板和主控板提供电源的电路板)的两路用于板间通讯的以太网链路直接连接,无CPU单板的CPLD芯片在出厂时就已经烧录完毕;在软件上,无CPU单板无需运行软件程序和FPGA程序,使用CPLD程序与主控板的软件程序配合实现接入单板的所有功能。主控板上为每个无CPU单板启用一个单板代理进程,该进程实相关CPU接入单板的大部分功能,对接入单板进行读写操作,由单板代理进程和接入单板的CPLD芯片配合完成,过程描述如下:For a better understanding of the technical solution of the embodiment of the present invention, the hardware structure of the CPUless board and the main control board in the embodiment of the present invention is briefly introduced. Referring to FIG. 1 and Table 1, in the hardware, the CPUless board is not provided. The CPU minimum system is not set, and the FPGA chip, the CPLD (Complex Programmable Logic Device) chip and the backplane (supporting the interconnection between the CPUless board and the main control board, And the two boards for the inter-board communication are directly connected to the circuit board that supports the CPU-free board and the main control board. The CPLD chip without the CPU board is already burned at the factory. On the software, the CPU-free board does not need to run the software program and the FPGA program. The CPLD program is used together with the software program of the main control board to implement all the functions of the access board. On the main control board, a single-board proxy process is enabled for each CPU-less card. The process is related to the CPU accessing most functions of the board. The board is read and written by the board. The CPLD chip of the board is completed. The process is described as follows:
1)主控板上的单板代理进程通过专用以太网报文格式的以太网报文,通知无CPU单板应该读写的器件、偏移地址。备用主控板上的单板代理程序,也同样在运行,只是不进行无CPU单板配置查询操作,也不进行与无CPU单板的专用以太网报文收发。机架图、告警性能等信息是通过主控板的软件系统同步到备用主控板上。1) The board proxy process on the main control board notifies the device and offset address that the CPU board should read or write through the Ethernet packet in the private Ethernet packet format. The board agent on the standby main control board is also running, but the CPU-free board configuration query operation is not performed, and the dedicated Ethernet packets are not sent and received with the CPU-free board. The information such as the rack map and alarm performance is synchronized to the standby main control board through the software system of the main control board.
2)无CPU单板的CPLD芯片解析主控板的单板代理程序发过来的专用以太网报文,匹配目标MAC地址后,按照专业以太网报文中预先定义的读写操作类型和操作地址,转换成芯片专有接口如I2C进行操作。2) The CPLD chip without the CPU board parses the dedicated Ethernet packet sent by the board agent of the main control board. After matching the destination MAC address, the pre-defined read and write operation type and operation address in the professional Ethernet packet are selected. , converted into a chip-specific interface such as I2C for operation.
3)无CPU单板的CPLD芯片在上电后,主动定期往主控板上报包含单 板类型的专用以太网报文。无CPU单板的CPLD芯片根据配置主控板的请求,配置芯片器件寄存器和远程升级;根据主控板的请求,查询本单板的各种告警性能,通过专用以太网报文,发送给主控板。3) After power-on, the CPLD chip without a CPU board actively reports to the main control board periodically. Board type dedicated Ethernet telegram. The CPLD chip of the CPU-free board is configured with the chip device register and remote upgrade according to the request of the configuration main control board. Query the alarm performance of the board according to the request of the main control board, and send it to the host through the dedicated Ethernet packet. Control board.
由于无CPU单板通讯报文为该单板的CPLD芯片处理,单板收发报文没有CPU灵活,因此其报文格式为特定格式。为了能区分是普通S口报文还是无CPU单板通讯报文,需要对无CPU单板通讯报文打上特定VLAN(即上述专用以太网报文)。无CPU单板通讯报文采用特定的短报文格式,无法与S口报文格式保持一致。The packet format is a specific format because the CPU-free packet is processed by the CPLD chip. To distinguish between a normal S-port packet and a non-CPU-board communication packet, you need to tag a non-CPU card communication packet with a specific VLAN (that is, the above-mentioned dedicated Ethernet packet). The packets of the CPU-free board are in the format of a short packet and cannot be consistent with the format of the S-port.
该报文由单板CPLD和主控CPU的单板代理进程处理:The packet is processed by the board CPLD and the board proxy process of the master CPU:
(1)无CPU单板的报文封装/解封装在CPLD芯片内完成(1) Packet encapsulation/decapsulation of a CPU-free board is completed in the CPLD chip.
(2)主控板的单板代理程序直接调用底层以太网口驱动进行报文封装和收发包,主控板CPU需要改造以太网口驱动收包处理,添加VLAN。接收时需要识别VLAN,将特定VLAN的报文投递到单板代理进程。(2) The board agent of the main control board directly calls the underlying Ethernet port driver to encapsulate the packet and send and receive packets. The CPU of the main control board needs to modify the Ethernet port to drive the packet processing and add the VLAN. When receiving, you need to identify the VLAN and deliver the packets of a specific VLAN to the board proxy process.
Figure PCTCN2016083668-appb-000001
Figure PCTCN2016083668-appb-000001
Figure PCTCN2016083668-appb-000002
Figure PCTCN2016083668-appb-000002
表1Table 1
本发明实施例提供一种与无中央处理器单板通讯的方法,在本发明实施例与无中央处理器单板通讯的方法的第一实施例中,参照图2,该与无中央处理器单板通讯的方法包括步骤S10-S40:The embodiment of the present invention provides a method for communicating with a central processing unit without a central processing unit. In the first embodiment of the method for communicating with a central processing unit without a central processing unit, reference is made to FIG. The method for board communication includes steps S10-S40:
步骤S10,当无CPU单板上电后,无CPU单板将包含其单板信息的上报报文发送至主控板。In step S10, after the CPU is not powered on, the CPU-free board sends an report message containing the board information to the main control board.
单板信息包括单板类型、单板位置、单板工作状态等数据,当无CPU单板上电后,该无CPU单板的CPLD芯片主动向主控板上报包含该无CPU单板信息的上报报文,以使主控板能够及时更新与其连接的无CPU单板状态,从而无CPU单板的CPLD芯片根据主控板的请求,配置芯片器件寄存器和远程升级、根据主控板的请求,查询本板的各种告警性能,并通过上报报文(该上报报文为添加了预设VLAN标识的以太网报文)发送至主控板,使无CPU单板和主控板之间的通讯更为及时、有效。The board information includes the board type, the board position, and the working status of the board. After the CPU is not powered by the board, the CPLD chip of the CPU-free board actively reports the information of the CPU-free board to the main control board. Reports the packet so that the main control board can update the status of the CPU-free board connected to it. The CPLD chip without the CPU board configures the chip device register and remote upgrade according to the request of the main control board. Query the alarm performance of the board and send it to the main control board through the report packet (the packet is the Ethernet packet with the preset VLAN ID), so that there is no CPU between the board and the main control board. The communication is more timely and effective.
步骤S20,主控板为每个与其连接且处于上电状态的无CPU单板分配一个单板代理进程。In step S20, the main control board allocates a single board proxy process for each CPUless board connected to the power-on state.
硬件上,无CPU单板上没有CPU最小系统,也没有FPGA(Field Programmable Gate Array,现场可编程门阵列,),在无CPU单板上无须运行软件程序和FPGA程序,使用CPLD芯片中的CPLD程序与主控板的单板代理进程配合实现接入单板的所有功能。所以主控板为每个与其连接且处于上电状态的无CPU单板启用和分配一个单板代理进程,该单板代理进程能够实相关CPU接入单板的大部分功能,接入单板驱动、读写接入单板寄存器等功能则由单板代理进程和无CPU单板CPLD芯片配合实现。On the hardware, there is no CPU minimum system on the CPU-free board, and there is no FPGA (Field Programmable Gate Array). On the CPUless board, there is no need to run software programs and FPGA programs, and CPLD in the CPLD chip is used. The program works in conjunction with the board agent process on the main control board to implement all functions of the access board. Therefore, the main control board enables and assigns a single-board proxy process to each of the CPU-free boards that are connected to the power-on state. The board agent process can implement the most functions of the CPU and access the board. The functions of the driver, the read/write access board, and other functions are implemented by the single-board proxy process and the CPU-less single-board CPLD chip.
步骤S30,主控板通过单板代理进程向对应的无CPU单板发送控制报文,以控制对应的无CPU单板进行读处理或写处理。 In the step S30, the main control board sends a control packet to the corresponding CPUless board through the board proxy process to control the corresponding CPUless board to perform read processing or write processing.
控制报文包括写操作报文和读操作报文,主控板通过单板代理进程向对应的无CPU单板发送控制报文,以控制对应的无CPU单板进行读处理或写处理,即主控板借用单板代理进程替代了接入单板的CPU,从而通过无CPU单板和主控板之间的报文交互,主控板根据实际需求通过单板代理进程向无CPU单板发送控制报文,以控制对应的无CPU单板进行读处理或写处理,即实现了主控板与无CPU单板之间的通讯。The control packet includes a write operation message and a read operation message. The main control board sends control packets to the corresponding CPUless board through the board proxy process to control the corresponding CPUless board for read processing or write processing. The main control board borrows the board proxy process to replace the CPU of the access board. The main control board passes the board proxy process to the CPUless board according to the actual requirements. The control packet is sent to control the corresponding CPU-free board for read processing or write processing, that is, communication between the main control board and the CPU-free board is implemented.
步骤S40,所述无CPU单板接收所述主控板发送的控制报文,并根据接收的控制报文进行读处理或写处理。Step S40: The CPUless board receives the control message sent by the main control board, and performs read processing or write processing according to the received control message.
可选地,上报报文和控制报文为添加预设虚拟局域网VLAN标识的以太网报文。由于无CPU单板接收的控制报文为单板CPLD芯片处理,无CPU单板收发报文没有CPU灵活,因此其报文格式为特定格式。为了能区分是普通S口报文还是无CPU单板的通讯报文(即控制报文),需要对无CPU单板通讯报文打上特定VLAN。无CPU单板通讯报文采用特定的短报文格式,无法与S口报文格式保持一致。是与S口报文不同的短报文格式。Optionally, the report message and the control message are Ethernet packets that are added with the preset virtual local area network VLAN identifier. The control packet received by the CPU-free board is processed by the board's CPLD chip. The CPU-free board sends and receives packets without CPU flexibility. Therefore, the packet format is a specific format. To distinguish between a normal S-port packet and a communication packet without a CPU card (that is, a control packet), you need to tag a non-CPU card communication packet with a specific VLAN. The packets of the CPU-free board are in the format of a short packet and cannot be consistent with the format of the S-port. It is a short message format different from the S port message.
在本实施例中,通过主控板为每个与其连接且处于上电状态的无CPU单板分配一个单板代理进程,然后主控板根据需求通过单板代理进程向对应的无CPU单板发送控制报文,以控制对应的无CPU单板进行读处理或写处理,从而实现无CPU单板与主控板之间的通讯。In this embodiment, the main control board allocates a single-board proxy process to each CPU-less board that is connected to the power-on state, and then the main control board passes the board proxy process to the corresponding CPUless board according to requirements. The control packet is sent to control the corresponding CPUless board for read processing or write processing, so as to implement communication between the CPUless board and the main control board.
在本发明实施例与无CPU单板通讯的方法第一实施例的基础上,提出与无CPU单板通讯的方法第二实施例,在第二实施例中,控制报文包括写操作报文和读操作报文,步骤S30包括步骤S31-S35:On the basis of the first embodiment of the method for communicating with a CPU-free board, the second embodiment of the method for communicating with a CPU-free board is provided. In the second embodiment, the control packet includes a write operation message. And reading the operation message, step S30 includes steps S31-S35:
步骤S31,当主控板通过单板代理进程对无CPU单板进行写操作时,将包含写操作对应配置值和配置地址的写操作报文发送至无CPU单板。In the step S31, when the main control board writes the CPU-free board through the board proxy process, the write operation packet including the configuration value and the configuration address of the write operation is sent to the CPUless board.
在主控板需要与无CPU单板进行通讯时(即主控板需要对无CPU单板进行读操作或写操作时),判断主控板的单板代理程序对无CPU单板进行操作的操作类型(操作类型包括读操作和写操作),从而确定主控板的单板代理进程向无CPU单板发送控制报文的类型,即所发送的控制报文为写操作报文还是读操作报文。When the main control board needs to communicate with the CPU-free board (that is, when the main control board needs to read or write to the CPU-free board), determine the board agent of the main control board to operate the CPU-free board. The operation type (the operation type includes the read operation and the write operation), so as to determine the type of the control packet sent by the board agent process of the main control board to the CPUless board, that is, whether the sent control message is a write operation message or a read operation. Message.
在主控板通过单板代理进程对无CPU单板进行写操作时,单板代理进 程将包含写操作对应配置值和配置地址的写操作报文(该报文为添加了VLAN标识的以太网报文)发送至无CPU单板。其中,写操作是按照要求将正确的配置值配置到无CPU单板的芯片寄存器中,相对比较简单,只要按照添加了VLAN标识的以太网报文格式(如表1所示)将目的MAC(Media Access Control,介质访问控制层)地址、VLAN(Virtual Local Area Network,虚拟局域网)、单板目标地址、操作码等填写正确,通过在主控板运行的单板代理进程将该添加了VLAN标识的以太网报文发送背板上的以太网端口,然后背板会将该添加了VLAN标识的以太网报文转发至无CPU单板的CPLD芯片,由该CPLD芯片解析报文,并将报文中的配置值配置到无CPU单板上的物理层、光模块等芯片。When the main control board writes to the CPUless board through the board proxy process, the board agent enters The process will send a write operation packet with the corresponding configuration value and configuration address of the write operation (the packet is an Ethernet packet with the VLAN ID added) to the CPUless board. The write operation is to configure the correct configuration value to the chip register of the CPUless board according to the requirement. It is relatively simple, as long as the destination MAC address is as follows (as shown in Table 1). The media access control, the media access control layer, the VLAN, the virtual local area network (VLAN), the destination address of the board, and the operation code are correctly filled in. The VLAN ID is added to the board proxy process running on the main control board. The Ethernet packet is sent to the Ethernet port on the backplane. The backplane then forwards the Ethernet packet with the VLAN ID to the CPLD chip without the CPU. The CPLD chip parses the packet and reports it. The configuration values in the text are configured on the physical layer and optical module of the CPU-free board.
步骤S32,无CPU单板从接收到的写操作报文中解析出配置值和匹配地址,并将该配置值配置到配置地址对应的芯片寄存器中。In step S32, the CPU-free board parses the configuration value and the matching address from the received write operation message, and configures the configuration value into the chip register corresponding to the configuration address.
参照图1,与普通的有CPU单板一样,主控板的单板代理进程也要对PHY(物理层)芯片、时钟芯片、温度传感器、光模块(如SFP(Small Form Pluggable,小型可插拔)光模块)、恢复时钟设置等进行初始化配置。只是所有的初始化操作都要经过适配层,再转换成对应的以太网报文,在以太网报文的净荷中携带该操作的芯片和地址。单板代理进程将这些命令转换成对接入单板不同器件的槽位号、器件号、写地址、写数据、写操作码。单板代理进程将同一次写操作的相关信息发给适配层进行以太网封装适配,将槽位号转换成不同的目的MAC地址,VLAN,器件号、写地址、写数据、操作码都封装到以太网净荷中。最后以太网报文通过主控板的L2交换芯片发送到对应的无CPU单板上,无CPU单板CPLD解析报文并执行相应的器件写处理。Referring to Figure 1, the board proxy process of the main control board is the same as the PHY (physical layer) chip, the clock chip, the temperature sensor, and the optical module (such as SFP (Small Form Pluggable). Pull out the optical module), restore the clock settings, etc. for initial configuration. All the initialization operations are carried out through the adaptation layer, and then converted into corresponding Ethernet packets, carrying the chip and address of the operation in the payload of the Ethernet packet. The board agent process converts these commands into the slot number, device number, write address, write data, and write operation code of different devices connected to the board. The board proxy process sends the information about the same write operation to the adaptation layer for Ethernet encapsulation adaptation, and translates the slot number into a different destination MAC address, VLAN, device number, write address, write data, and operation code. Encapsulated into an Ethernet payload. The Ethernet packet is sent to the corresponding CPU-free board through the L2 switch chip of the main control board. The CPLD without the CPU board parses the packet and performs the corresponding device write processing.
单板代理程序,接收主控板内部S口发过来的内部S口命令,可以设置PHY的端口模式、1588的模式、恢复时钟等等。单板代理程序将命令转换成对应单板的内部以太网包,发送给对应单板,处理与初始化过程的一样。The board agent receives the internal S port command sent from the internal S port of the main control board, and can set the port mode of the PHY, the mode of 1588, the recovery clock, and so on. The board agent converts the command into an internal Ethernet packet of the corresponding board and sends it to the corresponding board. The processing is the same as the initialization process.
步骤S33,当主控板通过单板代理进程对无CPU单板进行读操作时,将包含读操作对应的芯片寄存器地址的读操作报文发送至无CPU单板。In the step S33, when the main control board performs a read operation on the CPUless board through the board proxy process, the read operation message including the chip register address corresponding to the read operation is sent to the CPUless board.
在主控板的单板代理进程对无CPU单板进行读操作时,即主控板的单板代理进程需要查询无CPU单板的芯片寄存器的值,将包含读操作对应的 芯片寄存器地址的读操作报文发送至无CPU单板,包括两个步骤,第一步:主控板上的单板代理进程发送读操作报文至无CPU单板以查询无CPU单板芯片寄存器和其地址;第二步:无CPU单板的CPLD芯片构建查询的结果报文回送给主控板的单板代理进程。对于第二步,主控板的单板代理进程需要启用一个线程去接收无CPU单板发送过来的结果报文,并且第一步的发送读操作报文操作与第二步的接收结果报文操作是分别在两个线程里进行的。When the board agent process of the main control board reads a CPU-free board, the board agent process of the main control board needs to query the value of the chip register of the CPU-free board, which will contain the corresponding read operation. The read operation of the chip register address is sent to the CPU-free board. The first step is as follows: The board agent process on the main control board sends a read operation message to the CPU-free board to query the CPU-free board. The register and its address; the second step: the result of the CPLD chip construction query without the CPU board is sent back to the board agent process of the main control board. For the second step, the board proxy process of the main control board needs to enable a thread to receive the result packet sent by the CPUless board, and the first step of sending the read operation message and the second step receiving the result message. The operations are performed in two threads.
步骤S34,无CPU单板从接收到的读操作报文中解析出芯片寄存器地址,并将芯片寄存器地址对应的目的信息封装成结果报文发送至主控板;Step S34, the CPU-free board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message and sends the result message to the main control board;
无CPU单板从接收到的读操作报文中解析出芯片寄存器地址,获取无CPU单板芯片寄存器地址对应处的目的信息,将获取的目的信息封装成添加了VLAN标识的以太网报文格式的结果报文,并将该结果报文及时发送至主控板。The CPU-free board parses the chip register address from the received read operation message, obtains the destination information corresponding to the address of the CPU-free board chip register address, and encapsulates the obtained destination information into an Ethernet packet format with the VLAN identifier added. The result message is sent to the main control board in time.
步骤S35,主控板的单板代理进程接收无CPU单板发送的结果报文,其中,结果报文为添加预设虚拟局域网VLAN标识的以太网报文。In the step S35, the board proxy process of the main control board receives the result packet sent by the CPUless board, and the result packet is an Ethernet packet that adds the preset virtual local area network VLAN identifier.
主控板的单板代理进程在接收到无CPU单板回发的结果报文时,以供后续分类、解析或其它处理,从而完成主控板对无CPU单板的读操作。When the board agent process of the main control board receives the result packet of the CPU-free board, it is used for subsequent classification, parsing, or other processing, so that the main control board reads the CPU-free board.
在本实施例中,通过在主控板需要与无CPU单板进行通讯时,通过单板代理进程向对应的无CPU单板发送控制报文,以控制对应的无CPU单板进行读处理或写处理;当主控板的单板代理进程对无CPU单板进行写操作时,将写操作报文发送至无CPU单板,以供无CPU单板解析写操作报文并将配置值配置到配置地址对应的芯片寄存器中;当主控板的单板代理进程对无CPU单板进行读操作时,将读操作报文发送至无CPU单板,以供无CPU单板根据解析后的读操作报文回发结果报文,从而通过主控板与无CPU单板之间的报文交互,主控板根据实际需求向无CPU单板发送读操作报文或写操作报文,无CPU单板仅解析和封装报文,不对报文进行逻辑分析和处理,从而实现了主控板对无CPU单板的读操作和写操作,即实现了主控板与无CPU单板的通讯。In this embodiment, when the main control board needs to communicate with the CPU-free board, the control packet is sent to the corresponding CPUless board through the board proxy process, so as to control the corresponding CPUless board to perform read processing or Write processing; when the board agent process of the main control board writes to the CPUless board, the write operation message is sent to the CPUless board, so that the CPUless board parses the write operation message and configures the configuration value. To the chip register corresponding to the configuration address; when the board agent process of the main control board reads the CPU-free board, the read operation message is sent to the CPU-free board for the CPU-free board to be analyzed. After the operation message is sent back to the result packet, the main control board sends a read operation message or a write operation message to the CPU-free board. The CPU board only parses and encapsulates the packets, and does not perform logic analysis and processing on the packets. This implements the read and write operations of the main control board to the CPU-free board, that is, the communication between the main control board and the CPU-free board is realized. .
基于本发明实施例无中央处理器单板通讯的方法的第二实施例,提出与 无中央处理器单板通讯的方法的第三实施例,在第三实施例中,步骤S34包括步骤S341-S342:A second embodiment of a method for communication without a central processing unit based on the embodiment of the present invention is proposed A third embodiment of the method without central processing unit board communication, in the third embodiment, step S34 includes steps S341-S342:
步骤S341,如果当前没有接收到其它读操作报文且无正在封装的结果报文,则无CPU单板接收主控板发送的读操作报文。In step S341, if no other read operation message is received and no result message is being encapsulated, the CPUless board receives the read operation message sent by the main control board.
步骤S342,无CPU单板从接收到的读操作报文中解析出芯片寄存器地址,并将芯片寄存器地址对应的目的信息封装成结果报文发送至主控板。In step S342, the CPUless board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message and sends the result message to the main control board.
参照图3,主控板启用一个单板代理进程对应与一个无CPU单板进行通讯,并且单板代理进程启用一个线程负责向无CPU单板发送读操作报文、一个线程负责接收无CPU单板的CPLD芯片发送的结果报文,当无CPU单板的CPLD芯片同时接收到多个线程发送过来的读操作报文时,检测当前时刻该无CPU单板是否已经接收了读操作报文且还在对该读操作报文进行处理(即正在封装接收的读操作报文对应的结果报文),如果当前时刻该无CPU单板有正在封装的结果报文,则不接收主控板发送的读操作报文;如果当前时刻该无CPU单板没有正在封装的结果报文,则继续判断当前时刻该无CPU单板是否同时接收到多个线程发送的读操作报文,如果有多个线程发送读操作报文,则根据预设规则(例如按照读操作报文的达到时间、报文长度等决定读操作报文的优先级)选出并解析一个读操作报文。然后根据解析出的芯片寄存器地址查找到对应的目的信息,并将目的信息封装呈结果报文发送至主控板(发送解析的读操作报文的主控板)。Referring to FIG. 3, the main control board enables a single board proxy process to communicate with a CPUless board, and the board proxy process enables one thread to send read operation messages to the CPUless board, and one thread is responsible for receiving no CPU orders. The result packet sent by the CPLD chip of the board, when the CPLD chip of the CPU-free board receives the read operation message sent by the multiple threads at the same time, it detects whether the CPU-free board has received the read operation message at the current time and The read operation packet is also processed (that is, the result packet corresponding to the received read operation message is being encapsulated). If the CPU-free board has the result packet being encapsulated at the current time, the main control board is not sent. If the CPU-free board does not have a result packet being encapsulated at the current time, it continues to determine whether the CPU-free board receives the read operation message sent by multiple threads at the same time, if there are multiple When the thread sends a read operation message, it selects and parses a read operation report according to a preset rule (for example, determining the priority of the read operation message according to the arrival time of the read operation message, the length of the message, etc.). Text. Then, the corresponding destination information is found according to the parsed chip register address, and the destination information is encapsulated into a result message and sent to the main control board (the main control board that sends the parsed read operation message).
在本实施例中,在多个主控板线程同时向无CPU单板发送读操作报文时,每次只允许接收并处理一个线程发送的读操作报文,即无CPU单板对读操作报文的接收采用互斥原则,避免一次接收并处理多个读操作报文,从而避免了因多个读操作报文处解析和处理耗费时间和处理流程不相同,而造成读操作报文对应结果报文输出混乱的问题,从而较好地保证了主控板接收结果报文的准确性。In this embodiment, when a plurality of main control board threads simultaneously send a read operation message to a CPUless board, only one read operation message sent by one thread is allowed to be received and processed at a time, that is, no CPU board read operation. The receiving of packets is based on the principle of mutual exclusion. It avoids receiving and processing multiple read operation messages at a time. This avoids the time and processing flow of parsing and processing of multiple read operations. As a result, the message output is confusing, which ensures the accuracy of the message received by the main control board.
基于本发明实施例无中央处理器单板通讯的方法的第二实施例,提出与无中央处理器单板通讯的方法的第四实施例,在第四实施例中,步骤S35包括步骤S351-S352:A fourth embodiment of a method for communicating with a central processing unit without a central processing unit is proposed. In the fourth embodiment, step S35 includes step S351- S352:
步骤S351,主控板的单板代理进程判断无CPU单板发送的结果报文是 否就绪。In step S351, the board proxy process of the main control board determines that the result packet sent by the CPUless board is No ready.
步骤S352,当无CPU单板发送的结果报文就绪时,主控板的单板代理进程接收无CPU单板发送的结果报文。In step S352, when the result packet sent by the CPUless board is ready, the board proxy process of the main control board receives the result packet sent by the CPUless board.
由于主控板的单板代理进程向无CPU单板发送读操作报文后,该无CPU单板的CPLD回复结果报文给主控板的单板代理进程需要一定时间,如果主控板在接收到回复的结果报文之前就去获取缓存中结果报文的值就不是所需的,所以这里需要一个延时保护处理。通过主控板的单板代理进程先判断无CPU单板发送的结果报文是否就绪,即通过单板代理进程的专门用于接收结果报文的线程在接收到读操作报文对应的结果报文时,对该结果报文打上就绪标记(该标记用于表示结果报文准备就绪),当主控板的单板代理进程中用于发送读操作报文的线程检测到结果报文上的就绪标记时,即当无CPU单板发送的结果报文就绪时,主控板的单板代理进程接收无CPU单板发送的结果报文;如果当前时刻主控板的单板代理进程中用于发送读操作报文的线程未检测到结果报文上的就绪标记,则等待预设等待时长(例如5ms),继续检测到结果报文上的就绪标记,如此循环,直至主控板的单板代理进程中用于发送读操作报文的线程未检测到结果报文上的就绪标记或者经过预设次数(例如20次)的循环检测后提示通讯异常。After the board agent process of the main control board sends a read operation message to the CPU-free board, the CPLD reply result of the CPU-free board sends a packet to the board agent process of the main control board. If the main control board is in the process, the main control board is in the process. It is not necessary to obtain the result of the result message in the buffer before receiving the result message of the reply, so a delay protection process is needed here. The board agent process of the main control board determines whether the result packet sent by the CPU-free board is ready. That is, the thread that is used by the board proxy process to receive the result packet receives the result report corresponding to the read operation message. In the text, the result packet is marked with a ready flag (the flag is used to indicate that the result message is ready), and the thread used to send the read operation message in the board proxy process of the main control board detects the result message. When the ready-to-mark flag is used, the board agent process of the main control board receives the result packet sent by the CPU-free board when the result packet sent by the CPU-free board is ready. After the thread that sends the read operation message does not detect the ready flag on the result message, it waits for the preset waiting time (for example, 5ms), continues to detect the ready flag on the result message, and so on, until the single control board The thread used to send the read operation message in the board proxy process does not detect the ready flag on the result message or prompts the communication abnormality after a preset number of times (for example, 20 times).
在本实施例中,通过主控板的单板代理进程判断无CPU单板发送的结果报文是否就绪,当无CPU单板发送的结果报文就绪时,主控板的单板代理进程接收无CPU单板发送的结果报文,防止主控板未接收到结果报文或接收不正确的结果报文就继续执行后续步骤,提高了主控板与无CPU单板通讯的准确性。In this embodiment, the board agent process of the main control board determines whether the result packet sent by the CPU-free board is ready. When the result packet sent by the CPU-free board is ready, the board agent process of the main control board receives. The result packet sent by the CPU-free board prevents the main control board from receiving the result packet or receiving the incorrect result packet to continue the subsequent steps. This improves the accuracy of communication between the main control board and the CPU-free board.
基于本发明实施例无中央处理器单板通讯的方法的第二实施例,提出与无中央处理器单板通讯的方法的第五实施例,在第五实施例中,步骤S35之后还包括步骤S36:A fifth embodiment of the method for communicating with a central processing unit without a central processing unit is provided. In the fifth embodiment, the step S35 further includes a step. S36:
步骤S36,主控板的单板代理进程根据接收的结果报文中的类型字段,确定该结果报文的结果类型。In step S36, the board proxy process of the main control board determines the result type of the result packet according to the type field in the received result packet.
例如,由于查询PHY寄存器与查询CPLD寄存器的字节数不同,接收结果报文后的处理也不同,这时就需要对结果报文进行分类处理,通过在读 操作报文中添加类型字段,无CPU单板解析读操作报文后继续保持其中的类型字段,并将该类型字段一起封装至结果报文(即结果报文中也包含对应读操作报文的类型字段)中,主控板的单板代理进程根据接收到的结果报文中的类型字段,确定结果报文的结果类型,然后对不同结构类型的结果报文进行批量、集中处理。其中,类型字段可以为以太网报文里的IVH字段,这个字段在发送读操作报文时填入,无CPU单板的CPLD芯片回复结果报文里会自动带上填入的IVH字段值,这样就可以区分不同的结果类型。For example, since the query PHY register is different from the number of bytes in the query CPLD register, the processing after receiving the result message is different. In this case, the result message needs to be classified and processed. The type field is added to the operation packet. After the CPU does not parse the read operation packet, the CPU continues to maintain the type field and encapsulates the type field into the result packet (that is, the result packet also contains the corresponding read operation message. In the type field, the board agent process of the main control board determines the result type of the result packet according to the type field in the received result packet, and then performs batch and centralized processing on the result packets of different structure types. The type field can be an IVH field in the Ethernet packet. This field is filled in when the read operation message is sent. The CPH chip response result message of the CPU-free board is automatically loaded with the filled IVH field value. This allows you to distinguish between different result types.
在本实施例中,通过在读操作报文中添加类型字段,从而在对应结果报文中也添加类型字段,主控板的单板代理进程可以根据就结果报文的类型字段对该结果报文进行分类,然后对同一类的结果报文进行批量集中处理,提高了结果报文的处理速度,使主控板与无CPU单板之间的通讯更加高效。In this embodiment, by adding a type field to the read operation message, a type field is also added to the corresponding result packet, and the board proxy process of the main control board can send the result message according to the type field of the result packet. After the classification, the result packets of the same type are processed in batches, which improves the processing speed of the resulting packets and makes the communication between the main control board and the CPUless board more efficient.
本发明实施例还提供一种通讯设备,在本发明实施例通讯设备的第一实施例中,参照图4,通讯设备包括无CPU单板10(通讯设备可以包括多个无CPU单板,本实施例以一个无CPU单板为例)和主控板20。The embodiment of the present invention further provides a communication device. In the first embodiment of the communication device according to the embodiment of the present invention, referring to FIG. 4, the communication device includes a CPU-free board 10 (the communication device may include multiple CPUless boards, The embodiment takes a CPUless board as an example) and the main control board 20.
所述无CPU单板10包括:报文上报模块11和报文通讯模块12;所述主控板20包括:进程分配模块21和单板代理进程模块22。The CPU-less board 10 includes a message reporting module 11 and a message communication module 12; the main control board 20 includes a process allocation module 21 and a board agent process module 22.
进程分配模块21,设置为每个与其连接且处于上电状态的无CPU单板分配一个单板代理进程;The process allocation module 21 is configured to allocate a single board proxy process to each CPUless board connected to the power-on state;
硬件上,无CPU单板上没有CPU最小系统,也没有FPGA(Field Programmable Gate Array,现场可编程门阵列,),在无CPU单板上无须运行软件程序和FPGA程序,使用CPLD芯片中的CPLD程序与主控板的单板代理进程配合实现接入单板的所有功能。所以主控板的进程分配模块21为每个与其连接且处于上电状态的无CPU单板启用和分配一个单板代理进程,该单板代理进程能够实相关CPU接入单板的大部分功能,接入单板驱动、读写接入单板寄存器等功能则由单板代理进程和无CPU单板CPLD芯片配合实现。On the hardware, there is no CPU minimum system on the CPU-free board, and there is no FPGA (Field Programmable Gate Array). On the CPUless board, there is no need to run software programs and FPGA programs, and CPLD in the CPLD chip is used. The program works in conjunction with the board agent process on the main control board to implement all functions of the access board. Therefore, the process allocation module 21 of the main control board enables and allocates a single-board proxy process for each CPU-less board that is connected to the power-on state. The board proxy process can implement most functions of the CPU. The functions of accessing the board and reading and writing accessing the board registers are implemented by the board proxy process and the CPU-less board CPLD chip.
单板代理进程模块22,设置为向单板代理进程对应的无CPU单板发送控制报文,以控制对应的无CPU单板进行读处理或写处理;The board agent process module 22 is configured to send a control packet to the CPUless board corresponding to the board proxy process to control the corresponding CPUless board to perform read processing or write processing.
控制报文包括写操作报文和读操作报文,主控板通过单板代理进程模块 22控制单板代理进程向对应的无CPU单板发送控制报文,以控制对应的无CPU单板进行读处理或写处理,即主控板借用单板代理进程替代了接入单板的CPU,从而通过无CPU单板和主控板之间的报文交互,主控板根据实际需求通过单板代理进程向无CPU单板发送控制报文,以控制对应的无CPU单板进行读处理或写处理,即实现了主控板与无CPU单板之间的通讯。The control packet includes a write operation message and a read operation message, and the main control board passes the single board proxy process module. The control board sends a control packet to the corresponding CPU-free board to control the corresponding CPU-free board for read or write processing. That is, the main control board borrows the board proxy process instead of the CPU of the access board. The control board sends a control packet to the CPU-free board through the board proxy process to control the corresponding CPU-free board for read processing. Or write processing, that is, communication between the main control board and the CPUless board is realized.
报文上报模块11,设置为当无CPU单板上电后,将包含该无CPU单板的单板信息的上报报文发送至主控板;The packet reporting module 11 is configured to send the report message of the board information of the CPUless board to the main control board after the board is powered off by the CPU;
单板信息包括单板类型、单板位置、单板工作状态等数据,当无CPU单板上电后,该无CPU单板的报文上报模块11通过CPLD芯片主动向主控板上报包含该无CPU单板信息的上报报文,以使主控板能够及时更新与其连接的无CPU单板状态,从而无CPU单板的CPLD芯片根据主控板的请求,配置芯片器件寄存器和远程升级、根据主控板的请求,查询本板的各种告警性能,并通过上报报文(该上报报文为添加了预设VLAN标识的以太网报文)发送至主控板,使无CPU单板和主控板之间的通讯更为及时、有效。The board information includes the board type, the board position, and the working status of the board. After the board is not powered by the CPU, the packet reporting module 11 of the CPUless board actively reports to the main control board through the CPLD chip. The status of the CPU-free board is updated, so that the main control board can update the status of the CPU-free board connected to it, so that the CPLD chip without the CPU board configures the chip device register and remote upgrade according to the request of the main control board. According to the request of the main control board, query the alarm performance of the board, and send the report packet to the main control board to send the CPU packet without the CPU. Communication with the main control board is more timely and effective.
报文通讯模块12,设置为接收主控板发送的控制报文,并根据接收的控制报文进行读处理或写处理。The message communication module 12 is configured to receive the control message sent by the main control board, and perform read processing or write processing according to the received control message.
可选地,上报报文和控制报文为添加预设虚拟局域网VLAN标识的以太网报文。由于无CPU单板接收的控制报文为单板CPLD芯片处理,无CPU单板收发报文没有CPU灵活,因此其报文格式为特定格式。为了能区分是普通S口报文还是无CPU单板的通讯报文(即控制报文),需要对无CPU单板通讯报文打上特定VLAN。无CPU单板通讯报文采用特定的短报文格式,无法与S口报文格式保持一致。是与S口报文不同的短报文格式。Optionally, the report message and the control message are Ethernet packets that are added with the preset virtual local area network VLAN identifier. The control packet received by the CPU-free board is processed by the board's CPLD chip. The CPU-free board sends and receives packets without CPU flexibility. Therefore, the packet format is a specific format. To distinguish between a normal S-port packet and a communication packet without a CPU card (that is, a control packet), you need to tag a non-CPU card communication packet with a specific VLAN. The packets of the CPU-free board are in the format of a short packet and cannot be consistent with the format of the S-port. It is a short message format different from the S port message.
在本实施例中,通过主控板20的进程分配模块21为每个与其连接且处于上电状态的无CPU单板10分配一个单板代理进程,然后主控板20的单板代理进程模块22根据需求通过单板代理进程向对应的无CPU单板发送控制报文,以控制对应的无CPU单板10进行读处理或写处理,从而实现无CPU单板10与主控板20之间的通讯。In this embodiment, the process allocation module 21 of the main control board 20 allocates a single board proxy process to each CPUless board 10 connected to the power-on state, and then the board agent process module of the main control board 20 The control packet is sent to the corresponding CPUless board through the board proxy process to control the corresponding CPUless board 10 to perform read processing or write processing, thereby implementing the between the CPUless board 10 and the main control board 20. Communication.
在本发明实施例通讯设备第一实施例的基础上,提出通讯设备第二实施例,在第二实施例中,控制报文包括写操作报文和读操作报文。 On the basis of the first embodiment of the communication device of the embodiment of the present invention, a second embodiment of the communication device is proposed. In the second embodiment, the control message includes a write operation message and a read operation message.
单板代理进程模块22包括第一写单元221、第一读单元222和结果处理单元223。报文通讯模块12包括第二写单元121和第二读单元122。第一写单元221,设置为当通过单板代理进程对无CPU单板进行写操作时,将包含写操作对应配置值和配置地址的写操作报文发送至无CPU单板的第二写单元。The board proxy process module 22 includes a first write unit 221, a first read unit 222, and a result processing unit 223. The message communication module 12 includes a second write unit 121 and a second read unit 122. The first write unit 221 is configured to send a write operation message including a corresponding configuration value and a configuration address of the write operation to the second write unit of the CPUless board when the CPU is not written by the board proxy process. .
在主控板需要与无CPU单板进行通讯时(即主控板需要对无CPU单板进行读操作或写操作时),判断主控板的单板代理程序对无CPU单板进行操作的操作类型(操作类型包括读操作和写操作),从而确定主控板的单板代理进程向无CPU单板发送控制报文的类型,即所发送的控制报文为写操作报文还是读操作报文。When the main control board needs to communicate with the CPU-free board (that is, when the main control board needs to read or write to the CPU-free board), determine the board agent of the main control board to operate the CPU-free board. The operation type (the operation type includes the read operation and the write operation), so as to determine the type of the control packet sent by the board agent process of the main control board to the CPUless board, that is, whether the sent control message is a write operation message or a read operation. Message.
在主控板通过单板代理进程对无CPU单板进行写操作时,第一写单元221控制单板代理进程将包含写操作对应配置值和配置地址的写操作报文(该报文为添加了VLAN标识的以太网报文)发送至无CPU单板。其中,写操作是按照要求将正确的配置值配置到无CPU单板的芯片寄存器中,相对比较简单,只要按照添加了VLAN标识的以太网报文格式(如表1所示)将目的MAC(Media Access Control,介质访问控制层)地址、VLAN(Virtual Local Area Network,虚拟局域网)、单板目标地址、操作码等填写正确,通过在主控板运行的单板代理进程将该添加了VLAN标识的以太网报文发送背板上的以太网端口,然后背板会将该添加了VLAN标识的以太网报文转发至无CPU单板的CPLD芯片,由该CPLD芯片解析报文,并将报文中的配置值配置到无CPU单板上的物理层、光模块等芯片。When the main control board writes to the CPUless board through the board proxy process, the first write unit 221 controls the board proxy process to include a write operation packet corresponding to the configuration value and the configuration address of the write operation (the message is added). The Ethernet packets of the VLAN ID are sent to the CPU-free board. The write operation is to configure the correct configuration value to the chip register of the CPUless board according to the requirement. It is relatively simple, as long as the destination MAC address is as follows (as shown in Table 1). The media access control, the media access control layer, the VLAN, the virtual local area network (VLAN), the destination address of the board, and the operation code are correctly filled in. The VLAN ID is added to the board proxy process running on the main control board. The Ethernet packet is sent to the Ethernet port on the backplane. The backplane then forwards the Ethernet packet with the VLAN ID to the CPLD chip without the CPU. The CPLD chip parses the packet and reports it. The configuration values in the text are configured on the physical layer and optical module of the CPU-free board.
第一读单元222,设置为当通过单板代理进程对无CPU单板进行读操作时,将包含读操作对应的芯片寄存器地址的读操作报文发送至无CPU单板的报文通讯模块。The first reading unit 222 is configured to send a read operation message including a chip register address corresponding to the read operation to the message communication module of the CPUless board when the CPU is not read by the board proxy process.
在主控板的单板代理进程对无CPU单板进行读操作时,即主控板的单板代理进程需要查询无CPU单板的芯片寄存器的值,第一读单元222将包含读操作对应的芯片寄存器地址的读操作报文发送至无CPU单板,包括两个步骤,第一步:主控板上的第一读单元222控制单板代理进程发送读操作报文至无CPU单板以查询无CPU单板芯片寄存器和其地址;第二步:无CPU单板的CPLD芯片构建查询的结果报文回送给主控板的单板代理进程。 对于第二步,主控板的单板代理进程需要启用一个线程去接收无CPU单板发送过来的结果报文,并且第一步的发送读操作报文操作与第二步的接收结果报文操作是分别在两个线程里进行的。When the board agent process of the main control board performs a read operation on the CPUless board, that is, the board proxy process of the main control board needs to query the value of the chip register of the CPUless board, and the first read unit 222 will include the read operation. The read operation message of the chip register address is sent to the CPUless board. The first step is as follows: The first read unit 222 on the main control board controls the board proxy process to send read operation messages to the CPUless board. To query the CPU-free board chip register and its address; the second step: the result packet of the CPLD chip without the CPU board is sent back to the board agent process of the main control board. For the second step, the board proxy process of the main control board needs to enable a thread to receive the result packet sent by the CPUless board, and the first step of sending the read operation message and the second step receiving the result message. The operations are performed in two threads.
结果处理单元223,设置为接收无CPU单板的第二读单元发送的结果报文,其中,结果报文为添加预设虚拟局域网VLAN标识的以太网报文。The result processing unit 223 is configured to receive the result message sent by the second read unit of the CPUless board, wherein the result message is an Ethernet message added with the preset virtual local area network VLAN identifier.
主控板的结果处理单元223控制单板代理进程在接收到无CPU单板回发的结果报文时,以供后续分类、解析或其它处理,从而完成主控板对无CPU单板的读操作。The result processing unit 223 of the main control board controls the board agent process to receive the result packet of the CPU-free board back-up for subsequent classification, analysis, or other processing, thereby completing the reading of the CPU board by the main control board. operating.
第二写单元121,设置为从接收到的写操作报文中解析出配置值和匹配地址,并将该配置值配置到配置地址对应的芯片寄存器中。The second writing unit 121 is configured to parse the configuration value and the matching address from the received write operation message, and configure the configuration value into the chip register corresponding to the configuration address.
参照图1,与普通的有CPU单板一样,主控板的单板代理进程也要对PHY(物理层)芯片、时钟芯片、温度传感器、光模块(如SFP(Small Form Pluggable,小型可插拔)光模块)、恢复时钟设置等进行初始化配置。只是所有的初始化操作都要经过适配层,再转换成对应的以太网报文,在以太网报文的净荷中携带该操作的芯片和地址。第二写单元121控制单板代理进程将这些命令转换成对接入单板不同器件的槽位号、器件号、写地址、写数据、写操作码。第二写单元121控制单板代理进程将同一次写操作的相关信息发给适配层进行以太网封装适配,将槽位号转换成不同的目的MAC地址,VLAN,器件号、写地址、写数据、操作码都封装到以太网净荷中。最后以太网报文通过主控板的L2交换芯片发送到对应的无CPU单板上,无CPU单板CPLD解析报文并执行相应的器件写处理。Referring to Figure 1, the board proxy process of the main control board is the same as the PHY (physical layer) chip, the clock chip, the temperature sensor, and the optical module (such as SFP (Small Form Pluggable). Pull out the optical module), restore the clock settings, etc. for initial configuration. All the initialization operations are carried out through the adaptation layer, and then converted into corresponding Ethernet packets, carrying the chip and address of the operation in the payload of the Ethernet packet. The second writing unit 121 controls the board proxy process to convert the commands into slot numbers, device numbers, write addresses, write data, and write operation codes for different devices connected to the board. The second writing unit 121 controls the board proxy process to send the information about the same write operation to the adaptation layer for Ethernet encapsulation adaptation, and converts the slot number into a different destination MAC address, VLAN, device number, write address, Write data and opcodes are encapsulated into an Ethernet payload. The Ethernet packet is sent to the corresponding CPU-free board through the L2 switch chip of the main control board. The CPLD without the CPU board parses the packet and performs the corresponding device write processing.
单板代理程序,接收主控板内部S口发过来的内部S口命令,可以设置PHY的端口模式、1588的模式、恢复时钟等等。单板代理程序将命令转换成对应单板的内部以太网包,发送给对应单板,处理与初始化过程的一样。The board agent receives the internal S port command sent from the internal S port of the main control board, and can set the port mode of the PHY, the mode of 1588, the recovery clock, and so on. The board agent converts the command into an internal Ethernet packet of the corresponding board and sends it to the corresponding board. The processing is the same as the initialization process.
第二读单元122,设置为从接收到的读操作报文中解析出芯片寄存器地址,并将芯片寄存器地址对应的目的信息封装成结果报文发送至主控板。The second reading unit 122 is configured to parse the chip register address from the received read operation message, and encapsulate the destination information corresponding to the chip register address into a result message and send the result message to the main control board.
无CPU单板的第二读单元122从接收到的读操作报文中解析出芯片寄存器地址,获取无CPU单板芯片寄存器地址对应处的目的信息,将获取的目的信息封装成添加了VLAN标识的以太网报文格式的结果报文,并将该结果报文及时发送至主控板。 The second read unit 122 of the CPUless board parses the chip register address from the received read operation message, obtains the destination information corresponding to the address of the CPU chipless chip register address, and encapsulates the obtained destination information into the added VLAN identifier. The result packet of the Ethernet packet format is sent to the main control board in time.
在本实施例中,通过在主控板需要与无CPU单板进行通讯时,通过单板代理进程模块22向对应的无CPU单板发送控制报文,以控制对应的无CPU单板进行读处理或写处理;当主控板的单板代理进程对无CPU单板进行写操作时,第一写单元221将写操作报文发送至无CPU单板,以供无CPU单板的第二写单元121解析写操作报文并将配置值配置到配置地址对应的芯片寄存器中;当主控板的单板代理进程对无CPU单板进行读操作时,第一读单元222将读操作报文发送至无CPU单板,以供无CPU单板的第二读单元122根据解析后的读操作报文回发结果报文,从而通过主控板与无CPU单板之间的报文交互,主控板根据实际需求向无CPU单板发送读操作报文或写操作报文,无CPU单板仅解析和封装报文,不对报文进行逻辑分析和处理,从而实现了主控板对无CPU单板的读操作和写操作,即实现了主控板与无CPU单板的通讯。In this embodiment, when the main control board needs to communicate with the CPUless board, the board agent process module 22 sends a control packet to the corresponding CPUless board to control the corresponding CPUless board to read. Processing or write processing; when the board proxy process of the main control board performs a write operation on the CPUless board, the first write unit 221 sends the write operation message to the CPUless board for the second of the CPUless board. The write unit 121 parses the write operation message and configures the configuration value into the chip register corresponding to the configuration address. When the board proxy process of the main control board performs a read operation on the CPUless board, the first read unit 222 reports the read operation. The message is sent to the CPU-free board, so that the second read unit 122 of the CPU-free board sends back the result packet according to the parsed read operation message, so that the message exchanges between the main control board and the CPU-free board is performed. The main control board sends a read operation message or a write operation message to the CPU-free board according to the actual requirements. The CPU-free board only parses and encapsulates the packet, and does not perform logic analysis and processing on the packet, thus implementing the main control board pair. The read operation and write operation of the CPU-free board realize the main No communication board and CPU board.
基于本发明实施例通讯设备的第二实施例,提出通讯设备的第三实施例,在第三实施例中,第二读单元122从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述结果处理单元包括:According to a second embodiment of the communication device of the embodiment of the present invention, a third embodiment of the communication device is proposed. In the third embodiment, the second reading unit 122 parses the chip register address from the received read operation message. Encapsulating the destination information corresponding to the chip register address into a result message sent to the result processing unit includes:
如果当前没有接收到其它读操作报文且无正在封装的结果报文,则接收主控板发送的读操作报文。If no other read operation message is received and no result message is being encapsulated, the read operation message sent by the main control board is received.
从接收到的读操作报文中解析出芯片寄存器地址,并将芯片寄存器地址对应的目的信息封装成结果报文发送至结果处理单元。The chip register address is parsed from the received read operation message, and the destination information corresponding to the chip register address is encapsulated into a result message and sent to the result processing unit.
参照图3,主控板启用一个单板代理进程对应与一个无CPU单板进行通讯,并且单板代理进程启用一个线程负责向无CPU单板发送读操作报文、一个线程负责接收无CPU单板的CPLD芯片发送的结果报文,当无CPU单板的CPLD芯片同时接收到多个线程发送过来的读操作报文时,检测当前时刻该无CPU单板是否已经接收了读操作报文且还在对该读操作报文进行处理(即正在封装接收的读操作报文对应的结果报文),如果当前时刻该无CPU单板有正在封装的结果报文,则第二读单元122不接收主控板发送的读操作报文;如果当前时刻该无CPU单板没有正在封装的结果报文,则第二读单元122继续判断当前时刻该无CPU单板是否同时接收到多个线程发 送的读操作报文,如果有多个线程发送读操作报文,则第二读单元122根据预设规则(例如按照读操作报文的达到时间、报文长度等决定读操作报文的优先级)选出并解析一个读操作报文。然后第二读单元122根据解析出的芯片寄存器地址查找到对应的目的信息,并将目的信息封装呈结果报文发送至主控板(发送解析的读操作报文的主控板)。Referring to FIG. 3, the main control board enables a single board proxy process to communicate with a CPUless board, and the board proxy process enables one thread to send read operation messages to the CPUless board, and one thread is responsible for receiving no CPU orders. The result packet sent by the CPLD chip of the board, when the CPLD chip of the CPU-free board receives the read operation message sent by the multiple threads at the same time, it detects whether the CPU-free board has received the read operation message at the current time and The read operation message is also processed (that is, the result message corresponding to the received read operation message is being encapsulated). If the CPU-free board has the result message being encapsulated at the current time, the second read unit 122 does not. Receiving the read operation message sent by the main control board; if the CPU-free board does not have the result packet being encapsulated at the current time, the second reading unit 122 continues to determine whether the CPU-free board receives multiple threads at the current time. The read operation message sent, if there are multiple threads to send the read operation message, the second reading unit 122 determines the priority of the read operation message according to the preset rule (for example, according to the arrival time of the read operation message, the length of the message, etc.) Level) Select and parse a read operation message. Then, the second reading unit 122 searches for the corresponding destination information according to the parsed chip register address, and sends the destination information packaged result message to the main control board (the main control board that sends the parsed read operation message).
在本实施例中,在多个主控板线程同时向无CPU单板发送读操作报文时,每次只允许接收并处理一个线程发送的读操作报文,即无CPU单板对读操作报文的接收采用互斥原则,避免一次接收并处理多个读操作报文,从而避免了因多个读操作报文处解析和处理耗费时间和处理流程不相同,而造成读操作报文对应结果报文输出混乱的问题,从而较好地保证了主控板接收结果报文的准确性。In this embodiment, when a plurality of main control board threads simultaneously send a read operation message to a CPUless board, only one read operation message sent by one thread is allowed to be received and processed at a time, that is, no CPU board read operation. The receiving of packets is based on the principle of mutual exclusion. It avoids receiving and processing multiple read operation messages at a time. This avoids the time and processing flow of parsing and processing of multiple read operations. As a result, the message output is confusing, which ensures the accuracy of the message received by the main control board.
基于本发明实施例通讯设备的第二实施例,提出通讯设备的第四实施例,在第四实施例中,结果处理单元223还接收所述第二读单元发送的结果报文包括:A fourth embodiment of the communication device according to the embodiment of the present invention provides a fourth embodiment of the communication device. In the fourth embodiment, the result processing unit 223 further receives the result message sent by the second read unit, including:
判断无CPU单板发送的结果报文是否就绪。Determines whether the result packet sent by the CPUless board is ready.
当无CPU单板发送的结果报文就绪时,接收无CPU单板发送的结果报文。When the result packet sent by the CPU-free board is ready, the result packet sent by the CPU-free board is received.
由于主控板的单板代理进程向无CPU单板发送读操作报文后,该无CPU单板的CPLD回复结果报文给主控板的单板代理进程需要一定时间,如果主控板在接收到回复的结果报文之前就去获取缓存中结果报文的值就不是所需的,所以这里需要一个延时保护处理。通过主控板的结果处理单元223先判断无CPU单板发送的结果报文是否就绪,即通过单板代理进程的专门用于接收结果报文的线程(结果处理单元223控制该线程)在接收到读操作报文对应的结果报文时,对该结果报文打上就绪标记(该标记用于表示结果报文准备就绪),当主控板的单板代理进程中用于发送读操作报文的线程(第一读单元222控制该线程)检测到结果报文上的就绪标记时,即当无CPU单板发送的结果报文就绪时,主控板的结果处理单元223接收无CPU单板发送的结果报文;如果当前时刻主控板的单板代理进程中用于发送读操作报文的线程未检测到结果报文上的就绪标记,则结果处理单元223等待预 设等待时长(例如5ms),继续检测到结果报文上的就绪标记,如此循环,直至主控板的单板代理进程中用于发送读操作报文的线程未检测到结果报文上的就绪标记或者经过预设次数(例如20次)的循环检测后提示通讯异常。After the board agent process of the main control board sends a read operation message to the CPU-free board, the CPLD reply result of the CPU-free board sends a packet to the board agent process of the main control board. If the main control board is in the process, the main control board is in the process. It is not necessary to obtain the result of the result message in the buffer before receiving the result message of the reply, so a delay protection process is needed here. The result processing unit 223 of the main control board first determines whether the result message sent by the CPUless board is ready, that is, the thread dedicated to receiving the result message by the board proxy process (the result processing unit 223 controls the thread) is receiving. When the result message corresponding to the read operation message is received, the result message is marked with a ready flag (this flag is used to indicate that the result message is ready), and is used to send a read operation message in the board proxy process of the main control board. When the thread (the first reading unit 222 controls the thread) detects the ready flag on the result packet, that is, when the result message sent by the CPUless board is ready, the result processing unit 223 of the main control board receives the CPUless board. The result packet sent; if the thread for sending the read operation message in the board proxy process of the main control board does not detect the ready flag on the result message, the result processing unit 223 waits for the pre-request Set the wait time (for example, 5ms), continue to detect the ready flag on the result message, and so on, until the thread used to send the read operation message in the board proxy process of the main control board does not detect the ready on the result message. The mark or the loop detection after a preset number of times (for example, 20 times) indicates that the communication is abnormal.
在本实施例中,通过主控板的结果处理单元223判断无CPU单板发送的结果报文是否就绪,当无CPU单板发送的结果报文就绪时,主控板的结果处理单元223接收无CPU单板发送的结果报文,防止主控板未接收到结果报文或接收不正确的结果报文就继续执行后续步骤,提高了主控板与无CPU单板通讯的准确性。In this embodiment, the result processing unit 223 of the main control board determines whether the result message sent by the CPUless board is ready. When the result message sent by the CPUless board is ready, the result processing unit 223 of the main control board receives. The result packet sent by the CPU-free board prevents the main control board from receiving the result packet or receiving the incorrect result packet to continue the subsequent steps. This improves the accuracy of communication between the main control board and the CPU-free board.
基于本发明实施例通讯设备的第二实施例,提出与通讯设备的第五实施例,在第五实施例中,读操作报文和结果报文中包含类型字段。A fifth embodiment of the communication device according to the embodiment of the present invention provides a fifth embodiment of the communication device. In the fifth embodiment, the read operation message and the result message include a type field.
单板代理进程模块22还包括:The board agent process module 22 further includes:
类型处理单元224,设置为在所述结果处理单元接收所述无CPU单板发送的结果报文之后,根据接收的结果报文中的类型字段,确定该结果报文的结果类型。The type processing unit 224 is configured to determine, after the result processing unit receives the result message sent by the CPUless board, the result type of the result message according to the type field in the received result message.
例如,由于查询PHY寄存器与查询CPLD寄存器的字节数不同,接收结果报文后的处理也不同,这时就需要对结果报文进行分类处理,通过在读操作报文中添加类型字段,无CPU单板解析读操作报文后继续保持其中的类型字段,并将该类型字段一起封装至结果报文(即结果报文中也包含对应读操作报文的类型字段)中,主控板的类型处理单元224根据接收到的结果报文中的类型字段,确定结果报文的结果类型,然后对不同结构类型的结果报文进行批量、集中处理。其中,类型字段可以为以太网报文里的IVH字段,这个字段在发送读操作报文时填入,无CPU单板的CPLD芯片回复结果报文里会自动带上填入的IVH字段值,这样就可以区分不同的结果类型。For example, since the query PHY register is different from the number of bytes in the Query CPLD register, the processing after receiving the result message is different. In this case, the result message needs to be classified, and the type field is added in the read operation message, and there is no CPU. The board continues to maintain the type field after parsing the read operation packet, and encapsulates the type field into the result packet (that is, the result packet also contains the type field corresponding to the read operation message), and the type of the main control board The processing unit 224 determines the result type of the result packet according to the type field in the received result packet, and then performs batch and centralized processing on the result packets of different structure types. The type field can be an IVH field in the Ethernet packet. This field is filled in when the read operation message is sent. The CPH chip response result message of the CPU-free board is automatically loaded with the filled IVH field value. This allows you to distinguish between different result types.
在本实施例中,通过在读操作报文中添加类型字段,从而在对应结果报文中也添加类型字段,主控板的类型处理单元224可以根据就结果报文的类型字段对该结果报文进行分类,然后对同一类的结果报文进行批量集中处理,提高了结果报文的处理速度,使使主控板与无CPU单板之间的通讯更加高效。 In this embodiment, by adding a type field to the read operation message, a type field is also added to the corresponding result message, and the type processing unit 224 of the main control board can send the result message according to the type field of the result message. The categorization is performed, and the result packets of the same type are processed in batches to improve the processing speed of the result packets, so that the communication between the main control board and the CPUless board is more efficient.
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现所述的与无CPU单板通讯的方法。A computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the method of communicating with a CPUless board.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括如果干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明每个实施例的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium (such as ROM/RAM, disk). And an optical disc), including a method for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform each embodiment of the present invention.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。Alternatively, all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。The devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. The above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
工业实用性Industrial applicability
本发明实施例通过主控板为每个与该主控板连接且处于上电状态的无CPU单板分配一个单板代理进程,该主控板根据需求通过单板代理进程向对应的无CPU单板发送控制报文,以控制对应的无CPU单板进行读处理或写处理,从而实现无CPU单板与主控板之间的通讯。 In the embodiment of the present invention, the main control board allocates a single-board proxy process to each CPU-less board that is connected to the main control board and is in a power-on state. The main control board passes the single-board proxy process to the corresponding CPU-free process according to requirements. The board sends control packets to control the corresponding CPU-free board for read or write processing, so that communication between the CPU-free board and the main control board is implemented.

Claims (13)

  1. 一种与无中央处理器CPU单板通讯的方法,包括:A method of communicating with a CPU without a central processing unit CPU, comprising:
    当无CPU单板上电后,所述无CPU单板将包含该无CPU单板的单板信息的上报报文发送至主控板;After the CPU is not powered by the CPU, the CPU-free board sends the report message of the board information of the CPU-free board to the main control board.
    所述主控板为每个与该主控板连接且处于上电状态的无CPU单板分配一个单板代理进程;The main control board allocates a single board proxy process to each CPUless board that is connected to the main control board and is in a power-on state;
    所述主控板通过所述单板代理进程向对应的无CPU单板发送控制报文,通过所述控制报文控制对应的无CPU单板进行读处理或写处理;The main control board sends a control packet to the corresponding CPUless board through the board proxy process, and controls the corresponding CPUless board to perform read processing or write processing through the control packet;
    所述无CPU单板接收所述主控板发送的控制报文,并根据接收的控制报文进行读处理或写处理。The CPUless board receives the control message sent by the main control board, and performs read processing or write processing according to the received control message.
  2. 如权利要求1所述的与无CPU单板通讯的方法,其中,所述上报报文和控制报文为添加预设虚拟局域网VLAN标识的以太网报文。The method of communicating with a CPU-less board according to claim 1, wherein the reported message and the control message are Ethernet packets added with a preset virtual local area network VLAN identifier.
  3. 如权利要求1所述的与无CPU单板通讯的方法,其中,所述控制报文包括写操作报文和读操作报文;The method of communicating with a CPU-less board according to claim 1, wherein the control message comprises a write operation message and a read operation message;
    所述主控板通过所述单板代理进程向对应的无CPU单板发送控制报文,控制对应的所述无CPU单板进行读处理或写处理包括:The main control board sends a control packet to the corresponding CPUless board through the board proxy process, and the control of the corresponding CPUless board for reading or writing processing includes:
    当所述主控板通过所述单板代理进程对所述无CPU单板进行写操作时,将包含所述写操作对应配置值和配置地址的写操作报文发送至所述无CPU单板;When the main control board writes the CPUless board through the board proxy process, the write operation message including the corresponding configuration value and the configuration address of the write operation is sent to the CPUless board. ;
    所述无CPU单板从接收到的所述写操作报文中解析出配置值和匹配地址,并将该配置值配置到所述配置地址对应的芯片寄存器中;The CPU-free board parses a configuration value and a matching address from the received write operation message, and configures the configuration value into a chip register corresponding to the configuration address;
    当所述主控板通过所述单板代理进程对所述无CPU单板进行读操作时,将包含所述读操作对应的芯片寄存器地址的读操作报文发送至所述无CPU单板;When the main control board performs a read operation on the CPUless board through the board proxy process, the read operation message including the chip register address corresponding to the read operation is sent to the CPUless board;
    所述无CPU单板从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述主控板;The CPU-free board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message and sends the result message to the main control board;
    所述主控板的单板代理进程接收所述无CPU单板发送的结果报文,其中,所述结果报文为添加预设虚拟局域网VLAN标识的以太网报文。 The board proxy process of the main control board receives the result packet sent by the CPUless board, where the result packet is an Ethernet packet that adds a preset virtual local area network VLAN identifier.
  4. 如权利要求3所述的与无CPU单板通讯的方法,其中,所述无CPU单板从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述主控板包括:The method of communicating with a CPUless board according to claim 3, wherein the CPUless board parses a chip register address from the received read operation message and corresponds to the chip register address. The destination information is encapsulated into a result message sent to the main control board, including:
    如果当前没有接收到其它读操作报文且无正在封装的结果报文,则所述无CPU单板接收所述主控板发送的所述读操作报文;If no other read operation message is received and no result packet is being encapsulated, the CPUless board receives the read operation message sent by the main control board;
    所述无CPU单板从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述主控板。The CPU-free board parses the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message and sends the result message to the main control board.
  5. 如权利要求3所述的与无CPU单板通讯的方法,其中,所述主控板的单板代理进程接收所述无CPU单板发送的结果报文包括:The method of communicating with a CPU-less board according to claim 3, wherein the board agent process of the main control board receives the result message sent by the CPUless board, including:
    所述主控板的单板代理进程判断所述无CPU单板发送的结果报文是否就绪;The board proxy process of the main control board determines whether the result packet sent by the CPUless board is ready.
    当所述无CPU单板发送的结果报文就绪时,所述主控板的单板代理进程接收所述无CPU单板发送的结果报文。When the result packet sent by the CPUless board is ready, the board proxy process of the main control board receives the result packet sent by the CPUless board.
  6. 如权利要求3所述的与无CPU单板通讯的方法,其中,所述读操作报文和结果报文中包含类型字段;The method of communicating with a CPU-free board according to claim 3, wherein the read operation message and the result message include a type field;
    所述方法还包括:在所述主控板的单板代理进程接收所述无CPU单板发送的结果报文之后,所述主控板的单板代理进程根据接收的结果报文中的类型字段,确定该结果报文的结果类型。The method further includes: after the board proxy process of the main control board receives the result packet sent by the CPUless board, the board proxy process of the main control board is based on the type of the received result message Field to determine the result type of the result message.
  7. 一种通讯设备,所述通讯设备包括无中央处理器CPU单板和主控板;A communication device includes a CPU board without a central processing unit and a main control board;
    所述无CPU单板包括:报文上报模块和报文通讯模块;所述主控板包括:进程分配模块和报文通讯模块;The CPU-less board includes: a message reporting module and a message communication module; the main control board includes: a process allocation module and a message communication module;
    所述报文上报模块,设置为当无CPU单板上电后,将包含该无CPU单板的单板信息的上报报文发送至进程分配模块;The packet reporting module is configured to send the report message of the board information of the CPUless board to the process allocation module after the board is not powered by the CPU;
    所述进程分配模块,设置为为每个与该主控板连接且处于上电状态的无CPU单板分配一个单板代理进程; The process allocation module is configured to allocate a single board proxy process to each CPUless board connected to the main control board and in a power-on state;
    所述单板代理进程模块,设置为通过所述单板代理进程向对应的无CPU单板发送控制报文,控制对应的无CPU单板进行读处理或写处理;The board proxy process module is configured to send a control packet to the corresponding CPUless board through the board proxy process, and control the corresponding CPUless board to perform read processing or write processing;
    所述报文通讯模块,设置为接收所述单板代理进程模块发送的控制报文,并根据接收的控制报文进行读处理或写处理。The message communication module is configured to receive a control message sent by the board agent process module, and perform read processing or write processing according to the received control message.
  8. 如权利要求7所述的通讯设备,其中,所述上报报文和控制报文为添加预设虚拟局域网VLAN标识的以太网报文。The communication device of claim 7, wherein the reported message and the control message are Ethernet packets added with a preset virtual local area network VLAN identifier.
  9. 如权利要求7所述的通讯设备,其中,所述控制报文包括写操作报文和读操作报文;The communication device of claim 7, wherein the control message comprises a write operation message and a read operation message;
    所述单板代理进程模块包括第一写单元、第一读单元和结果处理单元;The single board proxy process module includes a first write unit, a first read unit, and a result processing unit;
    所述报文通讯模块包括第二写单元和第二读单元;The message communication module includes a second write unit and a second read unit;
    所述第一写单元,设置为当通过单板代理进程对所述无CPU单板进行写操作时,将包含所述写操作对应配置值和配置地址的写操作报文发送至所述第二写单元;The first write unit is configured to send a write operation message including the write operation corresponding configuration value and the configuration address to the second when the CPU-free board performs a write operation by the board proxy process Write unit
    所述第二写单元,设置为从接收到的所述写操作报文中解析出配置值和匹配地址,并将该配置值配置到所述配置地址对应的芯片寄存器中;The second write unit is configured to parse the configuration value and the matching address from the received write operation message, and configure the configuration value into the chip register corresponding to the configuration address;
    所述第一读单元,设置为当通过单板代理进程对所述无CPU单板进行读操作时,将包含所述读操作对应的芯片寄存器地址的读操作报文发送至所述报文通讯模块;The first reading unit is configured to send a read operation message including a chip register address corresponding to the read operation to the message communication when the CPU-free board performs a read operation by the board proxy process Module
    所述第二读单元,设置为从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述结果处理单元;The second reading unit is configured to parse the chip register address from the received read operation message, and encapsulate the destination information corresponding to the chip register address into a result message and send the result message to the result processing unit;
    所述结果处理单元,设置为接收所述第二读单元发送的结果报文,其中,所述结果报文为添加预设虚拟局域网VLAN标识的以太网报文。The result processing unit is configured to receive the result message sent by the second read unit, where the result message is an Ethernet message that adds a preset virtual local area network VLAN identifier.
  10. 如权利要求9所述的通讯设备,其中,The communication device according to claim 9, wherein
    所述第二读单元从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述结果 处理单元包括:The second reading unit parses out the chip register address from the received read operation message, and encapsulates the destination information corresponding to the chip register address into a result message and sends the result to the result. The processing unit includes:
    如果当前没有接收到其它读操作报文且无正在封装的结果报文,则接收所述主控板发送的所述读操作报文;Receiving the read operation message sent by the main control board if no other read operation message is received and there is no result message being encapsulated;
    从接收到的所述读操作报文中解析出芯片寄存器地址,并将所述芯片寄存器地址对应的目的信息封装成结果报文发送至所述结果处理单元。The chip register address is parsed from the received read operation message, and the destination information corresponding to the chip register address is encapsulated into a result message and sent to the result processing unit.
  11. 如权利要求9所述的通讯设备,其特征在于,A communication device according to claim 9, wherein:
    所述结果处理单元接收所述第二读单元发送的结果报文包括:Receiving, by the result processing unit, the result message sent by the second reading unit includes:
    判断所述无CPU单板发送的结果报文是否就绪;Determining whether the result packet sent by the CPUless board is ready;
    当所述无CPU单板发送的结果报文就绪时,接收所述无CPU单板发送的结果报文。When the result packet sent by the CPUless board is ready, the result packet sent by the CPUless board is received.
  12. 如权利要求9所述的通讯设备,其中,所述读操作报文和结果报文中包含类型字段;The communication device of claim 9, wherein the read operation message and the result message include a type field;
    所述单板代理进程模块还包括:The single board agent process module further includes:
    类型处理单元,设置为在所述结果处理单元接收所述无CPU单板发送的结果报文之后,根据接收的结果报文中的类型字段,确定该结果报文的结果类型。The type processing unit is configured to determine, after the result processing unit receives the result message sent by the CPUless board, the result type of the result message according to the type field in the received result message.
  13. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现权利要求1至6任意一项所述的与无中央处理器CPU单板通讯的方法。 A computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the method of communicating with a CPU without a central processing unit CPU as claimed in any one of claims 1 to 6.
PCT/CN2016/083668 2015-08-26 2016-05-27 Method for communicating with board having no central processing unit and communication device WO2017032112A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510532306.6A CN106487549A (en) 2015-08-26 2015-08-26 With the method communicated nothing central processing unit veneer and communication apparatus
CN201510532306.6 2015-08-26

Publications (1)

Publication Number Publication Date
WO2017032112A1 true WO2017032112A1 (en) 2017-03-02

Family

ID=58099562

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/083668 WO2017032112A1 (en) 2015-08-26 2016-05-27 Method for communicating with board having no central processing unit and communication device

Country Status (2)

Country Link
CN (1) CN106487549A (en)
WO (1) WO2017032112A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115065615A (en) * 2022-08-17 2022-09-16 北京左江科技股份有限公司 FPGA-based network port state scanning system and method
CN116541335A (en) * 2023-07-05 2023-08-04 安擎计算机信息股份有限公司 Method for distributing serial addresses and electronic equipment

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107124316B (en) * 2017-05-23 2019-10-11 烽火通信科技股份有限公司 Hardware based quick switching action implementation method in a kind of data communications equipment
CN108304338A (en) * 2017-12-20 2018-07-20 深圳比特微电子科技有限公司 More board managing methods
CN111385133A (en) * 2018-12-29 2020-07-07 中兴通讯股份有限公司 Resource management method and system
CN111064815B (en) * 2019-11-06 2022-02-18 深圳震有科技股份有限公司 Method and device for sharing one IP by multiple single boards, computer equipment and medium
CN115701035A (en) * 2021-07-15 2023-02-07 北京车和家信息技术有限公司 Data transmission method and device and automobile

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848103A (en) * 2005-04-12 2006-10-18 华为技术有限公司 Method and system for realizing central control of central control unit to single board
CN101055622A (en) * 2006-05-17 2007-10-17 华为技术有限公司 Individual board electronic tag read-write control system and method
WO2012012994A1 (en) * 2010-07-30 2012-02-02 中兴通讯股份有限公司 Device with unified shelf management architecture and management control method thereof
CN103823657A (en) * 2014-02-17 2014-05-28 汉柏科技有限公司 Method for hyper-threading based communication between equipment boards

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848103A (en) * 2005-04-12 2006-10-18 华为技术有限公司 Method and system for realizing central control of central control unit to single board
CN101055622A (en) * 2006-05-17 2007-10-17 华为技术有限公司 Individual board electronic tag read-write control system and method
WO2012012994A1 (en) * 2010-07-30 2012-02-02 中兴通讯股份有限公司 Device with unified shelf management architecture and management control method thereof
CN103823657A (en) * 2014-02-17 2014-05-28 汉柏科技有限公司 Method for hyper-threading based communication between equipment boards

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115065615A (en) * 2022-08-17 2022-09-16 北京左江科技股份有限公司 FPGA-based network port state scanning system and method
CN115065615B (en) * 2022-08-17 2022-11-29 北京左江科技股份有限公司 FPGA-based network port state scanning system and method
CN116541335A (en) * 2023-07-05 2023-08-04 安擎计算机信息股份有限公司 Method for distributing serial addresses and electronic equipment
CN116541335B (en) * 2023-07-05 2023-09-19 安擎计算机信息股份有限公司 Method for distributing serial addresses and electronic equipment

Also Published As

Publication number Publication date
CN106487549A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
WO2017032112A1 (en) Method for communicating with board having no central processing unit and communication device
US9916270B2 (en) Virtual intelligent platform management interface (IPMI) satellite controller and method
EP3367636B1 (en) System and method for automatically updating bios setup options
EP3340033B1 (en) System and method for remotely updating firmware
US11599490B1 (en) Packet queueing for network device
CN105868149B (en) Serial port information transmission method and device
US10880163B2 (en) System and method for hardware management and configuration in a datacenter using augmented reality and available sensor data
US8875154B2 (en) Interface specific and parallel IPMI message handling at baseboard management controller
US10509758B1 (en) Emulated switch with hot-plugging
US10972361B2 (en) System and method for remote hardware support using augmented reality and available sensor data
KR102210289B1 (en) Hardware management communication protocol
US9319313B2 (en) System and method of forwarding IPMI message packets based on logical unit number (LUN)
CN109257955B (en) Method for operating hard disk and hard disk manager
US10621124B2 (en) Method, device and computer program product for enabling SR-IOV functions in endpoint device
US9032063B2 (en) Dynamic port naming in a chassis
CN110990110A (en) Virtual machine creation method and device based on Sriov network card
CN107291641B (en) Direct memory access control device for a computing unit and method for operating the same
US20170140046A1 (en) Electronic component with deterministic response
US11132215B2 (en) Techniques to facilitate out of band management in a virtualization environment
US10795846B1 (en) Scalable NVMe storage management over system management bus
US9883411B2 (en) External cellular recovery device
US9282062B2 (en) Providing I2C bus over Ethernet
US20140022937A1 (en) Integrated device management over ethernet network
CN109656674B (en) Computer equipment, virtualization chip and data transmission method
US10037257B1 (en) Examining local hardware using a location-aware peripheral device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16838372

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16838372

Country of ref document: EP

Kind code of ref document: A1