Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a broadcast frame communication method based on a VPX backboard IPMI interface, which can update board card information more quickly, acquire slot position change more quickly, and has stronger robustness, more stability and reliability.
The invention aims at realizing the following scheme:
a broadcast frame communication method based on VPX backboard IPMI interface includes the following steps:
Based on the communication mode of the broadcast frame, a retransmission mechanism of bus monitoring and arbitration failure is added to ensure that the master control board card does not need to respectively send query requests with other slots when querying the information of other slot board cards, and only needs to send broadcast requests to the bus, and the board cards in the chassis reply corresponding state information in sequence after receiving the broadcast.
Further, the bus monitoring includes the steps that each I2C device firstly obtains a bus state on software when sending the I2C message, and if the bus is busy, the bus is waited for a period of time and then the bus control right is applied.
Further, the retransmission mechanism for the arbitration failure comprises the steps of judging the transmission state after each message transmission, and storing the message into a buffer for waiting for the next transmission if the transmission state is the arbitration failure.
Further, the communication mode based on the broadcast frame is provided with a retransmission mechanism of bus monitoring and arbitration failure, and specifically comprises the following steps:
Step 1, a main control transmits a START signal;
Step 2, the main control transmits the broadcast address and the write operation bit;
step 3, any slot replies ACK;
step 4, the main control transmits data;
step 5, any slot replies ack;
step 6, repeating the steps 5-6 until the data is completely transmitted;
Step 7, the master control transmits a STOP signal;
Step 8, the slot 1 sends a START signal;
step 9, the slot 1 sends a main control address plus a writing operation bit 0;
Step 10, the master control replies ACK;
step 11, the slot 1 transmits data;
Step 12, the master control replies ACK;
step 13, repeating the steps 11-12 until the data is completely transmitted;
Step 14, the slot 1 transmits a STOP signal;
And 15, repeating the steps 8-14, and continuously transmitting data by other slot board cards.
Further, in step 2, the master control sends a broadcast address of 7bits, and the write operation bit is write 0 and 1bit.
Further, in step 4, the master control sends 8bits of data.
Further, in step 9, the slot 1 sends a master address of 7bits, and the write operation bit is write 0 and 1bit.
Further, in step 11, the transmission data of the slot 1 is 8bits.
Further, the method comprises the step of main control software, wherein the main control software sends a message frame with a broadcast address according to the steps 1-15, if the main control software is successfully sent, the microcontroller continues to execute other operations without waiting, and the message replied by other board cards is correspondingly returned to a buffer zone by interrupting the receiving of the message, and the message is directly obtained from the buffer zone when needed.
The method comprises the steps of receiving a bus state request, and sending a message to a buffer area, wherein the bus state request comprises a master control address, a broadcasting address is not used when the master control address is used by the slot level software in a reply process, the bus state is randomly delayed for a period of time when a bus is busy, detecting the bus state again, and if the bus state is busy, storing the message in the buffer area, attempting to send again in the next sending period, wherein m times of the message is tried, m is an integer, and the values of m and n are determined according to the number of the boards and the condition of the bus.
The beneficial effects of the invention include:
The broadcast frame communication method based on the VPX backboard IPMI interface provided by the invention can update board card information more quickly and acquire slot position change (such as hot plug) more quickly on the basis of not changing hardware design and communication protocol, and meanwhile, the communication method avoids the master control to inquire the spare slot position board card, has stronger robustness, and the communication method is ensured by long-time experiments, and is still short in time consumption, stable and reliable even under the conditions of high temperature, high humidity, bus fault recovery and the like.
Detailed Description
The invention is further described below with reference to the drawings and examples. All of the features disclosed in all of the embodiments of this specification, or all of the steps in any method or process disclosed implicitly, except for the mutually exclusive features and/or steps, may be combined and/or expanded and substituted in any way.
The inventors of the present invention found the following technical problems:
As shown in FIG. 1, which is a schematic view of a VPX chassis, it is assumed that the chassis has 16 board slots, each slot numbered 1-16. Assuming that the 14 slots are main control slots, the main control needs to inquire the information of the 1-13,14 and 16 slot board cards through I2C respectively. The VPX chassis communication flow is as follows:
1. the master control sends a START signal;
2. the master control sends a slot 1 address (7 bits) +write operation bit 0 (1 bit);
3. Slot 1 replies ACK;
4. Master control transmits data (8 bits);
5. the slot 1 replies ack;
6. Repeating the steps 5-6 until the data is completely sent;
7. the master control transmits a STOP signal;
8. Slot 1 sends START signal;
9. The slot 1 sends the master control address (7 bits) +write operation bit 0 (1 bit);
10. The master control replies ACK;
11. slot 1 sends data (8 bits);
12. The master control replies ACK;
13. repeating the steps 11-12 until all data transmission is completed;
14. slot 1 transmits STOP signal;
15. repeating the steps 1-14, and inquiring other slot-position board cards.
The main control finishes the state reading of the slot 1 once so far, and the process can be repeated n times according to the state acquired by the regulation of the communication protocol. The above process is repeated for the next slot board card, and the communication process can be repeated m times according to the number of the VPX chassis boards. It can be seen that this communication mode is time-consuming and has a long communication period. In addition, because the VPX chassis has a condition of not fully inserting, that is, a part of slots are empty, when the slot address is sent in step 2, the arrival of the ACK cannot be waited for on time, and the reset of the host I2C or other abnormal conditions (such as I2C deadlock, cpu occupation is too high) are easily caused. In view of the above, there is an urgent need for a method to solve the problems associated with the conventional communication methods.
In the technical conception of the embodiment of the invention, a retransmission mechanism of bus monitoring and arbitration failure is added based on a communication mode of a broadcast frame, so that when a master control board card inquires other slot board card information, the master control board card does not need to respectively send inquiry requests with other slots, only needs to send broadcast requests to a bus, and after the board card in a chassis receives the broadcast, the master control board card sequentially replies corresponding state information.
And bus monitoring, namely, when each I2C device sends an I2C message, firstly acquiring a bus state on software, and if the bus is busy, waiting for a period of time and then applying bus control rights.
And the retransmission mechanism of the arbitration failure is that the message arbitration failure exists due to the I2C bus arbiter, after each time of sending the message, the software needs to judge the sending state, and if the sending state is the arbitration failure, the message is stored in a buffer for waiting for the next sending.
In a further inventive concept, the specific communication flow is as follows:
Step 1, a main control transmits a START signal;
step 2, the main control transmits a broadcast address (7 bits) +writing operation bit 0 (1 bit);
step 3, any slot replies ACK;
Step 4, the main control transmits data (8 bits);
step 5, any slot replies ack;
step 6, repeating the steps 5-6 until the data is completely transmitted;
Step 7, the master control transmits a STOP signal;
Step 8, the slot 1 sends a START signal;
step 9, the slot 1 sends the main control address (7 bits) +writing operation bit 0 (1 bit);
Step 10, the master control replies ACK;
step 11, the slot 1 transmits data (8 bits);
Step 12, the master control replies ACK;
Step 13, repeating the steps 11-12 until the data is completely transmitted;
Step 14, the slot 1 transmits a STOP signal;
And 15, repeating the steps 8-14, and continuously transmitting data by other slot board cards.
Therefore, the technical scheme of the invention omits the separate polling and intermediate waiting time of the master control on each slot, and simultaneously avoids I2C reset or other abnormal conditions caused by the problem of slot vacant, thereby greatly shortening the polling period and the reliability of the program.
The method of the invention can also provide a main control software running on the electronic carrier, the flow chart of the main control software is shown in figure 2, the main control software transmits the message frame with the broadcast address according to the flow, if the main control software successfully transmits the message frame, the main control software does not need to wait here, the microcontroller can continue to execute other operations, and the message replied by the interrupt receiving other boards is correspondingly put back to the buffer zone, and the message is directly acquired from the buffer zone when needed.
The method of the invention can also provide other slot position board card software, the flow chart of the other slot position board card software is shown in figure 3, the other slot position software uses the main control address when replying, and does not use the broadcast address, so that other board cards are prevented from unnecessarily entering to receive the interrupt, and the CPU utilization rate is higher. When the bus is busy, the program can randomly delay for a period of time, detect the bus state again, and cycle for n times, if the bus is busy, the message is stored in the buffer area, and the transmission is tried again in the next transmission period, and the process can be tried for m times. The values of m and n are determined according to the number of the boards and the bus condition. For example, there are a total of 16 boards, then m may take any value greater than 16 to ensure that the message is also successfully sent in the worst case (i.e., each arbitration fails).
In summary, the broadcast frame communication method based on the VPX backplane IPMI interface provided by the present invention can update the board information more quickly and obtain slot changes (such as hot plug) more quickly without changing hardware design and communication protocol. The communication mode avoids the master control to inquire the spare slot board card, has stronger robustness, and is ensured by long-time experiments, and is still short in time consumption, stable and reliable even under the conditions of high temperature, high humidity, bus fault recovery and the like.
Example 1
A broadcast frame communication method based on VPX backboard IPMI interface includes the following steps:
Based on the communication mode of the broadcast frame, a retransmission mechanism of bus monitoring and arbitration failure is added to ensure that the master control board card does not need to respectively send query requests with other slots when querying the information of other slot board cards, and only needs to send broadcast requests to the bus, and the board cards in the chassis reply corresponding state information in sequence after receiving the broadcast.
Example 2
Based on the embodiment 1, the bus monitoring comprises the steps that each I2C device firstly acquires the bus state on software when sending the I2C message, and if the bus is busy, the bus monitoring waits for a period of time to apply the bus control right.
Example 3
On the basis of embodiment 1, the retransmission mechanism for arbitration failure includes the steps of judging the transmission state after each message transmission, and if the transmission state is arbitration failure, storing the message into a buffer for waiting for the next transmission.
Example 4
Based on embodiment 1 to embodiment 3, the broadcast frame-based communication method is applied to a retransmission mechanism of bus monitoring and arbitration failure, and specifically includes the steps of:
Step 1, a main control transmits a START signal;
Step 2, the main control transmits the broadcast address and the write operation bit;
step 3, any slot replies ACK;
step 4, the main control transmits data;
step 5, any slot replies ack;
step 6, repeating the steps 5-6 until the data is completely transmitted;
Step 7, the master control transmits a STOP signal;
Step 8, the slot 1 sends a START signal;
step 9, the slot 1 sends a main control address plus a writing operation bit 0;
Step 10, the master control replies ACK;
step 11, the slot 1 transmits data;
Step 12, the master control replies ACK;
step 13, repeating the steps 11-12 until the data is completely transmitted;
Step 14, the slot 1 transmits a STOP signal;
And 15, repeating the steps 8-14, and continuously transmitting data by other slot board cards.
Example 5
Based on embodiment 4, in step 2, the master transmission broadcast address is 7bits, and the write operation bit is write 0 and 1bit.
Example 6
Based on embodiment 4, in step 4, the master control sending data is 8bits.
Example 7
Based on embodiment 4, in step 9, the master address sent by the slot 1 is 7bits, and the write operation bit is write 0 and 1bit.
Example 8
Based on embodiment 4, in step 11, the transmission data of the slot 1 is 8bits.
Example 9
Based on embodiment 4, the method includes the main control software, the main control software sends a message frame with a broadcast address according to steps 1-15, if the main control software is successfully sent, the microcontroller does not need to wait for the main control software to continuously execute other operations, and the message replied by the other board card is correspondingly returned to the buffer zone by interrupting the receiving of the message, and the message is directly obtained from the buffer zone when required.
Example 10
Based on embodiment 4, the method comprises the steps of using a master control address by the slot level software in reply without using a broadcast address, so that other boards are prevented from unnecessarily entering a receiving interrupt to cause higher CPU utilization rate, randomly delaying for a period of time by the slot level board software program when a bus is busy, detecting the bus state again, cycling for n times, wherein n is an integer, storing a message into a buffer area if the bus state is busy, and attempting to transmit again in the next transmission period, wherein m is an integer, and the values of m and n are determined according to the number of boards and the bus condition.
The units involved in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from the computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in the various alternative implementations described above.
As another aspect, the present application also provides a computer-readable medium that may be included in the electronic device described in the above embodiment, or may exist alone without being incorporated into the electronic device. The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the methods described in the above embodiments.
The invention is not related in part to the same as or can be practiced with the prior art.
The foregoing technical solution is only one embodiment of the present invention, and various modifications and variations can be easily made by those skilled in the art based on the application methods and principles disclosed in the present invention, not limited to the methods described in the foregoing specific embodiments of the present invention, so that the foregoing description is only preferred and not in a limiting sense.
In addition to the foregoing examples, those skilled in the art will recognize from the foregoing disclosure that other embodiments can be made and in which various features of the embodiments can be interchanged or substituted, and that such modifications and changes can be made without departing from the spirit and scope of the invention as defined in the appended claims.