JPH07281993A - DMA device - Google Patents
DMA deviceInfo
- Publication number
- JPH07281993A JPH07281993A JP7071494A JP7071494A JPH07281993A JP H07281993 A JPH07281993 A JP H07281993A JP 7071494 A JP7071494 A JP 7071494A JP 7071494 A JP7071494 A JP 7071494A JP H07281993 A JPH07281993 A JP H07281993A
- Authority
- JP
- Japan
- Prior art keywords
- data
- address
- storage area
- unit
- control signal
- 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.)
- Pending
Links
Landscapes
- Bus Control (AREA)
Abstract
(57)【要約】 (修正有)
【構成】 デコード部8が受信フレームのデータ列を構
成する各データに付加された属性データに基づいて各デ
ータの種類を識別し、バッファメモリ4の単位格納領域
に格納する。また、その属性データに基づいて、ステー
タスやエラー情報も識別し、バッファメモリ4の単位格
納領域に設けられた本体データとは別の専用領域に格納
する。DMA本体部7が、1受信フレームの転送の終了
時、現転送先単位格納領域の次領域アドレス格納部に格
納されたアドレスをベースレジスタ71に格納するた
め、次の受信フレームの転送にて使用する単位格納領域
の先頭アドレスをCPU3の介在なしにベースレジスタ
に設定可能となる。更に、エラーの発生時のベースレジ
スタへのアドレス再設定をCPUの介在なしに実現可能
となる。
【効果】 通信処理中のCPUの介在が減り、通信速度
の向上を図れる。
(57) [Summary] (Correction) [Configuration] The decoding unit 8 identifies the type of each data based on the attribute data added to each data forming the data sequence of the received frame, and stores the data in the buffer memory 4 as a unit. Store in area. The status and error information are also identified based on the attribute data and stored in a dedicated area other than the main body data provided in the unit storage area of the buffer memory 4. The DMA main body unit 7 stores the address stored in the next area address storage unit of the current transfer destination unit storage area in the base register 71 at the end of the transfer of one reception frame, so that it is used in the transfer of the next reception frame. The starting address of the unit storage area can be set in the base register without the intervention of the CPU 3. Further, it becomes possible to reset the address in the base register when an error occurs without intervention of the CPU. [Effect] The intervention of the CPU during the communication processing is reduced, and the communication speed can be improved.
Description
【0001】[0001]
【産業上の利用分野】本発明は通信コントロールシステ
ムに関するもので、特に、オクテットデータからフレー
ムの区切りを認識できない通信方式(例えば、ビットオ
リエンテッドプロトコル)において、シリアルインタフ
ェースと他の資源との間のインタフェースを容易にし、
高能率なデータ転送を実現するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a communication control system, and more particularly, to a communication system (for example, bit-oriented protocol) in which a frame delimiter cannot be recognized from octet data, and between the serial interface and other resources. Easy interface,
It realizes highly efficient data transfer.
【0002】[0002]
【従来の技術】従来の通信コントロールシステムとして
はキャラクタ転送方式(BYSYNC:BinarySynchronous Comm
unication,BSC) が最も一般的であった。これはバイナ
リ数値をASCIIコードとして知られる各種キャラク
タにより表現し、1オクテット(8ビット)をデータの
1単位としてフレーム化し転送するものである。この転
送方式の場合、キャラクタコードが規格化されており、
各コードが別々の通信記号を示すため、データの切れ目
が確実に判別される。しかし、受信側ではCPUが各コ
ードをソフトウエアにより解読しつつ取込むことになる
ため、通信速度の面で問題があった。例えば、このキャ
ラクタ転送は〜9600bps程度には対応可能である
が、今日ではポピュラーとなったLAN(10Mbps
〜16Mbps)ではデータの取り零しが多くなってと
ても処理が追い付かない。2. Description of the Related Art As a conventional communication control system, a character transfer method (BYSYNC: Binary Synchronous Comm.
unication (BSC) was the most common. This is to express a binary numerical value by various characters known as ASCII code, and frame and transfer one octet (8 bits) as one unit of data. In the case of this transfer method, the character code is standardized,
Since each code indicates a different communication symbol, the break of data can be surely determined. However, there is a problem in terms of communication speed because the CPU on the receiving side reads each code while decoding it by software. For example, this character transfer can support up to about 9600 bps, but today's popular LAN (10 Mbps).
At ~ 16 Mbps), there is a lot of data zeroing, and the processing cannot catch up.
【0003】そこで、今日では、LANにも対応可能な
ようにHDLC(High-level Data Link Control proced
ure)方式をはじめとするビット・オリエンテッド・プロ
トコルが開発された。このHDLC方式では図5(b)
に示すように、1オクテットをデータの1単位とするデ
ータ列により1フレームを構成し、1つのフレームの先
頭と最後尾とにはフラグと呼ばれる8ビットの所定の符
号“01111110”が接続され、その間に特定の符
号からなるデータを接続することとなる。Therefore, today, in order to be compatible with LAN, HDLC (High-level Data Link Control proced
The bit-oriented protocol including the (ure) method was developed. In this HDLC method, FIG.
As shown in, a data string having 1 octet as one unit of data constitutes one frame, and a predetermined 8-bit code “01111110” called a flag is connected to the beginning and the end of one frame, In the meantime, data consisting of a specific code will be connected.
【0004】図4は従来のHDLC方式のシステム構成
を、図5はその動作状態をそれぞれ図解するものであ
る。この図において、301はデータバス、302はア
ドレスバスであり、これらのバス301,302には、
CPU303、バッファメモリ304、通信コントロー
ラ305及びDMA回路306が接続されている。通信
コントローラ305はデータレジスタ3051及びステ
ータスレジスタ3052を備え、受信フレームのデータ
列は順次データレジスタ3051に、ステータスデータ
はステータスレジスタ3052に格納されることとな
る。DMA306はアドレスレジスタ3061及び長さ
レジスタ3062を備え、アドレスレジスタ3061に
はメモリ304における当該フレームデータ格納領域の
先頭アドレスがCPU303により格納され、長さレジ
スタ3062には当該フレームデータのデータ列が格納
されるようになっている。FIG. 4 illustrates a conventional HDLC system configuration, and FIG. 5 illustrates an operating state thereof. In this figure, 301 is a data bus, 302 is an address bus, and these buses 301 and 302 are
The CPU 303, the buffer memory 304, the communication controller 305, and the DMA circuit 306 are connected. The communication controller 305 includes a data register 3051 and a status register 3052, and the data sequence of the received frame is sequentially stored in the data register 3051 and the status data is stored in the status register 3052. The DMA 306 includes an address register 3061 and a length register 3062. The address register 3061 stores the start address of the frame data storage area in the memory 304 by the CPU 303, and the length register 3062 stores a data string of the frame data. It has become so.
【0005】図4に示すように、通信コントローラ30
5のフレーム受信に若干遅れて、DMA転送が並列的に
行われることとなる。一つのDMA転送が終了すると、
CPU303が前述したコード変換処理、エラー検出処
理、長さ確認処理等を実行することとなる。この処理が
終わった後、通信コントローラ305は、受信フレーム
2の入力に移り、その開始に遅れてDMA転送2が開始
されることとなる。As shown in FIG. 4, the communication controller 30
The DMA transfer is performed in parallel with a slight delay after the reception of the frame of No. 5. When one DMA transfer is completed,
The CPU 303 executes the above-mentioned code conversion processing, error detection processing, length confirmation processing, and the like. After this processing is completed, the communication controller 305 shifts to the input of the reception frame 2, and the DMA transfer 2 is started after the start thereof.
【0006】すなわち、通信コントローラ305が受信
フレームのスタートデリミタを検出すると、続くアクセ
スコントロール、フレームコントロール、行き先アドレ
ス、送り元アドレス、情報フィールドの各データについ
ての本体データレジスタ3051への格納を開始し、D
MA転送が可能な量までレジスタ3051への転送が可
能になるとDMA要求信号DREQをDMA回路306
に与える。次いで、通信コントローラ305は、受信フ
レームのステータスをステータスレジスタ3052に格
納することとなる。That is, when the communication controller 305 detects the start delimiter of the received frame, it starts storing in the body data register 3051 for each data of the following access control, frame control, destination address, source address and information field, D
When the transfer to the register 3051 is possible up to the MA transferable amount, the DMA request signal DREQ is sent to the DMA circuit 306.
Give to. Next, the communication controller 305 will store the status of the received frame in the status register 3052.
【0007】DMA回路306は通信コントローラ30
5からのDMA要求信号DREQを受けると、通信コン
トローラ305へDMA許可信号DACKを通信コント
ローラ305へ送信する。その後、DMA回路306は
バス使用権が確保され次第、データレジスタ3051の
データをメモリ304へ転送し始めることとなる。そし
て、DMA回路306はデータレジスタ3051内のデ
ータについての転送が終了すると、その転送中にカウン
トしたデータ長を長さレジスタ3062に格納し、最後
に、EOP信号をCPU303へ送信することとなる。
するとCPU303が必要な処理を行って1フレームの
受信処理が終了することとなる。The DMA circuit 306 is the communication controller 30.
When receiving the DMA request signal DREQ from 5, the communication controller 305 transmits the DMA permission signal DACK to the communication controller 305. After that, the DMA circuit 306 starts to transfer the data in the data register 3051 to the memory 304 as soon as the bus use right is secured. When the transfer of the data in the data register 3051 is completed, the DMA circuit 306 stores the data length counted during the transfer in the length register 3062, and finally transmits the EOP signal to the CPU 303.
Then, the CPU 303 performs necessary processing, and the reception processing for one frame ends.
【0008】このHDLC方式の場合には、データをそ
のままメモリに貯蔵するため、キャラクタ方式に比べて
高速度な通信が可能となる。In the case of the HDLC system, the data is stored in the memory as it is, so that the communication at a higher speed than that of the character system is possible.
【0009】しかしながら、そのCPU303によるソ
フトウエア処理が通信速度低下の原因になっている。However, the software processing by the CPU 303 causes a decrease in communication speed.
【0010】このCPU303の処理とは次の処理であ
る。 (1) 通信コントローラ305のステータスレジスタ3
052からのエラー情報及びステータス情報の読込み。 (2) DMA回路306におけるデータ長レジスタ30
62からの長さデータの読込み。 (3) メモリ304における次に使用する単位格納領域
先頭アドレスのベースアドレスレジスタ3061への格
納。 (4) DMA転送エラーが発生した場合における、その
エラーの発生した転送の際に使用した単位格納領域先頭
アドレスのベースアドレスレジスタ3061への格納。 (5) 通信データの中に先端及び後端に付加されたフラ
グ(スタートデリミタ、エンドデリミタ)と一致するも
のがある場合におけるコード変換処理(デリミタ処
理)。つまり、フラグと一致したデータはそのまま転送
した場合、フラグと認識される虞があるため、特定の方
式でコード変換して送出し、受信側では一旦メモリに全
てのデータを格納した後、格納したデータをソフトウエ
アにより点検し、そのデータの中に特定の変換データが
存在する場合、この特定の変換データを前述したフラグ
と同一のデータに戻す処理を実行するものである。The processing of the CPU 303 is the following processing. (1) Status register 3 of communication controller 305
Read error information and status information from 052. (2) Data length register 30 in the DMA circuit 306
Read length data from 62. (3) Storing the start address of the unit storage area to be used next in the memory 304 in the base address register 3061. (4) When a DMA transfer error occurs, the base address register 3061 stores the unit storage area start address used in the transfer in which the error occurred. (5) Code conversion processing (delimiter processing) when there is data in the communication data that matches the flags (start delimiter, end delimiter) added to the front and rear ends. In other words, if the data that matches the flag is transferred as it is, it may be recognized as a flag. Therefore, the code is converted by a specific method and then sent, and the receiving side stores all the data in the memory and then stores it. The data is inspected by software, and when the specific conversion data exists in the data, a process of returning the specific conversion data to the same data as the above-mentioned flag is executed.
【0011】このようなソフトウエア処理が頻繁に伴う
と、やはり通信速度が低下し、LAN程度には、ある程
度対応可能ではあっても、最新の通信方式である光イー
サ(100Mbps)、ATM(156Mbps)に
は、取り零しが多くなってとても対応することができな
いのである。要するに、CPU303がバス301,3
02を使用するようになり、通信コントローラ305は
受信不感期間となり、その期間は通信コントローラ30
5はフレーム受信を行うことができないため、これが通
信速度を低下させることとなっていたのである。CPU
303が実行する処理としては、前述したコード変換の
他に通信コントローラ305のステータスレジスタ30
52からのステータス情報の読込み、エラー発生時、再
受信のためにDMA306のアドレスレジスタ3061
への再設定、長さレジスタ3062からのデータ長情報
の読込み、次に使用するメモリ304の単位領域の先頭
番地に関するDMA306のアドレス3061への設定
処理等の3ないしは4種類の処理を1フレーム受信毎に
行うこととなるため、通信速度が低下する。また、CP
U303の処理能力もオーバヘッドとなり、実効的なデ
ータ転送能力も低下することとなっている。特に、短い
フレームが連続して到着する場合、再設定処理の発生頻
度が高くなり、その頻度に比例してCPU処理のオーバ
ヘッドも大きくなり、実効性能は顕著に低下する。If such software processing is frequently performed, the communication speed is also lowered, and although it can support LAN, to some extent, the latest communication methods such as optical Ethernet (100 Mbps) and ATM (156 Mbps). ), There is a lot of money to get rid of, and I can't deal with it very much. In short, the CPU 303 uses the buses 301, 3
02, the communication controller 305 becomes a reception dead period, and during that period, the communication controller 30
Since No. 5 cannot receive a frame, this would reduce the communication speed. CPU
As the processing executed by 303, in addition to the code conversion described above, the status register 30 of the communication controller 305 is used.
Address information 3061 of DMA 306 for reading status information from 52 and re-receiving when an error occurs
1 to 3 or 4 types of processing such as resetting to data, reading data length information from the length register 3062, setting processing to the address 3061 of the DMA 306 regarding the start address of the unit area of the memory 304 to be used next, and the like. Since it is performed every time, the communication speed decreases. Also, CP
The processing capacity of U303 also becomes an overhead, and the effective data transfer capacity is also reduced. In particular, when short frames continuously arrive, the frequency of the resetting process increases, the CPU processing overhead increases in proportion to the frequency, and the effective performance remarkably decreases.
【0012】[0012]
【発明が解決しようとする課題】以上のように従来のH
DLC方式による場合、受信フレームの入力毎にCPU
のソフトウエア処理が伴い、この際にはバス権が通信コ
ントローラからCPUに移り、通信コントローラはバス
を使用することができなくなり、通信速度が低下すると
いう問題がある。As described above, the conventional H
When using the DLC method, the CPU is used every time a received frame is input.
However, in this case, the bus right is transferred from the communication controller to the CPU, the communication controller cannot use the bus, and the communication speed decreases.
【0013】本発明は上記従来技術の有する問題点に鑑
みてなされたもので、その目的とするところはCPUの
処理を介在させることなしにその前述した処理を行うこ
とが可能なDMA装置を提供することにある。The present invention has been made in view of the above problems of the prior art, and an object of the present invention is to provide a DMA device capable of performing the above-mentioned processing without interposing CPU processing. To do.
【0014】すなわち、本発明の具体的な一つの目的
は、1つの受信フレームについての転送の終了時、バッ
ファメモリにおける次の受信フレームの転送において使
用する単位格納領域の先頭アドレスをCPUの介在なし
にベースアドレスレジスタに設定可能なDMA装置を提
供することにある。That is, a specific object of the present invention is to, at the end of the transfer of one received frame, set the start address of the unit storage area used in the transfer of the next received frame in the buffer memory without the intervention of the CPU. Another object of the present invention is to provide a DMA device in which the base address register can be set.
【0015】更に他の目的は、エラーの発生時、バッフ
ァメモリにおけるそのエラーの発生したフレームの転送
において使用した単位格納領域の先頭アドレスをCPU
の介在なしにベースアドレスレジスタに再設定すること
ができるDMA装置を提供することにある。Still another object is to, when an error occurs, set the head address of the unit storage area used in the transfer of the frame in which the error has occurred in the buffer memory to the CPU.
It is an object of the present invention to provide a DMA device that can re-set the base address register without any intervention.
【0016】また、本発明の目的は、CPUの通信デー
タの中に先端及び後端に付加されたフラグ(スタートデ
リミタ、エンドデリミタ)と一致するものがある場合に
おける(CPUによる)コード変換処理を不要にするこ
とにある。Further, an object of the present invention is to perform a code conversion process (by the CPU) in the case where the communication data of the CPU has a match with the flags (start delimiter, end delimiter) added to the leading end and the trailing end. To make it unnecessary.
【0017】更に、本発明の目的は、通信コントローラ
のステータスレジスタからのエラー情報及びステータス
情報をCPUの介在なしに読込むことができるDMA装
置を提供することにある。A further object of the present invention is to provide a DMA device capable of reading error information and status information from the status register of the communication controller without CPU intervention.
【0018】[0018]
【課題を解決するための手段】本発明のDMA装置は、
受信フレーム格納用バッファメモリにおける所定容量ず
つ設けられた単位格納領域のデータ構造に対応して転送
先アドレスを発生するDMA本体部と、前記受信フレー
ムのデータ列を構成する各データに付加された属性デー
タにより該各データの種類を識別し、その識別結果に基
づいて、前記各データが前記単位格納領域の所定領域に
格納され、かつ、その終了後、前記現転送先単位格納領
域の次領域アドレス格納部に格納されたアドレスデータ
が前記ベースアドレスレジスタに書込まれるように前記
DMA本体部へのアクセス制御信号を発生するデコード
部とを備えている。The DMA device of the present invention is
A DMA main body that generates a transfer destination address corresponding to a data structure of a unit storage area provided in a predetermined capacity in the received frame storage buffer memory, and an attribute added to each data that forms the data string of the received frame The type of each data is identified by the data, and each data is stored in a predetermined area of the unit storage area based on the identification result, and after the end, the next area address of the current transfer destination unit storage area And a decoding unit for generating an access control signal to the DMA main unit so that the address data stored in the storage unit is written in the base address register.
【0019】DMA本体部は、転送先アドレスの元にな
る現転送先単位格納領域の先頭アドレス格納用ベースア
ドレスレジスタを備え、前記現転送先単位格納領域の次
領域アドレス格納部に格納されたアドレスデータを前記
ベースアドレスレジスタに格納する機能を有することを
特徴とする。The DMA main body section includes a base address register for storing the start address of the current transfer destination unit storage area which is the source of the transfer destination address, and the address stored in the next area address storage section of the current transfer destination unit storage area. It has a function of storing data in the base address register.
【0020】また、DMA本体部は、アクセス制御信号
に従ってベースレジスタ部のアドレス値に所定の値を加
算することにより現転送先単位格納領域の各領域に対応
したアドレス値として出力する加算器部を備える構成と
することができる。Further, the DMA main body unit includes an adder unit which outputs a predetermined value to the address value of the base register unit according to the access control signal to output as an address value corresponding to each area of the current transfer destination unit storage area. It can be configured to include.
【0021】加算器部は、当該単位格納領域における受
信フレームの第1のフィールドのデータ列を格納する第
1の領域に対するアドレス値を出力する第1の加算器
と、当該単位格納領域における前記受信フレームの第2
のフィールドのデータ列を格納する第2の領域に対する
アドレス値を出力する第2の加算器と、前記第1、第2
の加算器の出力をメモリアクセス制御信号に従って切換
え出力するアドレス切換え部と、前記アドレス切換え部
の出力に対応してバッファメモリに対する書込み/読出
し制御信号を出力する書込み/読出し制御信号発生部と
を備えることにより実現することができる。The adder unit outputs a first adder which outputs an address value for a first area for storing a data string of a first field of a received frame in the unit storage area, and the reception in the unit storage area. Second of the frame
Second adder for outputting an address value for a second area for storing the data string of the field of
And an address switching unit for switching and outputting the output of the adder according to the memory access control signal, and a writing / reading control signal generating unit for outputting a writing / reading control signal for the buffer memory corresponding to the output of the address switching unit. It can be realized by
【0022】デコード部は、受信フレームの本体データ
の位置を示す第1属性データを識別したとき、当該単位
格納領域における本体データ格納領域のアドレス出力指
令及び書込み制御信号出力指令となる第2メモリアクセ
ス制御信号を出力する第1制御信号発生手段と、前記受
信フレームのステータスデータの位置を示す第2属性デ
ータを識別したとき、現転送先単位格納領域におけるス
テータス格納領域及び長さ格納領域のアドレス出力指令
及び書込み制御信号出力指令となる第2メモリアクセス
制御信号を出力する第2制御信号発生手段と、受信フレ
ームの次の受信フレームをバッファメモリに格納すると
きに使用される現転送先単位格納領域の次領域アドレス
読出し制御信号出力指令及び書込み制御信号出力指令と
なる第3メモリアクセス制御信号を出力する第3制御信
号発生手段とを備えたことを特徴とする。When the decoding unit identifies the first attribute data indicating the position of the body data of the received frame, the second memory access becomes the address output command and the write control signal output command of the body data storage area in the unit storage area. When the first control signal generating means for outputting a control signal and the second attribute data indicating the position of the status data of the received frame are identified, the address output of the status storage area and the length storage area in the current transfer destination unit storage area Second control signal generating means for outputting a second memory access control signal which is a command and write control signal output command, and a current transfer destination unit storage area used when storing a received frame next to the received frame in the buffer memory Next area address read control signal output command and write control signal output command Characterized in that a third control signal generating means for outputting a Seth control signal.
【0023】また、デコード部は、受信フレームを構成
するデータ列のエラーの発生を検出し、その検出時にバ
ッファメモリにおける現転送先単位格納領域の先頭アド
レスがベースアドレスレジスタに再設定されるように現
転送先単位格納領域の前の単位格納領域における次領域
アドレス読出し制御信号出力指令及び書込み制御信号出
力指令となる第4制御信号発生手段を備えることが望ま
しい。Further, the decoding unit detects the occurrence of an error in the data sequence forming the received frame, and at the time of detection, the start address of the current transfer destination unit storage area in the buffer memory is reset in the base address register. It is desirable to provide a fourth control signal generating means for providing a next area address read control signal output command and a write control signal output command in the unit storage area before the current transfer destination unit storage area.
【0024】本発明の通信システムは、所定容量ずつ設
けられた単位格納領域を有し、該単位格納領域がデータ
種類毎の書込み領域と前記単位格納領域の直後の単位格
納領域の先頭アドレスが予め格納された読出し領域とを
有し、受信フレームのデータ列が格納されるバッファメ
モリと、前記受信フレームのデータ列を構成する各デー
タの種類を示す属性データに基づいて前記データ列を構
成する各データをその種類毎に設けられたデータレジス
タに保存する通信コントローラと、ベースレジスタ部の
記憶値に所定の値を加算することにより単位格納領域の
各領域をアドレス指定するアドレス発生手段を備え、前
記データレジスタに格納されたデータの長さに応じて前
記1または2以上の単位格納領域が使用されるように前
記ベースアドレスレジスタを更新制御するDMAコント
ローラとを備えることを特徴とする。The communication system of the present invention has a unit storage area provided by a predetermined capacity, and the unit storage area has a write area for each data type and a head address of the unit storage area immediately after the unit storage area in advance. A buffer memory having a stored read area and storing a data sequence of a received frame; and each of the data sequences that form the data sequence based on attribute data indicating the type of each data that constitutes the data sequence of the received frame. A communication controller for storing data in a data register provided for each type; and an address generating means for addressing each area of the unit storage area by adding a predetermined value to the stored value of the base register section, The base address is used so that the one or more unit storage areas are used according to the length of the data stored in the data register. Characterized in that it comprises a DMA controller for updating control register.
【0025】[0025]
【作用】本発明のDMA装置は、受信フレームのデータ
列を構成する各データに付加された属性データに基づい
て各データの種類を識別するようになっているので、フ
ラグと一致するデータであっても前述したCPUによる
コード変換処理を不要とし、その分、通信速度の向上を
図ることができることとなる。In the DMA device of the present invention, since the type of each data is identified based on the attribute data added to each data forming the data sequence of the received frame, the data is the same as the flag. However, the code conversion processing by the CPU described above is unnecessary, and the communication speed can be improved accordingly.
【0026】また、本発明によれば、その属性データに
基づいて、ステータスやエラー情報も識別し、バッファ
メモリの単位格納領域に設けられた本体データとは別の
専用領域に格納するようになっているので、CPUによ
るそのI/O読込み処理が不要となり、この点からも通
信速度の向上を図ることができることとなる。Further, according to the present invention, the status and error information are also identified based on the attribute data and stored in a dedicated area different from the main body data provided in the unit storage area of the buffer memory. Therefore, the I / O reading process by the CPU is unnecessary, and the communication speed can be improved also from this point.
【0027】さらに、DMA本体部が、1つの受信フレ
ームについての転送の終了時、現転送先単位格納領域の
次領域アドレス格納部に格納されたアドレスデータをベ
ースアドレスレジスタに格納するようになっているた
め、1つの受信フレームについての転送の終了時、バッ
ファメモリにおける次の受信フレームの転送において使
用する単位格納領域の先頭アドレスをCPUの介在なし
にベースアドレスレジスタに設定可能となる。Further, when the transfer of one received frame is completed, the DMA main body section stores the address data stored in the next area address storage section of the current transfer destination unit storage area in the base address register. Therefore, at the end of the transfer of one received frame, the start address of the unit storage area used in the transfer of the next received frame in the buffer memory can be set in the base address register without CPU intervention.
【0028】更に、本発明によれば、受信フレームを構
成するデータ列のエラーの発生を検出し、その検出時に
バッファメモリにおける現転送先単位格納領域の先頭ア
ドレスがベースアドレスレジスタに再設定できるように
なっているため、エラーの発生時、バッファメモリにお
けるそのエラーの発生したフレームの転送において使用
した単位格納領域の先頭アドレスをCPUの介在なしに
ベースアドレスレジスタに再設定することができ、この
点からも通信速度の向上を図ることができることとな
る。Further, according to the present invention, it is possible to detect the occurrence of an error in the data sequence forming the received frame and reset the start address of the current transfer destination unit storage area in the buffer memory to the base address register at the time of detection. Therefore, when an error occurs, the start address of the unit storage area used in the transfer of the frame in which the error occurred in the buffer memory can be reset in the base address register without the intervention of the CPU. Therefore, the communication speed can be improved.
【0029】[0029]
【実施例】以下に本発明の実施例について図面を参照し
つつ説明する。図1は本発明の一実施例に係るDMA回
路を有する通信システムの構成を示すものであり、図2
はその処理対象となる転送データの構造を示すものであ
る。この図において、1はデータバス、2はアドレスバ
スであり、これらのバス1,2にはCPU3とメモリ4
と通信コントローラ5とDMA回路6とが接続され、バ
ス1,2はそれらの共有バスとして使用される。DMA
回路6にはアービタ54が内蔵され、このアービタ54
が同じく通信コントローラ5とDMA回路6とCPU4
とのバス調停を行うようになっている。Embodiments of the present invention will be described below with reference to the drawings. 1 shows a configuration of a communication system having a DMA circuit according to an embodiment of the present invention.
Indicates the structure of transfer data to be processed. In this figure, 1 is a data bus, 2 is an address bus, and these buses 1 and 2 have a CPU 3 and a memory 4 respectively.
The communication controller 5 and the DMA circuit 6 are connected to each other, and the buses 1 and 2 are used as their shared buses. DMA
The circuit 6 has a built-in arbiter 54.
Is also a communication controller 5, a DMA circuit 6 and a CPU 4
It is supposed to arbitrate with the bus.
【0030】CPU3は、この通信システムの他にシス
テム全体の動作制御を司るもので、図示しないPROM
内のプログラムに従ってメモリ4のデータを用いた各種
の処理を実行する。メモリ4は、通信データ格納のため
に割当てられたバッファ領域を有しており、その各単位
格納領域には、図2(a)に示すように、当該単位格納
領域の次の単位格納領域の先頭アドレスが書込まれた次
領域アドレス格納部41と、ステータス格納部42と、
長さ格納部43と、本体データが格納される本体データ
格納部44とを有し、次領域アドレス格納部41、ステ
ータス格納部42、長さ格納部43は各データの格納に
十分な容量とされ、本体データ格納部44は、1フレー
ムの平均的な長さに基づきそのデータが極力全て格納さ
れ、かつ余剰の領域が極力大きくならないような容量に
設定され、例えば、256バイト程度とされる。The CPU 3 controls the operation of the entire system in addition to this communication system, and is a PROM (not shown).
Various processes using the data in the memory 4 are executed according to the programs in the program. The memory 4 has a buffer area allocated for storing communication data, and each unit storage area has a buffer area next to the unit storage area as shown in FIG. 2A. A next area address storage unit 41 in which the start address is written, a status storage unit 42,
It has a length storage unit 43 and a main body data storage unit 44 for storing main body data, and the next area address storage unit 41, the status storage unit 42, and the length storage unit 43 have sufficient capacity to store each data. Then, the main body data storage unit 44 is set to a capacity such that all the data is stored as much as possible based on the average length of one frame and the surplus area does not become as large as possible, for example, about 256 bytes. .
【0031】他のシステムからのデータバス1上の転送
データは通信コントローラ5により受信される。この転
送フレームは、図2(b)に示すように、受信データ部
と属性データ部とから構成され、前者は、フレームの始
まりを示すスタートデリミタ情報、ADP(Automatic D
ata Processing)機能へのアクセスを正当な場合のみ許
可するセキュリティが目的のアクセスコントロール情
報、トークンパッシング方式における転送許可フラグと
なるフレームコントロール情報、当該転送フレームの転
送先を示す行き先アドレス情報、当該転送フレームの転
送元を示す送り元アドレス情報、本体データが挿入され
る情報フィールド、情報フィールドのデータ化け等のエ
ラーを検出するためのエラー検出コード、情報フィール
ドの終りを示すエンドデリミタ情報、データ長やエラー
コードを示すフレームステータス情報及びネットワーク
の動作状態を示すハードウエアステータス情報から構成
され、これらがその順に接続された構成とされている。
属性データ部は本体データ部のデータ列を構成する各デ
ータの属性を示す2ビットのデータからなっており、
“10”はスタートデリミタに続くデータ列の先頭デー
タであることを示し、“00”は先頭データと最後尾の
データとの間に接続された継続データあることを示し、
“01”は該データ列の最後尾のデータであることを示
すようになっている。ここでは、属性データ“10”は
アクセスコントロール情報、属性データ“01”はフレ
ームステータス情報にそれぞれ付加されており、属性デ
ータ“00”はその他の情報に付加されている。Transfer data on the data bus 1 from another system is received by the communication controller 5. As shown in FIG. 2B, this transfer frame is composed of a reception data section and an attribute data section. The former is start delimiter information indicating the start of the frame, ADP (Automatic D).
ata Processing) access control information for the purpose of security that allows access only when it is legitimate, frame control information that is a transfer permission flag in the token passing method, destination address information indicating the transfer destination of the transfer frame, the transfer frame Address information indicating the transfer source of the data, an information field into which the main data is inserted, an error detection code for detecting an error such as garbled information field, end delimiter information indicating the end of the information field, data length and error It is composed of frame status information indicating a code and hardware status information indicating an operating state of the network, and these are connected in that order.
The attribute data part is composed of 2-bit data indicating the attribute of each data forming the data string of the main body data part,
"10" indicates that it is the head data of the data string following the start delimiter, and "00" indicates that it is continuous data connected between the head data and the tail data,
"01" indicates that it is the last data in the data string. Here, the attribute data “10” is added to the access control information, the attribute data “01” is added to the frame status information, and the attribute data “00” is added to other information.
【0032】通信コントローラ5は、属性検出部55a
〜55eとレジスタ51〜53とを備え、属性検出部5
5a〜55eが、上記構成の受信フレームにおける属性
データにより該受信フレームを構成するデータ列の種別
を検出し、その結果に従って各データを、対応する各レ
ジスタ51〜53に振分けて格納する。The communication controller 5 has an attribute detecting section 55a.
To 55e and registers 51 to 53, the attribute detection unit 5
5a to 55e detect the type of the data string forming the received frame based on the attribute data in the received frame having the above-described configuration, and according to the result, sort the data and store it in the corresponding registers 51 to 53.
【0033】データレジスタ51とステータスレジスタ
52と長さレジスタ53とが内蔵されている。通信コン
トローラ5は、この受信フレームにおけるスタートデリ
ミタ情報を確認すると、アクセスコントロールデータ、
フレームコントロールデータ、行き先アドレスデータ、
送り元アドレスデータ、情報フィールドデータをデータ
レジスタ51に格納する。次いで、通信コントローラ5
は、エンドデリミタを検出すると、フレームステータス
データをステータスレジスタ52に格納し、最後に、デ
ータレジスタ51に格納したデータの長さデータを長さ
レジスタ53に格納する。A data register 51, a status register 52 and a length register 53 are built in. When the communication controller 5 confirms the start delimiter information in this received frame, the access control data,
Frame control data, destination address data,
The source address data and the information field data are stored in the data register 51. Then, the communication controller 5
When detecting the end delimiter, stores the frame status data in the status register 52, and finally stores the length data of the data stored in the data register 51 in the length register 53.
【0034】DMA回路6は前述したように通信コント
ローラ5の受信フレーム入力に遅れて通信コントローラ
5の各レジスタ51〜53のデータをデータバス1を通
してメモリ4の単位格納領域に格納するもので、DMA
本体部7と入力デコード部8とから大略構成される。D
MA本体部7はDMA本来の役割を果たすもので、ベー
スレジスタ71とアドレスカウンタ72と加算器73,
75とアドレス切換え部74とを備えている。ベースレ
ジスタ71には通信コントローラ5の各レジスタ51〜
53に格納されたデータをメモリ4に格納するときの単
位記憶領域の先頭アドレスが格納される。加算器75は
ベースレジスタ71のアドレス値に“+3”を加えた値
をアドレスカウンタ72にプリセット値として供給す
る。アドレスカウンタ72は、このプリセット値をイン
クリメントする。加算器73は、後述する入力デコード
部8からの内部DMA要求信号DREQ2,−3,−
4,−5に応じてベースレジスタ71の出力値にそれぞ
れ“+1”、“+2”、“0”、“−256”を加算す
る。アドレス切換え部74はアドレスカウンタ72の出
力と加算器73の出力とを内部DMA要求信号DREQ
1〜−5に応じて選択的にアドレスバス2に送出する。As described above, the DMA circuit 6 stores the data of the registers 51 to 53 of the communication controller 5 in the unit storage area of the memory 4 via the data bus 1 after the reception frame input of the communication controller 5 is delayed.
The main body section 7 and the input decoding section 8 are generally configured. D
The MA main unit 7 plays the original role of the DMA, and includes a base register 71, an address counter 72, an adder 73,
75 and an address switching unit 74. The base register 71 includes the registers 51 to 51 of the communication controller 5.
The head address of the unit storage area when the data stored in 53 is stored in the memory 4 is stored. The adder 75 supplies a value obtained by adding “+3” to the address value of the base register 71 to the address counter 72 as a preset value. The address counter 72 increments this preset value. The adder 73 has internal DMA request signals DREQ2, -3,-from the input decoding unit 8 which will be described later.
In accordance with 4 and -5, "+1", "+2", "0", and "-256" are added to the output value of the base register 71, respectively. The address switching unit 74 outputs the output of the address counter 72 and the output of the adder 73 to the internal DMA request signal DREQ.
It is selectively sent to the address bus 2 in accordance with 1 to -5.
【0035】入力デコード部8は、通信コントローラ5
からのDMA要求信号DREQ0に応答して、DMA許
可信号DACK0を通信コントローラ5に供給する。通
信コントローラ5は、このDMA許可信号DACK0に
応答して、まず、データレジスタ51の内容を書込まれ
ている順に参照し、当該受信フレームの最初の属性デー
タ“10”により、データ0(アクセスコントロール)
が受信フレームの最初のデータであることを認識し、内
部DMA要求信号DREQ1を出力する。DMA本体部
7は、この内部DMA要求信号DREQ1に応答して書
込み制御信号WRを活性化状態とし、メモリ4を書込み
可能な状態に設定するとともに、アドレス切換え部74
をアドレスカウンタ72からのアドレス出力状態に設定
してDMA許可信号DACK1を入力デコード部8に渡
す。入力デコード部8は、このDMA許可信号DACK
1に応答してDMA許可信号DACK0を通信コントロ
ーラ5に渡す。続いて、入力デコード部8はアービタ5
4に向けてバス要求信号BREQ3を送信する。The input decoding unit 8 includes the communication controller 5
The DMA permission signal DACK0 is supplied to the communication controller 5 in response to the DMA request signal DREQ0. In response to the DMA permission signal DACK0, the communication controller 5 first refers to the contents of the data register 51 in the order in which they are written, and uses the first attribute data “10” of the received frame to indicate data 0 (access control). )
Recognizes that this is the first data of the received frame, and outputs the internal DMA request signal DREQ1. The DMA main body section 7 activates the write control signal WR in response to the internal DMA request signal DREQ1 to set the memory 4 in a writable state, and the address switching section 74.
Is set to the address output state from the address counter 72, and the DMA permission signal DACK1 is passed to the input decoding unit 8. The input decoding unit 8 receives the DMA permission signal DACK.
In response to 1, the DMA permission signal DACK0 is passed to the communication controller 5. Then, the input decoding unit 8 is the arbiter 5.
4 to send the bus request signal BREQ3.
【0036】入力デコード部8は、これらの情報を解読
し、受信している転送フレームが受信許可された正規の
データであるときに内部DMA要求信号DREQ1をD
MA本体部7に送信する。すると、DMA本体部7はア
ドレス切換え部74をアドレスカウンタ72からのアド
レスを送信するように設定すると共に、メモリ4への書
込み制御信号WRを活性化してデータ書込み準備状態を
整えた後、内部DMA許可信号DACK1を入力デコー
ド部8に供給する。入力デコード部8はDMA本体部7
からの内部DMA許可信号DACK1を受けると、DM
A許可信号DACK0を通信コントローラ5に送信する
こととなる。すると、DMA本体部7はアドレスカウン
タ72からのアドレス信号をアドレスバス2を介してメ
モリ4へ供給しつつ、通信コントローラ5のデータレジ
スタ51からデータを読出し、これをデータバス1を通
してメモリ4へ転送し書込むこととなる。The input decoding unit 8 decodes these pieces of information and outputs the internal DMA request signal DREQ1 when the received transfer frame is normal data for which reception is permitted.
Send to the MA body 7. Then, the DMA main body unit 7 sets the address switching unit 74 to transmit the address from the address counter 72, activates the write control signal WR to the memory 4 to prepare the data write preparation state, and then the internal DMA The permission signal DACK1 is supplied to the input decoding unit 8. The input decoding unit 8 is the DMA main unit 7
When the internal DMA permission signal DACK1 from the
The A permission signal DACK0 will be transmitted to the communication controller 5. Then, the DMA main body unit 7 supplies the address signal from the address counter 72 to the memory 4 via the address bus 2, reads the data from the data register 51 of the communication controller 5, and transfers this to the memory 4 via the data bus 1. It will be written.
【0037】入力デコード部8はデータレジスタ51の
データがメモリ4に全て格納されたことが確認される
と、続いてステータスレジスタ52にデータが格納され
ていることを確認すると、まず、内部DMA要求信号D
REQ2をDMA本体部7に送信する。When it is confirmed that all the data in the data register 51 is stored in the memory 4, the input decoding unit 8 subsequently confirms that the data is stored in the status register 52. Signal D
REQ2 is transmitted to the DMA main body section 7.
【0038】また、入力デコード部8は、ステータスレ
ジスタ52の内容をメモリ4に書込むべく内部DMA要
求信号DREQ2を出力する。DMA本体部7は、この
内部DMA要求信号DREQ2に応答し、書込み制御信
号WRは活性化状態を維持したまま、アドレス切換え部
74を加算器73側へ設定するとともに、この加算器7
3を“+1”の加算状態に設定することとなる。これに
より、DMA本体部7は加算器73の“+1”出力をア
ドレスバス2に送信し、ステータスレジスタ52の内容
をメモリ4に書込む。続いて、入力デコード部8は、長
さレジスタ53の内容をメモリ4に書込むべく内部DM
A要求信号DREQ3を出力する。DMA本体部7は、
この内部DMA要求信号DREQ3により書込み制御信
号WR及びアドレス切換え部74を現在の状態に維持
し、加算器73を“+2”の加算状態に設定する。これ
により、DMA本体部7はベースレジスタ71の値に
“+2”を加えたアドレスをアドレスバス2に送信し、
長さレジスタ53の内容をデータバス1を通してメモリ
4に書込むこととなる。最後に、入力デコード部8はベ
ースレジスタ71の書替えを行うべく、内部DMA要求
信号DREQ4を出力する。DMA本体部7は、この内
部DMA要求信号DREQ4に応答し、アドレス切換え
部74を加算器73の出力送信状態を維持したまま、読
出し制御信号RDを活性化してメモリ4を読出し状態
に、ベースレジスタ71を書込み許可状態に、加算器7
3を“+0”の加算状態にそれぞれ設定する。これによ
り、メモリ4の当該単位領域に格納されたベースアドレ
スデータがデータバス1を通してベースレジスタ71に
格納されることとなる。これにより、DMA本体部7
は、一つの受信フレームの転送処理が終了されることと
なり、その終了時に入力デコード部8が1フレームの転
送終了をEOP信号でCPU3に通知する。The input decoding unit 8 also outputs an internal DMA request signal DREQ2 to write the contents of the status register 52 in the memory 4. The DMA main body section 7 responds to the internal DMA request signal DREQ2, sets the address switching section 74 to the adder 73 side while maintaining the write control signal WR in the activated state, and at the same time, adds this adder 7
3 will be set to the addition state of "+1". As a result, the DMA main unit 7 transmits the “+1” output of the adder 73 to the address bus 2 and writes the contents of the status register 52 into the memory 4. Then, the input decoding unit 8 writes the contents of the length register 53 to the memory 4 by using the internal DM.
The A request signal DREQ3 is output. The DMA main body 7 is
The internal DMA request signal DREQ3 keeps the write control signal WR and the address switching unit 74 in the present state, and sets the adder 73 to the addition state of "+2". As a result, the DMA main body unit 7 transmits the address obtained by adding “+2” to the value of the base register 71 to the address bus 2,
The contents of the length register 53 will be written to the memory 4 through the data bus 1. Finally, the input decoding unit 8 outputs the internal DMA request signal DREQ4 in order to rewrite the base register 71. In response to the internal DMA request signal DREQ4, the DMA main body section 7 activates the read control signal RD while keeping the address switching section 74 in the output transmission state of the adder 73 to put the memory 4 into the read state and to the base register. 71 is set to the write enable state, and the adder 7
3 is set to the addition state of "+0". As a result, the base address data stored in the unit area of the memory 4 is stored in the base register 71 through the data bus 1. As a result, the DMA main unit 7
Means that the transfer processing of one received frame is ended, and at the end of the transfer processing, the input decoding unit 8 notifies the CPU 3 of the end of transfer of one frame by the EOP signal.
【0039】次に上述のように構成された通信システム
の動作について詳細に説明する。Next, the operation of the communication system configured as described above will be described in detail.
【0040】(1) 単位格納領域にデータが収まる場
合(図3(a)参照) 通信コントローラ5が受信フレームのスタートデリミタ
を検出すると、その識別を行い、受信フレームの入力が
在ることをDMA回路6の入力デコード部8に通知す
る。その後、通信コントローラ5はその先のアクセスコ
ントロール、フレームコントロール、行き先アドレス、
送り元アドレス、情報フィールドの各データをレジスタ
51に格納することとなる。(1) When the data fits in the unit storage area (see FIG. 3A) When the communication controller 5 detects the start delimiter of the received frame, the communication controller 5 identifies the start delimiter and DMA that the received frame is input. The input decoding unit 8 of the circuit 6 is notified. After that, the communication controller 5 performs access control, frame control, destination address,
Each data of the sender address and the information field will be stored in the register 51.
【0041】追って、入力デコード部8が上記通知に応
答してDMA要求信号DREQ1をDMA本体部7へ供
給する。Subsequently, the input decoding section 8 supplies the DMA request signal DREQ1 to the DMA main body section 7 in response to the notification.
【0042】DMA本体部7はアドレス切換え部74を
アドレスカウンタ72側へ設定するとともに書込み制御
信号WRを活性化して、メモリ4へのデータ転送準備状
態を整えた後、入力デコード部8にDACK1を与える
こととなる。すると、入力デコード部8がバス要求信号
BREQ3をアービタ54へ出力する。アービタ54は
通信コントローラ本体部50と交互にバス権を設定し、
通信コントローラ本体部50へのバス許可信号BACK
2とDMA回路6へのバス許可信号BACK3とを交互
に出力することとなる。そして、このバス許可信号BA
CK3が活性化されているとき、DMA本体部7がデー
タレジスタ51のデータをデータバス1を通して読込む
こととなる。このとき、図3(a)−1に示すように、
単位格納領域A1 が使用されるものとすると、その先頭
アドレスがベースレジスタ71に設定されていることと
なる。The DMA main body section 7 sets the address switching section 74 to the address counter 72 side and activates the write control signal WR to prepare for data transfer to the memory 4, and then sets DACK1 to the input decoding section 8. Will be given. Then, the input decoding unit 8 outputs the bus request signal BREQ3 to the arbiter 54. The arbiter 54 alternately sets the bus right with the communication controller body 50,
Bus permission signal BACK to the communication controller body 50
2 and the bus permission signal BACK3 to the DMA circuit 6 are alternately output. And this bus permission signal BA
When CK3 is activated, the DMA main unit 7 reads the data of the data register 51 through the data bus 1. At this time, as shown in FIG.
Assuming that the unit storage area A1 is used, its head address is set in the base register 71.
【0043】以降は通信コントローラ5とDMA回路6
とが並行して動作することとなり、このとき、アービタ
54が通信コントローラ5及びDMA本体部6に交互に
バス使用権を設定することとなる。通信コントローラ5
及びDMA回路6の各動作は次の通りである。Thereafter, the communication controller 5 and the DMA circuit 6
And 5 operate in parallel, and at this time, the arbiter 54 alternately sets the bus use right to the communication controller 5 and the DMA main body 6. Communication controller 5
The operations of the DMA circuit 6 and the DMA circuit 6 are as follows.
【0044】通信コントローラ5は、データバス1上の
受信データ列を受信した順にデータレジスタ51、ステ
ータスレジスタ52、長さレジスタ53に格納する。す
なわち、スタートデリミタを検出したときには、前述し
た通り、その後は入力デコード部8が属性データ“0
0”を認識している間、継続してデータレジスタ51へ
の取込みを行うこととなる。並行して、DMA回路6も
データレジスタ51のデータをメモリ4の単位格納領域
A1 への転送を続けることとなる。The communication controller 5 stores the received data string on the data bus 1 in the data register 51, the status register 52, and the length register 53 in the order of reception. That is, when the start delimiter is detected, as described above, the input decoding unit 8 thereafter causes the attribute data “0”.
While recognizing "0", the data is continuously fetched to the data register 51. In parallel, the DMA circuit 6 also continuously transfers the data of the data register 51 to the unit storage area A1 of the memory 4. It will be.
【0045】また、DMA回路6の入力デコード部8
は、属性データ“01”を認識すると内部DMA要求信
号DREQ2をDMA本体部7へ出力する。すると、D
MA本体部7が書込み制御信号WRを活性状態に維持し
たまま、アドレス切換え部74を加算器73側へ設定
し、通信コントローラ5のステータスレジスタ52のデ
ータをメモリ4の単位格納領域A1 におけるステータス
格納部に格納する。DMA本体部7は、その終了を入力
デコード部8へ通知する。入力デコーダ部8はその終了
通知に応答して内部DMA要求信号DREQ3を出力す
る。長さレジスタ53のデータをメモリ4における単位
格納領域A1 における所定領域に格納する。その終了
時、DMA本体部7は入力デコード部8へ終了通知を発
生し、入力デコード部8はその終了通知に応答して内部
DMA要求信号DREQ4を出力する。DMA本体部7
は、その内部DMA要求信号DREQ4に応答してアド
レス切換え部74は、そのままで、加算器73を“+
0”加算状態とするとともに、読出し制御信号RDを活
性化してメモリ4を読出し許可状態とする。これによ
り、当該単位格納領域A1 における次領域アドレス格納
部に予め保存されているベースアドレスデータがベース
レジスタ71に格納され、図3(a)−2に示すように
単位格納領域A2 が準備されて次のフレームを受付け可
能な状態となる。The input decoding section 8 of the DMA circuit 6
When recognizing the attribute data “01”, outputs an internal DMA request signal DREQ2 to the DMA main body section 7. Then D
While the MA main body section 7 maintains the write control signal WR in the active state, the address switching section 74 is set to the adder 73 side and the data of the status register 52 of the communication controller 5 is stored in the unit storage area A1 of the memory 4. Store in the department. The DMA body unit 7 notifies the input decoding unit 8 of the end. The input decoder unit 8 outputs the internal DMA request signal DREQ3 in response to the end notification. The data of the length register 53 is stored in a predetermined area in the unit storage area A1 of the memory 4. At the end, the DMA main body section 7 issues an end notification to the input decoding section 8, and the input decoding section 8 outputs the internal DMA request signal DREQ4 in response to the end notification. DMA body 7
Responds to the internal DMA request signal DREQ4, the address switching unit 74 keeps the adder 73 "+" as it is.
In addition to the 0 "addition state, the read control signal RD is activated to bring the memory 4 into the read enable state. This causes the base address data stored in advance in the next area address storage section in the unit storage area A1 to become the base address data. It is stored in the register 71, and the unit storage area A2 is prepared as shown in FIG. 3 (a) -2 so that the next frame can be received.
【0046】(2) 1個の単位格納領域にデータが収
まらない(複数の単位格納領域を接続して使用する)場
合 DMA本体部7は、その先のアクセスコントロール、フ
レームコントロール、行き先アドレス、送り元アドレ
ス、情報フィールドのデータが単位格納領域に収まらな
い場合には後続するデータの格納先であるアドレスをベ
ースレジスタ71に格納することとなる。(2) When data does not fit in one unit storage area (when a plurality of unit storage areas are connected and used) The DMA main body section 7 has access control, frame control, destination address, sending When the original address and the data of the information field cannot fit in the unit storage area, the address where the subsequent data is stored is stored in the base register 71.
【0047】すなわち、図3(b)−1に示すように、
単位格納領域B1 が最初に使用され、そのデータ格納部
が一杯になったとすると、DMA本体部7は、その単位
格納領域B1の次領域アドレス格納部に格納されている
単位格納領域B2 の先頭アドレスがベースレジスタ71
に格納される。これにより、単位格納領域B1 に続いて
単位格納領域B2 が使用されるようになり、単位格納領
域B1 に格納されたデータに続く本体データが次の単位
格納領域B2 に格納されることとなる。この単位格納領
域B2 へのデータ格納が終了すると、(1)の場合と同
様に、次のフレーム受信のために、単位格納領域B2 の
次領域アドレス格納部に格納されているデータをベース
アドレスレジスタ71に設定し、当該受信フレームの転
送を終了することとなる。That is, as shown in FIG.
If the unit storage area B1 is used first and its data storage section is full, the DMA main body section 7 determines that the start address of the unit storage area B2 stored in the next area address storage section of the unit storage area B1. Is the base register 71
Stored in. As a result, the unit storage area B2 is used after the unit storage area B1, and the body data following the data stored in the unit storage area B1 is stored in the next unit storage area B2. When the storage of data in the unit storage area B2 is completed, the data stored in the next area address storage unit of the unit storage area B2 is received by the base address register for receiving the next frame as in the case of (1). The setting is set to 71, and the transfer of the received frame is ended.
【0048】CPU1は、このように格納されたデータ
を読出す場合、まず、単位格納領域B1 の本体データ格
納部のデータを読み終えたとき、当該単位格納領域B1
の長さ格納部の長さデータを参照し、その長さが最大長
である256バイトであるとき、単位格納領域B1 の次
領域アドレス格納部を参照し、単位格納領域B2 のデー
タを読出すこととなる。つまり、CPU1は、相前後す
る単位格納領域の前の単位格納領域の長さデータにより
同一フレームの続きのデータが存在することを知り、同
単位格納領域の次領域アドレスデータにより後の単位格
納領域とのリンクを図ることができることとなる。When reading the data stored in this way, the CPU 1 first reads the data in the main body data storage section of the unit storage area B1 and then reads the unit storage area B1.
When the length is 256 bytes, which is the maximum length, the data in the unit storage area B2 is read by referring to the next area address storage in the unit storage area B1. It will be. That is, the CPU 1 knows that there is continuous data of the same frame based on the length data of the unit storage area before the succeeding unit storage area, and the subsequent unit storage area based on the next area address data of the same unit storage area. It will be possible to link with.
【0049】(3) エラーが生じた場合 入力デコード部8はDMA転送エラー検出機能をも有し
ており、通信コントローラ5のステータスレジスタ52
に格納されたエラー検出コードをデコードして、エラー
の検出があった場合には内部DMA要求信号DREQ5
をDMA本体部7に与える。すると、DMA本体部7は
読出し制御信号RDを活性化状態とし、加算器73を
“−256”加算状態に設定する。すると、現在使用さ
れていた単位格納領域の先頭アドレスがベースレジスタ
に再設定されることとなる。これにより、同一フレーム
の再受信が可能となる。(3) When an error occurs The input decoding unit 8 also has a DMA transfer error detection function, and the status register 52 of the communication controller 5 is included.
The error detection code stored in is decoded, and if an error is detected, the internal DMA request signal DREQ5
To the DMA body 7. Then, the DMA main body section 7 activates the read control signal RD and sets the adder 73 to the "-256" addition state. Then, the start address of the currently used unit storage area is reset in the base register. As a result, the same frame can be received again.
【0050】このように本実施例によれば、転送フレー
ムのデータ列へその属性を示す情報を付加し、この属性
情報によりデータの開始位置及び終了位置を表示すると
ともに、ステータス情報としてエラー検出コード及び長
さ情報を付加し、これをDMA回路6の入力デコード部
8に供給し、この入力デコード部8がそれらの情報検出
に応答してDMA本体部7へ内部DMA要求信号DRE
Q1〜5を順次出力し、これらの内部DMA要求信号D
REQ1〜5に応じてメモリ4の単位領域毎に割当てら
れた所定の領域をアドレス指定し、通信コントローラ5
の各レジスタ51〜53の内容をメモリ4に格納するよ
うにしたため、通信フレームの受信に関してCPUの処
理が介在せず、通信コントローラ5及びDMA回路6は
通信フレームを連続して受信することが可能になり、L
ANは勿論のこと、光イーサ(100Mbps)、AT
M(156Mbps)等の高速通信方式へ対応可能とな
る。As described above, according to this embodiment, the information indicating the attribute is added to the data sequence of the transfer frame, the start position and the end position of the data are displayed by this attribute information, and the error detection code is used as the status information. And the length information are added and supplied to the input decoding unit 8 of the DMA circuit 6, and the input decoding unit 8 sends the internal DMA request signal DRE to the DMA main unit 7 in response to the detection of the information.
Q1 to Q5 are sequentially output, and these internal DMA request signals D
A predetermined area allocated for each unit area of the memory 4 is addressed according to the REQ 1 to 5, and the communication controller 5
Since the contents of each of the registers 51 to 53 are stored in the memory 4, the communication controller 5 and the DMA circuit 6 can continuously receive the communication frames without the intervention of the CPU processing for receiving the communication frames. And L
Not to mention AN, optical Ethernet (100 Mbps), AT
It becomes possible to support high-speed communication methods such as M (156 Mbps).
【0051】[0051]
【発明の効果】本発明によれば、受信フレームのデータ
列を構成する各データに付加された属性データに基づい
て各データの種類を識別するようになっているので、フ
ラグと一致するデータであっても前述したCPUによる
コード変換処理を不要とし、その分、通信速度の向上を
図ることができることとなる。According to the present invention, the type of each data is identified based on the attribute data added to each data forming the data sequence of the received frame. Even if there is, the above-mentioned code conversion processing by the CPU is unnecessary, and the communication speed can be improved accordingly.
【0052】また、本発明によれば、その属性データに
基づいて、ステータスやエラー情報も識別し、バッファ
メモリの単位格納領域に設けられた本体データとは別の
専用領域に格納するようになっているので、CPUによ
るそのI/O読込み処理が不要となり、この点からも通
信速度の向上を図ることができることとなる。Further, according to the present invention, the status and error information are also identified based on the attribute data and stored in a dedicated area different from the main body data provided in the unit storage area of the buffer memory. Therefore, the I / O reading process by the CPU is unnecessary, and the communication speed can be improved also from this point.
【0053】さらに、DMA本体部が、1つの受信フレ
ームについての転送の終了時、現転送先単位格納領域の
次領域アドレス格納部に格納されたアドレスデータをベ
ースアドレスレジスタに格納するようになっているた
め、1つの受信フレームについての転送の終了時、バッ
ファメモリにおける次の受信フレームの転送において使
用する単位格納領域の先頭アドレスをCPUの介在なし
にベースアドレスレジスタに設定可能となる。Further, when the transfer of one received frame is completed, the DMA main body section stores the address data stored in the next area address storage section of the current transfer destination unit storage area in the base address register. Therefore, at the end of the transfer of one received frame, the start address of the unit storage area used in the transfer of the next received frame in the buffer memory can be set in the base address register without CPU intervention.
【0054】更に、本発明によれば、受信フレームを構
成するデータ列のエラーの発生を検出し、その検出時に
バッファメモリにおける現転送先単位格納領域の先頭ア
ドレスがベースアドレスレジスタに再設定するようにな
っているため、エラーの発生時、バッファメモリにおけ
るそのエラーの発生したフレームの転送において使用し
た単位格納領域の先頭アドレスをCPUの介在なしにベ
ースアドレスレジスタに再設定することができ、この点
からも通信速度の向上を図ることができることとなる。Further, according to the present invention, the occurrence of an error in the data sequence forming the received frame is detected, and at the time of detection, the start address of the current transfer destination unit storage area in the buffer memory is reset in the base address register. Therefore, when an error occurs, the start address of the unit storage area used in the transfer of the frame in which the error occurred in the buffer memory can be reset in the base address register without the intervention of the CPU. Therefore, the communication speed can be improved.
【図1】本発明の一実施例に係るDMA装置の構成を示
すブロック図。FIG. 1 is a block diagram showing the configuration of a DMA device according to an embodiment of the present invention.
【図2】図1に示すDMA装置で取扱うバッファメモリ
のデータ構造説明図(a)、転送フレームのデータ構造
説明図(b)、及び通信コントローラとDMA回路の動
作タイミング説明図(c)。2A and 2B are a data structure explanatory diagram of a buffer memory handled by the DMA device shown in FIG. 1, a data structure explanatory diagram of a transfer frame, and an operation timing explanatory diagram of a communication controller and a DMA circuit.
【図3】図1に示すDMA装置による受信データの転送
動作説明図。3 is an explanatory diagram of a transfer operation of received data by the DMA device shown in FIG.
【図4】従来のDMA装置の構成を示すブロック図。FIG. 4 is a block diagram showing a configuration of a conventional DMA device.
【図5】図4に示すDMA装置における通信コントロー
ラとDMA回路の動作タイミング説明図。5 is an operation timing explanatory diagram of a communication controller and a DMA circuit in the DMA device shown in FIG.
1 アドレスバス 2 データバス 3 CPU 4 メモリ 5 通信コントローラ 6 DMA回路 7 DMA本体部 71 ベースレジスタ 72 アドレスカウンタ 73,75 加算器 74 アドレス切換え部 8 入力デコード部 1 address bus 2 data bus 3 CPU 4 memory 5 communication controller 6 DMA circuit 7 DMA main body 71 base register 72 address counter 73, 75 adder 74 address switching unit 8 input decoding unit
Claims (7)
る所定容量ずつ設けられた単位格納領域のデータ構造に
対応して転送先アドレスを発生するDMA本体部と、 前記受信フレームのデータ列を構成する各データに付加
された属性データにより該各データの種類を識別し、そ
の識別結果に基づいて、前記各データが前記単位格納領
域の所定領域に格納され、かつ、その終了後、前記現転
送先単位格納領域の次領域アドレス格納部に格納された
アドレスデータがベースアドレスレジスタに書込まれる
ように前記DMA本体部へのアクセス制御信号を発生す
るデコード部とを備えたことを特徴とするDMA装置。1. A DMA main body for generating a transfer destination address corresponding to a data structure of a unit storage area provided in a predetermined capacity in a received frame storage buffer memory, and each data forming a data string of the received frame. The type of each data is identified by the attribute data added to, and each data is stored in a predetermined area of the unit storage area based on the identification result, and after the end, the current transfer destination unit storage A DMA device comprising: a decoding unit for generating an access control signal to the DMA main unit so that the address data stored in the next region address storage unit of the region is written in the base address register.
る現転送先単位格納領域の先頭アドレス格納用ベースア
ドレスレジスタを備え、前記現転送先単位格納領域の次
領域アドレス格納部に格納されたアドレスデータを前記
ベースアドレスレジスタに格納する機能を有することを
特徴とする請求項1記載のDMA装置。2. The DMA main body section includes a base address register for storing a start address of a current transfer destination unit storage area which is a source of a transfer destination address, and is stored in a next area address storage section of the current transfer destination unit storage area. The DMA device according to claim 1, having a function of storing the address data stored in the base address register.
値に所定の値を加算することにより現転送先単位格納領
域の各領域に対応したアドレス値として出力する加算器
部とを備えたことを特徴とする請求項1及び2のうちい
ずれか1項記載のDMA装置。3. The DMA main body unit adds an address value of a base register unit according to an access control signal by a predetermined value to output an address value corresponding to each area of the current transfer destination unit storage area, and an adder section. The DMA device according to any one of claims 1 and 2, further comprising:
ルドのデータ列を格納する第1の領域に対するアドレス
値を出力する第1の加算器と、 当該単位格納領域における前記受信フレームの第2のフ
ィールドのデータ列を格納する第2の領域に対するアド
レス値を出力する第2の加算器と、 前記第1、第2の加算器の出力をメモリアクセス制御信
号に従って切換え出力するアドレス切換え部と、 前記アドレス切換え部の出力に対応してバッファメモリ
に対する書込み/読出し制御信号を出力する書込み/読
出し制御信号発生部とを備えたことを特徴とする請求項
3記載のDMA装置。4. The first adder for outputting an address value for a first area for storing a data string of a first field of a received frame in the unit storage area, and the adder section for storing in the unit storage area. A second adder for outputting an address value for a second area for storing a data string of the second field of the received frame; and outputs for switching the outputs of the first and second adders according to a memory access control signal. 4. The DMA device according to claim 3, further comprising: an address switching unit for controlling the address, and a write / read control signal generating unit for outputting a write / read control signal for the buffer memory in response to the output of the address switching unit. .
を識別したとき、当該単位格納領域における本体データ
格納領域のアドレス出力指令及び書込み制御信号出力指
令となる第2メモリアクセス制御信号を出力する第1制
御信号発生手段と、 前記受信フレームのステータスデータの位置を示す第2
属性データを識別したとき、現転送先単位格納領域にお
けるステータス格納領域及び長さ格納領域のアドレス出
力指令及び書込み制御信号出力指令となる第2メモリア
クセス制御信号を出力する第2制御信号発生手段と、 受信フレームの次の受信フレームをバッファメモリに格
納するときに使用される現転送先単位格納領域の次領域
アドレス読出し制御信号出力指令及び書込み制御信号出
力指令となる第3メモリアクセス制御信号を出力する第
3制御信号発生手段とを備えたことを特徴とする請求項
4記載のDMA装置。5. The decoding unit, when the first attribute data indicating the position of the body data of the received frame is identified, becomes the address output command and the write control signal output command of the body data storage area in the unit storage area. First control signal generating means for outputting a memory access control signal, and second for indicating a position of status data of the received frame
Second control signal generating means for outputting a second memory access control signal which becomes an address output command and a write control signal output command of the status storage area and the length storage area in the current transfer destination unit storage area when the attribute data is identified. , Outputs a third memory access control signal that is a next area address read control signal output command and a write control signal output command of the current transfer destination unit storage area used when storing the next reception frame of the reception frame in the buffer memory 5. The DMA device according to claim 4, further comprising a third control signal generating means for performing the above.
し、その検出時にバッファメモリにおける現転送先単位
格納領域の先頭アドレスがベースアドレスレジスタに再
設定されるように現転送先単位格納領域の前の単位格納
領域における次領域アドレス読出し制御信号出力指令及
び書込み制御信号出力指令となる第4制御信号発生手段
とを備えたことを特徴とする請求項5記載のDMA装
置。6. The decoding unit detects the occurrence of an error in a data string forming a received frame, and at the time of detection, the start address of the current transfer destination unit storage area in the buffer memory is reset in the base address register. 6. The DMA according to claim 5, further comprising: fourth control signal generating means for providing a next area address read control signal output command and a write control signal output command in the unit storage area before the current transfer destination unit storage area. apparatus.
し、該単位格納領域がデータ種類毎の書込み領域と前記
単位格納領域の直後の単位格納領域の先頭アドレスが予
め格納された読出し領域とを有し、受信フレームのデー
タ列が格納されるバッファメモリと、 前記受信フレームのデータ列を構成する各データの種類
を示す属性データに基づいて前記データ列を構成する各
データをその種類毎に設けられたデータレジスタに保存
する通信コントローラと、 ベースレジスタ部の記憶値に所定の値を加算することに
より単位格納領域の各領域をアドレス指定するアドレス
発生手段を備え、前記データレジスタに格納されたデー
タの長さに応じて前記1または2以上の単位格納領域が
使用されるように前記ベースアドレスレジスタを更新制
御するDMAコントローラとを備えたことを特徴とする
通信システム。7. A read area in which a unit storage area provided with a predetermined capacity is provided, and the unit storage area stores a writing area for each data type and a head address of the unit storage area immediately after the unit storage area in advance. And a buffer memory for storing the data sequence of the received frame, and each data constituting the data sequence based on attribute data indicating the type of each data constituting the data sequence of the received frame A data controller provided in the data register, and an address generating means for addressing each area of the unit storage area by adding a predetermined value to the stored value of the base register section. The base address register is updated and controlled so that the one or more unit storage areas are used according to the length of the data. Communication system is characterized in that a MA controller.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7071494A JPH07281993A (en) | 1994-04-08 | 1994-04-08 | DMA device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7071494A JPH07281993A (en) | 1994-04-08 | 1994-04-08 | DMA device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH07281993A true JPH07281993A (en) | 1995-10-27 |
Family
ID=13439525
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP7071494A Pending JPH07281993A (en) | 1994-04-08 | 1994-04-08 | DMA device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH07281993A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011018358A (en) * | 2010-09-13 | 2011-01-27 | Tao Logic Systems Llc | Link bridge |
-
1994
- 1994-04-08 JP JP7071494A patent/JPH07281993A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011018358A (en) * | 2010-09-13 | 2011-01-27 | Tao Logic Systems Llc | Link bridge |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR960012686B1 (en) | Station for communication system and communication method | |
| US6954806B2 (en) | Data transfer apparatus and method | |
| US4704717A (en) | Receive message processor for a solicited message packet transfer system | |
| CN111221759B (en) | Data processing system and method based on DMA | |
| WO2000025215A1 (en) | Data transfer controller and electronic device | |
| CN117807011A (en) | Information processing methods, devices, equipment and storage media | |
| JP4022442B2 (en) | Control method of fieldbus interface board | |
| US6038235A (en) | Fiber channel automatic arbitration and communication control | |
| CN116016349A (en) | Message scheduling method, device and system | |
| CN110995507A (en) | Network acceleration controller and method | |
| US6700887B1 (en) | Packet transfer apparatus which generates access reject command during a DMA transfer | |
| JP2003143251A (en) | Packet data display system | |
| JP3753622B2 (en) | Packet transceiver | |
| JP2835487B2 (en) | Printer buffer | |
| JPH0661074B2 (en) | Access controller, method for minimizing bus idle time, DMA controller, and DMA data transfer method | |
| US6865152B2 (en) | Method and apparatus for transmitting packets onto a network | |
| CN118827275A (en) | A message sending method, device, medium and equipment | |
| CN121585749A (en) | A message processing method, apparatus, electronic device, and storage medium | |
| JPH11103330A (en) | Infrared data transmission method and device | |
| JPH06334705A (en) | Communication controller | |
| CN117370233A (en) | HDMI controller UPI storage circuit and UPI data storage method | |
| CN117609134A (en) | SWIM protocol analysis method and system | |
| JPS6294042A (en) | Communication control equipment | |
| CN116346811A (en) | Data transfer method and device | |
| JP2634631B2 (en) | Transmission control method |