JP2599805B2 - DMA controller - Google Patents

DMA controller

Info

Publication number
JP2599805B2
JP2599805B2 JP5883190A JP5883190A JP2599805B2 JP 2599805 B2 JP2599805 B2 JP 2599805B2 JP 5883190 A JP5883190 A JP 5883190A JP 5883190 A JP5883190 A JP 5883190A JP 2599805 B2 JP2599805 B2 JP 2599805B2
Authority
JP
Japan
Prior art keywords
state
output
address
transfer
access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP5883190A
Other languages
Japanese (ja)
Other versions
JPH03260749A (en
Inventor
弘郁 近藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP5883190A priority Critical patent/JP2599805B2/en
Publication of JPH03260749A publication Critical patent/JPH03260749A/en
Application granted granted Critical
Publication of JP2599805B2 publication Critical patent/JP2599805B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、DMAコントローラに関し、特にその制御回
路におけるデコーダの回路規模の縮小と動作時間の短縮
に関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a DMA controller, and more particularly to a reduction in the circuit size and operation time of a decoder in a control circuit thereof.

〔従来の技術〕[Conventional technology]

DMAコントローラの転送方式の一つにデュアルアドレ
スモードがある。この方式では、リード動作,つまり転
送元(以下ソースと呼ぶ)デバイスのアドレスを出力
し、上記ソースデバイスからDMAコントローラ内に備え
られたデータ保持レジスタ以下(テンポラリレジスタと
いう)にデータを転送するリードサイクルと、次のライ
ト動作,つまり転送先(ディストネーションという)デ
バイスのアドレスを出力し、上記テンポラリレジスタか
らディストネーションデバイスにデータを転送するライ
トサイクルとを1つの転送サイクルとして、ソースデバ
イスからディストネーションデバイスへデータを転送す
る。
One of the transfer methods of the DMA controller is a dual address mode. In this method, a read operation, that is, a read cycle in which an address of a transfer source (hereinafter, referred to as a source) device is output and data is transferred from the source device to a data holding register provided in a DMA controller or lower (referred to as a temporary register). And a next write operation, that is, a write cycle in which the address of a transfer destination (referred to as a destination) device is output and data is transferred from the temporary register to the destination device as one transfer cycle, and the source device is a destination device. Transfer data to

第2図を用いて32ビットバスにおけるDMA転送につい
て説明する。
The DMA transfer on the 32-bit bus will be described with reference to FIG.

ソースアドレスの値がS+1、ディストネーションア
ドレスの値がD+1、1回の転送サイクルで4バイトを
転送する場合について述べる。S,Dは4の倍数とする。
ここで、ソースアドレスがS+1なので、1度に4バイ
ト全てをリードできない。このためリードサイクルは2
回のバスアクセスで行う。1回目は3バイト、2回目に
1バイトの2回のバスアクセスで4バイトのリードを行
う。同様にライトアクセス時もディストネーションアド
レスがD+1なので1回目3バイト、2回目1バイトの
ライト動作を行う。
A case where four bytes are transferred in one transfer cycle with a source address value of S + 1 and a destination address value of D + 1 will be described. S and D are multiples of 4.
Here, since the source address is S + 1, all four bytes cannot be read at one time. Therefore, the read cycle is 2
It is performed by bus access twice. First, 3 bytes are read, and 2 bytes of 1 byte are read twice to read 4 bytes. Similarly, at the time of write access, since the destination address is D + 1, the first 3-byte write operation and the second 1-byte write operation are performed.

転送サイクルは転送要求信号線205がアサートされる
ことにより開始される。
The transfer cycle is started when the 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のリード状態及びテン
ポラリカウンタ203の出力値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 a read state and the R / W signal line 219
To output the read status and the address control line.
A request to output the source address S + 1 and a request to count up the source address for generating the second source address are output to the address control unit 200 through 207. Since the first read is 3 bytes, the count-up value here is 3. At this time, a count-up request is also issued to the temporary counter 203 via the temporary counter control line 208. The decoder 204 captures the output of the operation definition register 202, the read state of the state generation circuit 201, and the output value 0 of the temporary counter 203 at the start of the transfer, decodes that the first transfer is 3 bytes, and decodes the address.
A count amplifier value 3 for the temporary counter 203 and 200 is output as a control signal.

アドレス制御部200は状態発生回路201とデコーダ204
からの制御信号の入力により、ソースアドレスのアドレ
スバス212への出力とカウンタ動作を開始する。カウン
ト動作後のソースアドレスの値はS+4になっている。
テンポラリカウンタ203も同様に状態発生回路201とデコ
ーダ204からの制御信号の入力により、カウント値のカ
ウント動作を開始する。カウント動作後のテンポラリカ
ウンタの出力値は3になっている。
The address control unit 200 includes a state generation circuit 201 and a decoder 204.
, The source address is output to the address bus 212 and the counter operation is started. The value of the source address after the count operation is S + 4.
Similarly, the temporary counter 203 starts counting the count value in response to the input of the control signal from the state generating circuit 201 and the decoder 204. The output value of the temporary counter after the count operation is 3.

1回目の転送が終了すると、状態発生回路201は入力
である転送要求信号205、動作定義レジスタ202の内容、
テンポラリカウンタ203の値を再び取り込み、次の状態
を決定する。ここでの場合、テンポラリカウンタ203の
値が4に達していないので、次の状態はまだリードのま
まであり、2回目のリード動作を開始する。従って、状
態発生回路201は1回目のリード動作と同様にアドレス
制御部200にソースアドレスS+4の出力要求と次の転
送サイクルで用いるソースアドレスを生成するためのソ
ースアドレスカウントアップの要求を出す。このときテ
ンポラリカウンタ203にもカウントアップ要求を出す。
When the first transfer is completed, the state generation circuit 201 receives the input of the transfer request signal 205, the contents of the operation definition register 202,
The value of the temporary counter 203 is fetched again, and the next state is determined. 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. Therefore, the state generating circuit 201 issues a request for outputting the source address S + 4 and a request for counting up the source address for generating the source address to be used in the next transfer cycle to the address control unit 200 as in the first read operation. At this time, a count-up request is also issued to the temporary counter 203.

デコーダ204は動作定義レジスタ202とテンポラリカウ
ンタ203の出力値3とを取り込み、2回目の転送が1バ
イトであることをデコードし、アドレス制御部200およ
びテンポラリカウンタ203に対するカンウト値1を制御
信号として出力する。アドレス制御部200は状態発生回
路201とデコーダ204からの制御信号の入力により、ソー
スアドレスS+4のアドレスバスへの出力とカウンタ動
作を開始する。カウント動作後のソースアドレス値はS
+5となっている。テンポラリカウンタは状態発生回路
201とデコーダ204からの制御信号の入力によりテンポラ
リカウンタ203の値のカウント動作を開始する。カウン
ト動作後のカウント値は4になっている。
The decoder 204 captures the operation definition register 202 and the output value 3 of the temporary counter 203, decodes that the second transfer is 1 byte, and outputs a count value 1 to the address control unit 200 and the temporary counter 203 as a control signal. I do. The address control unit 200 starts outputting the source address S + 4 to the address bus and starts the counter operation in response to the input of the control signal from the state generating circuit 201 and the decoder 204. The source address value after the count operation is S
+5. The temporary counter is a state generator
The count operation of the temporary counter 203 is started in response to the control signal input from the decoder 201 and the decoder 204. The count value after the count operation is 4.

2回目の転送が終了すると、状態発生回路201は転送
要求信号205、動作定義レジスタ202の内容、テンポラリ
カウンタ203の値を取り込み、次の状態を決定する。今
回はテンポラリカウント値が4になっているので、次は
ライト状態になる。
When the second transfer is completed, the state generation circuit 201 captures 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. Since the temporary count value is 4 this time, the next state is the write state.

ライト状態になると、状態発生回路201はアドレス制
御部200にディストネーションアドレスD+1の出力要
求と2回目の転送で用いるディストネーションアドレス
を生成するためのディストネーションアドレスのカウン
トアップ要求とを出す。このときテンポラリカウンタ20
3にはカウントダウン要求を出す。またデコーダ204は動
作定義レジスタ202の出力、状態発生回路201のライト状
態及びテンポラリカウンタ203の出力値4とを取り込
み、1回目のライト転送が3バイトであることをデコー
ドし、アドレス制御部200およびテンポラリカウンタ203
に対するカウント値3を制御信号として出力する。
In the write state, the state generating circuit 201 issues a request for outputting the destination address D + 1 and a request for counting up the destination address for generating the destination address used in the second transfer to the address control unit 200. At this time, the temporary counter 20
A countdown request is issued to 3. The decoder 204 captures the output of the operation definition register 202, the write state of the state generation circuit 201, and the output value 4 of the temporary counter 203, decodes that the first write transfer is 3 bytes, and decodes the address control unit 200 and Temporary counter 203
Is output as a control signal.

アドレス制御部200は制御信号の入力によりディスト
ネーションアドレスのアドレスバスへの出力とカウント
動作を開始し、2回目のディストネーションアドレスD
+4を生成する。このときテンポラリカウンタ203も制
御信号の入力によりカウント動作を行い、テンポラリカ
ウント値は1になる。1回目の転送が終了すると、状態
発生回路201は入力を取り込み、テンポラリカウント値
が1であるので2回目のライト動作を開始し、アドレス
制御部200にはディストネーションアドレスの出力とカ
ウントアップ要求を出し、テンポラリカウンタ203には
カウントダウン要求を出力する。
The address control unit 200 starts outputting the destination address to the address bus and starts the counting operation in response to the input of the control signal.
Generate +4. At this time, the temporary counter 203 also performs a counting operation in response to the input of 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, starts the second write operation because the temporary count value is 1, and sends a destination address output and a count-up request to the address control unit 200. And outputs a countdown request to the temporary counter 203.

デコーダ204はテンポラリカウント値が1なので2回
目のライトは1バイトであることをデコードし、制御信
号としてカウント値1を出力する。アドレス制御部200
は1回目と同様にディストネーションアドレスの出力と
カウントアップを行い、テンポラリカウンタ203もカウ
ントダウンを実行し、テンポラリカウント値は0とな
る。2回目のライト動作が終了すると、状態発生回路20
1はテンポラリカウント値が0なので転送サイクルが終
了と判断し、次の転送要求がアサートされるまでアイド
ル状態となる。
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. Address control unit 200
Performs the output of the destination address and count-up as in the first time, the temporary counter 203 also counts down, and the temporary count value becomes zero. When the second write operation is completed, the state generation circuit 20
Since 1 indicates that the temporary count value is 0, it is determined that the transfer cycle has ended, and the idle state is set until the next transfer request is asserted.

以上が32ビットDMAコントローラの状態制御とアドレ
ス制御の概要である。
The above is the outline of the state control and address control of the 32-bit DMA controller.

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

32ビットDMAコントローラの動作としては上記の転送
例以外に、転送するデータのサイズが1バイトから8バ
イトまでいろいろあり、またアドレスのカウント動作も
上位方向、下位方向、固定などがあり、それらを組み合
わせると転送は多種多様になる。転送動作が複雑になる
とデコーダでデコードする転送制御信号パターンが増大
する。入力パターン及び転送パターンが多くなるとそれ
を解読し、制御信号を発生するデコーダの面積が大きく
なる。またデコーダが大きくなるとデコードに時間がか
かり、動作速度が低下するという問題点があった。
In addition to the above transfer example, the 32-bit DMA controller operates in various sizes of data to be transferred from 1 byte to 8 bytes, and also has an address counting operation in upper direction, lower direction, fixed, etc., and combining them And the transfer will be a great variety. When the transfer operation becomes complicated, the transfer control signal pattern decoded by the decoder increases. As the number of input patterns and transfer patterns increases, they are decoded and the area of a decoder that generates control signals increases. Further, when the size of the decoder is increased, it takes a long time for decoding, and there is a problem that the operation speed is reduced.

この発明は上記のような問題点を解決するためになさ
れたもので、リード動作時とライト動作時にそれぞれ別
のデコードを行わず、同一のデコード処理を行うことが
でき、デコーダの規模を縮小することのできるDMAコン
トローラを得ることを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problem, and the same decoding process can be performed without performing separate decoding during a read operation and a write operation, thereby reducing the scale of the decoder. The goal is to get a DMA controller that can do it.

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

本発明に係るDMAコントローラは、DMA転送動作を制御
する制御回路を、リード又はライトアクセス動作におけ
るアクセスデータのバイト数を検出するアクセス検出手
段と、上記各アクセス動作を定義する動作設定値を保持
する記憶手段と、現在のアクセス動作の状態と入力信号
とに基づいて次のアクセス動作の状態を設定する状態設
定手段と、設定されたアクセス動作の状態に基づき上記
動作設定値をリード動作とライト動作との間でセレクト
して出力するセレクト手段と、上記セレクト出力及びア
クセス検出出力をデコードして制御信号を出力するデコ
ード手段とを有する回路構成としたものである。
The DMA controller according to the present invention includes a control circuit that controls a DMA transfer operation, an access detection unit that detects the number of bytes of access data in a read or write access operation, and an operation set value that defines each access operation. Storage means, state setting means for setting the state of the next access operation based on the current state of the access operation and the input signal, and read operation and write operation of the operation set value based on the set state of the access operation And a decoding means for decoding the select output and the access detection output and outputting a control signal.

〔作用〕[Action]

この発明においては、リード又はライトアクセス動作
のアクセスデータのバイト数を検出するとともに、リー
ド又はライト動作を定義する動作設定値をセレクト手段
によりセレクトして出力し、上記バイト数及びセレクト
出力をデコードするようにしたから、リード時とライト
時とでデコードする入力及びそれに対する出力が同一と
なり、つまり信号処理パターンが半減することとなりデ
コーダの回路規模を縮小することができる。
In the present invention, the number of bytes of the access data of the read or write access operation is detected, and an operation setting value defining the read or write operation is selected and output by the selection means, and the byte number and the select output are decoded. With this arrangement, the input to be decoded and the output to be decoded become the same at the time of reading and at the time of writing, that is, the signal processing pattern is halved, and the circuit scale of the decoder can be reduced.

〔実施例〕〔Example〕

以下、この発明の一実施例を図について説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第1図はこの発明の一実施例によるDMAコントローラ
の制御回路の構成を示すブロック図である。図におい
て、101はDMA動作の状態と制御信号とを発生する状態発
生回路(状態設定手段)であり、転送要求信号線106、
動作定義レジスタ102の出力信号線107、テンポラリカウ
ンタ103のカウント値117を入力とし、アドレス制御部10
0に対する制御信号をアドレス制御線111に、テンポラリ
カウンタ103の制御信号をテンポラリカウンタ制御線108
に、さらにセレクタ105の制御信号をR/W信号線109に出
力する。
FIG. 1 is a block diagram showing a configuration of a control circuit of a DMA controller according to one embodiment of the present invention. In the figure, reference numeral 101 denotes a state generating circuit (state setting means) for generating a state of a DMA operation and a control signal.
The output signal line 107 of the operation definition register 102 and the count value 117 of the temporary counter 103 are input to the address control unit 10.
The control signal for 0 is sent to the address control line 111, and the control signal for the temporary counter 103 is sent to the temporary counter control line 108.
Then, the control signal of the selector 105 is output to the R / W signal line 109.

102は動作を定義する動作定義レジスタ(記憶手段)
であり、この動作定義レジスタ102にはリード動作を指
定するソースフィールドとライト動作を指定するディス
トネーションフィールド、一般動作を指定する動作フィ
ールドがある。
102 is an operation definition register (storage means) for defining an operation
The operation definition register 102 has a source field for specifying a read operation, a destination field for specifying a write operation, and an operation field for specifying a general operation.

103はテンポラリレジスタ(データ保持レジスタ)に
保持されているデータ数をカウントするテンポラリカウ
ンタ(アクセス検出手段)であり、動作定義レジスタ10
2の動作フィールドにある転送数の情報を出力107から取
り込み、状態発生回路101より出力されるテンポラリカ
ウンタ制御線108、及びデコーダ104からの制御信号112
を入力とし、カウンタ出力線117にカウンタ値を出力す
るとともに、R/W信号線109の状態によりカウンタ出力
値、及び反転値を選択的に出力信号線110から出力す
る。
Reference numeral 103 denotes a temporary counter (access detection means) for counting the number of data held in the temporary register (data holding register).
The information on the number of transfers in the operation field 2 is fetched from the output 107, the temporary counter control line 108 output from the state generation circuit 101, and the control signal 112 from the decoder 104.
And outputs a counter value to a counter output line 117, and selectively outputs a counter output value and an inverted value from the output signal line 110 according to the state of the R / W signal line 109.

104はアドレス制御部100とテンポラリカウンタ103に
対する制御信号を発生するデコーダ(デコード手段)で
あり、アドレス制御線100に対する制御信号をアドレス
制御線113から、テンポラリカウンタ103に対する制御信
号をテンポラリカウンタ制御信号線112から出力する。
Reference numeral 104 denotes a decoder (decoding means) for generating a control signal for the address control unit 100 and the temporary counter 103, and a control signal for the address control line 100 from the address control line 113 and a control signal for the temporary counter 103 for the temporary counter control signal line. Output from 112.

また115は動作定義レジスタ102からデコーダ104への
2つの入力のうち一方の信号を切り換えるセレクタ(セ
レクト手段)であり、動作定義レジスタ102のリード動
作定義部分、つまりソースフィールドとライト動作定義
部分、つまりディストネーションフィールドとを状態発
生回路101から出力されるR/W信号線109に従い選択し、
選択したフィールドのレジスタ内容をデコーダ104に入
力する。100は状態発生回路101とデコーダ104からの制
御信号によりアドレスバス116に出力するアドレスを生
成し出力するアドレス制御部である。アドレス制御部10
0で生成するアドレスには、リード動作で用いるソース
アドレスとライト動作で用いるディストネーションアド
レスの2つがある。
Reference numeral 115 denotes a selector (selecting means) for switching one of two signals from the operation definition register 102 to the decoder 104, and a read operation definition portion of the operation definition register 102, that is, a source field and a write operation definition portion, Select the destination field according to the R / W signal line 109 output from the state generation circuit 101,
The contents of the register in the selected field are input to the decoder 104. An address control unit 100 generates and outputs an address to be output to the address bus 116 based on control signals from the state generation circuit 101 and the decoder 104. Address control unit 10
There are two addresses generated at 0, 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バイトの
転送をする場合を例に説明する。
Hereinafter, in the operation of the present embodiment, the source and destination addresses are S + 1 and 4 respectively in the transfer of 4 bytes.
The case of D + 1 (S and D are multiples of 4), that is, the case where the source and destination both transfer the first 3 bytes and the second 1 byte will be described as an example.

転送は転送要求信号線106がアサートされることによ
り開始される。
The transfer is started when the transfer request signal line 106 is asserted.

転送要求が動作定義レジスタ102の内容とテンポラリ
カウンタ103の値と共に状態発生回路101に入力されると
状態発生回路101はリード状態になり、アドレス制御線1
11によりアドレス制御部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 together with the contents of the operation definition register 102 and the value of the temporary counter 103, the state generation circuit 101 enters a read state, and the address control line 1
A request to output the source address S + 1 and a request to count up the source address for generating the second source address are output to the address control unit 100 by 11. Since the first read is 3 bytes, the count-up value here is 3. At this time, a request for a count operation is issued to the temporary counter 103 via the temporary counter control line 108, and a read state is output from the R / W signal line 109 to the selector 105.

セレクタ105はこのR/W信号線109がリード状態である
ので動作定義レジスタ102のソースフィールドをデコー
ダ104に対して出力する。またデコーダ104は転送の開始
と共に動作定義レジスタ102のソースフィールドをセレ
クタ出力線115から、動作フィールドを動作定義レジス
タ出力信号線107から、さらにテンポラリカウンタ103の
出力値0を出力信号線110から取り込み、1回目の転送
が3バイトであることをデコードし、アドレス制御部10
0およびテンポラリカウンタ103に対するカウント値3を
制御信号として出力する。
Since the R / W signal line 109 is in the read state, the selector 105 outputs the source field of the operation definition register 102 to the decoder 104. Also, the decoder 104 captures the source field of the operation definition register 102 from the selector output line 115, the operation field from the operation definition register output signal line 107, and the output value 0 of the temporary counter 103 from the output signal line 110 at the start of the transfer. It decodes that the first transfer is 3 bytes, and the address control unit 10
It outputs 0 and the count value 3 for the temporary counter 103 as a control signal.

アドレス制御部100は状態発生回路101及びデコーダ10
4からの制御信号線111及び113を介しての入力により、
ソースアドレスのアドレスバス116への出力とカウンタ
動作を開始する。カウント動作後のソースアドレスの値
はS+4になっている。
The address control unit 100 includes a state generation circuit 101 and a decoder 10.
By input via control signal lines 111 and 113 from 4,
The output of the source address to the address bus 116 and the counter operation are started. The value of the source address after the count operation is S + 4.

テンポラリカウンタ103も同様に状態発生回路101とデ
コーダ104からの制御信号の入力により、テンポラリカ
ウント値のカウント動作を開始する。カウント動作後の
テンポラリカウント値出力信号線117のカウント値は3
となり、出力信号線110の出力(アクセスデータのバイ
ト数)も3になる。1回目の転送が終了すると、状態発
生回路101は入力である転送要求信号線106、動作定義レ
ジスタ102の内容、テンポラリカウンタ103の値を再び取
り込み、次の状態を決定する。ここでの場合、テンポラ
リカウンタ103の値が4に達していないので、次の状態
はまだリードのままであり、2回目のリード動作を開始
する。従って、状態発生回路101は1回目のリード動作
と同様にアドレス制御部100にソースアドレスS+4の
出力要求と次の転送サイクルで用いるソースアドレスを
生成するためのソースアドレスカウントアップの要求を
出す。このときテンポラリカウンタ103にもカウントア
ップ要求を出す。状態はリードであるためR/W信号線109
は依然としてリード状態を示しており、セレクタも動作
定義レジスタ102のソースフィールドをデコーダ104に出
力している。
Similarly, the temporary counter 103 starts counting the temporary count value in response to the input of the control signal from the state generating circuit 101 and the decoder 104. The count value of the temporary count value output signal line 117 after the count operation is 3
And the output of the output signal line 110 (the number of bytes of the access data) is also 3. When the first transfer is completed, the state generation circuit 101 takes in the input of the transfer request signal line 106, the contents of the operation definition register 102, and the value of the temporary counter 103 again, and determines the next state. In this case, since the value of the temporary counter 103 has not reached 4, the next state is still read, and the second read operation is started. Accordingly, the state generating circuit 101 issues a request for outputting the source address S + 4 and a request for counting up the source address for generating a source address to be used in the next transfer cycle to the address control unit 100, as in the first read operation. At this time, a count-up request is also issued to the temporary counter 103. Since the state is lead, R / W signal line 109
Still shows the read state, and the selector also outputs the source field of the operation definition register 102 to the decoder 104.

そしてデコーダ104は動作定義レジスタ102の内容とテ
ンポラリカウント103の出力値3とを取り込み、2回目
の転送が1バイトであることをデコードし、アドレス制
御部100およびテンポラリカウンタ103に対するカウント
値1を制御信号として出力する。アドレス制御部100は
状態発生回路101とデコーダ104からの制御信号の入力に
よりソースアドレスS+4のアドレスバスへの出力とカ
ウンタ動作を開始する。カウント動作後のソースアドレ
ス値はS+5になっている。このときテンポラリカウン
タ103は状態発生回路101とデコーダ104からの制御信号
の入力によりテンポラリカウント値のカウント動作を開
始する。カウント動作後のテンポラリカウント値出力線
117の値は4になっている。
Then, the decoder 104 takes in the contents of the operation definition register 102 and the output value 3 of the temporary count 103, decodes that the second transfer is 1 byte, and controls the count value 1 for the address control unit 100 and the temporary counter 103. Output as a signal. The address control unit 100 starts outputting the source address S + 4 to the address bus and starts the counter operation in response to the input of the control signal from the state generating circuit 101 and the decoder 104. The source address value after the count operation is S + 5. At this time, temporary counter 103 starts counting a temporary count value in response to input of a control signal from state generating circuit 101 and decoder 104. Temporary count value output line after count operation
The value of 117 is four.

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. Since the temporary count value is 4 this time, the next state is the write state.

ライト状態になると、状態発生回路101はアドレス制
御部100にディストネーションアドレスD+1の出力要
求と2回目の転送で用いるディストネーションアドレス
を生成するためのディストネーションアドレスのカウン
トアップ要求を出す。このときテンポラリカウンタ103
には制御線108からカウントダウン要求を出し、セレク
タ115にはR/W信号線109からライト状態を出力する。該
セレクタ105は動作定義レジスタ102のディストネーショ
ンフィールドをデコーダ104に出力する。R/W信号線109
によりライト状態になったことを検出したテンポラリカ
ウンタ103は転送サイクル中の転送バイト数からカウン
ト値を引いた反転出力(アクセスデータのバイト数)は
出力信号線110に出力する。この場合では、転送バイト
数が4であり、カウント値は4なので反転出力は0とな
る。デコーダ104は動作定義レジスタ102とテンポラリカ
ウンタ103の出力信号線110の値0とを取り込み、1回目
のライト転送が3バイトであることをデコードし、アド
レス制御部100およびテンポラリカウンタ103に対するカ
ウント値3を制御信号として出力する。
In the write state, the state generating circuit 101 issues a request for outputting the destination address D + 1 and a count-up request for the destination address for generating the destination address used in the second transfer to the address control unit 100. At this time, the temporary counter 103
, A countdown request is issued from the control line 108, and a write state is output from the R / W signal line 109 to the selector 115. The selector 105 outputs the destination field of the operation definition register 102 to the decoder 104. R / W signal line 109
The temporary counter 103 that has detected that the writing operation has entered the write state outputs an inverted output (the number of bytes of access data) obtained by subtracting the count value from the number of bytes transferred in the transfer cycle to the output signal line 110. In this case, the number of transfer 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 counts the count value 3 for the address control unit 100 and the temporary counter 103. Is output as a control signal.

アドレス制御部100は制御信号の入力によりディスト
ネーションアドレスのアドレスバス116への出力とカウ
ンタ動作を開始し、2回目のディストネーションアドレ
スD+4を生成する。テンポラリカウンタ103も制御信
号の入力によりカウント動作を行い、テンポラリカウン
ト値出力線117の値は1になる。またライト状態なので
出力信号線110の値は転送バイト数4からカウント値1
を引いた値3となる。1回目の転送が終了すると、状態
発生回路101は入力を取り込み、テンポラリカウント値
が3であるので2回目のライト動作を開始し、アドレス
制御部100にはディストネーションアドレスの出力とカ
ウントアップ要求を出し、テンポラリカウンタ103には
カウントダウン要求を出力する。デコーダ104はテンポ
ラリカウンタ103の出力信号線110の値が3なので2回目
のライトは1バイトであることをデコードし、制御信号
としてカウント値1を出力する。アドレス制御部100は
1回目と同様にディストネーションアドレスの出力とカ
ウントアップを行い、テンポラリカウンタ103もカウン
トダウンを実行し、テンポラリカウント値も出力値も0
となる。2回目のライト動作が終了すると、状態発生回
路101はテンポラリカウンタ103の出力値が0なので転送
サイクルが終了と判断し、次の転送要求がアサートされ
るまでアイドル状態となる。
The address control unit 100 starts outputting the destination address to the address bus 116 and starts the counter operation in response to the input of the control signal, and generates the second destination address D + 4. The temporary counter 103 also performs a counting operation in response to the input of the control signal, and the value of the temporary count value output line 117 becomes 1. Also, since the data is in the write state, the value of the output signal line 110 is changed from the transfer byte number 4 to the count value 1
Is subtracted by 3. When the first transfer is completed, the state generation circuit 101 takes in the input, starts the second write operation because the temporary count value is 3, and sends a destination address output and a count-up request to the address control unit 100. And outputs a countdown request to the temporary counter 103. Since the value of the output signal line 110 of the temporary counter 103 is 3, the decoder 104 decodes that the second write is 1 byte, and outputs a count value 1 as a control signal. The address control unit 100 outputs and counts up the destination address as in the first time, the temporary counter 103 also counts down, and both the temporary count value and the output value are 0.
Becomes When the second write operation is completed, the state generation circuit 101 determines that the transfer cycle is completed because the output value of the temporary counter 103 is 0, and enters the idle state until the next transfer request is asserted.

以上の説明から判るようにデコーダ104への入力であ
るテンポラリカウンタ103からの出力値はリード、ライ
トいずれの状態でも同じであり、動作定義レジスタ102
からの入力はセレクタ105で切り換えるのでデコーダ104
からは見分けがつかない。つまり、デコーダは、入力に
対するデコード出力がリード時とライト時で同じでよい
ので、リード状態、ライト状態を識別する必要が無く、
デコーダの規模は半分で済む。
As can be understood from the above description, the output value from the temporary counter 103, which is the input to the decoder 104, is the same in both the read and write states.
Input is switched by the selector 105, so the decoder 104
Is indistinguishable from. In other words, since the decoder can output the same decoded output with respect to the input at the time of reading and at the time of writing, there is no need to distinguish between the reading state and the writing state.
The size of the decoder is reduced by half.

このように本実施例では、テンポラリカウンタ103
を、リード時にはカウント値と同じ値をデコーダ104に
出力し、ライト時には転送数からカウント値を引いた反
転値をデコーダ104に出力するよう構成したので、デコ
ーダ104に入力されるテンポラリカウンタの出力はリー
ド時、ライト時にかかわらずつねに転送したバイト数を
示すことになる。さらにデコーダ104の前段にはセレク
タ105を設け、動作定義レジスタのリード動作定義部分
(ソースフィールド)とライト動作定義部分(ディスト
ネーションフィールド)とを状態により切り換えてデコ
ーダ104へ入力するようにしたので、デコーダ104にとっ
てリード時であるかライト時であるかは無関係になり、
リード時とライト時でデコードする入力及びそれに対す
る出力を同じにすることができ、これによりデコーダの
縮小及び動作時間の短縮を行なうことができる。
As described above, in the present embodiment, the temporary counter 103
When reading, the same value as the count value is output to the decoder 104, and when writing, the inverted value obtained by subtracting the count value from the number of transfers is output to the decoder 104, so that the output of the temporary counter input to the decoder 104 is It always indicates the number of bytes transferred regardless of the time of reading or writing. Further, a selector 105 is provided at a stage preceding the decoder 104, and a read operation definition portion (source field) and a write operation definition portion (destination field) of the operation definition register are switched depending on the state and input to the decoder 104. It does not matter whether the decoder 104 is reading or writing,
The input to be decoded and the output to be decoded can be made the same at the time of reading and at the time of writing, so that the decoder can be reduced in size and the operation time can be reduced.

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

以上のように本発明に係るDMAコントローラによれ
ば、リード又はライトアクセス動作のアクセスデータの
バイト数を検出するとともに、リード又はライト動作を
定義する動作設定値をセレクト手段によりセレクトして
出力し、上記バイト数及びセレクト出力をデコードする
ようにしたので、リード時とライト時とでデコードする
入力及びそれに対する出力とが同一となり、つまりデコ
ードすべき信号パターンが半減することとなり、これに
よりデコーダの回路規模を縮小することができ、またデ
コード動作の時間短縮をすることができるという効果が
ある。
As described above, according to the DMA controller of the present invention, the number of bytes of the access data of the read or write access operation is detected, and the operation setting value that defines the read or write operation is selected and output by the selection unit, and is output. Since the number of bytes and the select output are decoded, the input to be decoded and the output to the same at the time of reading and at the time of writing become the same, that is, the signal pattern to be decoded is halved. There is an effect that the scale can be reduced and the time for the decoding operation can be reduced.

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

第1図はこの発明の一実施例によるDMAコントローラの
制御回路の構成を示すブロック図、第2図は該制御回路
の動作を説明するための波形図、第3図は従来のDMAコ
ントローラの制御回路の構成を示すブロック図、第4図
は該従来回路の動作を説明するための波形図である。 100はアドレス制御回路、101は状態発生回路(状態設定
手段)、102は動作定義レジスタ(記憶手段)、103はテ
ンポラリカウンタ(アクセス検出手段)、104はデコー
ダ(デコード手段)、105はセレクタ(セレクト手段)
である。 なお図中同一符号は同一又は相当部分を示す。
FIG. 1 is a block diagram showing a 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. FIG. 4 is a block diagram showing the configuration of the circuit, and FIG. 4 is a waveform diagram for explaining the operation of the conventional circuit. 100 is an address control circuit, 101 is a state generating circuit (state setting means), 102 is an operation definition register (storage means), 103 is a temporary counter (access detecting means), 104 is a decoder (decoding means), and 105 is a selector (select). means)
It is. In the drawings, the same reference numerals indicate the same or corresponding parts.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】データ保持レジスタを有し、転送元デバイ
スから該レジスタへのデータのリードアクセス動作と、
上記レジスタから転送先デバイスへのデータのライトア
クセス動作とからなるDMA転送動作を行うDMAコントロー
ラにおいて、 上記DMA転送動作を制御する制御回路を、 上記各アクセス動作におけるアクセスデータのバイト数
を検出するアクセス検出手段と、 上記各アクセス動作を定義する動作設定値を保持する記
憶手段と、 現在のアクセス動作の状態と入力信号とに基づいて次の
アクセス動作の状態を設定する状態設定手段と、 設定されたアクセス動作の状態に基づき上記動作設定値
をリード動作とライト動作との間でセレクトして出力す
るセレクト手段と、 上記セレクト出力及びアクセス検出出力をデコードして
制御信号を出力するデコード手段とを有する回路構成と
したことを特徴とするDMAコントローラ。
1. A read access operation of data from a transfer source device to a register having a data holding register,
In a DMA controller that performs a DMA transfer operation including a write access operation of data from the register to a transfer destination device, a control circuit that controls the DMA transfer operation includes an access that detects the number of bytes of access data in each access operation. Detecting means; storage means for holding operation set values defining the above-mentioned access operations; state setting means for setting the next access operation state based on the current access operation state and an input signal; Selecting means for selecting and outputting the operation set value between the read operation and the write operation based on the state of the access operation, and decoding means for decoding the select output and the access detection output and outputting a control signal. A DMA controller characterized by having a circuit configuration including:
JP5883190A 1990-03-09 1990-03-09 DMA controller Expired - Lifetime JP2599805B2 (en)

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 JPH03260749A (en) 1991-11-20
JP2599805B2 true 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)

Also Published As

Publication number Publication date
JPH03260749A (en) 1991-11-20

Similar Documents

Publication Publication Date Title
US5630172A (en) Data transfer control apparatus wherein an externally set value is compared to a transfer count with a comparison of the count values causing a transfer of bus use right
JPH1083303A (en) Electronic circuit and method for using coprocessor
JP2599805B2 (en) DMA controller
JPS62164297A (en) Associated memory addressing method for memory and circuit thereof
KR0153537B1 (en) Signal processing structure preselecting memory address data
JP2605275B2 (en) Micro computer
JP2617132B2 (en) Direct memory access method
JPS59189433A (en) Data erasing system by direct memory access
JP2821176B2 (en) Information processing device
JPH10171654A (en) Fast data arithmetic processor
JPS61161560A (en) Memory device
JPH02136921A (en) Register access system
JP3597744B2 (en) Interrupt factor signal flag register device
JPH03214275A (en) Semiconductor integrated circuit
JPH04192054A (en) Direction memory access controller
JPH0675902A (en) Dma transfer circuit
JPS62137647A (en) Memory interface circuit
JPH01130231A (en) Interruption generation control system
JPS59157740A (en) Data transfer method of microcomputer system
JPS63253461A (en) Data transfer buffer
JPH02141851A (en) Register read-out circuit
JPH04275644A (en) Tracer
JPS6226729B2 (en)
JPH08106430A (en) Data transfer method
JPH0219932A (en) Back-up device for development of microprocessor