JPS63228254A - Dma controller - Google Patents

Dma controller

Info

Publication number
JPS63228254A
JPS63228254A JP6089487A JP6089487A JPS63228254A JP S63228254 A JPS63228254 A JP S63228254A JP 6089487 A JP6089487 A JP 6089487A JP 6089487 A JP6089487 A JP 6089487A JP S63228254 A JPS63228254 A JP S63228254A
Authority
JP
Japan
Prior art keywords
register
address
auto
dma controller
memory
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
Application number
JP6089487A
Other languages
Japanese (ja)
Inventor
Katsumasa Wada
和田 勝正
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP6089487A priority Critical patent/JPS63228254A/en
Publication of JPS63228254A publication Critical patent/JPS63228254A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bus Control (AREA)

Abstract

PURPOSE:To easily transfer data from a two-dimensionally arranged memory only by one setting by calculating the sum (or difference) between the value of an address register and that of an address operation register and storing the calculated result in the address register. CONSTITUTION:The DMA controller 12 is provided with an auto-initializing register 13 for setting up the frequency of auto-initializing in each channel, an address operation register 16 to be used for resetting an address at the time of generating auto-initializing and a means for storing the sum or difference between the contents of the registers 14, 16. In case of transferring data from the I/O to the two-dimensionally arranged memory, the transfer of all the data can be attained by setting up the registers 14 and a count register 15 in the DMA controller 12 only once.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、マイクロプロセッサとともに用いられるDM
Aコントローラに関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention is directed to a DM used with a microprocessor.
Regarding the A controller.

(従来の技術及びその問題点) 従来、この種のDMAコントローラにおいては、メモリ
へのアクセス方法が一次元的であった。すなわち、マイ
クロプロセッサからの1回の設定では、連続したメモリ
アドレスのデータ転送しか行なえなかった。今、メモリ
アドレスを平面的に横Xワード、縦Zワード並べたもの
を考える。最初のメモリアドレスをOとすると、1ライ
ン目のメモリアドレスは、0,1.・・・、x−1,2
ライン目は、X 、 X + 1 、− 、2 X −
1、aライン口は、Ca−1)X、(CE−1)X+1
.−、aX  Iとなる。このように並べた場合に、第
3図における斜線部分の四角領域(1ラインはXワード
より小)を第4図における斜線部分の領域へDMAコン
トローラを用いて移動させる場合、マイクロプロセッサ
は、DMAコントローラに各ラインごとにアドレスレジ
スタ、カウントレジスタの設定を行なわなければならず
、マイクロプロセッサの負担が非常に大きくなるととも
に、ソフトウェアにおけるこの処理が占める割合が増え
、ソフトウニアカ1複雑になっていた。
(Prior Art and its Problems) Conventionally, in this type of DMA controller, the method of accessing the memory has been one-dimensional. That is, a single setting from the microprocessor can only transfer data from consecutive memory addresses. Now, consider memory addresses arranged horizontally by X words horizontally and by Z words vertically. If the first memory address is O, then the memory address of the first line is 0, 1, . ..., x-1,2
Lines are X, X + 1, -, 2 X -
1. A line port is Ca-1)X, (CE-1)X+1
.. -, aX I. When arranged in this way, if the DMA controller is used to move the square area (one line is smaller than X words) in the shaded area in FIG. 3 to the area in the shaded area in FIG. Address registers and count registers had to be set for each line in the controller, which placed a huge burden on the microprocessor, and the proportion of this processing in the software increased, making the software even more complex. .

(発明の目的及び問題点解決の手段) 本発明は、このような従来の問題点を解決するものであ
り、DMAコントローラの各チャネルごとにオートイニ
シャライズレジスタ、アドレスオペレーションレジスタ
、アドレスレジスタとアドレスオペレーションレジスタ
の和(又は差)を計算し、アドレスレジスタに格納する
手段とを設け、二次元的なメモリアクセスを行なうこと
ができる優れたDMAコン1〜〇−ラを提供することを
目的とするものである。
(Objective of the Invention and Means for Solving Problems) The present invention solves these conventional problems, and includes an auto-initialization register, an address operation register, an address register, and an address operation register for each channel of a DMA controller. The purpose of this invention is to provide an excellent DMA controller that can perform two-dimensional memory access by providing means for calculating the sum (or difference) of and storing it in an address register. be.

(作 用) したがって、本発明によれば、マイクロプロセッサから
1回の設定により、二次元的に配置されたメモリから(
またはメモリへ)データ転送を行なうことが容易にでき
るという効果を有する。
(Function) Therefore, according to the present invention, by one setting from the microprocessor, (
This has the advantage that data transfer (or to memory) can be easily performed.

(実施例) 第1図は、本発明の一実施例の構成を示すものである。(Example) FIG. 1 shows the configuration of an embodiment of the present invention.

第1図において、11はDMAコントローラ12にアド
レス、カウント情報等を設定するマイクロプロセッサ、
13から22はDMAコントローラ12を機能及びレジ
スタ種で分類したもので、13はオートイニシャライズ
の回数を設定するレジスタ(ここではオートイニシャラ
イズレジスタと呼ぶ)、14はDMAコントローラ12
がアドレスを発生するときに用いるアドレスレジスタ、
15はDMAコントローラ12がデータ転送を何回行な
うかが設定されているカウントレジスタ、16はオート
イニシャライズが発生したときにアドレスレジスタ14
と数値演算を行なうレジスタ(ここではアドレスオペレ
ーションレジスタと呼ぶ)、17はDMAコントローラ
12をデータバス幅、バスモード、DMAリクエストレ
ベル、DMAACKレベル、モード等の制御情報を設定
するコントロールレジスタ、18は一連のDMA転送を
残り何回行なうかを保持しているテンポラリカウントレ
ジスタ、19はメモリに対してアドレスを発生するアド
レス発生部、20は今、DMA転送をどのメモリのアド
レスに対して行なっているかを保持しているテンポラリ
アドレスレジスタ、21はメモリまたはIloに対して
制御信号、アドレス等のタイミングを制御しているタイ
ミング発生部、22は13から21のレジスタ及び機能
部分を制御している制御部である。第1図において、矢
印(啼)はマイクロプロセッサ11がDMAコントロー
ラ12に対してコマンド、制御情報等を設定することを
意味する。また、矢印(←。
In FIG. 1, 11 is a microprocessor that sets addresses, count information, etc. in the DMA controller 12;
13 to 22 classify the DMA controller 12 by function and register type, 13 is a register for setting the number of auto-initializations (herein referred to as an auto-initialization register), and 14 is a DMA controller 12
address register used when generating an address,
15 is a count register in which the number of data transfers is set by the DMA controller 12, and 16 is an address register 14 that is set when auto-initialization occurs.
17 is a control register for setting the DMA controller 12 with control information such as data bus width, bus mode, DMA request level, DMA ACK level, mode, etc., and 18 is a series of registers for performing numerical operations. 19 is an address generator that generates an address for the memory; 20 is a register that indicates which memory address the DMA transfer is currently being performed to; 21 is a timing generation unit that controls the timing of control signals, addresses, etc. for memory or Ilo; 22 is a control unit that controls the registers and functional parts from 13 to 21; be. In FIG. 1, arrows (arrows) mean that the microprocessor 11 sets commands, control information, etc. to the DMA controller 12. Also, the arrow (←.

→)は外部からのDMAリクエスト及びDMAACKの
制御信号である。
→) is an external DMA request and DMAACK control signal.

次に、上記実施例の動作について、第2図のフローチャ
ートを用いて説明する。今、16ビツト(1ワードとす
る)データバス幅のIloから16ビツトデータバス幅
のメモリへのデータ転送を、16ビツトデータバス幅の
DMAコントローラ12が行なうことを考える。ここで
は、DMAコントローラ12のチャネルOを使うものと
し、DMAコントローラ12のコントロールレジスタ1
7は、既にマイクロプロセッサ11により設定が済んで
いるものとする。まず、ステップ31の過程で、マイク
ロプロセッサ11がDMAコントローラ12のオートイ
ニシャライズレジスタ13にオートイニシャライズを行
なう回数を設定する。ステップ32の過程で、マイクロ
プロセッサ11がDMAコントローラ12のアドレスレ
ジスタ14にデータ転送先アドレスの先頭を設定する。
Next, the operation of the above embodiment will be explained using the flowchart shown in FIG. Now, consider that the DMA controller 12 with a 16-bit data bus width transfers data from Ilo, which has a data bus width of 16 bits (one word), to a memory with a data bus width of 16 bits. Here, it is assumed that channel O of the DMA controller 12 is used, and control register 1 of the DMA controller 12 is used.
7 has already been set by the microprocessor 11. First, in step 31, the microprocessor 11 sets the number of times auto-initialization is to be performed in the auto-initialization register 13 of the DMA controller 12. In the process of step 32, the microprocessor 11 sets the beginning of the data transfer destination address in the address register 14 of the DMA controller 12.

ステップ33の過程で、マイクロプロセッサ11がDM
Aコントローラ12のアドレスオペレーションレジスタ
16にオートイニシャライズが発生したときにアドレス
レジスタ14に加算(または減算)するアドレス情報を
設定する。ステップ34の過程で、マイクロプロセッサ
11がDMAコントローラ12のカウントレジスタ15
に一連のDMA動作を行なう回数を設定する。ステップ
35の過程で、カウントレジスタ15の内容をテンポラ
リカウントレジスタ18へ転送する。ステップ36の過
程で、アドレスレジスタ14の内容をテンポラリアドレ
スレジスタ20へ転送する。ステップ37の過程で、外
部からのDMAリクエストがあるかどうか判定する。
In the process of step 33, the microprocessor 11
Address information to be added to (or subtracted from) the address register 14 when auto-initialization occurs in the address operation register 16 of the A controller 12 is set. During step 34, the microprocessor 11 registers the count register 15 of the DMA controller 12.
The number of times a series of DMA operations will be performed is set in . In the course of step 35, the contents of the count register 15 are transferred to the temporary count register 18. During step 36, the contents of address register 14 are transferred to temporary address register 20. In the process of step 37, it is determined whether there is an external DMA request.

D M Aリクエストがなければ、ステップ37の過程
へ戻る。DMAリクエトがあれば、ステップ38の過程
でDMAの動作を行なう。ステップ39の過程で、テン
ポラリカウントレジスタ18の内容を1減する。ステッ
プ40の過程で、テンポラリカウントレジスタ18の内
容がOであるか判定する。内容が0であれば、ステップ
41の過程で、オートイニシャライズレジスタ13の内
容を1減する。ステップ42の過程で、オートイニシャ
ライズレジスタ13の内容が0であれば、DMAの動作
を終了する。ステップ40の過程で、テンポラリカウン
トレジスタ18の内容がOでなければ、ステップ43の
過程で、テンポラリアドレスレジスタ20の内容を2加
算し、ステップ37の過程へ戻る。ステップ42の過程
で、オートイニシャライズレジスタ13の内容がOでな
ければ、ステップ44の過程で、アドレスレジスタ14
とアドレスオペレーションレジスタ16の内容を加算し
たものをアドレスレジスタ14へ転送し、ステップ35
の過程へ戻る。
If there is no DMA request, the process returns to step 37. If there is a DMA request, a DMA operation is performed in step 38. In the process of step 39, the contents of the temporary count register 18 are decremented by one. In the process of step 40, it is determined whether the content of the temporary count register 18 is O. If the content is 0, the content of the auto-initialize register 13 is decremented by 1 in the process of step 41. In the process of step 42, if the content of the auto-initialize register 13 is 0, the DMA operation is terminated. If the content of the temporary count register 18 is not O in the process of step 40, then 2 is added to the content of the temporary address register 20 in the process of step 43, and the process returns to step 37. In the process of step 42, if the content of the auto-initialize register 13 is not O, in the process of step 44, the address register 14
and the contents of the address operation register 16 are transferred to the address register 14, and step 35
Return to the process.

このように、上記実施例によれば、Iloから二次元的
に配置されたメモリへデータを転送する場合に、マイク
ロプロセッサ11からD M Aコントローラ12のア
ドレスレジスタ14及びカウントレジスタ15への設定
が、1回だけですべての転送を行なうことができる。
As described above, according to the above embodiment, when data is transferred from Ilo to two-dimensionally arranged memory, the settings from the microprocessor 11 to the address register 14 and count register 15 of the DMA controller 12 are , all transfers can be performed only once.

さらに、DMAコントローラ12の2チヤネルを用いる
ことにより、メモリ・メモリ間の転送も二次元的に配置
されているメモリアドレスに対して1回の設定によりす
べてのデータ転送を行なうことができる。
Furthermore, by using two channels of the DMA controller 12, all data transfer between memories can be performed by one setting for memory addresses arranged two-dimensionally.

(発明の効果) 本発明は、上記実施例から明らかなように、二次元的に
配置されたメモリからIloへデータ転送を行なう場合
、又二次元的に配置されたメモリへIloからデータ転
送を行なう場合、及び二次元的に配置されたメモリから
二次元的に配置されたメモリへデータ転送を行なう場合
に、DMAコン1−ローラへの設定が1回ですべてのデ
ータ転送が終了するという効果を有するものである。
(Effects of the Invention) As is clear from the embodiments described above, the present invention is applicable when data is transferred from a two-dimensionally arranged memory to Ilo, and when data is transferred from Ilo to a two-dimensionally arranged memory. When transferring data from two-dimensionally arranged memory to two-dimensionally arranged memory, the effect is that all data transfer can be completed with one setting to the DMA controller 1-roller. It has the following.

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

第1図は、本発明の一実施例におけるD M Aコント
ローラの内部ブロック図、第2図は、DMAコントロー
ラを制御する場合のプログラムの一例及びDMAコント
ローラの動作例を説明するためのフローチャート、第3
図及び第4図は、二次元的に配置されたメモリからメモ
リへデータ転送を行なうときの説明図である。 11・・・マイクロプロセッサ、 12・・・DMAコ
ントローラ、 13・・・オートイニシャライズレジス
タ、14・・・アドレスレジスタ、 15・・・カウン
トレジスタ、 16・・・アドレスオペレーションレジ
スタ、 17・・・コントロールレジスタ、 18・・
・テンポラリカランlレジスタ、 19・・・アドレス
発生部、 20・・・テンポラリアドレスレジスタ、 
21・・・タイミング発生部、22・・・制御部。 特許出願人 松下電器産業株式会社 第1因 D M Aソ Cり にエ ス ト 第3図 第4図
FIG. 1 is an internal block diagram of a DMA controller in an embodiment of the present invention, FIG. 2 is a flowchart for explaining an example of a program for controlling the DMA controller and an example of the operation of the DMA controller, 3
4 and 4 are explanatory diagrams when data is transferred from two-dimensionally arranged memory to memory. DESCRIPTION OF SYMBOLS 11... Microprocessor, 12... DMA controller, 13... Auto initialize register, 14... Address register, 15... Count register, 16... Address operation register, 17... Control register , 18...
・Temporary callan l register, 19...Address generation section, 20...Temporary address register,
21... Timing generation section, 22... Control section. Patent Applicant: Matsushita Electric Industrial Co., Ltd. 1st Cause D M A So C Rini Est Figure 3 Figure 4

Claims (1)

【特許請求の範囲】[Claims] メモリとメモリ間のデータ転送機能、メモリとI/O間
のデータ転送機能、オートイニシャライズ機能、複数チ
ャネルのDMAリクエスト、チャネルごとに設定できる
アドレスレジスタ、カウントレジスタ及びテンポラリア
ドレスレジスタ、テンポラリカウントレジスタを有する
DMA(ダイレクトメモリアクセス)コントローラにお
いて、各チャネルごとにオートイニシャライズの回数を
設定できるオートイニシャライズレジスタと、オートイ
ニシャライズが発生したときにアドレスを再設定するた
めに用いるアドレスオペレーションレジスタと、アドレ
スレジスタとアドレスオペレーションレジスタの内容の
和又は差をアドレスレジスタに格納する手段とを設けた
ことを特徴とするDMAコントローラ。
Has data transfer function between memory and memory, data transfer function between memory and I/O, auto-initialization function, DMA request for multiple channels, address register, count register, temporary address register, and temporary count register that can be set for each channel. In a DMA (direct memory access) controller, there is an auto-initialize register that can set the number of auto-initializations for each channel, an address operation register that is used to reset the address when auto-initialization occurs, and an address register and address operation. A DMA controller comprising means for storing the sum or difference of register contents in an address register.
JP6089487A 1987-03-18 1987-03-18 Dma controller Pending JPS63228254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6089487A JPS63228254A (en) 1987-03-18 1987-03-18 Dma controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6089487A JPS63228254A (en) 1987-03-18 1987-03-18 Dma controller

Publications (1)

Publication Number Publication Date
JPS63228254A true JPS63228254A (en) 1988-09-22

Family

ID=13155520

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6089487A Pending JPS63228254A (en) 1987-03-18 1987-03-18 Dma controller

Country Status (1)

Country Link
JP (1) JPS63228254A (en)

Similar Documents

Publication Publication Date Title
JPH02235156A (en) Information processor
JP2845433B2 (en) Integrated circuit device
JPS63228254A (en) Dma controller
JP2755039B2 (en) Register access control method
JP3614714B2 (en) DMA controller
JP3007923B2 (en) Data transfer method and system
JPS63163560A (en) Information processor
JP2972557B2 (en) Data transfer control device and control method
JPS62221059A (en) Central processing unit
JPH0668022A (en) Direct memory access device
JP2687716B2 (en) Information processing device
JPH0279147A (en) Information processor
JP2002024157A (en) Method and device for processing dma
JPH04333952A (en) Dma control lsi
JPS6020263A (en) Selection system of input/output unit
JPS6336021B2 (en)
JPH02148122A (en) Magnetic disk controller
JPH01181142A (en) Parity control system for dual port memory
JPS59173827A (en) Direct memory access control device
JPH05128279A (en) One-chip microcomputer
JPS59189433A (en) Data erasing system by direct memory access
JPH04248652A (en) Dma controller
JPH04262449A (en) Data transfer system
JPS59119456A (en) Access system of segmented memory
JPS5896329A (en) Direct memory access control method