JP2823625B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JP2823625B2
JP2823625B2 JP2008041A JP804190A JP2823625B2 JP 2823625 B2 JP2823625 B2 JP 2823625B2 JP 2008041 A JP2008041 A JP 2008041A JP 804190 A JP804190 A JP 804190A JP 2823625 B2 JP2823625 B2 JP 2823625B2
Authority
JP
Japan
Prior art keywords
data
area
dma
control unit
transfer
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
JP2008041A
Other languages
Japanese (ja)
Other versions
JPH03211651A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2008041A priority Critical patent/JP2823625B2/en
Publication of JPH03211651A publication Critical patent/JPH03211651A/en
Application granted granted Critical
Publication of JP2823625B2 publication Critical patent/JP2823625B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術(第8図〜第10図) 発明が解決しようとする課題 課題を解決するための手段 原理説明図(第1図) 作用 実施例 実施例のブロック図(第2図) メモリの格納状態(第3図) 詳細実施例のブロック図(第4図) 状態遷移図(第5図 詳細実施例のタイミングチャート(第6図) 詳細実施例のメモリ格納状態(第7図) 発明の効果 〔概要〕 装置内部でダイレクトメモリアクセス転送処理を行う
データ処理装置に係り、特に不定長ブロックデータを処
理するデータ処理装置に関し、 不定長ブロックデータのダイレクトメモリアクセス転
送を行うデータ処理装置において、バッファ領域の利用
効率を高め、データ処理が簡単なデータ処理装置を提供
することを目的とし、 メモリと、データのダイレクトメモリアクセス転送を
行うダイレクトメモリアクセス制御部と、を備えたデー
タ処理装置において、前記メモリは複数の不定長ブロッ
クデータを格納するための連続する格納領域を有する格
納部と、前記格納部に格納された各不定長ブロックデー
タの占有領域を示す領域情報を記憶する領域情報格納部
と、を備え、前記ダイレクトメモリアクセス制御部は前
記不定長ブロックデータを前記格納部の連続的な領域に
転送する連続領域転送制御部を備えるように構成する。
Detailed Description of the Invention [Table of Contents] Overview Industrial application field Conventional technology (FIGS. 8 to 10) Problems to be solved by the invention Means for solving the problems Principle explanatory diagram (FIG. 1) Operation Example Block diagram of the embodiment (FIG. 2) Storage state of the memory (FIG. 3) Block diagram of the detailed embodiment (FIG. 4) State transition diagram (FIG. 5) Timing chart of the detailed embodiment (FIG. 6) The memory storage state of the detailed embodiment (FIG. 7) Effect of the Invention [Overview] The present invention relates to a data processing device that performs direct memory access transfer processing inside the device, and particularly to a data processing device that processes undefined length block data. In a data processing device for performing direct memory access transfer of block data, an object of the present invention is to provide a data processing device in which the use efficiency of a buffer area is increased and data processing is simple. And a direct memory access control unit for performing direct memory access transfer of data, in the data processing device, wherein the memory has a storage unit having a continuous storage area for storing a plurality of undefined length block data, An area information storage unit that stores area information indicating an occupied area of each undefined-length block data stored in a storage unit, wherein the direct memory access control unit stores the undefined-length block data in a continuous It is configured to include a continuous area transfer control unit for transferring to an area.

〔産業上の利用分野〕[Industrial applications]

本発明は、装置内部でダイレクトメモリアクセス(DM
A)転送処理を行うデータ処理装置に係り、特に不定長
ブロックデータを処理するデータ処理装置に関する。
The present invention provides direct memory access (DM
A) The present invention relates to a data processing device that performs a transfer process, and more particularly, to a data processing device that processes undefined-length block data.

不定長ブロックデータの処理を行うデータ処理装置に
おいて、処理すべきデータをDMA転送によりメモリ内に
一時的に格納する場合がある。この一時的に格納された
不定長ブロックデータ群は、後に各不定長ブロックデー
タ単位で処理を行う必要がある。したがって、各不定長
ブロックデータ単位で認識可能にメモリ内に格納しなけ
ればならない。
In a data processing device that processes indefinite-length block data, data to be processed may be temporarily stored in a memory by DMA transfer. The temporarily stored undefined-length block data group needs to be processed later for each undefined-length block data unit. Therefore, it must be stored in the memory so that it can be recognized in units of each undefined length block data.

〔従来例〕(Conventional example)

第8図に従来のデータ通信装置の概要ブロックを示
す。
FIG. 8 shows a schematic block diagram of a conventional data communication device.

データ通信装置50は、外部からシリアルに転送された
データを受信しシリアル/パラレル変換(以下、S/P変
換と呼ぶ。)を行う受信部9と、受信部9でパラレルデ
ータに変換された受信データをDMA転送するための制御
を行うDMA制御部51と、データ通信装置50全体の制御を
行うためのCPU10と、データを転送するためのデータバ
ス3と、アドレス情報を転送するためのアドレスバス4
と、データを格納するメモリ52と、を備えて構成されて
いる。
The data communication device 50 receives the data serially transferred from the outside and performs a serial / parallel conversion (hereinafter, referred to as S / P conversion). The reception unit 9 converts the data into parallel data. A DMA control unit 51 for controlling data to be transferred by DMA; a CPU 10 for controlling the entire data communication device 50; a data bus 3 for transferring data; and an address bus for transferring address information 4
And a memory 52 for storing data.

メモリ52には受信データを一時的に格納するための受
信バッファ部53と、受信バッファ部53内の格納状態を示
すためのディスクリプタ部54と、が設けられている。
The memory 52 includes a reception buffer unit 53 for temporarily storing reception data, and a descriptor unit 54 for indicating a storage state in the reception buffer unit 53.

受信バッファ部53は第9図に示すように一度に転送さ
れる不定長ブロックデータの最大長の領域を有する複数
の受信バッファBF1、BF2、…、BFnを備えて構成されて
いる。
As shown in FIG. 9, the reception buffer unit 53 includes a plurality of reception buffers BF 1 , BF 2 ,..., BF n each having an area of the maximum length of the undefined-length block data transferred at one time.

ディスクリプタ部54は、第9図に示すように受信バッ
ファを指定するポインタ部P1、P2、…、Pnおよび転送し
たデータのバイト数が記録されるサイズ部S1、S2、…、
Snを有する複数のディスクリプタDE1、DE2、…、DEn
設けられており、各ディスクリプタは各受信バッファに
一対一に対応している。
As shown in FIG. 9, the descriptor section 54 includes pointer sections P 1 , P 2 ,..., P n for specifying a reception buffer and size sections S 1 , S 2 ,.
A plurality of descriptors DE 1 , DE 2 ,..., DE n having S n are provided, and each descriptor corresponds to each reception buffer on a one-to-one basis.

ここで、データ処理装置において取り扱う不定長ブロ
ックデータのデータ形式についてHDLC(High lebel Dat
a Link Control procedure)のフレーム形式のデータを
例にあげて説明する。
Here, the data format of the undefined-length block data handled by the data processing device is HDLC (High lebel Dat
a Link Control procedure) frame format data will be described as an example.

HDLCにおける1フレームは、例えば、第10図に示すよ
うに、フレームの開始を示す1バイトの開始フラグと、
後述する制御情報を受信すべき1つもしくは複数の二次
局または1つの複合局の指定、または、実行した動作ま
たは状態を報告した二次局または複合局の表示に使用さ
れる1または2バイトのアドレス情報と、相手局に対す
る動作の指令または指令に対する応答に用いられる1ま
たは2バイトの制御情報と、最大長があらかじめ定めら
れた不定長の転送データと、ビット誤り検出用の2バイ
トのフレームチェックシーケンスと、データの終了を示
す1バイトの終了フラグと、を備えて構成されている。
このように転送データが最大長があらかじめ定められた
不定長のデータであるため、フレーム自体も不定長のブ
ロックデータとなる。
One frame in HDLC includes, for example, as shown in FIG. 10, a 1-byte start flag indicating the start of a frame,
One or two bytes used to designate one or more secondary stations or one composite station to receive the control information to be described later, or to indicate the secondary station or composite station reporting the executed operation or status. Address information, 1- or 2-byte control information used for an operation command to the partner station or a response to the command, transfer data of an undefined length having a predetermined maximum length, and a 2-byte frame for bit error detection It is provided with a check sequence and a 1-byte end flag indicating the end of data.
As described above, since the maximum length of the transfer data is data of an undefined length, the frame itself is also block data of an undefined length.

次に、動作について説明する。ここで、第1受信バッ
ファBF1および第2受信バッファBF2にはすでに受信デー
タD1、受信データD2がそれぞれ格納されているものとす
る。
Next, the operation will be described. Here, it is assumed that the reception data D 1 and the reception data D 2 are already stored in the first reception buffer BF 1 and the second reception buffer BF 2 , respectively.

受信部9は外部よりシリアルデータを受信するとパラ
レルデータに変換し、DMA制御部51に転送要求を行う。D
MA制御部51は要求を受け付けると、メモリ52のディスク
リプタ部54のいまだデータが格納されていない受信バッ
ファである図示しない第3受信バッファBF3に対応する
第3ディスクリプタDE3のポインタ部P3に格納されたア
ドレスをアドレスバス4を介して読み込み、ポインタ部
P3が示すアドレスに存在する第3受信バッファBF3にデ
ータバス3を介して受信データを転送する。転送が終了
すると第3ディスクリプタDE3のサイズ部S3に転送した
受信データのバイト数を書き込む。以下、不定長データ
を受信するごとに同様の動作を行う。
When receiving serial data from the outside, the receiving unit 9 converts the serial data into parallel data and issues a transfer request to the DMA control unit 51. D
When the MA control unit 51 receives the request, the MA control unit 51 returns to the pointer unit P 3 of the third descriptor DE 3 corresponding to the third reception buffer BF 3 ( not shown), which is a reception buffer in which data has not yet been stored in the descriptor unit 54 of the memory 52. The stored address is read via the address bus 4 and the pointer section is read.
Transfers the received data via the data bus 3 to the third reception buffer BF 3 present in the address indicated by P 3. Transfer writes the number of bytes of the received data transferred to the size portion S 3 of the third descriptor DE 3 Upon completion. Hereinafter, the same operation is performed every time the variable-length data is received.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

上記従来のデータ処理装置においては、各受信バッフ
ァのうちデータが書き込まれていない未使用の空領域は
他に用いられることはない。したがって、各受信バッフ
ァ領域の空領域の総計が不定長ブロックデータの最大デ
ータ長より大きい場合でも、これらの領域を利用するこ
とが出来ず、無駄な領域となり、不必要に受信バッファ
領域を確保しなければならないという問題点があった。
また、各不定長ブロックデータが不連続な領域に格納さ
れているため、複数の不定長ブロックデータに対し、同
様な処理を行う場合などには制御部のアクセスが複雑に
なってしまうという問題点があった。
In the conventional data processing device, an unused empty area in which data is not written in each reception buffer is not used. Therefore, even if the total empty area of each reception buffer area is larger than the maximum data length of the undefined-length block data, these areas cannot be used, resulting in useless areas, and unnecessarily securing the reception buffer area. There was a problem that had to be.
In addition, since each variable-length block data is stored in a discontinuous area, access to the control unit becomes complicated when a similar process is performed on a plurality of variable-length block data. was there.

そこで本発明は、不定長ブロックデータのDMA転送を
行うデータ処理装置において、バッファ領域の利用効率
を高め、データ処理が簡単なデータ処理装置を提供する
ことを目的とする。
Accordingly, an object of the present invention is to provide a data processing device that performs DMA transfer of block data of indefinite length, which increases the efficiency of use of a buffer area and provides a simple data processing device.

〔課題を解決するための手段〕[Means for solving the problem]

本発明の原理構成図を第1図に示す。 FIG. 1 shows a principle configuration diagram of the present invention.

データ処理装置1はデータのDMA転送を行うDMA制御部
2と、データの受け渡しを行うデータバス3と、アドレ
スの受け渡しを行うアドレスバス4とデータを格納する
メモリ5とを備えて構成されている。
The data processing device 1 includes a DMA control unit 2 for performing DMA transfer of data, a data bus 3 for transferring data, an address bus 4 for transferring addresses, and a memory 5 for storing data. .

DMA制御部2は、不定長ブロックデータをメモリの格
納部の連続する領域に順次転送する連続領域転送制御部
6を備えて構成されている。
The DMA control unit 2 includes a continuous area transfer control unit 6 for sequentially transferring the indefinite length block data to a continuous area of the storage unit of the memory.

メモリ5は複数の不定長ブロックデータを格納する連
続する記憶領域を有する格納部7と、格納部に格納され
た不定長ブロックデータの占有領域を示す領域情報を格
納する領域情報格納部8を備えて構成されている。
The memory 5 includes a storage unit 7 having a continuous storage area for storing a plurality of undefined-length block data, and an area information storage unit 8 for storing area information indicating an occupied area of the undefined-length block data stored in the storage unit. It is configured.

〔作用〕[Action]

DMA制御部2は、外部よりのデータの転送要求を受け
付けると、連続領域転送制御部にデータの転送を指示す
る。連続領域転送制御部6はメモリの領域情報格納部8
から領域情報Inを読出し、それに基づいて格納部の第n
領域Anに格納する。当該データの格納が終了すると、連
続領域転送制御部は第n領域Anに連続する第(n+1)
領域An+1を意味する格納情報In+1を領域情報格納部8に
格納する。再び外部よりのデータの転送要求がDMA制御
部2に出されると、連続領域転送制御部6は領域情報格
納部8の第(n+1)領域を意味する領域情報In+1を読
出し、当該データを第(n+1)領域Anに格納する。
When receiving a data transfer request from the outside, the DMA control unit 2 instructs the continuous area transfer control unit to transfer data. The continuous area transfer control unit 6 is a memory area information storage unit 8
Reads the area information I n from the n-th storage portion on the basis thereof
Stored in the area A n. When the storage of the data is completed, the continuous area transfer controller first continuous to the n region A n (n + 1)
Stores storage information I n + 1, which means an area A n + 1 in the area information storing section 8. When an external data transfer request is issued to the DMA control unit 2 again, the continuous area transfer control unit 6 reads out the area information In + 1 , which means the (n + 1) th area, of the area information storage unit 8, and Is stored in the (n + 1) th area An.

したがって、複数のデータはメモリ5の格納部7に連
続して格納されることとなる。
Therefore, a plurality of data are successively stored in the storage unit 7 of the memory 5.

〔実施例〕〔Example〕

第2図乃至第7図を参照して本発明の実施例を説明す
る。
An embodiment of the present invention will be described with reference to FIGS.

第2図に本発明の実施例のブロック図を示す。第8図
の従来例と同一の部分には同一の符号を付し詳細な説明
は省略する。
FIG. 2 shows a block diagram of an embodiment of the present invention. The same parts as those in the conventional example shown in FIG. 8 are denoted by the same reference numerals, and detailed description is omitted.

第8図の従来例と異なる点はメモリ11に受信データを
連続した領域に格納する共通受信バッファ12および格納
した受信データの格納情報を記録するフレーム情報テー
ブル13を設けた点と、DMA制御部3内にデータを連続し
た領域に格納する連続領域転送制御部6を備えた点であ
る。
8 is different from the conventional example of FIG. 8 in that a common reception buffer 12 for storing received data in a continuous area in the memory 11 and a frame information table 13 for recording storage information of the stored received data are provided. 3 is provided with a continuous area transfer control unit 6 for storing data in a continuous area.

第3図に共通受信バッファ12およびフレーム情報テー
ブル13の概要構成を示す。
FIG. 3 shows a schematic configuration of the common reception buffer 12 and the frame information table 13.

フレーム情報テーブル13は、各受信データを格納した
先頭アドレスを格納する複数の先頭アドレス部H1、H2
…と、データの有無を示すためのステータス部C1、C2
…とを備えて構成されており、先頭アドレス部およびス
テータス部は1つづつ対となってディスクリプタDE1、D
E2、…を構成している。
The frame information table 13 includes a plurality of head address parts H 1 , H 2 ,
… And status parts C 1 , C 2 ,
.., And the start address part and the status part are paired one by one , and the descriptors DE 1 , D
E 2 ,...

次に、動作について説明する。なお、初期状態におい
ては共通受信バッファ12にはデータは格納されていない
ものとする。
Next, the operation will be described. It is assumed that no data is stored in the common reception buffer 12 in the initial state.

受信部9が受信データを受信するとDMA制御部2にデ
ータの転送を要求する。DMA制御部3の連続領域転送制
御部6は第1ディスクリプタDE1の先頭アドレス部H1
読み込み、この先頭アドレス部H1によって指示されたア
ドレスを先頭アドレスとして、アドレスを増加させなが
ら受信データを1バイトづつ転送する。
When receiving section 9 receives the received data, it requests DMA control section 2 to transfer the data. Continuous area transfer controller 6 of the DMA controller 3 reads the top address unit H 1 of the first descriptor DE 1, the address indicated by the top address unit H 1 as the start address, the received data while increasing the address Transfer one byte at a time.

受信データD1を転送し終わると連続領域転送制御部6
は第1ディスクリプタDE1のステータス部C1に有効デー
タ有りの状態情報を書き込み、さらに、先頭アドレス部
H1に受信したデータの転送先アドレスを書き込む。その
後、DMA制御部2は転送要求待ち状態になる。以後は、
データ転送要求ごとに同様の動作を行う。
Continuous and the received data D 1 finishes transfer area transfer control section 6
It writes the status information of the presence of valid data in the status section C 1 of the first descriptor DE 1, further top address unit
Writes the destination address of the data received in the H 1. Thereafter, the DMA control unit 2 enters a transfer request waiting state. After that,
The same operation is performed for each data transfer request.

第4図乃至第7図を参照して本発明のより詳細な実施
例を説明する。
A more detailed embodiment of the present invention will be described with reference to FIGS.

第2図の実施例と同一の部分には同一の符号を付し詳
細な説明は省略する。
The same parts as those in the embodiment of FIG. 2 are denoted by the same reference numerals, and detailed description is omitted.

データ通信装置100は、外部よりフレーム形式で送信
されてくるシリアルデータをS/P変換する受信部9と、
受信部9でS/P変換されたパラレルデータをメモリへDMA
転送するDMA制御部2と、受信データの処理および装置
全体の制御を行うCPU10と、データを記憶するメモリ11
と、データをデータ通信装置内で受け渡しするデータバ
ス3と、アドレスを受け渡しするアドレスバス4と、を
備えて構成されている。なお、以下においては、8ビッ
トのデータバスおよび24ビットのアドレスバスを備えて
いるものとして説明する。
The data communication device 100 includes a receiving unit 9 that performs S / P conversion of serial data transmitted in a frame format from the outside,
DMA of parallel data converted by S / P in receiving unit 9 to memory
DMA controller 2 for transferring data, CPU 10 for processing received data and controlling the entire device, and memory 11 for storing data
And a data bus 3 for transferring data within the data communication device, and an address bus 4 for transferring addresses. In the following, the description will be made assuming that an 8-bit data bus and a 24-bit address bus are provided.

メモリ11は、受信したフレームデータを書き込む連続
した領域を有する共通受信バッファ12と、各フレームデ
ータの格納領域の境界を示す境界情報を書き込むフレー
ム情報テーブル13と、を備えて構成されている。
The memory 11 includes a common reception buffer 12 having a continuous area for writing received frame data, and a frame information table 13 for writing boundary information indicating a boundary between storage areas of each frame data.

受信部9は3つのシフトレジスタ14、15、16と、フラ
グ検出および零削除制御を行う検出制御部17と、受信デ
ータに付加されてくるCRC(Cyclic Redundancy Check)
コードのエラーチェックを行うCRCチェッカ18と、受信
データのオーバーフローを防ぐためのバッファとして用
いる受信FIFO(First In First Out)19と、を備えて構
成されている。
The receiving unit 9 includes three shift registers 14, 15, and 16, a detection control unit 17 that performs flag detection and zero deletion control, and a CRC (Cyclic Redundancy Check) added to the received data.
It comprises a CRC checker 18 for checking a code error and a reception FIFO (First In First Out) 19 used as a buffer for preventing overflow of received data.

シフトレジスタ14と検出制御部17は協働して、受信デ
ータの開始フラグおよび終了フラグの検出ならびに自動
挿入されている零削除の制御を行う。
The shift register 14 and the detection control unit 17 cooperate to detect the start flag and the end flag of the received data and to control the automatic insertion of zeros.

シフトレジスタ15およびシフトレジスタ16は、CRCコ
ードが後述する受信FIFOに取り込まれないようにする。
The shift register 15 and the shift register 16 prevent the CRC code from being taken into a reception FIFO described later.

受信部制御回路20は受信部9の状態をDMA制御部2へ
知らせる状態通知信号EOFおよびDMA転送要求信号DRQを
発生する信号発生回路(図示せず)を備えて構成されて
いる。
The receiving unit control circuit 20 includes a signal generating circuit (not shown) for generating a state notification signal EOF for notifying the state of the receiving unit 9 to the DMA control unit 2 and a DMA transfer request signal DRQ.

DMA制御部2は受信部9からの状態通知信号EOFおよび
DMA転送要求信号DRQによって状態遷移しDMA転送動作を
実行するDMA制御部制御回路21と、各種データを記憶す
るDMAレジスタ部22と、を備えて構成されている。
The DMA control unit 2 receives the status notification signal EOF from the receiving unit 9 and
It is configured to include a DMA control unit control circuit 21 that executes a DMA transfer operation by making a state transition by a DMA transfer request signal DRQ, and a DMA register unit 22 that stores various data.

DMAレジスタ部22は、フレーム情報テーブル13の情報
書き込み番地を記憶する各8ビットの3つのレジスタDP
R(L)、DPR(M)、DPR(H)(以下、これら3つの
レジスタを1つのレジスタとして取り扱う場合にはDPR
(L、M、H)と表現する。)と、データを書き込む番
地を記憶する各8ビットの3つのレジスタADDR(L)、
ADDR(M)、ADDR(H)レジスタ(以下、これら3つの
レジスタを1つのレジスタとして取り扱う場合にはADDR
(L、M、H)と表現する。)と、受信バッファの残り
バイト数を記憶する2つのレジスタBCR(L)、BCR
(H)(以下、これら2つのレジスタを1つのレジスタ
として取り扱う場合にはレジスタBCR(L、H)と表現
する。)と、を備えて構成されている。
The DMA register unit 22 includes three 8-bit registers DP each storing an information write address of the frame information table 13.
R (L), DPR (M), DPR (H) (hereinafter, when these three registers are treated as one register, DPR
(L, M, H). ) And three 8-bit registers ADDR (L) for storing addresses to write data,
ADDR (M) and ADDR (H) registers (hereinafter, when these three registers are treated as one register, ADDR
(L, M, H). ) And two registers BCR (L) and BCR for storing the remaining number of bytes in the reception buffer.
(H) (hereinafter, when these two registers are treated as one register, they are expressed as a register BCR (L, H)).

なお、以下の説明においては、レジスタDPR(L、
M、H)はフレーム情報テーブルへのデータ書き込みご
とにインクリメントして更新されるものとし、ADDR
(L、M、H)は受信データのバッファへの書込み終了
毎にインクリメントされ更新されるものとし、レジスタ
BCR(L、H)は受信データのバッファへの書込み毎に
デクリメントして更新されるものとする。
In the following description, the register DPR (L,
M, H) are incremented and updated each time data is written to the frame information table.
(L, M, H) is incremented and updated every time the reception data is completely written into the buffer.
The BCR (L, H) is decremented and updated each time the received data is written to the buffer.

次にフレーム形式の不定長ブロックデータを受信する
ときのDMA制御部2の動作について第5図の状態遷移図
を参照して説明する。
Next, the operation of the DMA control unit 2 when receiving undefined-length block data in the frame format will be described with reference to the state transition diagram of FIG.

停止状態C1にあるDMA制御部2は、状態通知信号EOFが
反転状態(すなわち、EOF=“L"となると、データ待ち
状態C2に遷移する。次に、DMA転送要求信号DRQが出力さ
れると、DMA制御部2は、データ転送状態C3に遷移す
る。その後、データ転送が終了すると、DMA制御部2
は、再びデータ待ち状態C2に遷移する。DMA制御部2は
データ待ち状態C2において状態通知信号EOFが“H"にな
るとさらに反転すると、転送されたデータをテーブルに
書き込むテーブル書込状態C4に遷移する。その後、テー
ブル書込終了後、停止状態C1に遷移する。以後は、同様
の動作を繰り返すこととなる。
DMA controller 2 in a stopped state C 1, the state notification signal EOF is inverted state (i.e., when the EOF = "L", a transition to the data wait state C 2. Then, DMA transfer request signal DRQ is outputted Then, the DMA control unit 2 transits to the data transfer state C 3. Thereafter, when the data transfer is completed, the DMA control unit 2
Transitions back to the data wait state C 2. DMA control unit 2 further inverts the state signal EOF in the data wait state C 2 becomes "H", a transition to the table write state C 4 to write the transferred data in the table. Then, after the table write end, a transition to the stop state C 1. Thereafter, the same operation is repeated.

次に、フレーム形式の不定長ブロックデータを受信す
るときのDMA制御部2の詳細動作について第6図のタイ
ミングチャートを参照して説明する。
Next, the detailed operation of the DMA control unit 2 when receiving the undefined-length block data in the frame format will be described with reference to the timing chart of FIG.

まず、初期設定として、CPU10によりDMAレジスタ部22
のレジスタDPR(L、M、H)にフレーム情報を格納す
べきフレーム情報テーブルの格納先頭アドレスHOTが書
込まれ、レジスタADDR(L、M、H)にデータを書き込
むべき受信バッファ領域のデータ書込先頭アドレスHOB
が書込まれ、レジスタBCR(L、H)に使用可能領域の
全バイト数すなわち共通受信バッファの全バイト数が書
込まれているものとする。
First, as an initial setting, the DMA register 22
Is written in the register DPR (L, M, H) of the frame information table where the frame information is to be stored, and is written in the register ADDR (L, M, H). Including start address HOB
Is written, and the total number of bytes of the usable area, that is, the total number of bytes of the common reception buffer is written in the register BCR (L, H).

時刻t1において、受信部9により受信フレーム形式デ
ータの開始フラグが検出されると、状態通知信号EOFが
“L"となり、DMA制御部2は停止状態からデータ待ち状
態C2になる。
At time t 1, when the start flag of the received frame format data is detected by the receiver 9, a state notification signal EOF becomes "L", DMA control unit 2 is a data wait state C 2 from the stop state.

その後、第1番目のデータがレジスタ14および検出制
御部17によりフラグ検出および零削除が行われ、レジス
タ15およびレジスタ16を介して受信FIFO19に入力される
と、時刻t2において受信部9はDMA転送要求信号DRQを
“H"にしDMA制御部2のDMA制御部制御回路21に対し、DM
A転送要求を出す。これによりDMA制御部制御回路21はデ
ータ待ち状態からデータ転送状態へと状態遷移する。
Thereafter, when the first data is the flag detection and zero deletion is performed by the register 14 and the detection control unit 17, is input to the receiving FIFO19 through the register 15 and the register 16, the receiving section 9 at time t 2 is DMA By setting the transfer request signal DRQ to “H”, the DMA control unit control circuit 21 of the DMA control unit 2
A Make a transfer request. This causes the DMA control unit control circuit 21 to make a state transition from the data waiting state to the data transfer state.

次に時刻t3においてDMA制御部制御回路21はバス権要
求信号HRQを“H"にし、CPU10に対してバス権を要求す
る。
Then DMA controller control circuit 21 at time t 3 is set to "H" bus request signal HRQ, to request the bus right to CPU 10.

時刻t4において、バス権の要求に対してCPU10はバス
権許可信号HACKを“H"にする。これと同時にDMA制御部
2はバス制御信号IRDを“H"にし、レジスタADDR(L、
M、H)から受信バッファ領域の格納先頭アドレスHOB
をアドレスバスに出力する。さらにDMA制御部2はメモ
リ書込信号MWRを“H"にして、メモリ書込可能状態とす
る。
At time t 4, CPU 10 is in "H" of the bus grant signal HACK to a request bus. At the same time, the DMA control unit 2 sets the bus control signal IRD to “H” and sets the register ADDR (L,
M, H) to the storage start address HOB of the reception buffer area
Is output to the address bus. Further, the DMA control unit 2 sets the memory write signal MWR to "H" to put the memory in a memory writable state.

時刻t5においてDMA制御部制御回路21はDMA転送受付信
号DACKを“H"にして、受信部9に対してDMA転送要求を
受け付けたことを示す。さらにバス制御信号IRDを“L"
にして受信FIFO19に受信データ、すなわち、第1データ
d1をデータバス3に出力するように要求する。これによ
りデータバス3には受信FIFO19の受信したフレームデー
タ内の第1データd1が出力される。
DMA controller control circuit 21 at time t 5 is set to "H" DMA transfer acknowledge signal DACK, indicating receipt of the DMA transfer request to the receiving unit 9. Further, the bus control signal IRD is set to “L”.
And receive data, that is, first data, in the receive FIFO 19
requesting to output the d 1 to the data bus 3. Thus the data bus 3 first data d 1 in the frame data received in the receiving FIFO19 is outputted.

時刻t6においてDMA制御部はメモリ書込信号MWRを“L"
にしてデータバス3に出力されているデータ、すなわち
第1データd1をメモリ11の格納先頭アドレス(HOB)に
相当する共通受信バッファ12の領域に転送する。
DMA controller at time t 6 is a memory write signal MWR "L"
To to to transfer data that is output to the data bus 3, i.e. in the region of the common receive buffer 12 corresponding to the first data d 1 to store the start address of the memory 11 (HOB).

時刻t7においてDMA制御部制御回路21は、転送要求受
付信号DACKを“L"にする。また、DMA制御部2はバス制
御信号IRDを“H"にし、メモリ書込信号MWRを“H"にす
る。
DMA controller control circuit at the time t 7 21 to "L" transfer request acknowledge signal DACK. The DMA control unit 2 sets the bus control signal IRD to "H" and sets the memory write signal MWR to "H".

時刻t8において、DMA制御部制御回路21はバス権要求
信号HRQを“L"にしてバス権を放棄する。さらにレジス
タADDR(L、M、H)およびレジスタBCR(L、H)を
更新し、データ待ち状態になる。
At time t 8, DMA controller control circuit 21 to relinquish the bus in the "L" the bus request signal HRQ. Further, the register ADDR (L, M, H) and the register BCR (L, H) are updated, and a data waiting state is set.

時刻t9において、CPU10はバス権受付信号HACKを“L"
にする。
At time t 9, CPU10 is the bus right acknowledge signal HACK "L"
To

その後、受信部9からの新たなDMA転送要求信号DRQデ
ータ転送要求が出されると、上記の動作を繰り返し、順
次アドレス(HOB+1)、(HOB+2)、…、(HOB+N
−1)のそれぞれに第2データd2、第3データd3、…、
第NデータdNを転送する。このように受信部9で終了フ
ラグを検出するまで上記の動作が繰り返され、データの
転送が行われることになる。
Thereafter, when a new DMA transfer request signal DRQ data transfer request is issued from the receiving unit 9, the above operation is repeated, and the addresses (HOB + 1), (HOB + 2),.
-1), the second data d 2 , the third data d 3 ,.
Transferring the N data d N. Thus, the above operation is repeated until the receiving unit 9 detects the end flag, and the data transfer is performed.

時刻t10において受信部9で終了フラグを検出する
と、状態通知信号EOFは“L"になり、DMA制御部2はテー
ブル書込状態に遷移する。
Upon detecting the end flag at the receiving section 9 at time t 10, a state signal EOF becomes "L", DMA control unit 2 shifts the table write state.

時刻t11において、DMA制御部制御回路21は自動的にバ
ス権要求信号HRQを“H"にしてCPU10に対しバス権を要求
する。
At time t 11, DMA controller control circuit 21 automatically to CPU10 to "H" the bus request signal HRQ to request the bus right.

時刻t12において、CPU10はバス権受付信号HACKを“H"
にする。これによりDMA制御部2はバス制御信号IRDを
“H"にし、アドレスバス4にレジスタDPR(L、M、
H)から読出したフレーム情報テーブルの格納先頭アド
レス(HOT)を出力する。同時にメモリ書込信号MWRを
“H"にしてメモリを書込み可能状態にさせる。
At time t 12, CPU10 is the bus right acknowledge signal HACK "H"
To As a result, the DMA control unit 2 sets the bus control signal IRD to “H”, and registers the register DPR (L, M,
H), the storage start address (HOT) of the frame information table read out is output. At the same time, the memory write signal MWR is set to “H” to make the memory writable.

時刻t13において、DMA制御部制御回路21は16進数の
1、すなわち、“01H"をデータバス3に出力する。この
“01H"は書き込まれたディスクリプタの先頭アドレス部
が有効であることを示すステータスである。
At time t 13, DMA controller control circuit 21 outputs 1 hexadecimal, namely, the "01H" to the data bus 3. This “01H” is a status indicating that the head address portion of the written descriptor is valid.

時刻t14において、DMA制御部は前記“01H"をHOTで示
されるアドレス、すなわち、第7図に示すステータス部
C1に書き込む。
At time t 14, DMA controller address indicated the "01H" in HOT, i.e., the status unit shown in FIG. 7
It is written in C 1.

時刻t15において、DMA制御部はMWRを“H"にする。At time t 15, DMA controller to "H" MWR.

時刻t16において、DMA制御部はバス権要求信号HRQを
“L"にしてバス権を放棄する。
At time t 16, DMA controller to relinquish the bus in the "L" the bus request signal HRQ.

時刻t17において、CPU10はバス権受付信号HACKを“L"
にする。
At time t 17, CPU10 is the bus right acknowledge signal HACK "L"
To

時刻t18において、再びDMA制御部制御回路21は自動的
にバス権要求信号HRQを“H"にしてCPU10に対しバス権を
要求する。
At time t 18, DMA controller control circuit 21 again automatically to CPU10 to "H" the bus request signal HRQ to request the bus right.

時刻t19において、CPU10はバス権受付信号HACKを“H"
にする。これによりDMA制御部はバス制御信号IRDを“H"
にし、アドレスバスにレジスタDPR(L、M、H)から
読出した情報テーブルの格納先端アドレス(HOT+1)
を出力する。同時にメモリ書込信号MWRを“H"にしてメ
モリを書込み可能状態にさせる。
At time t 19, CPU10 is the bus right acknowledge signal HACK "H"
To As a result, the DMA control unit sets the bus control signal IRD to “H”.
And the leading end address (HOT + 1) of the information table read from the register DPR (L, M, H) on the address bus.
Is output. At the same time, the memory write signal MWR is set to “H” to make the memory writable.

時刻t20において、DMA制御部制御回路21は、データバ
ス3にレジスタADDR(L)の内容を出力する。
At time t 20, DMA controller control circuit 21 outputs the contents of register ADDR (L) to the data bus 3.

時刻t21において、DMA制御部制御回路21はレジスタAD
DR(L)の内容をフレーム情報テーブル13上の(HOT)
で示されるアドレスに書き込む。
At time t 21, DMA controller control circuit 21 is a register AD
The contents of DR (L) are stored in the frame information table 13 (HOT)
Write to the address indicated by.

時刻t22において、DMA制御部制御回路21はメモリ書込
信号MWRを“H"にする。
At time t 22, DMA controller control circuit 21 to "H" memory write signal MWR.

時刻t23において、DMA制御部はバス権用要求信号HRQ
を“L"にしてバス権を放棄する。
At time t 23, the request signal HRQ for DMA control unit bus
To “L” and abandon the bus right.

時刻t24において、CPUはバス権受付信号を“L"にす
る。
At time t 24, CPU is in the "L" of the bus acceptance signal.

以下、時刻t18〜t24の処理と同様の処理を繰り返し、
フレーム情報テーブル13のアドレス(HOT+2)、(HOT
+3)にそれぞれレジスタADDR(M)、レジスタADDR
(H)の内容を書き込む。このようにして第7図に示す
先頭アドレス部H1に当該フレーム形式データの共通受信
バッファ12における先頭アドレスが格納されることとな
る。
Hereinafter, the same processing as the processing from time t18 to t24 is repeated,
Address (HOT + 2), (HOT + 2) of frame information table 13
+3) to register ADDR (M) and register ADDR respectively
Write the contents of (H). Start address in the common receiving buffer 12 of the frame format data to the top address unit H 1 shown in FIG. 7 in this manner so that the are stored.

その後、時刻t25においてDMA制御部2は停止状態とな
る。
Then, DMA controller 2 at time t 25 is stopped.

以上の説明のように、フレーム形式のデータを受信す
るごとに上記一連の動作を繰り返す。
As described above, each time the data in the frame format is received, the above series of operations is repeated.

第7図に第2番目のフレーム形式データD2を受信後の
メモリ11のフレーム情報テーブル13および共通受信バッ
ファ12の状態を示す。図中斜線部はDMA制御部2によっ
てすでにデータが書き込まれた領域を示しており、先頭
アドレス部H2に次にフレーム形式データが格納されるべ
き共通受信バッファ12の領域の先頭アドレスが格納され
ている。また、ステータス部C3には、未だデータが転送
されていないことを示す“00H"が書き込まれたままであ
る。
FIG. 7 shows a state of the frame information table 13 and the common reception buffer 12 of the memory 11 after receiving the second frame format data D2. Hatched portion already data indicates the region which is written the leading address of the area of the common receive buffer 12 should then frame format data to the top address unit H 2 is stored is stored by the DMA controller 2 ing. Also, the status part C 3, remains still indicating that data is not being transferred "00H" is written.

以上説明したように、各フレーム形式のデータを共通
受信バッファ12の連続する領域に格納することができる
とともにフレーム情報テーブル13の情報により、CPUが
各フレーム形式のデータの境界を認識することが可能で
ある。
As described above, the data of each frame format can be stored in a continuous area of the common reception buffer 12, and the information of the frame information table 13 allows the CPU to recognize the boundary of the data of each frame format. It is.

以上の実施例においては、すでに格納した不定長ブロ
ックデータの最終アドレス+1のアドレスを先頭アドレ
スとする領域に次の不定長ブロックデータを格納するよ
うに構成していたが、最終アドレス+N(Nは正の整
数)なるアドレスを先頭アドレスとする領域に次の不定
長ブロックデータを格納するように構成することも可能
である。ただし、この場合においてNは小さいもののほ
うが無駄な空き領域を少なくする上では望ましい。
In the above embodiment, the next undefined-length block data is stored in an area starting from the address of the last address + 1 of the already-stored undefined-length block data. However, the final address + N (N is It is also possible to store the next undefined-length block data in an area having an address of (positive integer) as the start address. However, in this case, it is desirable that N is small in order to reduce unnecessary empty areas.

また、本実施例では領域情報として各フレームのデー
タが格納された領域の先頭アドレスを用いたが、各格納
領域のバイト数を用いても同様の効果が得られる。
Further, in this embodiment, the head address of the area where the data of each frame is stored is used as the area information. However, the same effect can be obtained by using the number of bytes of each storage area.

〔発明の効果〕〔The invention's effect〕

本発明は以上の説明のように、不定長ブロックデータ
を格納部内の連続する領域に格納することができるの
で、無駄な空き領域を削減することができ、格納部の利
用効率を向上させることができる。
As described above, according to the present invention, since undefined-length block data can be stored in a continuous area in the storage unit, useless free space can be reduced, and the use efficiency of the storage unit can be improved. it can.

また、不定長データを連続する領域に格納することに
よりCPUが各不定長ブロックデータに同一の処理を行う
場合にはアクセス処理が簡単になる。
In addition, by storing the undefined-length data in a continuous area, the access processing is simplified when the CPU performs the same processing on each undefined-length block data.

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

第1図は本発明の原理構成図、 第2図は本発明の実施例のブロック図、 第3図は第2図の実施例のメモリ格納状態説明図、 第4図は本発明の実施例のより詳細なブロック図、 第5図は第4図の実施例の状態遷移説明図、 第6図は第4図の実施例のタイミングチャート、 第7図は第4図の実施例のメモリの格納状態説明図、 第8図は従来例のブロック図、 第9図は従来のメモリの格納状態説明図、 第10図はHDLCのデータ形式説明図である。 1……データ処理装置 2……DMA制御部 3……データバス 4……アドレスバス 5……メモリ 6……連続領域転送制御部 7……格納部 8……領域情報格納部 9……受信部 10……CPU 11……メモリ 12……共通受信バッファ 13……フレーム情報テーブル 14、15、16……シフトレジスタ 17……検出制御部 18……CRCチェッカ 19……受信FIFO 20……受信部制御回路 21……DMA制御部制御回路 22……DMAレジスタ部 1 is a block diagram of the principle of the present invention, FIG. 2 is a block diagram of an embodiment of the present invention, FIG. 3 is an explanatory diagram of a memory storage state of the embodiment of FIG. 2, and FIG. 5 is a state transition explanatory diagram of the embodiment of FIG. 4, FIG. 6 is a timing chart of the embodiment of FIG. 4, and FIG. 7 is a diagram of a memory of the embodiment of FIG. FIG. 8 is a block diagram of a conventional example, FIG. 9 is a diagram of a conventional memory, and FIG. 10 is an explanatory diagram of an HDLC data format. DESCRIPTION OF SYMBOLS 1 ... Data processing apparatus 2 ... DMA control part 3 ... Data bus 4 ... Address bus 5 ... Memory 6 ... Continuous area transfer control part 7 ... Storage part 8 ... Area information storage part 9 ... Reception Unit 10 CPU 11 Memory 12 Common receive buffer 13 Frame information tables 14, 15, 16 Shift register 17 Detection control unit 18 CRC checker 19 Receive FIFO 20 Receive Block control circuit 21: DMA control block control circuit 22: DMA register block

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】メモリ(5)と、データのダイレクトメモ
リアクセス転送を行うダイレクトメモリアクセス制御部
(2)と、を備えたデータ処理装置において、 前記メモリ(5)は複数の不定長ブロックデータを格納
するための連続する格納領域を有する格納部(7、12)
と、前記格納部(7、12)に格納された不定長ブロック
データ(D1、D2、D3、D4)の占有領域(An、An+1)を示
す領域情報(In、In+1)を記憶する領域情報格納部
(8、13)を備え、 前記ダイレクトメモリアクセス制御部(2)は前記不定
長ブロックデータを前記格納部(7、12)の連続的な領
域に転送する連続領域転送制御部(6)を備えたことを
特徴とするデータ処理装置。
1. A data processing device comprising: a memory (5); and a direct memory access control unit (2) for performing direct memory access transfer of data, wherein the memory (5) stores a plurality of indefinite-length block data. Storage unit having a continuous storage area for storing (7, 12)
And area information (I n ) indicating an occupied area (A n , A n + 1 ) of the indefinite-length block data (D 1 , D 2 , D 3 , D 4 ) stored in the storage units (7, 12). , In + 1 ), and the direct memory access control unit (2) stores the indefinite-length block data in a continuous area of the storage unit (7, 12). A data processing device comprising a continuous area transfer control unit (6) for transferring data to a data transfer device.
JP2008041A 1990-01-17 1990-01-17 Data processing device Expired - Fee Related JP2823625B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008041A JP2823625B2 (en) 1990-01-17 1990-01-17 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008041A JP2823625B2 (en) 1990-01-17 1990-01-17 Data processing device

Publications (2)

Publication Number Publication Date
JPH03211651A JPH03211651A (en) 1991-09-17
JP2823625B2 true JP2823625B2 (en) 1998-11-11

Family

ID=11682263

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008041A Expired - Fee Related JP2823625B2 (en) 1990-01-17 1990-01-17 Data processing device

Country Status (1)

Country Link
JP (1) JP2823625B2 (en)

Also Published As

Publication number Publication date
JPH03211651A (en) 1991-09-17

Similar Documents

Publication Publication Date Title
US4942515A (en) Serial communications controller with FIFO register for storing supplemental data and counter for counting number of words within each transferred frame
US5404548A (en) Data transfer control system transferring command data and status with identifying code for the type of information
US5151999A (en) Serial communications controller for transfer of successive data frames with storage of supplemental data and word counts
US5978865A (en) System for performing DMA transfers where an interrupt request signal is generated based on the value of the last of a plurality of data bits transmitted
JPS5810236A (en) Interface circuit
US6728797B2 (en) DMA controller
US4365296A (en) System for controlling the duration of the time interval between blocks of data in a computer-to-computer communication system
US7143206B2 (en) Method for controlling data transfer unit having channel control unit, storage device control unit, and DMA processor
KR100348545B1 (en) Communication dma device
JPH08161259A (en) Receiving device and transfer device for serial data
JP2823625B2 (en) Data processing device
JPS6359042A (en) Communication interface equipment
JPH08314854A (en) Data transfer system and device relating to the same
JPH0479422A (en) Transmission control circuit
JPH0353736A (en) Reception buffer control system
JP3356110B2 (en) Function expansion system and data transfer method used therefor
JPH10105488A (en) Communication controller
JPS63228856A (en) Communication controller
JP2724797B2 (en) Direct memory access system
JPH0432922A (en) Interface control circuit
JPH0581165A (en) Data transfer circuit
JPS63228855A (en) Communication controller
JPS6235148B2 (en)
JPS63187943A (en) Communication control equipment
JPH0675796A (en) Parity error recording device

Legal Events

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