JPH0221703B2 - - Google Patents

Info

Publication number
JPH0221703B2
JPH0221703B2 JP57152981A JP15298182A JPH0221703B2 JP H0221703 B2 JPH0221703 B2 JP H0221703B2 JP 57152981 A JP57152981 A JP 57152981A JP 15298182 A JP15298182 A JP 15298182A JP H0221703 B2 JPH0221703 B2 JP H0221703B2
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.)
Expired - Lifetime
Application number
JP57152981A
Other languages
Japanese (ja)
Other versions
JPS5941944A (en
Inventor
Yoshimitsu Matsui
Michuki Horiguchi
Masakazu Oohashi
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]

Landscapes

  • Small-Scale Networks (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

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.

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

まず伝送ラインに接続された各端末がデータパ
ケツトの先頭に記述されている目的端末アドレス
を読み、自己のアドレスと一致すれば引き続くデ
ータを読み込む。CRCチエツクの結果、誤りが
なければ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. If there is no error as a result of the CRC check, an ACK packet is sent to the sending terminal. If there is an error, the received data is discarded. The transmitting terminal uses a timer to measure the time after transmission, and if there is no ACK within a certain period of time, it retransmits. Furthermore, when performing even stricter transmission control, a RACK packet is transmitted to the transmitting terminal when an ACK packet is received.

以上のデータ伝送制御において、従来はこの制
御の実行を各端末に用意されているアプリケーシ
ヨンプログラムによつて行い、端末のメインシス
テムと伝送ラインとを接続するコントローラは、
単にパケツトの組立やデータのレベル変換(電圧
レベルと論理レベルの変換)を行うだけであつ
た。しかしながら、アプリケーシヨンプログラム
が必要な分だけメインシステムの負荷が増大する
ため、タスク処理を行う際の効率が低下するとと
もに、階層的に上位にあるアプリケーシヨンプロ
グラムでデータの再送やパケツトの生成を行うた
めに、エラー回復処理や衝突防止を効率的に且つ
迅速に行うことが出来ず、十分な信頼性と高速性
を得ることが出来なかつた。
Conventionally, in the data transmission control described above, execution of this control was performed by an application program prepared for each terminal, and the controller connecting the main system of the terminal and the transmission line was
It simply assembled packets and converted data levels (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, and the application programs located higher in the hierarchy have to retransmit data and generate packets. Therefore, error recovery processing and collision prevention could not be performed efficiently and quickly, and sufficient reliability and high speed could not be obtained.

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

しかし、メインシステムとインターフエイスと
が上記の動作を独自に行うようにすれば、停電が
発生したときに両者のフエーズが合わなくなつ
て、転送データの欠落を引き起す可能性がある。
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.

この発明の目的は、停電が発生し、次いで電源
が復帰したときにかけて、インターフエイスとメ
インシステムとの間でフエーズのズレが生じない
ように、データの転送制御を行うデータ伝送シス
テムの停電処理装置を提供することにある。
An object of the present invention is to provide a power outage processing device for a data transmission system that controls data transfer so that a phase shift does not occur between an interface and a main system when a power outage occurs and then the power is restored. Our goal is to provide the following.

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

メインシステムでのインターフエイス管理状態
を記憶する管理情報記憶手段をインターフエイス
側に設ける。この記憶手段は、例えば管理情報の
1例である1ブロツクのデータ転送完了時、を表
示するフラグで構成され、メインシステムでセツ
トされる。少なくともこの記憶手段は停電時にお
いて機能し、停電時の管理情報を記憶する。後述
の実施例のように通常時にも管理情報を更新記憶
していくようにしても良い。インターフエイス側
にはさらにメインシステム側から停電通知があつ
たとき、上記の管理情報を退避して記憶するバツ
テリバツクアツプ記憶手段を設ける。すなわち、
停電時での管理情報は、バツテリバツクアツプさ
れたメモリに記憶されて、電源復帰時のデータ転
送制御においてその管理情報が参照出来るように
する。
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. Management information may also be updated and stored during normal times, as in the embodiment described later. The interface side is further provided with battery backup storage means for saving and storing the above management information when a power outage notification is received from the main system side. That is,
Management information at the time of power outage is stored in the battery backed up memory, so that the management information can be referenced in data transfer control when power is restored.

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

この発明によれば、メインシステムとインター
フエイスの両方が停電処理を完了してからリセツ
トされ、しかも停電時におけるメインシステムで
のインターフエイス管理状態が停電中記憶されて
いるので、電源復帰時には停電時の管理情報を参
照しながらデータ転送制御を再開出来、メインシ
ステムとインターフエイスとの間においてのフエ
ーズのズレを完全に無くすことが出来る。
According to this invention, both the main system and the interface are reset 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 interface management state at the time of the power outage is reset. The data transfer control can be resumed while referring to the management information of the main system, 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 local network system embodying the present invention. In the same figure, terminal devices A to N, which are the main system,
is connected to a data transmission line L consisting of a coaxial cable via a transmission interface I/F,
Various types of data can be freely sent and received between terminals. 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、および送受信データ転
送制御回路12から構成される。送信制御回路1
0は、送信データまたは応答パケツトを所定のパ
ケツトフオマツトにて伝送ライン上に送出し、受
信制御回路11は、伝送ラインLから受信したデ
ータのパケツトフオマツトを判定し、その判定結
果に基づいて応答パケツトを作成する。また、送
受信データ転送制御回路12は、受信制御回路1
1、送信制御回路10と端末装置との間で送受信
データの転送を制御する。
The transmission interface I/F includes a transmission control circuit 10, a reception control circuit 11, and a transmission/reception data transfer control circuit 12. Transmission control circuit 1
0 sends the transmission data or response packet onto the transmission line in a predetermined packet format, and the reception control circuit 11 determines the packet format of the data received from the transmission line L, and applies the determination result to the transmission line. Create a response packet based on the Further, the transmission/reception data transfer control circuit 12 includes the reception control circuit 1
1. Controls the transfer of transmitted and received data between the transmission control circuit 10 and the terminal device.

第3図において、上記送受信データ転送制御回
路12は、送信データ転送制御回路1と受信デー
タ転送制御回路2とで構成される。送信データ転
送制御回路1は、各種データを送信する場合に端
末装置側から送られてきたデータを1バイト毎に
一時記憶するレジスタaと、同レジスタaへの書
込みを許可するときにセツトするフラグWEN
と、端末装置が総ての送信データを転送したとき
にセツトされるフラグWEDと、停電が起きたと
きに端末装置によつてセツトされる停電フラグ
PDFとを有する。また、受信データ転送制御回
路2は、各種データを受信する場合にインターフ
エイス側の受信データを1バイト毎に端末装置に
転送するための取込みレジスタbと、受信データ
があることをチヤネル毎に端末装置に知らせるた
めのフラグRENと、端末装置が総ての送信デー
タを取り込んだことをチヤネル毎にインターフエ
イス側に知らせるためのフラグREDとおよび端
末装置が受信準備完了状態にあることをインター
フエイス側に知らせるためのフラグRDYとを有
する。
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 1 includes a register a that temporarily stores data sent from the terminal device side byte by byte when transmitting various data, and a flag that is set when permitting writing to the register a. WEN
, a flag WED that is set when the terminal device has transferred all the transmission data, and a power outage flag that is set by the terminal device when a power outage occurs.
PDF. 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 by byte when receiving various data, and a reception register b for transmitting the reception data on the interface side to the terminal device for each byte. A flag REN to notify the device, a flag RED to notify the interface side for each channel that the terminal device has captured all transmission data, and a flag RED to notify the interface side that the terminal device is ready for reception. It has a flag RDY to notify.

上記送信制御回路10、および受信制御回路1
1は、チヤネル毎の受信データを記憶する受信バ
ツフアG、送信データを記憶するバツフアAと
B、後述のバツクオフタイマ値を選択するための
乱数テーブルTBL、停電時に送受信データ転送
制御回路のフラグ類をセーブ記憶するエリアH、
およびインターフエイス制御プログラムを記憶
し、バツテリEでバツクアツプされているメモリ
4、送受信段階でのタイマー、インターラプト機
能を制御する制御回路6、メモリ4と上記送受信
データ転送制御回路1,2との間でデータを
DMA転送するDMAC3、送受信動作を制御し、
送受信バツフア用C,Fおよび送受信用シフトレ
ジスタD,Eを有するリンクコントローラ7、送
信時に送信データを変調してライン上へ送出する
とともに複数の端末から同時にアクセス要求があ
つたかどうかを検出する衝突検出回路を含むライ
ン制御回路8、ライン上の信号を受信し、その信
号を復調してリンクコントローラ7へ転送するラ
イン制御回路9、およびインターフエイス全体を
メモリ4に記憶されている制御プログラムに従つ
て制御するサブCPU5から構成される。
The above transmission control circuit 10 and reception control circuit 1
1 is a reception buffer G that stores reception data for each channel, buffers A and B that stores transmission data, a random number table TBL for selecting a back-off timer value (described later), and flags for the transmission and reception data transfer control circuit in the event of a power outage. Area H to save and memorize
and a memory 4 that stores an interface control program and is backed up by a battery E, a control circuit 6 that controls the timer and interrupt function in the transmission/reception stage, and a control circuit 6 between the memory 4 and the transmission/reception data transfer control circuits 1 and 2. data with
DMAC3 performs DMA transfer, controls sending and receiving operations,
A link controller 7 having transmitting/receiving buffers C, F and transmitting/receiving shift registers D, E, and a collision detection device that modulates the transmitted data and sends it onto the line during transmission, and detects whether access requests are received from multiple terminals at the same time. A line control circuit 8 that includes a 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 according to a control program stored in the memory 4. It is composed of a sub-CPU 5 that controls it.

第4図は上記ライン制御回路8に設けられる衝
突検出回路の回路図である。同図のように、変調
後の信号と復調前段の信号とを、イクスクルーシ
ブOR回路81に与え、その出力をフリツプフロ
ツプ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 81, whose output is used as a set signal for a flip-flop 82. By doing this, when the transmitted data and the received data are different, that is, at the time of a collision, the collision detection signal is
CO is obtained.

第5図は上記ライン制御回路9に設けられるキ
ヤリア検出回路の回路図である。また第6図は同
キヤリア検出回路のタイミングチヤートである。
この実施例では、ライン上にデータの流れがある
ことを示すキヤリア信号CD1と一定時間キヤリア
信号CD1がないことを示す信号CD2を得るように
している。すなわち、ラインより受けた信号から
レシーブクロツクaを復調回路90によつて作成
し、バイナリーカウンタ91およびラツチ回路9
2へ入力して、信号CD1とCD2を得ている。第6
図に示すように、レシーブクロツクが無くなると
バイナリーカウンタ91のCL(クリアー)端子が
解除され、カウントが基本クロツクφにより進ん
で搬送波のミラーイメージ信号であるキヤリア信
号CD1が得られる。さらにカウントが進むと、ク
ロツクφの周期によりあらかじめ設定された処理
時間tを加えた信号CD2が得られる。
FIG. 5 is a circuit diagram of a carrier detection circuit provided in the line control circuit 9. FIG. 6 is a timing chart of the carrier detection circuit.
In this embodiment, a carrier signal CD1 indicating that there is a flow of data on the line and a signal CD2 indicating that there is no carrier signal CD1 for a certain period of time are obtained. That is, a receive clock a is created from a signal received from the line by a demodulation circuit 90, a binary counter 91 and a latch circuit 9.
2 to obtain signals CD1 and CD2. 6th
As shown in the figure, when the receive clock disappears, the CL (clear) terminal of the binary counter 91 is released, the count advances according to the basic clock φ, and the carrier signal CD1, 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 φ.

各端末は、この信号CD1と信号CD2を個々に検
出し、図示しない回路によつて、信号CD2が「ロ
ー」(論理0)であるときにだけデータパケツト
を送出出来、ACKパケツトまたはRACKパケツ
トは信号CD1が「ロー」(論理0)であるときに
だけ送出出来るように制御する。このようにして
信号CD1,CD2をチエツクしながら送受信制御す
ることにより、データパケツト送出後のACK、
およびRACKパケツト送出に関して他の端末か
らのデータパケツトとの衝突が防止される。第7
図はライン上の信号と上記信号CD1,CD2との関
係を示している。図において時間tはライン上に
キヤリア信号がない一定時間を表す。この時間は
少なくともACKおよびRACKパケツトの応答パ
ケツト再送許容時間よりも長く設定されていて、
応答パケツトがこの時間t内に送出されなけれ
ば、ラインの占有は解除され、他の端末からの新
たなアクセスが許可される。
Each terminal individually detects the signal CD1 and the signal CD2, and uses a circuit not shown to send out a data packet only when the signal CD2 is "low" (logical 0), and the ACK packet or RACK packet is a signal. It is controlled so that it can be transmitted only when CD1 is "low" (logical 0). By controlling transmission and reception while checking signals CD1 and CD2 in this way, ACK and
Collision with data packets from other terminals is also prevented with respect to RACK packet transmission. 7th
The figure shows the relationship between the signals on the line and the signals CD1 and 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 at least longer than the allowable retransmission time for response packets for ACK and RACK packets.
If no response packet is sent within this time t, the line is deoccupied and new access from other terminals is allowed.

第8図はこのローカルネツトワークでの基本的
な伝送手順を示す。同図Aは送信端末と受信端末
がともに正常な状態にある場合の手順である。ま
ず、送信端末からフラグ、アドレス等のヘツダー
部を備えたデータパケツトを相手先へ送信する。
このデータパケツトが正常に受信されるとデータ
パケツト受信端末はACKパケツトを送信する。
ACKパケツトを受信したデータパケツト送信端
末は、ACKパケツトに対する応答パケツト
(RACKパケツト)を送信する。データパケツト
送信に対して、受信端末がデータパケツトを受け
入れる準備がない場合は同図Bのように、受信端
末がNRDYパケツトを送信して終了する。また、
送信されてきたデータパケツトのチヤネルに対応
する受信バツフアが塞がつている場合は、同図C
に示すようにバツフアフルのステートメントを付
けたNRDYパケツトを送信して終了する。
FIG. 8 shows the basic transmission procedure in this local network. Figure A 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 transmits a response packet (RACK packet) in response to the ACK packet. When the receiving terminal is not ready to accept the data packet, the receiving terminal transmits an NRDY packet and ends the process, as shown in FIG. 2B. Also,
If the receiving buffer corresponding to the channel of the transmitted data packet is blocked,
The process ends by sending an NRDY packet with a buffer statement as shown in the figure below.

第9図はパケツトフオマツトを示す図である。
このパケツトは、データをフラグ(リーデイング
フラグ)とフラグ(トレーリングフラグ)で区切
るフオマツトで構成される。両方のフラグコード
は7E(ヘキサデシマル)である。デイステイネー
シヨンアドレスDAは受信局を指定する。ソース
アドレスSAは送信局を指定する。データタイプ
TYPEは転送フレームの種類を指定する。その種
類はデータ、ACK、RACK、NRADYの4種類
である。チヤネル番号CH.NOはパケツトのチヤ
ネル種別を指定する。回線ステータスDLSは
NRADYパケツト送信時でのステートメントを
記述する。そのステートメントには、受信不可と
受信バツフアフルとがある。バイトカウンタ
BCLとBCHはデータのバイト数を指定する。デ
ータフイールドDATAは転送するデータをセツ
トする。このデータフイールドDATAは、デー
タパケツトのみに存在する。CRCはエラー検出
用コードを与える。
FIG. 9 is a diagram showing a packet format.
This packet consists of a format that separates data into flags (leading flags) and flags (trailing flags). Both flag codes are 7E (hexadecimal). The destination address DA specifies the receiving station. Source address SA specifies the transmitting station. data type
TYPE specifies the type of transfer frame. There are four types: data, ACK, RACK, and NRADY. The channel number CH.NO specifies the channel type of the packet. Line status DLS
Write the statement when sending NRADY packet. The statements include "receiving not possible" and "receiving buffer full." bite counter
BCL and BCH specify the number of bytes of data. The data field DATA sets the data to be transferred. This data field DATA exists only in data packets. CRC provides an error detection code.

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

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

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

まず、ステツプn1(以下ステツプniを単にniと
いう)で、端末装置Aは送信データ転送制御回路
1の書込みレジスタaに対して1バイトのデータ
を書き込むとともに、フラグWENをセツトす
る。この時、端末装置Aからは送信データ長(バ
イト数)と、データをどのチヤネルで取り扱うか
を指定するチヤネル情報CHnとが上記データと
ともに送られて所定のエリアにセツトされる。
First, at step n1 (hereinafter step ni will simply be referred to as ni), terminal device A writes 1 byte of data to write register a of transmission data transfer control circuit 1, and sets flag WEN. At this time, the terminal device A sends the transmission data length (number of bytes) and channel information CHn specifying which channel to use for handling the data together with the data and sets it in a predetermined area.

これらのデータを受信した転送制御回路1は、
送信データのDMA転送チヤネルであるDRQ3チ
ヤネル(インターフエイス内でデータ転送に用い
るチヤネル)を選択し、DMAC3に対してDMA
転送を指示する(n2)。DMAC3はその指示を受
けると、メモリ4の転送先アドレスを設定し
(n3)そのアドレスにある送信バツフアAにレジ
スタaのデータを転送する(n4)。1バイトの転
送が終了すると、フラグWENをリセツトする
(n5)。端末装置Aは上記フラグWENを監視して
いて、リセツトされるのを知ると(n21)、n20へ
戻つて次の1バイトのデータをレジスタaに送
る。こうして、端末装置AではフラグWENを監
視し、そのフラグがリセツトされる毎に1バイト
のデータをレジスタaに書き込む一方、インター
フエイス側では、DMACによつて、レジスタa
のデータを送信バツフアAに順次DMA転送す
る。総てのデータの転送を終結すると、端末装置
AはフラグWEDをセツトしに行く(n22)。この
フラグWEDがセツトされると、制御回路1は、
n7,n8で指定バイト数の確認チエツクと送信コ
マンドのチエツクを行い、正しいときn9へ進む。
DMAC3は、n9,n10でバツフアAからバツフア
BへのデータのDMA転送を実行する。転送が終
了すれば、送信バツフアが空き状態であることを
示すためにフラグWEDをリセツトする(n11)。
端末装置Aは、フラグWEDがリセツト状態であ
ることを知ると、次に送信すべきデータがある場
合に、上記と同じようにして送信データをバツフ
アAに転送する。
The transfer control circuit 1 that received these data,
Select the DRQ3 channel (the channel used for data transfer within the interface), which is the DMA transfer channel for the transmit data, and send the DMA to DMAC3.
Instruct 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 A at that address (n4). When the transfer of 1 byte is completed, the flag WEN is reset (n5). Terminal device A monitors the flag WEN, and when it learns that it will be reset (n21), returns to n20 and sends the next 1 byte of data to register a. In this way, terminal device A monitors flag WEN and writes 1 byte of data to register a each time the flag is reset, while on the interface side, DMAC writes register a.
The data is sequentially DMA-transferred to transmission buffer A. When all data transfer is completed, terminal device A goes to set flag WED (n22). When this flag WED is set, the control circuit 1
Use n7 and n8 to check the specified number of bytes and check the send command, and if correct, proceed to n9.
DMAC3 executes DMA transfer of data from buffer A to buffer B at n9 and n10. When the transfer is completed, the flag WED is reset to indicate that the transmission buffer is free (n11).
When terminal device A learns that flag WED is in the reset state, it transfers the transmission data to buffer A in the same manner as described above if there is data to be transmitted next.

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

一方、上記のようにして送信バツフアBに送信
データが準備されると、インターフエイスの動き
を制御するCPU5は送信指示を行い(n30)、リ
ンクコントローラ7を送信レデイ状態に設定する
(n31)。このときリンクコントローラ7は、キヤ
リア検出回路CDで得た信号CD2をチエツクし、
「ロー」であれば直ちにライン制御回路8を介し
て、パケツトの最初のデータであるリーデイング
フラグFをライン上に送出する(n32)。続いて
CPU5はDMAC3にメモリ4のバツフアBの先
頭アドレスとデータのバイト数を設定し(n33,
n34)、バツフアBからリンクコントローラ7へ
のデータ転送を指示する。この間リンクコントロ
ーラ7は、上記のリーデイングフラグFを送出し
たままであるが、n34を終えると同フラグFの送
出を停止する(n35)。次に、データ転送先であ
るリンクコントローラ7の送信用バツフアCが空
き状態で(n36)、且つリンクコントローラ7よ
りDMAC3に対してバツフアCへのデータ転送
可信号が送出されると(n37)、n38で1バイト分
のデータがバツフアBからバツフアCへ転送され
る。リンクコントローラ7はさらにバツフアCへ
の転送データをシフトレジスタDに転送し、1バ
イト分、シフトレジスタDへ転送すると(n40)、
再びn37へ戻つてDMA転送を実行するとともに、
シフトレジスタDのデータをライン制御回路8に
送つて、変調後ラインへ送出する(n41〜n44)。
後述するように、以上の動作が二つ以上の端末で
同時に行われていた場合は、少なくともデータの
うちソースアドレスを送出した時に衝突が発生す
るが、この衝突が衝突検出回路COで検出された
ときはn44からn60へ進んで送信を禁止する。今、
衝突がないものとすると、リンクコントローラ7
は順次バツフアCからシフトレジスタDへの転送
を行い、前述のようにしてバツフアCへDMA転
送されるデータを順次ライン制御回路8へ送る。
この動作(n37〜n45)を繰り返して行き、指定
されたデータ長の送出が完了するとDMAC3は
内蔵するバイトカウンタがカウントアツプするこ
とにより、リンクコントローラ7へフレーム送出
完了を告げる(n46)。これを受けたリンクコン
トローラ7は、CRCを付け、1フレームのデー
タ送出を完了する。そして、リンクコントローラ
7はCPU5に対し、1フレームのデータ送信が
完了したことを示すインターラプト信号を送り
(n47)、CPU5はリンクコントローラ7を介し
て、ライン制御回路8にトレーリングフラグFの
送出を指示する(n48)。トレーリングフラグF
は、CPU5が送信完了処理を行い(n49)、受信
準備処理を行う(n50)まで継続して送出し、こ
れらの処理が完了した時点でフラグ送出を停止す
るとともに(n51)、インターフエイスを受信モ
ードに設定する(n52)。
On the other hand, when the transmission data is prepared in the transmission buffer B as described above, the CPU 5, which controls the movement of the interface, 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", the leading flag F, which is the first data of the packet, is immediately sent out onto the line via the line control circuit 8 (n32). continue
The CPU 5 sets the start address and the number of data bytes of buffer B in the memory 4 in the DMAC 3 (n33,
n34), instructs data transfer from buffer B to link controller 7. During this time, the link controller 7 continues to send out the above-mentioned leading flag F, but after completing n34, it stops sending out the same flag F (n35). Next, when the transmission buffer C of the link controller 7, which is the data transfer destination, is in an empty state (n36), and the link controller 7 sends a data transfer enable signal to the buffer C to the DMAC 3 (n37), One byte of data is transferred from buffer B to buffer C at n38. The link controller 7 further transfers the data transferred to the buffer C to the shift register D, and transfers 1 byte to the shift register D (n40).
Return to n37 again and execute DMA transfer,
The data in the shift register D is sent to the line control circuit 8 and sent to the line after modulation (n41 to n44).
As will be explained later, if the above operations are performed simultaneously on two or more terminals, a collision will occur at least when sending the source address of the data, but this collision will be detected by the collision detection circuit CO. If so, proceed from n44 to n60 and prohibit transmission. now,
Assuming there is no collision, link controller 7
sequentially transfers data from buffer C to shift register D, and sequentially sends data transferred by DMA to buffer C to line control circuit 8 as described above.
This operation (n37 to n45) is repeated, and when the specified data length has been sent, the DMAC 3 increments its built-in byte counter, thereby notifying the link controller 7 that the frame has been sent (n46). Upon receiving this, the link controller 7 attaches a CRC and completes sending one frame of data. Then, the link controller 7 sends an interrupt signal to the CPU 5 indicating that data transmission of one frame has been completed (n47), and the CPU 5 sends a trailing flag F to the line control circuit 8 via the link controller 7. Instruct (n48). Trailing flag F
The flag continues to be sent until the CPU 5 performs transmission completion processing (n49) and reception preparation processing (n50), and when these processings are completed, flag sending is stopped (n51) and the interface is received. Set to mode (n52).

次にn44において、データパケツトが衝突した
場合の動作を説明する。
Next, in n44, the operation when data packets collide will be explained.

データパケツトの衝突は、各端末によるアクセ
スが平等である共通チヤネル方式において、同時
に二つ以上の端末が送信しようとするときに生じ
る。信号CD2によつてアクセスタイミングが完全
に異なる場合の衝突は防止されるが、相互に離れ
た端末間では伝播遅延が大きいため、他の端末の
送信を検出するまで時間がかかる。その結果、衝
突が起こりやすくなる。一般に、共通チヤネル方
式を採用したローカルネツトワークシステムで
は、上記の問題を解決するために、衝突検出後一
定時間を待つて再送するようにしている。この処
理をバツクオフ処理という。n60以下はこのバツ
クオフ処理を行う手順である。
Data packet 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 employs 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 process is called back-off process. Below n60 is the procedure for performing this back-off process.

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

第13図はA,B,C端末がほぼ同時(伝播遅
延等を原因に若干の誤差がある)にアクセスしよ
うとして衝突が生じたときの動作を示す。A,
B,C各端末が図示するように衝突を検出する
と、直ちに送信を停止して、信号CD2の立ち下が
りタイミングで、それぞれの端末で乱数テーブル
で発生させたバツクオフタイマー値t1,t2,t3を
スタートする。時間t1を経過した時点でA端末
は、信号CD2の状態を検出する。このときB端末
およびC端末はタイマー値t2,t3が経過していな
いので送信をすることが出来ない。したがつてそ
の他の端末からのアクセスがない限り、信号CD2
はオフ状態にあるためA端末からの再送が可能に
なる。この例ではA端末からB端末に対してデー
タパケツトを送信するケースを示している。衝突
があつたため送信出来なかつた他のB端末および
C端末については、A端末の送信が成功した後に
再送が試みられる。この方法は上記と同様に行
う。すなわち、信号CD2の立ち下がりタイミング
でタイマー値t2,t3をスタートし、B端末は時間
t2が経過した時点で信号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. A,
When each terminal 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 back-off timer values t1, t2, and t3 generated by the random number table. Start. When time t1 has elapsed, terminal A 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, unless there is access from other terminals, the signal CD2
Since it is in the off state, retransmission from terminal A is possible. This example shows a case where a data packet is transmitted from terminal A to terminal B. Regarding the other B terminals and C terminals that could not transmit due to the collision, retransmission is attempted after the A terminal's transmission is successful. This method is carried out in the same manner as above. In other words, the timer values t2 and t3 are started at the falling timing of the signal CD2, and the B terminal
When t2 has elapsed, the state of signal CD2 is checked, and if it is off, it is retransmitted. Furthermore, the C terminal checks the signal CD2 when 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 back-off processing.

以上のように、この実施例ではバツクオフタイ
マーの起動時点を信号CD2の立ち下がりタイミン
グに設定し、端末の種類に無関係に同一のタイミ
ングでスタートするようにしている。このため、
再び衝突が生じる確率を小さく出来、バツクオフ
タイマーの精度を向上出来る利点がある。なお、
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, so that it starts at the same timing regardless of the type of terminal. For this reason,
This has the advantage of reducing the probability that a collision will occur again and improving the accuracy of the back-off timer. In addition,
The backoff timer value set by n64 is set to the same value the next time it is set by 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が位置し、パケツトの終りに
j個のトレーリングフラグFが位置している。前
述のようにm個のフラグはn32〜n35で送出され、
j個のフラグはn48〜n51で送出される。このよ
うにパケツトの先頭と終りにフラグを連続させる
ことによつて、送信端末は終りのフラグ連続送出
の時間に受信準備をすることが出来、受信端末
は、連続するリーデイングフラグを受信する間に
モードを正常な受信モードにすることが出来る。
As shown in the figure, m leading flags F are located at the beginning of the packet, and j trailing flags F are located at the end of the packet. As mentioned above, m flags are sent from n32 to n35,
j flags are sent at n48 to n51. By consecutively sending flags at the beginning and end of a packet in this way, the transmitting terminal can prepare for reception at the time when the end flag is continuously sent, and the receiving terminal can prepare for reception while receiving the consecutive leading flags. The mode can be set to normal reception mode.

受信端末が正常な受信モードに設定される場合
は次のようなときである。たとえば、受信端末が
二つ以上の送信端末から同時に受信したとする
と、ソースアドレスを受信したときで衝突を検出
する。このとき、受信端末はリーデイングフラグ
を既に受信しており、しかも受信モードはリセツ
トされないからデータ待ち状態にある。しかし、
衝突を起こした二つの送信端末は送信を打ち切つ
て、次のチヤンスを待つている状態にある。そこ
でどちらかの端末或いは他の端末から新たなデー
タパケツトの送信があれば、データ待ち状態にあ
る受信端末は最初のリーデイングフラグをトレー
リングフラグと見なして(リーデイングフラグと
トレーリングフラグとはともに「7E」の同一コ
ードにある)、そのリーデイングフラグを受けた
時点でパケツトのフオマツトが間違つていること
を検出し(フオマツト長が短い)、エラー処理を
行う。したがつて、このような場合、もしリーデ
イングフラグが1個であると、エラー処理を行つ
た後の受信データも、リーデイングフラグが無い
と見なしてエラー処理を行う可能性がある。
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, since the receiving terminal has already received the reading flag and the receiving mode has not been reset, it is in a data waiting state. but,
The two transmitting terminals that have collided have terminated their transmission 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 (the leading flag and the trailing flag are both "7E"). ), and upon receiving the reading flag, it detects that the format of the packet is incorrect (the format length is short) and performs error handling. Therefore, in such a case, if there is only one reading 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 consecutively placed in a data packet, when the receiving terminal receives the first leading flag, it will process the error at the reception time of the next flag and enter normal receiving mode. It becomes possible to process the still continuing reading flag as a flag for the next packet.

すなわち、m個のリーデイングフラグおよびj
個のトレーリングフラグを付けることによつて、
送信端末と受信端末とが常にパケツトを正常に受
信出来る状態にすることが出来る。
That is, m leading flags and j
By adding trailing flags,
The sending terminal and the receiving terminal can always be in a state where they can normally receive packets.

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

上記のようにしてライン上に送出されたデータ
パケツトは、端末装置N側のライン制御回路9で
受信され(n70)、復調されて(n71)リンクコン
トローラ7のシフトレジスタEへ導かれる
(n72)。リンクコントローラ7は受信したデータ
の最初の1バイトがフラグかフラグ以外かを判定
し、フラグである場合は続いて次にくる1バイト
のデータをシフトレジスタEに導く。フラグ以外
である場合は、デイステイネーシヨンアドレス
DAを読み取つてそのアドレスが自己アドレスか
どうかを判定し(n75)、自己アドレスに一致し
ている場合にn76へ進む。n76でシフトレジスタ
Eの受信データを受信バツフアFに転送し、
DMAC3に対して受信データ有りの指示を行う
(n77)。同時にデータをバツフアGに転送するチ
ヤネルとしてDRQ1を選択する。受信データ有り
の指示を受けたDMAC3は、上記受信バツフア
Fの受信データをメモリ4のバツフアGに順次転
送する。バツフアGはチヤネル数だけ設けられて
いて、受信データはパケツトで指定されるチヤネ
ル番号に対応する部分に転送される。この転送
は、レジスタEに導かれるデータを1バイトづつ
行い、データの区切りを示すフラグ(トレーリン
グフラグ)を検出した段階で受信を完了したと判
断して(n79)、リンクコントローラ7はCPU5
に対して受信完了指示を行う(n80)。この指示
を受けたCPU5は受信モードを禁止するととも
に、送信されてきたデータの種別を判定する。デ
ータ情報であるときは、受信時において端末装置
がレデイ状態にあつて受信できるかどうかを受信
データ転送制御回路2内のフラグRDYによつて
判定する(n89)。このフラグRDYは、端末装置
によつて制御され、端末装置が受信可能の状態に
あるときはセツトされている。そして受信可能で
あるなら、続いて指定チヤネル(第9図のCH.
Noで指定される)の受信バツフアG(メモリ4
内)が空き状態にあるかどうかを判定される
(n90)。前述のようにこの受信バツフアGはチヤ
ネル数用意されていて、各チヤネルが空き状態に
あるかどうかは、受信データ転送制御回路2内の
フラグRENによつて示されるようにしている。
すなわち、任意のチヤネルの受信バツフアが空い
ている場合、そのチヤネルに対応するフラグ
RENはセツトされる。反対にバツフアフルの状
態にある場合、そのチヤネルに対応するフラグ
RENはリセツトされる。n90で指定されたチヤネ
ルの受信バツフアが空き状態にあると、データパ
ケツトを送信してきた端末にACKパケツトを送
信する(n91)。第11図には示していないが、
このACKパケツトの組立はCPU5によつて行う。
第9図から明らかなように、ACKパケツトの組
立は極めて簡単であり、デイステイネーシヨンア
ドレスDAを除く他のデータは固定コードとな
る。デイステイネーシヨンアドレス自体も作成す
る必要が無く、送られてきたデータパケツトのソ
ースアドレスSAをそのまま使用すれば良い。
ACKパケツト送信後、CPU5は受信データ転送
制御回路2内のデータ有りフラグREN(指定チヤ
ネルの)をセツトし(n92)、再受信モードにセ
ツトされる。
The data packet sent onto the line as described above is received by the line control circuit 9 on the terminal device N side (n70), demodulated (n71), and guided to the shift register E of the link controller 7 (n72). 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 a flag, the destination address
Read the DA and determine whether the address is the own address (n75), and if it matches the own address, proceed to n76. n76 transfers the received data of shift register E to receive buffer F,
Instructs DMAC3 that there is data to be received (n77). At the same time, DRQ1 is selected as the channel for transferring data to buffer G. The DMAC 3, which has received the instruction that there is data to be received, sequentially transfers the received data in the reception buffer F to the buffer G in the memory 4. There are as many buffers G as there are channels, and the received data is transferred to the portion corresponding to the channel number specified in the packet. This transfer is performed byte by byte of data guided to register E, and when a flag indicating a data break (trailing flag) is detected, it is determined that reception is complete (n79), and the link controller 7 sends the data to the CPU 5.
A reception completion instruction is given to (n80). Upon receiving this instruction, the CPU 5 prohibits the reception mode and determines the type of the transmitted data. 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 when the terminal device is in a receiving state. If it is possible to receive it, then select the specified channel (CH in Figure 9).
(specified by No.) receive buffer G (memory 4
) is free or not (n90). As mentioned above, this reception buffer G is provided with a number of channels, and the flag REN in the reception data transfer control circuit 2 indicates whether each channel is in an empty state.
In other words, if the receive buffer of any channel is free, the flag corresponding to that channel
REN is set. Conversely, if the channel is in a buffer full state, the flag corresponding to that channel
REN is reset. If the receiving buffer of the channel specified by n90 is free, an ACK packet is sent to the terminal that sent the data packet (n91). Although not shown in Figure 11,
This ACK packet is assembled by the CPU 5.
As is clear from FIG. 9, the assembly of the ACK packet is extremely simple, and the other data except the destination address DA are fixed codes. There is no need to create a 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 present flag REN (of the designated channel) in the reception data transfer control circuit 2 (n92), and is set to re-reception mode.

n89において、端末装置Nが受信不可である場
合は、n93でNRDYパケツトを送信して再受信モ
ードに戻る。また、n90で受信バツフアフルであ
る場合、すなわち指定チヤネルに対応するフラグ
RENがセツトされている場合は、n94でバツフア
フル(NRDY)パケツトを送信して再受信モー
ドに戻る。
If the terminal device N is unable to receive data at n89, it transmits an NRDY packet at n93 and returns to the re-receiving mode. Also, if the reception buffer is full on n90, the flag corresponding to the specified channel
If REN is set, the n94 sends a buffer full (NRDY) packet and returns to re-reception mode.

一方、端末装置Aでは、端末装置Nで上記の
n91において送信されたACKパケツトが受信され
るため、n82→n83→n95へと進む。通常の場合デ
ータパケツト送信後はACKパケツト待ち状態に
遷移するため、n95→n96と進み、ACKパケツト
送信端末つまり端末装置Nに対してRACKパケ
ツトを送信し(n96)、送受信制御部を受信モー
ドに設定する(n97)。
On the other hand, in terminal device A, in terminal device N, the above
Since the ACK packet transmitted at n91 is received, the process proceeds to n82→n83→n95. In normal cases, after transmitting a data packet, the state transitions to an ACK packet wait state, so the process proceeds from n95 to n96, transmits a RACK packet to the ACK packet transmitting terminal, that is, terminal device N (n96), and sets the transmit/receive controller to receive mode. (n97)

なお、n91でのACKパケツト送信、およびn96
でのRACKパケツト送信は、いずれも送信タイ
マーT1によつて時間管理され、ACKパケツト
送信が所定の回数失敗したとき、およびACKパ
ケツトを所定回数送信してもRACKパケツトを
送信出来ないとき、エラー処理がなされるように
している。
Note that ACK packet transmission in n91 and n96
All RACK packet transmissions are time-managed by a transmission timer T1, and error handling is performed when ACK packet transmission fails a predetermined number of times, or when a RACK packet cannot be transmitted even after transmitting an ACK packet a predetermined number of times. I am trying to make sure that this is done.

上記のようにして端末装置AでRACKパケツ
トが送信されると、端末装置Nではn82→n83→
n84→n98と進む。通常の状態遷移となるときは
RACKパケツトの受信時にはすでにACKパケツ
トの送信を終了しているから、n98→n97へと進
んで受信モードの設定をする。もし、ACKパケ
ツトを送信していない状態でRACKパケツトを
受信したときには、ACKパケツトの再送を行つ
て(n99)受信モードの設定をする(n97)。ま
た、n85で受信パケツトがNRDYパケツトである
場合、n85→n100へと進む。通常NRDYパケツト
を受信する場合は、データパケツト送信後である
から、n100→n101へと進んで、端末装置に相手
側がNRDY状態(データの受付が出来ない状態)
にあることを知らせて、受信モードを設定する
(n97)。
When terminal device A sends a RACK packet as described above, terminal device N sends n82→n83→
Proceed as n84→n98. When normal state transition occurs
Since the ACK packet transmission has already been completed when the RACK packet is received, proceed to n98→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 at n85 is an NRDY packet, the process proceeds from n85 to n100. Normally, when receiving an NRDY packet, it is after the data packet has been sent, so the process proceeds from n100 to n101, and the terminal device indicates that the other party is in the NRDY state (a state in which data cannot be accepted).
to set the reception mode (n97).

応答パケツトの送信は、以上のようにn82以下
において行われるが、データパケツトを正常に受
信してACKパケツトを送信したときには、送受
信データ転送制御回路を介して、端末装置側との
間で受信データの転送処理が行われる。この手順
をn110以下に示す。
Transmission of response packets is performed below n82 as described above, but when a data packet is normally received and an ACK packet is transmitted, the received data is transferred to and from the terminal device via the transmit/receive data transfer control circuit. Transfer processing is performed. This procedure is shown below n110.

n110において、端末装置Nは、図示しないメ
インCPUが指定するチヤネルに対応したフラグ
RENのセツト有無をチエツクする。そのチヤネ
ルに対応するフラグRENがセツトされていれば、
受信データリードコマンドが受信データ制御回路
2に与えられる(n111)。そして上記フラグREN
をリセツトするとともに(n112)、CPU5はメモ
リ5のバツフアG(指定チヤネル番号の)の先頭
アドレスおよび受信データ長(バイト数)を
DMAC3にセツトしてDMA転送の準備を行う
(n113)。さらにCPU5は、データ転送のために
使用するチヤネル(上記指定チヤネルとは異なり
インターフエイス内のデータ転送チヤネルを指
す)をDRQ2に設定し(n114)、DMA転送を指示
する(n115)。するとバツフアGからレジスタb
に対して1バイト分のデータが転送され
(n116)、端末装置Nに対してインターラプト信
号が出力される(n117)。端末装置Nは、このイ
ンターラプト信号を受けると、n130→n131へと
進んでレジスタbに転送されたデータの取込みを
行う。一方、データ有りフラグRENがn112でリ
セツトされているため、n78でバツフアFから新
たな1バイト分のデータがバツフアGに転送され
てくる。そして同時にn77でフラグRENを再セツ
トする。したがつて、n110以下が再び実行され、
n116で次の1バイトのデータがレジスタbにセ
ツトされ、端末装置Nがそのデータをn131で取
り込む。この動作を繰り返して、バツフアGのデ
ータがレジスタbを介して総て取り込まれたとき
にDMA転送が完了して、n119→n120へ進んで
DMAC3は、動作を停止する。
At n110, the terminal device N sets a flag corresponding to the channel specified by the main CPU (not shown).
Check whether REN 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 (n111). And above flag REN
(n112), the CPU 5 also resets the start address and received data length (number of bytes) of the buffer G (of the specified channel number) in the memory 5.
Set to DMAC3 and prepare for DMA transfer (n113). Further, the CPU 5 sets the channel used for data transfer (different from the specified channel described above, refers to a data transfer channel within the interface) to DRQ2 (n114), and instructs DMA transfer (n115). Then from buffer G to register b
One byte of data is transferred to the terminal device N (n116), and an interrupt signal is output to the terminal device N (n117). When the terminal device N receives this interrupt signal, it proceeds from n130 to n131 and takes in the data transferred to register b. On the other hand, since the data presence flag REN has been reset at n112, one new byte of data is transferred from buffer F to buffer G at n78. At the same time, reset the flag REN using n77. Therefore, n110 and below are executed again,
The next 1 byte of data is set in register b at n116, and the terminal device N takes in the data at n131. Repeat this operation, and when all the data in buffer G is fetched via register b, the DMA transfer is completed and the process moves from n119 to n120.
DMAC3 stops operating.

端末装置N側は、受信データのバイト数と実際
に取り込んだデータのバイト数が一致するかどう
かをチエツクし、一致すれば取り込んだデータを
所望のフオマツトに加工し(n133)、その加工処
理が完了すれば(n134)、受信データ転送制御回
路2のフラグREDをセツトして(n135)取込み
完了をインターフエイス側に知らせる。インター
フエイス側のCPU5は、このフラグREDのセツ
トを検出すると(n121)、そのフラグREDをリセ
ツトして(n122)次期データの送受信に備える。
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 (n133), and the processing process is completed. When completed (n134), the flag RED of the reception data transfer control circuit 2 is set (n135) to notify the interface side of the completion of the fetching. When the CPU 5 on the interface side detects that the flag RED is set (n121), it resets the flag RED (n122) and prepares for the next data transmission/reception.

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

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

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

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

フラグ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. Next, other power outage processing is performed (n161), the above flag PDF is reset in n162, and the mode is shifted to HALT mode.

一方、端末装置ではn152で総てのインターフ
エイスのフラグPDFをセツトした後、端末装置
自身の停電処理を行う(n153)。この処理を終え
ると、次にインターフエイス総てのフラグPDF
がリセツトされたかどうかをチエツクする
(n154)。総てのフラグPDFがリセツトされると、
n155へ進んでリセツト信号を出力して終了する。
n155では、端末装置自身とその端末装置に接続
される総てのインターフエイスがリセツトされて
パワーオフに移る。
On the other hand, in the terminal device, after setting the flag PDF of all interfaces in n152, the terminal device itself performs power outage processing (n153). Once this process is finished, the interface will display all flags PDF
Check whether the has been reset (n154). Once all flag PDFs are reset,
Proceed to n155, output a reset signal, and end.
At n155, the terminal device itself and all interfaces connected to the terminal device are reset and powered off.

電源が復帰すると、エリアHに記憶されている
フラグ類が参照されてデータ転送制御が行われ
る。この場合、送信動作ではフラグWEDのセツ
ト状態が、また受信動作ではフラグREDのセツ
ト状態が参照される。フラグWEDがセツトいる
ときは、第10図Aから明らかなように1ブロツ
クのデータ転送が完了していることを示してい
る。すなわち、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 set state of the flag WED is referred to in the transmitting operation, and the set state of the flag RED is referred to in the receiving operation. When the flag WED is set, it indicates that one block of data transfer has been completed, as is clear from FIG. 10A. In other words, this indicates that a power outage has occurred at the time when one block of data transfer has been completed. Therefore, when power is restored, the terminal device sets this flag.
If you check WED and it is set, just transfer the data of the next new block. On the other hand, if flag WED is reset when power is restored,
The original one block data transfer is performed again from the beginning.

また、フラグREDがセツトしているときは、
第11図Aから明らかなように1ブロツクのデー
タ転送が完了していることを示している。したが
つて送信時の場合と同様に、電源復帰時にフラグ
REDがセツトしているなら次の新たなブロツク
のデータ転送を行い、リセツトしているならもと
の新たなブロツクのデータ転送を行えば良い。
Also, when the flag RED is set,
As is clear from FIG. 11A, it shows that one block of data transfer has been completed. Therefore, as in the case of transmission, the flag is set when power is restored.
If RED is set, transfer the data of the next new block, and if it is reset, transfer the data of the original new block.

以上のように、停電が生じてもその停電時にメ
インシステムでのインターフエイス管理状態がバ
ツテリバツクアツプメモリにセーブされ、しかも
インターフエイスの停電処理とメインシステムの
停電処理が完了してからリセツトされるため、停
電から電源復帰にかけてメインシステムとインタ
ーフエイスとの間でフエーズを合わせることが出
来る。
As described above, even if a power outage occurs, the interface management status in the main system is saved in the battery backup memory, and is reset after the interface power outage processing and the main system power outage processing are completed. Therefore, the phases can be matched between the main system and the interface after a power outage and when the power is restored.

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

第1図はこの発明が適用されたローカルネツト
ワークシステムのブロツク構成図である。第2図
は伝送インターフエイスI/Fのブロツク構成
図、第3図はさらにその詳細なブロツク構成図で
ある。第4図はライン制御回路8に設けられる衝
突検出回路の回路図である。第5図はライン制御
回路9に設けられるキヤリア検出回路の回路図で
ある。また第6図は同キヤリア検出回路のタイミ
ングチヤートである。第7図はライン上の信号と
信号CD1,CD2との関係を示している。第8図は
このローカルネツトワークでの基本的な伝送手順
を示す。第9図はパケツトフオマツトを示す図で
ある。第10図A〜Cはデータの送信動作を示す
フローチヤートである。第11図A〜Cはデータ
の受信動作を示すフローチヤートである。第12
図は停電処理動作を示すフローチヤートである。
第13図はA,B,C端末がほぼ同時にアクセス
しようとして衝突が生じたときの動作を示す。第
14図はライン上に送出されるデータパケツトの
構成を示している。 第2図、10……送信制御回路、11……受信
制御回路、12……送受信データ転送制御回路、
第3図、1……送信データ転送制御回路、2……
受信データ転送制御回路、3……DMAC(ダイレ
クト・メモリアクセス・コントローラ)、4……
メモリ(バツテリバツクアツプ)、5……サブ
CPU、6……制御回路、7……リンクコントロ
ーラ、8……ライン制御回路(送信)、9……ラ
イン制御路(受信)。
FIG. 1 is a block diagram of a local network 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. FIG. 6 is a timing chart of the carrier detection circuit. FIG. 7 shows the relationship between the signals on the line and the signals CD1 and CD2. FIG. 8 shows the basic transmission procedure in this local network. FIG. 9 is a diagram showing a packet format. FIGS. 10A to 10C are flowcharts showing the data transmission operation. FIGS. 11A to 11C are flowcharts showing the data receiving operation. 12th
The figure 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 structure of a data packet sent out on the line. FIG. 2, 10...transmission control circuit, 11...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 (battery backup), 5...Sub
CPU, 6... Control circuit, 7... Link controller, 8... Line control circuit (transmission), 9... Line control path (reception).

Claims (1)

【特許請求の範囲】[Claims] 1 データ伝送ラインに接続されデータ伝送制御
を行うインターフエイスと、このインターフエイ
スを管理するとともに送受信データを処理するメ
インシステムとを有する装置において、前記メイ
ンシステムでの前記インターフエイス管理状態を
記憶する管理情報記憶手段と、前記メインシステ
ムからの停電通知があつたとき前記記憶手段に記
憶されているそのときの管理情報を記憶するバツ
テリバツクアツプ記憶手段と、を前記インターフ
エイスに設けるとともに、前記メインシステムで
の停電処理完了後前記インターフエイスでの停電
処理完了を判定する停電処理完了判定手段と、こ
の判定手段によつて停電処理完了が判定されたと
きに前記メインシステムおよび前記インターフエ
イスをリセツトする手段とを前記メインシステム
に設け、停電時にそのときのインターフエイス管
理状態を前記バツテリバツクアツプ記憶手段に記
憶するとともに前記インターフエイスでの停電処
理と前記メインシステムでの停電処理とを完了し
た後リセツト処理することを特徴とする、データ
伝送システムの停電処理装置。
1. In a device having an interface connected to a data transmission line to control data transmission, and a main system that manages this interface and processes transmitted and received data, a management system that stores the interface management state in the main system. Information storage means and battery backup storage means for storing management information stored in the storage means at that time when a power outage notification is received from the main system are provided in the interface, and the main system power outage processing completion determining means for determining whether the power outage processing is completed at the interface after the power outage processing is completed at the interface; and means for resetting the main system and the interface when the determining means determines that the power outage processing is complete. is provided in the main system, and in the event of a power outage, the interface management state at that time is stored in the battery backup storage means, and after the power outage processing in the interface and the power outage processing in the main system are completed, a reset processing is performed. A power outage processing device for a data transmission system, characterized by:
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 JPS5941944A (en) 1984-03-08
JPH0221703B2 true 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)

Families Citing this family (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

Family Cites Families (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

Also Published As

Publication number Publication date
JPS5941944A (en) 1984-03-08

Similar Documents

Publication Publication Date Title
US4672543A (en) Data transmission control apparatus in local network systems
US6311294B1 (en) Device and method for efficient bulk data retrieval using a universal serial bus
JP2709820B2 (en) Multiprotocol communication controller in single integrated circuit microcontroller
US5978865A (en) System for performing DMA transfers where an interrupt request signal is generated based on the value of the last of a plurality of data bits transmitted
EP0156557A2 (en) Transceiver for multi-drop local area networks
US5958024A (en) System having a receive data register for storing at least nine data bits of frame and status bits indicating the status of asynchronous serial receiver
JPH0810870B2 (en) Apparatus and method for communicating between nodes of a network
JPH07311716A (en) Computer system,parallel port circuit for interfacing of peripheral device with computer system and its operating method
EP0496177A1 (en) Method of transmitting data by buffer chaining between a host computer and a communication controller
JPH0816891B2 (en) Channel system
JPS6113305A (en) Input/output unit for industrial controller
US11074102B2 (en) Parallel processing apparatus
JPH0221705B2 (en)
EP0094177B1 (en) Apparatus for direct memory-to-memory intercomputer communication
JPH0221703B2 (en)
JPH08161259A (en) Serial data receiving device and serial data transferring device
JPH0221704B2 (en)
JPH056381B2 (en)
US6950440B1 (en) System and method for efficiently generating packets on a serial bus in response to parallel bus cycles
WO2024088076A1 (en) Data flow control method and apparatus based on single-bus information transmission, and communication system
JPS5941945A (en) Data transmission system of local network system
JPS5941947A (en) Data transmission controller of local network system
JPS5941942A (en) Data transmission controller of local network system
JPS6145423B2 (en)
JP3764930B2 (en) Wireless communication device