How to arrange a time-sharing schedule

By synchronizing gate start timings using a timer and counter, the method addresses inaccuracies in TSN networks, ensuring precise and stable time-sharing schedules despite variations in crystal accuracy and CPU performance.

JP7732386B2Active Publication Date: 2025-09-02MEIDENSHA CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2022068625
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-10-20
Filing Date
2022-04-19
Publication Date
2025-09-02
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

Existing time-sharing schedules in TSN networks face inaccuracies due to variations in gate start timings between communication devices caused by differences in crystal accuracy and CPU performance, leading to potential packet loss and delays.

Method used

A method to synchronize time-sharing schedules across communication devices by calculating and adjusting the start timing of gates using a timer and counter, reducing variations by offsetting the gate start times based on precise time synchronization.

Benefits of technology

This approach enhances the accuracy of gate start timings, reducing variations and maintaining synchronized operations in TSN networks, even with changes in network configuration or route.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007732386000001
    Figure 0007732386000001
  • Figure 0007732386000002
    Figure 0007732386000002
  • Figure 0007732386000003
    Figure 0007732386000003
Patent Text Reader

Abstract

To provide a time-division schedule adjustment system / method and a communication device that adjust and synchronize the start timing of a time-division schedule set in a TSN hub and suppress variations in the start timing.SOLUTION: In a network N, TSN hubs 1 to 5 are equipped with a timer 'ToD' used in 'gPTP' time synchronization and a counter 'TC' which is not affected by time synchronization. The TSN hubs 1 to 5 acquire, from the timer, a time t1 when an arbitrary count number has passed since execution of the TSN time-division schedule. A gate start adjustment time b is calculated on the basis of the time t2+1 seconds=t3 obtained by calculating back the time corresponding to the count number from the time t1 and the start time t3 of the time-division schedule. When the gate start adjustment time b is greater than a preset execution threshold value a, the gate processing is started after waiting for the gate start adjustment time b at the start timing of the next time-division schedule.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a technique for adjusting a schedule in a time-shared network using TSN (Time Sensitive Networking). [Background technology]

[0002] TSN, described in Patent Document 1 and Non-Patent Document 1, is a network technology that enables interoperability between industrial networks and IT networks, which are extensions of standard Ethernet (registered trademark), and is composed of multiple standards such as "IEEE802.1AS" and "IEEE802.1Qbv."

[0003] (1) IEEE802.1AS The "IEEE802.1AS" standard is abbreviated as "gPTP." The time synchronization packets using this "gPTP" function are different from regular PTP time synchronization packets in that they are transmitted at the L2 layer and can only be used with the "PtoP (between adjacent devices)" transparency function.

[0004] (2) IEEE802.1Qbv The IEEE802.1Qbv time-aware scheduler divides communication on an Ethernet network into fixed-length, repeating time cycles, and configures time slices within these cycles that are assigned to one or more of eight Ethernet priorities (the "traffic scheduling" function).

[0005] This allows a traffic class that requires guaranteed transmission and cannot be interrupted to have exclusive use of the Ethernet transmission medium for a limited time.The basic concept is Time Division Multiple Access (TDMA), which allows time-critical communications to be separated from unimportant background traffic by establishing virtual communications channels for specific periods of time. [Prior art documents] [Patent documents]

[0006] [Patent Document 1] Patent Publication No. 2020-107943 [Non-patent literature]

[0007] [Non-Patent Document 1] “Overview and Implementation of TSN, Integrating IT and OT Networks”, [online], Retrieved March 3, 2021, Internet<URL:http:ednjapan.com / edn / arrticies / 1803 / 23 / news014.html> Summary of the Invention [Problem to be solved by the invention]

[0008] There are many cases where it is desirable to use traffic shedding using the traffic scheduling function of the aforementioned TSN "IEEE802.1Qbv" simultaneously on each communication device on the network.

[0009] In this case, time is synchronized between each communication device using TSN's "IEEE802.1AS (gPTP)," and then a gate is set on the target port of each communication device at the same time using "IEEE802.1Qbv" traffic sheeping.

[0010] That is, the level of packets that can pass through is set using "IEEE802.1Qbv" for the target port of each communication device, a time-sharing schedule is created for each level, and gate opening and closing settings (hereinafter referred to as gate settings) are made to operate the time-sharing schedule at a fixed cycle.

[0011] After that, as time passes, discrepancies will occur in the set gates and times between each communication device due to differences in crystal accuracy, etc., but the time on each communication device is corrected at regular intervals through the gPTP time synchronization process.

[0012] In this case, it would be possible to reset the gate at a fixed time in accordance with the time synchronization process, but in order to operate using the same time between each communication device, it is necessary to detect the target time and reset the gate after that detection.As a result, it is highly dependent on the CPU performance and processing status of the communication device, and there is a risk of non-negligible variations occurring between communication devices.This could have a negative impact on the accuracy of the gate start timing between communication devices.

[0013] The present invention has been made to solve these conventional problems, and its problem is to synchronize the start timing (gate opening and closing timing) of the time-sharing schedule set in each communication device on the network, thereby reducing the variation in that start timing. [Means for solving the problem]

[0014] (1) One aspect of the present invention is to synchronize time between communication devices on a network, A method for adjusting a time division schedule set for each level of packets that can pass through a target port of each of the communication devices, A gate that operates the time-sharing schedule for each level at a fixed cycle is set in the target port of each of the communication devices, Calculating an adjustment time for the start timing of the time-sharing schedule by repeatedly opening and closing the gate in synchronization with time; The start timing of the time-sharing schedule is offset in accordance with the calculated adjustment time.

[0015] (2) Another aspect of the present invention is a communication device that is arranged on a network in a time-synchronizable manner and has a time-sharing schedule set for each level of packets that can pass through a target port, The target port is set to open and close a gate that operates the time-sharing schedule for each level at a fixed cycle, Calculating an adjustment time for the start timing of the time-sharing schedule by repeatedly executing the gate opening / closing setting in synchronization with time synchronization; The start timing of the time-sharing schedule is offset in accordance with the calculated adjustment time.

[0016] (3) Yet another aspect of the present invention is to synchronize the time between communication devices on a network, A method for adjusting a time-sharing schedule, in which a gate opening / closing setting is made for a target port of each of the communication devices, which operates the time-sharing schedule for each level of packets that can pass through at a fixed cycle, the method comprising: a step of calculating an adjustment time for the start timing of the time-sharing schedule by repeatedly executing the gate opening / closing setting in synchronization with time; and a step of offsetting the start timing of the time-sharing schedule in accordance with the calculated adjustment time. [Effects of the Invention]

[0017] According to the present invention, the start timings of the time-sharing schedules set in the communication devices on the network can be synchronized, thereby reducing variations in the start timings. [Brief explanation of the drawings]

[0018] [Figure 1] FIG. 1 is a configuration diagram showing an example of a network according to a first embodiment. [Figure 2] A flow diagram showing gate settings for each TSN hub. [Figure 3] FIG. 3 is a sequence diagram showing details of S04 to S07 in FIG. [Figure 4] 1A is a sequence diagram showing steps S04 to S07 of the operational process of the first embodiment, and FIG. 1B is an explanatory diagram showing steps S08 and S09 of the same. [Figure 5] FIG. 10 is a configuration diagram showing an example of a network according to a second embodiment. [Figure 6] FIG. 1 is a schematic diagram of an example of gate opening and closing according to a time-sharing schedule in the first embodiment. [Figure 7] FIG. 1 is a sequence diagram showing time synchronization and gate synchronization in Patent Document 1. [Figure 8]FIG. 10 is a schematic diagram showing an example of gate opening and closing according to a time-sharing schedule in the second embodiment. [Figure 9] A sequence diagram showing time synchronization and synchronization with the gate. [Figure 10] Other network diagrams. [Figure 11] FIG. 10 is an explanatory diagram showing gate correction of an edge-side port using an edge-side correction packet. [Figure 12] FIG. 10 is an explanatory diagram showing gate correction of a main-side port by a main-side correction packet. [Figure 13] 10 is a flowchart showing the overall process of gate correction according to the second embodiment. [Figure 14] 14 is a flowchart showing details of S27 in FIG. 13. [Figure 15] 14 is a flowchart showing details of S24 in FIG. 13. [Figure 16] 14 is a flowchart showing details of S26 in FIG. 13. DETAILED DESCRIPTION OF THE INVENTION

[0019] The following describes a time-sharing schedule adjustment method according to an embodiment of the present invention. Here, a TSN-compatible Layer 2 (L2) switching hub (hereinafter referred to as a TSN hub) is used as an example of a communication device to which the present invention is applied.

[0020] The TSN hub is equipped with the IEEE802.1AS gPTP function and the IEEE802.1Qbv traffic scheduling function, which allows time synchronization between TSN hubs and a time-sharing schedule to ensure priority packets are sent without delay.

[0021] In other words, it is assumed that the TNS hubs placed on the network are time-synchronized using the "gPTP" function, and enables highly accurate gate setting using time synchronization. Details will be explained below based on Examples 1 and 2. [Example]

[0022] A first embodiment will be described with reference to Figures 1 to 4. A TSN hub can be used in a state where it is connected to a bus-type, ring-type, or even more complex network. In this embodiment, the network N shown in Figure 1 is assumed as an example.

[0023] Network N is made up of TSN hubs 1 to 5. Here, TSN hubs 1 to 5 are capable of time synchronization using the "gPTP" function, and gates are set for each packet transmission direction A to D using the traffic scheduling function for "gPTP" ports 1a to 5b, which require a time-sharing schedule.

[0024] For example, TSN hubs 1 and 3 have gates set at "gPTP" ports 1a and 3a for packets sent in transmission direction A, and gates set at "gPTP" ports 1b and 3b for packets sent in transmission direction B.

[0025] The TSN hubs 4 and 5 have gates set at "gPTP" ports 4a and 5a for packets sent in the sending direction C, and gates set at "gPTP" ports 4b and 5b for packets sent in the sending direction D.

[0026] In the TSN hub 2, a gate is set at "gPTP" port 2a for outgoing packets in transmission direction A, a gate is set at "gPTP" port 2b for outgoing packets in transmission direction B, a gate is set at "gPTP" port 2c for outgoing packets in transmission direction C, and a gate is set at "gPTP" port 2d for outgoing packets in transmission direction D.

[0027] These TSN hubs 1 to 5 are equipped inside with a timer (capable of expressing up to nanoseconds) used for "gPTP" time synchronization and a counter with an order of "nsec (cycle)" per count. The gate start adjustment time is calculated using this timer and counter, and the start timing of the next gate (start timing of the operating cycle of the time-sharing schedule) is set based on the calculated gate start adjustment time. Below, the timer is referred to as "ToD" and the counter as "TC", and the gate setting details are explained.

[0028] <Gate setting processing details> 2 and 3, the gate setting processing steps (S01 to S09) in TSN hubs 1 to 5 will be described. Here, it is assumed that the "gPTP" function and traffic scheduling function of TSN hubs 1 to 5 are operating normally.

[0029] S01: When processing begins, TSN Hubs 1 to 5 check their own port status and obtain information about ports that require gate configuration. For example, TSN Hub 2 obtains information about "gPTP" ports 2a to 2d.

[0030] S02: Select the target port for gate setting based on the port information obtained in S01. For example, for TSN hub 2, "gPTP" ports 2a → 2d are selected in that order.

[0031] S03: Check whether gate settings are complete for all target ports selected in S02 (for example, "gPTP" ports 2a to 2d for TSN hub 2). If the check results show that the settings are complete, the process ends. If the settings are not complete, proceed to S04.

[0032] S04: To measure the start timing of gate processing (gate opening and closing), period measurement is performed using "TC", which is not affected by time synchronization using the "gPTP" function.

[0033] Here, as shown in Figure 3, when the "TC" period measurement is "0 (nsec)", that is, when it is "TC0 (nsec)", gate processing starts (gate starts). For example, if the "gPTP" port 2a of TSN hub 2 is the target port, gate processing of said port 2a starts at "TC0 (nsec)".

[0034] S05: When "TC" has passed "any count number x T (nsec)", that is, after "TC1 = T (nsec)", collect the "ToD" time "t1 = HH:MM:SS.zzzzzzzzz" which is synchronized with "gPTP" time (see Figure 3).

[0035] S06: Calculate backward from the time "t1" collected in S05 to the gate start time of S04, that is, the time "t2" of "ToD" at "TC0 (nsec)".

[0036] Explaining this in detail based on Figure 3, first, to calculate the difference between the TCs, the calculation "TC1 - TC0" is performed (S06-1). Next, the calculation result of S06-1 is subtracted from "t1" collected in S05 (S06-2), and the time "t2 = HH:MM:SS.yyyyyyyyy" is calculated (estimated).

[0037] S07: Calculate the gate start adjustment time based on the time "t2" calculated in S06-1. At this time, the time "t3" is defined as in equation (1). Formula (1): Time "t3" = Gate start time (start of gate opening / closing) "t2" + 1 second = HH:MM:SS + 1.000000000 Then, by subtracting time "t2" from time "t3", the difference between "t2" and "t3", that is, the "difference data (nsec)" is obtained (S07-1). The "difference data (nsec)" is then divided by the gate period (1 msec) to obtain the remainder (S07-2). This remainder is set as the gate start adjustment time b (nsec).

[0038] S08: Compare the gate start adjustment time b (nsec) of S07 with the preset execution threshold a (nsec). If the comparison result shows that the gate start adjustment time b (nsec) is greater than the threshold a, proceed to S09; if not, end the process.

[0039] S09: At the next gate start timing, adjust the setting to start gate processing after waiting for gate start adjustment time b (nsec). Here, the gate is assumed to have a function to set gate start adjustment time b (nsec), and the processing ends after the setting.

[0040] <<Example of operation processing>> An example of operation processing will be explained based on Figure 4. Here, a 125MHz 32-bit counter [1 count = 8nsec (1000000000 / 125000000)] is used as "TC", and the gate period is "1msec" as before.

[0041] (1) S04~S07 An example of the operation process from S04 to S07 will be explained with reference to Fig. 4(a). Here, the gate start of S04 is performed when "TC0=5 counts x 8 nsec=40 (nsec)".

[0042] In addition, when "TC1=1255 count x 8nsec=10040(nsec)", "time t1=10:20:30.759004560" of S05 is collected.

[0043] In calculating the gate start adjustment time b (nsec) (S07), the time "t2" in S06 is calculated backward in advance. That is, the difference in TC "10040-40=10000nsec" is calculated (S06-1). Also, the difference in TC "10000nsec" is subtracted from "time t1=10:20:30.759004560" in S05 to calculate "time t2=10:20:30:758994560" (S06-2).

[0044] Then, the gate start adjustment time b (nsec) is calculated based on "time t2 = 10:20:30:758994560". At this time, the time "t3 = 10:20:31.00000000" is defined according to equation (1). Also, as shown in equation (2) in Figure 4(a), "difference data (nsec) = 241005440 (nsec)" is calculated (S07-1).

[0045] The calculated "difference data (nsec)" is divided by the gate period (1 msec = 1,000,000 nsec) as shown in equation (3) in Figure 4(a). The remainder is used to calculate the "gate start adjustment time b (nsec) = 5,440 (nsec)" (S07-2).

[0046] (2) S08, S09 An example of the operation process in S08 and S09 will be described with reference to Fig. 4(b). Here, the calculated gate start adjustment time b "5440 (nsec)" is compared with the execution threshold value a (nsec) (S08).

[0047] At this time, as shown by arrow P, if "execution threshold a (nsec) = 10000 (nsec)", gate start adjustment is not performed. On the other hand, as shown by arrow Q, if "execution threshold a (nsec) = 5000 (nsec)", as shown in S09, at the next gate start timing, the gate process is started after waiting for the gate start adjustment time of "5440 (nsec)". This provides the following effects A to C.

[0048] A: As shown in S09, the gate start timing set in TSN hubs 1 to 5 is adjusted in advance according to the gate start adjustment time b (nsec). This synchronizes the gate start times between TSN hubs 1 to 5, making it possible to suppress variations.

[0049] In this case, as mentioned above, the process of obtaining the ToD time used in "gPTP" time synchronization places a load on the CPU, but this process is limited to S05, and the CPU load is reduced by using "TC" for other counts. In this respect, the impact on the accuracy of time synchronization is reduced, and the accuracy of time synchronization is improved.

[0050] B: As shown in S08, the gate start adjustment time b (nsec) is used to adjust the start timing of gate processing when it is greater than the execution threshold a (nsec). By setting the execution threshold a (nsec) for the gate start adjustment time b (nsec) in this way, it becomes possible to synchronize the gate processing between TSN hubs 1 to 5 with greater than expected accuracy.

[0051] C: In Patent Document 1, the time-sharing schedule is adjusted by offsetting it according to the distance between TSN hubs. Here, a probe packet is sent from a TSN hub at the end of the network, and the offset value is adjusted according to the reception timing of the probe packet from other TSN hubs.

[0052] Therefore, by applying the offset value of Patent Document 1 to the gate start adjustment time b (nsec), it becomes possible to set a gate that further takes into account the delay of packets between TSN hubs. [Example]

[0053] Example 2 will be described with reference to Figures 5 to 16. In this example, "IEEE802.1AS" of the TSN hub is used to synchronize "IEEE802.1Qbv" between TSN hubs with high accuracy, and further, compensation for delay due to the distance between the server and client devices via the TSN hub is applied to "IEEE802.1Qbv."

[0054] As mentioned above, the TSN hub has the functions of "IEEE802.1AS (time synchronization)" and "IEEE802.1Qbv (time sharing schedule)." For example, consider the network example shown in Figure 5.

[0055] In Figure 5, 1 to 3 indicate TSN hubs (hereafter referred to as Hubs 1 to 3), and servers and terminal devices are connected via Hubs 1 to 3. Although only one terminal device is shown in Figure 5, multiple terminal devices may be connected, and information (status, audio, images, etc.) is periodically transferred from the terminal device to the server in response to a request from the server. The information sent from this terminal device ranges from important information that must not be lost to image information that does not cause a problem depending on the situation.

[0056] Conventionally, when hubs 1 to 3 are time-synchronized and time-divided at the same timing, as shown in Figure 7, packets sent from TSN hub 1 arrive late due to transmission delays before they reach TSN hubs 2 and 3. This causes the gate opening and closing timing to not match, resulting in packets being sent later than expected, and in the worst case scenario, packets may be lost.

[0057] Therefore, Patent Document 1 proposes a method of offsetting the time-division schedule by the transmission delay. This offset enables TSN to operate in long-distance systems by opening and closing gates at timings delayed by the transmission delay.

[0058] However, if the network configuration or route changes due to functions such as STP (Spanning Tree Protocol) / RSTP (Rapid Spanning Tree Protocol), the transmission delay also changes, so the offset value must also be changed.

[0059] However, since the time synchronization packet has a transmission delay and travels back and forth, it takes time to calculate the offset value, which may cause processing delays. To solve this problem, this embodiment proposes a method that makes it possible to easily obtain the offset value of the time-sharing schedule.

[0060] <<Operation / Processing Details>> The operation and processing of this embodiment will be described with reference to Figures 5 to 8. Here, the TSN hub to which a server or the like is connected is called the main hub, and the TSN hub at the end of the network is called the edge hub. According to the network configuration of Figure 5, Hub 1 represents the main hub, and Hub 3 represents the edge hub.

[0061] (1) Basic Concept 6 shows gate settings (examples of gate opening and closing settings) of a time-sharing schedule set on the TSN-enabled ports (synonymous with the "gPTP" ports in Example 1: hereinafter referred to as TSN ports) of each of hubs 1 to 3, and the types and passing times of packets to be passed are set for each of intervals A to E. In Example 1, the gate settings are repeatedly executed in synchronization with the time.

[0062] As shown in Figure 6, Hubs 1 to 3 have the function of time synchronization and the function of synchronizing time synchronization with gates, and the gates of Hubs 1 to 3 are the backbone of the network set in the TSN ports. Gates are opened and closed by packet transmission, and as shown in Figure 7, gates 1 and 3 are used for packet transmission from Hub 1 to Hub 3, and gates 2 and 4 are used for packet transmission from Hub 3 to Hub 1.

[0063] In this case, if each gate opens and closes at the same time due to time synchronization, the packets will arrive late due to the transmission distance, and there is a risk that the time-sharing schedule will not be maintained. For example, in Figure 7, when a packet is sent from Hub 1 to Hub 3, a transmission delay occurs at times B and C.

[0064] As mentioned above, in Patent Document 1, the time-division schedule is offset in consideration of such transmission delays. Although this method enables operation according to the transmission delays of long-distance systems, there are cases where the offset cannot be calculated in a short time when the network configuration or route changes.

[0065] Therefore, in this embodiment, a correction packet period is added to the beginning of the gate setting, and the time-sharing schedule is offset according to the passage time of the correction packet, as shown in Fig. 8. This correction packet is transmitted with the gate open only during the correction packet period of the time-sharing schedule at the main hub (hub 1) and edge hub (hub 3).

[0066] As a result, correction packets are sent from Hubs 1 and 3 according to the time synchronization and time sharing schedule. Meanwhile, Hub 2, which is located in the middle, can forward packets at any time, so it also performs simple forwarding processing for correction packets. Note that the gate interval S in Figure 8 is set to allow only one packet (correction packet) to pass through.

[0067] In this case, even if the network configuration or route changes, time synchronization is maintained, but the transmission delay time changes depending on the transmission route. Therefore, Hub 2 receives the correction packet from a different port than before, and if the reception timing can be obtained, it can calculate the transmission delay and apply a new offset.

[0068] In this respect, there is no need to wait for packets to travel back and forth due to time synchronization as in Patent Document 1, and the offset can be calculated in a short time even if the network configuration or route changes.

[0069] The correction packet sent from the main hub (Hub 1) reaches the edge hub (Hub 3) and transfer ends. On the other hand, the correction packet sent from the edge hub (Hub 3) is terminated at the main hub (Hub 1) by functions such as an access list when it reaches the main hub. At this time, there may be multiple edge hubs depending on the network topology, and in such cases, multiple correction packets will merge at the main hub.

[0070] (2) Example of operation processing An example of operation processing will be explained based on Fig. 9. Here, as shown in Fig. 5, hubs 1 to 3 are connected via TSN ports, with hub 1, the main hub, serving as the grand master (GM) for time synchronization, and hubs 2 and 3 serving as slaves synchronized with hub 1. Therefore, the timer times (ToD times) of hubs 2 and 3 match the ToD time of hub 1 through time synchronization.

[0071] S11: First, Hub 1 transmits a correction packet (1581 bytes) to Hub 3 from its own TSN port at ToD time (XX hour ZZ minute 00.000000000 seconds) with the gate open for the correction packet period.

[0072] Here, it is assumed that the gate function of Hub 1 can determine the transmission time as "00.000000000 seconds", the correction packet transmitted from Hub 1 is called Correction Packet 1, the ToD time when Correction Packet 1 is transmitted is called ToD Time A, and Correction Packet 1 is transmitted including ToD Time A. Note that the size of the correction packet is not limited to "1581 bytes" and may be other sizes.

[0073] S12, S13: Correction packet 1 sent by hub 1 is received by hub 2 and transferred to hub 3 (S12). That is, since the gate is always open during the period of the correction packet of hub 2, it is transferred by store-and-forward word.

[0074] At this time, Hub 2 can obtain the timing at which Correction Packet 1 was received, and therefore can obtain the transmission delay from the difference with the timer time (ToD time) of Hub 2 and use this as the offset value.

[0075] Here, the ToD time at which correction packet 1 collected by Hub 2 is received is defined as ToD time B (XX hours, ZZ minutes, 00.0000yyyyy seconds), and the time it takes for correction packet 1 to arrive at Hub 2's TSN port and for ToD time B to be collected is defined as "t1."

[0076] In this case, the transit time B from Hub 1 to Hub 2 is calculated by subtracting ToD time A and "t1" from ToD time B, as shown in equation (4) in Figure 9. Since transit time B calculated by equation (4) is equal to the delay time of the packet from Hub 1 to Hub 2, transit time B is added as the gate correction time when synchronizing the ToD time of the next Hub 2 with Gate 3 (edge-side port) (S13). This enables accurate gate setting.

[0077] Correction Packet 1 is then received by Hub 3. Hub 3 is an edge hub, so there is no need to calculate the transmission delay.

[0078] S14 to S16: Next, Hub 3 opens the gate for the correction packet period at ToD time (XX hour ZZ minute 00.00a000000 seconds) from its own TSN port and transmits the correction packet (1581 bytes) to Hub 1 (S14).

[0079] Here, the gate function of Hub 3 is assumed to be able to determine the transmission time as "00.00000000 seconds", the correction packet sent from Hub 3 is called Correction Packet 2, the ToD time at which Correction Packet 2 is sent is called ToD Time C, and Correction Packet 2 is sent including ToD Time C.

[0080] Correction packet 2 sent by Hub C is received by Hub 2 and forwarded to Hub 1 (S15), where the same process as S13 is executed. Here, the ToD time at which correction packet 2 collected by Hub 2 is received is defined as ToD time B' (XX hours, ZZ minutes, 00.00a0zzzzz seconds), and the time taken from when correction packet 2 arrives at the TSN port of Hub 2 until ToD time B' is collected is defined as "t2."

[0081] In this case, the transit time B' from hub 3 to hub 2 is calculated using equation (5) in Figure 9, and transit time B' is added as a gate correction time when synchronizing the ToD time of the next hub 2 with gate 2 (main side port) (S16).

[0082] (4) Other operation processing examples Another example of operation processing will be described with reference to Figures 10 to 12. Figure 10 shows another example of a network configuration. Here, hub 1 corresponds to the main hub, hubs 5, 7, and 8 correspond to edge hubs, gates 2, 4, 6, 8, 9, 10, and 12 indicate gates of main-side ports, and gates 1, 3, 5, 7, and 11 indicate gates of edge-side ports.

[0083] As shown in Figure 11, Hub 1 transmits an edge-side correction packet (corresponding to the above-mentioned correction packet 1) to Hubs 5, 7, and 8. This edge-side correction packet is sequentially forwarded by Hubs 2 to 4 and 6. At this time, the transit times of Hubs 2 to 4 and 6 are added to the gates 1, 3, 5, 7, and 11, and gate correction of the edge-side port is performed.

[0084] 12, hubs 5, 7, and 8 transmit main-side correction packets (corresponding to the above-mentioned correction packet 2) to hub 1. These main-side correction packets are transferred by hubs 2 to 4 and 6 in sequence.

[0085] In this case, the corrections for main side gates 4 and 10 of hubs 3 and 6 overlap for hub 2, and the corrections for main side gates 8 and 9 of hubs 5 and 7 overlap for hub 4. When the gate correction paths for the main side ports overlap in this way, the longer transit time is used as the offset value.

[0086] <<Detailed processing content>> The detailed processing of gate correction will be explained with reference to Fig. 13. Here, it is assumed that the following data is input in advance by command and written to the gate correction information file. Edge Delay Number Main Flag Edge Flag The number of the TSN port on which TSN operates (hereafter referred to as the TSN port number). S21: At the start of processing, the gate correction information file is read. As a result, the edge delay number, main flag, edge flag, and TSN port number are set as internal data in the TSN hub. Note that the main flag is set in the main hub, while the edge flag is set in the edge hub.

[0087] S22 to S27: A gate for gate correction packets is set for the TSN port (S22). After that, it is checked whether an edge side correction packet has been received (S23). If the result of the check is that an edge side correction packet has been received, the process proceeds to S24, which is processing when an edge side correction packet is received.

[0088] If not received, proceed to S25. In S25, it is confirmed whether or not a main side correction packet has been received. If the confirmation result shows that a main side correction packet has been received, proceed to S26, which is processing when a main side correction packet is received. On the other hand, if not received, proceed to S27, which is processing when a gate correction packet is transmitted.

[0089] (1) Details of gate correction packet transmission processing The gate correction packet transmission process in S27 will be described in detail with reference to Fig. 14. Here, the processing content differs between the main hub and the edge hub.

[0090] S31: When processing begins, it is confirmed whether the device itself is the main hub. This confirmation is performed by checking whether the main flag is set or not. If the main flag is set, it corresponds to the main flag, and processing proceeds to S32 and subsequent steps. On the other hand, if the main flag is not set, it does not correspond to the main hub, and processing proceeds to S36 and subsequent steps.

[0091] S32 to S35: The time of time synchronization (ToD time) is acquired from the timer (S32). The remaining time from the acquired ToD time to the next second is calculated (S33), and it is confirmed whether the calculated remaining time is equal to or less than the gate period (S34).

[0092] If the result of the check is that it is not equal to or less than the gate period, the process ends. On the other hand, if it is equal to or less than the gate period, the edge side correction packet is transmitted from the TSN port of the TSN port number read in S21 (S35), and the process ends.

[0093] S36: It is confirmed whether the device itself is an edge hub. This confirmation is performed by checking whether the edge flag is set or not. If the edge flag is not set, the process ends, but if it is set, the process proceeds to S37 and subsequent steps.

[0094] S37-S42: It is confirmed whether the main side correction packet has been received (S37). This confirmation is made by checking whether the reception flag of the main side correction packet is set (S38). If this reception flag is not set, the main side correction packet has not been received, so the process ends. On the other hand, if the reception flag is set, the main side correction packet has been received, so the process proceeds to S39.

[0095] In S39, the edge delay time (edge ​​delay number x gate period) is set in the wait timer to avoid collision of edge side correction packets. After that, it is confirmed whether the delay time set in S39 has elapsed (S40).

[0096] If the time has not elapsed as a result of the check, the process is terminated, but if the time has elapsed, the main side correction packet is sent from the TSN port of the TSN port number read in S21 (S41). After this transmission, the reception completion flag of the edge side correction packet is cleared (S42), and the process is terminated.

[0097] (2) Details of edge-side correction packet reception processing The process of receiving the edge side correction packet in S24 will be described in detail with reference to FIG.

[0098] S51: When the process starts, it is checked whether the device itself is the main hub. This is checked by checking whether the main flag is set or not. If the main flag is set, the process ends, but if the main flag is not set, the process proceeds to S52.

[0099] S52: It is confirmed whether the device itself corresponds to an edge hub. This confirmation is performed by checking whether the edge flag is set or not. If the edge flag is set, the received flag of the edge side correction packet is set (S59) and the process ends. On the other hand, if the edge flag is not set, the process proceeds to S53 and subsequent steps.

[0100] S53 to S58: First, the receiving port of the edge-side correction packet is saved as the sending port of the main-side correction packet (S53). Next, the time of time synchronization (ToD time) is obtained from the timer (S54), and the timestamp function of the time synchronization is used to obtain the elapsed time "t1" from the port reception of the edge-side correction packet (S55).

[0101] After obtaining this elapsed time "t1", the gate correction time is calculated using equation (4) (S56). Also, based on the edge-side port number and the TSN port number, information on the edge-side ports other than the port that received the edge-side correction packet is obtained (S57).

[0102] The TSN port of the information obtained here is called the gate correction port. For this correction port, the gate correction time is added to the next gate tuning (S58), and then the process ends.

[0103] (3) Details of the main side correction packet reception process The main-side correction packet reception process in S26 will be described in detail with reference to FIG.

[0104] S61: When the process starts, it is checked whether the device itself is the main hub. This is checked by checking whether the main flag is set or not. If the main flag is set, the process ends, but if the main flag is not set, the process proceeds to S62.

[0105] S62: It is confirmed whether the device itself corresponds to an edge hub. This confirmation is performed by checking whether the edge flag is set or not. If the edge flag is set, the process ends, but if it is not set, the process proceeds to S63 and subsequent steps.

[0106] S63 to S66: First, the time of time synchronization (ToD time) is obtained from the timer (S63), and the time stamp function of the time synchronization is used to obtain the elapsed time "t2" from the port reception of the main side correction packet (S64).

[0107] After obtaining this elapsed time "t2", the gate correction time is calculated using equation (5) (S65). Also, the main side port number is obtained and the gate correction time is added at the next gate synchronization of the main side port (S66), after which the process ends.

[0108] According to this embodiment, when calculating the offset value of the time-sharing schedule, "t1" and "t2" can be acquired from the time stamp function, and therefore calculation can be easily performed using equations (4) and (5).

[0109] In particular, if the time synchronization is already in place, even if the network shape or route changes due to functions such as STP / RSTP, the offset value of the time-sharing schedule can be calculated in a short time by simply obtaining the timing of receiving the correction packet.

[0110] In addition, it is possible to calculate efficient offset values ​​when collecting data from servers, etc., even in complex network configurations, without being affected by factors such as the shape of the network or the number of TSN hubs.

[0111] For example, even with the network configuration in Figure 10, accurate gate correction is possible as shown in Figures 11 and 12. As a result, when a server is connected to the main hub (hub 1) and a terminal device is connected to the edge hubs (hubs 5, 7, and 8), important packets can be transmitted without loss while a certain amount of other packets transmitted between the server and terminal device are stably transferred.

[0112] Although gate setting of the time-sharing schedule is necessary in this embodiment, the offset value is automatically set even if the network configuration or route changes, so the setting work can be omitted. [Explanation of symbols]

[0113] 1~8...TSN Hub 1a~5b..."gPTP" ports A~D...Packet sending direction N...Network

Claims

1. Time synchronization between communication devices on the network A method for adjusting a time-sharing schedule for each level of packets that can pass through a target port of each communication device, in which a gate opening / closing setting is made to operate at a fixed cycle, and the time-sharing schedule is adjusted, a step of calculating an adjustment time for the start timing of the time-sharing schedule by repeatedly executing the gate opening and closing in synchronization with time; offsetting a start timing of the time-sharing schedule in accordance with the calculated adjustment time; and each of the communication devices includes a timer used in the time synchronization and a counter that is not affected by the time synchronization; acquiring from the timer a time when a given number of counts has elapsed since the execution of the time-sharing schedule; calculating the adjustment time based on a time obtained by calculating back a time corresponding to the count number from the acquired time and a start time of the time sharing schedule; A method for adjusting a time-sharing schedule, comprising:

2. When the counter is "0 (sec)", the time-sharing schedule is executed, The time is acquired after the count number has elapsed since the execution of the time-sharing schedule.

2. The method for adjusting a time-sharing schedule according to claim 1.

3. The adjustment time is A time obtained by adding an arbitrary number of seconds to the time obtained by the reverse calculation; A start time of the time-sharing schedule; is the remainder obtained by dividing the difference by the period of the time-sharing schedule.

3. The method for adjusting a time-sharing schedule according to claim 1 or 2.

4. comparing the adjustment time to a predetermined execution threshold; If the comparison result shows that the adjustment time is greater than the predetermined time, the start of the next time-sharing schedule is delayed by the adjustment time.

3. The method for adjusting a time-sharing schedule according to claim 1 or 2.

5. Time synchronization between communication devices on the network A method for adjusting a time-sharing schedule for each level of packets that can pass through a target port of each communication device, in which a gate opening / closing setting is made to operate at a fixed cycle, and the time-sharing schedule is adjusted, a step of calculating an adjustment time for the start timing of the time-sharing schedule by repeatedly executing the gate opening and closing in synchronization with time; offsetting a start timing of the time-sharing schedule in accordance with the calculated adjustment time; and In the setting of opening and closing the gate, The type of packet you want to pass and the time it takes to pass are set for each gate interval. a period of a correction packet is added to the beginning of the gate interval; calculating a correction time corresponding to a transmission delay by transferring the correction packet to each of the communication devices; The calculated correction time is used as the adjustment time, The correction packet is sent to a main communication device that is assumed to be connected to a server in the network, the communication device at the end of the network; While sent from The data is sequentially transferred by the intermediate communication device disposed between the main and the other than the terminal, The intermediate communication device A timer time when the correction packet is collected; The time it takes for the correction packet to arrive at the target port and collect the timer time; Calculate the transmission delay time based on The method for adjusting a time-sharing schedule according to claim 1, wherein the transmission delay time is calculated as the correction time.

Citation Information

Patent Citations

  • Systems and methods for blocking transmission of frames in network devices

    JP2017521914A

  • Time division schedule adjusting method

    JP2020107943A

  • TSN network connection system and TSN network connection method

    JP2021136520A

  • Wireless communication device, wireless communication system, and transmission timing adjustment method

    WO2018167984A1

  • Scheduling data traffic in wireless time sensitive networks

    WO2021192603A1