JP2000010908A - Dma controller - Google Patents

Dma controller

Info

Publication number
JP2000010908A
JP2000010908A JP10176410A JP17641098A JP2000010908A JP 2000010908 A JP2000010908 A JP 2000010908A JP 10176410 A JP10176410 A JP 10176410A JP 17641098 A JP17641098 A JP 17641098A JP 2000010908 A JP2000010908 A JP 2000010908A
Authority
JP
Japan
Prior art keywords
transfer
dma
address
latch
register
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
JP10176410A
Other languages
Japanese (ja)
Inventor
Toshihiro Abe
俊広 阿部
Sei Adachi
聖 安達
Danichi Komatsu
壇一 小松
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 JP10176410A priority Critical patent/JP2000010908A/en
Publication of JP2000010908A publication Critical patent/JP2000010908A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To avoid a runaway occurring when a process is performed again in array chain transfer mode and restarted after being interrupted by providing a latch circuit which stores the head address of a transfer parameter memory and a latch circuit which stores the number of all transfer blocks transferred to a TCR latch. SOLUTION: The latch circuit SAR latch 2 of a transfer source address register and a register FBSAR 11 which stores the head address of the transfer parameter memory dedicated to the array chain transfer mode are provided in the same addresses where a transfer source address register is set. In the same addresses where a transfer counter register is set, a TCR latch 6 and a register FBTCR 12 which stores the total number of transfer block are provided. Consequently, when a DMA request for the same DMA transfer is accepted, the head address of the transfer parameter memory is specified from the FBSAR 11 and the contents of the FBTCR 12 are transferred to the TCR latch 6, so an array state operates normally and no runaway is caused.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、CPUを介さず
にデータを転送する機能を備えたDMA(Direct
Memory Access)コントローラに関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a DMA (Direct) having a function of transferring data without a CPU.
Memory Access) controller.

【0002】[0002]

【従来の技術】従来のDMAコントローラは、予め転送
パラメータ(転送元転送開始番地、転送先転送開始番
地、転送データのバイト数)をDMA関連レジスタに記
憶させておき、DMA許可状態のときにDMA転送要求
が入ると、CPUを介さずに前記レジスタの値をもとに
メモリ間でデータ転送を行うものである。
2. Description of the Related Art A conventional DMA controller previously stores transfer parameters (a transfer start address of a transfer source, a transfer start address of a transfer destination, and the number of bytes of transfer data) in a DMA-related register. When a transfer request is received, data is transferred between memories based on the value of the register without going through the CPU.

【0003】図8は、このDMAコントローラの構成を
説明する図であり、図8において、1は転送元アドレス
レジスタ(SAR)、2は転送元アドレスレジスタ1の
SARラッチ、3は転送先アドレスレジスタ(DA
R)、4は転送先アドレスレジスタ3のDARラッチ、
5は転送カウンタレジスタ(TCR)、6は転送カウン
タレジスタ5のTCRラッチ、7はDMAラッチ、8は
インクリメンタ/デクリメンタ、9はデクリメンタ、5
0はメモリである。
FIG. 8 is a diagram for explaining the configuration of this DMA controller. In FIG. 8, reference numeral 1 denotes a transfer source address register (SAR), 2 denotes a SAR latch of the transfer source address register 1, and 3 denotes a transfer destination address register. (DA
R), 4 is a DAR latch of the transfer destination address register 3,
5 is a transfer counter register (TCR), 6 is a TCR latch of the transfer counter register 5, 7 is a DMA latch, 8 is an increment / decrementer, 9 is a decrementer,
0 is a memory.

【0004】次に動作について説明する。先ず、転送元
アドレスレジスタ1、転送先アドレスレジスタ3、およ
び転送カウンタレジスタ5に転送パラメータのデータを
書き込むと同時に、SARラッチ2、DARラッチ4、
TCRラッチ6にも同じ内容が書き込まれる。
Next, the operation will be described. First, at the same time as writing the transfer parameter data to the transfer source address register 1, the transfer destination address register 3, and the transfer counter register 5, the SAR latch 2, the DAR latch 4,
The same contents are written in the TCR latch 6.

【0005】DMA許可状態のときにDMA要求が入る
と、先ず読出サイクルを行う。この読出サイクルでは、
転送元アドレスレジスタ1のSARラッチ2で転送元番
地を指定し、次に、デクリメンタ9で転送カウンタレジ
スタ5の内容を更新し、インクリメンタ/デクリメンタ
8で転送元アドレスレジスタ1の内容を更新する。そし
て、メモリ50からデータを読み出し、DMAラッチ7
で保持する。
[0005] When a DMA request is received in the DMA enabled state, a read cycle is first performed. In this read cycle,
The transfer source address is specified by the SAR latch 2 of the transfer source address register 1, then the contents of the transfer counter register 5 are updated by the decrementer 9, and the contents of the transfer source address register 1 are updated by the increment / decrementer 8. Then, data is read from the memory 50 and the DMA latch 7
Hold with.

【0006】一方、書込サイクルでは転送先アドレスレ
ジスタ3で転送先番地を指定し、インクリメンタ/デク
リメンタ8で転送先アドレスレジスタ3の内容を更新す
る。そして、DMAラッチ7の内容をメモリ50に書き
込み、転送カウンタレジスタ5の値が“0”になるまで
これを繰り返す。ただし、上記のような単転送モードで
は、ブロックの最初の転送時のみ、SARラッチ2、D
ARラッチ4、TCRラッチ6から値を読み出して使用
する。インクリメンタ/デクリメンタ8で更新した結果
は、転送元アドレスレジスタ1、転送先アドレスレジス
タ3、転送カウンタレジスタ5に書き込む。また、ブロ
ックの最初の転送以外は転送元アドレスレジスタ1、転
送先アドレスレジスタ3、転送カウンタレジスタ5以外
から値を読み出して使用する。これにより、DMA転送
が正常に終了した後、再度DMA許可ビットをセット
し、DMA要求を入れると、SARラッチ2、DARラ
ッチ4、TCRラッチ6にはブロックの最初の転送パラ
メータのデータが記憶されているため、また同じDMA
転送を最初から再開できる。
On the other hand, in the write cycle, the transfer destination address is specified by the transfer destination address register 3 and the contents of the transfer destination address register 3 are updated by the increment / decrementer 8. Then, the contents of the DMA latch 7 are written into the memory 50, and this operation is repeated until the value of the transfer counter register 5 becomes "0". However, in the single transfer mode as described above, the SAR latch 2, D
Values are read from the AR latch 4 and the TCR latch 6 and used. The result updated by the increment / decrementer 8 is written to the transfer source address register 1, the transfer destination address register 3, and the transfer counter register 5. Also, except for the first transfer of the block, values are read from other than the transfer source address register 1, transfer destination address register 3, and transfer counter register 5 and used. As a result, after the DMA transfer is normally completed, the DMA permission bit is set again, and when a DMA request is input, the data of the first transfer parameter of the block is stored in the SAR latch 2, the DAR latch 4, and the TCR latch 6. The same DMA
Transfer can be resumed from the beginning.

【0007】一方、複数ブロックのデータを転送するア
レイチェーン転送モードの場合、メモリ領域に設定され
た各ブロックの情報(転送元転送開始番地、転送先転送
開始番地、転送データのバイト数)に従って、複数ブロ
ックのデータを転送する。先ず、図9に示すように転送
パラメータを任意のメモリ領域にあらかじめ書き込んで
おく。転送パラメータは連続して配置する。また、プロ
グラムで転送元アドレスレジスタ1、SARラッチ2に
は最初のブロックの転送パラメータメモリの先頭番地
を、転送カウンタレジスタ5、TCRラッチ6には転送
ブロック数を書き込んでおく。
On the other hand, in the case of the array chain transfer mode for transferring data of a plurality of blocks, according to the information of each block (the transfer start address of the transfer source, the transfer start address of the transfer destination, and the number of bytes of the transfer data) set in the memory area. Transfer multiple blocks of data. First, as shown in FIG. 9, transfer parameters are written in an arbitrary memory area in advance. Transfer parameters are arranged continuously. In the program, the start address of the transfer parameter memory of the first block is written in the transfer source address register 1 and the SAR latch 2, and the number of transfer blocks is written in the transfer counter register 5 and the TCR latch 6.

【0008】DMA許可状態でDMA要求が入ると、先
ず、転送元アドレスレジスタ1はSARラッチ2から任
意のメモリ領域に書き込まれている転送パラメータメモ
リの最初のブロックの先頭番地を指定する。そして、転
送パラメータメモリの情報(転送元転送開始番地、転送
先転送開始番地、転送データのバイト数)を1ブロック
分だけ、転送元アドレスレジスタ1、転送先アドレスレ
ジスタ3、転送カウンタレジスタ5に順に書き込む。転
送元アドレスレジスタ1、転送先アドレスレジスタ3、
転送カウンタレジスタ5は、DMA関連レジスタとして
連続して配置されている。このとき、SARラッチ2
は、読み出している転送パラメータメモリのアドレスを
順にデクリメントして格納していく。
When a DMA request is received in the DMA enabled state, first, the transfer source address register 1 designates the start address of the first block of the transfer parameter memory written in an arbitrary memory area from the SAR latch 2. Then, the information (transfer source transfer start address, transfer destination transfer start address, number of bytes of transfer data) of the transfer parameter memory is sequentially transferred to the transfer source address register 1, the transfer destination address register 3, and the transfer counter register 5 for one block. Write. Source address register 1, destination address register 3,
The transfer counter register 5 is continuously arranged as a DMA-related register. At this time, the SAR latch 2
Sequentially decrements the address of the transfer parameter memory that is being read and stores it.

【0009】この場合、転送パラメータメモリから転送
パラメータを順番に読み出して転送元アドレスレジスタ
1、転送先アドレスレジスタ3、転送カウンタレジスタ
5に書き込むサイクルをアレイステートと呼ぶ。
In this case, a cycle in which the transfer parameters are sequentially read from the transfer parameter memory and written into the transfer source address register 1, the transfer destination address register 3, and the transfer counter register 5 is called an array state.

【0010】アレイステートが一旦終了すると、TCR
ラッチ6に格納されている転送ブロック数の値がデクリ
メントされて再度TCRラッチ6に格納される。また、
このとき、SARラッチ2には次のブロックの転送パラ
メータメモリの先頭番地の値が格納される。
Once the array state is completed, the TCR
The value of the transfer block number stored in the latch 6 is decremented and stored in the TCR latch 6 again. Also,
At this time, the value of the start address of the transfer parameter memory of the next block is stored in the SAR latch 2.

【0011】アレイステートによって転送元アドレスレ
ジスタ1、転送先アドレスレジスタ3、転送カウンタレ
ジスタ5にそれぞれ格納された転送元転送開始番地、転
送先転送開始番地、転送データのバイト数のデータをも
とに、ブロック分のDMA転送を行う。これを転送ステ
ートと呼ぶ。
The transfer source address, transfer destination address, and the number of bytes of the transfer data stored in the transfer source address register 1, the transfer destination address register 3, and the transfer counter register 5, respectively, depending on the array state. , DMA transfer for blocks. This is called a transfer state.

【0012】アレイチェーン転送モードにおいては、S
ARラッチ2は転送パラメータメモリの番地を格納し、
転送元アドレスレジスタ1は次の転送元番地を格納す
る。DARラッチ4は使用せず、転送先アドレスレジス
タ3は次の転送先番地を格納する。TCRラッチ6は残
りの転送ブロック数を格納し、転送カウンタレジスタ5
は転送中のブロックの残りバイト数を格納するために使
われる。
In the array chain transfer mode, S
The AR latch 2 stores the address of the transfer parameter memory,
The transfer source address register 1 stores the next transfer source address. The DAR latch 4 is not used, and the destination address register 3 stores the next destination address. The TCR latch 6 stores the number of remaining transfer blocks,
Is used to store the number of bytes remaining in the block being transferred.

【0013】転送ステートが終了すると、TCRラッチ
6に格納されている残りのブロック数が“0”でない場
合、転送元アドレスレジスタ1は、SARラッチ2に番
地が格納されているブロックの次のブロックの転送パラ
メータメモリの先頭番地のアドレスを指定する。そし
て、また次の1ブロック分の転送パラメータメモリの値
を転送元アドレスレジスタ1、転送先アドレスレジスタ
3、転送カウンタレジスタ5に書き込み、次の転送ステ
ートを実行する。TCRラッチ6に格納されている残り
のブロック数の値が“0”になり、かつ転送カウンタレ
ジスタ5の値が“0”になると、正常終了する。このと
き、SARラッチ2の値は、アレイステートの間、デク
リメントを続行していたため、転送パラメータメモリの
最後の番地の次の番地の値が格納されている。
When the transfer state ends, if the number of remaining blocks stored in the TCR latch 6 is not "0", the transfer source address register 1 stores the next block after the block in which the address is stored in the SAR latch 2. Designates the address of the start address of the transfer parameter memory. Then, the value of the transfer parameter memory for the next one block is written to the transfer source address register 1, the transfer destination address register 3, and the transfer counter register 5, and the next transfer state is executed. When the value of the number of remaining blocks stored in the TCR latch 6 becomes “0” and the value of the transfer counter register 5 becomes “0”, the process ends normally. At this time, since the value of the SAR latch 2 continues to be decremented during the array state, the value of the address next to the last address of the transfer parameter memory is stored.

【0014】アレイチェーン転送モードで正常終了した
場合、再度同じDMA転送を行おうとして、単転送モー
ドの場合と同じようにDMA許可ビットをセットしてD
MA要求を入れると、SARラッチ2には転送パラメー
タメモリの最後の番地の次の番地の値が格納されている
ため、アレイステートでこの番地を指定してしまう。こ
の番地から先には何もデータが格納されていないため、
アレイステート時に転送元アドレスレジスタ1、転送先
アドレスレジスタ3、転送カウンタレジスタ5に不定値
がそれぞれ格納され、転送ステートに移行してから暴走
してしまう。
When the transfer is normally completed in the array chain transfer mode, the same DMA transfer is performed again, and the DMA permission bit is set in the same manner as in the single transfer mode.
When the MA request is input, the value of the address next to the last address of the transfer parameter memory is stored in the SAR latch 2, and this address is specified in the array state. No data is stored beyond this address,
In the array state, indeterminate values are respectively stored in the transfer source address register 1, the transfer destination address register 3, and the transfer counter register 5, and a runaway occurs after the transfer to the transfer state.

【0015】従って、正常終了した後にまた同じDMA
転送を再開するためには、単転送モードの場合、DMA
許可ビットをセットしてDMA要求を入れるだけでよか
ったが、アレイチェーン転送モードの場合、再度、プロ
グラムで転送元アドレスレジスタ1、SARラッチ2に
最初のブロックの転送パラメータメモリの先頭番地を、
転送カウンタレジスタ5、TCRラッチ6に転送ブロッ
ク数を書き込み、DMA許可ビットをセットしてDMA
要求を入れなければならない。
Therefore, after the normal end, the same DMA
To resume the transfer, in the single transfer mode,
All that was required was to set the enable bit and enter the DMA request. However, in the case of the array chain transfer mode, the start address of the transfer parameter memory of the first block is again stored in the transfer source address register 1 and the SAR latch 2 by the program.
The number of transfer blocks is written to the transfer counter register 5 and the TCR latch 6, and the DMA
I have to put a request.

【0016】また、アレイステート中にDMA転送を強
制的に中断した場合、SARラッチ2の値は転送パラメ
ータメモリのブロックの途中のアドレスの値が格納され
た状態になり、次のブロックの転送パラメータメモリの
先頭番地のアドレス値が格納されない。よって、転送を
再開しようとして、そのままDMA許可ビットをセット
してDMA要求を入れると、アレイステートが途中から
始まり、転送ステートに移った直後、暴走する。また、
アレイステート中にDMA転送を強制的に中断した場合
も、再開するためには再度、プログラムで転送元アドレ
スレジスタ1、SARラッチ2に最初のブロックの転送
パラメータメモリの先頭番地を、転送カウンタレジスタ
5、TCRラッチ6に転送ブロック数を書き込まなけれ
ばならない。
If the DMA transfer is forcibly interrupted during the array state, the value of the address in the middle of the block of the transfer parameter memory is stored in the value of the SAR latch 2 and the transfer parameter of the next block is stored. The address value of the start address of the memory is not stored. Therefore, if the DMA permission bit is set as it is to restart the transfer and a DMA request is input, the array state starts from the middle and goes out of control immediately after the transfer to the transfer state. Also,
Even if the DMA transfer is forcibly interrupted during the array state, the start address of the transfer parameter memory of the first block is stored in the transfer source address register 1 and the SAR latch 2 again by the program to restart the transfer. , TCR latch 6 must be written with the number of transfer blocks.

【0017】[0017]

【発明が解決しようとする課題】従来のDMAコントロ
ーラは以上のように構成されているので、アレイチェー
ン転送モードにおいては、一度だけ実行する場合は問題
ないが、何度も実行したり、中断して再開したりするよ
うな場合には、前述したように注意してプログラムを構
成しなければ暴走する課題があった。
Since the conventional DMA controller is configured as described above, in the array chain transfer mode, there is no problem if it is executed only once, but it is executed many times or interrupted. In such a case, if the program is restarted, there is a problem of runaway unless the program is carefully configured as described above.

【0018】この発明は上記のような課題を解決するた
めになされたもので、アレイチェーン転送モードにおい
て、再実行したり、一度中断した後に再開するような場
合における暴走を回避できるDMAコントローラを得る
ことを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problem, and provides a DMA controller which can avoid runaway in the case of re-executing or resuming after interrupting once in the array chain transfer mode. The purpose is to:

【0019】[0019]

【課題を解決するための手段】この発明に係るDMAコ
ントローラは、アレイチェーン転送開始時に指定される
転送パラメータメモリの先頭番地を格納しておくための
第1のラッチ回路と、アレイチェーン転送時にTCRラ
ッチへ転送される全転送ブロック数を格納しておくため
の第2のラッチ回路とを備えるようにしたものである。
A DMA controller according to the present invention includes a first latch circuit for storing a start address of a transfer parameter memory designated at the start of an array chain transfer, and a TCR at the time of an array chain transfer. And a second latch circuit for storing the total number of transfer blocks transferred to the latch.

【0020】この発明に係るDMAコントローラは、第
1のラッチ回路および第2のラッチ回路を特定の番地に
割り当てられたレジスタにしたものである。
In the DMA controller according to the present invention, the first latch circuit and the second latch circuit are registers assigned to specific addresses.

【0021】この発明に係るDMAコントローラは、転
送パラメータメモリが特定の記憶領域に割り当てられ、
先頭番地が特定の番地に固定されており、アレイステー
トおよび転送ステートでは、アレイチェーン転送を開始
するとき、前記先頭番地から転送パラメータのデータを
読み出し、それぞれ転送元アドレスレジスタ、転送先ア
ドレスレジスタおよび転送カウンタレジスタに書き込ん
だ後、DMA転送を開始するようにしたものである。
In the DMA controller according to the present invention, the transfer parameter memory is allocated to a specific storage area,
The start address is fixed to a specific address. In the array state and the transfer state, when starting the array chain transfer, the transfer parameter data is read from the start address, and the transfer source address register, the transfer destination address register and the transfer After writing to the counter register, the DMA transfer is started.

【0022】この発明に係るDMAコントローラは、ア
レイチェーン転送開始時、転送パラメータメモリ領域を
自由に設定するか、固定するかを選択する選択ビットを
設けるようにしたものである。
In the DMA controller according to the present invention, at the start of the array chain transfer, a selection bit for selecting whether the transfer parameter memory area is freely set or fixed is provided.

【0023】この発明に係るDMAコントローラは、ア
レイチェーン転送中、第1のラッチ回路および第2のラ
ッチ回路の値を、DMA転送が進むに従ってデクリメン
トするデクリメント手段を有し、強制的にDMA転送を
中断した後、再びDMA転送を開始する際、前記デクリ
メント手段によりデクリメントされた前記第1のラッチ
回路および前記第2のラッチ回路の値をもとにDMA転
送途中のブロックの最初からDMA転送を再開するよう
にしたものである。
The DMA controller according to the present invention has decrement means for decrementing the values of the first latch circuit and the second latch circuit during the array chain transfer as the DMA transfer progresses, and forcibly executes the DMA transfer. When the DMA transfer is started again after the interruption, the DMA transfer is restarted from the beginning of the block during the DMA transfer based on the values of the first latch circuit and the second latch circuit decremented by the decrement means. It is something to do.

【0024】この発明に係るDMAコントローラは、ア
レイチェーン転送開始時のパラメータメモリの先頭番地
を格納しておくための第1のラッチ回路とは別に、さら
にアレイチェーン転送中のブロックの次のブロックの転
送パラメータメモリの先頭アドレスを、アレイステート
から転送ステートへ移った後に格納する第3のラッチ回
路を有し、アレイチェーン転送中断後、再開する際に、
前記第3のラッチ回路から転送途中のブロックの転送パ
ラメータメモリの先頭番地のアドレスを出力することに
より、転送途中のブロックの最初から転送を再開するよ
うにしたものである。
In the DMA controller according to the present invention, apart from the first latch circuit for storing the start address of the parameter memory at the start of the array chain transfer, the DMA controller further stores the next address of the block following the block being transferred in the array chain. A third latch circuit for storing the start address of the transfer parameter memory after the transfer from the array state to the transfer state;
The third latch circuit outputs the address of the start address of the transfer parameter memory of the block being transferred, so that the transfer is restarted from the beginning of the block being transferred.

【0025】この発明に係るDMAコントローラは、ア
レイチェーン転送中断後の再スタート時、転送途中のブ
ロックの最初からDMA転送を再開するか、最初のブロ
ックからDMA転送を再開するかを選択する選択ビット
を設けるようにしたものである。
When the DMA controller according to the present invention restarts after the interruption of the array chain transfer, a selection bit for selecting whether to restart the DMA transfer from the beginning of the block being transferred or to restart the DMA transfer from the first block. Is provided.

【0026】この発明に係るDMAコントローラは、ア
レイチェーン転送中断直後、再スタートする際に、転送
中断直後の番地からDMA転送を再開するようにしたも
のである。
In the DMA controller according to the present invention, when the array chain transfer is restarted immediately after the transfer, the DMA transfer is restarted from the address immediately after the transfer was interrupted.

【0027】[0027]

【発明の実施の形態】以下、この発明の実施の一形態を
説明する。 実施の形態1.この実施の形態1のDMAコントローラ
では、転送元アドレスレジスタが設定される同じ番地に
転送元アドレスレジスタ、当該転送元アドレスレジスタ
のラッチ回路(以下、SARラッチという)、さらにア
レイチェーン転送モード専用に転送パラメータメモリの
先頭番地を記憶しておくためのレジスタ(以下、Fir
st Block Address Registe
r、以下、FBSARという)を設ける。また、転送カ
ウンタレジスタが設定される同じ番地内に転送カウンタ
レジスタ、TCRラッチ、さらに全転送ブロック数を記
憶しておくためのレジスタ(First Block
Transfer Counter Registe
r、以下、FBTCRという)を設ける。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below. Embodiment 1 FIG. In the DMA controller according to the first embodiment, the transfer source address register, the latch circuit of the transfer source address register (hereinafter, referred to as SAR latch), and the data are transferred exclusively to the array chain transfer mode at the same address where the transfer source address register is set. Register for storing the start address of the parameter memory (hereinafter referred to as File)
st Block Address Register
r, hereinafter referred to as FBSAR). Also, the transfer counter register, the TCR latch, and a register (First Block) for storing the total number of transfer blocks in the same address where the transfer counter register is set.
Transfer Counter Register
r, hereinafter referred to as FBTCR).

【0028】図1は、この実施の形態1のDMAコント
ローラの構成を示すブロック図であり、図において、1
は転送元アドレスレジスタ(SAR)、2は転送元アド
レスレジスタ1のSARラッチ、3は転送先アドレスレ
ジスタ(DAR)、4は転送先アドレスレジスタ3のD
ARラッチ、5は転送カウンタレジスタ(TCR)、6
は転送カウンタレジスタ5のTCRラッチ、7はDMA
ラッチ、8はインクリメンタ/デクリメンタ、9はデク
リメンタ、10はDMAC、11は前記FBSAR(第
1のラッチ回路)であり、アレイチェーン転送モード専
用に転送パラメータメモリの先頭番地を記憶しておくた
めのレジスタである。12は前記FBTCR(第2のラ
ッチ回路)であり、全転送ブロック数を記憶しておくた
めのレジスタであり、最初にプログラムで書き込んだ値
を保持し続ける。
FIG. 1 is a block diagram showing the configuration of the DMA controller according to the first embodiment.
Is the source address register (SAR), 2 is the SAR latch of the source address register 1, 3 is the destination address register (DAR), and 4 is the D of the destination address register 3.
AR latch, 5 is a transfer counter register (TCR), 6
Is the TCR latch of the transfer counter register 5, and 7 is the DMA
A latch, 8 is an incrementer / decrementer, 9 is a decrementer, 10 is a DMAC, and 11 is the FBSAR (first latch circuit) for storing the start address of the transfer parameter memory exclusively for the array chain transfer mode. It is a register. Reference numeral 12 denotes an FBTCR (second latch circuit), which is a register for storing the total number of transfer blocks, and keeps holding a value initially written by a program.

【0029】次に動作について説明する。アレイチェー
ン転送モード時、DMA転送をスタートすると、先ず、
FBSAR11で転送パラメータメモリの先頭番地を指
定する。同時にFBTCR12の内容をTCRラッチ6
に転送する。そして、アレイステートにおいて転送パラ
メータを1ブロック分だけ、転送元アドレスレジスタ
1、転送先アドレスレジスタ3、転送カウンタレジスタ
5に書き込む。このとき、SARラッチ2は読み出して
いる転送パラメータメモリのアドレスを順にデクリメン
トして格納していく。アレイステートが一旦終了する
と、TCRラッチ6に格納されている転送ブロック数の
値がデクリメントされて再びTCRラッチ6に格納され
る。またこのとき、SARラッチ2には次のブロックの
転送パラメータメモリの先頭番地の値が格納される。こ
の後、転送ステートを実行し、TCRラッチ6および転
送カウンタレジスタ5の内容が“0”になるまでこの動
作を繰り返してアレイチェーン転送を終了する。
Next, the operation will be described. When the DMA transfer is started in the array chain transfer mode, first,
The start address of the transfer parameter memory is designated by FBSAR11. At the same time, the contents of FBTCR12 are
Transfer to Then, in the array state, the transfer parameters for one block are written to the transfer source address register 1, the transfer destination address register 3, and the transfer counter register 5. At this time, the SAR latch 2 sequentially decrements the address of the read transfer parameter memory and stores the address. Once the array state is completed, the value of the number of transfer blocks stored in the TCR latch 6 is decremented and stored in the TCR latch 6 again. At this time, the value of the start address of the transfer parameter memory of the next block is stored in the SAR latch 2. Thereafter, the transfer state is executed, and this operation is repeated until the contents of the TCR latch 6 and the transfer counter register 5 become "0", thereby terminating the array chain transfer.

【0030】正常終了したとき、SARラッチ2の値
は、アレイステートの間、デクリメントし続けていたた
め、転送パラメータメモリの最後の番地の次の番地の値
が格納されており、TCRラッチ6の内容も“0”にな
っている。また、FBSAR11およびFBTCR12
の内容は最初にプログラムで書き込んだ内容が保持され
た状態になっている。
At the end of the normal operation, the value of the SAR latch 2 has been decremented during the array state. Therefore, the value of the address next to the last address of the transfer parameter memory is stored. Is also "0". FBSAR11 and FBTCR12
Is a state where the contents written by the program at the beginning are held.

【0031】従って、再度、同じDMA転送を行おうと
して、単転送モードの場合と同じようにDMA許可ビッ
トをセットしてDMA要求を入れると、FBSAR11
から転送パラメータメモリの先頭番地が指定され、FB
TCR12の内容がTCRラッチ6に転送されるため、
アレイステートが正常に動作し、暴走することはない。
また、従来のように転送元アドレスレジスタ1、転送先
アドレスレジスタ3、転送カウンタレジスタ5にそれぞ
れ値を再度書き込む必要もなく、簡単に再スタートでき
る。
Therefore, when the same DMA transfer is performed again and the DMA request is set and the DMA request is input in the same manner as in the single transfer mode, the FBSAR 11
The start address of the transfer parameter memory is specified from
Since the contents of the TCR 12 are transferred to the TCR latch 6,
The array state operates normally and does not run away.
In addition, it is not necessary to write values to the transfer source address register 1, the transfer destination address register 3, and the transfer counter register 5 again as in the related art, and the operation can be restarted easily.

【0032】以上のように、この実施の形態1によれ
ば、再度、同じDMA転送を行う場合、最初にプログラ
ムで書き込んだ内容が保持された状態になっているFB
SAR11およびFBTCR12が使用され、FBSA
R11から転送パラメータメモリの先頭番地が指定さ
れ、FBTCR12の内容がTCRラッチ6に転送され
るため、アレイチェーン転送モードにおいて再実行した
り、中断して再開するような場合において従来のように
転送元アドレスレジスタ1、転送先アドレスレジスタ
3、転送カウンタレジスタ5へプログラムによりそれぞ
れ値を再度書き込む必要がなく、アレイチェーン転送モ
ードにおいての再実行、中断後の再開などによる暴走を
回避できるDMAコントローラが得られる効果がある。
As described above, according to the first embodiment, when the same DMA transfer is performed again, the FB in which the contents initially written by the program are held is held.
SAR11 and FBTCR12 are used and FBSA
Since the start address of the transfer parameter memory is specified from R11 and the contents of the FBTCR 12 are transferred to the TCR latch 6, the transfer source may be re-executed in the array chain transfer mode, or may be interrupted and restarted. There is no need to rewrite values to the address register 1, the transfer destination address register 3, and the transfer counter register 5 by a program, and a DMA controller that can avoid runaway due to re-execution in the array chain transfer mode, resumption after interruption, or the like can be obtained. effective.

【0033】実施の形態2.図2は、この実施の形態2
のDMAコントローラにおけるDMA関連レジスタのメ
モリ配置構成図である。図2において、13は第1のア
レイチェーン転送モード専用レジスタ(レジスタ)、1
4は第2のアレイチェーン転送モード専用レジスタ(レ
ジスタ)である。
Embodiment 2 FIG. FIG. 2 shows the second embodiment.
FIG. 4 is a diagram showing a memory arrangement configuration of DMA-related registers in the DMA controller of FIG. In FIG. 2, reference numeral 13 denotes a first array chain transfer mode dedicated register (register), 1
Reference numeral 4 denotes a second array chain transfer mode dedicated register (register).

【0034】この実施の形態2のDMAコントローラで
は、アレイチェーン転送モード時、転送パラメータメモ
リの先頭番地を記憶しておくための第1のアレイチェー
ン転送モード専用レジスタ13と、全転送ブロック数を
あらかじめ記憶しておくための第2のアレイチェーン転
送モード専用レジスタ14を別に設け、アレイチェーン
転送モードを実行する場合、従来のように転送元アドレ
スレジスタ1および転送カウンタレジスタ5への値の書
込みを不要にする。
In the DMA controller of the second embodiment, in the array chain transfer mode, the first array chain transfer mode dedicated register 13 for storing the start address of the transfer parameter memory and the total number of transfer blocks are stored in advance. When the second array chain transfer mode dedicated register 14 for storing is provided separately to execute the array chain transfer mode, it is not necessary to write a value to the transfer source address register 1 and the transfer counter register 5 as in the conventional case. To

【0035】次に動作について説明する。アレイチェー
ン転送モード時、DMA許可状態でDMA要求が入る
と、第1のアレイチェーン転送モード専用レジスタ13
から転送パラメータメモリの先頭番地が出力され指定さ
れ、また、第2のアレイチェーン転送モード専用レジス
タ14から全転送ブロック数のデータがTCRラッチ6
に転送される。その後、従来例と同様にアレイステー
ト、転送ステートを繰り返してDMA転送を終了する。
Next, the operation will be described. In the array chain transfer mode, when a DMA request is input in a DMA enabled state, the first array chain transfer mode dedicated register 13
, The start address of the transfer parameter memory is output and specified, and the data of the total number of transfer blocks is stored in the TCR latch 6 from the second array chain transfer mode dedicated register 14.
Is forwarded to Thereafter, the array state and the transfer state are repeated as in the conventional example, and the DMA transfer is completed.

【0036】DMA転送の正常終了後は、第1アレイチ
ェーン転送モード専用レジスタ13および第2のアレイ
チェーン転送モード専用レジスタ14に転送パラメータ
メモリの先頭番地および転送ブロック数がそれそれ記憶
された状態になっている。このため、再度、DMA許可
状態にしてDMA要求を入れるだけで、暴走することな
しに再び同じDMA転送を行うことができる。
After the normal end of the DMA transfer, the first address of the transfer parameter memory and the number of transfer blocks are stored in the first array chain transfer mode dedicated register 13 and the second array chain transfer mode dedicated register 14, respectively. Has become. For this reason, the same DMA transfer can be performed again without going out of control simply by entering the DMA request again and entering the DMA request.

【0037】以上のように、この実施の形態2によれ
ば、転送パラメータメモリの先頭番地および転送ブロッ
ク数がそれそれ記憶された状態になっている第1アレイ
チェーン転送モード専用レジスタ13および第2のアレ
イチェーン転送モード専用レジスタ14を使用し、アレ
イチェーン転送モード時、DMA許可状態で再度DMA
要求が入った際、第1のアレイチェーン転送モード専用
レジスタ13から転送パラメータメモリの先頭番地を指
定し、また、第2のアレイチェーン転送モード専用レジ
スタ14から全転送ブロック数のデータをTCRラッチ
6に転送するため、アレイチェーン転送モードにおいて
再実行する際に発生する暴走を回避できるDMAコント
ローラが得られる効果がある。
As described above, according to the second embodiment, the first array chain transfer mode exclusive register 13 and the second array chain transfer mode register in which the start address of the transfer parameter memory and the number of transfer blocks are stored respectively. In the array chain transfer mode, when the DMA is enabled, the DMA
When a request is received, the first address of the transfer parameter memory is designated from the first array chain transfer mode dedicated register 13, and the data of the total number of transfer blocks is transferred from the second array chain transfer mode dedicated register 14 to the TCR latch 6. Therefore, there is an effect that a DMA controller that can avoid runaway occurring when re-executing in the array chain transfer mode can be obtained.

【0038】実施の形態3.図3は、この実施の形態3
のDMAコントローラにおける転送パラメータメモリの
メモリ配置図である。この実施の形態3のDMAコント
ローラでは、転送パラメータメモリの番地を固定した番
地に設定する。図3のメモリ配置図ではROM領域の
“00F000H”番地から“00F100H”番地を
転送パラメータメモリ領域として固定している。
Embodiment 3 FIG. 3 shows the third embodiment.
3 is a memory layout diagram of a transfer parameter memory in the DMA controller of FIG. In the DMA controller according to the third embodiment, the address of the transfer parameter memory is set to a fixed address. In the memory layout diagram of FIG. 3, addresses “00F000H” to “00F100H” in the ROM area are fixed as transfer parameter memory areas.

【0039】そして、アレイチェーン転送モードを実行
する場合は必ず“00F000H”番地から転送パラメ
ータを読み出して転送元アドレスレジスタ1、転送先ア
ドレスレジスタ3、転送カウンタレジスタ5に転送して
から、転送ステートを実行するようにする。
When the array chain transfer mode is executed, the transfer parameters are read from the address "00F000H" and transferred to the transfer source address register 1, the transfer destination address register 3, and the transfer counter register 5, and then the transfer state is changed. Let it run.

【0040】アレイチェーン転送モードの終了は、転送
したいブロックのパラメータの次の1ブロック分の転送
パラメータの先頭データ(転送元転送開始番地)に“0
00000H”をあらかじめ書き込んでおき、DMA転
送を実行し、アレイステートの最後でSARラッチ2に
“000000H”を読み込んだとき、そのブロックの
転送ステートを実行してからDMA転送を終了するよう
にする。
The end of the array chain transfer mode is determined by adding “0” to the head data (transfer source transfer start address) of the transfer parameter of one block following the parameter of the block to be transferred.
"00000H" is written in advance, DMA transfer is executed, and when "000000H" is read into the SAR latch 2 at the end of the array state, the transfer state of the block is executed and then the DMA transfer is terminated.

【0041】図3の例では3ブロック転送した後、4ブ
ロック目の転送パラメータの先頭番地(転送元転送開始
番地)に“000000H”を書き込んでいるため、3
ブロック目のアレイステートが終了した時点で、SAR
ラッチ2に“000000”が格納される。よって3ブ
ロック目の転送ステートを終了して、全DMA転送が終
了する。
In the example of FIG. 3, since "300000H" is written in the first address (transfer source transfer start address) of the transfer parameter of the fourth block after three blocks have been transferred.
When the array state of the block ends, the SAR
“000000” is stored in the latch 2. Therefore, the transfer state of the third block ends, and all DMA transfers end.

【0042】なお、この実施の形態の場合、転送パラメ
ータメモリの番地を固定した番地に設定するため、予め
SARラッチ2およびTCRラッチ6に転送パラメータ
メモリの先頭番地と転送ブロック数を書き込んでおく必
要はない。
In this embodiment, in order to set the address of the transfer parameter memory to a fixed address, it is necessary to write the head address of the transfer parameter memory and the number of transfer blocks in the SAR latch 2 and the TCR latch 6 in advance. There is no.

【0043】以上のように、この実施の形態3によれ
ば、アレイチェーン転送モードにおいて再度同じDMA
転送を実行したい場合、DMA許可状態にしてDMA要
求を入れるだけの簡単な操作で、暴走することなしに同
じDMA転送を行うことができるDMAコントローラが
得られる効果がある。
As described above, according to the third embodiment, the same DMA is again performed in the array chain transfer mode.
When it is desired to execute the transfer, there is an effect that a DMA controller capable of performing the same DMA transfer without runaway can be obtained by a simple operation of putting a DMA request in a DMA enabled state.

【0044】実施の形態4.前記実施の形態3では、転
送パラメータメモリ領域を特定の番地に固定する方法に
ついて示したが、前記実施の形態1と前記実施の形態3
の方式のうちのいずれかを選択できるようにしてもよ
い。図4は、この実施の形態4のDMAコントローラに
おけるDMAC制御レジスタを説明する図である。図4
において、21はDMAC制御レジスタである。図4に
示すように、DMAC制御レジスタ21の特定のビット
(この場合、ビット0)に転送パラメータメモリ領域選
択ビットを割り当てる。転送パラメータメモリ領域選択
ビットの内容が“0”のとき、前記実施の形態1の方式
でアレイステートを実行する。すなわち、FBSAR1
1にあらかじめ転送パラメータメモリの先頭番地を、F
BTCR12に全転送ブロック数を書き込んでおき、D
MAコントローラの起動時、FBSAR11から任意の
メモリ領域に書き込まれている転送パラメータメモリの
最初のブロックの先頭番地を指定し、アレイステートを
実行し、転送ステートを実行する。
Embodiment 4 FIG. In the third embodiment, the method of fixing the transfer parameter memory area to a specific address has been described.
Any of the above methods may be selectable. FIG. 4 is a diagram illustrating a DMAC control register in the DMA controller according to the fourth embodiment. FIG.
, 21 is a DMAC control register. As shown in FIG. 4, a transfer parameter memory area selection bit is assigned to a specific bit (in this case, bit 0) of the DMAC control register 21. When the content of the transfer parameter memory area selection bit is "0", the array state is executed by the method of the first embodiment. That is, FBSAR1
First, the start address of the transfer parameter memory is set to F
Write the total number of transfer blocks in the BTCR 12
When the MA controller is started, it specifies the start address of the first block of the transfer parameter memory written in an arbitrary memory area from the FBSAR 11, executes the array state, and executes the transfer state.

【0045】また、前記転送パラメータメモリ領域選択
ビットの内容が“1”のとき、前記実施の形態3の方式
でアレイステートを実行する。すなわち、特定の番地に
固定されている転送パラメータを順に読み出して転送元
アドレスレジスタ1、転送先アドレスレジスタ3、転送
カウンタレジスタ5に格納し、転送ステートを実行す
る。明らかに使用しないメモリ領域がある場合は、転送
パラメータ領域選択ビットを“1”にして、固定した転
送パラメータ領域を利用したほうがプログラムを組みや
すい。
When the content of the transfer parameter memory area selection bit is "1", the array state is executed by the method of the third embodiment. That is, the transfer parameters fixed at a specific address are sequentially read and stored in the transfer source address register 1, the transfer destination address register 3, and the transfer counter register 5, and the transfer state is executed. If there is a memory area that is obviously not used, it is easier to build a program by setting the transfer parameter area selection bit to “1” and using the fixed transfer parameter area.

【0046】以上のように、この実施の形態4によれ
ば、使用しないメモリ領域の有無に応じて固定パラメー
タ領域の固定、非固定を選択し、プログラム構築を容易
化できるDMAコントローラが得られる効果がある。
As described above, according to the fourth embodiment, there is provided an effect that a DMA controller that can select fixed or non-fixed fixed parameter areas according to the presence or absence of unused memory areas and can facilitate program construction is obtained. There is.

【0047】実施の形態5.前記実施の形態1ではFB
SAR11およびFBTCR12の内容はプログラムで
書き換えない限り変化しなかったため、一旦強制的にD
MA転送を中断した後、DMA許可状態にしてDMA要
求を入れてそのまま再スタートさせると、必ず一番最初
のブロックの最初の番地から転送を再開する。このた
め、転送中断後の再スタート時、中断直後のブロックか
らDMA転送を再開したい場合にはFBSAR11およ
びFBTCR12の内容を書き換えなければならない。
Embodiment 5 In the first embodiment, the FB
Since the contents of SAR11 and FBTCR12 did not change unless rewritten by a program, D
After suspending the MA transfer, if the DMA is enabled and a DMA request is input and restarted as it is, the transfer is always restarted from the first address of the first block. Therefore, at the time of restarting after the transfer is interrupted, if it is desired to restart the DMA transfer from the block immediately after the interruption, the contents of the FBSAR 11 and the FBTCR 12 must be rewritten.

【0048】この実施の形態5では、前記実施の形態1
のDMAコントローラにおいて、DMA転送が進むに従
って、FBSAR11およびFBTCR12の値を1ブ
ロック分ごとにデクリメントすることにより、DMA転
送を中断後、再スタートしたときに転送途中のブロック
の次のブロックからDMA転送を再開できるようにす
る。
In the fifth embodiment, the first embodiment is used.
As the DMA transfer progresses, the values of FBSAR11 and FBTCR12 are decremented by one block as the DMA transfer progresses, so that when the DMA transfer is interrupted, when the DMA transfer is restarted, the DMA transfer is started from the block next to the block being transferred. Be able to resume.

【0049】アレイチェーン転送モードでは、アレイス
テートが終了した時点で、SARラッチ2には転送パラ
メータメモリの次のブロックの先頭番地のアドレス値が
格納されている。転送ステートを開始する際、通常、D
MAコントローラ内部でトリガ信号Tが内部クロックの
1サイクル分程度発生するように構成されており、図5
に示すように、トリガ信号TによりSARラッチ2から
FBSAR11、TCRラッチ6からFBTCR12に
それぞれデータを転送する。このため、アレイステート
から転送ステートに移行した後は、FBSAR11に次
のブロックの転送パラメータメモリの先頭番地を、また
FBTCR12に残りのブロック数をそれぞれ格納す
る。
In the array chain transfer mode, when the array state is completed, the SAR latch 2 stores the address value of the start address of the next block in the transfer parameter memory. When initiating the transfer state, typically D
The configuration is such that the trigger signal T is generated for about one cycle of the internal clock in the MA controller.
As shown in (1), data is transferred from the SAR latch 2 to the FBSAR 11 and from the TCR latch 6 to the FBTCR 12 in response to the trigger signal T. Therefore, after the transition from the array state to the transfer state, the start address of the transfer parameter memory of the next block is stored in the FBSAR 11 and the number of remaining blocks is stored in the FBTCR 12.

【0050】転送ステート中にDMA転送を中断した
後、そのまま再スタートした場合、FBSAR11が転
送中断時のブロックの次のブロックの先頭アドレスを指
定するため、転送中断時のブロックの次のブロックから
DMA転送を再開することができる。アレイステート中
にDMA転送を中断した場合、FBSAR11には転送
中断時のブロックの転送パラメータメモリの先頭番地が
格納されているため、そのまま再スタートした場合、転
送中断時のブロックの最初からDMA転送を再開するこ
とができる。
When the DMA transfer is interrupted during the transfer state and then restarted, the FBSAR 11 specifies the start address of the block next to the block at the time of the transfer interruption. Transfer can be resumed. If the DMA transfer is interrupted during the array state, the FBSAR 11 stores the start address of the transfer parameter memory of the block at the time of the transfer interruption. Can be resumed.

【0051】以上のように、この実施の形態5によれ
ば、FBSAR11およびFBTCR12の値は、DM
A転送が進むに従って1ブロック分ごとにデクリメント
されるので、DMA転送を中断後、再スタートしたとき
に、FBSAR11およびFBTCR12の内容を書き
換えることなく転送途中のブロックの次のブロックから
DMA転送を再開できるDMAコントローラが得られる
効果がある。
As described above, according to the fifth embodiment, the values of FBSAR11 and FBTCR12 are
As the A transfer progresses, it is decremented for each block, so that when the DMA transfer is interrupted and restarted, the DMA transfer can be restarted from the block following the block being transferred without rewriting the contents of the FBSAR 11 and the FBTCR 12. There is an effect that a DMA controller can be obtained.

【0052】実施の形態6.前記実施の形態5では、ア
レイステート時に中断した後、再スタートした場合に暴
走することはなくなった。しかし、最終ブロックにおい
ては、転送ステートで中断した時点で、FBSAR11
に転送パラメータメモリ領域外の番地が格納されてしま
うため、そのまま再スタートすると暴走する。このた
め、図6に示すように、転送元アドレスレジスタ1の同
じ番地内にNBSAR(Next Block Sou
rce Address Register)(第3の
ラッチ回路)15を、同様に転送カウンタレジスタ5の
同じ番地内にNBTCR(Next Block Tr
ansfer CounterRegister)16
を別に設ける。
Embodiment 6 FIG. In the fifth embodiment, runaway does not occur when the operation is restarted after the interruption in the array state. However, in the last block, the FBSAR11
If an address outside the transfer parameter memory area is stored in the memory, the program will run out of control if it is restarted. Therefore, as shown in FIG. 6, the NBSAR (Next Block Sou) is stored in the same address of the transfer source address register 1.
rc (Address Register) (third latch circuit) 15 is similarly stored in the same address of the transfer counter register 5 in the NBTCR (Next Block Tr).
answer CounterRegister) 16
Is provided separately.

【0053】アレイステートから転送ステートに移ると
きに、トリガ信号TによりSARラッチ2からNBSA
R15、TCRラッチ6からNBTCR16にそれぞれ
データを転送する。よって、アレイステートから転送ス
テートに移行した後は、NBSAR15に次のブロック
の転送パラメータメモリの先頭番地、NBTCR16に
残りのブロック数がそれぞれ格納される、FBSAR1
1およびFBTCR12の内容はプログラムで書き換え
ない限り変化しない。
When shifting from the array state to the transfer state, the trigger signal T causes the SAR latch 2 to switch to NBSA.
Data is transferred from the R15 and the TCR latch 6 to the NBTCR 16, respectively. Therefore, after shifting from the array state to the transfer state, the start address of the transfer parameter memory of the next block is stored in the NBSAR 15 and the number of remaining blocks is stored in the NBTCR 16 respectively.
1 and the contents of the FBTCR 12 do not change unless rewritten by a program.

【0054】アレイステート中にDMA転送を中断し、
そのまま再スタートした場合、NBSAR15から転送
パラメータメモリの先頭番地を指定し、転送中断時のブ
ロックの最初からDMA転送を再開する。転送ステート
中にDMA転送を中断し、そのまま再スタートした場
合、NBSAR15から転送パラメータメモリの先頭番
地を指定し、転送中断時のブロックの次のブロックの最
初からDMA転送を再開する。DMA転送を途中で中断
したのか、正常終了したのかは、転送カウンタレジスタ
5およびTCRラッチ6の内容で自動的に判定する。D
MA転送をスタートするとき、アレイチェーン転送モー
ドで、かつ転送カウンタレジスタ5およびTCRラッチ
6の内容が“0”のとき、正常終了と判断する。アレイ
チェーン転送モードで、かつ転送カウンタレジスタ5お
よびTCRラッチ6の内容が“0”以外のとき、途中で
中断したと判断する。
Interrupting the DMA transfer during the array state,
When the restart is performed as it is, the head address of the transfer parameter memory is designated from the NBSAR 15, and the DMA transfer is restarted from the beginning of the block at the time of the transfer interruption. When the DMA transfer is interrupted during the transfer state and restarted as it is, the head address of the transfer parameter memory is designated from the NBSAR 15, and the DMA transfer is restarted from the beginning of the block following the block at the time of the transfer interruption. Whether the DMA transfer is interrupted or terminated normally is automatically determined based on the contents of the transfer counter register 5 and the TCR latch 6. D
When starting the MA transfer, in the array chain transfer mode and when the contents of the transfer counter register 5 and the TCR latch 6 are "0", it is determined that the transfer is completed normally. If the contents of the transfer counter register 5 and the TCR latch 6 are other than "0" in the array chain transfer mode, it is determined that the transfer was interrupted halfway.

【0055】正常終了した後、そのまま再スタートした
場合は転送カウンタレジスタ5およびTCRラッチ6の
内容をみて、自動的にFBSAR11から転送パラメー
タメモリの先頭番地を指定し、アレイチェーン転送モー
ドの一番最初のブロックの最初からDMA転送を開始す
る。また、初めてアレイチェーン転送モードをスタート
させるときのように、転送元アドレスレジスタ1、SA
Rラッチ2、FBSAR11、NBSAR15に同じ値
が入っているときは、転送カウンタレジスタ5およびT
CRラッチ6の内容に関係なく、FBSAR11から転
送パラメータメモリの先頭番地を指定し、アレイチェー
ン転送モードの一番最初のブロックの最初からDMA転
送を開始する。
If the operation is restarted as it is after the normal termination, the contents of the transfer counter register 5 and the TCR latch 6 are checked, the head address of the transfer parameter memory is automatically designated from the FBSAR 11, and the start of the array chain transfer mode is started. DMA transfer is started from the beginning of the block. Also, as when the array chain transfer mode is started for the first time, the transfer source address register 1, SA
When the same value is stored in the R latch 2, FBSAR11 and NBSAR15, the transfer counter register 5 and T
Regardless of the contents of the CR latch 6, the start address of the transfer parameter memory is designated from the FBSAR 11, and the DMA transfer is started from the beginning of the first block in the array chain transfer mode.

【0056】このように、アレイチェーン転送モードを
スタートするとき、転送カウンタレジスタ5およびTC
Rラッチ6の内容をみて、FBSAR11で転送パラメ
ータメモリの先頭番地を指定するか、またはNBSAR
15で転送パラメータメモリの先頭番地を指定するかを
自動的に判定する。
As described above, when starting the array chain transfer mode, the transfer counter register 5 and the TC
The contents of the R latch 6 are checked, and the start address of the transfer parameter memory is designated by the FBSAR 11 or the NBSAR 11
At 15, it is automatically determined whether the start address of the transfer parameter memory is specified.

【0057】以上のように、この実施の形態6によれ
ば、初めてアレイチェーン転送モードを実行する場合や
正常終了した後にそのまま再スタートする場合は、一番
最初のブロックから簡単にスタートでき、また、中断後
に再スタートした場合も、アレイステート中の中断か転
送ステート中の中断かを自動的に判断して、転送中のブ
ロックあるいは転送中断後のブロックから簡単に再スタ
ートできるので、最終ブロックにおいて転送ステートで
中断したときに、そのまま再スタートしても暴走するこ
とがなくなるDMAコントローラが得られる効果があ
る。
As described above, according to the sixth embodiment, when the array chain transfer mode is executed for the first time or when the operation is restarted after the normal termination, the start can be easily started from the first block. Even when restarting after an interruption, it is automatically determined whether the interruption is in the array state or in the transfer state, and it is easy to restart from the block being transferred or the block after the transfer was interrupted. When the transfer is interrupted in the transfer state, there is an effect that a DMA controller that does not run out of control even when restarted as it is can be obtained.

【0058】実施の形態7.前記実施の形態6では、ア
レイチェーン転送モードをスタートするとき、転送カウ
ンタレジスタ5およびTCRラッチ6の内容をみて、F
BSAR11で転送パラメータメモリの先頭番地を指定
するか、またはNBSAR15で転送パラメータメモリ
の先頭番地を指定するかを自動的に判定していたが、図
7に示すように、FBSAR11とNBSAR15のど
ちらで転送パラメータメモリの先頭番地を指定するかを
選択するFB/NB選択ビットを設けてもよい。
Embodiment 7 FIG. In the sixth embodiment, when the array chain transfer mode is started, the contents of the transfer counter register 5 and the TCR latch 6 are checked,
Whether the start address of the transfer parameter memory is designated by the BSAR 11 or the start address of the transfer parameter memory is designated by the NBSAR 15 is automatically determined. As shown in FIG. 7, the transfer is performed by either the FBSAR 11 or the NBSAR 15. An FB / NB selection bit for selecting whether to specify the start address of the parameter memory may be provided.

【0059】図7は、FBSAR11とNBSAR15
のどちらで転送パラメータメモリの先頭番地を指定する
かを選択するFB/NB選択ビットが割り当てられたD
MAC制御レジスタ21を説明する図である。図7に示
すようにFB/NB選択ビット(この場合、ビット1)
の内容が“0”のとき、アレイチェーン転送モードをス
タートさせると、FBSAR11で転送パラメータメモ
リの先頭番地を指定し、一番最初の転送ブロックの最初
からDMA転送を開始する。
FIG. 7 shows FBSAR11 and NBSAR15.
Is assigned a FB / NB selection bit for selecting which of the above specifies the start address of the transfer parameter memory.
FIG. 3 is a diagram illustrating a MAC control register 21. As shown in FIG. 7, the FB / NB selection bit (in this case, bit 1)
Is "0", the array chain transfer mode is started, the start address of the transfer parameter memory is designated by the FBSAR 11, and the DMA transfer is started from the beginning of the first transfer block.

【0060】また、FB/NB選択ビットの内容が
“1”のとき、アレイチェーン転送モードをスタートさ
せると、NBSAR15で転送パラメータメモリの先頭
番地を指定する。最初にプログラムで転送元アドレスレ
ジスタに転送パラメータメモリの先頭番地の値を書き込
んだとき、転送元アドレスレジスタ1、SARラッチ
2、FBSAR11、NBSAR15に同時に書き込ま
れるので、一番最初にアレイチェーン転送モードをスタ
ートする場合は、NBSAR15にはFBSAR11と
同じ一番最初のブロックの転送パラメータメモリの先頭
番地の値が格納されている。
When the array chain transfer mode is started when the content of the FB / NB selection bit is "1", the start address of the transfer parameter memory is designated by the NBSAR 15. First, when the value of the start address of the transfer parameter memory is written to the transfer source address register by the program, it is simultaneously written to the transfer source address register 1, the SAR latch 2, the FBSAR11, and the NBSAR15. When starting, the value of the start address of the transfer parameter memory of the first block same as FBSAR11 is stored in NBSAR15.

【0061】従って、FB/NB選択ビットの内容を
“1”にした状態でアレイチェーン転送モードを初めて
実行した場合は、FB/NB選択ビットの内容が“0”
のときと同じ動作をする。アレイチェーン転送モードを
実行中に中断して、そのまま再スタートしたときは、N
BSAR15で転送パラメータメモリの先頭番地を指定
して、DMA転送を再開する。ただし、NBSAR15
の内容によっては、最終ブロックの転送ステートで中断
した後に再スタートする場合のように、NBSAR15
に転送パラメータメモリ領域外の番地の値が格納されて
いて暴走する可能性もある。このため、アレイチェーン
転送モードをスタートするとき、転送カウンタレジスタ
5およびTCRラッチ6の内容が“0”のときは該ビッ
トの内容にかかわらず、FBSAR11から転送パラメ
ータメモリの先頭番地を指定する。
Therefore, when the array chain transfer mode is executed for the first time with the content of the FB / NB selection bit set to "1", the content of the FB / NB selection bit is set to "0".
Performs the same operation as When interrupted during the execution of the array chain transfer mode and restarted as it is, N
The BSAR 15 specifies the start address of the transfer parameter memory and restarts the DMA transfer. However, NBSAR15
Depending on the contents of the NBSAR15, such as when restarting after interrupting in the transfer state of the last block.
There is a possibility that the value of an address outside the transfer parameter memory area is stored in the memory and a runaway occurs. Therefore, when starting the array chain transfer mode, if the contents of the transfer counter register 5 and the TCR latch 6 are "0", the start address of the transfer parameter memory is designated from the FBSAR 11 regardless of the contents of the bit.

【0062】従って、アレイチェーン転送を中断した
後、再スタートする場合に、最初のブロックから再開す
るか、途中のブロックから再開するかプログラムで選択
することができる。
Therefore, when the array chain transfer is interrupted and restarted, it is possible to select from a program whether to restart from the first block or to restart from an intermediate block.

【0063】以上のように、この実施の形態7によれ
ば、アレイチェーン転送モードをスタートするときに、
FBSAR11で転送パラメータメモリの先頭番地を指
定するか、またはNBSAR15で転送パラメータメモ
リの先頭番地を指定するかをFB/NB選択ビットをも
とにプログラムにより選択することができ、暴走する可
能性を排除できるDMAコントローラが得られる効果が
ある。
As described above, according to the seventh embodiment, when starting the array chain transfer mode,
Whether the start address of the transfer parameter memory is specified by the FBSAR 11 or the start address of the transfer parameter memory by the NBSAR 15 can be selected by a program based on the FB / NB selection bit, eliminating the possibility of runaway. There is an effect that a DMA controller that can be obtained is obtained.

【0064】実施の形態8.この実施の形態8では、前
記実施の形態6の図6において、DMA転送中断後、再
スタートする際に、転送中断直後の番地からDMA転送
を再開できるようにする。アレイチェーン転送モードを
スタートする際、一番最初にアレイチェーン転送モード
を実行するときのように、転送元アドレスレジスタ1、
SARラッチ2、FBSAR11、NBSAR15にす
べて同じ値が入っているときは、転送カウンタレジスタ
5およびTCRラッチ6の内容に関係なく、FBSAR
11から転送パラメータメモリの先頭番地を指定し、ア
レイチェーン転送モードの一番最初のブロックの最初か
らDMA転送を開始する。
Embodiment 8 FIG. In the eighth embodiment, in FIG. 6 of the sixth embodiment, when the DMA transfer is restarted after the DMA transfer is interrupted, the DMA transfer can be resumed from the address immediately after the transfer is interrupted. When starting the array chain transfer mode, the transfer source address register 1,
When the SAR latch 2, FBSAR11, and NBSAR15 all contain the same value, regardless of the contents of the transfer counter register 5 and the TCR latch 6, the FBSAR
11, the start address of the transfer parameter memory is designated, and the DMA transfer is started from the beginning of the first block in the array chain transfer mode.

【0065】正常終了時のように、転送元アドレスレジ
スタ1、SARラッチ2、FBSAR11、NBSAR
15に同じ値が入っていない場合で、かつ転送カウンタ
レジスタ5およびTCRラッチ6の内容がどちらも
“0”の場合でも、FBSAR11で転送パラメータメ
モリの先頭番地を指定し、一番最初のブロックからDM
A転送を開始する。
As in the case of normal termination, the transfer source address register 1, SAR latch 2, FBSAR11, NBSAR
15 and the contents of both the transfer counter register 5 and the TCR latch 6 are both "0", the start address of the transfer parameter memory is designated by the FBSAR 11, and DM
A transfer is started.

【0066】DMA転送を途中で中断した場合、先ず、
アレイステートで中断すると、転送元アドレスレジスタ
1、SARラッチ2、FBSAR11、NBSAR15
に同じ値が入っておらず、かつ転送カウンタレジスタ5
の内容は“0”でTCRラッチ6の内容は“0”以外の
値をとる。このとき、NBSAR15には転送中断時の
ブロックの転送パラメータメモリの先頭番地の値が格納
されている。
When the DMA transfer is interrupted on the way, first,
When interrupted in the array state, the transfer source address register 1, SAR latch 2, FBSAR11, NBSAR15
And the transfer counter register 5
Of the TCR latch 6 takes a value other than "0". At this time, the value of the start address of the transfer parameter memory of the block at the time of the transfer interruption is stored in the NBSAR 15.

【0067】転送ステート中に中断した場合は、転送元
アドレスレジスタ1、SARラッチ2、FBSAR1
1、NBSAR15に同じ値が入っておらず、かつ転送
カウンタレジスタ5とTCRラッチ6の内容はどちらも
“0”以外の値をとる。ただし、最終ブロックにおいて
は、転送カウンタレジスタ5の内容は“0”以外、TC
Rラッチ6の内容は“0”になる。このとき、NBSA
R15には転送中断時の次のブロックの転送パラメータ
メモリの先頭番地の値が格納されている。
When interrupted during the transfer state, the transfer source address register 1, SAR latch 2, FBSAR1
1, the same value is not entered in the NBSAR 15, and the contents of the transfer counter register 5 and the TCR latch 6 both take values other than "0". However, in the last block, the contents of the transfer counter register 5 are other than "0",
The content of the R latch 6 becomes "0". At this time, NBSA
R15 stores the value of the start address of the transfer parameter memory of the next block at the time of transfer interruption.

【0068】従って、アレイチェーン転送モードを中断
した後に、その状態で再スタートする場合、アレイステ
ート中に中断したのか、転送ステート中に中断したのか
を転送カウンタレジスタ5の内容によって判定する。
Therefore, when the array chain transfer mode is interrupted and restarted in that state, whether the interrupt was interrupted during the array state or during the transfer state is determined by the contents of the transfer counter register 5.

【0069】この結果、アレイステート中の中断であれ
ば、再スタート時、転送カウンタレジスタ5の内容が
“0”、TCRラッチ6の内容が“0”以外であるた
め、NBSAR15で転送パラメータメモリの先頭番地
を指定する。そして、アレイステートを実行し、転送ス
テートを実行し、さらに通常のアレイチェーン転送モー
ドを続けて終了する。
As a result, if the transfer is interrupted during the array state, the contents of the transfer counter register 5 are other than "0" and the contents of the TCR latch 6 are other than "0" at the time of restart. Specify the starting address. Then, the array state is executed, the transfer state is executed, and the normal array chain transfer mode is continued to end.

【0070】また、転送ステート中の中断であれば、再
スタート時、転送カウンタレジスタ5およびTCRラッ
チ6の内容から判断して、SARラッチ2、FBSAR
11、NBSAR15はそのままで、転送中断直後の転
送元転送開始番地を転送元アドレスレジスタ1から出力
して、転送中断直後の状態からDMA転送(転送ステー
ト)を再開する。転送ステートが終了したあとも、その
ままSARラッチ2から次のブロックの転送パラメータ
メモリの先頭番地を指定し、アレイステートを実行し、
最後までアレイチェーン転送モードを実行する。
If the transfer state is interrupted, the SAR latch 2 and the FBSAR 2 are determined at the time of restart by judging from the contents of the transfer counter register 5 and the TCR latch 6.
11, the NBSAR 15 outputs the transfer start address of the transfer source immediately after the transfer is interrupted from the transfer source address register 1 and resumes the DMA transfer (transfer state) from the state immediately after the transfer was interrupted. Even after the transfer state is completed, the head address of the transfer parameter memory of the next block is designated from the SAR latch 2 and the array state is executed.
Execute the array chain transfer mode until the end.

【0071】このように、従来ではアレイチェーン転送
中断後、再スタートする際に転送中断直後の番地からD
MA転送を再開する場合に、一旦アレイチェーン転送モ
ードを解除して単転送モードに変え、転送途中のブロッ
クの残りのデータしかDMA転送できなかったが、アレ
イチェーン転送を一旦中断しても、その続きのデータか
ら簡単にDMA転送を再開できるDMAコントローラが
得られる効果がある。
As described above, in the prior art, after the array chain transfer is interrupted, when restarting, the address immediately after the interrupted transfer is
When the MA transfer is restarted, the array chain transfer mode is temporarily changed to the single transfer mode, and only the remaining data of the block being transferred can be DMA-transferred. There is an effect that a DMA controller that can easily restart the DMA transfer from the subsequent data can be obtained.

【0072】[0072]

【発明の効果】以上のように、この発明によれば、アレ
イチェーン転送開始時に指定される転送パラメータメモ
リの先頭番地を格納しておくための第1のラッチ回路
と、アレイチェーン転送時にTCRラッチへ転送される
全転送ブロック数を格納しておくための第2のラッチ回
路とを備えるように構成したので、アレイチェーン転送
モードにおける再実行、中断後の再開において従来のよ
うに転送元アドレスレジスタ、転送先アドレスレジス
タ、転送カウンタレジスタへそれぞれ値をプログラムに
より再度書き込む必要なくアレイチェーン転送モードに
おいての再実行、中断後の再開などが可能になり、前記
再実行、中断後の再開などで発生することのある暴走を
回避できる効果がある。
As described above, according to the present invention, the first latch circuit for storing the start address of the transfer parameter memory designated at the start of the array chain transfer, and the TCR latch at the time of the array chain transfer And a second latch circuit for storing the total number of transfer blocks transferred to the transfer source address register in the array chain transfer mode in the re-execution and resumption after interruption as in the prior art. This makes it possible to re-execute in the array chain transfer mode, resume after an interruption, etc. without having to rewrite the values to the transfer destination address register and the transfer counter register by a program. This has the effect of avoiding possible runaway.

【0073】この発明によれば、第1のラッチ回路およ
び第2のラッチ回路を、特定の番地に割り当てられてい
るレジスタとして構成したので、アレイチェーン転送モ
ード時、DMA許可状態で再度DMA要求が入った際、
前記レジスタから転送パラメータメモリの先頭番地を指
定し、また、前記レジスタから全転送ブロック数のデー
タをTCRラッチに転送し、アレイチェーン転送モード
において再実行する際に発生する暴走を回避できる効果
がある。
According to the present invention, the first latch circuit and the second latch circuit are configured as registers assigned to specific addresses. Therefore, in the array chain transfer mode, a DMA request is issued again in the DMA enabled state. When you enter,
The start address of the transfer parameter memory is designated from the register, and the data of the total number of transfer blocks is transferred from the register to the TCR latch, thereby avoiding runaway that occurs when re-executing in the array chain transfer mode. .

【0074】この発明によれば、転送パラメータメモリ
は特定の記憶領域に割り当てられ、先頭番地が特定の番
地に固定されており、アレイステートおよび転送ステー
トでは、アレイチェーン転送を開始するとき、前記先頭
番地から転送パラメータのデータを読み出し、それぞれ
転送元アドレスレジスタ、転送先アドレスレジスタおよ
び転送カウンタレジスタに書き込んだ後、DMA転送を
開始するように構成したので、再度同じDMA転送を行
う場合、DMA許可状態にしてDMA要求を入れるだけ
の簡単な操作で、暴走することなしに同じDMA転送を
行える効果がある。
According to the present invention, the transfer parameter memory is allocated to a specific storage area, and the starting address is fixed to a specific address. After reading the transfer parameter data from the address and writing the data to the transfer source address register, transfer destination address register and transfer counter register, respectively, the DMA transfer is started. With the simple operation of simply inputting a DMA request, the same DMA transfer can be performed without runaway.

【0075】この発明によれば、アレイチェーン転送開
始時、転送パラメータメモリ領域を自由に設定するか、
固定するかを選択する選択ビットを設けるように構成し
たので、使用しないメモリ領域の有無に応じて転送パラ
メータメモリ領域を固定し、プログラムの容易化および
アレイチェーン転送モードにおける暴走しないDMA転
送を実現できる効果がある。
According to the present invention, when the array chain transfer is started, the transfer parameter memory area can be set freely,
Since the selection bit for selecting whether to fix the data is provided, the transfer parameter memory area is fixed according to the presence or absence of the unused memory area, thereby facilitating the program and realizing the DMA transfer without runaway in the array chain transfer mode. effective.

【0076】この発明によれば、アレイチェーン転送
中、アレイチェーン転送開始時のパラメータメモリの先
頭番地を格納しておくための第1のラッチ回路およびア
レイチェーン転送時の全転送ブロック数を格納しておく
ための第2のラッチ回路の値を、DMA転送が進むに従
ってデクリメントするデクリメント手段を有し、強制的
にDMA転送を中断した後、再びDMA転送を開始する
際、前記デクリメント手段によりデクリメントされた前
記第1のラッチ回路および前記第2のラッチ回路の値を
もとにDMA転送途中のブロックの最初からDMA転送
を再開するように構成したので、前記第1のラッチ回路
および前記第2のラッチ回路の値は、DMA転送が進む
に従って1ブロック分ごとにデクリメントされるので、
DMA転送中断後、再スタートしたときに、前記第1の
ラッチ回路および前記第2のラッチ回路の内容を書き換
えることなくDMA転送をDMA転送途中のブロックの
最初から再開できる効果がある。
According to the present invention, during the array chain transfer, the first latch circuit for storing the start address of the parameter memory at the start of the array chain transfer and the total number of transfer blocks during the array chain transfer are stored. A decrement means for decrementing the value of the second latch circuit for keeping the DMA transfer as the DMA transfer progresses. When the DMA transfer is restarted after the DMA transfer is forcibly interrupted, the value is decremented by the decrement means. Since the DMA transfer is restarted from the beginning of the block in the middle of the DMA transfer based on the values of the first latch circuit and the second latch circuit, the first latch circuit and the second Since the value of the latch circuit is decremented every block as the DMA transfer proceeds,
When the DMA transfer is restarted after the DMA transfer is interrupted, the DMA transfer can be restarted from the beginning of the block during the DMA transfer without rewriting the contents of the first latch circuit and the second latch circuit.

【0077】この発明によれば、アレイチェーン転送開
始時のパラメータメモリの先頭番地を格納しておくため
の第1のラッチ回路とは別に、さらにアレイチェーン転
送中のブロックの次のブロックの転送パラメータメモリ
の先頭アドレスを、アレイステートから転送ステートへ
移った後に格納する第3のラッチ回路を有し、アレイチ
ェーン転送中断後、再開する際に、前記第3のラッチ回
路から転送途中のブロックの転送パラメータメモリの先
頭番地のアドレスを出力することにより、転送途中のブ
ロックの最初から転送を再開するように構成したので、
初めてアレイチェーン転送モードを実行する場合や正常
終了した後にその状態で再スタートする場合は、一番最
初のブロックから簡単にスタートでき、また、中断後に
再スタートした場合も、アレイステート中の中断か転送
ステート中の中断かを自動的に判断して、転送中のブロ
ックあるいは転送中断後のブロックから簡単に再スター
トでき、最終ブロックにおいて転送ステートで中断した
ときに再スタートしても暴走することがなくなるという
効果がある。
According to the present invention, apart from the first latch circuit for storing the start address of the parameter memory at the start of the array chain transfer, the transfer parameter of the block next to the block being transferred in the array chain is further A third latch circuit for storing a head address of the memory after the transfer from the array state to the transfer state, and when the transfer is resumed after the interruption of the array chain transfer, the transfer of the block being transferred from the third latch circuit is performed. By outputting the address of the start address of the parameter memory, the transfer is restarted from the beginning of the block being transferred.
When the array chain transfer mode is executed for the first time, or when restarting in that state after normal termination, it is easy to start from the first block. It can automatically determine whether the transfer state has been interrupted or not, and can easily restart from the block being transferred or the block after the transfer was interrupted. This has the effect of disappearing.

【0078】この発明によれば、アレイチェーン転送中
断後の再スタート時、転送途中のブロックの最初からD
MA転送を再開するか、最初のブロックからDMA転送
を再開するかを選択する選択ビットを設けるように構成
したので、アレイチェーン転送モードをスタートすると
きに、転送途中のブロックの最初からか、または最初の
ブロックからDMA転送を再開するかをFB/NB選択
ビットをもとにプログラムにより選択することができ、
暴走する可能性を排除できる効果がある。
According to the present invention, when restarting after the transfer of the array chain is interrupted, D from the beginning of the block in the middle of the transfer.
Since the selection bit for selecting whether to restart the MA transfer or to restart the DMA transfer from the first block is provided, when starting the array chain transfer mode, from the beginning of the block being transferred, or Whether to restart the DMA transfer from the first block can be selected by a program based on the FB / NB selection bit,
This has the effect of eliminating the possibility of runaway.

【0079】この発明によれば、アレイチェーン転送中
断直後、再スタートする際に、転送中断直後の番地から
DMA転送を再開するように構成したので、アレイチェ
ーン転送を一旦中断しても、その続きのデータから簡単
にDMA転送を再開できる効果がある。
According to the present invention, the DMA transfer is resumed from the address immediately after the interruption of the transfer when the array chain transfer is restarted immediately after the interruption of the array chain transfer. Thus, there is an effect that the DMA transfer can be easily restarted from the data.

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

【図1】 この発明の実施の形態1のDMAコントロー
ラの構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a DMA controller according to Embodiment 1 of the present invention.

【図2】 この発明の実施の形態2のDMAコントロー
ラにおけるDMA関連レジスタのメモリ配置構成図であ
る。
FIG. 2 is a diagram showing a memory arrangement configuration of DMA-related registers in a DMA controller according to a second embodiment of the present invention;

【図3】 この発明の実施の形態3のDMAコントロー
ラにおける転送パラメータメモリのメモリ配置図であ
る。
FIG. 3 is a memory layout diagram of a transfer parameter memory in a DMA controller according to Embodiment 3 of the present invention.

【図4】 この発明の実施の形態4のDMAコントロー
ラにおけるDMAC制御レジスタを説明する図である。
FIG. 4 is a diagram illustrating a DMAC control register in a DMA controller according to a fourth embodiment of the present invention.

【図5】 この発明の実施の形態5のDMAコントロー
ラの構成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a DMA controller according to Embodiment 5 of the present invention.

【図6】 この発明の実施の形態6のDMAコントロー
ラの構成を示すブロック図である。
FIG. 6 is a block diagram showing a configuration of a DMA controller according to a sixth embodiment of the present invention.

【図7】 この発明の実施の形態7のDMAコントロー
ラにおけるFB/NB選択ビットが割り当てられたDM
AC制御レジスタを説明する図である。
FIG. 7 is a diagram illustrating a DM to which an FB / NB selection bit is assigned in a DMA controller according to a seventh embodiment of the present invention;
FIG. 3 is a diagram illustrating an AC control register.

【図8】 従来のDMAコントローラの構成を説明する
図である。
FIG. 8 is a diagram illustrating a configuration of a conventional DMA controller.

【図9】 従来のDMAコントローラの任意のメモリ領
域にあらかじめ書き込まれた転送パラメータを説明する
図である。
FIG. 9 is a diagram illustrating transfer parameters written in advance in an arbitrary memory area of a conventional DMA controller.

【符号の説明】[Explanation of symbols]

1 転送元アドレスレジスタ、2 SARラッチ、3
転送先アドレスレジスタ、5 転送カウンタレジスタ、
6 TCRラッチ、11 FBSAR(第1のラッチ回
路)、12 FBTCR(第2のラッチ回路)、13
第1のアレイチェーン転送モード専用レジスタ(レジス
タ)、14 第2のアレイチェーン転送モード専用レジ
スタ(レジスタ)、15 NBSAR(第3のラッチ回
路)。
1 transfer source address register, 2 SAR latch, 3
Transfer destination address register, 5 transfer counter register,
6 TCR latch, 11 FBSAR (first latch circuit), 12 FBTCR (second latch circuit), 13
First array chain transfer mode dedicated register (register), 14 Second array chain transfer mode dedicated register (register), 15 NBSAR (third latch circuit).

フロントページの続き (72)発明者 小松 壇一 東京都千代田区丸の内二丁目2番3号 三 菱電機株式会社内 Fターム(参考) 5B061 DD01 DD06 QQ01 Continuation of the front page (72) Inventor Danichi Komatsu 2-3-2 Marunouchi, Chiyoda-ku, Tokyo Mitsubishi Electric Corporation F-term (reference) 5B061 DD01 DD06 QQ01

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 転送パラメータメモリの次の転送元番地
を格納する転送元アドレスレジスタ、前記転送パラメー
タメモリの番地を格納するSARラッチ、次の転送先番
地を格納する転送先アドレスレジスタ、転送中のブロッ
クのバイト数を格納する転送カウンタレジスタ、および
残りの転送ブロック数を格納するTCRラッチを有し、
アレイステートおよび転送ステートを繰り返しデータの
DMA転送を行うDMAコントローラにおいて、 アレイチェーン転送開始時に指定される前記転送パラメ
ータメモリの先頭番地を格納しておくための第1のラッ
チ回路と、 アレイチェーン転送時に前記TCRラッチへ転送される
全転送ブロック数を格納しておくための第2のラッチ回
路とを備えたことを特徴とするDMAコントローラ。
A transfer source address register for storing a next transfer source address of a transfer parameter memory; a SAR latch for storing an address of the transfer parameter memory; a transfer destination address register for storing a next transfer destination address; A transfer counter register for storing the number of bytes of the block, and a TCR latch for storing the number of remaining transfer blocks;
A DMA controller for performing a DMA transfer of data by repeating an array state and a transfer state; a first latch circuit for storing a start address of the transfer parameter memory designated at the start of the array chain transfer; A second latch circuit for storing the total number of transfer blocks transferred to the TCR latch.
【請求項2】 第1のラッチ回路および第2のラッチ回
路は、特定の番地に割り当てられているレジスタである
ことを特徴とする請求項1記載のDMAコントローラ。
2. The DMA controller according to claim 1, wherein the first latch circuit and the second latch circuit are registers assigned to specific addresses.
【請求項3】 転送パラメータメモリは、 特定の記憶領域が割り当てられ、先頭番地が特定の番地
に固定されており、 アレイステートおよび転送ステートでは、 アレイチェーン転送を開始するとき、前記先頭番地から
転送パラメータのデータを読み出し、それぞれ転送元ア
ドレスレジスタ、転送先アドレスレジスタおよび転送カ
ウンタレジスタに書き込んだ後、DMA転送を開始する
ことを特徴とする請求項1または請求項2記載のDMA
コントローラ。
3. A transfer parameter memory, in which a specific storage area is allocated and a start address is fixed to a specific address. In an array state and a transfer state, when starting an array chain transfer, transfer is performed from the start address. 3. The DMA according to claim 1, wherein the DMA transfer is started after the parameter data is read and written into the transfer source address register, the transfer destination address register, and the transfer counter register, respectively.
controller.
【請求項4】 アレイチェーン転送開始時、転送パラメ
ータメモリ領域を自由に設定するか、固定するかを選択
する選択ビットを設けたことを特徴とする請求項3記載
のDMAコントローラ。
4. The DMA controller according to claim 3, further comprising a selection bit for selecting whether to freely set or fix the transfer parameter memory area at the start of the array chain transfer.
【請求項5】 アレイチェーン転送中、アレイチェーン
転送開始時のパラメータメモリの先頭番地を格納してお
くための第1のラッチ回路およびアレイチェーン転送時
の全転送ブロック数を格納しておくための第2のラッチ
回路の値を、DMA転送が進むに従ってデクリメントす
るデクリメント手段を有し、 強制的にDMA転送を中断した後、再びDMA転送を開
始する際、前記デクリメント手段によりデクリメントさ
れた前記第1のラッチ回路および前記第2のラッチ回路
の値をもとにDMA転送途中のブロックの最初からDM
A転送を再開することを特徴とする請求項1または請求
項2記載のDMAコントローラ。
5. A first latch circuit for storing a start address of a parameter memory at the start of an array chain transfer during an array chain transfer, and a first latch circuit for storing a total number of transfer blocks during an array chain transfer. A decrement means for decrementing the value of the second latch circuit as the DMA transfer progresses; when the DMA transfer is forcibly interrupted and the DMA transfer is started again, the first decremented by the decrement means. From the beginning of the block in the middle of DMA transfer based on the values of the latch circuit and the second latch circuit.
3. The DMA controller according to claim 1, wherein the A transfer is restarted.
【請求項6】 アレイチェーン転送開始時のパラメータ
メモリの先頭番地を格納しておくための第1のラッチ回
路とは別に、さらにアレイチェーン転送中のブロックの
次のブロックの転送パラメータメモリの先頭アドレス
を、アレイステートから転送ステートへ移った後に格納
する第3のラッチ回路を有し、 アレイチェーン転送中断後、再開する際に、前記第3の
ラッチ回路から転送途中のブロックの転送パラメータメ
モリの先頭番地のアドレスを出力することにより、転送
途中のブロックの最初から転送を再開することを特徴と
する請求項1または請求項2記載のDMAコントロー
ラ。
6. A head address of a transfer parameter memory of a block next to a block being transferred in the array chain, separately from a first latch circuit for storing a head address of the parameter memory at the start of the array chain transfer. A third latch circuit for storing after the transfer from the array state to the transfer state, and when the array chain transfer is interrupted and resumed, the third latch circuit stores the start of the transfer parameter memory of the block being transferred from the third latch circuit. 3. The DMA controller according to claim 1, wherein the DMA controller restarts the transfer from the beginning of the block being transferred by outputting the address of the address.
【請求項7】 アレイチェーン転送中断後の再スタート
時、転送途中のブロックの最初からDMA転送を再開す
るか、最初のブロックからDMA転送を再開するかを選
択する選択ビットを設けたことを特徴とする請求項6記
載のDMAコントローラ。
7. When restarting after an array chain transfer is interrupted, a selection bit is provided for selecting whether to restart the DMA transfer from the beginning of the block being transferred or to restart the DMA transfer from the first block. 7. The DMA controller according to claim 6, wherein
【請求項8】 アレイチェーン転送中断直後、再スター
トする際に、転送中断直後の番地からDMA転送を再開
することを特徴とする請求項6記載のDMAコントロー
ラ。
8. The DMA controller according to claim 6, wherein the DMA transfer is restarted from the address immediately after the transfer is interrupted when the array chain transfer is restarted immediately after the transfer is interrupted.
JP10176410A 1998-06-23 1998-06-23 Dma controller Pending JP2000010908A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10176410A JP2000010908A (en) 1998-06-23 1998-06-23 Dma controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10176410A JP2000010908A (en) 1998-06-23 1998-06-23 Dma controller

Publications (1)

Publication Number Publication Date
JP2000010908A true JP2000010908A (en) 2000-01-14

Family

ID=16013203

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10176410A Pending JP2000010908A (en) 1998-06-23 1998-06-23 Dma controller

Country Status (1)

Country Link
JP (1) JP2000010908A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007087086A (en) * 2005-09-21 2007-04-05 Nec Electronics Corp Dma transfer system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007087086A (en) * 2005-09-21 2007-04-05 Nec Electronics Corp Dma transfer system
JP4723334B2 (en) * 2005-09-21 2011-07-13 ルネサスエレクトロニクス株式会社 DMA transfer system

Similar Documents

Publication Publication Date Title
EP0464615B1 (en) Microcomputer equipped with DMA controller
US4949241A (en) Microcomputer system including a master processor and a slave processor synchronized by three control lines
US5504869A (en) High speed processing system capable of executing strings of instructions in order without waiting completion of previous memory access instruction
JP4388005B2 (en) Context switching device
JP4642531B2 (en) Arbitration of data requests
JPH01120660A (en) Microcomputer device
US5677859A (en) Central processing unit and an arithmetic operation processing unit
JP2000010908A (en) Dma controller
JP2000298640A (en) Dma device
JP2000207203A (en) Micro controller
JP2723847B2 (en) Microprocessor
JPH09160786A (en) Microprocessor
JPS59144955A (en) Information processor
JPS6148743B2 (en)
JP2000040057A (en) Computer system, buffer controller and transferring method
JPS6240736B2 (en)
JP2594140B2 (en) Data driven data processor
JP2720427B2 (en) Vector processing equipment
JP3139310B2 (en) Digital signal processor
JP3127737B2 (en) Digital signal processor
JP2896207B2 (en) A / D converter
JP2847863B2 (en) Microprocessor interrupt control method
JPH0285951A (en) Input/output bus cycle control system
JP2002544619A (en) Object-oriented processing using dedicated pointer memory
JPH04162135A (en) Data processor