[go: up one dir, main page]

JP7732386B2 - How to arrange a time-sharing schedule - Google Patents

How to arrange a time-sharing schedule

Info

Publication number
JP7732386B2
JP7732386B2 JP2022068625A JP2022068625A JP7732386B2 JP 7732386 B2 JP7732386 B2 JP 7732386B2 JP 2022068625 A JP2022068625 A JP 2022068625A JP 2022068625 A JP2022068625 A JP 2022068625A JP 7732386 B2 JP7732386 B2 JP 7732386B2
Authority
JP
Japan
Prior art keywords
time
gate
hub
sharing schedule
schedule
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2022068625A
Other languages
Japanese (ja)
Other versions
JP2023061877A (en
Inventor
昌明 田島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Meidensha Corp
Original Assignee
Meidensha Corp
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 Meidensha Corp filed Critical Meidensha Corp
Publication of JP2023061877A publication Critical patent/JP2023061877A/en
Application granted granted Critical
Publication of JP7732386B2 publication Critical patent/JP7732386B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Description

本発明は、TSN(Time Sensitive Networking)により時分割されたネットワークのスケジュールを調整する技術に関する。 The present invention relates to technology for adjusting schedules in time-division networks using TSN (Time Sensitive Networking).

特許文献1および非特許文献1に記載されたTSNは、標準のイーサネット(登録商標)を拡張する産業用ネットワークとITネットワークとを相互運用するネットとワーク技術であって、「IEEE802.1AS」や「IEEE802.1Qbv」など複数の規格から構成されている。 TSN, described in Patent Document 1 and Non-Patent Document 1, is a network technology that extends standard Ethernet (registered trademark) to enable interoperability between industrial networks and IT networks, and is composed of multiple standards such as "IEEE802.1AS" and "IEEE802.1Qbv."

(1)IEEE802.1AS
「IEEE802.1AS」規格は「gPTP」と略称される。この「gPTP」機能による時刻同期パケットはL2層で、かつ「PtoP(隣接する機器同士)」透過機能のみしか使用することができない点で通常のPTP時刻同期パケットと相違する。
(1) IEEE802.1AS
The "IEEE 802.1AS" standard is abbreviated as "gPTP." Time synchronization packets using this "gPTP" function differ 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.

(2)IEEE802.1Qbv
「IEEE802.1Qbv」の時刻対応スケジューラは、イーサネットネットワーク上の通信を固定長に分割し、時間サイクルを繰り返す。これらのサイクル内で8個のイーサネット優先順位のうち1つまたは複数に割り当てるタイムスライスを構成する(「トラフィックスケジューリング」機能)。
(2) IEEE802.1Qbv
The IEEE 802.1Qbv time-aware scheduler divides communications on an Ethernet network into fixed-length, repeating time cycles, and within these cycles configures time slices that are assigned to one or more of eight Ethernet priorities (the "traffic scheduling" function).

これにより伝送保障が必要で中断できないトラフィッククラスのイーサネット伝送媒体に対して限られた時間内で排他的な使用を許可することが可能となる。これは基本的な概念を時分割多元接続(TDMA)であり、特定の期間に仮想通信チャンネルを確立することによりタイムクリティカルな通信を重要でないバックグランドトラフィックから分離することができる。 This allows traffic classes that require guaranteed transmission and cannot be interrupted to be granted exclusive use of the Ethernet transmission medium for limited periods of 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.

特開2020-107943Patent Publication No. 2020-107943

“ITとOTネットワークを融合する「TSN」の概要と実装”,[online],令和3年3月3日検索,インターネット<URL:http:ednjapan.com/edn/arrticies/1803/23/news014.html>“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>

前述したTSNの「IEEE802.1Qbv」のトラフィックスケジューリング機能によるトラフィックシーピングをネットワーク上の各通信装置で同時に使用したい場合が少なくない。 There are many cases where it is desirable to simultaneously use traffic shedding using the traffic scheduling function of the aforementioned TSN's "IEEE 802.1Qbv" on each communication device on the network.

この場合には、TSNの「IEEE802.1AS(gPTP)」を使用して各通信装置間で時刻同期した後、同一時刻に「IEEE802.1Qbv」のトラフィックシーピングを使って各通信装置の対象ポートにゲートを設定する。 In this case, time is synchronized between each communication device using TSN's "IEEE 802.1AS (gPTP)," and then gates are set on the target ports of each communication device at the same time using "IEEE 802.1Qbv" traffic sheeping.

すなわち、各通信装置の対象ポートに「IEEE802.1Qbv」を使用して通過可能なパケットのレベルを設定し、そのレベル毎に時分割スケジュールを組み、その時分割されたスケジュールを一定の周期で動作させるゲート開閉の設定(以下、ゲート設定とする。)を行う。 In other words, 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 this time-sharing schedule at regular intervals.

その後、時間の経過とともに各通信装置間は水晶精度の違いなどにより設定したゲートや時刻にずれが発生するものの、各通信装置の時刻は「gPTP」の時刻同期処理により一定周期で補正される。 After that, as time passes, differences in the gates and times set between each communication device will occur due to differences in crystal accuracy, etc., but the time on each communication device will be corrected at regular intervals through the "gPTP" time synchronization process.

このとき時刻同期処理に合わせて一定の時刻でゲートも再設定すればよいが、各通信装置間で同一時刻を使って動作させるためには対象時刻の検出と該検出後のゲート再設定が必要となる。そのため、通信装置のCPU性能や処理状況への依存度が大きく、通信装置間で無視できないバラツキが発生するおそれがある。これでは通信装置間のゲート開始タイミングの精度に悪影響を与えるおそれがある。 In this case, it would be possible to reset the gate at a fixed time in line with the time synchronization process, but in order for each communication device to operate using the same time, it is necessary to detect the target time and reset the gate after that detection. As a result, there is a high degree of dependency 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 gate start timing between communication devices.

本発明は、このような従来の問題を解決するためになされ、ネットワーク上の各通信装置に設定された時分割スケジュールの開始タイミング(ゲート開閉のタイミング)を同調させ、その開始タイミングのバラツキを抑えることを解決課題としている。 The present invention was made to solve these conventional problems, and its goal is to synchronize the start timing (gate opening and closing timing) of the time-sharing schedule set for each communication device on the network, thereby reducing variation in that start timing.

(1)本発明の一態様は、ネットワーク上の通信装置間で時刻同期させ、
前記各通信装置の対象ポートを通過可能なパケットのレベルごとに設定された時分割スケジュールを調整する方式であって、
前記各通信装置の前記対象ポートには、前記レベル毎の前記時分割スケジュールを一定の周期で動作させるゲートの設定がなされ、
前記ゲートの開閉を時刻同期と同調させた状態で繰り返し実行することで前記時分割スケジュールの開始タイミングの調整時間を算出し、
前記算出された調整時間に応じて前記時分割スケジュールの開始タイミングをオフセットすることを特徴としている。
(1) One aspect of the present invention is a method for synchronizing 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.

(2)本発明の他の態様は、ネットワーク上に時刻同期可能に配置され、対象ポートを通過可能なパケットのレベルごとに時分割スケジュールが設定された通信装置であって、
前記対象ポートには、前記レベル毎の前記時分割スケジュールを一定の周期で動作させるゲート開閉の設定がなされ、
前記ゲート開閉の設定を時刻同期と同調させた状態で繰り返し実行することで前記時分割スケジュールの開始タイミングの調整時間を算出し、
前記算出された調整時間に応じて前記時分割スケジュールの開始タイミングをオフセットすることを特徴としている。
(2) Another aspect of the present invention is a communication device that is arranged on a network in a time-synchronizable manner and in which a time-sharing schedule is 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.

(3)本発明のさらに他の態様は、ネットワーク上の通信装置間で時刻同期させ、
前記各通信装置の対象ポートには、通過可能なパケットのレベル毎の前記時分割スケジュールを一定の周期で動作させるゲート開閉の設定がなされ、前記時分割スケジュールを調整する方法であって、
前記ゲート開閉の設定を時刻同期と同調させた状態で繰り返し実行することで前記時分割スケジュールの開始タイミングの調整時間を算出するステップと、
前記算出された調整時間に応じて前記時分割スケジュールの開始タイミングをオフセットするステップと、を有することを特徴としている。
(3) Yet another aspect of the present invention is a method for synchronizing 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.

本発明によれば、ネットワーク上の各通信装置に設定された時分割スケジュールの開始タイミングを同調させ、その開始タイミングのバラツキを抑えることができる。 This invention synchronizes the start timing of the time-sharing schedules set for each communication device on the network, thereby reducing variations in the start timing.

実施例1のネットワーク例を示す構成図。FIG. 1 is a configuration diagram showing an example of a network according to a first embodiment. 同 各TSNハブのゲート設定を示すフロー図。This is a flow diagram showing gate settings for each TSN hub. 図2中のS04~S07の詳細を示すシーケンス図。FIG. 3 is a sequence diagram showing details of S04 to S07 in FIG. 2 . (a)は実施例1の動作処理を示すS04~S07を示すシーケンス図、(b)は同S08,S09を示す説明図。1A is a sequence diagram showing steps S04 to S07 of the operation process of the first embodiment, and FIG. 1B is an explanatory diagram showing steps S08 and S09 of the same. 実施例2のネットワーク例を示す構成図。FIG. 10 is a configuration diagram showing an example of a network according to a second embodiment. 実施例1の時分割スケジュールによるゲート開閉例の概要図。FIG. 10 is a schematic diagram of an example of gate opening and closing according to a time-sharing schedule in the first embodiment. 特許文献1における時刻同期とゲートとの同調を示すシーケンス図。FIG. 1 is a sequence diagram showing time synchronization and gate synchronization in Patent Document 1. 実施例2の時分割スケジュールによるゲート開閉例を示す概要図。FIG. 10 is a schematic diagram showing an example of gate opening and closing according to a time-sharing schedule in the second embodiment. 同 時刻同期とゲートとの同調を示すシーケンス図。A sequence diagram showing time synchronization and synchronization with the gate. 同 他のネットワーク図。Other network diagrams. エッジ側補正パケットによるエッジ側ポートのゲート補正を示す説明図。FIG. 10 is an explanatory diagram showing gate correction of an edge-side port using an edge-side correction packet. メイン側補正パケットによるメイン側ポートのゲート補正を示す説明図。FIG. 10 is an explanatory diagram showing gate correction of a main-side port by a main-side correction packet. 実施例2のゲート補正の全体処理を示すフローチャート。10 is a flowchart showing the overall process of gate correction according to the second embodiment. 図13中のS27の詳細を示すフローチャート。14 is a flowchart showing details of S27 in FIG. 13; 図13中のS24の詳細を示すフローチャート。14 is a flowchart showing details of S24 in FIG. 13; 図13中のS26の詳細を示すフローチャート。14 is a flowchart showing details of S26 in FIG. 13;

以下、本発明の実施形態に係る時分割スケジュールの調整方式(調整方法)を説明する。ここでは本発明の適用された通信装置の一例として、TSNに対応したレイヤ2(L2)のスイッチングハブ(以下、TSNハブと呼ぶ。)を用いる。 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 (hereafter referred to as a TSN hub) is used as an example of a communications device to which the present invention is applied.

TSNハブは、「IEEE802.1AS」の「gPTP」機能と、「IEEE802.1Qbv」のトラフィックスケジューリング機能とを搭載している。これによりTSNハブ間で時刻同期し、また時分割スケジュールを組んで優先パケットを遅滞なく送信することができる。 TSN hubs are equipped with the IEEE 802.1AS gPTP function and the IEEE 802.1Qbv traffic scheduling function. This allows time synchronization between TSN hubs and the creation of time-sharing schedules to ensure priority packets are sent without delay.

すなわち、ネットワーク上に配置されたTNSハブ間が「gPTP」機能で時刻同期されていることを前提とし、時刻同期を使用した高精度のゲート設定を可能にしている。以下、実施例1,2に基づき詳細を説明する。 In other words, it is assumed that the TNS hubs on the network are time-synchronized using the "gPTP" function, enabling highly accurate gate setting using time synchronization. Details are explained below based on Examples 1 and 2.

図1~図4に基づき実施例1を説明する。TSNハブは、バス型・リング型やさらに複雑なネットワークに接続された状態で使用することができる。本実施例では、一例として図1に示すネットワークNを想定する。 Example 1 will be explained based on Figures 1 to 4. The TSN hub can be used while connected to a bus, ring, or even more complex network. In this example, we will assume the network N shown in Figure 1 as an example.

ネットワークNは、TSNハブ1~5により構成されている。ここではTSNハブ1~5は「gPTP」機能により時刻同期が可能であって、時分割スケジュールの必要な「gPTP」ポート1a~5bについてトラフィックスケジューリング機能によりパケットの送信方向A~D毎にゲートが設定されている。 Network N is made up of TSN hubs 1-5. Here, TSN hubs 1-5 are time-synchronized using the "gPTP" function, and for "gPTP" ports 1a-5b, which require a time-sharing schedule, gates are set for packet transmission directions A-D using the traffic scheduling function.

例えばTSNハブ1,3は、送信方向Aの送信パケットに対して「gPTP」ポート1a,3aにゲートが設定され、送信方向Bの送信パケットに対して「gPTP」ポート1b,3bにゲートが設定されている。 For example, TSN hubs 1 and 3 have gates set on "gPTP" ports 1a and 3a for packets sent in direction A, and gates set on "gPTP" ports 1b and 3b for packets sent in direction B.

TSNハブ4,5は、送信方向Cの送信パケットに対して「gPTP」ポート4a,5aにゲートが設定され、送信方向Dの送信パケットに対して「gPTP」ポート4b,5bにゲートが設定されている。 TSN hubs 4 and 5 have gates set at "gPTP" ports 4a and 5a for packets sent in transmission direction C, and gates set at "gPTP" ports 4b and 5b for packets sent in transmission direction D.

TSNハブ2は、送信方向Aの送信パケットに対して「gPTP」ポート2aにゲートが設定され、送信方向Bの送信パケットに対して「gPTP」ポート2bにゲートが設定され、送信方向Cの送信パケットに対して「gPTP」ポート2cにゲートが設定され、送信方向Dの送信パケットに対して「gPTP」ポート2dにゲートが設定されている。 TSN hub 2 has a gate set at "gPTP" port 2a for packets sent in transmission direction A, a gate set at "gPTP" port 2b for packets sent in transmission direction B, a gate set at "gPTP" port 2c for packets sent in transmission direction C, and a gate set at "gPTP" port 2d for packets sent in transmission direction D.

このようなTSNハブ1~5の内部では、「gPTP」時刻同期で使用するタイマー(nsecまで表現可能)と、1カウントあたり「nsec(周期)」オーダーのカウンタを備えている。このタイマーとカウンタとを用いてゲート開始調整時間を算出し、算出されたゲート開始調整時間に基づき次のゲートの開始タイミング(時分割スケジュールの動作周期の開始タイミング)を設定する。以下、タイマーを「ToD」と示し、カウンタを「TC」と示し、ゲート設定の詳細を説明する。 These TSN hubs 1-5 are equipped with a timer (capable of expressing time down to nanoseconds) used for gPTP time synchronization, and a counter with a count on the order of nanoseconds (cycles). The gate start adjustment time is calculated using this timer and counter, and the start timing of the next gate (the start timing of the time-sharing schedule's operating cycle) is set based on the calculated gate start adjustment time. Below, the timer is referred to as "ToD" and the counter as "TC," and gate setting details are explained.

≪ゲート設定の処理内容≫
図2および図3に基づきTSNハブ1~5におけるゲート設定の処理ステップ(S01~S09)を説明する。ここではTSNハブ1~5は、「gPTP」機能とトラフィックスケジューリング機能とが正常に動作している状態とする。
<Gate setting processing details>
2 and 3, the gate setting processing steps (S01 to S09) in the TSN hubs 1 to 5 will be described. Here, it is assumed that the "gPTP" function and traffic scheduling function of the TSN hubs 1 to 5 are operating normally.

S01:処理が開始されるとTSNハブ1~5は、自身のポート状態を調べてゲート設定が必要なポートの情報を取得する。例えばTSNハブ2であれば「gPTP」ポート2a~2dの情報を取得する。 S01: When processing begins, TSN Hubs 1-5 check their own port status and obtain information about ports that require gate setting. For example, TSN Hub 2 obtains information about "gPTP" ports 2a-2d.

S02:S01で取得したポート情報に基づきゲート設定の対象ポートを選出する。例えばTSNハブ2については、「gPTP」ポート2a→2dの順に選出される。 S02: Based on the port information obtained in S01, the target port for gate setting is selected. For example, for TSN hub 2, "gPTP" ports 2a → 2d are selected in that order.

S03:S02で選出されたすべての対象ポート(例えばTSNハブ2であれば「gPTP」ポート2a~2d)についてゲート設定が完了しているか否かを確認する。確認の結果、完了していれば処理を終了する一方、完了していなければS04に進む。 S03: Check whether gate settings are complete for all target ports selected in S02 (for example, "gPTP" ports 2a-2d for TSN Hub 2). If the check shows that gate settings are complete, end the process; if not, proceed to S04.

S04:ゲート処理(ゲート開閉)の開始タイミングを計るため、「gPTP」機能による時刻同期の影響を受けない「TC」により周期測定を行う。 S04: To measure the start timing of gate processing (gate opening and closing), the period is measured using "TC," which is not affected by time synchronization using the "gPTP" function.

ここでは図3に示すように、「TC」の周期測定が「0(nsec)」のとき、即ち「TC0(nsec)」のときにゲート処理を開始する(ゲートを開始する。)。例えばTSNハブ2の「gPTP」ポート2aが対象ポートであれば、「TC0(nsec)」のときに前記ポート2aのゲート処理を開始する。 As shown in Figure 3, gating begins when the "TC" period measurement is "0 (nsec)," i.e., when it is "TC0 (nsec)." For example, if the target port is the "gPTP" port 2a of TSN hub 2, gating begins for port 2a when it is "TC0 (nsec)."

S05:「TC」が「任意のカウント数×T(nsec)」を経過した状態、即ち「TC1=T(nsec)」後、「gPTP」時刻同期している「ToD」の時刻「t1=HH:MM:SS.zzzzzzzzz」を収集する(図3参照)。 S05: When "TC" has passed "any count number x T (nsec)", i.e., after "TC1 = T (nsec)", collect the "ToD" time "t1 = HH:MM:SS.zzzzzzzzzzz" that is synchronized with "gPTP" time (see Figure 3).

S06:S05で収集した時刻「t1」からS04のゲート開始時、即ち「TC0(nsec」のときの「ToD」の時刻「t2」を逆算する。 S06: Calculate backwards from the time "t1" collected in S05 to the gate start time of S04, i.e., the "ToD" time "t2" at "TC0 (nsec)".

図3に基づき詳細を説明すれば、まずTC間の差を算出するため、「TC1-TC0」の演算を実行する(S06-1)。つぎにS05で収集した「t1」からS06-1の演算結果を減算し(S06-2)、時刻「t2=HH:MM:SS.yyyyyyyyy」を算出(推定)する。 Explaining the details based on Figure 3, first, to calculate the difference between 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).

S07:S06-1で算出した時刻「t2」に基づきゲート開始調整時間を算出する。このとき時刻「t3」を式(1)のとおりに定義する。
式(1):時刻「t3」=ゲート開始(ゲート開閉の開始)の時刻「t2」+1秒=HH:MM:SS+1.000000000
そして、時刻「t3」から時刻「t2」を減算することで両者「t2」・「t3」間のズレ、即ち「差分data(nsec)」を求める(S07-1)。また、「差分data(nsec)」をゲート周期(1msec)で除算し、剰余(余り)を求める(S07-2)。この剰余をゲート開始調整時間b(nsec)とする。
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 (gate opening/closing start time) "t2" + 1 second = HH:MM:SS + 1.000000000
Then, the time "t2" is subtracted from the time "t3" to determine the difference between "t2" and "t3", i.e., "difference data (nsec)" (S07-1). The "difference data (nsec)" is then divided by the gate period (1 msec) to determine the remainder (S07-2). This remainder is set as the gate start adjustment time b (nsec).

S08:S07のゲート開始調整時間b(nsec)を事前に設定した実行閾値a(nsec)と比較する。比較の結果、ゲート開始調整時間b(nsec)が大きければS09に進む一方、そうでなければ処理を終了する。 S08: Compare the gate start adjustment time b (nsec) from S07 with the preset execution threshold a (nsec). If the comparison shows that the gate start adjustment time b (nsec) is greater, proceed to S09; if not, end the process.

S09:次回のゲート開始のタイミングにおいて、ゲート開始調整時間b(nsec)分だけ待ってゲート処理を開始する設定に調整する。ここではゲートは、ゲート開始調整時間b(nsec)を設定する機能を備えているものとし、その設定後に処理を終了する。 S09: At the next gate start timing, adjust the settings to start gate processing after waiting for gate start adjustment time b (nsec). Here, the gate is assumed to have the function to set gate start adjustment time b (nsec), and processing ends after the setting.

≪動作処理例≫
図4に基づき動作処理例を説明する。ここでは「TC」として125MHZの32ビットカウンタ[1カウント=8nsec(1000000000/125000000)]を使用し、前述と同じくゲート周期は「1msec」とする。
<<Example of operation processing>>
An example of operation processing will be described with reference to Fig. 4. Here, a 125 MHz 32-bit counter [1 count = 8 nsec (1000000000/125000000)] is used as "TC", and the gate period is "1 msec" as before.

(1)S04~S07
図4(a)に基づきS04~S07の動作処理例を説明する。ここではS04のゲート開始を「TC0=5 カウントX 8nsec=40(nsec)」のときに行っている。
(1) S04-S07
An example of the operation process from S04 to S07 will be described with reference to Fig. 4A. Here, the gate start of S04 is performed when "TC0 = 5 count X 8 nsec = 40 (nsec)".

また、「TC1=1255 カウントX 8nsec=10040(nsec)」のときに、S05の「時刻t1=10:20:30.759004560」を収集している。 Also, when "TC1 = 1255 count x 8 nsec = 10040 (nsec)", "time t1 = 10:20:30.759004560" of S05 is collected.

ゲート開始調整時間b(nsec)の算出(S07)にあたって、事前にS06の時刻「t2」が逆算される。すなわち、TCの差「10040-40=10000nsec」が算出される(S06-1)。また、S05の「時刻t1=10:20:30.759004560」からTCの差「10000nsec」を減算し、「時刻t2=10:20:30:758994560」が算出される(S06-2)。 When calculating gate start adjustment time b (nsec) (S07), time "t2" from S06 is calculated backwards in advance. That is, the TC difference "10040 - 40 = 10000 nsec" is calculated (S06-1). Furthermore, the TC difference "10000 nsec" is subtracted from "time t1 = 10:20:30.759004560" from S05 to calculate "time t2 = 10:20:30:758994560" (S06-2).

その後、「時刻t2=10:20:30:758994560」に基づきゲート開始調整時間b(nsec)を算出する。このとき式(1)に従って時刻「t3=10:20:31.00000000」と定義される。また、図4(a)中の式(2)に示すように、「差分data(nsec)=241005440(nsec)」が算出される(S07-1)。 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). Furthermore, as shown in equation (2) in Figure 4(a), "difference data (nsec) = 241005440 (nsec)" is calculated (S07-1).

ここで算出された「差分data(nsec)」は、図4(a)中の式(3)に示すように、ゲート周期(1msec=1000000nsec)で除算される。その際の剰余から「ゲート開始調整時間b(nsec)=5440(nsec)」が算出される(S07-2)。 The "difference data (nsec)" calculated here 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).

(2)S08,S09
図4(b)に基づきS08,S09の動作処理例を説明する。ここでは算出されたゲート開始調整時間b「5440(nsec)」を実行閾値a(nsec)と比較する(S08)。
(2) S08, S09
An example of the operation process in S08 and S09 will be described with reference to Fig. 4B. Here, the calculated gate start adjustment time b "5440 (nsec)" is compared with the execution threshold value a (nsec) (S08).

このとき矢印Pに示すように、「実行閾値a(nsec)=10000(nsec)」であれば、ゲート開始調整は行われない。一方、矢印Qに示すように、「実行閾値a(nsec)=5000(nsec)」であれば、S09に示すように、次回ゲート開始タイミングにおいてゲート開始調整時間「5440(nsec)」だけ待ってゲート処理の開始を実行する。これにより以下の効果A~Cが得られる。 At this time, as shown by arrow P, if "execution threshold a (nsec) = 10,000 (nsec)," gate start adjustment is not performed. On the other hand, as shown by arrow Q, if "execution threshold a (nsec) = 5,000 (nsec)," gate processing is started after waiting for the gate start adjustment time of "5,440 (nsec)" at the next gate start timing, as shown in S09. This achieves the following effects A to C.

A:TSNハブ1~5に設定されたゲートの開始タイミングが、S09に示すように、事前にゲート開始調整時間b(nsec)に応じて調整される。これによりTSNハブ1~5間のゲート開始時を同調させ、そのバラツキを抑制することが可能となる。 A: As shown in S09, the gate start timing set for TSN hubs 1-5 is adjusted in advance according to the gate start adjustment time b (nsec). This synchronizes the gate start times between TSN hubs 1-5, making it possible to reduce variations.

この場合、前述のように「gPTP」の時刻同期で使用しているToD時刻を取得する処理にはCPU負荷が加わるが、その処理はS05だけとし、その他のカウントに「TC」を使用することでCPU負荷を低減している。この点で時刻同期の精度への影響を減らし、時刻同期の精度向上を図っている。 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.

B:ゲート開始調整時間b(nsec)は、S08に示すように、実行閾値a(nsec)よりも大きい場合にゲート処理の開始タイミングの調整に用いられる。このようにゲート開始調整時間b(nsec)に実行閾値a(nsec)を設けることで想定した精度以上のTSNハブ1~5間のゲート処理の同調が可能となる。 B: As shown in S08, gate start adjustment time b (nsec) is used to adjust the start timing of gate processing when it is greater than execution threshold a (nsec). By setting execution threshold a (nsec) in gate start adjustment time b (nsec) in this way, it becomes possible to synchronize gate processing between TSN hubs 1-5 with greater than expected accuracy.

C:特許文献1は、時分割スケジュールをTSNハブ間の距離に応じてオフセットさせて調整している。ここではネットワークの末端のTSNハブから調査パケットを送信し、他のTSNハブの調査パケットの受信タイミングに応じてオフセットの値を調整している。 C: Patent Document 1 adjusts the time-sharing schedule 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.

したがって、特許文献1のオフセット値をゲート開始調整時間b(nsec)に適用することにより、さらにTSNハブ間のパケットの遅延分を考慮したゲート設定が可能となる。 Therefore, by applying the offset value of Patent Document 1 to the gate start adjustment time b (nsec), it becomes possible to set gates that take into account packet delays between TSN hubs.

図5~図16に基づき実施例2を説明する。本実施例は、TSNハブの「IEEE802.1AS」を使って、TSNハブ間の「IEEE802.1Qbv」を高精度で同調させ、さらにTSNハブを介したサーバ・クライアント装置間の距離による遅延分の補正を「IEEE802.1Qbv」に対して施す。 Example 2 will be explained based on Figures 5 to 16. In this example, the "IEEE802.1AS" of the TSN hub is used to synchronize the "IEEE802.1Qbv" between the TSN hubs with high precision, and the "IEEE802.1Qbv" is then corrected for delays due to the distance between the server and client devices via the TSN hub.

TSNハブは、前述のように「IEEE802.1AS(時刻同期)」と「IEEE802.1Qbv(時分割スケジュール)」の機能を持つ。例えば図5に示すネットワーク例を想定する。 As mentioned above, the TSN hub has the functions of "IEEE 802.1AS (time synchronization)" and "IEEE 802.1Qbv (time sharing schedule)." For example, consider the network example shown in Figure 5.

図5中の1~3はTSNハブ(以下、ハブ1~3とする。)を示し、ハブ1~3を介してサーバと端末装置とが接続されている。また、図5中では1台の端末装置のみが表されているが複数台の端末装置を接続されてもよく、サーバからの要求に対して端末装置からサーバへ定期的に情報(状態・音声・画像など)が転送されるものとする。この端末装置から送信される情報には、欠落が許されない重要な情報から状況に応じて欠落を問題としない画像情報なども含まれる。 In Figure 5, 1-3 indicate TSN hubs (hereafter referred to as Hubs 1-3), and the server and terminal devices are connected via Hubs 1-3. Also, 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, for which loss is not a problem depending on the situation.

従来は、各ハブ1~3が時刻同期により同じタイミングで時分割すると、図7に示すように、TSNハブ1から送信したパケットがTSNハブ2,3に到達するまでに伝送遅延により遅れて届く。これによりゲート開閉のタイミングが合わずにパケットが想定よりずれて送信され、最悪の場合にはパケットが欠落するおそれがある。 Conventionally, when each of hubs 1-3 time-shares at the same timing through time synchronization, as shown in Figure 7, packets sent from TSN hub 1 arrive late due to transmission delays before reaching 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.

そこで、特許文献1において、時分割によるスケジュールを伝送遅延分だけオフセットする方法が提案されている。このオフセットによれば、伝送遅延だけ遅れたタイミングでゲート開閉させることで長距離のシステムでTSNを動作させることが可能となる。 Patent Document 1 therefore proposes a method of offsetting the time-division schedule by the transmission delay. This offset makes it possible to operate TSN in long-distance systems by opening and closing gates at timings delayed by the transmission delay.

ただし、STP(Spanning Tree Protocol)/RSTP(Rapid Spanning Tree Protocol)などの機能によりネットワーク形状または経路が変化すると、伝送遅延も変化するため、オフセットの値も変更しなければならない。 However, if the network geometry 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.

ところが、伝送遅延の時刻同期パケットが往復しているため、オフセットの値の計算に時間を要し、処理が遅延するおそれがある。この点を解決すべく本実施例は、時分割スケジュールのオフセット値を簡単に取得可能な手法を提案する。 However, because time synchronization packets with transmission delays travel back and forth, calculating the offset value takes time, which can result in processing delays. To address this issue, this embodiment proposes a method that makes it easy to obtain the offset value for a time-sharing schedule.

≪動作・処理の内容≫
図5~図8に基づき本実施例の動作・処理を説明する。ここではサーバなどが接続されるTSNハブをメインハブと呼び、ネットワークの末端のTSNハブをエッジハブと呼ぶ。図5のネットワーク構成によれば、ハブ1がメインハブを示し、ハブ3がエッジハブを示している。
<<Operation/Processing Details>>
The operation and processing of this embodiment will be explained with reference to Figures 5 to 8. Here, the TSN hub to which the server and other devices are 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 in Figure 5, Hub 1 represents the main hub, and Hub 3 represents the edge hub.

(1)基本的な考え方
図6は、各ハブ1~3のTSNが有効なポート(実施例1の「gPTP」ポートと同義:以下、TSNポートとする。)に設定される時分割スケジュールのゲート設定(ゲート開閉の設定例)を示し、間隔A~E毎に通過させたいパケットの種別と通過時間とが設定されている。実施例1では、前記ゲート設定を時刻同期と同調させた状態で繰り返し実行している。
(1) Basic Concept Fig. 6 shows gate settings (examples of gate opening and closing settings) for a time-sharing schedule that are set on the TSN-enabled ports of each of hubs 1 to 3 (synonymous with the "gPTP" ports in Example 1: hereinafter referred to as TSN ports), and the type and passing time of packets that are 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.

図6で表現されているようにハブ1~3は、時刻同期の機能および時刻同期とゲートとを同調させる機能を有し、ハブ1~ハブ3のゲートはTSNポートに設定されたネットワークの幹線となる。ゲート開閉はパケット送信により行われ、図7に示すように、ハブ1からハブ3のパケット送信にはゲート1,3が使用され、ハブ3からハブ1のパケット送信にはゲート2,4が使用される。 As shown in Figure 6, Hubs 1 to 3 have time synchronization functions and functions to synchronize time synchronization with gates, and the gates of Hubs 1 to 3 are the backbone of the network set in the TSN port. 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.

このとき時刻同期により同じタイミングで各ゲートが開閉すると伝送距離によりパケットが遅れて届くため、時分割スケジュールが守れないおそれがある。例えば図7では、ハブ1からハブ3へのパケット送信した場合に時刻B,Cに伝送遅延が生じている。 If each gate opens and closes at the same time due to time synchronization, packets will arrive delayed due to the transmission distance, which could result in the time-sharing schedule not being 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.

前述のように特許文献1では、かかる伝送遅延を考慮して時分割スケジュールをオフセットしている。この方式は長距離のシステムの伝送遅延に応じた動作を可能にしているものの、ネットワーク形状または経路が変化したときにはオフセットを短時間に算出できない場合がある。 As mentioned above, in Patent Document 1, the time-sharing schedule is offset to take such transmission delays into account. While this method enables operation in accordance with the transmission delays of long-distance systems, it may not be possible to calculate the offset in a short time when the network geometry or route changes.

そこで、本実施例では、図8に示すように、ゲート設定の先頭に補正パケットの期間を追加し、補正パケットの通過時間に応じて時分割スケジュールをオフセットする。この補正パケットは、メインハブ(ハブ1)とエッジハブ(ハブ3)において、時分割スケジュールの補正パケットの期間中だけゲート開となって送信される。 Therefore, in this embodiment, as shown in Figure 8, 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. This correction packet is transmitted at the main hub (hub 1) and edge hub (hub 3) with the gate open only during the correction packet period of the time-sharing schedule.

その結果、補正パケットは時刻同期と時分割スケジュールに従ったタイミングでハブ1,3から送信される。一方、中間のハブ2は、パケットを常時転送可能なため、補正パケットについても単純な転送処理を実行する。なお、図8中のゲート間隔Sには、1パケット(補正パケット)だけ通過させる設定が施されている。 As a result, correction packets are sent from hubs 1 and 3 in accordance with the time synchronization and time-sharing schedule. Meanwhile, intermediate hub 2 can forward packets at any time, so it also performs simple forwarding processing on correction packets. Note that the gate interval S in Figure 8 is set to allow only one packet (correction packet) to pass through.

このときネットワーク形状または経路が変化しても時刻同期は維持される一方、伝送経路により伝送遅延時間は変化する。そのため、ハブ2は、補正パケットを従来と異なるポートから受信することとなり、その受信タイミングを取得できれば伝送遅延を算出して新たなオフセットを適用することが可能となる。 In this case, time synchronization is maintained even if the network geometry or route changes, but the transmission delay time changes depending on the transmission route. As a result, Hub 2 will receive the correction packet from a different port than before, and if it can obtain the reception timing, it will be able to calculate the transmission delay and apply a new offset.

この点で特許文献1のように時刻同期によるパケットの往復を待つ必要が無く、ネットワーク形状または経路が変化してもオフセットを短時間に算出することができる。 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 offsets can be calculated in a short time even if the network geometry or route changes.

そして、メインハブ(ハブ1)から送信された補正パケットは、エッジハブ(ハブ3)まで到達して転送が終了する。一方、エッジハブ(ハブ3)から送信された補正パケットは、メインハブ(ハブ1)に到達すればアクセスリストなどの機能によりそこで終了される。このときネットワーク形状などによってはエッジハブが複数存在する場合があり、かかる場合にはメインハブに複数の補正パケットが合流する。 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 access lists when it reaches the main hub (Hub 1). Depending on the network topology, there may be multiple edge hubs, and in such cases, multiple correction packets will merge at the main hub.

(2)動作処理例
図9に基づき動作処理例を説明する。ここでは図5に示すように、ハブ1~3がTSNポートで接続され、メインハブのハブ1が時刻同期のグランドマスター(GM)に該当し、ハブ2,3はハブ1に同期するスレーブに該当する。したがって、ハブ2,3のタイマー時刻(ToD時刻)は、時刻同期によりハブ1のToD時刻に一致する。
(2) Operation Processing Example An operation processing example will be described with reference to Fig. 9. Here, as shown in Fig. 5, hubs 1 to 3 are connected by 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 time) of hubs 2 and 3 match the ToD time of hub 1 through time synchronization.

S11:まず、ハブ1は自身のTSNポートからToD時刻(XX時ZZ分00.000000000秒)に補正パケットの期間をゲート開として、補正パケット(1581byte)をハブ3に送信する。 S11: First, Hub 1 opens the gate for the correction packet period at ToD time (XX:ZZ:00.000000000 seconds) from its own TSN port and sends a correction packet (1581 bytes) to Hub 3.

ここではハブ1のゲート機能により「00.000000000秒」の送信時間と判定可能なものとし、ハブ1から送信された補正パケットを補正パケット1と呼び、補正パケット1を送信したToD時刻をToD時刻Aと呼び、補正パケット1はToD時刻Aを含めて送信される。なお、補正パケットのサイズは、「1581byte」に限定されず、他のサイズでもよいものとする。 Here, the gate function of Hub 1 is assumed to be able to determine the transmission time as "00.000000000 seconds", the correction packet sent from Hub 1 is called Correction Packet 1, the ToD time at which Correction Packet 1 is sent is called ToD Time A, and Correction Packet 1 is sent including ToD Time A. Note that the size of the correction packet is not limited to "1581 bytes" and may be other sizes.

S12,S13:ハブ1の送信した補正パケット1は、ハブ2が受信してハブ3に転送する(S12)。すなわち、ハブ2の補正パケットの期間は常時ゲート開なため、ストアアンドファーワードにより転送される。 S12, S13: Correction packet 1 sent by hub 1 is received by hub 2 and forwarded to hub 3 (S12). In other words, since the gate is always open during the period of the correction packet from hub 2, it is forwarded using the store-and-forward method.

このときハブ2は補正パケット1を受信したタイミングを取得できるので、ハブ2のタイマー時刻(ToD時刻)との差分から伝送遅延を取得してオフセット値に用いることができる。 At this time, Hub 2 can obtain the timing at which Correction Packet 1 was received, and can obtain the transmission delay from the difference with Hub 2's timer time (ToD time) and use this as the offset value.

ここではハブ2で収集された補正パケット1を受信したToD時刻をToD時刻B(XX時ZZ分00.0000yyyyy秒)とする一方、ハブ2のTSNポートに補正パケット1が到着してToD時刻Bを収集するまでにかかった時間を「t1」とする。 Here, the ToD time at which correction packet 1 collected by hub 2 was received is defined as ToD time B (XX: ZZ: 00.0000yyyy seconds), and the time it takes from when correction packet 1 arrives at the TSN port of hub 2 until ToD time B is collected is defined as "t1."

この場合、ハブ1からハブ2までの通過時間Bは、図9中の式(4)に示すように、ToD時刻BからToD時刻Aおよび「t1」を減算した時間となる。式(4)により算出される通過時間Bは、ハブ1からハブ2までのパケットの遅延時間と等しくなるので、通過時間Bを次のハブ2のToD時刻とゲート3(エッジ側ポート)との同調時にゲート補正時間として加算する(S13)。これにより正確なゲート設定が可能となる。 In this case, 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 using 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.

その後、補正パケット1は、ハブ3により受信される。ハブ3はエッジハブなので伝送遅延を算出する必要はない。 Correction Packet 1 is then received by Hub 3. Since Hub 3 is an edge hub, there is no need to calculate the transmission delay.

S14~S16:つぎにハブ3は自身のTSNポートからToD時刻(XX時ZZ分00.00a000000秒)に補正パケットの期間をゲート開として、補正パケット(1581byte)をハブ1に送信する(S14)。 S14-S16: Next, Hub 3 opens the gate for the correction packet period at ToD time (XX:ZZ:00.00a000000 seconds) from its own TSN port and sends the correction packet (1581 bytes) to Hub 1 (S14).

ここではハブ3のゲート機能により「00.00000000秒」の送信時間と判定可能なものとし、ハブ3から送信された補正パケットを補正パケット2と呼び、補正パケット2を送信したToD時刻をToD時刻Cと呼び、補正パケット2はToD時刻Cを含めて送信される。 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.

ハブCの送信した補正パケット2は、ハブ2が受信してハブ1に転送し(S15)、S13と同様な処理が実行される。ここではハブ2で収集された補正パケット2を受信したToD時刻をToD時刻B´(XX時ZZ分00.00a0zzzzz秒)とする一方、ハブ2のTSNポートに補正パケット2が到着してToD時刻B´を収集するまでにかかった時間を「t2」とする。 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 it takes from when correction packet 2 arrives at Hub 2's TSN port until ToD time B' is collected is defined as "t2."

この場合、ハブ3からハブ2までの通過時間B´を図9中の式(5)により算出し、通過時間B´を次のハブ2のToD時刻とゲート2(メイン側ポート)の同調時にゲート補正時間として加算する(S16)。 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 the gate correction time when synchronizing the ToD time of the next hub 2 with gate 2 (main side port) (S16).

(4)他の動作処理例
図10~図12に基づき他の動作処理例を説明する。図10は他のネットワーク構成例を示している。ここではハブ1がメインハブに該当し、ハブ5,7,8がエッジハブに該当し、ゲート2,4,6,8,9,10,12がメイン側ポートのゲートを示し、ゲート1,3,5,7,11がエッジ側ポートのゲートを示している。
(4) Other Operation Processing Examples Other operation processing examples 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 the main side ports, and gates 1, 3, 5, 7, and 11 indicate gates of the edge side ports.

ハブ1は、図11に示すように、エッジ側補正パケット(前述の補正パケット1に相当)をハブ5,7,8に送信する。このエッジ側補正パケットは、ハブ2~4,6により順次転送される。このときゲート1,3,5,7,11にハブ2~4,6の通過時間が加算され、エッジ側ポートのゲート補正が施される。 As shown in Figure 11, Hub 1 sends an edge-side correction packet (corresponding to Correction Packet 1 described above) to Hubs 5, 7, and 8. This edge-side correction packet is then forwarded sequentially by Hubs 2-4 and 6. At this time, the transit times through Hubs 2-4 and 6 are added to Gates 1, 3, 5, 7, and 11, and gate correction is performed on the edge-side port.

一方、ハブ5,7,8は、図12に示すように、メイン側補正パケット(前述の補正パケット2に相当)をハブ1に送信する。このメイン側補正パケットは、ハブ2~4,6により順次転送される。 On the other hand, as shown in Figure 12, Hubs 5, 7, and 8 send a main-side correction packet (corresponding to correction packet 2 described above) to Hub 1. This main-side correction packet is forwarded sequentially by Hubs 2 to 4 and 6.

このときハブ2はハブ3,6のメイン側ゲート4,10の補正が重複し、ハブ4はハブ5,7のメイン側ゲート8,9の補正が重複する。このようにメイン側ポートのゲート補正の経路が重複する場合には、通過時間の長い方の時間をオフセット値として採用する。 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.

≪詳細な処理内容≫
図13に基づきゲート補正の詳細な処理内容を説明する。ここでは事前に以下のデータをコマンドにより入力し、ゲート補正情報ファイルに書き込んでおくものとする。
・エッジ遅延番号
・メインフラグ
・エッジフラグ
・TSNを動作させるTSNポートの番号(以下、TSNポート番号とする。)
S21:処理の開始時にゲート補正情報ファイルを読み込む。これによりエッジ遅延番号・メインフラグ・エッジフラグ・TSNポート番号が内部データとしてTSNハブにセットされる。なお、メインフラグはメインハブにセットされる一方、エッジフラグはエッジハブにセットされるものとする。
<<Detailed processing content>>
The gate correction process will be described in detail 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 Number of the TSN port that operates the TSN (hereinafter 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 in the TSN hub as internal data. Note that the main flag is set in the main hub, while the edge flag is set in the edge hub.

S22~S27:TSNポートについてゲート補正パケット用のゲートを設定する(S22)。その後にエッジ側補正パケットを受信したか否かを確認する(S23)。確認の結果、エッジ側補正パケットを受信していればS24のエッジ側補正パケット受信時処理に進む。 S22-S27: A gate for gate correction packets is set for the TSN port (S22). Then, a check is made to see if an edge-side correction packet has been received (S23). If the check shows that an edge-side correction packet has been received, the process proceeds to S24, which is the process performed when an edge-side correction packet is received.

受信していなければS25に進む。S25では、メイン側補正パケットを受信したか否かを確認する。確認の結果、メイン側補正パケットを受信していれば、S26のメイン側補正パケット受信時処理に進む。一方、受信していなければ、S27のゲート補正パケット送信時処理に進む。 If not received, proceed to S25. In S25, it is checked whether a main side correction packet has been received. If the result of the check is that a main side correction packet has been received, proceed to S26, which is the process when a main side correction packet is received. On the other hand, if not received, proceed to S27, which is the process when a gate correction packet is sent.

(1)ゲート補正パケット送信時処理の詳細
図14に基づきS27のゲート補正パケット送信時処理の詳細を説明する。ここではメインハブとエッジハブとで処理内容が相違する。
(1) Details of the Gate Correction Packet Transmission Processing The gate correction packet transmission processing of S27 will be described in detail with reference to Fig. 14. Here, the processing content differs between the main hub and the edge hub.

S31:処理が開始されると、自身がメインハブか否かが確認される。この確認はメインフラグのセットの有無により行われ、メインフラグがセットされていればメインフラグに該当し、S32以降の処理に進む。一方、メインフラグがセットされていなければ、メインハブに該当しなく、S36以降の処理に進む。 S31: When processing begins, it is confirmed whether the device itself is the main hub. This confirmation is made by checking whether the main flag is set or not. If the main flag is set, the device is considered to be the main hub, and processing proceeds to S32 and subsequent steps. On the other hand, if the main flag is not set, the device is not considered to be the main hub, and processing proceeds to S36 and subsequent steps.

S32~S35:タイマーから時刻同期の時刻(ToD時刻)を取得する(S32)。ここで取得したToD時刻から次の1秒までの残り時間を算出し(S33)、算出された残り時間がゲート周期以下か否かを確認する(S34)。 S32-S35: The time of time synchronization (ToD time) is obtained from the timer (S32). The remaining time from the obtained ToD time to the next second is calculated (S33), and it is confirmed whether the calculated remaining time is less than the gate period (S34).

確認の結果、ゲート周期以下でなければ処理を終了する。一方、ゲート周期以下であれば、S21で読み込まれたTSNポート番号のTSNポートからエッジ側補正パケットを送信し(S35)、処理を終了する。 If the result of the check is that the time is not equal to or less than the gate period, the process ends. On the other hand, if the time is equal to or less than the gate period, an edge-side correction packet is sent from the TSN port with the TSN port number read in S21 (S35), and the process ends.

S36:自身がエッジハブか否かが確認される。この確認はエッジフラグのセットの有無により行われ、エッジフラグがセットされていなければ処理を終了する一方、セットされていればS37以降の処理に進む。 S36: It is determined whether the device itself is an edge hub. This determination is made by checking whether the edge flag is set. If the edge flag is not set, processing ends, but if it is set, processing proceeds to S37 and subsequent steps.

S37~S42:メイン側補正パケットを受信済みか否かが確認される(S37)。この確認は、メイン側補正パケットの受信済みフラグが立っているか否かによって確認される(S38)。この受信済みフラグが立っていなければメイン側補正パケットの未受信なため、処理を終了する。一方、前記受信済みフラグが立っていれば、メイン側補正パケットを受信済みなため、S39に進む。 S37-S42: It is determined whether the main side correction packet has been received (S37). This determination is made by checking whether the reception flag for the main side correction packet is set (S38). If the reception flag is not set, the main side correction packet has not yet been received, and processing ends. On the other hand, if the reception flag is set, the main side correction packet has already been received, and processing proceeds to S39.

S39では、エッジ側補正パケットの衝突を避けるためエッジ遅延時間(エッジ遅延番号×ゲート周期)が待ちタイマーにセットされる。その後、S39でセットされた遅延時間が経過したか否かが確認される(S40)。 In S39, the edge delay time (edge delay number x gate period) is set in the wait timer to avoid collisions of edge-side correction packets. It is then checked whether the delay time set in S39 has elapsed (S40).

確認の結果、時間が経過していなければ処理を終了する一方、経過していればS21で読み込まれたTSNポート番号のTSNポートからメイン側補正パケットを送信する(S41)。この送信後にエッジ側補正パケットの受信済みフラグをクリアにし(S42)、処理を終了する。 If the check shows that the time has not elapsed, the process is terminated. If the time has elapsed, the main-side correction packet is sent from the TSN port whose TSN port number was read in S21 (S41). After this transmission, the reception completion flag for the edge-side correction packet is cleared (S42), and the process is terminated.

(2)エッジ側補正パケット受信時処理の詳細
図15に基づきS24のエッジ側補正パケット受信時処理の詳細を説明する。
(2) Details of the Edge Side Correction Packet Reception Processing The edge side correction packet reception processing in S24 will be described in detail with reference to FIG.

S51:処理が開始されると、自身がメインハブに該当するか否かが確認される。この確認はメインフラグのセットの有無により行われ、メインフラグがセットされていれば処理を終了する一方、メインフラグがセットされていなければS52に進む。 S51: When processing begins, it is confirmed whether the device itself is the main hub. This confirmation is made by checking whether the main flag is set. If the main flag is set, processing ends, but if the main flag is not set, the process proceeds to S52.

S52:自身がエッジハブに該当するか否かが確認される。この確認はエッジフラグのセットの有無により行われ、エッジフラグがセットされていればエッジ側補正パケットの受信済みフラグをセットし(S59)、処理を終了する。一方、前記エッジフラグがセットされていなければS53以降の処理に進む。 S52: It is determined whether the device itself is an edge hub. This determination is made by checking whether the edge flag is set. If the edge flag is set, the edge-side correction packet reception flag is set (S59), and processing ends. On the other hand, if the edge flag is not set, processing proceeds to S53 and subsequent steps.

S53~S58:まず、エッジ側補正パケットの受信ポートをメイン側補正パケットの送信ポートとして保存する(S53)。つぎにタイマーから時刻同期の時刻(ToD時刻)を取得し(S54)、時刻同期のタイムスタンプ機能を使ってエッジ側補正パケットのポート受信からの経過時間「t1」を取得する(S55)。 S53-S58: First, the receiving port of the edge-side correction packet is saved as the transmitting port of the main-side correction packet (S53). Next, the time of time synchronization (ToD time) is obtained from the timer (S54), and the time synchronization timestamp function is used to obtain the elapsed time "t1" since the edge-side correction packet was received at the port (S55).

この経過時間「t1」の取得後、式(4)によりゲート補正時間を算出する(S56)。また、エッジ側ポート番号とTSNポート番号に基づきエッジ側補正パケットを受信したポート以外のエッジ側ポートの情報を取得する(S57)。 After obtaining this elapsed time "t1", the gate correction time is calculated using equation (4) (S56). Additionally, information on edge-side ports other than the port that received the edge-side correction packet is obtained based on the edge-side port number and TSN port number (S57).

ここで取得した情報のTSNポートをゲート補正ポートと呼ぶ。この補正ポートについて次回のゲート同調にゲート補正時間を加算し(S58)、その後に処理を終了する。 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), after which processing ends.

(3)メイン側補正パケット受信時処理の詳細
図16に基づきS26のメイン側補正パケット受信時処理の詳細を説明する。
(3) Details of the Main-Side Correction Packet Reception Processing The main-side correction packet reception processing in S26 will be described in detail with reference to FIG.

S61:処理が開始されると、自身がメインハブに該当するか否かが確認される。この確認はメインフラグのセットの有無により行われ、メインフラグがセットされていれば処理を終了する一方、メインフラグがセットされていなければS62に進む。 S61: When processing begins, it is confirmed whether the device itself is the main hub. This confirmation is made by checking whether the main flag is set. If the main flag is set, processing ends, but if the main flag is not set, the process proceeds to S62.

S62:自身がエッジハブに該当するか否かが確認される。この確認はエッジフラグのセットの有無により行われ、エッジフラグがセットされていれば処理を終了する一方、セットされていなければS63以降の処理に進む。 S62: It is checked whether the device itself is an edge hub. This check is performed by checking whether the edge flag is set. If the edge flag is set, processing ends, but if it is not set, processing proceeds to S63 and subsequent steps.

S63~S66:まず、タイマーから時刻同期の時刻(ToD時刻)を取得し(S63)、時刻同期のタイムスタンプ機能を使ってメイン側補正パケットのポート受信からの経過時間「t2」を取得する(S64)。 S63-S66: First, the time of time synchronization (ToD time) is obtained from the timer (S63), and the time synchronization timestamp function is used to obtain the elapsed time "t2" since the main side correction packet was received at the port (S64).

この経過時間「t2」の取得後、式(5)によりゲート補正時間を算出する(S65)。また、メイン側ポート番号を取得して次回のメイン側ポートのゲート同調時にゲート補正時間を加算し(S66)、その後に処理を終了する。 After obtaining this elapsed time "t2", the gate correction time is calculated using equation (5) (S65). The main port number is also obtained, and the gate correction time is added the next time the main port's gate is tuned (S66), after which the process ends.

このような本実施例によれば、時分割スケジュールのオフセット値を算出するに際、「t1」「t2」をタイムスタンプ機能から取得可能なため、式(4)(5)を用いて簡単に計算することができる。 In this embodiment, when calculating the offset value of the time-sharing schedule, "t1" and "t2" can be obtained from the timestamp function, making it possible to easily calculate using equations (4) and (5).

とりわけ、既に時刻同期の状態にあればネットワークの形状や経路がSTP/RSTPなどの機能によって変化しても、時分割スケジュールのオフセット値は補正パケットの受信タイミングを取得すればよく、短時間での算出が可能となる。 In particular, if time synchronization is already in place, even if the network geometry or route changes due to functions such as STP/RSTP, the offset value for the time-sharing schedule can be calculated in a short time by simply obtaining the reception timing of the correction packet.

また、ネットワークの形状やTSNハブの台数などに影響を受けることなく、複雑なネットワーク構成でもサーバなどのデータ収集時に効率の良いオフセット値を算出することができる。 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 network shape or the number of TSN hubs.

例えば図10のネットワーク構成においても、図11および図12のように正確なゲート補正が可能となる。これによりメインハブ(ハブ1)にサーバが接続され、かつエッジハブ(ハブ5,7,8)に端末装置が接続された場合、サーバ・端末装置間で送信される他のパケットを一定量だけ安定に転送しつつ、重要パケットをロスすることなく送信可能となる。 For example, even with the network configuration shown 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 forwarded.

なお、本実施例では時分割スケジュールのゲート設定は必要であるが、ネットワークの形状または経路が変化してもオフセット値は自動設定するので、設定作業が省略することができる。 In this embodiment, gate settings for the time-sharing schedule are required, but the offset value is automatically set even if the network shape or route changes, so this setting work can be omitted.

1~8…TSNハブ
1a~5b…「gPTP」ポート
A~D…パケット送信方向
N…ネットワーク
1-8...TSN hub 1a-5b..."gPTP" port A-D...Packet transmission direction N...Network

Claims (5)

ネットワーク上の通信装置間で時刻同期させ、
前記各通信装置の対象ポートを通過可能なパケットのレベル毎の時分割スケジュールを一定の周期で動作させるゲート開閉の設定がなされ、前記時分割スケジュールを調整する方法であって、
前記ゲート開閉を時刻同期と同調させた状態で繰り返し実行することで前記時分割スケジュールの開始タイミングの調整時間を算出するステップと、
前記算出された調整時間に応じて前記時分割スケジュールの開始タイミングをオフセットするステップと、
を有し、
前記各通信装置は、前記時刻同期で使用するタイマーと、前記時刻同期の影響を受けないカウンタとを備え、
前記カウンタが前記時分割スケジュールの実行から任意のカウント数を経過した状態の時刻を前記タイマーから取得するステップと、
前記取得した時刻から前記カウント数に応じた時間を逆算して得られた時刻と、前記時分割スケジュールの開始時刻とに基づき前記調整時間を算出するステップと、
を有することを特徴とする時分割スケジュールの調整方法。
Time synchronization between communication devices on the network
A method for adjusting a time division 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 division 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:
前記カウンタが「0(sec)」のときに前記時分割スケジュールを実行し、
前記時分割スケジュールの実行から前記カウント数の経過後に前記時刻を取得する
ことを特徴とする請求項1記載の時分割スケジュールの調整方法。
When the counter is "0 (sec)", the time-sharing schedule is executed,
2. The method for adjusting a time sharing schedule according to claim 1, wherein the time is acquired after the count number has elapsed since the execution of the time sharing schedule.
前記調整時間は、
前記逆算で得られた時刻に任意秒数を加算した時刻と、
前記時分割スケジュールの開始時刻と、
の差分を前記時分割スケジュールの周期で除算した剰余である
ことを特徴とする請求項1または2記載の時分割スケジュールの調整方法。
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;
3. The method for adjusting a time sharing schedule according to claim 1, wherein the difference is a remainder obtained by dividing the difference by the period of the time sharing schedule.
前記調整時間を事前に設定した実行閾値と比較し、
前記比較の結果、前記調整時が大きければ次回の前記時分割スケジュールの開始を前記調整時間分だけ待つ
ことを特徴とする請求項1または2記載の時分割スケジュールの調整方法。
comparing the adjustment time to a predetermined execution threshold;
3. The method for adjusting a time sharing schedule according to claim 1, wherein if the comparison result shows that the adjustment time is large, the start of the next time sharing schedule is delayed by the adjustment time.
ネットワーク上の通信装置間で時刻同期させ、
前記各通信装置の対象ポートを通過可能なパケットのレベル毎の時分割スケジュールを一定の周期で動作させるゲート開閉の設定がなされ、前記時分割スケジュールを調整する方法であって、
前記ゲート開閉を時刻同期と同調させた状態で繰り返し実行することで前記時分割スケジュールの開始タイミングの調整時間を算出するステップと、
前記算出された調整時間に応じて前記時分割スケジュールの開始タイミングをオフセットするステップと、
を有し、
前記ゲート開閉の設定において、
通過させたいパケットの種別と通過時間とがゲート間隔毎に設定され、
前記ゲート間隔の先頭に補正パケットの期間が追加され、
前記補正パケットを前記各通信装置に転送させることで伝送遅延に応じた補正時間を算出し、
前記算出された補正時間を前記調整時間に用い、
前記補正パケットは、前記ネットワーク中でサーバの接続を想定するメインの前記通信装置と、
前記ネットワークの末端の前記通信装置と、
から送信される一方、
前記メインと前記末端以外との間に配置される中間の前記通信装置により順次に転送され、
中間の前記通信装置は、
前記補正パケットを収集したタイマー時刻と、
前記補正パケットが前記対象ポートに到着して前記タイマー時刻を収集するまでにかかった時間と、
に基づき伝送遅延時間を算出し、
前記伝送遅延時間を前記補正時間として算出することを特徴とする記載の時分割スケジュールの調整方法。
Time synchronization between communication devices on the network
A method for adjusting a time division 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 division 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 gate opening and closing,
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.
JP2022068625A 2021-10-20 2022-04-19 How to arrange a time-sharing schedule Active JP7732386B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021171341 2021-10-20
JP2021171341 2021-10-20

Publications (2)

Publication Number Publication Date
JP2023061877A JP2023061877A (en) 2023-05-02
JP7732386B2 true JP7732386B2 (en) 2025-09-02

Family

ID=86249515

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022068625A Active JP7732386B2 (en) 2021-10-20 2022-04-19 How to arrange a time-sharing schedule

Country Status (1)

Country Link
JP (1) JP7732386B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017521914A (en) 2014-06-11 2017-08-03 マーベル ワールド トレード リミテッド System and method for blocking transmission of frames in a network device
WO2018167984A1 (en) 2017-03-17 2018-09-20 富士通株式会社 Wireless communication device, wireless communication system, and transmission timing adjustment method
JP2020107943A (en) 2018-12-26 2020-07-09 株式会社明電舎 Time division schedule adjusting method
JP2021136520A (en) 2020-02-26 2021-09-13 株式会社明電舎 Tsn network connection system and tsn network connection method
WO2021192603A1 (en) 2020-03-27 2021-09-30 Mitsubishi Electric Corporation Scheduling data traffic in wireless time sensitive networks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017521914A (en) 2014-06-11 2017-08-03 マーベル ワールド トレード リミテッド System and method for blocking transmission of frames in a network device
WO2018167984A1 (en) 2017-03-17 2018-09-20 富士通株式会社 Wireless communication device, wireless communication system, and transmission timing adjustment method
JP2020107943A (en) 2018-12-26 2020-07-09 株式会社明電舎 Time division schedule adjusting method
JP2021136520A (en) 2020-02-26 2021-09-13 株式会社明電舎 Tsn network connection system and tsn network connection method
WO2021192603A1 (en) 2020-03-27 2021-09-30 Mitsubishi Electric Corporation Scheduling data traffic in wireless time sensitive networks

Also Published As

Publication number Publication date
JP2023061877A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
US10447583B2 (en) Packet processing technique for a communication network
US10743269B2 (en) Coordinated timing syncronization and time-aware shaping
US10931391B2 (en) One-step time stamping of synchronization packets for networked devices
EP2817921B1 (en) Network devices with time aware medium access controller
CN112087804B (en) Time-sensitive network gating time slot adjusting method and system
US8068429B2 (en) Transmit scheduling
DK2497211T3 (en) Method and device for optimizing transport of a synchronization package
JP7393530B2 (en) Packet forwarding methods, devices, and systems
CN115333660B (en) Precise timestamp correction
US8649303B2 (en) Method and device for synchronizing and time-stamping for equipment items of a communication network of AFDX type
US20100040090A1 (en) Synchronization method for allowing fixed time delay and bridge employing the same
Bosk et al. Methodology and infrastructure for tsn-based reproducible network experiments
US20220029724A1 (en) A tsn enabled controller
Ulbricht et al. TSN-FlexTest: Flexible TSN measurement testbed
US10361962B2 (en) Packet processing technique for a communication network
WO2020225954A1 (en) Communication control device and communication control method
JP7732386B2 (en) How to arrange a time-sharing schedule
Ulbricht et al. Integrating time-sensitive networking
JP7616375B2 (en) Signal transfer device, signal transfer method, and program
EP2273706A1 (en) Synchronization packet-delay-variation dampening (SPD)
Morato et al. A TSN-based approach to combine real-time CAN network with in-vehicle ethernet
Mandarawi et al. A framework for virtualizing time-aware shaper using high performance NFV
JP2006148774A (en) Synchronizer
Lindner et al. How Low Can You Go? Revisiting (S) NTP Time Synchronization for Industrial Networks
CN107210940B (en) Control network system, and node device thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240823

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20250305

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20250318

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250415

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20250527

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250707

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20250722

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20250804

R150 Certificate of patent or registration of utility model

Ref document number: 7732386

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150