JPH0681174B2 - Communication control device - Google Patents
Communication control deviceInfo
- Publication number
- JPH0681174B2 JPH0681174B2 JP62034224A JP3422487A JPH0681174B2 JP H0681174 B2 JPH0681174 B2 JP H0681174B2 JP 62034224 A JP62034224 A JP 62034224A JP 3422487 A JP3422487 A JP 3422487A JP H0681174 B2 JPH0681174 B2 JP H0681174B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- signal
- transmission
- turned
- control device
- 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
Links
- 238000004891 communication Methods 0.000 title claims description 29
- 230000005540 biological transmission Effects 0.000 claims description 79
- 239000000872 buffer Substances 0.000 claims description 54
- 238000001514 detection method Methods 0.000 claims description 5
- 230000001360 synchronised effect Effects 0.000 claims description 2
- 238000006243 chemical reaction Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 238000000034 method Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
Landscapes
- Dc Digital Transmission (AREA)
- Communication Control (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は通信制御装置に係り、特に高速な調歩同期式の
送受信機能を有する通信制御装置に関する。Description: TECHNICAL FIELD The present invention relates to a communication control device, and more particularly to a communication control device having a high-speed start-stop synchronization transmission / reception function.
調歩同期式により通信制御装置とキャラクタデイスプレ
ス装置などのデータ端末との間で通信を行う場合、一般
に通信制御装置やデータ端末は、相手装置から電文を受
信できない状態になると送信停止要求キャラクタXoff
(一般に16進コードで“13")を送信し、受信できる状
態になると送信再開要求キャラクタXon(一般に16進コ
ードで“11")を送信する。When communication is performed between the communication control device and a data terminal such as a character display device by the start-stop synchronization method, the communication control device or the data terminal generally requests the transmission stop request character Xoff when the communication device cannot receive a message from the partner device.
(Generally, a hexadecimal code "13") is transmitted, and when it is ready for reception, a transmission restart request character Xon (generally a hexadecimal code "11") is transmitted.
こゝで、通信制御装置に着目した場合、該通信制御装置
で必要な処理は以下の3種類に分けられる。Here, when attention is paid to the communication control device, the processing required in the communication control device is divided into the following three types.
データ端末からの受信キャラクタを複数バイトの容量
をもつ入力バッファに一時格納する処理。The process of temporarily storing the characters received from a data terminal in an input buffer with a capacity of multiple bytes.
複数バイトの容量をもつ出力バッファの内容をデータ
端末に送信する処理。The process of sending the contents of an output buffer with a capacity of multiple bytes to a data terminal.
上記,以外の処理(例えば入力バッファの内容を
上位ホストへ転送する等)。Processes other than the above (for example, transferring the contents of the input buffer to the upper host).
この3種類の処理の優先順位は、一般にが最も高く、
が最も低い。The priority of these three types of processing is generally highest,
Is the lowest.
通信制御装置は、の処理で入力バッファ内の空き容量
がある容量(Qバイト)以下になると、データ端末に対
してXoffを送信する。この時、Xoffを受信したデータ端
末はXonとXoff以外のキャラクタの送信を停止する。ま
た、通信制御装置は、データ端末がキャラクタの送信を
停止している間にの処理で入力バッファの内容を上位
ホストに転送する処理を行い、入力バッファ内の空き容
量がある容量(Rバイト)以下になれば、データ端末に
対してXonを送信する。この時、Xonを受信したデータ端
末はキャラクタの送信を再開する。なお、通信制御装置
の入力バッファの容量をPバイトとすると、R,Q,Rの関
係は、一般にP>R>Q>1である。The communication control device transmits Xoff to the data terminal when the free space in the input buffer becomes less than or equal to a certain capacity (Q bytes) in the processing of. At this time, the data terminal receiving Xoff stops transmission of characters other than Xon and Xoff. In addition, the communication control device performs the process of transferring the contents of the input buffer to the upper host in the process while the data terminal stops transmitting the character, and the free space in the input buffer (R bytes) If the following occurs, Xon is sent to the data terminal. At this time, the data terminal receiving the Xon restarts character transmission. If the capacity of the input buffer of the communication control device is P bytes, the relationship of R, Q, and R is generally P>R>Q> 1.
さらに、通信制御装置はデータ端末との通信でXoffを受
信すれば送信を停止し、Xonを受信すれば送信を再開す
る。このときXon,Xoffは受信キャラクタの列から除去す
る。Further, the communication control device stops the transmission when it receives Xoff in the communication with the data terminal, and restarts the transmission when it receives Xon. At this time, Xon and Xoff are removed from the received character string.
〔発明が解決しようとする問題点) 従来の通信制御装置においては、受信キャラクタを入力
バッファに転送する処理および受信キャラクタからXon,
Xoffの検出、入力バッファ管理とこれによりXon,Xoffを
除去する処理、出力バッファ内のキャラクタ送信等の処
理は全てマイクロプロセッサ等のソフトウェアによって
1キャラクタ毎に処理しているため、通信速度は数十キ
ロビット/秒以下であり、今後出現が予想される数百キ
ロビット/秒、数メガビット/秒の通信速度を実現でき
ないという問題がある。[Problems to be Solved by the Invention] In the conventional communication control device, the process of transferring the received character to the input buffer and the Xon,
Xoff detection, input buffer management, processing to remove Xon and Xoff by this, processing such as character transmission in the output buffer are all processed for each character by software such as a microprocessor, so the communication speed is several tens. It is less than a kilobit / second, and there is a problem that a communication speed of several hundred kilobits / second and several megabits / second, which is expected to appear in the future, cannot be realized.
本発明の目的は、上記の従来技術の欠点を改善し、高速
な調歩同期式の機能を有する通信制御装置を提供するこ
とにある。SUMMARY OF THE INVENTION It is an object of the present invention to provide a communication control device having a high-speed start-stop synchronization type function, by improving the above-mentioned drawbacks of the prior art.
本発明は、キャラクタバッファを有する回線アダプタ
と、該回線アダプタとの間でブロック単位のデータ転送
を行うメモリとを備えた調歩同期式の通信制御装置にお
いて、回線アダプタ内に回線の送信停止要求のキャラク
タ、送信再開要求のキャラクタ、電文の最後を示すキャ
ラクタを検出する検出手段と、該検出手段により送信停
止要求のキャラクタおよび送信再開要求のキャラクタを
検出した場合、これらのキャラクタを受信電文から除去
し、電文の最後を示すキャラクタを検出した場合、割込
みを発生する手段と、送信停止要求のキャラクタを検出
してから送信再開要求のキャラクタを検出するまでは電
文の送信を停止する手段と、外部からの指示により送信
停止要求のキャラクタまたは送信再開要求のキャラクタ
を任意の時点で送信する手段とを設ける共に、更に、メ
モリ内の送信キャラクタを上記回線アダプタへブロック
単位でデータ転送する手段と、上記回線アダプタ内の受
信キャラクタをメモリへブロック単位でデータ転送し、
しかも一定キャラクタ転送する毎に割込みを発生する手
段を設けことによ、ソフトウェアの介入を少なくし、高
速な調歩同期式の通信を実現するものである。The present invention, in a start-stop synchronous communication control device including a line adapter having a character buffer and a memory for performing block-unit data transfer with the line adapter, requests transmission stop of a line in the line adapter. A character, a character requesting a resumption of transmission, a detection means for detecting a character indicating the end of a message, and when the character detecting a request for a transmission stop and a character requesting a resumption of transmission are detected by the detecting means, these characters are removed from the received message. , When the character indicating the end of the message is detected, a means for generating an interrupt, a means for stopping the transmission of the message until the character for the transmission restart request is detected until the character for the transmission restart request is detected, and externally The character of the transmission stop request or the character of the transmission restart request is transmitted at any time by the instruction That means and together providing a further data is transferred to transmit character in the memory means for transferring data blocks to said line adapters, in blocks of received characters into the memory within the line adapter,
Moreover, by providing means for generating an interrupt each time a fixed character is transferred, software intervention is reduced and high-speed asynchronous communication is realized.
以下、本発明の一実施例について図面により説明する。 An embodiment of the present invention will be described below with reference to the drawings.
第1図は本発明の一実施例を示す構成図であって、通信
制御装置1は、回線アダプタ2、プログラムの格納およ
び受信キャラクタを一時格納するメモリ3、本装置を制
御するCPU4、メモリ3と回線アダプタ2とのあいだのDM
A(ダイレクト・メモリ・アクセス)転送を制御するDMA
コントローラ5、及び上位ホストとのインタフェース部
6よりなる。該通信制御装置1の送信回線31、受信回線
32を介してディスプレイ装置(データ端末)10と接続さ
れ、また、バス線54で上位ホスト(図示せず)と接続さ
れている。なお、43は回線アダプタ2からの割込み信号
線、45は回線アダプタ2からDMAコントローラ5に対し
ての送信キャラクタセット要求信号線、46はDMAコント
ローラ5から回線アダプタ2に対しての送信キャラクタ
セット完了信号線、48は回線アダプタ2からDMAコント
ローラ5に対しての受信キャラクタ引き取り要求信号
線、49はDMAコントローラ5から回線アダプタ2に対し
ての信キャラクタ引き取り完了信号線、47は内部バス、
51はDMAコントローラの送信側割込み線、52はDMAコント
ローラの受信側割込み線である。FIG. 1 is a block diagram showing an embodiment of the present invention, in which a communication control device 1 includes a line adapter 2, a memory 3 for temporarily storing programs and received characters, a CPU 4 for controlling the device, and a memory 3. Between the line and line adapter 2
DMA to control A (Direct Memory Access) transfers
It is composed of a controller 5 and an interface unit 6 with an upper host. Transmission line 31 and reception line of the communication control device 1
It is connected to the display device (data terminal) 10 via 32, and is connected to a host (not shown) by a bus line 54. 43 is an interrupt signal line from the line adapter 2, 45 is a transmission character set request signal line from the line adapter 2 to the DMA controller 5, and 46 is a transmission character set completion from the DMA controller 5 to the line adapter 2. A signal line, 48 is a reception character acceptance request signal line from the line adapter 2 to the DMA controller 5, 49 is a reception character acceptance completion signal line from the DMA controller 5 to the line adapter 2, 47 is an internal bus,
Reference numeral 51 is a transmission side interrupt line of the DMA controller, and 52 is a reception side interrupt line of the DMA controller.
第2図は第1図の回線アダプタ2の内部構成例を示した
ものである, 11は1バイト幅のキャラクタを直列に変換し、それにス
タート、ストップビットを付加して所定の通信速度でデ
ータを送信する並直列変換回路である。12は受信データ
からスタート、ストップビットを除去して1バイト幅の
キャラクタに変換する直並列変換回路である。13は並直
列変換回路11への送信キャラクタを一時保持する送信バ
ッファ、14は直並列変換回路12からの受信キャラクタを
一時保持する受信バッファである。Fig. 2 shows an example of the internal configuration of the line adapter 2 in Fig. 1. 11 is a character with a 1-byte width converted to serial data, and start and stop bits are added to the data to obtain data at a predetermined communication speed. Is a parallel-serial conversion circuit for transmitting the. Reference numeral 12 is a serial-parallel conversion circuit that removes start and stop bits from the received data and converts it into a character of 1-byte width. Reference numeral 13 is a transmission buffer for temporarily holding the transmission character to the parallel-serial conversion circuit 11, and 14 is a reception buffer for temporarily holding the reception character from the serial-parallel conversion circuit 12.
15は並直列変換回路11が空であれば、送信バッファ13内
のキャラクタを該回路11に転送して送信キャラクタ要求
信号33をONし、また、送信キャラクタセット信号34がON
になれば、バス47上のキャラクタを送信バッファ13に格
納して信号33をOFFにする送信バッファ制御回路であ
る。16は直並列変換回路12に1キャラクタ受信されゝば
受信バッファ14にそのキャラクタを転送して受信キャラ
クタ引き取り要求信号35をONにし、また、受信キャラク
タ引き取り完了信号36がONになれば信号35をOFFにする
受信バッファ制御回路である。If the parallel-serial conversion circuit 11 is empty, 15 transfers the character in the transmission buffer 13 to the circuit 11, turns on the transmission character request signal 33, and turns on the transmission character set signal 34.
Then, the transmission buffer control circuit stores the character on the bus 47 in the transmission buffer 13 and turns off the signal 33. If 16 characters are received by the serial-parallel conversion circuit 12, that character is transferred to the reception buffer 14 to turn on the received character take-up request signal 35, and when the received character take-over completion signal 36 is turned on, the signal 35 is turned on. It is a receive buffer control circuit that is turned off.
17は信号33,信号37,信号38,信号46,信号50によりXon,Xo
ffの送出、DMAコントローラ5に対しての送信キャラク
タ要求信号等を制御する送信キャラクタ制御回路であ
る。17 is Xon, Xo by signal 33, signal 37, signal 38, signal 46, signal 50
This is a transmission character control circuit that controls the transmission of ff, a transmission character request signal to the DMA controller 5, and the like.
18は本アダプタ2を制御するためのパラメータを格納す
るレジスタ、19はXonを格納するレジスタ、20はXoffを
格納するレジスタ、21は電文の最後を示すキャラクタ
(一般にキャリッジ・リターン以下“CR"と略す)を格
納するレジスタ、22,23は1バイト幅の3ステートゲー
トである。18 is a register for storing a parameter for controlling the adapter 2, 19 is a register for storing Xon, 20 is a register for storing Xoff, 21 is a character indicating the end of the message (generally, "CR" and below the carriage return) Registers for storing (abbreviated), and 22 and 23 are 3-state gates each having a width of 1 byte.
24はレジスタ19,レジスタ20,レジスタ21の出力と受信バ
ッファ14の出力とを比較する比較回路で、レジスタ19の
出力とバッファ14の出力が一致したときXon受信信号42
をONにし、レジスタ20の出力とバッファ14の出力が一致
したときXoff受信信号41をONにし、レジスタ21の出力と
バッファ1の出力が一致したときCR受信信号43をONにす
る。25は信号41がON後、信号42がONになるまで出力(信
号38)がONになり、信号42がON後、信号41がONになるま
で出力がOFF(信号38)となるフリップフロップであ
る。Reference numeral 24 is a comparison circuit that compares the outputs of the registers 19, 20 and 21 with the output of the reception buffer 14, and when the output of the register 19 and the output of the buffer 14 match, the Xon reception signal 42
Is turned on, the Xoff reception signal 41 is turned on when the output of the register 20 matches the output of the buffer 14, and the CR reception signal 43 is turned on when the output of the register 21 matches the output of the buffer 1. 25 is a flip-flop in which the output (signal 38) turns on after the signal 41 turns on until the signal 42 turns on, and the output turns off (the signal 38) until the signal 41 turns on after the signal 42 turns on. is there.
26は受信キャラクタ制御回路で、信号35がONのとき信号
44がOFFであれば(Xon,Xoff以外を受信)、DMAコントロ
ーラ5に対しての信号48をONにし、また、信号44とDMA
コントローラ5からの信号49との論理和を信号36に出力
する。26 is a reception character control circuit, which is a signal when the signal 35 is ON
If 44 is OFF (receives signals other than Xon and Xoff), the signal 48 to the DMA controller 5 is turned ON, and the signal 44 and DMA
The logical sum with the signal 49 from the controller 5 is output to the signal 36.
以下、第1図及び第2図により本通信制御装置の動作を
説明する。The operation of the communication control device will be described below with reference to FIGS. 1 and 2.
(1)初期設定 CPU4によって回線アダプタ2、DMAコントローラ5を初
期状態にする。Xon,Xoff,CRの各コードをレジスタ19,2
0,21にセットする。(1) Initial setting The CPU 4 initializes the line adapter 2 and the DMA controller 5. Register each code of Xon, Xoff and CR to register 19,2
Set it to 0,21.
(2)送信動作 通常の動作 送信すべき電文は上位ホストから上位インタフェース部
6を経由してメモリ3の出力バッファエリア内に格納さ
れている。以下に出力バッファエリア内に格納されてい
る電文の送信動作を示す。(2) Transmission operation Normal operation The message to be transmitted is stored in the output buffer area of the memory 3 from the host by way of the host interface section 6. The operation of sending a message stored in the output buffer area is shown below.
CPU4はDMAコントローラ5内にある送信アドレスレジ
スタ(以下“TxAR"と略す)に送信すべき電文が格納さ
れている出力バッファエリアの先頭アドレスをセット
し、電文長をDMAコントローラ5内にある送信カウント
レジスタ(以下、“TxCQ"と略す)にセットする。The CPU 4 sets the start address of the output buffer area where the message to be transmitted is stored in the transmission address register (abbreviated as "TxAR" below) in the DMA controller 5, and the message length is the transmission count in the DMA controller 5. Set in a register (hereinafter abbreviated as "TxCQ").
送信バッファ制御回路15は送信バッファ13が空により
信号33をONにする。The transmission buffer control circuit 15 turns on the signal 33 when the transmission buffer 13 is empty.
送信キャラクタ制御回路17は、信号33がONになったこ
とを検出すると、信号38がOFFにより(信号38の初期状
態はOFF)、DMAコントローラ5に対して信号45をONにす
る。When the transmission character control circuit 17 detects that the signal 33 is turned on, the signal 38 is turned off (the initial state of the signal 38 is off), and the signal 45 is turned on to the DMA controller 5.
DMAコントローラ5は、信号45がONになったことを検
出すると、バス47の使用権を獲得して、TxARが示す出力
バッファエリアのアドレスから1キャラクタ読み込み、
バス47上にそのキャラクタをセット(出力バッファエリ
アから回線アダプタ2へのDMA転送)して送信キャラク
タセット信号46をONにする。When the DMA controller 5 detects that the signal 45 is turned on, it acquires the right to use the bus 47, reads one character from the address of the output buffer area indicated by TxAR,
The character is set on the bus 47 (DMA transfer from the output buffer area to the line adapter 2) and the transmission character set signal 46 is turned on.
送信キャラクタ制御回路17は、信号46がONになったこ
とを検出すると、信号34をONにする。When the transmission character control circuit 17 detects that the signal 46 is turned on, it turns on the signal 34.
送信バッファ制御回路15は、信号34がONになったこと
を検出すると、送信バッファ13にバス47上のキャラクタ
を格納するとゝもに信号33をOFFにする。When the transmission buffer control circuit 15 detects that the signal 34 is turned on, it stores the character on the bus 47 in the transmission buffer 13 and turns off the signal 33.
送信キャラクタ制御回路17は、信号33がOFFになった
ことを検出すると、信号45をOFFにする。When the transmission character control circuit 17 detects that the signal 33 is turned off, it turns off the signal 45.
DMAコントローラ5は、信号45がOFFになったことを検
出すると、バス47を使用権を放棄するとゝもにTxARの内
容を+1、TxCRの内容を−1する。When the DMA controller 5 detects that the signal 45 is turned off, it relinquishes the right to use the bus 47 and thus increments the content of TxAR by +1 and the content of TxCR by -1.
送信バッファ制御回路15は、並直列変換回路11が空で
あれば、送信バッファ13の内容を該回路11に転送する。If the parallel-serial conversion circuit 11 is empty, the transmission buffer control circuit 15 transfers the contents of the transmission buffer 13 to the circuit 11.
並直列変換回路11は転送されたキャラクタにスター
ト、ストップビットを付加して送信回線31より直列にデ
ータを出力する。The parallel-serial conversion circuit 11 adds start and stop bits to the transferred character and outputs the data serially from the transmission line 31.
送信バッファ制御回路15は送信バッファ13が空であれ
ば信号33をONにする。The transmission buffer control circuit 15 turns on the signal 33 when the transmission buffer 13 is empty.
以降からの動作を繰返す。The operation after that is repeated.
TxCRの内容が0になったとき 上記でDMAコントローラ5のTxCRの内容が0になっ
たとき、DMAコントローラ5は信号51をONにする。When the content of TxCR becomes 0 In the above, when the content of TxCR of the DMA controller 5 becomes 0, the DMA controller 5 turns on the signal 51.
CPU4は信号51がONになったことを検出すると、DMAコ
ントローラ5内のステータスレジスタ(以下“SR"を略
す)を読み込み、電文の送信が完了したことを知り、新
たな電文送信の動作を行う。When the CPU 4 detects that the signal 51 is turned ON, it reads the status register (abbreviated as “SR” below) in the DMA controller 5 and knows that the transmission of the message has been completed, and performs a new message transmission operation. .
DMAコントローラ5はSRが読み込まれると信号51をOFF
にする。DMA controller 5 turns off signal 51 when SR is read
To
Xoff受信時 上記からの動作中にXoffを受信すると(信号38が
ONになったとき)、送信キャラクタ制御回路17は信号38
がONであれば、以後、信号33がONになっても信号45をON
にしない。(以後送信を停止する) Xon受信時 上記からの動作中にXonを受信すると(信号38がO
FFになったとき)、送信キャラクタ制御回路17は信号38
がOFFになれば、以後、信号33がONになると信号45をON
にする。(以後送信を再開する) (3)受信動作 受信する電文長は不明である。および、オーバーランエ
ラー発生させないために、受信側はDMA転送(回線アダ
プタ2からメモリ3内の入力バッファエリアへの転送)
方法は、DMAコントローラ5が有しているオートロード
機能を用いる。オートロード機能とは、カウントレジス
タの内容が0になったとき、アドレスレジスタにベース
アドレスレジスタの内容が、カウントレジスタにベース
カウントレジスタの内容が自動的に転送される機能で、
この機能を使用することにより、複数個に区切られたメ
モリエリアを連続して転送可能であることゝ、CPU4が次
のメモリの先頭アドレス、転送カウント値をそれぞれの
レジスタに書き込むのに時間的余裕ができる。なお、カ
ウントレジスタの内容が0になったとき、DMAコントロ
ーラは割込みを発生する。When Xoff is received If Xoff is received during operation from the above (signal 38
(When turned on), the transmission character control circuit 17 sends a signal 38
If is ON, signal 45 is turned ON even if signal 33 is turned ON.
I don't. (Stop transmission thereafter) When Xon is received When Xon is received during operation from the above (signal 38 is O
When it becomes FF), the transmission character control circuit 17 sends a signal 38
If is turned off, the signal 45 is turned on when the signal 33 is turned on.
To (The transmission is restarted thereafter.) (3) Receiving operation The length of the received message is unknown. Also, in order not to generate an overrun error, the receiving side performs DMA transfer (transfer from the line adapter 2 to the input buffer area in the memory 3).
The method uses the autoload function of the DMA controller 5. The autoload function is a function that automatically transfers the contents of the base address register to the address register and the contents of the base count register to the count register when the contents of the count register become 0.
By using this function, it is possible to transfer memory areas divided into multiple areas continuously, and CPU4 has enough time to write the start address and transfer count value of the next memory to each register. You can When the content of the count register becomes 0, the DMA controller issues an interrupt.
通常の動作 メモリ3内の入力バッファエリアの空き容量がQバイ
ト以下になったときXoffを送信する場合、CPU4は受信の
オーバーランエラーを適ぐために、DMAコントローラ5
内の受信ベースカウントレジスタ(以下“RxBCR"と略
す)にK(KはQ以下の値)を、入力バッファエリアの
先頭アドレス(A)をDMAコントローラ5内の受信ベー
スアドレスレジスタ(以下“RxBAR"と略す)にそれぞれ
セットし、DMAコントローラ5をDMA転送可能状態にす
る。このときRxCRの内容が0であるため、オートロード
機能より、DMAコントローラ5内の受信アドレスレジス
タ(以下“RxAR"と略す)にRxBARの内容が、DMAコント
ローラ5内の受信カウントレジスタ(以下“RxCR"と略
す)にRxBCRの内容が自動的に転送され、DMAコントロー
ラ5は信号52にパルスを発生する。Normal operation When Xoff is transmitted when the free space of the input buffer area in the memory 3 becomes Q bytes or less, the CPU 4 adjusts the receive overrun error, so the DMA controller 5
In the receive base count register (hereinafter abbreviated as “RxBCR”), K (K is a value less than or equal to Q), and the start address (A) of the input buffer area in the receive base address register (hereinafter “RxBAR”) in the DMA controller 5. Abbreviated), and the DMA controller 5 is set to the DMA transfer enable state. Since the content of RxCR is 0 at this time, the content of RxBAR is stored in the receive address register (hereinafter abbreviated as “RxAR”) in the DMA controller 5 by the autoload function, The content of RxBCR is automatically transferred to "," and the DMA controller 5 generates a pulse in the signal 52.
CPU4は信号52のパルスを検出すると、DMAコントロー
ラ5のRxBCRにKを、RxBARにA+Kをセットする。When the CPU 4 detects the pulse of the signal 52, it sets K to RxBCR and A + K to RxBAR of the DMA controller 5.
受信回路32からの直列入力データは直並列変換回路12
により並列キャラクタに変換される。The serial input data from the receiving circuit 32 is serial-parallel conversion circuit 12
Is converted into a parallel character by.
受信バッファ制御回路16は、直並列変換回路12にキャ
ラクタが形成されゝば、そのキャラクタを受信バッファ
14に転送するとゝもに信号35をONにする。If a character is formed in the serial-parallel conversion circuit 12, the reception buffer control circuit 16 receives the character and stores it in the reception buffer.
When it is transferred to 14, the signal 35 is turned ON.
受信キャラクタ制御回路26は受信キャラクタ(バッフ
ァ14の内容)がXon,Xoff以外(信号44がOFF)であるた
め信号48をONにする。The reception character control circuit 26 turns on the signal 48 because the reception character (contents of the buffer 14) is other than Xon and Xoff (the signal 44 is OFF).
DMAコントローラ5は、信号48がONになったことを検
出すると、バス47の使用権を獲得して、RxARが示すメモ
リ3のアドレスにバス47上のキャラクタを書き込み(回
数アダプタ2から入力バッファエリアへのDMA転送)、
信号49をONにする。When the DMA controller 5 detects that the signal 48 is turned ON, it acquires the right to use the bus 47 and writes the character on the bus 47 to the address of the memory 3 indicated by RxAR (from the adapter 2 to the input buffer area). DMA transfer to),
Turn on signal 49.
受信キャラクタ制御回路26は信号49がONになったこと
を検出すると、信号48と信号36をOFFにする。When the reception character control circuit 26 detects that the signal 49 is turned on, it turns off the signals 48 and 36.
受信バッファ制御回路16は信号36がOFFになったこと
を検出すると、信号35をOFFにする。When the reception buffer control circuit 16 detects that the signal 36 is turned off, it turns off the signal 35.
DMAコントローラ5は信号48がOFFになったことを検出
すると、バス47の使用権を放棄し、RxARの内容を+1、
RxCRの内容を−1する。When the DMA controller 5 detects that the signal 48 is turned off, it releases the right to use the bus 47 and sets the contents of RxAR to +1,
Decrement the contents of RxCR by -1.
以後からの動作を繰返す。The subsequent operation is repeated.
RxCRの内容が0になったとき 上記でRxCRの内容が0になったとき、DMAコントロ
ーラ5はオーバロード機能により、RxARにRxBARの内容
を、RxCRにRxBCRの内容を転送し、信号52にパルスを発
生する。When the content of RxCR becomes 0 When the content of RxCR becomes 0 in the above, the DMA controller 5 transfers the content of RxBAR to RxAR and the content of RxBCR to RxCR by the overload function, and pulse to signal 52. To occur.
CPU4は信号52のパルスを検出すると、メモリ3上の入
力バッファエリアの空き容量(Eバイト)の算出を行
い、Eの値によって、それぞれ以下の動作を行う。When the CPU 4 detects the pulse of the signal 52, the CPU 4 calculates the free capacity (E bytes) of the input buffer area on the memory 3, and performs the following operations depending on the value of E.
(a)E≦Qのときからの動作を行う。(A) The operation from E ≦ Q is performed.
(b)Q<E<Rのときからの動作を行う。(B) The operation from the time of Q <E <R is performed.
(c)R≦Qのときから26の動作を行う。(C) Perform 26 operations from the time R ≦ Q.
なお、入力バッファエリアの空き容量の算出は、RxARの
内容と次に上位ホストに転送する入力バッファエリアキ
ャラクタのアドレスから算出する。The free capacity of the input buffer area is calculated from the contents of RxAR and the address of the input buffer area character to be transferred to the next host.
CPU4はコマンドレジスタ18のXoff送出ビットをONにす
る。The CPU 4 turns on the Xoff transmission bit of the command register 18.
コマンドレジスタ18のXoff送出ビットがONになると、
信号37がONになる。When the Xoff transmission bit of the command register 18 turns ON,
Signal 37 turns ON.
送信キャラクタ制御回路17は信号37がONになったこと
を検出すると、次のキャラクタが送信可能なとき信号45
をOFF(DMA転送禁止)にし、信号34と信号40をONにす
る。When the transmission character control circuit 17 detects that the signal 37 is turned ON, the signal 45 is transmitted when the next character can be transmitted.
Is turned off (DMA transfer is prohibited), and signals 34 and 40 are turned on.
送信バッファ制御回路15は信号34がONになったことを
検出すると、バス上のキャラクタ(Xoff)を送信バッフ
ァ13に格納し、信号33をOFFにする。When the transmission buffer control circuit 15 detects that the signal 34 is turned on, it stores the character (Xoff) on the bus in the transmission buffer 13 and turns off the signal 33.
送信キャラクタ制御回路14は信号33がOFFになったこ
とを検出すると、信号51にパルスを発生する。なお、該
回路17は信号37がONのときは信号45はONにしない。When the transmission character control circuit 14 detects that the signal 33 is turned off, it sends a pulse to the signal 51. The circuit 17 does not turn on the signal 45 when the signal 37 is turned on.
コマンドレジスタ18のXoff送出ビットは、信号51のパ
ルスによってOFFになり、信号37をOFFにする。The Xoff transmission bit of the command register 18 is turned off by the pulse of the signal 51, turning off the signal 37.
以後からの動作を繰返す。The subsequent operation is repeated.
CPU4はコマンドレジスタ18のXonの送出ビットをONに
する。なお、すでにXon送出ビットをONしていた場合は
からの動作を繰返する。The CPU 4 turns on the Xon transmission bit of the command register 18. If the Xon transmission bit has already been turned on, the operation from is repeated.
コマンドレジスタ18のXon送出ビットがONになると、
信号50がONになる。When the Xon transmission bit of the command register 18 turns ON,
Signal 50 turns ON.
送信キャラクタ制御回路17は信号50がONになったこと
を検出すると、次のキャラクタが送信可能なとき信号45
をOFF(DMA転送禁止)にし、信号34と信号39をONにす
る。When the transmission character control circuit 17 detects that the signal 50 has been turned ON, it sends a signal 45 when the next character can be transmitted.
Is turned off (DMA transfer is prohibited), and signals 34 and 39 are turned on.
送信バッファ制御回路15は信号34がONになったことを
検出すると、バス上のキャラクタ(Xon)をバッファ13
に格納し、信号33をOFFにする。When the transmission buffer control circuit 15 detects that the signal 34 is turned on, it buffers the character (Xon) on the bus 13
, And turn off the signal 33.
送信キャラクタ制御回路17は信号33がOFFになったこ
とを検出すると、信号51にパルスを発生する。なお、該
回路17は信号50がONになったときは信号45はONにしな
い。When the transmission character control circuit 17 detects that the signal 33 is turned off, it sends a pulse to the signal 51. The circuit 17 does not turn on the signal 45 when the signal 50 is turned on.
コマンドレジスタ18のXon送出ビットは、信号51のパ
ルスによってOFFになり、信号50をOFFにする。The Xon transmission bit of the command register 18 is turned off by the pulse of the signal 51, and turns off the signal 50.
以後からの動作を繰返す。The subsequent operation is repeated.
比較回路24は受信したキャラクタ(バッファ14の内
容)がCRであるため、信号43にパルスを発生する。The comparator circuit 24 generates a pulse in the signal 43 because the received character (content of the buffer 14) is CR.
受信キャラクタ制御回路26は信号44がOFF、信号35がO
Nであることにより、信号48をONにする。In the reception character control circuit 26, the signal 44 is OFF and the signal 35 is O
Since it is N, the signal 48 is turned on.
以下前記のからの動作を行う。The following operations from above are performed.
CPU4は信号43のパルスを検出すると、電文の最終キャ
ラクタを受信したことを認識し、DMAコントローラ5のR
xARの内容−1の入力バッファアドレスまでのキャラク
タを上位ホストに転送する。When the CPU 4 detects the pulse of the signal 43, it recognizes that the last character of the electronic message has been received, and the R of the DMA controller 5
Characters up to the input buffer address of xAR contents-1 are transferred to the upper host.
(4)送受信動作以外 上記の送受信動作以外のときは、本通信制御装置は入力
バッファエリアの受信キャラクタを上位ホストへ転送す
る等の処理を行う。(4) Other than transmission / reception operation In cases other than the above transmission / reception operation, the communication control device performs processing such as transferring the received character in the input buffer area to the host.
以上説明したように、本発明によれば、ソフトウェアの
介入が複数キャラクタ転送毎でよいため、高速な調歩同
期式の機能を有する通信制御装置を実現できる。As described above, according to the present invention, since software intervention is required for each transfer of a plurality of characters, it is possible to realize a communication control device having a high-speed start-stop synchronization function.
第1図は本発明の実施例を示す構成図、第2図は第1図
の回線アダプタの内部構成図である。 1……通信制御装置、2……回線アダプタ、 3……メモリ、4……CPU、 5……DMAコントローラ、 6……上位ホストとのインタフェース部、 10……キャラクタディスプレイ装置、 31……送信回線、32……受信回線、 43……割込み信号、 45……送信キャラクタセット要求信号線、 46……送信キャラクタセット完了信号線、 48……受信キャラクタ引取り要求信号線、 49……受信キャラクタ引取り完了信号線。FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is an internal block diagram of the line adapter of FIG. 1 ... Communication control device, 2 ... line adapter, 3 ... memory, 4 ... CPU, 5 ... DMA controller, 6 ... interface part with upper host, 10 ... character display device, 31 ... transmission Line, 32 …… Reception line, 43 …… Interrupt signal, 45 …… Send character set request signal line, 46 …… Send character set completion signal line, 48 …… Received character takeover request signal line, 49 …… Received character Pickup completion signal line.
Claims (1)
と、該回線アダプタとの間でブロック単位のデータ転送
を行うメモリとを備えた調歩同期式の通信制御装置にお
いて、 上記回線アダプタ内に、回線からの送信停止要求のキャ
ラクタ、送信再開要求のキャラクタ、電文の最後を示す
キャラクタを検出する検出手段と、該検出手段により送
信停止要求のキャラクタおよび送信再開要求のキャラク
タを検出した場合、これらのキャラクタを受信電文から
除去し、電文の最後を示すキャラクタを検出した場合、
割込みを発生する手段と、送信停止要求のキャラクタを
検出してから送信再開要求のキャラクタを検出するまで
は電文の送信を停止する手段と、外部からの指示により
送信停止要求のキャラクタまたは送信再開要求のキャラ
クタを任意の時点で送信する手段とを設け、 さらに、メモリ内の送信キャラクタを上記回線アダプタ
へブロック単位にデータ転送する手段と、 上記回線アダプタ内の受信キャラクタをメモリへブロッ
ク単位でデータ転送し、しかも一定キャラクタ転送する
毎に割込みを発生する手段と、 を有することを特徴とする通信制御装置。1. A start-stop synchronous communication control device comprising a line adapter having a character buffer, and a memory for transferring data in block units between the line adapter and a line adapter. A detection means for detecting the character of the transmission stop request, the character of the transmission restart request, and the character indicating the end of the message, and when the detection means detects the character of the transmission stop request and the character of the transmission restart request, these characters are received. If it is removed from the message and a character indicating the end of the message is detected,
A means for generating an interrupt, a means for stopping the transmission of a telegram from the detection of the character of the transmission stop request until the character of the transmission restart request is detected, and the character of the transmission stop request or the transmission restart request by an external instruction. Means for transmitting the character in the line adapter at any time, and means for transferring the data in the memory to the line adapter in block units, and for transmitting the received character in the line adapter to the memory in block units In addition, the communication control device is provided with means for generating an interrupt each time a fixed character is transferred.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62034224A JPH0681174B2 (en) | 1987-02-17 | 1987-02-17 | Communication control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62034224A JPH0681174B2 (en) | 1987-02-17 | 1987-02-17 | Communication control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS63202161A JPS63202161A (en) | 1988-08-22 |
JPH0681174B2 true JPH0681174B2 (en) | 1994-10-12 |
Family
ID=12408175
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP62034224A Expired - Lifetime JPH0681174B2 (en) | 1987-02-17 | 1987-02-17 | Communication control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0681174B2 (en) |
-
1987
- 1987-02-17 JP JP62034224A patent/JPH0681174B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPS63202161A (en) | 1988-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6038607A (en) | Method and apparatus in a computer system having plural computers which cause the initiation of functions in each other using information contained in packets transferred between the computers | |
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 | |
EP0534529A1 (en) | Apparatus and method for burst data transfer | |
EP0496177A1 (en) | Method of transmitting data by buffer chaining between a host computer and a communication controller | |
JPS639786B2 (en) | ||
US4365296A (en) | System for controlling the duration of the time interval between blocks of data in a computer-to-computer communication system | |
JPH1028150A (en) | Communications system | |
JP2003069603A (en) | Packet communication control device | |
US6584512B1 (en) | Communication DMA device for freeing the data bus from the CPU and outputting divided data | |
US6700887B1 (en) | Packet transfer apparatus which generates access reject command during a DMA transfer | |
KR20040043198A (en) | Bus system and bus interface | |
US6693905B1 (en) | Data exchange unit | |
JPH0744567B2 (en) | Communication interface device | |
JPH0681174B2 (en) | Communication control device | |
JPH1063617A (en) | Serial communication device | |
JP2615127B2 (en) | Communication processing device | |
JPH0353736A (en) | Reception buffer control system | |
JP2533886B2 (en) | Data transfer method | |
JPH07319841A (en) | Serial control device | |
JPH11103330A (en) | Infrared ray data transmission method and system therefor | |
JP2639248B2 (en) | Communication interface device | |
JPH02189049A (en) | Line controller | |
JPH0234518B2 (en) | ||
JP3146864B2 (en) | Unidirectional loop transmission circuit | |
JP3442099B2 (en) | Data transfer storage device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
EXPY | Cancellation because of completion of term |