JPH03260749A - Dma controller - Google Patents
Dma controllerInfo
- Publication number
- JPH03260749A JPH03260749A JP5883190A JP5883190A JPH03260749A JP H03260749 A JPH03260749 A JP H03260749A JP 5883190 A JP5883190 A JP 5883190A JP 5883190 A JP5883190 A JP 5883190A JP H03260749 A JPH03260749 A JP H03260749A
- Authority
- JP
- Japan
- Prior art keywords
- output
- state
- decoder
- read
- write
- 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.)
- Granted
Links
Landscapes
- Bus Control (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、DMAコントローラに関し、特にその制御回
路におけるデコーダの回路規模の縮小と動作時間の短縮
に関するものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a DMA controller, and particularly to reducing the circuit scale and operating time of a decoder in a control circuit thereof.
DMAコントローラの転送方式の一つにデユアルアドレ
スモードがある。この方式では、リード動作、つまり転
送元(以下ソースと呼ぶ)デバイスのアドレスを出力し
、上記ソースデバイスからDMAコントローラ内に備え
られたデータ保持レジスタ(以下テンポラリレジスタと
いう)にデータを転送するリードサイクルと、次のライ
ト動作。One of the transfer methods of the DMA controller is dual address mode. In this method, a read operation, that is, a read cycle in which the address of a transfer source (hereinafter referred to as source) device is output and data is transferred from the source device to a data holding register (hereinafter referred to as a temporary register) provided in the DMA controller. and the following light operation.
つまり転送先(ディストネーションという)デバイスの
アドレスを出力し、上記テンポラリレジスタからディス
トネーションデバイスにデータを転送するライトサイク
ルとを1つの転送サイクルとして、ソースデバイスから
ディストネーションデバイスへデータを転送する。In other words, data is transferred from the source device to the destination device, with a write cycle in which the address of the destination device (referred to as destination) is output and data is transferred from the temporary register to the destination device as one transfer cycle.
第2図を用いて32ビツトバスにおけるDMA転送につ
いて説明する。DMA transfer on a 32-bit bus will be explained using FIG.
ソースアドレスの値がS+1、ディストネーションアド
レスの値がD+1.1回の転送サイクルで4バイトを転
送する場合について述べる。S。A case will be described in which the source address value is S+1 and the destination address value is D+1.4 bytes are transferred in one transfer cycle. S.
Dは4の倍数とする。ここで、ソースアドレスがS+1
なので、1度に4バイト全てをリードできない、このた
めリードサイクルは2回のバスアクセスで行う、1回目
は3バイト、2回目に1バイトの2回のバスアクセスで
4バイトのリードを行う。同様にライトアクセス時もデ
ィストネーションアドレスがD+1なので1回目3バイ
ト、2回目1バイトのライト動作を行う。D is a multiple of 4. Here, the source address is S+1
Therefore, it is not possible to read all 4 bytes at once. Therefore, the read cycle is performed with two bus accesses. The first time is 3 bytes, and the second time is 1 byte, and 4 bytes are read by two bus accesses. Similarly, during write access, since the destination address is D+1, the first write operation is 3 bytes, and the second write operation is 1 byte.
転送サイクルは転送要求信号線205がアサートされる
ことにより開始される。A transfer cycle is started when transfer request signal line 205 is asserted.
転送要求が動作定義レジスタ202の内容とテンポラリ
カウンタ203の出力値と共に状態発生回路201に入
力されると状態発生回路201はリード状態になりR/
W信号線219によりリード状態を出力するとともに、
アドレス制御線207によりアドレス制御部200にソ
ースアドレスS+1の出力要求と2回目のソースアドレ
スを生成するためのソースアドレスのカウントア・ノブ
の要求を出力する。1回目のリードは3バイトなのでこ
こでのカウントアツプ値は3である。このときテンポラ
リカウンタ203にもテンポラリカウンタ制御線208
によりカウントアツプの要求を出す。デコーダ204は
転送の開始と共に動作定義レジスタ202の出力、状態
発生回路201のリード状態及びテンポラリカウンタ2
03の出力値0を取り込み、1回目の転送が3バイトで
あることをデコードし、アドレス制御部200およびテ
ンポラリカウンタ203に対するカウントアンプ値3を
制御信号として出力する。When a transfer request is input to the state generation circuit 201 together with the contents of the operation definition register 202 and the output value of the temporary counter 203, the state generation circuit 201 enters the read state and R/
While outputting the read status through the W signal line 219,
An address control line 207 outputs to the address control unit 200 a request for outputting the source address S+1 and a request for a source address count-a-knob for generating the second source address. Since the first read is 3 bytes, the count up value here is 3. At this time, the temporary counter 203 also has a temporary counter control line 208.
A count-up request is issued. At the start of transfer, the decoder 204 detects the output of the operation definition register 202, the read state of the state generation circuit 201, and the temporary counter 2.
It takes in the output value 0 of 03, decodes that the first transfer is 3 bytes, and outputs the count amplifier value 3 to the address control unit 200 and temporary counter 203 as a control signal.
アドレス制御部200は状態発生回路201とデコーダ
204からの制御信号の入力により、ソースアドレスの
アドレスバス212への出力とカウンタ動作を開始する
。カウント動作後のソースアドレスのイ直はS+4にな
っている。テンポラリカウンタ203も同様に状態発生
回路201とデコーダ204からの制御信号の入力によ
り、カウント値のカウント動作を開始する。カウント動
作後のテンポラリカウンタの出力値は3になっている。The address control unit 200 receives control signals from the state generation circuit 201 and the decoder 204, and starts outputting a source address to the address bus 212 and starting a counter operation. After the count operation, the source address value is S+4. Similarly, the temporary counter 203 starts counting the count value by receiving control signals from the state generating circuit 201 and the decoder 204. The output value of the temporary counter after the counting operation is 3.
1回目の転送が終了すると、状態発生回路201は入力
である転送要求信号205、動作定義レジスタ202の
内容、テンポラリカウンタ203の値を再び取り込み、
次の状態を決定する。ここでの場合、テンポラリカウン
タ203の値が4に達していないので、次の状態はまだ
リードのままであり、2回目のリード動作を開始する。When the first transfer is completed, the state generation circuit 201 retakes the input transfer request signal 205, the contents of the operation definition register 202, and the value of the temporary counter 203, and
Determine the next state. In this case, since the value of the temporary counter 203 has not reached 4, the next state is still read, and the second read operation is started.
従って、状態発生回路201は1回目のリード動作と同
様にアドレス制御部200にソースアドレスS+4の出
力要求と次の転送サイクルで用いるソースアドレスを生
成するためのソースアドレスカウントアツプの要求を出
す、このときテンポラリカウンタ203にもカウントア
ツプ要求を出す。Therefore, similarly to the first read operation, the state generation circuit 201 issues a request to the address control unit 200 to output the source address S+4 and a request to count up the source address to generate the source address to be used in the next transfer cycle. At this time, a count up request is also issued to the temporary counter 203.
デコーダ204は動作定義レジスタ202とテンポラリ
カウンタ203の出力値3とを取り込み、2回目の転送
が1バイトであることをデコードし、アドレス制御部2
00およびテンポラリカウンタ203に対するカウント
値1を制御信号として出力する。アドレス制御部200
は状態発生回路201とデコーダ204からの制御信号
の入力により、ソースアドレスS+4のアドレスバスへ
の出力とカウンタ動作を開始する。カウント動作後のソ
ースアドレス値はS+5となっている。テンポラリカウ
ンタは状態発生回路201とデコーダ204からの制御
信号の入力によりテンポラリカウンタ203の値のカウ
ント動作を開始する。カウント動作後のカウント値は4
になっている。The decoder 204 takes in the operation definition register 202 and the output value 3 of the temporary counter 203, decodes that the second transfer is 1 byte, and
00 and the count value 1 for the temporary counter 203 are output as control signals. Address control section 200
In response to input of control signals from the state generating circuit 201 and the decoder 204, the source address S+4 is output to the address bus and the counter operation is started. The source address value after the counting operation is S+5. The temporary counter starts counting the value of the temporary counter 203 upon input of control signals from the state generating circuit 201 and the decoder 204. The count value after counting operation is 4
It has become.
2回目の転送が終了すると、状態発生回路201は転送
要求信号205、動作定義レジスタ202の内容、テン
ポラリカウンタ203の値を取り込み、次の状態を決定
する。今回はテンポラリカウント値が4になっているの
で、次はライト状態になる。When the second transfer is completed, the state generation circuit 201 takes in the transfer request signal 205, the contents of the operation definition register 202, and the value of the temporary counter 203, and determines the next state. This time, the temporary count value is 4, so next time it will be in the write state.
ライト状態になると、状態発生回路201はアドレス制
御部200にディストネーションアドレスD+1の出力
要求と2回目の転送で用いるディストネーションアドレ
スを生成するためのディストネーションアドレスのカウ
ントアツプ要求とを出す。このときテンポラリカウンタ
203にはカウントダウン要求を出す。またデコーダ2
04は動作定義レジスタ202の出力、状態発生回路2
01のライト状態及びテンポラリカウンタ203の出力
値4とを取り込み、1回目のライト転送が3バイトであ
ることをデコードし、アドレス制御部200およびテン
ポラリカウンタ203に対するカウント値3を制御信号
として出力する。When the write state is entered, the state generation circuit 201 issues a request to the address control unit 200 to output the destination address D+1 and a request to count up the destination address to generate the destination address used in the second transfer. At this time, a countdown request is issued to the temporary counter 203. Also decoder 2
04 is the output of the operation definition register 202, state generation circuit 2
It takes in the write state of 01 and the output value 4 of the temporary counter 203, decodes that the first write transfer is 3 bytes, and outputs the count value 3 to the address control unit 200 and the temporary counter 203 as a control signal.
アドレス制御部200は制御信号の入力によりディスト
ネーションアドレスのアドレスバスへの出力とカウンタ
動作を開始し、2回目のディストネーションアドレスD
+4を生成する。このときテンポラリカウンタ203も
制御信号の入力によりカウント動作を行い、テンポラリ
カウント値は1になる。1回目の転送が終了すると、状
態発生回路201は入力を取り込み、テンポラリカウン
ト値が1であるので2回目のライト動作を開始し、アド
レス制御部200にはディストネーションアドレスの出
力とカウントアツプ要求を出し、テンポラリカウンタ2
03にはカウントダウン要求を出力する。The address control unit 200 starts outputting the destination address to the address bus and starts the counter operation in response to the input of the control signal.
Generates +4. At this time, the temporary counter 203 also performs a counting operation by inputting the control signal, and the temporary count value becomes 1. When the first transfer is completed, the state generation circuit 201 takes in the input, and since the temporary count value is 1, it starts the second write operation, and sends the address control unit 200 an output of the destination address and a count up request. out, temporary counter 2
At 03, a countdown request is output.
デコーダ204はテンポラリカウント値が1なので2回
目のライトは1バイトであることをデコードし、制御信
号としてカウント値1を出力する。Since the temporary count value is 1, the decoder 204 decodes that the second write is 1 byte, and outputs the count value 1 as a control signal.
アドレス制御部200は1回目と同様にディストネーシ
ョンアドレスの出力とカウントアツプを行い、テンポラ
リカウンタ203もカウントダウンを実行し、テンポラ
リカウント値は0となる。2回目のライト動作が終了す
ると、状態発生回路201はテンポラリカウント値がO
なので転送サイクルが終了と判断し、次の転送要求がア
サートされるまでアイドル状態となる。The address control unit 200 outputs the destination address and counts up as in the first time, and the temporary counter 203 also counts down, and the temporary count value becomes 0. When the second write operation is completed, the state generation circuit 201 changes the temporary count value to O.
Therefore, it determines that the transfer cycle has ended and remains in an idle state until the next transfer request is asserted.
以上が32ビットDMAコントローラの状態制御とアド
レス制御の概要である。The above is an overview of the state control and address control of the 32-bit DMA controller.
32ビットDMAコントローラの動作としては上記の転
送側以外に、転送するデータのサイズが1バイトから8
バイトまでいろいろあり、またアドレスのカウント動作
も上位方向、下位方向、固定などがあり、それらを組み
合わせると転送は多種多様になる。転送動作が複雑にな
るとデコーダでデコードする転送制御信号パターンが増
大する。In addition to the transfer side described above, the 32-bit DMA controller operates when the size of data to be transferred is from 1 byte to 8 bytes.
There are various types of bytes, and there are address counting operations such as upper direction, lower direction, fixed direction, etc., and when these are combined, a wide variety of transfers can be performed. As the transfer operation becomes more complex, the number of transfer control signal patterns to be decoded by the decoder increases.
入カバターン及び転送パターンが多くなるとそれを解読
し、制御信号を発生するデコーダの面積が大きくなる。As the number of input cover patterns and transfer patterns increases, the area of a decoder that decodes them and generates control signals increases.
またデコーダが大きくなるとデコードに時間がかかり、
動作速度が低下するという問題点があった。Also, the larger the decoder, the longer it will take to decode.
There was a problem that the operating speed decreased.
この発明は上記のような問題点を解決するためになされ
たもので、リード動作時とライト動作時にそれぞれ別の
デコードを行わず、同一のデコード処理を行うことがで
き、デコーダの規模を縮小することのできるDMAコン
トローラを得ることを目的とする。This invention was made to solve the above-mentioned problems, and it is possible to perform the same decoding process during read and write operations without performing separate decoding, thereby reducing the scale of the decoder. The purpose of this invention is to obtain a DMA controller that can perform
本発明に係るDMAコントローラは、DMA転送動作を
制御する制御回路を、リード又はライトアクセス動作に
おけるアクセスデータのバイト数を検出するアクセス検
出手段と、上記各アクセス動作を定義する動作設定値を
保持する記憶手段と、現在のアクセス動作の状態と入力
信号とに基づいて次のアクセス動作の状態を設定する状
態設定手段と、設定されたアクセス動作の状態に基づき
上記動作設定値をリード動作とライト動作との間でセレ
クトして出力するセレクト手段と、上記セレクト出力及
びアクセス検出出力をデコードして制御信号を出力する
デコード手段とを有する回路構成としたものである。A DMA controller according to the present invention includes a control circuit that controls a DMA transfer operation, an access detection means that detects the number of bytes of access data in a read or write access operation, and an operation setting value that defines each of the above access operations. a storage means, a state setting means for setting the next access operation state based on the current access operation state and the input signal, and a read operation and write operation for the operation setting value based on the set access operation state. The circuit has a circuit configuration including a select means for selecting and outputting between the above-described select output and the access detection output, and a decoding means for decoding the select output and the access detection output to output a control signal.
この発明においては、リード又はライトアクセス動作の
アクセスデータのバイト数を検出するとともに、リード
又はライト動作を定義する動作設定値をセレクト手段に
よりセレクトして出力し、上記バイト数及びセレクト出
力をデコードするようにしたから、リード時とライト時
とでデコードする入力及びそれに対する出力が同一とな
り、っまり信号処理パターンが半減することとなりデコ
ーダの回路規模を縮小することができる。In this invention, the number of bytes of access data for a read or write access operation is detected, the operation setting value that defines the read or write operation is selected and output by the selection means, and the number of bytes and the selection output are decoded. By doing so, the inputs to be decoded and the corresponding outputs are the same for reading and writing, and the number of signal processing patterns is halved, making it possible to reduce the circuit scale of the decoder.
以下、この発明の一実施例を図について説明する。 An embodiment of the present invention will be described below with reference to the drawings.
第1図はこの発明の一実施例によるDMAコントローラ
の制御回路の構成を示すブロック図である。図において
、101はDMA動作の状態と制御信号とを発生する状
態発生回路(状態設定手段)であり、転送要求信号線1
06、動作定義レジスタ102の出力信号線107、テ
ンポラリカウンタ103のカウント値117を入力とし
、アドレス制御部100に対する制御信号をアドレス制
御線111に、テンポラリカウンタ103の制御信号を
テンポラリカウンタ制御線108に、さらにセレクタ1
05の制御信号をR/W信号線109に出力する。FIG. 1 is a block diagram showing the configuration of a control circuit of a DMA controller according to an embodiment of the present invention. In the figure, 101 is a state generation circuit (state setting means) that generates a DMA operation state and a control signal, and a transfer request signal line 1
06, the output signal line 107 of the operation definition register 102 and the count value 117 of the temporary counter 103 are input, the control signal for the address control unit 100 is sent to the address control line 111, and the control signal of the temporary counter 103 is sent to the temporary counter control line 108. , and selector 1
A control signal of 05 is output to the R/W signal line 109.
102は動作を定義する動作定義レジスタ(記憶手段)
であり、この動作定義レジスタ102にはリード動作を
指定するソースフィールドとライト動作を指定するディ
ストネーションフィールド、一般動作を指定する動作フ
ィールドがある。102 is an operation definition register (storage means) that defines the operation.
The operation definition register 102 has a source field that specifies a read operation, a destination field that specifies a write operation, and an operation field that specifies a general operation.
103はテンポラリレジスタ(データ保持レジスタ)に
保持されているデータ数をカウントするテンポラリカウ
ンタ(アクセス検出手段)であり、動作定義レジスタ1
02の動作フィールドにある転送数の情報を出力107
から取り込み、状態発生回路101より出力されるテン
ポラリカウンタ制御線108、及びデコーダ104から
の制御信号112を入力とし、カウンタ出力線117に
カウンタ値を出力するとともに、R/W信号線109の
状態によりカウンタ出力値、及び反転値を選択的に出力
信号線110から出力する。103 is a temporary counter (access detection means) that counts the number of data held in a temporary register (data holding register);
Output information on the number of transfers in the operation field of 02 107
The temporary counter control line 108 output from the state generation circuit 101 and the control signal 112 from the decoder 104 are input, and the counter value is output to the counter output line 117. The counter output value and the inverted value are selectively output from the output signal line 110.
104はアドレス制御部100とテンポラリカウンタ1
03に対する制御信号を発生するデコーダ(デコード手
段)であり、アドレス制御線100に対する制御信号を
アドレス制御線113から、テンポラリカウンタ103
に対する制御信号をテンポラリカウンタ制御信号線11
2から出力する。104 is an address control unit 100 and a temporary counter 1
This is a decoder (decoding means) that generates a control signal for the address control line 100 from the address control line 113 to the temporary counter 103.
The control signal for the temporary counter control signal line 11
Output from 2.
また115は動作定義レジスタ102からデコーダ10
4への2つの入力のうち一方の信号を切り換えるセレク
タ(セレクト手段)であり、動作定義レジスタ102の
リード動作定義部分、つまりソースフィールドとライト
動作定義部分、つまリディストネーションフィールドと
を状態発生回路101から出力されるR/W信号線10
9に従い選択し、選択したフィールドのレジスタ内容を
デコーダ104に入力する。100は状態発生回路10
1とデコーダ104からの制御信号によりアドレスバス
116に出力するアドレスを生成し出力するアドレス制
御部である。アドレス制御部100で生成するアドレス
には、リード動作で用いるソースアドレスとライト動作
で用いるディストネーションアドレスの2つがある。Further, 115 is a decoder 10 from the operation definition register 102.
It is a selector (select means) that switches one signal of the two inputs to the operation definition register 102, and the read operation definition part of the operation definition register 102, that is, the source field and the write operation definition part, that is, the re-destination field, is connected to the state generation circuit. R/W signal line 10 output from 101
9 and inputs the register contents of the selected field to the decoder 104. 100 is a state generation circuit 10
1 and a control signal from the decoder 104 to generate and output an address to be output to the address bus 116. There are two addresses generated by the address control unit 100: a source address used in a read operation and a destination address used in a write operation.
以下、本実施例の動作について4バイトの転送でソース
、及びディストネーションアドレスがそれぞれS+1.
D+1の場合(S、Dは4の倍数)つまりソース、ディ
ストネーションとも1回目3バイト、2回目1バイトの
転送をする場合を例に説明する。Below, regarding the operation of this embodiment, the source and destination addresses are S+1.
The case of D+1 (S and D are multiples of 4), that is, the case where 3 bytes are transferred for the first time and 1 byte for the second time will be explained as an example.
転送は転送要求信号線106がアサートされることによ
り開始される。Transfer is started when transfer request signal line 106 is asserted.
転送要求が動作定義レジスタ102の内容とテンポラリ
カウンタ103の値と共に状態発生回路101に入力さ
れると状態発生回路101はリード状態になり、アドレ
ス制御線111によりアドレス制御部100にソースア
ドレスS+1の出力要求と2回目のソースアドレスを生
成するためのソースアドレスのカウントアツプの要求を
出力する。1回目のリードは3バイトなのでここでのカ
ウントアツプ値は3である。またこのときテンポラリカ
ウンタ103にはテンポラリカウンタ制御線108によ
りカウント動作の要求を出し、セレクタ105にはR/
W信号線109からはリード状態を出力する。When a transfer request is input to the state generation circuit 101 along with the contents of the operation definition register 102 and the value of the temporary counter 103, the state generation circuit 101 enters the read state and outputs the source address S+1 to the address control unit 100 via the address control line 111. Outputs a request and a request to count up the source address to generate the second source address. Since the first read is 3 bytes, the count up value here is 3. At this time, a request for counting is sent to the temporary counter 103 via the temporary counter control line 108, and the R/
A read state is output from the W signal line 109.
セレクタ105はこのR/W信号線109がリード状態
であるので動作定義レジスタ102のソースフィールド
をデコーダ104に対して出力する。またデコーダ10
4は転送の開始と共に動作定義レジスタ102のソース
フィールドをセレクタ出力線115から、動作フィール
ドを動作定義レジスタ出力信号線107から、さらにテ
ンポラリカウンタ103の出力値Oを出力信号線110
から取り込み、1回目の転送が3バイトであることをデ
コードし、アドレス制御部100およびテンポラリカウ
ンタ103に対するカウント値3を制御信号として出力
する。Since this R/W signal line 109 is in a read state, the selector 105 outputs the source field of the operation definition register 102 to the decoder 104. Also decoder 10
4, at the start of transfer, the source field of the operation definition register 102 is output from the selector output line 115, the operation field is output from the operation definition register output signal line 107, and the output value O of the temporary counter 103 is output to the output signal line 110.
, decodes that the first transfer is 3 bytes, and outputs a count value of 3 to the address control unit 100 and temporary counter 103 as a control signal.
アドレス制御部100は状態発生回路101及びデコー
ダ104からの制御信号線111及び113を介しての
入力により、ソースアドレスのアドレスバス116への
出力とカウンタ動作を開始する。カウント動作後のソー
スアドレスの値はS+4になっている。Address control section 100 receives input from state generating circuit 101 and decoder 104 via control signal lines 111 and 113, and starts outputting a source address to address bus 116 and starting a counter operation. The value of the source address after the counting operation is S+4.
テンポラリカウンタ103も同様に状態発生回路101
とデコーダ104からの制御信号の入力により、テンポ
ラリカウント値のカウント動作を開始する。カウント動
作後のテンポラリカウント値出力信号線117のカウン
ト値は3となり、出力信号線110の出力(アクセスデ
ータのバイト数)も3になる。1回目の転送が終了する
と、状態発生回路101は入力である転送要求信号線1
06、動作定義レジスタ102の内容、テンポラリカウ
ンタ103の値を再び取り込み、次の状態を決定する。Similarly, the temporary counter 103 is connected to the state generation circuit 101.
Upon input of a control signal from the decoder 104, the counting operation of the temporary count value is started. After the counting operation, the count value of the temporary count value output signal line 117 becomes 3, and the output (number of bytes of access data) of the output signal line 110 also becomes 3. When the first transfer is completed, the state generation circuit 101 transfers the input transfer request signal line 1.
06, the contents of the operation definition register 102 and the value of the temporary counter 103 are taken in again, and the next state is determined.
ここでの場合、テンポラリカウンタ103の値が4に達
していないので、次の状態はまだリードのままであり、
2回目のリード動作を開始する。従って、状態発生回路
101は1回目のリード動作と同様にアドレス制御部1
00にソースアドレスS+4の出力要求と次の転送サイ
クルで用いるソースアドレスを生成するためのソースア
ドレスカウントアツプの要求を出す、このときテンポラ
リカウンタ103にもカウントアツプ要求を出す、状態
はリードであるためR/W信号線109は依然としてリ
ード状態を示しており、セレクタも動作定義レジスタ1
02のソースフィールドをデコーダ104に出力してい
る。In this case, the value of the temporary counter 103 has not reached 4, so the next state is still read.
Start the second read operation. Therefore, the state generation circuit 101 is activated by the address control unit 1 in the same way as in the first read operation.
00, a request to output the source address S+4 and a source address count-up request to generate the source address to be used in the next transfer cycle is issued.At this time, a count-up request is also issued to the temporary counter 103, since the state is read. The R/W signal line 109 still indicates the read state, and the selector is also in the operation definition register 1.
The source field of 02 is output to the decoder 104.
そしてデコーダ104は動作定義レジスタ102の内容
とテンポラリカウンタ103の出力値3とを取り込み、
2回目の転送が1バイトであることをデコードし、アド
レス制御部100およびテンポラリカウンタ103に対
するカウント値1を制御信号として出力する。アドレス
制御部100は状態発生回路101とデコーダ104か
らの制御信号の入力によりソースアドレスS+4のアド
レスバスへの出力とカウンタ動作を開始する。カウント
動作後のソースアドレス値はS+5になっている。この
ときテンポラリカウンタ103は状態発生回路101と
デコーダ104からの制御信号の入力によりテンポラリ
カウント値のカウント動作を開始する。カウント動作後
のテンポラリカウント値出力&9!117の値は4にな
っている。Then, the decoder 104 takes in the contents of the operation definition register 102 and the output value 3 of the temporary counter 103, and
It decodes that the second transfer is 1 byte, and outputs a count value of 1 to the address control unit 100 and temporary counter 103 as a control signal. The address control section 100 starts outputting the source address S+4 to the address bus and starts a counter operation in response to input of control signals from the state generation circuit 101 and the decoder 104. The source address value after the counting operation is S+5. At this time, the temporary counter 103 starts counting the temporary count value by receiving control signals from the state generating circuit 101 and the decoder 104. The value of the temporary count value output &9!117 after the counting operation is 4.
2回目の転送が終了すると、状態発生回路101は転送
要求信号線106、動作定義レジスタ102の内容、テ
ンポラリカウンタのカウント値を取り込み、次の状態を
決定する。今回はテンポラリカウント値が4になってい
るので、次はライト状態になる。When the second transfer is completed, the state generation circuit 101 takes in the transfer request signal line 106, the contents of the operation definition register 102, and the count value of the temporary counter, and determines the next state. This time, the temporary count value is 4, so next time it will be in the write state.
ライト状態になると、状態発生回路101はアドレス制
御部100にディストネーションアドレスD+1の出力
要求と2回目の転送で用いるディストネーションアドレ
スを生成するためのディストネーションアドレスのカウ
ントアツプ要求を出す。このときテンポラリカウンタ1
03には制御線108からカウントダウン要求を出し、
セレクタ115にはR/W信号線109からライト状態
を出力する。該セレクタ105は動作定義レジスタ10
2のディストネーションフィールドをデコーダ104に
出力する。R/W信号線109によりライト状態になっ
たことを検出したテンポラリカウンタ103は転送サイ
クル中の転送バイト数からカウント値を引いた反転出力
(アクセスデータのバイト数)を出力信号線110に出
力する。When the write state is entered, the state generation circuit 101 issues to the address control unit 100 a request to output the destination address D+1 and a request to count up the destination address to generate the destination address used in the second transfer. At this time, temporary counter 1
At 03, a countdown request is sent from the control line 108,
A write state is output to the selector 115 from the R/W signal line 109. The selector 105 is the operation definition register 10
The destination field of No. 2 is output to the decoder 104. When the temporary counter 103 detects that it is in the write state via the R/W signal line 109, it outputs an inverted output (the number of bytes of access data) obtained by subtracting the count value from the number of bytes transferred during the transfer cycle to the output signal line 110. .
この場合では、転送バイト数が4であり、カウント値は
4なので反転出力は0となる。デコーダ104は動作定
義レジスタ102とテンポラリカウンタ103の出力信
号線110の値0とを取り込み、1回目のライト転送が
3バイトであることをデコードし、アドレス制御部10
0およびテンポラリカウンタ103に対するカウント値
3を制御信号として出力する。In this case, the number of transferred bytes is 4 and the count value is 4, so the inverted output is 0. The decoder 104 takes in the operation definition register 102 and the value 0 of the output signal line 110 of the temporary counter 103, decodes that the first write transfer is 3 bytes, and decodes the address control unit 104.
0 and the count value 3 for the temporary counter 103 are output as control signals.
アドレス制御部100は制御信号の入力によりディスト
ネーションアドレスのアドレスバス116への出力とカ
ウンタ動作を開始し、2回目のディストネーションアド
レスD+4を生成する。テンポラリカウンタ103も制
御信号の入力によりカウント動作を行い、テンポラリカ
ウント値出力線117の値は1になる。またライト状態
なので出力信号線110の値は転送バイト数4からカウ
ント値1を引いた値3となる。1回目の転送が終了する
と、状態発生回路101は入力を取り込み、テンポラリ
カウント値が3であるので2回目のライト動作を開始し
、アドレス制御部100にはディストネーションアドレ
スの出力とカウントアツプ要求を出し、テンポラリカウ
ンタ103にはカウントダウン要求を出力する。デコー
ダ104はテンポラリカウンタ103の出力信号線11
0の値が3なので2回目のライトは1バイトであること
をデコードし、制御信号としてカウント値1を出力する
。アドレス制御部100は1回目と同様にディストネー
ションアドレスの出力とカウントアツプを行い、テンポ
ラリカウンタ103もカウントダウンを実行し、テンポ
ラリカウント値も出力値もOとなる。2回目のライト動
作が終了すると、状態発生回路101はテンポラリカウ
ンタ103の出力値がOなので転送サイクルが終了と判
断し、次の転送要求がアサートされるまでアイドル状態
となる。In response to the input of the control signal, the address control unit 100 starts outputting the destination address to the address bus 116 and starts a counter operation, thereby generating the second destination address D+4. The temporary counter 103 also performs a counting operation by inputting a control signal, and the value of the temporary count value output line 117 becomes 1. Also, since it is in the write state, the value of the output signal line 110 is 3, which is the result of subtracting the count value 1 from the number of transferred bytes, 4. When the first transfer is completed, the state generation circuit 101 takes in the input, and since the temporary count value is 3, it starts the second write operation, and sends the destination address output and count up request to the address control unit 100. and outputs a countdown request to the temporary counter 103. The decoder 104 is the output signal line 11 of the temporary counter 103.
Since the value of 0 is 3, it is decoded that the second write is 1 byte, and a count value of 1 is output as a control signal. The address control unit 100 outputs the destination address and counts up as in the first time, and the temporary counter 103 also counts down, and both the temporary count value and the output value become O. When the second write operation is completed, the state generation circuit 101 determines that the transfer cycle has ended since the output value of the temporary counter 103 is O, and enters an idle state until the next transfer request is asserted.
以上の説明から判るようにデコーダ104への入力であ
るテンポラリカウンタ103からの出力値はリード、ラ
イトいずれの状態でも同じであり、動作定義レジスタ1
02からの入力はセレクタ105で切り換えるのでデコ
ーダ104からは見分けがつかない。つまり、デコーダ
は、入力に対するデコード出力がリード時とライト時で
同じでよいので、リード状態、ライト状態を識別する必
要が無く、デコーダの規模は半分で済む。As can be seen from the above explanation, the output value from the temporary counter 103, which is the input to the decoder 104, is the same in both read and write states, and the operation definition register 1
Since the input from 02 is switched by the selector 105, it cannot be distinguished from the decoder 104. In other words, since the decoder can output the same decoded output for the input when reading and writing, there is no need to distinguish between the read state and the write state, and the size of the decoder can be halved.
このように本実施例では、テンポラリカウンタ103を
、リード時にはカウント値と同じ値をデコーダ104に
出力し、ライト時には転送数からカウント値を引いた反
転値をデコーダ104に出力するよう構成したので、デ
コーダ104に入力されるテンポラリカウンタの出力は
リード時、ライト時にかかわらずつねに転送したバイト
数を示すことになる。さらにデコーダ104の前段には
セレクタ105を設け、動作定義レジスタのリード動作
定義部分(ソースフィールド)とライト動作定義部分(
ディストネーションフィールド)とを状態により切り換
えてデコーダ104へ入力するようにしたので、デコー
ダ104にとってリード時であるかライト時であるかは
無関係になり、リード時とライト時でデコードする入力
及びそれに対する出力を同じにすることができ、これに
よりデコーダの縮小及び動作時間の短縮を行なうことが
できる。In this way, in this embodiment, the temporary counter 103 is configured to output the same value as the count value to the decoder 104 when reading, and output the inverted value obtained by subtracting the count value from the number of transfers to the decoder 104 when writing. The output of the temporary counter input to the decoder 104 always indicates the number of bytes transferred regardless of whether it is read or written. Furthermore, a selector 105 is provided before the decoder 104, and a read operation definition part (source field) and a write operation definition part (source field) of the operation definition register are provided.
Destination field) is switched depending on the state and input to the decoder 104, so it is irrelevant to the decoder 104 whether it is a read or a write. The outputs can be made the same, thereby making it possible to downsize the decoder and shorten the operating time.
以上のように本発明に係るDMAコントローラによれば
、リード又はライトアクセス動作のアクセスデータのバ
イト数を検出するとともに、リード又はライト動作を定
義する動作設定値をセレクト手段によりセレクトして出
力し、上記バイト数及びセレクト出力をデコードするよ
うにしたので、リード時とライト時とでデコードする入
力及びそれに対する出力とが同一となり、つまりデコー
ドすべき信号パターンが半減することとなり、これによ
りデコーダの回路規模を縮小することができ、またデコ
ード動作の時間短縮をすることができるという効果があ
る。As described above, according to the DMA controller according to the present invention, the number of bytes of access data in a read or write access operation is detected, and an operation setting value that defines the read or write operation is selected and outputted by the selection means, Since the above-mentioned number of bytes and select output are decoded, the input to be decoded and the corresponding output are the same when reading and writing, which means that the number of signal patterns to be decoded is halved, which results in the decoder circuit This has the effect of being able to reduce the scale and shorten the decoding time.
第1図はこの発明の一実施例によるDMAコントローラ
の制御回路の構成を示すブロック図、第2図は該制御回
路の動作を説明するための波形図、第3図は従来のDM
Aコントローラの制御回路の構成を示すブロンク図、第
4図は該従来回路の動作を説明するための波形図である
。
100はアドレス制御回路、101は状態発生回路(状
態設定手段)、102は動作定義レジスタ(記憶手段)
、103はテンポラリカウンタ(アクセス検出手段)、
104はデコーダ(デコード手段)、105はセレクタ
(セレクト手段)である。
なお図中同一符号は同−又は相当部分を示す。FIG. 1 is a block diagram showing the configuration of a control circuit of a DMA controller according to an embodiment of the present invention, FIG. 2 is a waveform diagram for explaining the operation of the control circuit, and FIG. 3 is a conventional DM controller.
A block diagram showing the configuration of the control circuit of the A controller, and FIG. 4 are waveform diagrams for explaining the operation of the conventional circuit. 100 is an address control circuit, 101 is a state generation circuit (state setting means), and 102 is an operation definition register (storage means).
, 103 is a temporary counter (access detection means);
104 is a decoder (decoding means), and 105 is a selector (selecting means). Note that the same reference numerals in the figures indicate the same or equivalent parts.
Claims (1)
該レジスタへのデータのリードアクセス動作と、上記レ
ジスタから転送先デバイスへのデータのライトアクセス
動作とからなるDMA転送動作を行うDMAコントロー
ラにおいて、 上記DMA転送動作を制御する制御回路を、上記各アク
セス動作におけるアクセスデータのバイト数を検出する
アクセス検出手段と、 上記各アクセス動作を定義する動作設定値を保持する記
憶手段と、 現在のアクセス動作の状態と入力信号とに基づいて次の
アクセス動作の状態を設定する状態設定手段と、 設定されたアクセス動作の状態に基づき上記動作設定値
をリード動作とライト動作との間でセレクトして出力す
るセレクト手段と、 上記セレクト出力及びアクセス検出出力をデコードして
制御信号を出力するデコード手段とを有する回路構成と
したことを特徴とするDMAコントローラ。(1) In a DMA controller that has a data holding register and performs a DMA transfer operation consisting of a data read access operation from the transfer source device to the register and a data write access operation from the register to the transfer destination device, A control circuit for controlling the DMA transfer operation includes: access detection means for detecting the number of bytes of access data in each of the access operations; storage means for holding operation setting values that define each of the access operations; and a current access operation. a state setting means for setting the state of the next access operation based on the state of the access operation and the input signal; and a state setting means that selects and outputs the operation setting value between the read operation and the write operation based on the set access operation state. 1. A DMA controller, characterized in that the circuit has a circuit configuration comprising: a selection means for decoding the selection output and the access detection output, and a decoding means for decoding the selection output and the access detection output to output a control signal.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5883190A JP2599805B2 (en) | 1990-03-09 | 1990-03-09 | DMA controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5883190A JP2599805B2 (en) | 1990-03-09 | 1990-03-09 | DMA controller |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH03260749A true JPH03260749A (en) | 1991-11-20 |
| JP2599805B2 JP2599805B2 (en) | 1997-04-16 |
Family
ID=13095596
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP5883190A Expired - Lifetime JP2599805B2 (en) | 1990-03-09 | 1990-03-09 | DMA controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2599805B2 (en) |
-
1990
- 1990-03-09 JP JP5883190A patent/JP2599805B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP2599805B2 (en) | 1997-04-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2599805B2 (en) | DMA controller | |
| KR0153537B1 (en) | Signal processing structure to preselect memory address data | |
| JP2574384B2 (en) | Data stream generator | |
| JPS607529A (en) | Buffer memory device | |
| JPS6453240A (en) | Evaluating microprocessor | |
| JPH1166031A (en) | Built-in timer of microcomputer | |
| JP3190945B2 (en) | Micro program control circuit | |
| JP3597744B2 (en) | Interrupt factor signal flag register device | |
| JP2503634B2 (en) | Micro program controller | |
| JPH02118989A (en) | Read only memory circuit | |
| JPH02302855A (en) | Memory control system | |
| JPH02136921A (en) | Register access system | |
| JPS61161560A (en) | Memory device | |
| JPH0219932A (en) | Back-up device for development of microprocessor | |
| JPS62107304A (en) | Programmable controller | |
| JPS6015969B2 (en) | Microinstruction address generation method | |
| JPH02116077A (en) | Memory with logic synthesizing function | |
| JPH05334099A (en) | Write circuit for state setting register | |
| JPS62293452A (en) | Memory ic diagnosing circuit | |
| JPH01241644A (en) | Microcomputer control circuit | |
| JPS6442757A (en) | Input and output interface | |
| JPH05173846A (en) | Fault analysis information tracing method | |
| JPH0969070A (en) | Control circuit of information processing device | |
| JPH06259264A (en) | Clock control circuit | |
| JPH05342064A (en) | Tracer circuit |