Disclosure of Invention
In view of this, the embodiments of the present disclosure provide the following solutions.
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
An embodiment of the present disclosure provides a bus data retransmission method applied to a 1394 bus, where the 1394 bus includes a CC node and at least one RN node, the method includes:
In the STOF period, the CC node does not receive the ACK returned by at least one RN node, and determines that transmission loss occurs;
the CC node informs the RN node which does not reply with the ACK to retransmit the data in a safe time, wherein the safe time is a time segment reserved in the STOF period and used for retransmitting the data.
In an exemplary embodiment of the present disclosure, the CC node does not receive an ACK returned by at least one RN node, and determining that transmission loss occurs includes:
The CC node sends STOF to the RN node, and after receiving the STOF from the CC node in a time window corresponding to the RN node according to the time sequence, the RN node sends data to the node connected with the RN node and replies ACK to the CC node;
And the CC node does not receive the ACK returned by at least one RN node, and determines that transmission loss occurs.
In an exemplary embodiment of the present disclosure, the CC node notifies the RN node that does not reply to the ACK to retransmit data in a secure time, including:
retransmitting STOF to at least one RN node which does not reply with ACK by the CC node in the safe time respectively, so that the at least one RN node retransmits data to the node connected with the at least one RN node;
the CC node receives an ACK replied by at least one RN node.
In an exemplary embodiment of the present disclosure, after the CC node notifies the RN node that does not reply to the ACK to retransmit the data in the secure time, the method further includes:
and the CC node does not receive the ACK replied by the RN node, and determines that the RN node fails.
In an exemplary embodiment of the present disclosure, after determining that the RN node fails, the method further includes.
For a failed RN node, the CC node no longer sends a stop to the RN node.
An embodiment of the present disclosure further provides a CC node, including:
the judging module is set to determine that transmission loss occurs based on the 1394 bus and in the STOF period, the CC node does not receive the ACK replied by at least one RN node;
The processing module is configured to notify the RN node which does not reply to the ACK to retransmit the data in a safety time, wherein the safety time is a time slice reserved in the STOF period and used for retransmitting the data.
In an exemplary embodiment of the present disclosure, the determining module is specifically configured to:
The CC node sends STOF to the RN node, and after receiving the STOF from the CC node in a time window corresponding to the RN node according to the time sequence, the RN node sends data to the node connected with the RN node and replies ACK to the CC node;
And the CC node does not receive the ACK returned by at least one RN node, and determines that transmission loss occurs.
In an exemplary embodiment of the present disclosure, the processing module is specifically configured to:
retransmitting STOF to at least one RN node which does not reply with ACK by the CC node in the safe time respectively, so that the at least one RN node retransmits data to the node connected with the at least one RN node;
the CC node receives an ACK replied by at least one RN node.
In an exemplary embodiment of the present disclosure, the node further comprises:
the fault diagnosis module is set to determine the fault of the RN node when the CC node does not receive the ACK replied by the RN node;
the fault processing module is configured to, for a failed RN node, prevent the CC node from sending a stop to the RN node.
An embodiment of the present disclosure further provides a method for processing a 1394 bus fault, where the 1394 bus includes a CC node and at least one RN node, and the method includes:
In the STOF period, the CC node does not receive the ACK returned by at least one RN node, and determines that transmission loss occurs;
the CC node informs the RN node which does not reply with the ACK to retransmit the data in the safe time, wherein the safe time is a time segment reserved in the STOF period and used for retransmitting the data;
the CC node does not receive the ACK replied by the RN node, and determines that the RN node fails;
in all N RN nodes of a bus, under the condition that at least M RN nodes are failed, determining that the bus is failed, wherein M is more than or equal to 1 and less than or equal to N;
resetting the bus with faults.
According to the embodiment of the disclosure, under the condition that the transmission of the 1394 bus is lost, the safe time is reserved in the STOF period, and the lost data is retransmitted in the safe time, so that the reliability of the transmission of the 1394 bus is improved through a retransmission mechanism.
The embodiment of the disclosure determines an RN node which does not reply ACK yet during data retransmission as a fault node, and isolates the RN node which has faults under the condition that the RN node has faults. Therefore, the RN node which is faulty is processed in time, and the reliability of data transmission of the 1394 bus is further improved.
Additional features and advantages of the disclosure will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the disclosure. The objectives and other advantages of the disclosure will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Detailed Description
The present disclosure describes several embodiments, but the description is illustrative and not limiting, and it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the embodiments described in the present disclosure. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are possible. Any feature or element of any embodiment may be used in combination with or in place of any other feature or element of any other embodiment unless specifically limited.
The present disclosure includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements of the present disclosure that have been disclosed may also be combined with any conventional features or elements to form a unique inventive arrangement as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive arrangements to form another unique inventive arrangement as defined in the claims. Thus, it should be understood that any of the features shown and/or discussed in this disclosure may be implemented alone or in any suitable combination. Accordingly, the embodiments are not to be restricted except in light of the attached claims and their equivalents. Further, various modifications and changes may be made within the scope of the appended claims.
Furthermore, in describing representative embodiments, the specification may have presented the method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other sequences of steps are possible as will be appreciated by those of ordinary skill in the art. Accordingly, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Furthermore, the claims directed to the method and/or process should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the embodiments of the present disclosure.
The 1394 bus topology is shown in fig. 1. The bus topology comprises a Control Node (CC) and at least one Remote Node (RN). The CC node is used as a node controller of the 1394 bus and has the functions of cycle control, isochronous source management and bus management. The CC nodes send a Start of Frame (STOF) packet according to a period, and inform all nodes on the bus of starting a new Frame, and bus synchronization is completed through the STOF packet, wherein the period is a STOF period, and the period time can be set. The RN node is used as a remote node, and different node IDs and channel numbers are bound according to bus channel pre-allocation. After receiving the STOF packet, the RN node confirms the start of a new frame and sends data when the time offset of the RN node comes according to the pre-allocated time offset and bandwidth.
Fig. 2 is a timing chart of bus data transmission, as shown in fig. 2, after each RN node receives its own STOFn (n is greater than or equal to 1, representing node ID) packet, it starts to transmit data, and each node has its own time window for transmitting data, and is uniformly controlled by CC nodes. Each RN node sends data and replies with an acknowledgement character (ACK, acknowledge character) to the CC node.
If the RN node does not reply with an ACK to the CC node, the transmission loss is indicated. If transmission loss is not handled, the reliability of the bus transmission will be affected.
Aiming at the problem of transmission loss, the embodiment of the disclosure provides a bus data retransmission method, which is applied to a 1394 bus, wherein the 1394 bus comprises a CC node and at least one RN node, and the method is shown in fig. 3 and comprises the following steps:
step S101, in the STOF period, the CC node does not receive the ACK returned by at least one RN node, and determines that transmission loss occurs;
Step S102, the CC node informs the RN node which does not reply with ACK to retransmit data in a safe time, wherein the safe time is a time slice reserved in the STOF period and used for retransmitting the data.
In an exemplary embodiment of the present disclosure, the CC node in step S101 does not receive an ACK returned by at least one RN node, and determines that transmission loss occurs, including:
The CC node sends STOF to the RN node, and after receiving the STOF from the CC node in a time window corresponding to the RN node according to the time sequence, the RN node sends data to the node connected with the RN node and replies ACK to the CC node;
And the CC node does not receive the ACK returned by at least one RN node, and determines that transmission loss occurs.
In an exemplary embodiment of the present disclosure, the CC node of step S102 notifies the RN node that does not reply to the ACK to retransmit data in a secure time, including:
retransmitting STOF to at least one RN node which does not reply with ACK by the CC node in the safe time respectively, so that the at least one RN node retransmits data to the node connected with the at least one RN node;
the CC node receives an ACK replied by at least one RN node.
In an exemplary embodiment of the present disclosure, the 1394 bus topology includes three nodes, one CC node, two RN nodes (denoted as RN1 node and RN2 node). The STOF period is one second, the time window of the CC node for transmitting data is 0ms to 200ms and is marked as a first time window, the time window of the RN1 node for transmitting data is 200ms to 400ms and is marked as a second time window, the time window of the RN2 node for transmitting data is 400ms to 600ms and is marked as a third time window, and the safety time is 600ms to 1000ms and is marked as a fourth time window. As shown in fig. 4A, in the first time window, the CC node sends data to the RN1 node and the RN2 node, and the two RN nodes reply to the ACK after receiving the data. As shown in fig. 4B, in the second time window, after receiving the STOF1, the RN1 node sends data to the CC node and the RN2 node, respectively, and replies an ACK to the CC node. As shown in fig. 4C, in the third time window, the RN2 node receives the stop 2, then sends data to the RN1 node, and replies an ACK to the CC node. And if the CC node receives the ACK replied by the RN1 node and the RN2 node, the CC node does not need to retransmit the data in the safe time. After the end of the first STOF period, a second STOF period is started and the data transfer for the first to fourth time windows is repeated.
In an exemplary embodiment of the present disclosure, as shown in fig. 5A and 5B, the CC node does not receive the ACK of the RN2 node in the third time window in the second stop period, i.e., a transmission loss occurs. Then, the CC node retransmits the stop 2t (t represents a retransmitted stop 2) to the RN2 node in the safe time, and the RN2 node retransmits the data corresponding to the third time window after receiving the stop 2t, and replies an ACK to the CC node. And the CC node receives the ACK of the RN2, and the data retransmission is successful.
According to the embodiment of the disclosure, under the condition that the transmission of the 1394 bus is lost, the safe time is reserved in the STOF period, and the lost data is retransmitted in the safe time, so that the reliability of the transmission of the 1394 bus is improved through a retransmission mechanism.
In an exemplary embodiment of the present disclosure, after the CC node in step S102 notifies the RN node that does not reply to the ACK to retransmit the data in the secure time, the method further includes:
and the CC node does not receive the ACK replied by the RN node, and determines that the RN node fails.
In an exemplary embodiment of the present disclosure, after determining that the RN node fails, the method further includes.
For a failed RN node, the CC node no longer sends a stop to the RN node.
In an exemplary embodiment of the present disclosure, as shown in fig. 6, the CC node does not receive the ACK of the RN1 node in one stop period, and the RN1 node retransmits data in a safe time. After the RN1 node resends the data, if the CC node still does not receive the ACK of the RN1 node, the RN1 node is determined to be faulty and the RN1 node is isolated. The CC node no longer sends a stop to the RN1 node to isolate the RN1 node.
The embodiment of the disclosure determines an RN node which does not reply ACK yet during data retransmission as a fault node, and isolates the RN node which has faults under the condition that the RN node has faults. Therefore, the RN node which is faulty is processed in time, and the reliability of data transmission of the 1394 bus is further improved.
An embodiment of the present disclosure further provides a CC node, as shown in fig. 7, including:
the judging module is set to determine that transmission loss occurs based on the 1394 bus and in the STOF period, the CC node does not receive the ACK replied by at least one RN node;
The processing module is configured to notify the RN node which does not reply to the ACK to retransmit the data in a safety time, wherein the safety time is a time slice reserved in the STOF period and used for retransmitting the data.
In an exemplary embodiment of the present disclosure, the hardware circuits that may be employed by the CC node include, but are not limited to, an FPGA chip or an SOC chip.
In an exemplary embodiment of the present disclosure, the determining module is specifically configured to:
The CC node sends STOF to the RN node, and after receiving the STOF from the CC node in a time window corresponding to the RN node according to the time sequence, the RN node sends data to the node connected with the RN node and replies ACK to the CC node;
And the CC node does not receive the ACK returned by at least one RN node, and determines that transmission loss occurs.
In an exemplary embodiment of the present disclosure, the processing module is specifically configured to:
retransmitting STOF to at least one RN node which does not reply with ACK by the CC node in the safe time respectively, so that the at least one RN node retransmits data to the node connected with the at least one RN node;
the CC node receives an ACK replied by at least one RN node.
In an exemplary embodiment of the present disclosure, the node further comprises:
the fault diagnosis module is set to determine the fault of the RN node when the CC node does not receive the ACK replied by the RN node;
the fault processing module is configured to, for a failed RN node, prevent the CC node from sending a stop to the RN node.
According to the node disclosed by the embodiment of the disclosure, under the condition that transmission loss occurs, the safety time is reserved in the STOF period, and lost data is retransmitted in the safety time, so that the reliability of the data transmission of the node is improved.
An embodiment of the present disclosure further provides a method for processing a 1394 bus fault, where the 1394 bus includes a CC node and at least one RN node, and the method includes:
In the STOF period, the CC node does not receive the ACK returned by at least one RN node, and determines that transmission loss occurs;
the CC node informs the RN node which does not reply with the ACK to retransmit the data in the safe time, wherein the safe time is a time segment reserved in the STOF period and used for retransmitting the data;
the CC node does not receive the ACK replied by the RN node, and determines that the RN node fails;
in all N RN nodes of a bus, under the condition that at least M RN nodes are failed, determining that the bus is failed, wherein M is more than or equal to 1 and less than or equal to N;
resetting the bus with faults.
In an exemplary embodiment of the present disclosure, as shown in fig. 8, in the case where both the RN1 node and the RN2 node fail, it is determined that the bus fails. Resetting the failed bus.
In the case of a bus failure, the embodiment of the disclosure resets the failed bus. Therefore, the bus with faults is processed, and the reliability of data transmission of the 1394 bus is further improved.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components, for example, one physical component may have a plurality of functions, or one function or step may be cooperatively performed by several physical components. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.