Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0221704B2 - - Google Patents
[go: Go Back, main page]

JPH0221704B2 - - Google Patents

Info

Publication number
JPH0221704B2
JPH0221704B2 JP57152983A JP15298382A JPH0221704B2 JP H0221704 B2 JPH0221704 B2 JP H0221704B2 JP 57152983 A JP57152983 A JP 57152983A JP 15298382 A JP15298382 A JP 15298382A JP H0221704 B2 JPH0221704 B2 JP H0221704B2
Authority
JP
Japan
Prior art keywords
data
transmission
packet
reception
flag
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
JP57152983A
Other languages
Japanese (ja)
Other versions
JPS5941946A (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 JP57152983A priority Critical patent/JPS5941946A/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 JPS5941946A publication Critical patent/JPS5941946A/en
Publication of JPH0221704B2 publication Critical patent/JPH0221704B2/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

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Communication Control (AREA)

Description

【発明の詳細な説明】 この発明は、比較的狭い地域に分散したキヤツ
シユレジスタ等のコンピユータ機器を相互接続す
るローカルネツトワークシステムにおいて、デー
タのバツフアリング、パケツトの組立/分解、ネ
ツトワークアクセスの制御等を行うデータ伝送制
御装置に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention provides data buffering, packet assembly/disassembly, and network access control in a local network system that interconnects computer equipment such as cash registers distributed over a relatively narrow area. The present invention relates to a data transmission control device that performs such operations.

一般にローカルネツトワークシステムにおいて
は、データの伝送制御を次の手順によつて行う。
Generally, in a 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.

また、受信バツフアが一杯であるときには、送
信しようとするデータが優先順位の高いものであ
つても送信が成功せず伝送ラインは初期状態に戻
るため、受信バツフアが空いても次にそのデータ
を受信するまでには時間がかかる欠点があつた。
さらにコントローラでの受信バツフアが一つであ
つたため、メインシステムでのデータ処理順序は
受信したデータの順番に従うことになり、優先順
位の高いデータがあつても直ぐに処理出来ないと
いう不都合があつた。
Furthermore, when the receive buffer is full, even if the data to be transmitted is of high priority, the transmission will not be successful and the transmission line will return to its initial state. The drawback was that it took a long time to receive the message.
Furthermore, since there was only one receiving buffer in the controller, the data processing order in the main system followed the order of received data, which caused the inconvenience that even if there was high priority data, it could not be processed immediately.

この発明の目的は、メインシステム等のホスト
側の負荷を軽減し、高速で効率的な伝送制御を可
能にするとともに、メインシステムの要求に沿つ
て、優先順位の高い受信データから順次処理して
いくことの出来るローカルネツトワークシステム
のデータ伝送制御装置を提供することにある。
The purpose of this invention is to reduce the load on the host side of the main system, etc., to enable high-speed and efficient transmission control, and to sequentially process received data starting from the highest priority in accordance with the requirements of the main system. The object of the present invention is to provide a data transmission control device for a local network system that can be used as a local network system.

この発明は、要約すれば、 データ伝送ラインから受信したデータのパケツ
トフオマツトを判定し、その判定結果に基づいて
応答パケツトを作成する受信制御手段と、送信デ
ータまたは前記応答パケツトを所定のパケツトフ
オマツトにて伝送ライン上に送出する送信制御手
段と、前記受信制御手段および送信制御手段とメ
インシステムとの間で送受信データの転送を制御
する送受信データ転送制御手段とを設けて、伝送
ラインのアクセス、パケツトの生成、データのバ
ツフアリング、再送制御等を上位レベル(アプリ
ケーシヨンプログラム)ではなく、メインシステ
ムと伝送ラインとを接続するインターフエイス
(データ伝送制御装置)のレベルで行うようにす
るとともに、さらに、前記受信制御手段を、デー
タパケツトのヘツダー部で指定されるチヤネル番
号別に受信データを記憶する複数の受信バツフア
を備えるものとし、また前記送受信データ転送制
御手段は前記メインシステムからの指定チヤネル
に対応する受信バツフアのデータをメインシステ
ム側に転送する手段を備えるものとし、受信デー
タをその種類別に受信バツフアへ振り分けるよう
にするとともに、メインシステム側の状態に応じ
て任意の(例えば最も優先順位の高い)チヤネル
のデータを受信バツフアから取り出すことができ
るようにしたものである。
In summary, the present invention includes a reception control means for determining the packet format of data received from a data transmission line and creating a response packet based on the determination result; The transmission line includes a transmission control means for transmitting data onto the transmission line at the computer, and a transmission and reception data transfer control means for controlling the transmission and reception data transfer between the reception control means and the transmission control means and the main system. Access, packet generation, data buffering, retransmission control, etc. are performed at the level of the interface (data transmission control device) that connects the main system and the transmission line, rather than at the upper level (application program). Further, the reception control means is provided with a plurality of reception buffers for storing received data according to channel numbers specified in the header part of the data packet, and the transmission/reception data transfer control means is configured to transfer data from the main system to the specified channel. The device shall be equipped with a means for transferring the data of the corresponding reception buffer to the main system side, and will distribute the received data to the reception buffer according to its type, and will also transfer the data to the reception buffer according to the state of the main system side (for example, the one with the highest priority). This makes it possible to extract data from high-speed channels from the reception buffer.

この発明によれば、データ伝送に関する制御を
データ伝送制御装置で直接行うことになるため、
受信モードと送信モードの変換および各モードに
おけるパケツト生成/分解に基づく応答準備等上
記の制御が極めて高速に実行出来るとともに、メ
インシステム側からみて優先順位の高いデータと
低いデータを分けてバツフアリング出来るため
に、メインシステムではタスクの要求に応じて複
数の受信バツフアから任意のデータを取り込むこ
とが出来る。すなわち、あるタスクを実行してい
るときに例えばチヤネル1のデータを優先的に取
り込みたいときには、その受信バツフアからのデ
ータを優先して取り込むことができ、またチヤネ
ル10の受信バツフアを最もレベルの高い優先デ
ータが入るものとして設定しておけば、その受信
バツフアにデータが入ると直ちにそのデータをメ
インシステム側に取り込むようにすることも可能
である。
According to this invention, since control regarding data transmission is directly performed by the data transmission control device,
The above controls, such as conversion between reception mode and transmission mode and response preparation based on packet generation/disassembly in each mode, can be executed extremely quickly, and data with high priority and data with low priority can be buffered separately from the main system's perspective. Furthermore, the main system can import arbitrary data from multiple receiving buffers according to task requirements. In other words, if you want to take in data from channel 1 with priority while executing a certain task, you can give priority to data from that reception buffer, and you can also take data from channel 10, which has the highest level. If it is set to receive priority data, it is possible to import the data into the main system as soon as it enters the reception buffer.

また、複数の受信バツフアを受信制御手段に設
けるために、メインシステムの処理動作が低速で
あつてもバツフアフルとなつてデータ受信が出来
なくなる状態が防がれる。このため、伝送の効率
を向上することが出来、しかもメインシステムは
高速でなくても良い利点がある。
Further, since a plurality of reception buffers are provided in the reception control means, even if the processing operation of the main system is slow, it is possible to prevent a situation where the buffer becomes full and data cannot be received. Therefore, transmission efficiency can be improved, and the main system does not need to be high-speed.

第14図はこの発明のデータ伝送制御装置の要
部概念図である。
FIG. 14 is a conceptual diagram of main parts of the data transmission control device of the present invention.

伝送ラインL上のデータパケツトは受信部20
で分解され、データはヘツダー部で指定されたチ
ヤネル毎に受信バツフアDSB1〜DSBnに転送さ
れる。各受信バツフアDSBは、受信部20に含
まれる図示しないバツフアからのデータをセーブ
する受信データセーブバツフアとして機能する。
その容量は、最大mバイトであつて、1バイト目
のデータ転送エリアB0から順次埋められていく。
メインシステムでは、実行しているアプリケーシ
ヨンに従つて、受信バツフアDSB1〜DSBnまで
の任意のバツフアからデータを取り出していく。
The data packet on the transmission line L is sent to the receiving section 20.
The data is transferred to reception buffers DSB1 to DSBn for each channel specified in the header section. Each reception buffer DSB functions as a reception data save buffer that saves data from a buffer (not shown) included in the reception unit 20.
Its capacity is m bytes at most, and it is filled in sequentially starting from the first byte data transfer area B0.
In the main system, data is extracted from any of the receiving buffers DSB1 to DSBn according to the application being executed.

受信部20は、データパケツトのヘツダー部で
指定されるチヤネルに対応する受信バツフアが空
いていなければ、送信端末に対してバツフアフル
の応答を行う(後述する)。指定チヤネルに対応
する受信バツフアが空いていればACKパケツト
を送信して、受信データを指定チヤネルに対応す
る受信バツフアに転送する。このように受信部2
0はメインシステムの動作と独立してデータ伝送
の制御を行う。
If the receiving buffer corresponding to the channel specified in the header section of the data packet is not available, the receiving section 20 sends a buffer-full response to the transmitting terminal (described later). If the receiving buffer corresponding to the specified channel is free, an ACK packet is transmitted and the received data is transferred to the receiving buffer corresponding to the specified channel. In this way, the receiving section 2
0 controls data transmission independently of the main system operation.

なお、送信部21はデータパケツト、応答パケ
ツトを送信するときに動作する。
Note that the transmitter 21 operates when transmitting data packets and response packets.

以下この発明の実施例を図面を参照して説明す
る。
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 implementing the present invention. In the figure, terminal devices A to N, which are the main system, are
Transmission interface I/F of the embodiment of this invention
The terminals are connected to a data transmission line L consisting of a coaxial cable, so that various data can be freely transmitted and received between the respective 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から受信したデ
ータのパケツトフオマツトを判定し、その判定結
果に基づいて応答パケツトを作成する。さらに上
述の受信バツフアDSB1〜DSBnを含む。また、
送受信データ転送制御回路12は、受信制御回路
11、送信制御回路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 Furthermore, it includes the above-mentioned receiving buffers DSB1 to DSBn. Also,
The transmission/reception data transfer control circuit 12 controls the transfer of transmission/reception data between the reception control circuit 11, the transmission control circuit 10, and the terminal device.

第3図において、上記送受信データ転送制御回
路12は、送信データ転送制御回路1と受信デー
タ転送制御回路2とで構成される。送信データ転
送制御回路1は、各種データを送信する場合に端
末装置側から送られてきたデータを1バイト毎に
一時記憶するレジスタaと、同レジスタaへの書
込みを許可するときにセツトするフラグWEN
と、端末装置が総ての送信データを転送したとき
にセツトされるフラグWEDとを有する。また、
受信データ転送制御回路2は、各種データを受信
する場合にインターフエイス側の受信データを1
バイト毎に端末装置に転送するための取込みレジ
スタbと、受信データがあることをチヤネル毎に
端末装置に知らせるためのフラグRENと、端末
装置が総ての受信データを取り込んだことをチヤ
ネル毎にインターフエイス側に知らせるためのフ
ラグREDとを有する。
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
and a flag WED that is set when the terminal device has transferred all transmission data. Also,
The reception data transfer control circuit 2 transfers the reception data on the interface side to one when receiving various data.
A capture register b is used to transfer each byte to the terminal device, a flag REN is used to notify the terminal device for each channel that there is received data, and a flag REN is used to notify the terminal device that the terminal device has captured all received data for each channel. It has a flag RED to notify the interface side.

上記送信制御回路10、および受信制御回路1
1は、チヤネル毎の受信データをセーブする上述
の受信バツフアDSB、送信データをセーブする
送信バツフアを含むとともにインターフエイス制
御プログラムを記憶するメモリ4、送受信段階で
のタイマー、インターラプト機能を制御する制御
回路6、メモリ4と上記送受信データ転送制御回
路1,2との間でデータをDMA転送するDMAC
3、送受信動作を制御し、送受信バツフア用C,
Fおよび送受信用シフトレジスタD,Eを有する
リンクコントローラ7、送信時に送信データを変
調してライン上へ送出するとともに複数の端末か
ら同時にアクセス要求があつたかどうかを検出す
る衝突検出回路を含むライン制御回路8、ライン
上の信号を受信し、その信号を復調してリンクコ
ントローラ7へ転送するライン制御回路9、およ
びインターフエイス全体をメモリ4に記憶されて
いる制御プログラムに従つて制御するサブCPU
5から構成される。
The above transmission control circuit 10 and reception control circuit 1
1 includes the above-mentioned receive buffer DSB for saving received data for each channel, a memory 4 for storing an interface control program as well as a transmitting buffer for saving transmitted data, a timer at the transmitting/receiving stage, and a control for controlling the interrupt function. A DMAC that performs DMA transfer of data between the circuit 6 and the memory 4 and the transmission/reception data transfer control circuits 1 and 2.
3. C for controlling transmitting and receiving operations and for transmitting and receiving buffer.
A link controller 7 having shift registers D and E for transmission and reception, and a line control circuit that modulates transmission data and sends it onto the line during transmission, and also includes a collision detection circuit that detects whether access requests are received from multiple terminals at the same time. a line control circuit 9 that receives a signal on the line, demodulates the signal, and transfers it to the link controller 7; and a sub CPU that controls the entire interface according to a control program stored in the memory 4.
Consists of 5.

第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パケツト再送許容時間よりも長
く設定されていて、ACKパケツトがこの時間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 at least longer than the allowable ACK packet retransmission time, and the ACK packet is
If the line is not sent within the specified period, the line is deoccupied and new access from other terminals is permitted.

第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図〜第11図を参照して説明する。
Next, the operation of the interface shown in Figure 3 is as follows.
This will be explained with reference to FIGS. 10 and 11.

(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 this 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.

一方、上記のようにして送信バツフア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 processing is called back-off processing. 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.

第12図は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. 12 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.

以上の動作によつてライン上に送出されるデー
タパケツトの構成を第13図に示す。
FIG. 13 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 processing. 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 added to a data packet, the receiving terminal will, when receiving the first leading flag,
Error processing is performed at the next and subsequent flag reception times, and when the normal reception mode is reached, it becomes possible to process the still continuing leading 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 ACK packets 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.

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

【図面の簡単な説明】[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図
はA,B,C端末がほぼ同時にアクセスしようと
して衝突が生じたときの動作を示す。第13図は
ライン上に送出されるデータパケツトの構成を示
している。第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 implementing the present invention. Figure 2 is a block diagram of the transmission interface I/F.
FIG. 3 is a more detailed block diagram. 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. FIG. 12 shows the operation when terminals A, B, and C attempt to access almost simultaneously and a collision occurs. FIG. 13 shows the structure of a data packet sent out on the line. FIG. 14 is a conceptual diagram of main parts of the data transmission control device of the present invention. (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, 5
- Sub CPU, 6 - Control circuit, 7 - Link controller, 8 - Line control circuit (transmission), 9 - Line control circuit (reception).

Claims (1)

【特許請求の範囲】[Claims] 1 送受信データ内容を処理するメインシステム
とローカルネツトワークを構成するデータ伝送ラ
イン間に接続される装置であつて、データ伝送ラ
インから受信したデータのパケツトフオマツトを
判定し、その判定結果に基づいて応答パケツトを
作成する受信制御手段と、送信データまたは前記
応答パケツトを所定のパケツトフオマツトにて伝
送ライン上に送出する送信制御手段と、前記受信
制御手段および送信制御手段と前記メインシステ
ムとの間で送受信データの転送を制御する送受信
データ転送制御手段と、を有するとともに、前記
受信制御手段はデータパケツトのヘツダー部で指
定されるチヤネル番号別に受信データを記憶する
複数の受信バツフアを備え、前記送受信データ転
送制御手段は前記メインシステムからの指定チヤ
ネルに対応する受信バツフアのデータをメインシ
ステム側に転送する手段を備えてなる、ローカル
ネツトワークシステムのデータ伝送制御装置。
1 A device connected between the main system that processes the contents of transmitted and received data and the data transmission line that constitutes the local network, which determines the packet format of the data received from the data transmission line, and uses the determination result to determine the packet format of the data received from the data transmission line. a reception control means for creating a response packet using a predetermined packet format; a transmission control means for transmitting the transmission data or the response packet onto a transmission line in a predetermined packet format; the reception control means and the transmission control means; and the main system. a transmitting/receiving data transfer control means for controlling the transfer of transmitting/receiving data between the transmitting and receiving data, and the receiving controlling means includes a plurality of receiving buffers for storing received data according to channel numbers specified in the header part of the data packet; A data transmission control device for a local network system, wherein the transmission/reception data transfer control means includes means for transferring data in a reception buffer corresponding to a specified channel from the main system to the main system side.
JP57152983A 1982-08-31 1982-08-31 Data transmission controller of local network system Granted JPS5941946A (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP57152983A JPS5941946A (en) 1982-08-31 1982-08-31 Data transmission controller of local network 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
JP57152983A JPS5941946A (en) 1982-08-31 1982-08-31 Data transmission controller of local network system

Publications (2)

Publication Number Publication Date
JPS5941946A JPS5941946A (en) 1984-03-08
JPH0221704B2 true JPH0221704B2 (en) 1990-05-15

Family

ID=15552395

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57152983A Granted JPS5941946A (en) 1982-08-31 1982-08-31 Data transmission controller of local network system

Country Status (1)

Country Link
JP (1) JPS5941946A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA1230949A (en) * 1984-06-29 1987-12-29 Nicholas Tsiakas Signal multiplexing circuit
JPS62113757A (en) * 1985-11-13 1987-05-25 株式会社クラレ Manufacture of calcium phosphate sintered body

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5439504A (en) * 1977-09-02 1979-03-27 Fujitsu Ltd Information communication system
JPS5561159A (en) * 1978-10-31 1980-05-08 Omron Tateisi Electronics Co Data delivery system

Also Published As

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

Similar Documents

Publication Publication Date Title
US4672543A (en) Data transmission control apparatus in local network systems
US4710871A (en) Data transmitting and receiving apparatus
US4225919A (en) Advanced data link controller
US5062059A (en) Apparatus and method for communication between host CPU and remote terminal
US4368512A (en) Advanced data link controller having a plurality of multi-bit status registers
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
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
JPS63296540A (en) Multiprotocol communication controller in a single integrated circuit microcontroller
US4593281A (en) Local area network interframe delay controller
EP0534529A1 (en) Apparatus and method for burst data transfer
JPH0795767B2 (en) Optimized method of data communication and system using the method
JPS6113305A (en) Input/output unit for industrial controller
JPH0221705B2 (en)
JPH0221704B2 (en)
JP3198333B2 (en) Apparatus and method for transferring data by serial data bus
CA2215320A1 (en) Link protocol for transferring data between processors
JPH056381B2 (en)
JPH0221703B2 (en)
EP0270896A2 (en) Data link and method of transferring data for personal computer system
CN112667540A (en) Multi-device bus communication method and electronic device
US6950440B1 (en) System and method for efficiently generating packets on a serial bus in response to parallel bus cycles
JPS5941945A (en) Data transmission system of local network system
WO2024088076A1 (en) Data flow control method and apparatus based on single-bus information transmission, and communication system
JPS5941947A (en) Data transmission controller of local network system
JPS5941942A (en) Data transmission controller of local network system