JPS5941944A - Processing device of power failure of data transmission system - Google Patents

Processing device of power failure of data transmission system

Info

Publication number
JPS5941944A
JPS5941944A JP57152981A JP15298182A JPS5941944A JP S5941944 A JPS5941944 A JP S5941944A JP 57152981 A JP57152981 A JP 57152981A JP 15298182 A JP15298182 A JP 15298182A JP S5941944 A JPS5941944 A JP S5941944A
Authority
JP
Japan
Prior art keywords
data
flag
interface
transmission
power outage
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.)
Granted
Application number
JP57152981A
Other languages
Japanese (ja)
Other versions
JPH0221703B2 (en
Inventor
Yoshimitsu Matsui
松井 良光
Michiyuki Horiguchi
道行 堀口
Masakazu Ohashi
正和 大橋
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP57152981A priority Critical patent/JPS5941944A/en
Priority to US06/525,665 priority patent/US4672543A/en
Priority to GB08322996A priority patent/GB2126458B/en
Priority to CA000435700A priority patent/CA1213015A/en
Priority to DE3331233A priority patent/DE3331233C2/en
Publication of JPS5941944A publication Critical patent/JPS5941944A/en
Publication of JPH0221703B2 publication Critical patent/JPH0221703B2/ja
Granted legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/407Bus networks with decentralised control
    • H04L12/413Bus networks with decentralised control with random access, e.g. carrier-sense multiple-access with collision detection (CSMA-CD)

Abstract

PURPOSE:To prevent completely the phase shift between a main system and an interface, by storing the interface management state of the main system at a power failure time while power supply is cut off and referring to management information at the power failure time to restart the transfer control when power supply is recovered. CONSTITUTION:When power supply is recovered, flags stored in an area H are referred to perform the data transfer control. The set state of a flag WED is referred to in the transmitting operation, and the set state of a flag RED is referred to in the receiving operation. When the flag WED is set, it indicates that the power failure occurs at the completion time of data transfer of one block, and it is sufficient if data of the next new block is transferred; but when the flag WED is reset at the power supply recovery time, data of said one block is transferred again from the beginning.

Description

【発明の詳細な説明】 この発明は、データの伝送制御を、メインシステムとデ
ータ伝送ライン間に接続されたインターフエイスで行う
ようにしたデータ伝送システムの停電処理装置に関する
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a power outage processing device for a data transmission system in which data transmission control is performed by an interface connected between a main system and a data transmission line.

ローカルネットワークシステム等のデータ伝送システム
では、各端末が他の端末に対して一定の伝送規則に従っ
てデータを送信出来るようになっている。
In a data transmission system such as a local network system, each terminal can transmit data to other terminals according to certain transmission rules.

一mのローカルネットワークシステムにおいては、デー
タの伝送制御を次の手順によって行う。
In a 1m local network system, data transmission control is performed by the following procedure.

まず伝送ラインに接続された各端末がデータパケットの
先頭に記述されている目的端末アドレスを読み、自己の
アドレスと一致すれば引き続くデータを読み込む。CR
Cチェックの結果、誤りがなければACKバケソトを送
信端末に送る。誤りがあった場合は受信データを捨てる
。送信端末は、タイマで送信後の時間を計測し、一定時
間内にACKがない場合は再送する。また、さらに厳密
な伝送制御をおこなう場合には、ACKパケソトを受信
したときに送信端末に対してRACKパケソトを送信す
る。
First, each terminal connected to the transmission line reads the destination terminal address written at the beginning of the data packet, and if it matches its own address, it reads the following data. CR
As a result of the C check, if there is no error, an ACK packet is sent to the transmitting terminal. If there is an error, the received data is discarded. The transmitting terminal measures the time after transmission using a timer, and retransmits if there is no ACK within a certain period of time. In addition, when performing even stricter transmission control, a RACK packet is transmitted to the transmitting terminal when an ACK packet is received.

以上のデータ伝送制御において、従来はこの制御の実行
を各端末に用意されているアプリケーションプログラム
によって行い、端末のメインシステムと伝送ラインとを
接続ずるコン1−ローラは、単にパケットの組立やデー
タのレヘル変換(電圧レベルと論理レベルの変換)を行
うだけであった。しかしながら、アプリケーションプロ
グラムが必要な分だけメインシステムの負荷が増大ずる
ため、タスク処理を行う際の効率が低下するとともに、
階層的に上位にあるアプリケーションプログラムでデー
タの再送やバケソトの生成を行うために、エラー回復処
理や衝突防止を効率的に1つ迅速に行うことが出来ず、
十分な信頼性と高速性を得ることが出来なかった。
Conventionally, in the data transmission control described above, this control was executed by an application program prepared for each terminal, and the controller 1-roller that connects the main system of the terminal and the transmission line simply assembled packets and transferred data. All that was required was level conversion (conversion between voltage level and logic level). However, as the load on the main system increases as more application programs are required, the efficiency of task processing decreases.
Because data retransmission and bucket generation are performed by hierarchically upper application programs, error recovery processing and collision prevention cannot be performed efficiently and quickly.
It was not possible to obtain sufficient reliability and high speed.

そこで、本出願人はこれらのデータ伝送制御をコントロ
ーラ側、すなわちメインシステムとデータ伝送ライン間
に接続されるインターフェイ,2.側で行い、メインシ
ステムでは送受信データの処理とインターフェイスの管
理だけを行うデータ伝送制御装置について提案した。
Therefore, the present applicant has proposed that these data transmission controls be performed on the controller side, that is, on the interface connected between the main system and the data transmission line, 2. We proposed a data transmission control device in which the main system only processes the transmitted and received data and manages the interface.

しかし、メインシステムとインターフェイスとが上記の
動作を独自に行うようにすれば、停電が発生したときに
両者のフェーズが合わなくなって、転送データの欠落を
引き起す可能性がある。
However, if the main system and the interface perform the above operations independently, there is a possibility that the phases of the two systems will not match when a power outage occurs, resulting in loss of transferred data.

この発明の目的は、停電が発生し、次いで電源が復帰し
たときにかけて、インターフェイスとメインシステムと
の間でフェーズのズレが生じないように、データの転送
制御を行う枦一夕伝送システムの停電処理装置を提供す
ることにある。
The purpose of this invention is to handle a power outage in a transmission system that controls data transfer so that there is no phase shift between the interface and the main system after a power outage occurs and then when the power is restored. The goal is to provide equipment.

この発明を要約すれば次のようになる。This invention can be summarized as follows.

メインシステムでのインターフェイス管理状態を記憶す
る管理情報記憶手段をインターフェイス側に設ける。こ
の記憶手段は、例えば管理情報の1例である1ブロノク
のデータ転送完了時、を表示するフラグで構成され、メ
インシステムでセットされる。少なくともこの記憶手段
は停電時において機能し、停電時の管理情報を記憶する
。後述の実施例のように通席時にも管理情報を更新記憶
していくようにしても良い。インターフェイス側にはさ
らにメインシステJ1側から停電通知があったとき、上
記の管理情報を退避して記憶するバソテリバンクアップ
記憶手段を設ける。すなわら、停電時での管理情報は、
バソテリパソクアップされたメモリに記憶されて、電源
復帰時のデータ転送制御においてその管理情報が参照出
来るようにする。
Management information storage means for storing the interface management status in the main system is provided on the interface side. This storage means is composed of a flag that indicates when one block of data transfer is completed, which is an example of management information, and is set by the main system. At least this storage means functions during a power outage and stores management information at the time of a power outage. As in the embodiment described later, management information may be updated and stored even when attending a seat. The interface side is further provided with a battery backup storage means for saving and storing the above management information when a power outage notification is received from the main system J1 side. In other words, management information during a power outage is
The management information is stored in the backup memory so that the management information can be referenced in data transfer control when the power is restored.

一方、メインシステム側には、メインシステムでの停電
処理完了後インターフェイスの停電処理完了を判定する
停電処理判定手段と、この判定手段によって停電処理が
判定されたときにメインシステムおよびインターフェイ
スをリセソトする手段とを設ける。すなわち、メインシ
ステムとインターフェイスの両方が停電処理を完了した
時点でリセットしてバワーオフ状態に移行する。
On the other hand, on the main system side, there is a power outage processing determining means for determining whether the power outage processing of the interface is completed after the power outage processing in the main system is completed, and a means for resetting the main system and the interface when the power outage processing is determined by this determining means. and. That is, when both the main system and the interface complete power outage processing, they are reset and transitioned to the power-off state.

この発明によれば、メインシステムとインターフェイス
の両方が停電処理を完了してからりセントされ、しかも
停電時におけるメインシステムでのインターフェイス管
理状態が停電中記憶されているので、電源復帰時には停
電時の管理情報を参照しながらデータ転送制御を再開出
来、メインシステムとインターフェイスとの間において
のフェーズのズレを完全に無くすことが出来る。
According to this invention, both the main system and the interface are sent after the power outage processing is completed, and the interface management state in the main system at the time of the power outage is stored during the power outage, so when the power is restored, the Data transfer control can be restarted while referring to the management information, and the phase shift between the main system and the interface can be completely eliminated.

以下この発明の実施例を図面を参照して説明する。Embodiments of the present invention will be described below with reference to the drawings.

第1図はこの発明を実施するロー力ルネソトワークシス
テムのブロック構成図である。同図において、メインシ
ステムである端末装置A−Nは、伝送インターフェイス
I/Fを介して同軸ケーブルから成るデータ伝送ライン
Lに接続され、各端末相互間で任意に各種データの送受
信が行なえるようになっている。第2図は上記伝送・イ
ンターフェイスI/Fのブロック構成図、第3図はさら
にその詳細なブロック構成図である。
FIG. 1 is a block diagram of a low-power rune software work system that implements the present invention. In the figure, terminal devices A-N, which are the main system, are connected to a data transmission line L consisting of a coaxial cable via a transmission interface I/F, so that various data can be freely sent and received between each terminal. It has become. FIG. 2 is a block diagram of the transmission/interface I/F, and FIG. 3 is a more detailed block diagram thereof.

伝送インターフェイスI/Fは、送信制御回路10、受
信制御回路11、および送受信データ転送制御回路l2
から構成される。送信制御回路10は、送信データまた
は応答パヶッI・を所定のパケットフォマットにて伝送
ライン上に送出し、受信制御回路I1は、伝送ラインI
,がら受信したデータのパケットフォマットを判定し、
その判定結果に基づいて応答バケソトを作成する。また
、送受信データ転送制御回路l2は、受信制御回路l■
,送信制御回路IOと端末装置との間で送受信データの
転送を制御する。
The transmission interface I/F includes a transmission control circuit 10, a reception control circuit 11, and a transmission/reception data transfer control circuit l2.
It consists of The transmission control circuit 10 sends the transmission data or response packet I on the transmission line in a predetermined packet format, and the reception control circuit I1 sends out the transmission data or response packet I on the transmission line I.
, determine the packet format of the received data,
A response bucket is created based on the determination result. In addition, the transmission/reception data transfer control circuit l2 is a reception control circuit l■
, controls the transfer of transmitted and received data between the transmission control circuit IO and the terminal device.

第3図において、上記送受信データ転送制御回路l2は
、送信データ転送制御回路lと受信データ転送制御回路
2とで構成される。送信データ転送制御回路Iは、各種
データを送信する場合に端末装置側から送られてきたデ
ータを1バイト毎に一時記憶するレジスタaと、同レジ
スタaへの書込みを許可す′るときにセソトずるフラグ
WENと、端末装置が総ての送信データを転送したとき
にセットされるフラグWEDと、停電が起きたときに端
末装置によってセソトされる停電フラグPDFとを有す
る。また、受信データ転送制御回路2は、各種データを
受信する場合にインターフェイス側の受信データを1バ
イト毎に端末装置に転送するための取込みレジスタbと
、受信データがあることをチャネル毎に端末装置に知ら
せるためのフラグRENと、端末装置が総ての受信デー
タを取り込んだことをチャネル毎にインターフェイス側
に知らせるためのフラグREDとおよび端末装置が受信
準備完了状態にあることをインターフェイス側に知らせ
るためのフラグRDYとを有する上記送信制御回路10
,および受信制御回路11は、チャネル毎の受信データ
を記憶する受信パソファG,送信データを記憶するバッ
ファAとB.後述のバックオフタイマ値を選択するため
の乱数テーブルTBL.停電時に送受信データ転送制御
回路のフラグ類をセーブ記憶するエリアH,およびイン
ターフェイス制御プログラムを記憶し、バッテリEでバ
ソクアソプされているメモリ4、送受信段階でのタイマ
ー,インターラプト機能を制御する制御回路6、メモリ
4と上記送受信データ転送制御回路1.2との間でデー
タをDMA転送するDMAC3、送受信動作を制御し、
送受信バッファ用C,Fおよび送受信用シフトレジスタ
D,Eを有するリンクコントローラ7、送信時に送信デ
ータを変調してライン上へ送出するとともに複数の端末
から同時にアクセス要求があったがどうかを検出する衝
突検出回路を含むライン制御回路8、ライン上の信号を
受信し、その信号を復調してリンクコントローラ7へ転
送するライン制御回路9、およびインターフェイス全体
をメモリ4に記憶されている制御プログラムに従って制
御するサブCPU5から構成される。
In FIG. 3, the transmission/reception data transfer control circuit 12 is comprised of a transmission data transfer control circuit 1 and a reception data transfer control circuit 2. The transmission data transfer control circuit I has a register a that temporarily stores byte by byte of data sent from the terminal device when transmitting various data, and a seso register that stores data sent byte by byte when transmitting various data. It has a cheat flag WEN, a flag WED that is set when the terminal device has transferred all the transmission data, and a power outage flag PDF that is set by the terminal device when a power outage occurs. The reception data transfer control circuit 2 also includes an acquisition register b for transferring the reception data on the interface side to the terminal device byte byte when receiving various data, and a reception register b for transferring the reception data on the interface side to the terminal device for each byte, and a reception register b for transmitting the reception data on the interface side to the terminal device for each channel. a flag REN to notify the user that the terminal device has received all received data, a flag RED to notify the interface side for each channel that the terminal device has taken in all received data, and a flag RED to notify the interface side that the terminal device is ready for reception. The transmission control circuit 10 has a flag RDY of
, and the reception control circuit 11 includes a reception buffer G for storing reception data for each channel, and buffers A and B for storing transmission data. Random number table TBL. for selecting a backoff timer value, which will be described later. Area H for saving and storing flags of the transmitting/receiving data transfer control circuit in the event of a power outage, memory 4 for storing the interface control program and being fully serviced by battery E, and control circuit 6 for controlling the timer and interrupt functions at the transmitting/receiving stage. , a DMAC 3 for DMA transfer of data between the memory 4 and the transmission/reception data transfer control circuit 1.2, and a DMAC 3 for controlling transmission/reception operations;
A link controller 7 having transmitting/receiving buffers C and F and transmitting/receiving shift registers D and E, and a collision controller that modulates the transmitted data and sends it onto the line during transmission, and detects whether there are access requests from multiple terminals at the same time. A line control circuit 8 including a detection circuit, a line control circuit 9 that receives a signal on the line, demodulates the signal, and transfers it to the link controller 7, and the entire interface are controlled according to a control program stored in the memory 4. It is composed of a sub CPU5.

第4図は上記ライン制御回路8に設けられる衝突検出回
路の回路図である。同図のように、変調後の信号と復調
前段の信号とを、イクスクルーシブOR回路8lに与え
、その出力をフリップフロップ82のセット信号にして
いる。このようにすることにより、送信データと受信デ
ータとが異なるとき、すなわち衝突時において衝突検出
信号COが得られる。
FIG. 4 is a circuit diagram of a collision detection circuit provided in the line control circuit 8. As shown in the figure, the modulated signal and the pre-demodulation signal are applied to an exclusive OR circuit 8l, whose output is used as a set signal for the flip-flop 82. By doing so, the collision detection signal CO can be obtained when the transmitted data and the received data are different, that is, at the time of a collision.

第5図は上記ライン制御回路9に設けられるキ十リア検
出回路の回路図である。また第6図は同キャリア検出回
路のタイミングチャートである。
FIG. 5 is a circuit diagram of a signal detection circuit provided in the line control circuit 9. Moreover, FIG. 6 is a timing chart of the same carrier detection circuit.

この実施例では、ライン上にデータの流れがあることを
示すキャリア信号CDIと一定時間キ中リア信号CDI
がないことを示す信号CD2を111るようにしている
。すなわち、ラインより受けた信号からレシーブクロッ
クaを復調回路9oによって作成し、パイナリーカウン
タ91およびランチ回路92へ入力して、信号CI)l
とCD2を得ている。第6図に示すように、レシーブク
ロックが無くなるとパイナリーカウンタ9lのCL(ク
リアー)端子が解除され、カウントが基本クロックφに
より進んで搬送波のミラーイメージ信号であるキャリア
信号CDIが得られる。さらにカウントが進むと、クロ
ックφの周期によりあらかじめ設定された処理時間tを
加えた信号CD2が得られる。
In this embodiment, a carrier signal CDI indicating that there is a flow of data on the line and a rear signal CDI that is held for a certain period of time are used.
A signal CD2 indicating that there is no signal is set to 111. That is, the demodulation circuit 9o creates a receive clock a from the signal received from the line, inputs it to the pinary counter 91 and the launch circuit 92, and generates the signal CI)l.
And I got CD2. As shown in FIG. 6, when the receive clock disappears, the CL (clear) terminal of the pinary counter 9l is released, the count advances according to the basic clock φ, and the carrier signal CDI, which is a mirror image signal of the carrier wave, is obtained. As the count progresses further, a signal CD2 is obtained which is obtained by adding a preset processing time t to the period of the clock φ.

各端末は、この信号CDIと信号CD2を個々に検出し
、図示しない回路によって、信号CD2が1ロー」(論
理0)であるときにだけデータバケソトを送出出来、A
CKパケットまたはRACKパケットは信号CDIが「
ロー」(論理0)であるときにだけ送出出来るように制
御する。このようにして信号CDI,CD2をチェソク
しながら送受信制御することにより、データパケット送
出後のACK,およびRACKパヶソト送出に関して他
の端末からのデータバヶソトとの衝突が防止される。第
7図はライン上の信号と上記信号CDI.,CD2との
関係を示している。図において時間tはライン上にキャ
リア信号がない一定時間を表す。この時間は少なくとも
ACKおよびRACKパケットの応答パケット再送許容
時間よりも長く設定されていて、応答パヶソトがこの時
間t内に送出されなければ、ラインの占有は解除され、
他の端末からの新たなアクセスが許可される。
Each terminal individually detects the signal CDI and the signal CD2, and uses a circuit not shown to transmit the data bucket only when the signal CD2 is 1 low (logical 0).
A CK packet or a RACK packet has a signal CDI of “
It is controlled so that it can be transmitted only when the signal is "low" (logical 0). By controlling the transmission and reception while checking the signals CDI and CD2 in this manner, collision with data packets from other terminals is prevented regarding ACK and RACK packet transmission after data packet transmission. FIG. 7 shows the signals on the line and the above signal CDI. , CD2. In the figure, time t represents a certain period of time when there is no carrier signal on the line. This time is set to be longer than at least the allowable retransmission time of response packets for ACK and RACK packets, and if a response packet is not sent within this time t, the line is no longer occupied.
New access from other devices is allowed.

第8図はこのローカルネットワークでの基本的な伝送手
順を示す。同図(A)は送信端末と受信端末がともに正
常な状態にある場合の手順である。まず、送信端末から
フラグ,アドレス等のヘッダー部を備えたデータパケッ
トを相手先へ送信する。このデータパケットが正常に受
信されるとデータパケット受信端末はACKパケットを
送信する。ACKパケットを受信したデータパケット送
信端末は、ACKパケットに対する応答パケット(RA
CKパケット)を送信する。データパケット送信に対し
て、受信端末がデータバケソトを受け入れる準備がない
場合は同図(B)のように、受信端末がNRDYバケソ
トを送信して終了する。また、送信されてきたデータパ
ケットのチャネルに対応ずる受信バッファが塞がってい
る場合は、同図(C)に示すようにバッファフルのステ
ートメントを付けたNRDYパケットを送信して終了す
る。
FIG. 8 shows the basic transmission procedure in this local network. FIG. 3A shows the procedure when both the transmitting terminal and the receiving terminal are in a normal state. First, a data packet including a header section such as a flag and an address is transmitted from a transmitting terminal to a destination. When this data packet is received normally, the data packet receiving terminal transmits an ACK packet. The data packet transmitting terminal that has received the ACK packet sends a response packet (RA) to the ACK packet.
CK packet). If the receiving terminal is not ready to accept the data packet for data packet transmission, the receiving terminal transmits the NRDY packet and ends the process, as shown in FIG. If the receiving buffer corresponding to the channel of the transmitted data packet is full, an NRDY packet with a buffer full statement is sent as shown in FIG.

第9図はパケットフォマットを示す図である。FIG. 9 is a diagram showing the packet format.

このパケットは、データをフラグ(リーディングフラグ
)とフラグ(トレーリングフラグ)で区切るフォマソト
で構成される。両方のフラグコードは7E(ヘキサデシ
マル)である。ディスティネーションアドレスDAは受
信局を指定する。ソースアドレスSAは送信局を指定す
る。データタイプTYPEは転送フレームの種類を指定
する。その種類はデータ,ACK,RACK,NRAD
Yの4種類である。チャネル番号CIl.NOはパケッ
トのチャネル種別を指定する。回線ステータスDLSは
NRADYパケット送信時でのステートメントを記述す
る。そのステートメントには、受信不可と受信バッファ
フルとがある。パイトカウンタBCLとBCHはデータ
のバイト数を指定する。データフィールドDATAは転
送するデータをセットする。このデータフィールドDA
TAは、データパケットのみに存在する。CRCはエラ
ー検出用コードを与える。
This packet consists of a format that separates data into a flag (leading flag) and a flag (trailing flag). Both flag codes are 7E (hexadecimal). Destination address DA specifies the receiving station. Source address SA specifies the transmitting station. Data type TYPE specifies the type of transfer frame. The types are data, ACK, RACK, NRAD
There are four types of Y. Channel number CIl. NO specifies the channel type of the packet. Line status DLS describes the statement at the time of NRADY packet transmission. The statements include receive not possible and receive buffer full. Byte counters BCL and BCH specify the number of bytes of data. The data field DATA sets the data to be transferred. This data field DA
TA is present only in data packets. CRC provides a code for error detection.

次に第3図に示すインターフェイスの動作を、第10図
〜第12図を参照して説明する。第lO図〜第11図は
送信動作および受信動作を示し、第12図は停電処理動
作を示す。
Next, the operation of the interface shown in FIG. 3 will be explained with reference to FIGS. 10 to 12. FIGS. 10 to 11 show the transmitting operation and receiving operation, and FIG. 12 shows the power outage processing operation.

(1)送信動作 第10図(A)〜(C)は、データの送信動作を示すフ
ローチャートである。
(1) Transmission operation FIGS. 10(A) to 10(C) are flowcharts showing the data transmission operation.

今、仮に端末袋置Aから端末装置Nに対して特定のデー
タを送信するものとする。
Now, assume that specific data is to be transmitted from terminal storage A to terminal device N.

まず、ステップnl(以下ステップniを単にniとい
う)で、端末装置Aは送信データ転送制御回路1の書込
みレジスタaに対して1バイトのデータを書き込むとと
もに、フラグWENをセントする。この時、端末装置A
からは送信データ長(バイト数)と、データをどのチャ
ネルで取り扱うかを指定するチャネル情報CHnとが上
記データとともに送られて所定のエリアにセットされる
これらのデータを受信した転送制御回路lは、送信デー
タのDMA転送チャネルであるDRQ3チャネル(イン
ターフェイス内でデータ転送に用いるチ中ネル)を選択
し、DMAC3に対してDMA転送を指示する(n2)
。DMAC3はその衛示を受けると、メモリ4の転送先
アドレスを設定し(n3)、そのアドレスにある送信バ
ッファ八にレジスタaのデータを転送する(n4)。■
バイトの転送が終了すると、フラグWENをリセットす
るくn5)。端末装WAは上記フラグWENを監視して
いて、リセソトされるのを知ると(n21)、n20へ
戻って次の1バイトのデータをレジスタaに送る。こう
して、端末装置八ではフラグWENを監視し、そのフラ
グがリセソトされる毎に1バイトのデータをレジスタa
に書き込む一方、インターフェイス側では、I)MAC
によって、レジスクaのデータを送信バソファAに順次
1)MA転送する。総てのデータの転送を終結すると、
端末装置AはフラグWEDをセノトしに行<(n22)
。このフラグWEDがセントされると、制御回路1は、
n7,n8で1旨定バイト数の確認チェソクと送信コマ
ンドのチェソクを行い、正しいときn9へ進む。DMA
C3は、n9,nlOでバソファAからバッファBへの
データの乃MA転送を実行する。転送が終了すれば、送
信バソファが空き状態であることを示すためにフラグW
EDをリセットする(nil)。端末装置Aは、フラグ
WEDがリセット状態であることを知ると、次に送信す
べきデータがある場合に、上記と同じようにして送信デ
ータをバッファ八に転送1′る。
First, in step nl (hereinafter step ni will be simply referred to as ni), the terminal device A writes 1 byte of data to the write register a of the transmission data transfer control circuit 1, and also sets the flag WEN. At this time, terminal device A
From there, the transmission data length (number of bytes) and channel information CHn specifying which channel to handle the data are sent together with the above data and set in a predetermined area.The transfer control circuit l that received these data is , selects the DRQ3 channel (channel used for data transfer within the interface), which is the DMA transfer channel for the transmission data, and instructs DMAC3 to perform DMA transfer (n2)
. Upon receiving the instruction, the DMAC 3 sets a transfer destination address in the memory 4 (n3), and transfers the data in register a to the transmission buffer 8 located at that address (n4). ■
When the byte transfer is completed, the flag WEN is reset (n5). The terminal WA monitors the flag WEN, and when it learns that it will be reset (n21), it returns to n20 and sends the next 1 byte of data to register a. In this way, the terminal device 8 monitors the flag WEN, and each time the flag is reset, 1 byte of data is stored in the register a.
while on the interface side, I) MAC
1) MA transfer the data of the register disk A to the transmission bath sofa A in sequence. When all data transfer is finished,
Terminal device A goes to set flag WED <(n22)
. When this flag WED is sent, the control circuit 1
At n7 and n8, the check for the fixed number of bytes for 1 and the check for the transmission command are performed, and if correct, proceed to n9. D.M.A.
C3 executes MA transfer of data from buffer A to buffer B at n9, nlO. When the transfer is completed, the flag W is set to indicate that the sending bath sofa is free.
Reset ED (nil). When the terminal device A learns that the flag WED is in the reset state, if there is data to be transmitted next, the terminal device A transfers the transmission data to the buffer 8 in the same manner as described above.

以上のように、フラグWEDは端末装置でのインターフ
ェイス管理状態を表す記憶手段を構成する。すなわち、
端末装置からデータ転送後フラグWEDがリセソト状態
にあれば現在のブロックデータの転送継続指示を表し、
セット状態にあればブロックデータの転送を終了したこ
とを表す。
As described above, the flag WED constitutes a storage means representing the interface management state in the terminal device. That is,
If the flag WED is in the reset state after data transfer from the terminal device, it indicates an instruction to continue transferring the current block data,
If set, it indicates that block data transfer has been completed.

一方、上記のようにして送信バソファBに送信データが
準備されると、インターフェイスの動きを制御するCP
U5は送信指示を行い(n30)、リンクコントローラ
7を送信レディ状態に設定する(n31)。このときリ
ンクコントローラ7は、キャリア検出回路CDで得た信
号CD2をチェックし、「ロー」であれば直ちにライン
制御回路8を介して、パケットの最初のデータであるリ
−デイングフラグFをライン上に送出する(n32)。
On the other hand, when the transmission data is prepared on the transmission bath sofa B as described above, the CP that controls the movement of the interface
U5 issues a transmission instruction (n30) and sets the link controller 7 to a transmission ready state (n31). At this time, the link controller 7 checks the signal CD2 obtained by the carrier detection circuit CD, and if it is "low", immediately sends the leading flag F, which is the first data of the packet, onto the line via the line control circuit 8. (n32).

続いてCPU5はDMAC3にメモリ4のバッファBの
先頭アドレスとデータのバイト数を設定し(n33.n
34)、バソファBからリンクコントローラ7へのデー
タ転送を指示する。この間リンクコントローラ7は、上
記のリーディングフラグFを送出したままであるが、n
34を終えると同フラグFの送出を停止する(n35)
Next, the CPU 5 sets the start address of buffer B of the memory 4 and the number of data bytes in the DMAC 3 (n33.n
34), instructs data transfer from bath sofa B to link controller 7; During this time, the link controller 7 continues to send out the above-mentioned leading flag F, but n
After completing 34, the sending of the same flag F is stopped (n35)
.

次に、データ転送先であるリンクコントローラ7の送信
用バッファCが空き状態で(n36)、且つリンクコン
I・ローラ7よりDMAC3に対してバッツァCへのデ
ータ転送可信号が送出されると(n37)、n3Bで1
バイト分のデータがバソファBからバッファCへ転送さ
れる。リンクコントローラ7はさらにバソファCへの転
送データをシフトレジスタDに転送し、1バイト分、シ
フトレジスタDへ転送ずると(n40)、再びn37へ
戻ってDMA転送を実行するとともに、シフトレジスタ
Dのデータをライン制御回路8に送って、変調後ライン
へ送出する(n41”n44)。
Next, when the transmission buffer C of the link controller 7, which is the data transfer destination, is empty (n36), and the link controller I/roller 7 sends a data transfer enable signal to the DMAC 3 to the Bazza C ( n37), 1 in n3B
Bytes of data are transferred from buffer B to buffer C. The link controller 7 further transfers the transfer data to the bath sofa C to the shift register D, transfers 1 byte to the shift register D (n40), returns to n37 again, executes the DMA transfer, and transfers the data of the shift register D. The data is sent to the line control circuit 8 and sent out to the line after modulation (n41"n44).

後述するように、以上の動作が二つ以上の端末で同時に
行われていた場合は、少なくともデータのうちソースア
ドレスを送出した時に衝突が発生するが、この衝突が衝
突検出回路COで検出されたときはn44からn60へ
進んで送信を禁止する。今、衝突がないものとすると、
リンクコン1・ローラ7は順次バソファCからシフトレ
ジスクDへの転送を行い、前述のようにしてバソファC
へDMA転送されるデータを順次ライン制御回路8へ送
る。この動作(n37〜n’45)を繰り返して行き、
指定されたデータ長の送出が完了するとDMAC3は内
蔵するパイトカウンタがカウントアップすることにより
、リンクコントローラ7ヘフレーム送出完了を告げる(
n46)。これを受けたリンクコントローラ7は、CR
Cを付け、■フレームのデータ送出を完了する。そして
、リンクコントローラ7はC.PU5に対し、■フレー
ムのデータ送信が完了したことを示すインターラプト信
号を送り(n47)、CPU5はリンクコン1一ローラ
7を介して、ライン制御回路8にトレーリングフラグF
の送出を指示する(n4B)。1−レーリングフラグF
ば、CPU5が送信完了処理を行い(n49)、受信準
備処理を行う(n50)まで継続して送出し、これらの
処理が完了した時点でフラグ送出を停止ずるとともに(
n51)、インターフェイスを受信モードに設定する(
n52)。
As will be described later, if the above operations are performed simultaneously on two or more terminals, a collision will occur at least when the source address of the data is sent, but this collision will be detected by the collision detection circuit CO. If so, the process advances from n44 to n60 to prohibit transmission. Now, assuming there are no collisions,
The link controller 1/roller 7 sequentially transfers the data from the bath sofa C to the shift register disk D, and transfers the data from the bath sofa C to the shift register disk D as described above.
The data transferred by DMA to the line control circuit 8 is sequentially sent to the line control circuit 8. Repeat this operation (n37 to n'45),
When the transmission of the specified data length is completed, the DMAC 3 counts up the built-in piete counter, thereby notifying the link controller 7 that the frame transmission has been completed (
n46). Upon receiving this, the link controller 7
Attach C and complete data transmission of ■ frame. And the link controller 7 is C. The CPU 5 sends an interrupt signal indicating that the frame data transmission has been completed (n47), and the CPU 5 sends a trailing flag F to the line control circuit 8 via the link controller 1 and the roller 7.
(n4B). 1-Railing flag F
For example, the CPU 5 performs a transmission completion process (n49) and continues sending the flag until it performs a reception preparation process (n50), and when these processes are completed, flag sending is stopped and (
n51), set the interface to receive mode (
n52).

次にn44において、データバケソ1・が衝突した場合
の動作を説明する。
Next, in n44, the operation when the data bucket 1 collides will be explained.

データバケソトの衝突は、各端末によるアクセスが平等
である共通チャネル方式において、同時に二つ以上の端
末が送信しようとするときに生じる。信号CD2によっ
てアクセスタイミングが完全に異なる場合の衝突は防止
されるが、相互に離れた端末間では伝播遅延が大きいた
め、他の端末の送信を検出するまで時間がかかる。その
結果、衝突が起こりやすくなる。一般に、共通チャネル
方式を採用したローカルネソトワークシステムでは、上
記の問題を解決するために、衝突検出後一定時間を待っ
て再送するようにしている。この処理をバックオフ処理
という。n60以下はこのバンクオフ処理を行う手順で
ある。
Data bucket collisions occur when two or more terminals attempt to transmit at the same time in a common channel scheme where each terminal has equal access. Although the signal CD2 prevents collisions when the access timings are completely different, since there is a large propagation delay between mutually distant terminals, it takes time to detect the transmission of another terminal. As a result, collisions are more likely to occur. Generally, in a local network system that uses a common channel method, in order to solve the above problem, data is retransmitted after waiting a certain period of time after a collision is detected. This processing is called backoff processing. The steps below n60 are the steps for performing this bank-off process.

衝突がi!i突検出回路COで検出されると、データパ
ケソトを送信した端末はずべて送信を停止する(n60
)。次に他の端末が衝突が発生したことを容易に検出で
きるようにするためラインを「ハイ」に持ち上げる(n
61’)。続いて信号CD2の立ち下がりを検出し(n
62)、その立ち下がりタイミングでメモリ4に設けて
ある乱数テーブルTBLから所定のパソクオフタイマー
値を読み出し(n63)、制御回路6のタイマー1゛に
その値を設定する(n64)。続いてこのようにしてセ
ットした所定時間が経過すれば(n65)、CPU5は
再度信号CD2の状態を検出し、そのレベルが「ロー」
であってアクセス可能なときであれば、n30へ戻って
上述した送信動作を繰り返す。信号CD2のレベルが「
ハイ」であってライン使用が許可されない状態であれば
、n67へ進んで信号CD2が立ち下がるタイミングで
再びバックオフタイマーを起動して(n64)、タイマ
ー経過時点が信号CD2のオフ状態になるときを待つ。
Collision is i! When detected by the i-detection circuit CO, all terminals that sent data packets stop sending (n60
). The line is then pulled high (n) so that other terminals can easily detect that a collision has occurred.
61'). Next, the falling edge of the signal CD2 is detected (n
62) At the falling timing, a predetermined passoff timer value is read from the random number table TBL provided in the memory 4 (n63), and the value is set in the timer 1' of the control circuit 6 (n64). Subsequently, when the predetermined time set in this way has elapsed (n65), the CPU 5 detects the state of the signal CD2 again, and the level becomes "low".
If the access is possible, the process returns to n30 and the above-described transmission operation is repeated. The level of signal CD2 is “
If the state is "high" and line use is not permitted, proceed to n67 and start the back-off timer again at the timing when the signal CD2 falls (n64), and when the timer elapses, the signal CD2 becomes off. wait.

第13図はA,B,C端末がほぼ同時(伝播遅延等を原
因に若干の誤差がある)にアクセスしようとして衝突が
生じたときの動作を示す。A,B,C各端末が図示する
ように衝突を検出すると、直ちに送信を停止して、信号
CD2の立ち下がりタイミングで、それぞれの端末で乱
数テーブルで発生させたバソクオフタイマー値t1,t
2,t3をスタートする。時間(lを経過した時点でA
端末は、信号CD2の状態を検出する。このときB端末
およびC端末はタイマー値t2,t3が経過していない
ので送信をすることが出来ない。したがってその他の端
末からのアクセスがない限り、信号CD2はオフ状態に
あるためA端末からの再送が可能になる。この例ではA
端末からB端末に対してデータパケットを送信するケー
スを示している。衝突があったため送信出来なかった他
のB端末およびC端末については、A端末の送信が成功
した.後に再送が試みられる。この方法は上記t同様に
行う。すなわち、信号CD2の立ち下がりタイミングで
タイマー値t2,t3をスタートし、B端末は時間L2
が経過した時点で信号CD2の状態をチェソクして、オ
フであれば再送をする。また、C端末は時間t3が経過
した時点で信号CD2をチェソクし、オフであれば再送
する。
FIG. 13 shows the operation when terminals A, B, and C attempt to access almost simultaneously (with some errors due to propagation delays, etc.) and a collision occurs. When each terminal A, B, and C detects a collision as shown in the figure, they immediately stop transmitting, and at the falling timing of signal CD2, each terminal sets the bass off timer values t1, t generated using a random number table.
2. Start t3. When time (l has elapsed, A
The terminal detects the state of signal CD2. At this time, terminal B and terminal C cannot transmit because the timer values t2 and t3 have not elapsed. Therefore, as long as there is no access from other terminals, signal CD2 is in the OFF state, allowing retransmission from terminal A. In this example, A
A case is shown in which a data packet is transmitted from a terminal to terminal B. Regarding the other terminals B and C, which could not transmit due to a collision, the transmission of terminal A was successful. A retransmission will be attempted later. This method is carried out in the same manner as t above. That is, timer values t2 and t3 are started at the falling timing of signal CD2, and terminal B starts at time L2.
The state of the signal CD2 is checked at the time when the time has elapsed, and if it is off, retransmission is performed. Furthermore, the C terminal checks the signal CD2 when the time t3 has elapsed, and if it is off, retransmits it.

こうしてバンクオフ処理をしながら衝突した端末からの
送信の順番を整理していく。
In this way, the order of transmissions from colliding terminals is sorted out while performing bank-off processing.

以上のように、この実施例ではバックオフタイマーの起
動時点を信号CD2の立ち下がりタイミングに設定し、
端末の種類に無関係に同一のタイミングでスターl・す
るようにしている。このため、再び衝突が生じる確率を
小さく出来、バックオフタイマーの精度を向上出来る利
点がある。なお、n64でセットされるバックオフタイ
マー値は、新たな衝突が生じない限り次にn64でセン
トされるときも同じ値となるようにしている。
As described above, in this embodiment, the starting point of the back-off timer is set at the falling timing of the signal CD2,
It is designed to start at the same timing regardless of the type of terminal. Therefore, there is an advantage that the probability of collision occurring again can be reduced and the accuracy of the back-off timer can be improved. The backoff timer value set at n64 is set to the same value the next time a cent is sent at n64 unless a new collision occurs.

以上の動作によってライン上に送出されるデータパケッ
トの構成を第14図に示す。
FIG. 14 shows the structure of the data packet sent out on the line by the above operation.

同図に示すように、パケットの先頭にm個のリーデイン
グフラグFが位置し、バケフ1・の終りにjllmのト
レーリングフラグFが位置している。前述のようにm個
のフラグぱn32〜n35で送出され、j個のフラグは
n48〜n51で送出される。このようにパケソl一の
先頭と終りにフラグを連続させることによって、送信端
末は終りのフラグ連続送出の時間に受信弓エ備をするこ
とが出来、受信端末は、連続するリーディングフラグを
受信する間にモードを正雷な受信モードにすることが出
来る。
As shown in the figure, m leading flags F are located at the beginning of the packet, and a trailing flag F of jllm is located at the end of the packet. As described above, m flags are sent out at times n32 to n35, and j flags are sent out at times n48 to n51. In this way, by consecutively sending flags at the beginning and end of a packet, the transmitting terminal can prepare for reception at the time when the last flag is continuously sent, and the receiving terminal can receive the consecutive leading flags. In between, you can change the mode to normal reception mode.

受信端末が正常な受信モードに設定される場合は次のよ
うなときである。たとえば、受信端末が二つ以上の送信
端末から同時に受信したとすると、ソースアドレスを受
信したときで衝突を検出する。このとき、受信端末はリ
ーディングフラグを既に受信しており、しかも受信モー
ドはりセントされないからデータ待ち状態にある。しか
し、衝突を起こした二つの送信端末は送信を打ち切って
、次のチャンスを待っている状態にある。そこでどちら
かの端末或いは他の端末から新たなデータパケットの送
信があれば、データ待ち状態にある受信端末は最初のリ
ーディングフラグをトレーリングフラグと見なして(リ
ーディングフラグとトレーリングフラグとはともに「7
E」の同一コードにある)、そのリーディングフラグを
受けた時点でパケットのフォマソトが間違っていること
を検出し(フォマット長が短い)、エラー処理を行う。
The receiving terminal is set to normal receiving mode in the following cases. For example, if a receiving terminal receives signals from two or more transmitting terminals at the same time, a collision is detected when the source address is received. At this time, the receiving terminal has already received the reading flag and is in a data waiting state because the receiving terminal is not set to receive mode. However, the two transmitting terminals that caused the collision have stopped transmitting and are waiting for the next chance. Therefore, when a new data packet is transmitted from either terminal or another terminal, the receiving terminal in the data waiting state regards the first leading flag as the trailing flag (leading flag and trailing flag are both " 7
When the leading flag is received, it is detected that the format of the packet is incorrect (the format length is short), and error handling is performed.

したがって、このような場合、もしリーディングフラグ
が1個であると、エラー処理を行った後の受信データも
、リーディングフラグが無いと見なしてエラー処理を行
う可能性がある。
Therefore, in such a case, if there is only one leading flag, there is a possibility that the received data after error processing will be treated as having no leading flag and error processing will be performed.

これに対して、データバケントにリーディングフラグを
適当な数クどけ連続させれば、受信端末は最初のリーデ
ィングフラグを受信したときに、次以降のフラグ受信時
間でエラー処理を行い、正常な受信モードになったとき
にまだ続いているリーディングフラグを次回のパケソト
のフラグとして処理することが可能になる。
On the other hand, if an appropriate number of leading flags are set consecutively in the data packet, the receiving terminal will process the error when receiving the first leading flag and perform normal reception. When the mode is entered, it is possible to process the leading flag that is still in use as a flag for the next Pakesoto.

すなわち、millのリーディングフラグおよびj個の
トレーリングフラグを付けることによって、送信端末と
受信端末とが雷にパケソトを正常に受信出来る状態にす
ることが出来る。
That is, by attaching mill leading flags and j trailing flags, it is possible to put the transmitting terminal and the receiving terminal in a state in which they can normally receive Pakesoto.

(2)受信動作 第11図(A)〜(C)は、データの受信動作を示すフ
ローチャートである。
(2) Reception operation FIGS. 11(A) to 11(C) are flowcharts showing the data reception operation.

上記のようにしてライン上に送出されたデータパケット
は、端末装置N側のライン制御回路9で受信され(n7
0)、復調されて(n71)リンクコン1・ローラフの
シフトレジスタEへ導かれる(n’72)。リンクコン
トローラ7は受信したデータの最初の1バイトがフラグ
かフラグ以外かを判定し、フラグである場合は続いて次
にくる1バイトのデータをシフトレジスタEに導く。フ
ラグ以外である場合は、ディスティネーションアドレス
DAを読み取ってそのアドレスが自己アドレスかどうか
を判定し(n75)、自己アドレスに一致している場合
にn76へ進む。n76でシソ1〜レジスタEの受信デ
ータを受信バソファFに転送し、DMAC3に対して受
信データ有りの指示を行う(n77)。同時にデータを
バソファGに転送するチャネルとして[)RQIを選択
する。受信データ有りの指示を受けたDMAC3は、上
記受信ハッファFの受信データをメモリ4のバッファG
に順次転送する。バソファGはチャネル数だの設けられ
ていて、受信データはパケソ1−で指定されるチャネル
番号に対応ずる部分に転送される。
The data packet sent out on the line as described above is received by the line control circuit 9 on the terminal device N side (n7
0), and is demodulated (n71) and guided to the shift register E of the link controller 1/roller (n'72). The link controller 7 determines whether the first byte of the received data is a flag or something other than a flag, and if it is a flag, guides the next byte of data to the shift register E. If it is other than the flag, the destination address DA is read and it is determined whether the address is the self address (n75), and if it matches the self address, the process advances to n76. At n76, the received data in the registers 1 to E are transferred to the receiving bath sofa F, and an instruction is given to the DMAC 3 that there is received data (n77). At the same time, [)RQI is selected as the channel for transferring data to the bath sofa G. The DMAC 3 receives the instruction that there is received data, and transfers the received data from the reception buffer F to the buffer G of the memory 4.
Transfer sequentially to The bath sofa G is provided with the same number of channels, and the received data is transferred to the portion corresponding to the channel number specified by the Paqueso 1-.

この転送は、レジスタEに導かれるデータを1バイトづ
つ行い、データの区切りを示すフラグ(トレーリングフ
ラグ)を検出した段階で受信を完了したと判断して(n
79)、リンクコントローラ7はCPU5に対して受信
完了指示を行う(n80)。この指示を受けたCPU5
は受信モードを禁止するとともに、送信されてきたデー
タの種別を判定する。データ情報であるときは、受信時
において端末装置がレディ状態にあって受信できるかど
うかを受信データ転送制御回路2内のフラグRDYによ
って判定する(n89)。このフラグRDYは、端末装
置によって制御され、端末装置が受信可能の状態にある
ときはセッ1−されている。そして受信可能であるなら
、続いて指定チャネル(第9図のCH.Noで指定され
る)の受信バソファG(メモリ4内)が空き状態にある
がどうかを判定される(n90)。前述のようにこの受
信バッファGはチャネル数用意されてい”で、各チャネ
ルが空き状態にあるかどうかは、受信データ転送制御回
路2内のフラグRENによって示されるようにしている
。すなわち、任意のチャネルの受信バソファが空いてい
る場合、そのチャネルに対応するフラグRENはセット
される。反対にバッファフルの状態にある場合、そのチ
ャネルに対応ずるフラグRENはリセットされる。n9
0で指定されたチャネルの受信バソファが空き状態にあ
ると、データバケソトを送信してきた端末にACKバケ
ソトを送信する(n91)。第11図には示していない
が、このACKバケソトの組立はCPU5によって行う
。第9図から明らかなように、ACKパケットの組立は
極めて簡単であり、ディスティ不一ションアドレスDA
を除く他のデータは固定コードとなる。ディスティネー
ションアドレス自体も作成する必要が無く、送られてき
たデータパケットのソースアドレスSAをそのまま使用
すれば良い。ACKパケット送信後、CPU5は受信デ
ータ転送制御回路2内のデータ有りフラグREN(指定
チャネルの)をセントし(n92)、再受信モードにセ
ントされる。
This transfer is performed byte by byte of data led to register E, and it is determined that reception is complete when a flag (trailing flag) indicating a data break is detected (n
79), the link controller 7 instructs the CPU 5 to complete the reception (n80). CPU5 that received this instruction
prohibits the reception mode and determines the type of data sent. If it is data information, it is determined by the flag RDY in the received data transfer control circuit 2 whether the terminal device is in a ready state at the time of reception and can receive it (n89). This flag RDY is controlled by the terminal device, and is set to 1 when the terminal device is in a receiving state. If reception is possible, then it is determined whether the reception bath sofa G (in the memory 4) of the designated channel (designated by CH.No. in FIG. 9) is free (n90). As mentioned above, this reception buffer G has a number of channels prepared, and whether or not each channel is free is indicated by the flag REN in the reception data transfer control circuit 2. When the reception buffer for a channel is empty, the flag REN corresponding to that channel is set.On the other hand, when the buffer is full, the flag REN corresponding to that channel is reset.n9
If the reception bath for the channel specified by 0 is in an empty state, an ACK message is sent to the terminal that sent the data message (n91). Although not shown in FIG. 11, this ACK bucket assembly is performed by the CPU 5. As is clear from FIG. 9, the assembly of the ACK packet is extremely simple, and the destination address DA
Other data except for will be a fixed code. There is no need to create the destination address itself, and the source address SA of the sent data packet can be used as is. After transmitting the ACK packet, the CPU 5 sets the data presence flag REN (of the designated channel) in the reception data transfer control circuit 2 (n92), and enters the re-reception mode.

n89において、端末装置Nが受信不可である場合は、
n93でNRDYパヶ・7トを送信し゜ζ再受信モード
に戻る。また、n90で受信パンファフルである場合、
すなわち指定チャネルに対応するフラグRENがセソト
されている場合は、n94でバッファフル(NRDY)
パケットを送信して再受信モードに戻る。
In n89, if terminal device N cannot receive data,
Send NRDY page 7 with n93 and return to ゜ζ re-reception mode. Also, if the reception breadth is full on n90,
In other words, if the flag REN corresponding to the specified channel is set, the buffer is full (NRDY) with n94.
Send the packet and return to re-receive mode.

一方、端末装置Aでは、端末装置Nで上記の1191に
おいて送信されたACKパケットが受信されるため、n
82−”n83−”n95へと進む。通常の場合データ
パケソト送信後はACKバヶソト待ち状態に遷移するた
め、n95→n96と進み、ACKパケット送信端末つ
まり端末装置Nに対してRACKパケットを送信し(n
96)、送受信制御部を受信モードに設定する(n97
)。
On the other hand, since terminal device A receives the ACK packet transmitted in 1191 above at terminal device N, n
Proceed to 82-"n83-"n95. Normally, after data packet transmission, the state transitions to an ACK packet waiting state, so the process proceeds from n95 to n96, and a RACK packet is transmitted to the ACK packet transmitting terminal, that is, the terminal device N (n
96), set the transmission/reception control section to reception mode (n97)
).

なお、n91でのACKパケット送信、およびn96で
のRACKバヶソト送信は、いずれも送信タイマーTI
によって時間管理され、ACKパケット送信が所定の回
数失敗したとき、およびACKパケットを所定回数送信
してもRACKパケットを送信出来ないとき、エラー処
理がなされるようにしている。
Note that both the ACK packet transmission on the n91 and the RACK packet transmission on the n96 are performed using the transmission timer TI.
, and when ACK packet transmission fails a predetermined number of times, or when a RACK packet cannot be transmitted even after transmitting ACK packets a predetermined number of times, error handling is performed.

上記のようにして端末装置AでRACKパケットが送信
されると、端末装置Nではn82−”n83→n84→
n98と進む。通常の状態遷移となるときはRAcKパ
ヶソトの受信時にはずでにACKパケットの送信を終了
しているがら、n98→n97へと進んで受信モードの
設定をする。もし、ACKパケットを送信していない状
態でRACKパケットを受信したときには、ACKパケ
ットの再送を行って(n99)受信モードの設定をする
(n97)。また、n85で受信パケットがNRDYパ
ケソトである場合、n85→nl00へと進む。通常N
RDYパヶソトを受信する場合は、データパヶソト送信
後であるがら、nl00−ntoiへと進んで、端末装
置に相手側がNRDY状fi(データの受付が出来ない
状態)にあることを知らせて、受信モードを設定する(
n97)。
When the RACK packet is transmitted by terminal device A as described above, terminal device N receives n82-”n83→n84→
Proceed to n98. When a normal state transition occurs, the transmission of the ACK packet is already finished when the RAcK packet is received, and the process proceeds from n98 to n97 to set the reception mode. If a RACK packet is received without transmitting an ACK packet, the ACK packet is retransmitted (n99) and the reception mode is set (n97). Further, if the received packet is an NRDY packet at n85, the process proceeds from n85 to nl00. Normally N
When receiving RDY data, proceed to nl00-ntoi after sending data data, notify the terminal device that the other party is in NRDY state fi (data cannot be accepted), and change the reception mode. Set (
n97).

応答パケットの送信は、以上のように182以下におい
て行われるが、データパケットを正審に受信してACK
バヶソトを送信したときには、送受信データ転送制御回
路を介して、端末装置側との間で受信データの転送処理
が行われる。この手順をnllo以下に示す。
The response packet is sent at 182 and below as described above, but the data packet is received by the main judge and ACK is sent.
When the bagasoto is transmitted, the received data is transferred to and from the terminal device via the transmit/receive data transfer control circuit. This procedure is shown below.

n110において、端末装置Nは、図示しないメインC
PUが指定するチャネルに対応したフラグRENのセッ
ト有無をチェックする。そのチャネルに対応するフラグ
RENがセットされていれば、受信データリードコマン
ドが受信データ制御回路2に与えられる(nlll)。
At n110, the terminal device N connects to the main C (not shown).
Check whether the flag REN corresponding to the channel specified by the PU is set. If the flag REN corresponding to that channel is set, a received data read command is given to the received data control circuit 2 (nllll).

そして上記フラグRENをリセットするとともに(n1
12)、CPU5はメモリ5のバッファG(指定チャネ
ル番号の)の先頭アドレスおよび受信データ長(バイト
数)をDMAC3にセットしてDMA転送の準備を行う
(n113)。さらにCPU5は、データ転送のために
使用するチャネル(上記指定チャネルとは異なりインタ
ーフェイス内のデータ転送チャネルを指す)をDRQ2
に設定し(nl14)、DMA転送を指示する(nll
5)−するとバ,7ファGからレジスタbに対して1バ
イト分のデータが転送され(n1.16)、端末装置N
に対してインターラプト信号が出力される(nl17)
。端末装置Nは、このインターラプト信号を受けると、
n130→nl31へと進んでレジスタbに転送された
データの取込みを行う。一方、データ有りフラグREN
がnll2でリセットされているため、n7Bでバッフ
ァFから新たな1バイト分のデータがバッファGに転送
されてくる。そして同時にn77でフラグRENを再セ
ントする。したがって、nllO以下が再び実行され、
nll6で次の1バイトのデータがレジスタbにセット
され、端末装置Nがそのデータをn13lで取り込む。
Then, the above flag REN is reset and (n1
12), the CPU 5 sets the start address and received data length (number of bytes) of the buffer G (of the designated channel number) in the memory 5 in the DMAC 3 to prepare for DMA transfer (n113). Furthermore, the CPU 5 selects a channel to be used for data transfer (different from the specified channel above, refers to a data transfer channel within the interface) using DRQ2.
(nl14) and instructs DMA transfer (nll
5) - Then, 1 byte of data is transferred from BA, 7FA G to register b (n1.16), and terminal device N
An interrupt signal is output for (nl17)
. When the terminal device N receives this interrupt signal,
The process proceeds from n130 to nl31 to take in the data transferred to register b. On the other hand, the data presence flag REN
is reset at nll2, one new byte of data is transferred from buffer F to buffer G at n7B. At the same time, the flag REN is reset at n77. Therefore, nlllO below is executed again,
The next 1 byte of data is set in register b at nll6, and the terminal device N takes in the data at n13l.

この動作を繰り返し”で、バツファGのデータがレジス
タbを介して総て取り込まれたときにDMA転送が完了
して、nll9→n120へ進んでDMAC3は、動作
を停止する。
Repeating this operation, when all the data in buffer G is taken in through register b, the DMA transfer is completed, the process proceeds from nll9 to n120, and DMAC3 stops its operation.

端末装置N側は、受信データのバイト数と実際に取り込
んだデータのバイト数が一致するかどうかをチェックし
、一致すれば取り込んだデータを所望のフォマットに加
工し(nl33)、その加工処理が完了すれば(nl3
4)、受信データ転送制御回路2のフラグREDをセッ
トして(nl35)取込み完了をインターフエイス側に
知らせる。インターフェイス側のCPU5は、このフラ
グREDのセットを検出すると(n12l)、そのフラ
グREDをリセットして(ri122)次期データの送
受信に備える。
The terminal device N side checks whether the number of bytes of the received data matches the number of bytes of the actually captured data, and if they match, processes the captured data into the desired format (nl33), and the processing is completed. Once completed (nl3
4) Set the flag RED of the reception data transfer control circuit 2 (nl35) to notify the interface side of the completion of the capture. When the CPU 5 on the interface side detects that the flag RED is set (n12l), it resets the flag RED (ri122) and prepares for the next data transmission/reception.

受信動作においては、上記のようにフラグREDが端末
装置でのインターフェイス管理状態記憶手段となる。す
なわち、フラグREDをセットすることでインターフェ
イスからの次のブロックのデータ転送要求を許可するこ
とになる。
In the receiving operation, the flag RED serves as an interface management state storage means in the terminal device, as described above. That is, by setting the flag RED, a data transfer request for the next block from the interface is permitted.

以上のようにして、端末装置Aから端末装置Nに対して
特定のデータの送信が行われる。
As described above, specific data is transmitted from the terminal device A to the terminal device N.

(3)停電処理動作 第12図は停電時の動作を示すフローチャートである。(3) Power outage processing operation FIG. 12 is a flowchart showing operations during a power outage.

停電は端末装置で検出される。図示しない停電検出回路
が停電を検出すると、端末装置は第1番目のインターフ
ェイスから第n番目のインターフェイスまで順次停電の
通知をする。すなわち、n150で第1番目のインター
フェイスのフラグPDFをセットしに行く。同様に、n
l51〜n152で第2番目のインターフェイス〜第n
番目のインターフェイスのフラグPDFをセントしに行
く。
A power outage is detected at the terminal device. When a power failure detection circuit (not shown) detects a power failure, the terminal devices sequentially notify the power failure from the first interface to the nth interface. That is, at n150, the flag PDF of the first interface is set. Similarly, n
2nd interface to nth interface in l51 to n152
Go to set the flag PDF of the th interface.

フラグPDFのセットによって、インターフェイスは割
り込み優先順位の高い停電処理ルーチンを実行ずる。ま
ずn160において送受信データ転送制御回路1,2の
フラグ類をメモリ4のエリアHにセーブする。続いてそ
の他の停電処理を行い(n161)、n162で上記フ
ラグPDFをリセットしてからHALTモードに移行す
る。
By setting the flag PDF, the interface executes a power failure processing routine with a high interrupt priority. First, in n160, the flags of the transmission/reception data transfer control circuits 1 and 2 are saved in area H of the memory 4. Subsequently, other power outage processing is performed (n161), and in n162, the flag PDF is reset, and then the process shifts to HALT mode.

一方、端末装置ではnl52で総てのインターフェイス
のフラグPDFをセットした後、端末装置自身の停電処
理を行う(nl53)。この処理を終えると、次にイン
ターフェイス総てのフラグPDFがリセソトされたかど
うかをチェックする(n154)。総てのフラグPDF
がリセソトされると、n155へ進んでリセット信号を
出力して終了する。n155では、端末装置自身とその
端末装置に接続される総てのインターフェイスがリセッ
トされてパワーオフに移る。
On the other hand, in the terminal device, after setting the flag PDF of all interfaces in nl52, the terminal device itself performs power outage processing (nl53). When this process is completed, it is then checked whether the flags PDF of all interfaces have been reset (n154). All flags PDF
Once reset, the process proceeds to n155, outputs a reset signal, and ends the process. At n155, the terminal device itself and all interfaces connected to the terminal device are reset and powered off.

電源が復帰すると、エリアHに記憶されているフラグ類
が参照されてデータ転送制御が行われる。この場合、送
信動作ではフラグWEDのセント状態が、また受信動作
ではフラグREDのセット状態が参照される。フラグW
EDがセントいるときは、第10図(A)から明らかな
ように1ブロックのデータ転送が完了していることを示
している。すなわち、■ブロックのデータ転送が完才し
た時点で停電が発生したことを表す。したがって、電源
復帰時には、端末装置がこのフラグWEDをチェックし
てセットいるなら、次の新たなブロソクのデータ転送を
行えば良い。反対に電源復帰時にフラグWEDがリセッ
トしているなら、再びもとの1ブロックのデータ転送を
最初から行う。
When the power is restored, the flags stored in area H are referenced and data transfer control is performed. In this case, the sent state of the flag WED is referred to in the transmission operation, and the set state of the flag RED is referred to in the reception operation. Flag W
As is clear from FIG. 10(A), when ED is at cent, it indicates that one block of data transfer has been completed. In other words, it indicates that a power outage occurred at the time when the data transfer of block (1) was completed. Therefore, when the power is restored, if the terminal device checks this flag WED and sets it, it is sufficient to transfer data for the next new block. On the other hand, if the flag WED is reset when the power is restored, the original one block data transfer is performed again from the beginning.

また、フラグREDがセットしているときは、第11図
(A)から明らかなように1ブロックのデータ転送が完
了していることを示している。したがって送信時の場合
と同様に、電源復帰時にフラグREDがセットしている
なら次の新たなブロックのデータ転送を行い、リセット
しているならもとの新たなブロックのデータ転送を行え
ば良い以上のように、停電が生じてもその停電時にメイ
ンシステムでのインターフェイス管理状態がバソテリバ
ックアップメモリにセーブされ、しかもインターフェイ
スの停電処理とメインシステムの停電処理が完了してか
らりセントされるため、停電から電源復帰にかけてメイ
ンシステムとインターフェイスとの間でフェーズを合わ
せることが出来る。
Further, when the flag RED is set, it indicates that one block of data transfer has been completed, as is clear from FIG. 11(A). Therefore, as in the case of transmission, if the flag RED is set when the power is restored, transfer the data of the next new block, and if it is reset, transfer the data of the original new block. As shown in the figure, even if a power outage occurs, the interface management status of the main system is saved in the backup memory at the time of the power outage, and the data is sent after the interface power outage processing and the main system power outage processing are completed. The phase can be matched between the main system and the interface when the power is restored after a power outage.

【図面の簡単な説明】[Brief explanation of drawings]

第1図はこの発明が適用されたローカルネソトワークシ
ステムのブロソク構成図である。 第2図は伝送インターフェイスI/Fのブロソク構成図
、第3図はさらにその詳細なブロック構成図である。 第4図はライン制御回路8に設けられる衝突検出回路の
回路図である。 第5図はライン制御回路9に設けられるキャリア検出回
路の回路図である。また第6図は同キャリア検出回路の
タイミングチャートである。 第7図はライン上の信号と信号CDI,CD2との関係
を示している。 第8図はこのローカルネットワークでの基本的な伝送手
順を示す。 第9図はパケソトフォマットを示す図である。 第10図(A)〜(C)はデータの送信動作を示すフロ
ーチャートである。 第11図(A)〜(C)はデータの受信動作を示すフロ
ーチャートである。 第12図は停電処理動作を示すフローチャートである。 第13図はA,B,C端末がほぼ同時にアクセスしよう
として衝突が生じたときの動作を示す。 第14図はライン上に送出されるデータパヶソトの構成
を示している。 第2図) 1〇一送信制御回路、l1一受信制御回路、12一送受
信データ転送制御回路、 (第3図) 1一送信データ転送制御回路、2一受信データ転送制御
回路、3−DMAC(ダイレクト・メモリアクセス・コ
ントローラ)、4−メモリ(バンテリバンクアップ)、
5−サブCPU6一制御回路、7−リンクコントローラ
、8−ライン制御回路(送信)、9−ライン制御路(受
信)。 −2ロ −242− −243− 244一 −245一 −246−
FIG. 1 is a block diagram of a local networking system to which the present invention is applied. FIG. 2 is a block diagram of the transmission interface I/F, and FIG. 3 is a more detailed block diagram thereof. FIG. 4 is a circuit diagram of a collision detection circuit provided in the line control circuit 8. FIG. 5 is a circuit diagram of a carrier detection circuit provided in the line control circuit 9. Moreover, FIG. 6 is a timing chart of the same carrier detection circuit. FIG. 7 shows the relationship between the signals on the line and the signals CDI and CD2. FIG. 8 shows the basic transmission procedure in this local network. FIG. 9 is a diagram showing the packet format. FIGS. 10(A) to 10(C) are flowcharts showing the data transmission operation. FIGS. 11(A) to 11(C) are flowcharts showing the data receiving operation. FIG. 12 is a flowchart showing the power outage processing operation. FIG. 13 shows the operation when terminals A, B, and C attempt to access almost simultaneously and a collision occurs. FIG. 14 shows the configuration of the data packet sent out on the line. (Fig. 2) 10-1 transmission control circuit, l1- reception control circuit, 12- transmission/reception data transfer control circuit, (Fig. 3) 1- transmission data transfer control circuit, 2- reception data transfer control circuit, 3-DMAC ( Direct memory access controller), 4-memory (Banteli bank up),
5 - Sub CPU 6 - control circuit, 7 - Link controller, 8 - Line control circuit (transmission), 9 - Line control path (reception). -2 row-242- -243- 244-245-246-

Claims (1)

【特許請求の範囲】[Claims] +11データ伝送ラインに接続されデータ伝送制御を行
うインターフェイスと、このインターフェイスを管理す
るとともに送受信データを処理するメインシステムとを
有する装置において、前記メインシステムでの前記イン
ターフェイス管理状態を記憶する管理情報記憶手段と、
前記メインシステノ・からの停電通知があったとき前記
記憶手段に記憶されているそのときの管理情報を記憶す
るバソテリバンクアップ記憶手段と、を前記インターフ
ェイスに設けるとともに、前記メインシステムでの停電
処理完了後前記インターフェイスでの停電処理完了を判
定する停電処理完了判定手段と、この判定手段によって
停電処理完了が判定されたときに前記メインシステムお
よび前記インターフェイスをリセットする手段とを前記
メインシステムに設け、停電時にそのときのインターフ
ェイス管理状態を前記バッテリバンクアンプ記憶手段に
記憶するとともに前記インターフェイスでの停電処理と
前記メインシステムでの停電処理七を完了した後リセッ
ト処理することを特徴とする、データ伝送システムの停
電処理装置。
In a device having an interface connected to a +11 data transmission line and controlling data transmission, and a main system managing this interface and processing transmitted and received data, a management information storage means for storing the interface management state in the main system. and,
The interface is provided with a battery backup storage means for storing the management information at that time stored in the storage means when there is a power outage notification from the main system; The main system is provided with a power outage processing completion determining means for determining whether the power outage processing is completed at the interface after the processing is completed, and a means for resetting the main system and the interface when the determining means determines that the power outage processing is complete. , at the time of a power outage, the interface management state at that time is stored in the battery bank amplifier storage means, and a reset process is performed after completing the power outage processing at the interface and the power outage processing at the main system; System power outage handling device.
JP57152981A 1982-08-31 1982-08-31 Processing device of power failure of data transmission system Granted JPS5941944A (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP57152981A JPS5941944A (en) 1982-08-31 1982-08-31 Processing device of power failure of data transmission system
US06/525,665 US4672543A (en) 1982-08-31 1983-08-23 Data transmission control apparatus in local network systems
GB08322996A GB2126458B (en) 1982-08-31 1983-08-26 Local network system interface
CA000435700A CA1213015A (en) 1982-08-31 1983-08-30 Data transmission control apparatus in local network systems
DE3331233A DE3331233C2 (en) 1982-08-31 1983-08-30 Data control device in local connection networks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57152981A JPS5941944A (en) 1982-08-31 1982-08-31 Processing device of power failure of data transmission system

Publications (2)

Publication Number Publication Date
JPS5941944A true JPS5941944A (en) 1984-03-08
JPH0221703B2 JPH0221703B2 (en) 1990-05-15

Family

ID=15552348

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57152981A Granted JPS5941944A (en) 1982-08-31 1982-08-31 Processing device of power failure of data transmission system

Country Status (1)

Country Link
JP (1) JPS5941944A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6196390A (en) * 1984-10-18 1986-05-15 株式会社 タクマ Roller kiln
JPS6468046A (en) * 1987-09-08 1989-03-14 Toshiba Corp Pulse data transmission equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4853639A (en) * 1971-11-05 1973-07-27
JPS5439504A (en) * 1977-09-02 1979-03-27 Fujitsu Ltd Information communication system
JPS55135398A (en) * 1979-04-10 1980-10-22 Canon Inc Electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4853639A (en) * 1971-11-05 1973-07-27
JPS5439504A (en) * 1977-09-02 1979-03-27 Fujitsu Ltd Information communication system
JPS55135398A (en) * 1979-04-10 1980-10-22 Canon Inc Electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6196390A (en) * 1984-10-18 1986-05-15 株式会社 タクマ Roller kiln
JPS6142189B2 (en) * 1984-10-18 1986-09-19 Takuma Kk
JPS6468046A (en) * 1987-09-08 1989-03-14 Toshiba Corp Pulse data transmission equipment
JPH0534863B2 (en) * 1987-09-08 1993-05-25 Tokyo Shibaura Electric Co

Also Published As

Publication number Publication date
JPH0221703B2 (en) 1990-05-15

Similar Documents

Publication Publication Date Title
US4672543A (en) Data transmission control apparatus in local network systems
US4590468A (en) Token access controller protocol and architecture
US4780814A (en) Global serial channel for microcontroller
US6603744B2 (en) Connection establishment method, communication method, state change transmission method, state changing method, wireless apparatus, wireless device, and computer
JPS6079844A (en) Method of monitoring hot carrier generating place
JPS60126945A (en) Polling system
JP2004518263A (en) Communication port control module for lighting system
JPS5941944A (en) Processing device of power failure of data transmission system
JPH0221705B2 (en)
US20200387397A1 (en) Parallel processing apparatus
JPS5941943A (en) Data transmission controller of local network system
JPS5941945A (en) Data transmission system of local network system
JPH0221704B2 (en)
JPS60178561A (en) Standard digital interface device
JPS5941947A (en) Data transmission controller of local network system
JPS5941942A (en) Data transmission controller of local network system
JP2718690B2 (en) Communication control system
CN116701284B (en) Method, device, equipment and medium for high-speed synchronization of data among CPUs
JP2628620B2 (en) Collision reduction method and communication control device
JPH09233153A (en) Network system
JPS6245246A (en) Communication control equipment
JPS62101147A (en) Retransmission system in multiple address communication
JPS63286948A (en) Data transfer controller
JPH10334053A (en) Computer system
JPS58120342A (en) Data transmission system