JP2511697B2 - Data receiver - Google Patents

Data receiver

Info

Publication number
JP2511697B2
JP2511697B2 JP63174288A JP17428888A JP2511697B2 JP 2511697 B2 JP2511697 B2 JP 2511697B2 JP 63174288 A JP63174288 A JP 63174288A JP 17428888 A JP17428888 A JP 17428888A JP 2511697 B2 JP2511697 B2 JP 2511697B2
Authority
JP
Japan
Prior art keywords
reception
signal
data
line
frame
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 - Fee Related
Application number
JP63174288A
Other languages
Japanese (ja)
Other versions
JPH0223750A (en
Inventor
俊道 嶋谷
勝 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Iwatsu Electric Co Ltd
Original Assignee
Iwatsu Electric Co Ltd
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 Iwatsu Electric Co Ltd filed Critical Iwatsu Electric Co Ltd
Priority to JP63174288A priority Critical patent/JP2511697B2/en
Publication of JPH0223750A publication Critical patent/JPH0223750A/en
Application granted granted Critical
Publication of JP2511697B2 publication Critical patent/JP2511697B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、HDLC(ハイレベル・データ・リンク・コン
トロール)フォーマット又はこれに類似のフォーマット
に従うデータを受信することができるデータ受信装置に
関する。
Description: TECHNICAL FIELD The present invention relates to a data receiving apparatus capable of receiving data in an HDLC (High Level Data Link Control) format or a format similar thereto.

[従来の技術] HDLCフォーマットは例えば第10図に示すように構成さ
れている。このフォーマットは、1つ以上の開始フラグ
と、受信すべきデータと、受信データに対するエラーチ
ェックコード[FCS(Frame Check Sequence)]と1
つ以上の終結フラグで構成されている。ここで、2フレ
ームのデータを連続して受信する場合には第1フレーム
目の開始フラグは第2フレーム目の終結フラグを兼ねる
ことができる。このように連続するデータを受信する場
合、受信回路は、第1フレーム目のデータの受信を終了
すると、直ちに第2フレーム目のデータを受信するため
の準備を開始しなければならず、高速処理が要求され
る。そこで、特開昭58−144402号公報に開示されている
データ受信方式では、データ受信部の前段にデータを蓄
えるためのデータ蓄積部を配置し、第1フレーム目の開
始フラグを検出すると、受信データをデータ蓄積部に蓄
え、直ちに、その受信したデータをデータ受信部に転送
する。しかし、終結フラグを検出すると、第2フレーム
目のデータをデータ蓄積部に蓄えるが、データ受信部へ
のデータ転送を停止する。一方、CPUは、第2フレーム
目のデータがデータ蓄積部に蓄えられている間に、第2
フレーム目のデータを受信するための準備をする。そし
て、第2フレーム目の準備が完了すると、データ蓄積部
に蓄えられたデータがデータ受信部に転送され、それを
CPUが処理する。
[Prior Art] The HDLC format is configured, for example, as shown in FIG. This format has one or more start flags, data to be received, and an error check code [FCS (Frame Check Sequence)] for the received data and 1
It consists of one or more closing flags. Here, when two frames of data are continuously received, the start flag of the first frame can also serve as the end flag of the second frame. When receiving such continuous data, the receiving circuit must start preparations for receiving the data of the second frame as soon as it finishes receiving the data of the first frame. Is required. Therefore, in the data receiving method disclosed in Japanese Unexamined Patent Publication (Kokai) No. 58-144402, a data storing section for storing data is arranged in front of the data receiving section, and when the start flag of the first frame is detected, the data is received. The data is stored in the data storage unit, and the received data is immediately transferred to the data receiving unit. However, when the termination flag is detected, the data of the second frame is stored in the data storage unit, but the data transfer to the data reception unit is stopped. On the other hand, the CPU controls the second frame while the second frame of data is stored in the data storage section.
Prepare to receive the frame data. Then, when the preparation for the second frame is completed, the data stored in the data storage unit is transferred to the data reception unit,
CPU handles.

[発明が解決しようとする課題] ところで、CPUに異常が発生したときに、これを迅速
に検出して異常に対処しなければならない。
[Problems to be Solved by the Invention] By the way, when an abnormality occurs in a CPU, it must be detected promptly to deal with the abnormality.

そこで、本発明の目的はCPUの異常を容易且つ迅速に
検出し、これをCPUに通知することができるデータ受信
装置を提供することにある。
Therefore, an object of the present invention is to provide a data receiving device that can easily and quickly detect a CPU abnormality and notify the CPU of the abnormality.

[課題を解決するための手段] 上記目的を達成するための本発明は、実施例を示す図
面の符号を参照して説明すると、データ伝送ライン1aに
接続された受信部1と、前記受信部1で受信したデータ
を格納するために前記受信部1に接続されたランダム・
アクセス・メモリ4と、前記受信部1から前記ランダム
・アクセス・メモリ4に対するデータ転送を制御する制
御部3と、装置全体を制御すると共に受信異常に対処す
る機能を有しているCPU2とを備え、前記受信部1が前記
データ伝送ライン1aから受信すべき受信データRXDは複
数フレームが直列に配置されたものであり、前記複数フ
レームの内の少なくとも最初のフレームは、少なくと
も、フレームの開始を示す開始フラグと1バイト以上の
データとフレームの終結を示す終結フラグとを含み、前
記最初のフレームよりは後のフレームは、少なくとも、
1バイト以上のデータとフレームの終結を示す終結フラ
グとを含み、前記受信部1は受信バッフア70とフラグ検
出手段40とタイミング信号作成手段60と受信終了制御手
段50と受信準備完了命令信号作成手段12、100、103を有
し、前記受信バッフア70は前記データを一時的に蓄えて
前記ランダム・アクセス・メモリ4に転送するものであ
って、前記データ伝送ライン1aと前記ランダム・アクセ
ス・メモリ4との間に接続され且つ前記複数バイトを一
時的に格納することができる容量を有し、前記フラグ検
出手段40は前記受信テータRXDの前記複数フレームの前
記開始フラグ及び前記終結フラグを検出するものであ
り、前記タイミング信号作成手段60は前記開始フラグ及
び前記終結フラグに基づいて前記受信バッフア70に対す
る前記データの書き込みを示すタイミング信号を形成し
且つ前記終結フラグに基づいて1フレームのデータを受
信の終了を示す受信終了タイミング信号を作成するもの
であり、前記受信準備完了命令信号作成手段12、100、1
03は前記ランダム・アクセス・メモリ4に対するデータ
の書き込み状態に基づいて次のフレームのデータを前記
ランダム・アクセス・メモリ4に書込む準備が完了した
ことを示す受信準備完了命令信号を作成するものであ
り、前記受信終了制御手段50は受信終了通知信号作成手
段180と受信異常判定手段186、187とを有し、前記受信
終了通知信号作成手段180は前記受信終了タイミング信
号と前記受信準備完了命令信号とに応答して受信終了通
知信号INTRを作成し、この受信終了通知信号INTRを前記
CPU2に送るものであり、前記受信終了通知信号INTRが前
記受信終了タイミング信号に同期して第1の電圧状態か
ら前記データ転送を禁止する第2の電圧状態に転換し、
前記受信準備完了命令信号に応答して前記第2の電圧状
態から前記第1の電圧状態に戻るように前記受信終了通
知信号作成手段180が形成されており、前記受信異常判
定手段186、187は前記受信終了タイミング信号と前記受
信終了通知信号INTRとに応答して受信異常信号ABINTを
作成し、この受信異常信号ABINTを前記CPU2に送るもの
であり、前記受信終了タイミング信号の前縁において前
記受信終了通知信号INTRが前記第2の電圧状態にある時
に受信異常を示す前記受信異常信号ABINTを発生するよ
うに前記受信異常判定手段186、187が形成されているこ
とを特徴とするデータ受信装置に係わるものである。
[Means for Solving the Problems] The present invention for achieving the above object will be described with reference to the reference numerals of the drawings showing an embodiment. The receiving unit 1 connected to a data transmission line 1a and the receiving unit. Random number connected to the receiving unit 1 for storing the data received in 1.
An access memory 4, a control unit 3 for controlling data transfer from the receiving unit 1 to the random access memory 4, and a CPU 2 for controlling the entire device and having a function of coping with reception abnormality The received data RXD to be received by the receiver 1 from the data transmission line 1a is a plurality of frames arranged in series, and at least the first frame of the plurality of frames indicates at least the start of the frame. A start flag, one or more bytes of data, and an end flag indicating the end of a frame are included, and at least a frame after the first frame is at least,
The receiving unit 1 includes one or more bytes of data and a termination flag indicating the end of a frame, and the reception unit 1 includes a reception buffer 70, a flag detection means 40, a timing signal generation means 60, a reception end control means 50, and a reception preparation completion command signal generation means. 12, 100, 103, the receiving buffer 70 temporarily stores the data and transfers the data to the random access memory 4, and the data transfer line 1a and the random access memory 4 are provided. And a capacity capable of temporarily storing the plurality of bytes, and the flag detecting means 40 detects the start flag and the end flag of the plurality of frames of the reception data RXD. The timing signal generating means 60 indicates the writing of the data to the reception buffer 70 based on the start flag and the end flag. Is intended to create a reception end timing signal indicating the end of reception of data of one frame based on and the termination flag to form a timing signal, said reception preparation completion instruction signal generating means 12,100,1
Reference numeral 03 denotes a reception preparation completion command signal indicating that preparation for writing the next frame of data in the random access memory 4 is completed based on the write state of data in the random access memory 4. Yes, the reception end control means 50 has a reception end notification signal generation means 180 and reception abnormality determination means 186, 187, and the reception end notification signal generation means 180 is the reception end timing signal and the reception preparation completion command signal. In response to the above, a reception end notification signal INTR is created, and this reception end notification signal INTR is
The signal is sent to the CPU2, and the reception end notification signal INTR is changed from the first voltage state to the second voltage state in which the data transfer is prohibited in synchronization with the reception end timing signal,
The reception end notification signal creating means 180 is formed so as to return from the second voltage state to the first voltage state in response to the reception preparation completion command signal, and the reception abnormality determining means 186, 187 A reception abnormal signal ABINT is created in response to the reception end timing signal and the reception end notification signal INTR, and the reception abnormal signal ABINT is sent to the CPU2, and the reception is performed at the leading edge of the reception end timing signal. In the data receiving device, the reception abnormality determining means 186, 187 is formed so as to generate the reception abnormality signal ABINT indicating reception abnormality when the end notification signal INTR is in the second voltage state. It is related.

[発明の作用及び効果] 本発明においては、フラグ検出手段40によるフラグの
検出に基づいてタイミング信号作成手段60が受信終了タ
イミング信号を作成し、ランダム・アクセス・メモリ4
のデータを書き込み状態に基づいてランダム・アクセス
・メモリ4に次のデータを書込むための準備が完了した
ことを示す受信準備完了命令信号を作成し、受信終了タ
イミング信号と受信準備完了命令信号とに応答して受信
終了通知信号INTRを作成し、受信終了通知信号INTRを受
信準備完了命令信号に応答させて第2の電圧状態から第
1の電圧状態にし、受信終了タイミング信号の前縁にお
いて受信終了通知信号INTRが第2の電圧状態にある時に
異常を示す受信異常信号ABINTを発生させる。本発明で
は、受信バッフア70に対するデータの書き込みが終了し
たにも拘らず受信準備完了命令信号が得られないことに
基づいて異常を示す受信異常信号ABIMTを発生する。受
信準備完了命令信号はランダム・アクセス・メモリ4の
書き込み状態に基づいて作成されており、ランダム・ア
クセス・メモリ4の書き込み状態はCPU2の動作に依存し
て変化するので、受信異常信号ABINTはCPU2が正常か異
常かを示す情報を含む。従って、CPU2の異常を容易且つ
迅速に検出することが可能になる。
[Operation and Effect of the Invention] In the present invention, the timing signal creation means 60 creates the reception end timing signal based on the flag detection by the flag detection means 40, and the random access memory 4
A reception ready instruction signal indicating that the preparation for writing the next data in the random access memory 4 is completed based on the write state of the data, and a reception end timing signal and a reception preparation instruction signal are generated. In response to the reception end notification signal INTR, responding to the reception end notification signal INTR in response to the reception preparation completion command signal to change from the second voltage state to the first voltage state, and receiving at the leading edge of the reception end timing signal. When the end notification signal INTR is in the second voltage state, the reception abnormality signal ABINT indicating abnormality is generated. In the present invention, the reception abnormality signal ABIMT indicating abnormality is generated based on the fact that the reception preparation completion command signal is not obtained even though the writing of the data to the reception buffer 70 is completed. The reception ready command signal is created based on the write state of the random access memory 4, and the write state of the random access memory 4 changes depending on the operation of the CPU2. Contains information indicating whether is normal or abnormal. Therefore, the abnormality of the CPU 2 can be detected easily and quickly.

[実施例] 次に、第1A図〜第9図を参照して本発明の一実施例に
係わるデータ受信装置を説明する。
[Embodiment] Next, a data receiving apparatus according to an embodiment of the present invention will be described with reference to FIGS. 1A to 9.

(データ受信装置の概要) このデータ受信装置は、第1A図に示すように、相互に
接続されたHDLC受信部1と、CPU2と、DMA制御部3と、R
AM(ランダム・アクセス・メモリ)4とから成る。各部
を詳しく説明すると、HDLC受信部1は、HDLC相当のフォ
ーマットの高速のデータを受信し、HDLC受信部1内の受
信バッファに受信データを蓄えるためのものである。CP
U2は、本装置全体を制御するためのもので、マイクロプ
ロセッサ、メモリ等で構成されたマイクロコンピュータ
であり、HDLC受信部1、DMA制御部3およびRAM4を制御
する。DMA制御部3は、HDLC受信部1の受信バッファに
蓄えられた受信データをDMA(Direct Memory Acces
s)を用いてRAM4に転送するための制御をなすためのも
ので、市販されているLSI(NEC製μPD71071)等で構成
される。RAM4は受信データを格納するためのメモリであ
る。HDLC受信部1に接続されたライン1aは受信データRX
Dを受信部1に供給するものである。受信データRXDは第
1B図に示すように各フレームの始まりと終りにフラグを
伴なっている。
(Outline of Data Receiving Device) As shown in FIG. 1A, this data receiving device includes an HDLC receiving unit 1, a CPU 2, a DMA control unit 3 and an R, which are connected to each other.
It consists of AM (random access memory) 4. Explaining each unit in detail, the HDLC receiving unit 1 is for receiving high-speed data in a format corresponding to HDLC and storing the received data in a receiving buffer in the HDLC receiving unit 1. CP
U2 is for controlling the entire apparatus, is a microcomputer including a microprocessor, memory, etc., and controls the HDLC receiver 1, the DMA controller 3 and the RAM 4. The DMA control unit 3 DMAs the received data stored in the reception buffer of the HDLC reception unit 1 into a DMA (Direct Memory Acces
s) for controlling to transfer to RAM4 by using a commercially available LSI (NEC μPD71071) or the like. RAM4 is a memory for storing received data. The line 1a connected to the HDLC receiver 1 is the receive data RX
The D is supplied to the receiving unit 1. Received data RXD is
It is accompanied by flags at the beginning and end of each frame as shown in Figure 1B.

受信部1に接続されたライン1bは受信クロックRXCLK
を受信部1に供給するものである。この受信クロックRX
CLKは第1B図に示すような所定周期のクロックパルスか
ら成り、受信データの受信タイミングおよび伝送速度を
決める機能を有する。なお、9.6kbps、19.2kbps、16kbp
s、64kbps等の伝送速度を設定することができる。
The line 1b connected to the receiving unit 1 is the reception clock RXCLK
Is supplied to the receiving unit 1. This receive clock RX
CLK is composed of clock pulses having a predetermined cycle as shown in FIG. 1B, and has a function of determining the reception timing and transmission rate of received data. In addition, 9.6kbps, 19.2kbps, 16kbp
It is possible to set the transmission speed such as s, 64kbps.

HDLC受信部1とCPU2とDMA制御部3とRAM4とは、デー
タバスDBとアドレスバスABと種々のコントロールライン
で相互に接続されている。相互接続のためのコントロー
ルラインとしてリード制御信号RDを伝送するライン3a
と、ライト制御信号WRを伝送するライン3bとがある。更
に、受信部1とDMA制御部3とは受信要求信号(以下DRQ
信号と呼ぶ)を伝送するためのライン1cとDMA停止信号E
NDを伝送するためのライン1dとで接続されている。受信
部1とCPU2とは受信終了通知信号INTRを伝送するライン
1eとABINTを伝送するためのライン1fとで接続されてい
る。CPU2から導出されたホールド確認信号HAKの伝送ラ
イン2aはDMA制御部3と受信部1に接続されている。ま
た、DMA制御部3から導出されたホールド要求信号HRQの
伝送ライン3cはCPU2に接続されている。
The HDLC receiver 1, the CPU 2, the DMA controller 3 and the RAM 4 are connected to each other by a data bus DB, an address bus AB and various control lines. Line 3a transmitting read control signal RD as a control line for interconnection
And a line 3b for transmitting the write control signal WR. Further, the reception unit 1 and the DMA control unit 3 receive a reception request signal (hereinafter, DRQ
Signal 1) and DMA stop signal E
It is connected with line 1d for transmitting ND. A line that transmits the reception end notification signal INTR between the receiver 1 and the CPU 2.
It is connected by 1e and line 1f for transmitting ABINT. The transmission line 2a of the hold confirmation signal HAK derived from the CPU 2 is connected to the DMA controller 3 and the receiver 1. The transmission line 3c of the hold request signal HRQ derived from the DMA control unit 3 is connected to the CPU 2.

HDLC受信部1はRXCLK立ち下がりでライン1aの受信デ
ータRXDをサンプリングし、1フレームの先頭にある開
始フラグを監視している。フラグは第1B図の最も上に示
すように“01111110"の8ビットで構成され、このフラ
グを検出すると、フラグに続くデータを8ビット単位に
受信バッファに蓄える。受信バッファにデータが蓄えら
れると、HDLC受信部1からDRQ信号が出力され、DMA制御
部3に受信データのDMA転送を要求する。これを受けてD
MA制御部3は、CPU2に対してHRQ信号を出力して、CPU2
にホールドを要求する。この信号を検出したCPU2は、自
分自身の動作を停止し、アドレスバスAB、データバスD
B、リード信号RDのライン3a、ライト信号WRのライン3b
を開放してホールド状態に入ると共に、DMA制御部3に
対してホールドを確認したことを示すHAK信号を出力す
る。
The HDLC receiver 1 samples the received data RXD on the line 1a at the falling edge of RXCLK and monitors the start flag at the beginning of one frame. The flag is composed of 8 bits of "01111110" as shown at the top of FIG. 1B, and when this flag is detected, the data following the flag is stored in the receiving buffer in units of 8 bits. When the data is stored in the reception buffer, the DLC signal is output from the HDLC reception unit 1 and the DMA control unit 3 is requested to DMA transfer the reception data. In response to this, D
The MA control unit 3 outputs the HRQ signal to the CPU2, and the CPU2
Request hold. When CPU2 detects this signal, it stops its own operation, and the address bus AB and data bus D
B, line 3a of read signal RD, line 3b of write signal WR
Is released to enter the hold state, and an HAK signal indicating that the hold has been confirmed is output to the DMA control unit 3.

HAK信号が出力されると、DMA転送が開始される。DMA
制御部3はHDLC受信部1に受信バッファのデータを読み
出すためのリード制御信号RDを出力する。HDLC受信部1
はHAK信号が“H"でかつRD信号が入力されたならば、RD
信号のタイミングで受信バッファの内容を1バイトづつ
受信した順番にデータバスDBに出力する。一方、DMA制
御部3は受信データをRAM4に格納するためのメモリ番地
を示すアドレスバスABとRAM4に書き込むタイミングを示
すライト制御信号WRを出力し、データバスDB上にある受
信データをRAM4に書き込む。
When the HAK signal is output, DMA transfer is started. DMA
The control unit 3 outputs a read control signal RD for reading the data in the reception buffer to the HDLC reception unit 1. HDLC receiver 1
If the HAK signal is “H” and the RD signal is input,
The contents of the receiving buffer are output to the data bus DB in the order of receiving one byte at a signal timing. On the other hand, the DMA controller 3 outputs the address bus AB indicating the memory address for storing the received data in the RAM4 and the write control signal WR indicating the timing of writing to the RAM4, and writes the received data on the data bus DB to the RAM4. .

受信バッファにデータがなくなると、DRQ信号、HRQ信
号およびHAK信号を“L"にし、これにより、CPU2はホー
ルド状態を解除し、動作を再開する。
When there is no more data in the receive buffer, the DRQ signal, HRQ signal and HAK signal are set to "L", whereby the CPU 2 releases the hold state and resumes the operation.

以上の動作を1フレームのデータ受信が終了するまで
繰返す。1フレームの受信終了は1バイト以上のデータ
を受信した後にフラグ(終結フラグ)を検出したことで
なされる。データを格納するメモリ番地は1バイトごと
に異なる値でなければならないので、DMA制御部3は1
バイトのDMA転送終了毎に格納する番地を1つづつイン
クリメントする。
The above operation is repeated until one frame of data is received. The end of reception of one frame is made by detecting a flag (end flag) after receiving data of 1 byte or more. Since the memory address for storing data must be a different value for each byte, the DMA control unit 3
The address to be stored is incremented by 1 each time the byte DMA transfer is completed.

1フレームのデータ受信を終了したならば、HDLC受信
部1は、CPU2に受信終了を知らせるために、ライン1eに
INTR信号を出力し、またDMA制御部3に接続されている
ライン1dにDMA転送の停止信号ENDを出力する。
When one frame of data has been received, the HDLC receiver 1 sends a line 1e to notify the CPU 2 of the end of reception.
The INTR signal is output, and the DMA transfer stop signal END is output to the line 1d connected to the DMA control unit 3.

CPU2は受信終了を認識すると、RAM4に1フレーム分の
データが格納されているので、そのデータを処理し、次
のフレームのデータを受信するためのメモリ番地を設定
し、DMA制御部3を再起動させる。しかし、第1フレー
ムの受信データ数が多くかつ第2フレームの開始フラグ
が第1フレームの終結フラグを兼ねている場合は、上記
のための処理時間が短くなり、CPU2に高速動作が要求さ
れる。
When the CPU2 recognizes the end of reception, one frame of data is stored in the RAM4, so the data is processed, the memory address for receiving the data of the next frame is set, and the DMA control unit 3 is reconfigured. To start. However, when the number of received data of the first frame is large and the start flag of the second frame also serves as the end flag of the first frame, the processing time for the above becomes short and the CPU2 is required to operate at high speed. .

そこで、この実施例では、受信バッファの容量を複数
バイトにして、CPU2が準備できるまで、HDLC受信部1は
このバッファにデータを一時的に蓄えておく。そして、
CPU2の準備ができしだい第2フレームのデータのDMA転
送を再開できるようにする。CPU2は第2フレームの準備
ができたことをアドレスバスABとライト制御信号WRを用
いて受信準備完了命令としてHDLC受信部1に知らせると
共に、INTR信号を“L"にする。したがって、HDLC受信部
1は、INTR信号が“H"の時、データを一時的に蓄えるよ
うDRQ信号の出力を禁止し、INTR信号が“L"になるとDRQ
信号を出力し、DMA転送を再開させる。
Therefore, in this embodiment, the capacity of the reception buffer is set to a plurality of bytes, and the HDLC reception unit 1 temporarily stores data in this buffer until the CPU 2 can prepare. And
When the CPU2 is ready, the DMA transfer of the second frame data can be resumed. The CPU 2 notifies the HDLC receiving unit 1 as a reception preparation completion instruction by using the address bus AB and the write control signal WR that the second frame is ready, and sets the INTR signal to "L". Therefore, the HDLC receiver 1 prohibits the output of the DRQ signal to temporarily store the data when the INTR signal is “H”, and the DRQ signal when the INTR signal becomes “L”.
Output signal and restart DMA transfer.

HDLC受信部1が、第2フレームの受信を終了した時点
でCPU2が第2フレームの受信準備を完了していないこと
を判定すると、CPU2の異常と見なしてABINT信号(異常
信号)をCPU2に送る。また、INTR信号が受信終了を示し
ているにも拘らずHDLC受信部1に内蔵の受信バッファが
オーバーフローしている場合にも、HDLC受信部1はABIN
T信号をCPU2に送る。CPU2はABINTの通知を受けたら、例
えば送信側を制御するための信号を作成する。
When the HDLC receiving unit 1 determines that the CPU2 is not ready to receive the second frame when the second frame has been received, the CPU2 regards it as an abnormality of the CPU2 and sends an ABINT signal (abnormal signal) to the CPU2. . In addition, even if the INTR signal indicates the end of reception but the receive buffer built in the HDLC receiver 1 overflows, the HDLC receiver 1 will not
Send T signal to CPU2. Upon receiving the ABINT notification, the CPU 2 creates a signal for controlling the transmitting side, for example.

第1B図は第1A図の各信号の状態を原理的に示す。FCS
は受信データRXDに含められて示されている。通常、n
−1バイト目とnバイト目のデータがFCSである。このF
CSは16次の生成多項式等を用いて誤り検出を行うための
ものである。誤りのある受信フレームは無効フレームと
呼ばれ、このフレームは廃棄される。第1B図ではDRQが
間欠的にDMA制御部3に与えられている。DMA制御部3は
DRQに応答してHRQをCPU2に与えている。CPU2はHRQに応
答してHAKによってバス開放をDMA制御部3及びHDLC受信
部1に通知する。DMA制御部3は、HAKに応答してリード
制御信号RD、ライト制御信号WRを送出し、且つアドレス
バスAB及びデータバスDBを動作状態になし、HDLC受信部
1のデータをRAM4にDMA転送する。
FIG. 1B shows the state of each signal in FIG. 1A in principle. FCS
Are included in the received data RXD. Usually n
The -1st byte and the nth byte of data are FCS. This F
CS is for performing error detection using a 16th-order generator polynomial or the like. An erroneous received frame is called an invalid frame and this frame is discarded. In FIG. 1B, the DRQ is intermittently given to the DMA controller 3. DMA controller 3
HRQ is given to CPU2 in response to DRQ. In response to HRQ, the CPU 2 notifies the DMA controller 3 and the HDLC receiver 1 of bus release by HAK. The DMA control unit 3 sends the read control signal RD and the write control signal WR in response to HAK, sets the address bus AB and the data bus DB in the operating state, and DMA-transfers the data of the HDLC receiving unit 1 to the RAM 4. .

(HDLC受信部) 第1A図のHDLC受信部1は第2A図に示すように構成され
ており、第2B図に示すように動作する。すなわち、HDLC
受信部1は、CPUバス制御回路10と8ビットのシリアル
イン・パラレルアウト・シフトレジスタ(S/Pレジス
タ)20と、FCS演算回路30と、フラグ検出回路40と、受
信終了制御回路50と、受信タイミング回路60と、受信バ
ッファ70と、ANDゲート80と、NOT回路90とから成る。
(HDLC Receiver) The HDLC receiver 1 of FIG. 1A is configured as shown in FIG. 2A and operates as shown in FIG. 2B. Ie HDLC
The reception unit 1 includes a CPU bus control circuit 10, an 8-bit serial-in / parallel-out shift register (S / P register) 20, an FCS arithmetic circuit 30, a flag detection circuit 40, a reception end control circuit 50, It comprises a reception timing circuit 60, a reception buffer 70, an AND gate 80, and a NOT circuit 90.

CPUバス制御回路10には、アドレスバスAB、データバ
スDB、リード制御信号ライン3a、ライト制御信号ライン
3b、HAK信号ライン2aがそれぞれ接続されている。CPUバ
ス制御回路10は、HAK信号とRD信号から受信データ読出
し信号を作成し、これをライン11に送出する。この信号
に応答して受信バッファ70はライン15に受信データを出
力する。ライン15の受信データはデータバスDBに出力さ
れる。CPUバス制御回路10はアドレスバスABの信号とラ
イト制御信号WRとをデコードして受信準備完了命令信号
を作成し、これをライン12を介して受信終了制御回路50
に送る。8ビットS/Pレジスタ20には受信データライン1
aと受信クロックライン1bとが接続されている。このS/P
レジスタ20は、受信クロックRXCLKの立ち下がりで受信
データRXDをサンプリングし、蓄え、バス21にパラレル
形式で受信データを出力する。第2B図のバス21の状態を
示す波形において斜線を付した部分が受信データの有効
出力期間であり、この期間内に受信バッファ70にデータ
を蓄えなければならない。S/Pレジスタ30は、受信デー
タRXDを8ビット送らせたシリアル信号をライン22に出
力する。
The CPU bus control circuit 10 includes an address bus AB, a data bus DB, a read control signal line 3a, and a write control signal line.
3b and HAK signal line 2a are connected respectively. The CPU bus control circuit 10 creates a reception data read signal from the HAK signal and the RD signal and sends it to the line 11. In response to this signal, the reception buffer 70 outputs the reception data on the line 15. The received data on line 15 is output to the data bus DB. The CPU bus control circuit 10 decodes the signal of the address bus AB and the write control signal WR to create a reception preparation completion command signal, which is received via the line 12 to the reception end control circuit 50.
Send to Receive data line 1 to 8-bit S / P register 20
The a and the reception clock line 1b are connected. This S / P
The register 20 samples and stores the reception data RXD at the falling edge of the reception clock RXCLK, and outputs the reception data to the bus 21 in parallel format. The shaded portion in the waveform showing the state of the bus 21 in FIG. 2B is the effective output period of the reception data, and the data must be stored in the reception buffer 70 within this period. The S / P register 30 outputs to the line 22 a serial signal in which the received data RXD is sent in 8 bits.

FCS演算回路30は受信したデータに伝送誤りがあるか
否かをチェックするための回路である。このFCS演算回
路30には8ビット遅延受信データライン22と受信クロッ
クライン1bとが接続されている。FCS演算回路30は16ビ
ットの線形帰還シフトレジスタを内蔵し、ここに受信ク
ロックRXCLKの立ち下がりで8ビット遅れの受信データ
を蓄える。そして、受信したデータRXDに誤りがある場
合には、ライン31にFCSエラー信号として高レベル“H"
を出力し、これを受信終了制御回路50に与える。
The FCS arithmetic circuit 30 is a circuit for checking whether or not the received data has a transmission error. An 8-bit delayed reception data line 22 and a reception clock line 1b are connected to the FCS arithmetic circuit 30. The FCS operation circuit 30 has a built-in 16-bit linear feedback shift register, and stores the reception data delayed by 8 bits at the falling edge of the reception clock RXCLK. If there is an error in the received data RXD, a high level “H” is output as an FCS error signal on line 31.
Is output to the reception end control circuit 50.

バス21でS/Pレジスタ20に接続されたフラグ検出回路4
0は受信データにフラグがあるか否かを検出する回路で
あり、フラグを検出した場合、第2B図に示すようにライ
ン41に高レベル“H"のフラグ検出信号を出力する。
Flag detection circuit 4 connected to S / P register 20 via bus 21
Reference numeral 0 is a circuit that detects whether or not there is a flag in the received data. When a flag is detected, a high level "H" flag detection signal is output to the line 41 as shown in FIG. 2B.

受信バッファ70は受信したデータを蓄えておくバッフ
ァメモリであり、複数バイトのFIFO(先入れ先出し型)
メモリで構成されている。ライン21で与えられるパラレ
ルに変換された受信データは受信タイミング回路60から
導出されているライン62によって与えられる受信データ
書き込み信号の立ち上がりでバッファに書き込まれ、ラ
イン11の受信データ読出し信号のタイミングでバス15に
出力される。受信バッファ70は受信バッファ状態表示信
号を形成してライン71に出力する。ライン71の受信バッ
ファ状態表示信号は、受信バッファ70にデータが有る場
合に高レベル“H"になる。受信終了制御回路50からライ
ン51を介して受信バッファクリア信号が受信バッァ70に
与えられると、受信バッファ70はクリアされ、受信デー
タが廃棄される。この様に受信データが廃棄されると、
受信バッファ70は空になるので、ライン71の受信バッフ
ァ状態表示信号71が低レベル“L"になる。受信バッファ
70から導出されているオーバーラン信号ライン72は受信
バッファ70がオーバーフローしたか否かを受信終了制御
回路50に知らせるものであり、オーバーラン信号はオー
バーフロー時に高レベル“H"になる。
The receive buffer 70 is a buffer memory that stores received data and is a multi-byte FIFO (first-in first-out type).
It is composed of memory. The parallel-converted received data given on line 21 is written into the buffer at the rising edge of the received-data write signal given by line 62, which is derived from the receiving timing circuit 60, and is transferred at the timing of the received-data read signal on line 11 to the bus. Output to 15. The reception buffer 70 forms a reception buffer status display signal and outputs it to the line 71. The receive buffer status indication signal on line 71 goes high when there is data in receive buffer 70. When the reception buffer clear signal is given from the reception end control circuit 50 to the reception buffer 70 via the line 51, the reception buffer 70 is cleared and the reception data is discarded. When the received data is discarded in this way,
Since the reception buffer 70 becomes empty, the reception buffer status display signal 71 on the line 71 becomes low level "L". Receive buffer
An overrun signal line 72 derived from 70 informs the reception end control circuit 50 whether or not the reception buffer 70 has overflowed, and the overrun signal becomes a high level "H" at the time of overflow.

受信クロック信号ライン1b及びフラグ検出信号ライン
41が接続されている受信タイミング回路60は、カウンタ
とそのカウント値をデコードする回路とで構成され、受
信クロック信号RXCLKとフラグ検出信号に基づいてHDLC
受信部1内の受信終了信号を作成し、これをライン61に
出力すると共に、受信データ書き込み信号をライン62に
出力するものである。受信終了信号はライン61によって
受信終了制御回路50に与えられる。ライン61の受信終了
信号は1フレームの終了時に出力される信号である。ラ
イン62の受信バッファ書き込み信号は受信データを受信
バッファに書き込むための信号である。
Receive clock signal line 1b and flag detection signal line
The reception timing circuit 60 to which 41 is connected is composed of a counter and a circuit for decoding the count value, and based on the reception clock signal RXCLK and the flag detection signal, the HDLC
A reception end signal in the receiving section 1 is created and output to the line 61, and at the same time, a reception data write signal is output to the line 62. The reception end signal is given to the reception end control circuit 50 by the line 61. The reception end signal on the line 61 is a signal output at the end of one frame. The receive buffer write signal on line 62 is a signal for writing the receive data in the receive buffer.

ライン12、31、51、61が接続されている受信終了制御
回路50は、受信終了通知信号INTRを作成してライン1eに
出力すると共に、異常信号ABINTを作成してライン1fに
出力し、更にDMA停止信号ENDを作成してライン1dに出力
するものである。受信終了通知信号INTRはライン61の受
信終了信号の立ち上がりで高レベル“H"になる信号で、
CPU2に受信終了を通知する。受信終了通知信号INTRはラ
イン12の受信準備完了命令信号に応答して低レベル“L"
になる。DMA停止信号ENDは受信終了通知信号INTRが低レ
ベル“L"のときにライン61の受信終了信号の立ち上がり
のタイミングで出力するものであり、DMA制御部を停止
させる。異常信号ABINTは、もし、ライン61の受信終了
信号が低レベルから高レベルへ立上る時点t4においてIN
TR信号がまだ高レベルであれば、高レベルになってCPU2
に受信異常を通知する。また、時点t4においてINTR信号
が低レベルであれば、異常信号ABINTは、ライン31のFCS
エラー信号に応答してFCSエラーがあった場合も出力さ
れ、更にライン72のオーバーラン信号に応答して受信バ
ッファ70にオーバーランがあった場合にも同様に出力さ
れる。なお、第2B図において、受信終了通知信号INTRの
第1の電圧レベル(低レベル)から第2の電圧レベル
(高レベル)への立上りがt2、t4時点において受信終了
信号ライン61のタイミング信号の立上りに一致するよう
に概略的に書かれているが、受信終了信号ライン61のタ
イミング信号に基づいて受信終了通知信号INTRを形成す
るので、受信終了通知信号INTRの立上りはライン61の受
信終了信号の立上り(前縁)よりは僅かに遅れる。
The reception end control circuit 50 to which the lines 12, 31, 51, 61 are connected creates a reception end notification signal INTR and outputs it to the line 1e, and also creates an abnormal signal ABINT and outputs it to the line 1f. The DMA stop signal END is created and output to the line 1d. The reception end notification signal INTR is a signal which becomes high level “H” at the rising edge of the reception end signal on the line 61,
Notify CPU2 of the reception end. The reception end notification signal INTR is low level “L” in response to the line 12 ready-to-receive command signal.
become. The DMA stop signal END is output at the rising timing of the reception end signal of the line 61 when the reception end notification signal INTR is at the low level "L", and stops the DMA control unit. The abnormal signal ABINT changes to IN at the time t4 when the reception end signal on the line 61 rises from the low level to the high level.
If the TR signal is still high, it goes high and CPU2
Notify the reception abnormality. If the INTR signal is low level at time t4, the abnormal signal ABINT is
It is also output when there is an FCS error in response to the error signal, and also when there is overrun in the reception buffer 70 in response to the overrun signal on line 72. In FIG. 2B, the rise of the reception end notification signal INTR from the first voltage level (low level) to the second voltage level (high level) of the timing signal of the reception end signal line 61 at the time points t2 and t4. Although the outline is written so as to coincide with the rising edge, the reception end notification signal INTR is formed based on the timing signal on the reception end signal line 61. Slightly behind the rising edge (leading edge) of.

また、受信終了制御回路50は、受信バッファクリア信
号を作成してライン51に出力し、受信バッファ70に与え
る。このライン51の受信バッファクリア信号は、ライン
61の受信終了信号が低レベルから高レベルに立上る時点
でINTR信号が高レベルであると共に、FCSエラー信号が
エラーを示す高レベル時又はライン72のオーバーランを
示す高レベルの時に出力される。
Further, the reception end control circuit 50 creates a reception buffer clear signal, outputs it to the line 51, and gives it to the reception buffer 70. The receive buffer clear signal on this line 51 is
When the reception end signal of 61 rises from a low level to a high level, the INTR signal is at a high level, and the FCS error signal is output at a high level indicating an error or at a high level indicating an overrun of the line 72. .

受信バッファ状態表示信号ライン71とINTR信号ライン
1eとが接続されているアンドゲート80はINTR信号が高レ
ベル“H"の時、ライン71の受信バッファ状態表示信号を
阻止し、CPU2から受信準備完了信号が入力されるまで受
信要求信号DRQをライン1cに出力しないようにするため
のものである。
Receive buffer status display signal line 71 and INTR signal line
When the INTR signal is at the high level "H", the AND gate 80 connected to 1e blocks the receive buffer status display signal on line 71 and outputs the receive request signal DRQ until the receive ready signal is input from CPU2. This is to prevent the output on line 1c.

次に、第2A図の各ブロックを更に詳しく説明する。 Next, each block in FIG. 2A will be described in more detail.

(CPUバス制御回路) CPUバス制御回路10は、第3図に示すように、デコー
ダ100と、アンドゲート101と8ビット3ステートバッフ
ァ102とアンドゲート103とから成る。ライン12の受信準
備完了命令信号はアドレスバスABをデコーダ100でデコ
ードした信号とライン3bのライト制御信号WRをアンドゲ
ート103で論理積した信号である。ライン11の受信バッ
ファ読出し信号はライン3aのリード制御信号RDとライン
2aのホールド確認信号HAKをアンドゲート101で論理積し
た信号である。データバスDBの信号はライン11の受信デ
ータ読出し信号のタイミングでライン15の受信データを
8ビット3ステートバッファ120から出力した信号であ
る。
(CPU Bus Control Circuit) As shown in FIG. 3, the CPU bus control circuit 10 includes a decoder 100, an AND gate 101, an 8-bit 3-state buffer 102, and an AND gate 103. The reception ready instruction signal on line 12 is a signal obtained by ANDing the signal obtained by decoding the address bus AB by the decoder 100 and the write control signal WR on line 3b by the AND gate 103. The receive buffer read signal on line 11 is the read control signal RD on line 3a and the line
It is a signal obtained by ANDing the hold confirmation signal HAK of 2a by the AND gate 101. The signal on the data bus DB is a signal obtained by outputting the received data on line 15 from the 8-bit 3-state buffer 120 at the timing of the received data read signal on line 11.

(S/Pレジスタ回路) 8ビットS/Pレジスタ回路20は、8ビットS/Pレジスタ
120の他にDフリップフロップ121とNOT回路122とを内蔵
している。レジスタ120はライン1aの受信データRXDを受
信クロックRXCLKでサンプリングして蓄え、パラレルに
変換してバス21に出力する。レジスタ120の出力端子Q7
をフリップフロップ121に入力させることにより、ライ
ン22に8ビット遅れの受信データが得られる。
(S / P register circuit) The 8-bit S / P register circuit 20 is an 8-bit S / P register.
In addition to 120, a D flip-flop 121 and a NOT circuit 122 are built in. The register 120 samples and stores the reception data RXD of the line 1a by the reception clock RXCLK, converts it into parallel, and outputs it to the bus 21. Output terminal Q7 of register 120
Is input to the flip-flop 121, the received data with an 8-bit delay can be obtained on the line 22.

(FCS演算回路) FCS演算回路30は、第5図に示すように、16ビット線
形帰還シフトレジスタ130と比較器131と比較パターン発
生器132とNOT回路134とから成る。このFCS演算回路30で
は、ライン22の8ビット遅延受信データをRXCLKの立ち
下がりサンプリングし、16次の生成多項式を実現するた
めの16ビット線形帰還シフトレジスタ130に蓄える。こ
のレジスタ130のライン133の出力信号と比較パターン発
生器132から得られる受信エラーのない場合の比較パタ
ーンとを比較器131で1ビットごとに比較し、比較結果
が誤っていた場合、ライン31のFCSエラー信号を高レベ
ル“H"にする。
(FCS Arithmetic Circuit) As shown in FIG. 5, the FCS arithmetic circuit 30 comprises a 16-bit linear feedback shift register 130, a comparator 131, a comparison pattern generator 132 and a NOT circuit 134. In this FCS operation circuit 30, 8-bit delayed reception data of line 22 is sampled at the falling edge of RXCLK and stored in a 16-bit linear feedback shift register 130 for realizing a 16th-order generator polynomial. The comparator 131 compares the output signal of the line 133 of the register 130 with the comparison pattern obtained from the comparison pattern generator 132 when there is no reception error, and if the comparison result is erroneous, the line 31 Set the FCS error signal to high level “H”.

(フラグ検出回路) フラグ検出回路40は第6図に示すように比較器140と
比較パターン発生器141とから成る。このフラグ検出回
路40では、パラレル出力されたライン21の受信データと
比較パターン発生器141から発生する比較パターン(本
実施例では“01111110")を比較器140で1ビットごとに
比較し、結果が一致した場合、ライン41のフラグ検出信
号を高レベル“H"にする。
(Flag Detection Circuit) The flag detection circuit 40 comprises a comparator 140 and a comparison pattern generator 141 as shown in FIG. In the flag detection circuit 40, the comparator 140 compares the received data of the parallel output line 21 and the comparison pattern (“01111110” in this embodiment) generated from the comparison pattern generator 141 bit by bit, and the result is When they match, the flag detection signal on the line 41 is set to the high level “H”.

(受信バッファ) 受信バッファ70は、第7図に示すようにFIFOメモリ15
0とDフリップフロップ151とから成る。FIFOメモリ150
はRCA製CD40105等のICで構成される。ライン21からパラ
レルに入力された受信データをライン62の受信データ書
込み信号のタイミングで書き込む。FIFOメモリ150にデ
ータが蓄えられている場合、ライン71の受信バッファ状
態表示信号が高レベル“H"になる。ライン11の受信バッ
ファ読出し信号のタイミングで受信データをバス15に出
力する。ライン152の信号はバッファが満杯になると出
力される信号である。フリップフロップ151は、受信バ
ッファにオーバーランが発生したことを記憶するための
もので、ライン152の信号が満杯を示しているときにラ
イン62に受信バッファ書込み信号が入力した場合、ライ
ン72にオーバーラン信号が出力される。ライン51に受信
バッファクリア信号が入力されるとFIFOメモリ150はク
リアされ、受信バッファ70は空の状態になり、オーバー
ラン信号もクリアされる。
(Reception Buffer) The reception buffer 70 is, as shown in FIG.
It consists of 0 and a D flip-flop 151. FIFO memory 150
Is composed of ICs such as RCA CD40105. The received data input in parallel from the line 21 is written at the timing of the received data write signal on the line 62. When data is stored in the FIFO memory 150, the receive buffer status display signal on the line 71 becomes high level “H”. The reception data is output to the bus 15 at the timing of the reception buffer read signal on the line 11. The signal on line 152 is the signal output when the buffer is full. The flip-flop 151 is for storing that an overrun has occurred in the reception buffer, and when the reception buffer write signal is input to the line 62 when the signal on the line 152 is full, the flip-flop 151 is overwritten on the line 72. A run signal is output. When the receive buffer clear signal is input to the line 51, the FIFO memory 150 is cleared, the receive buffer 70 becomes empty, and the overrun signal is also cleared.

(受信タイミング回路) 受信タイミング回路60は、第8A図に示すようにカウン
タ160とフリップフロップ161とデコーダ162とDフリッ
プフロップ163と2つのアンドゲート164、165と、NOT回
路171とから成り、第8B図に示すように動作する。即
ち、8進カウンタ160はRXCLKの立ち上がりでカウント
し、ライン41のフラグ検出信号でカウンタ160に0をロ
ードする。カウンタ160の出力ライン166の信号をデコー
ダ162でデコードし、この出力ライン167にカウント値が
7のときに出力する信号を得る。このライン167の信号
をフリップフロップ163でタイミングを取り直し、出力
ライン168に送り出す。もう1つのフリップフロップ161
の出力ライン169の信号はHDLC受信部1がデータを受信
している状態またはフラグを受信している状態を示す信
号である。このライン169の信号が高レベル“H"の場合
は、データを受信している状態であり、低レベル“L"の
場合は、フラグを検出している状態すなわちデータの受
信を休止している状態である。ライン62の受信バッファ
書込み信号ライン169の信号が高レベル“H"の時のみラ
イン168の信号をアンドゲート164を介して出力すること
によって得られる。ライン61の受信終了信号はライン17
0に得られる信号が高レベル“H"の時のみライン168の信
号をアンドゲート165を介して出力することによって得
られる。
(Reception Timing Circuit) The reception timing circuit 60 includes a counter 160, a flip-flop 161, a decoder 162, a D flip-flop 163, two AND gates 164 and 165, and a NOT circuit 171, as shown in FIG. 8A. It operates as shown in Figure 8B. That is, the octal counter 160 counts at the rising edge of RXCLK and loads 0 into the counter 160 by the flag detection signal on the line 41. The signal on the output line 166 of the counter 160 is decoded by the decoder 162, and the signal to be output when the count value is 7 is obtained on this output line 167. The signal on the line 167 is re-timed by the flip-flop 163 and sent to the output line 168. Another flip-flop 161
The signal on the output line 169 is a signal indicating the state in which the HDLC receiver 1 is receiving data or the flag. When the signal on this line 169 is at the high level "H", it is in the state of receiving data, and when it is at the low level "L", it is in the state of detecting the flag, that is, the reception of data is suspended. It is in a state. Receive buffer write signal on line 62 It is obtained by outputting the signal on line 168 through AND gate 164 only when the signal on line 169 is high level "H". The reception end signal on line 61 is line 17
It is obtained by outputting the signal on the line 168 through the AND gate 165 only when the signal obtained at 0 is at the high level "H".

(受信終了制御回路) 受信終了制御回路50は第9図に示すように、5個のD
フリップフロップ180、181、182、183、187と、8個の
アンドゲート184、185、189、190、193、194、192、196
と、3個のオアゲート186、191、195と、1個のNOT回路
188とから成る。この受信終了制御回路50では、ライン6
1の受信終了信号をフリップフロップ180でラッチしてIN
TR信号とする。この信号はライン12の受信準備完了命令
信号によりクリアされる。フリップフロップ181はFCSエ
ラーがあるか否かを示すもので、ライン31のFCSエラー
信号をライン61の受信終了信号のタイミングでラッチす
る。フリップフロップ183の出力は受信バッファのオー
バーランの状態を示している信号であり、ライン61の受
信終了信号でオーバーランの発生をラッチする。フリッ
プフロップ182はライン72のオーバーラン信号を一時的
にラッチするためのものである。ライン72のオーバーラ
ン信号は受信バッファにデータを書き込んだときに出力
され、受信バッフアの読出しで解除される信号であり、
受信終了時までオーバーランの状態が保持されない場合
がある。そこで、オーバーランの状態を受信終了までフ
リップフロップ182で保持している。
(Reception End Control Circuit) As shown in FIG. 9, the reception end control circuit 50 includes five D
Flip-flops 180, 181, 182, 183, 187 and eight AND gates 184, 185, 189, 190, 193, 194, 192, 196
And three OR gates 186, 191, and 195 and one NOT circuit
It consists of 188 and. In this reception end control circuit 50, line 6
The reception end signal of 1 is latched by the flip-flop 180 and IN
Use as TR signal. This signal is cleared by the receive ready command signal on line 12. The flip-flop 181 indicates whether or not there is an FCS error, and latches the FCS error signal on the line 31 at the timing of the reception end signal on the line 61. The output of the flip-flop 183 is a signal indicating the state of overrun of the reception buffer, and the occurrence of overrun is latched by the reception end signal on the line 61. Flip-flop 182 is for temporarily latching the overrun signal on line 72. The overrun signal on line 72 is a signal that is output when data is written to the receive buffer and is canceled by reading the receive buffer.
The overrun state may not be retained until the end of reception. Therefore, the flip-flop 182 holds the overrun state until the end of reception.

ライン1fの受信異常信号ABINTは、ライン61の受信終
了信号の低レベルから高レベルへの立上り時点において
次の(a)(b)(c)の内の少なくとも1つの条件が
満足したら異常を知らせる高レベル“H"となる。
The abnormal reception signal ABINT on the line 1f informs the abnormal condition if at least one of the following conditions (a), (b) and (c) is satisfied at the time of rising of the reception end signal on the line 61 from the low level to the high level. High level “H”.

(a) INTRが“H"である。(A) INTR is "H".

(b) INTRが“L"であり且つFCSエラー(ライン197が
“H")がある。
(B) INTR is "L" and there is an FCS error (line 197 is "H").

(c) INTRが“L"であり且つオーバーラン(ライン19
8が“H")がある。
(C) INTR is “L” and overrun (line 19
8 is “H”).

これらの論理はアンドゲート184、185とオアゲート18
6とフリップフロップ187で実現される。
These logics are AND gates 184, 185 and OR gate 18
It is realized by 6 and flip-flop 187.

ライン1dのDMA転送停止信号ENDは、ライン61の受信終
了信号が低レベルから高レベルに立上る時点で、次の
(a)(b)(c)の内の少なくとも1つの条件が満足
したらDMA転送停止を示す高レベル“H"になる。
The DMA transfer stop signal END on the line 1d is DMA when the reception end signal on the line 61 rises from a low level to a high level and at least one of the following conditions (a), (b) and (c) is satisfied. It goes to high level "H", which indicates the transfer is stopped.

(a) INTRが“L"である。(A) INTR is “L”.

(b) INTRが“H"であり且つFCSエラー(ライン199が
“H")がない。
(B) INTR is "H" and there is no FCS error (line 199 is "H").

(c) INTRが“H"であり且つオーバーラン(ライン20
0が“H")がない。
(C) INTR is "H" and overrun (line 20
0 is not "H").

これらの論理は、アンドゲート189、190、192とオア
ゲート191とNOT回路188で実現される。
These logics are realized by the AND gates 189, 190, 192, the OR gate 191, and the NOT circuit 188.

ライン51の受信バッファクリア信号は、ライン61の受
信終了信号が低レベルから高レベルに立上る時点で次の
(a)(b)の内の少なくとも1つの条件が満足した時
にクリアを示す高レベル“H"になる。
The reception buffer clear signal on line 51 is a high level indicating clear when at least one of the following conditions (a) and (b) is satisfied at the time when the reception end signal on line 61 rises from low level to high level. It becomes “H”.

(a) INTRが“H"であり且つFCSエラー(ライン197が
“H")がある。
(A) INTR is "H" and there is an FCS error (line 197 is "H").

(b) INTRが“H"であり、且つオーバーラン(ライン
200が“H")がある。
(B) INTR is “H” and overrun (line
200 is "H").

これらの論理はアンドゲート193、194、196及びオア
ゲート195で実現される。
These logics are implemented in AND gates 193, 194, 196 and OR gate 195.

なお、INTR信号が低レベル及び高レベルであるに拘ら
ず、FCSエラーが発生した場合は、受信フレームは無効
フレームである。また、オーバーランが発生した場合は
受信異常である。また、ライン61の受信終了信号が低レ
ベルから高レベルに転換する時点において、INTR信号が
まだ高レベルであるということは、例えば第2B図のt4時
点になってもt3時点で発生すべきであったライン12の受
信準備完了命令信号がまだ発生していないことを意味す
る。これは、CPU2の異常とみなすことができる。従っ
て、この実施例ではHDLC受信部1の受信終了制御回路50
からCPU2にABINT信号(異常信号)を送る。CPU2はABINT
信号を受信したら、例えばデータ送信側にデータの再送
を要求する。
If the FCS error occurs regardless of whether the INTR signal is low level or high level, the received frame is an invalid frame. If an overrun occurs, it means that the reception is abnormal. Further, that the INTR signal is still at the high level at the time when the reception end signal on the line 61 changes from the low level to the high level should be generated at the time t3 even at the time t4 in FIG. 2B, for example. This means that the line 12 ready-to-receive command signal has not been generated yet. This can be regarded as an abnormality of CPU2. Therefore, in this embodiment, the reception end control circuit 50 of the HDLC receiver 1 is
Sends an ABINT signal (abnormal signal) to CPU2. CPU2 is ABINT
When the signal is received, for example, the data transmitting side is requested to retransmit the data.

本実施例は次の効果を有する。 This embodiment has the following effects.

(1) ライン61に受信終了信号が発生した時点におい
て、INTR信号が高レベルであり、且つFCS演算回路30か
らFCSエラーを示す信号が発生している場合には、受信
終了制御回路50は受信バッファクリア信号を受信バッフ
ァ70に与え、これをクリアする。また、ライン61に受信
終了信号が発生した時点において、INTR信号が高レベル
であり、且つライン72に受信バッファ70のオーバーフロ
ーを示すオーバーラン信号が発生すると、受信終了制御
回路50は受信バッファクリア信号を発生する。この結
果、CPU2は無駄な処理を実行しない。従って、CPU2の有
効利用が可能になる。換言すれば、低速なCPUで高速な
データを処理することが可能になる。
(1) If the INTR signal is at a high level and a signal indicating an FCS error is generated from the FCS calculation circuit 30 at the time when the reception end signal is generated on the line 61, the reception end control circuit 50 receives the signal. A buffer clear signal is given to the reception buffer 70 to clear it. When the INTR signal is at a high level at the time when the reception end signal is generated on the line 61 and the overrun signal indicating the overflow of the reception buffer 70 is generated on the line 72, the reception end control circuit 50 causes the reception buffer clear signal. To occur. As a result, the CPU 2 does not execute useless processing. Therefore, the CPU 2 can be effectively used. In other words, a low-speed CPU can process high-speed data.

(2) CPU2側で検出することが不可能又は困難でCPU2
側の異常をHDLC受信部1側で検出し、CPU2に通知するこ
とができる。即ち、ライン61の受信終了信号の立ち上が
りのタイミングでINTR信号が高レベルである場合にはCP
U2側が異常であると判断し、これをCPU2に通知する。こ
れにより、CPU2がデータ送信側にデータの再送等を要求
し、信頼性の高いデータ伝送を達成することができる。
(2) CPU2 cannot detect or is difficult to detect
It is possible to detect the abnormality on the HDLC receiving side 1 side and notify the CPU 2 of the abnormality. That is, if the INTR signal is high level at the rising timing of the reception end signal on line 61, the CP
U2 side judges that it is abnormal and notifies CPU2 of this. As a result, the CPU 2 requests the data transmitting side to retransmit the data, etc., and highly reliable data transmission can be achieved.

(3) ライン61の受信終了信号の立上り時において、
INTR信号が低レベルであると共に、FCSエラーが検出さ
れている場合又はオーバーランが検出されている場合に
はABINT信号がCPU2に送られる。これにより、CPU2は受
信異常に迅速に対処することが可能になる。
(3) At the rising edge of the reception end signal on line 61,
The ABINT signal is sent to the CPU 2 when the INTR signal is low and an FCS error is detected or an overrun is detected. As a result, the CPU 2 can quickly deal with the reception abnormality.

(4) 受信バッファ70が複数バイトを蓄積することが
できるように構成され、且つフラグ検出回路40でフラグ
検出したことに応答して第2B図のt2時点で受信タイミン
グ回路60が受信終了信号を送出し、この時点からt3時点
で受信準備完了命令信号が発生するまで受信終了通知信
号INTRが発生し、これがCPU2に与えられる。この受信終
了通知信号INTRが発生している期間にはDMA転送が禁止
され、CPU2が動作状態になる。DMA転送が禁止されてい
る受信終了通知信号INTRの発生期間t2〜t3においては受
信データRXDがHDLC受信部1に入力してもRAM4にDMA転送
することができない。しかし、HDLC受信部1の受信バッ
ファ70は複数バイトを蓄積することができるので、t2〜
t3期間の受信データRXDを蓄えておき、t3以後においてR
AM4にDMA転送する。この結果、第1フレーム及び第2フ
レームを連続して受信する場合であってもCPU2に高速処
理を要求しない。従って、高速な受信データを受け取る
システムにおいて低速なCPUを使用することが可能にな
る。
(4) The reception buffer 70 is configured to be capable of accumulating a plurality of bytes, and in response to the detection of the flag by the flag detection circuit 40, the reception timing circuit 60 outputs a reception end signal at time t2 in FIG. 2B. The signal is sent out and the reception end notification signal INTR is generated from this time point until the reception ready command signal is generated at the time point t3, and this is given to the CPU2. During the period when the reception end notification signal INTR is generated, DMA transfer is prohibited and the CPU 2 is in operation. During the generation period t2 to t3 of the reception end notification signal INTR in which the DMA transfer is prohibited, even if the received data RXD is input to the HDLC receiver 1, it cannot be DMA-transferred to the RAM4. However, since the receive buffer 70 of the HDLC receiver 1 can store multiple bytes, t2 ~
Receive data RXD for t3 period is stored, and after t3, R
DMA transfer to AM4. As a result, the CPU 2 is not required to perform high-speed processing even when the first frame and the second frame are continuously received. Therefore, it becomes possible to use a low-speed CPU in a system that receives high-speed received data.

[変形例] 本発明は上述の実施例に限定されるものでなく、例え
ば次の変形が可能なものである。
[Modification] The present invention is not limited to the above-described embodiments, and the following modifications are possible, for example.

(1)本実施例では、FCSによる伝送エラー又は受信バ
ッファオーバーランが発生した時に無効フレームと判断
して受信終了制御回路50から受信異常信号(ABINT)又
は受信バッファクリア信号を発生させた。しかし、この
無効フレームの種類は一例にすぎず、例えば、フラグと
フラグで囲まれたデータ長が所定値以下であるか否かを
判定する回路を設け、所定値以下である時に無効フレー
ムを示す信号(受信バッファクリア信号又はABINT信
号)を発生させてもよい。また、データ長が8の整数倍
のビット数であるか否かを判定する回路を設け、8の整
数倍でない場合に無効フレームを示す信号(受信バッフ
ァクリア信号又はABINT信号)を発生させてもよい。
(1) In this embodiment, when a transmission error due to FCS or a reception buffer overrun occurs, it is determined that the frame is invalid and the reception end control circuit 50 generates a reception abnormal signal (ABINT) or a reception buffer clear signal. However, this type of invalid frame is only an example, and for example, a flag and a circuit for determining whether the data length surrounded by the flag is less than or equal to a predetermined value are provided, and an invalid frame is indicated when the data length is less than or equal to the predetermined value. A signal (reception buffer clear signal or ABINT signal) may be generated. Further, even if a circuit for determining whether the data length is an integer multiple of 8 bits is provided and a signal indicating an invalid frame (reception buffer clear signal or ABINT signal) is generated when the data length is not an integer multiple of 8, Good.

(2) フラグのパターンを例えば“01101000"にする
ことができる。
(2) The flag pattern can be set to “01101000”, for example.

(3) 伝送エラーの検出方法をパリティチェック、サ
ムチェック等にしてもよい。
(3) The transmission error detection method may be parity check, sum check, or the like.

(4) FCSのビット長を8ビットにしてもよい。(4) The bit length of FCS may be 8 bits.

(5) 本実施例では、受信データの転送をDMAで行っ
たが、CPU2の処理速度が間に合えば、DMAを用いずCPU2
が直接受信バッファからデータを取り出すことも可能で
ある。この場合、受信要求信号DRQはCPU2の割り込み端
子に接続される。
(5) In the present embodiment, the received data is transferred by the DMA, but if the processing speed of the CPU2 is in time, the CPU2 is not used.
Can also retrieve data directly from the receive buffer. In this case, the reception request signal DRQ is connected to the interrupt terminal of the CPU2.

【図面の簡単な説明】 第1A図は本発明の一実施例のデータ受信装置を原理的に
示すブロック図、 第1B図は第1A図の各部の状態を示す波形図、 第2A図は第1A図のHDLC受信部を示すブロック図、 第2B図は第2A図の各部の状態を示す波形図、 第3図は第2A図のCPUバス制御回路を示す回路図、 第4図は第2A図のS/Pレジスタ回路を示す回路図、 第5図は第2A図のFCS演算回路を示す回路図、 第6図は第2A図のフラグ検出回路を示す回路図、 第7図は第2A図の受信バッファを示す回路図、 第8A図は第2A図の受信タイミング回路を示す回路図、 第8B図は第8A図の各部の状態を示す波形図、 第9図は第2A図の受信終了制御回路を示す回路図、 第10図は受信データのフレーム構成を示す図である。 1……HDLC受信部、2……CPU、3……DMA制御部、4…
…RAM、30……FCS演算回路、40……フラグ検出回路、50
……受信終了制御回路、60……受信タイミング回路、70
……受信バッファ。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1A is a block diagram showing in principle the data receiving apparatus of one embodiment of the present invention, FIG. 1B is a waveform diagram showing the state of each part of FIG. 1A, and FIG. 1A is a block diagram showing the HDLC receiver, FIG. 2B is a waveform diagram showing the state of each part of FIG. 2A, FIG. 3 is a circuit diagram showing the CPU bus control circuit of FIG. 2A, and FIG. 4 is 2A. FIG. 5 is a circuit diagram showing the S / P register circuit of FIG. 5, FIG. 5 is a circuit diagram showing the FCS arithmetic circuit of FIG. 2A, FIG. 6 is a circuit diagram showing the flag detection circuit of FIG. 2A, and FIG. FIG. 8A is a circuit diagram showing the receive buffer in FIG. 8, FIG. 8A is a circuit diagram showing the receive timing circuit in FIG. 2A, FIG. 8B is a waveform diagram showing the state of each part in FIG. 8A, and FIG. 9 is reception in FIG. 2A. FIG. 10 is a circuit diagram showing a termination control circuit, and FIG. 10 is a diagram showing a frame structure of received data. 1 ... HDLC receiver, 2 ... CPU, 3 ... DMA controller, 4 ...
… RAM, 30 …… FCS operation circuit, 40 …… Flag detection circuit, 50
...... Reception end control circuit, 60 …… Reception timing circuit, 70
…… Receive buffer.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭55−55643(JP,A) 特開 昭62−220048(JP,A) 特開 昭61−234149(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (56) Reference JP-A-55-55643 (JP, A) JP-A-62-220048 (JP, A) JP-A-61-234149 (JP, A)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】データ伝送ライン(1a)に接続された受信
部(1)と、前記受信部(1)で受信したデータを格納
するために前記受信部(1)に接続されたランダム・ア
クセス・メモリ(4)と、前記受信部(1)から前記ラ
ンダム・アクセス・メモリ(4)に対するデータ転送を
制御する制御部(3)と、装置全体を制御すると共に受
信異常に対処する機能を有しているCPU(2)とを備
え、 前記受信部(1)が前記データ伝送ライン(1a)から受
信すべき受信データ(RXD)は複数フレームが直列に配
置されたものであり、 前記複数フレームの内の少なくとも最初のフレームは、
少なくとも、フレームの開始を示す開始フラグと1バイ
ト以上のデータとフレームの終結を示す終結フラグとを
含み、 前記最初のフレームよりは後のフレームは、少なくと
も、1バイト以上のデータとフレームの終結を示す終結
フラグとを含み、 前記受信部(1)は受信バッフア(70)とフラグ検出手
段(40)とタイミング信号作成手段(60)と受信終了制
御手段(50)と受信準備完了命令信号作成手段(12、10
0、103)を有し、 前記受信バッフア(70)は前記データを一時的に蓄えて
前記ランダム・アクセス・メモリ(4)に転送するもの
であって、前記データ伝送ライン(1a)と前記ランダム
・アクセス・メモリ(4)との間に接続され且つ前記複
数バイトを一時的に格納することができる容量を有し、 前記フラグ検出手段(40)は前記受信データ(RXD)の
前記複数フレームの前記開始フラグ及び前記終結フラグ
を検出するものであり、 前記タイミング信号作成手段(60)は前記開始フラグ及
び前記終結フラグに基づいて前記受信バッフア(70)に
対する前記データの書き込みを示すタイミング信号を形
成し且つ前記終結フラグに基づいて1フレームのデータ
の受信の終了を示す受信終了タイミング信号を作成する
ものであり、 前記受信準備完了命令信号作成手段(12、100、103)は
前記ランダム・アクセス・メモリ(4)に対するデータ
の書き込み状態に基づいて次のフレームのデータを前記
ランダム・アクセス・メモリ(4)に書込む準備が完了
したことを示す受信準備完了命令信号を作成するもので
あり、 前記受信終了制御手段(50)は受信終了通知信号作成手
段(180)と受信異常判定手段(186、187)とを有し、 前記受信終了通入信号作成手段(180)は前記受信終了
タイミング信号と前記受信準備完了命令信号とに応答し
て受信終了通知信号(INTR)を作成し、この受信終了通
知信号(INTR)を前記CPU(2)に送るものであり、 前記受信終了通知信号(INTR)が前記受信終了タイミン
グ信号に同期して第1の電圧状態から前記データ転送を
禁止する第2の電圧状態に転換し、前記受信準備完了命
令信号に応答して前記第2の電圧状態から前記第1の電
圧状態に戻るように前記受信終了通知信号作成手段(18
0)が形成されており、 前記受信異常判定手段(186、187)は前記受信終了タイ
ミング信号と前記受信終了通知信号(INTR)とに応答し
て受信異常信号(ABINT)を作成し、この受信異常信号
(ABINT)を前記CPU(2)に送るものであり、 前記受信終了タイミング信号の前縁において前記受信終
了通知信号(INTR)が前記第2の電圧状態にある時に受
信異常を示す前記受信異常信号(ABINT)を発生するよ
うに前記受信異常判定手段(186、187)が形成されてい
ることを特徴とするデータ受信装置。
1. A receiver (1) connected to a data transmission line (1a) and a random access connected to the receiver (1) for storing data received by the receiver (1). A memory (4), a control unit (3) for controlling data transfer from the receiving unit (1) to the random access memory (4), and a function for controlling the entire device and coping with reception abnormality The receiving data (RXD) to be received by the receiving unit (1) from the data transmission line (1a) is obtained by arranging a plurality of frames in series. At least the first frame of
At least a start flag indicating the start of a frame, at least one byte of data, and an end flag indicating the end of the frame are included, and the frames after the first frame have at least one byte of data and the end of the frame. The reception unit (1) includes a reception buffer (70), a flag detection unit (40), a timing signal generation unit (60), a reception end control unit (50), and a reception preparation completion command signal generation unit. (12, 10
0, 103), the reception buffer (70) temporarily stores the data and transfers the data to the random access memory (4), and the data transfer line (1a) and the random access memory (4). A capacity connected to the access memory (4) and capable of temporarily storing the plurality of bytes, and the flag detecting means (40) stores the plurality of frames of the reception data (RXD). The timing signal creating means (60) detects the start flag and the end flag, and forms the timing signal indicating the writing of the data to the reception buffer (70) based on the start flag and the end flag. And creating a reception end timing signal indicating the end of reception of one frame of data based on the end flag. The number creating means (12, 100, 103) is ready to write the data of the next frame in the random access memory (4) based on the write state of the data in the random access memory (4). The reception end control means (50) has a reception end notification signal generation means (180) and a reception abnormality determination means (186, 187), An end communication signal creating means (180) creates a reception end notification signal (INTR) in response to the reception end timing signal and the reception preparation completion command signal, and outputs the reception end notification signal (INTR) to the CPU ( 2), wherein the reception end notification signal (INTR) is changed from the first voltage state to the second voltage state in which the data transfer is prohibited in synchronization with the reception end timing signal, and the reception preparation is performed. Complete Responsive to said second from said voltage state first the reception end acknowledgment signal producing means to return to the voltage state command signal (18
0) is formed, the reception abnormality determination means (186, 187) creates a reception abnormality signal (ABINT) in response to the reception end timing signal and the reception end notification signal (INTR), and receives the reception end signal (ABINT). An abnormal signal (ABINT) is sent to the CPU (2), and the reception indicating the reception abnormality is shown when the reception end notification signal (INTR) is in the second voltage state at the leading edge of the reception end timing signal. A data receiving apparatus, characterized in that the reception abnormality determining means (186, 187) is formed so as to generate an abnormality signal (ABINT).
JP63174288A 1988-07-13 1988-07-13 Data receiver Expired - Fee Related JP2511697B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63174288A JP2511697B2 (en) 1988-07-13 1988-07-13 Data receiver

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63174288A JP2511697B2 (en) 1988-07-13 1988-07-13 Data receiver

Publications (2)

Publication Number Publication Date
JPH0223750A JPH0223750A (en) 1990-01-25
JP2511697B2 true JP2511697B2 (en) 1996-07-03

Family

ID=15976057

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63174288A Expired - Fee Related JP2511697B2 (en) 1988-07-13 1988-07-13 Data receiver

Country Status (1)

Country Link
JP (1) JP2511697B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5555643A (en) * 1978-10-20 1980-04-23 Hitachi Ltd Memory unit for data reception
JPS61234149A (en) * 1985-04-09 1986-10-18 Nec Corp Receiving buffer device
JPS62220048A (en) * 1986-03-20 1987-09-28 Fujitsu Ltd Automatic reclaiming system for packet buffer

Also Published As

Publication number Publication date
JPH0223750A (en) 1990-01-25

Similar Documents

Publication Publication Date Title
AU593315B2 (en) Input/output control cicuitry for a data communications controller
US4949301A (en) Improved pointer FIFO controller for converting a standard RAM into a simulated dual FIFO by controlling the RAM's address inputs
US5133062A (en) RAM buffer controller for providing simulated first-in-first-out (FIFO) buffers in a random access memory
US5134702A (en) Serial-to-parallel and parallel-to-serial converter
US5151999A (en) Serial communications controller for transfer of successive data frames with storage of supplemental data and word counts
US6167032A (en) System and method for avoiding host transmit underruns in a communication network
KR19980042632A (en) Data transmission method, data transmission apparatus and medium
CA2289192C (en) Communication dma device
JP2511697B2 (en) Data receiver
JPS6359042A (en) Communication interface equipment
US6330629B1 (en) Information processing system
JP3667556B2 (en) DMA transfer control device and DMA transfer control method
EP0609082A1 (en) Information transfer in a data processing system
JPS6083451A (en) Synchronous data buffering system
JPS6379439A (en) Serial communication equipment
JP2702832B2 (en) Relief controller for low priority adapter
JP2000003332A (en) Bi-directional bus size conversion circuit
JPH01169654A (en) Asynchronous data transmission control system
JP3146864B2 (en) Unidirectional loop transmission circuit
JPS62225050A (en) Comunication control unit
JP2000293981A (en) Overflow protecting circuit and picture transmission equipment using the same circuit
JPH0991243A (en) Data transfer controller
JPH0432922A (en) Interface control circuit
JP2630077B2 (en) Clock synchronous serial interface
JP3098056B2 (en) Cell data transfer method by ATM multiplex transmission

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees