JP2001117862A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JP2001117862A
JP2001117862A JP29962999A JP29962999A JP2001117862A JP 2001117862 A JP2001117862 A JP 2001117862A JP 29962999 A JP29962999 A JP 29962999A JP 29962999 A JP29962999 A JP 29962999A JP 2001117862 A JP2001117862 A JP 2001117862A
Authority
JP
Japan
Prior art keywords
bus
address
cpu
dma
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP29962999A
Other languages
Japanese (ja)
Inventor
Kyoji Ogata
亨二 尾形
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP29962999A priority Critical patent/JP2001117862A/en
Publication of JP2001117862A publication Critical patent/JP2001117862A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To execute a high priority program by interrupting single transfer when the high priority program is started during the execution of single transfer where DMA transfer and CPU instruction execution are alternately executed. SOLUTION: A comparing and detecting means 25 detects the occurrence of an access request form a CPU 11 in a specified address area where the high priority program is stored. A bus arbiter 17 makes a DMA controller 13 interrupt DMA transfer, a DMA address in the case of interruption is stored in a stop address register 27 and, then, a bus usage right is continuously given to the CPU 11 so that the high priority program is executed. When the priority program is completed, address data of the stop address register 27 are shifted to a start address register 19 and, then, single transfer is re-started.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はDMA機能を備える
マイクロコンピュータに関し、特にシングル転送モード
のDMA機能を備えるマイクロコンピュータに関する。
The present invention relates to a microcomputer having a DMA function, and more particularly to a microcomputer having a DMA function in a single transfer mode.

【0002】[0002]

【従来の技術】大量のデータを効率よく高速に行うため
にCPUを介さずに、バスコントローラとDMAコント
ローラとの制御のもとにI/Oデバイスとメモリ間また
はメモリとメモリ間で直接に転送するダイレクトメモリ
アクセス(DMA)転送には、シングル転送,ディマン
ド転送,ブロック転送などの転送モードがある。シング
ル転送モードでは、1回のデータ転送のサイクル(バス
サイクル)毎にバスの使用権がDMAコントローラから
CPUに移るが、転送元からの全部のデータの転送が終
了していない場合にはDMAコントローラはバス使用要
求信号を出し続けるので、次のバスサイクルには再びバ
スの使用権がDMAコントローラに移りDMA転送が行
われる。このようにシングル転送モードでは、DMA要
求があるときにはバスサイクル毎にDMAコントローラ
とCPUとが交互にバス使用権を取得し、DMA要求が
ないときにはCPUがバス使用権を持つ。
2. Description of the Related Art A large amount of data is transferred directly between an I / O device and a memory or between a memory and a memory under the control of a bus controller and a DMA controller without the intervention of a CPU in order to efficiently perform a large amount of data at a high speed. Direct memory access (DMA) transfer includes transfer modes such as single transfer, demand transfer, and block transfer. In the single transfer mode, the right to use the bus is transferred from the DMA controller to the CPU every cycle of one data transfer (bus cycle). However, if the transfer of all data from the transfer source has not been completed, the DMA controller Keeps issuing a bus use request signal, so that in the next bus cycle, the right to use the bus is transferred to the DMA controller again and the DMA transfer is performed. As described above, in the single transfer mode, when there is a DMA request, the DMA controller and the CPU alternately acquire the bus use right every bus cycle, and when there is no DMA request, the CPU has the bus use right.

【0003】図7は従来のシングル転送モードを有する
マイクロコンピュータ1aのブロック図である。マイク
ロコンピュータ1aは、CPU71と、外部のバスを制
御するバスコントローラ72と、DMAの優先順位を決
定しDMA要求を制御するDMAコントローラ73と、
アドレスとデータをCPU71,バスコントローラ7
2,DMAコントローラ73の相互に転送することがで
きる内部バス74を備えるとともに、外部のアドレスバ
ス2およびデータバス3を介してメモリ4と接続されて
いる。また、図には示していないが、DMA転送に関わ
る他のメモリ,I/Oデバイスもアドレスバス2および
データバス3に接続されているものとする。
FIG. 7 is a block diagram of a conventional microcomputer 1a having a single transfer mode. The microcomputer 1a includes a CPU 71, a bus controller 72 for controlling an external bus, a DMA controller 73 for determining a DMA priority and controlling a DMA request,
Address and data are transferred to CPU 71 and bus controller 7
2, the DMA controller 73 has an internal bus 74 that can transfer data to each other, and is connected to the memory 4 via an external address bus 2 and data bus 3. Although not shown, it is assumed that other memories and I / O devices related to the DMA transfer are also connected to the address bus 2 and the data bus 3.

【0004】バスコントローラ72は、DMA転送時に
次に転送するデータの転送先のアドレスを示すDMAア
ドレス一時レジスタ75と、CPUのクロックに同期し
て1転送時間毎のバスサイクルを生成するバスサイクル
生成回路76と、バスサイクル毎のバス使用権を調停す
るバスアービタ77を備えている。バスアービタ77
は、DMAコントローラ73からバス使用要求信号BR
Qがアクティブであることを受け、CPU71へバス使
用停止信号CPUHLDをアクティブとし、CPU71
からのバス停止承諾信号CPUAKがアクティブになる
のを受けて、DMAコントローラ73にバス使用許可信
号BAKをアクティブとすることによりDMAコントロ
ーラ73にバス使用権を移す。また、DMAコントロー
ラ73へのバス使用許可信号BAKをインアクティブと
し、CPU71へのバス使用停止信号CPUHLDをイ
ンアクティブにすることによりCPU71にバス使用権
を戻す。
[0004] The bus controller 72 includes a DMA address temporary register 75 indicating a transfer destination address of data to be transferred next at the time of DMA transfer, and a bus cycle generation for generating a bus cycle for each transfer time in synchronization with a CPU clock. It comprises a circuit 76 and a bus arbiter 77 for arbitrating the right to use the bus for each bus cycle. Bus Arbiter 77
Is a bus use request signal BR from the DMA controller 73.
In response to the fact that Q is active, the bus use stop signal CPUHLD is made active to the CPU 71, and the CPU 71
In response to the bus stop acceptance signal CPUAK becoming active, the bus use right is transferred to the DMA controller 73 by activating the bus use permission signal BAK to the DMA controller 73. Further, the bus use permission signal BAK to the DMA controller 73 is made inactive, and the bus use stop signal CPUHLD to the CPU 71 is made inactive, thereby returning the bus use right to the CPU 71.

【0005】DMAコントローラ73は、複数のデバイ
スからDMA要求がある場合に優先順位を決定しバスア
ービタ77との間のバス使用要求信号BRQおよびバス
使用許可信号BAKの送受信に基づきDMA要求を制御
する優先順位制御回路78と、メモリ4のメモリマップ
4bに示すようにDMA対象領域82のDMA開始アド
レスを格納する開始アドレスレジスタ79と、DMA転
送する残りアドレス個数を示すアドレスカウンタ80
と、I/Oデバイスからメモリへ転送するライト転送か
またはメモリからI/Oデバイスへ転送するリード転送
かを指定するフィールドと転送モードを指定するフィー
ルドを有するモードレジスタ81とを備えている。以下
の説明においては、便宜的にDMA転送先がメモリであ
るライト転送が指定されているものとする。
[0005] The DMA controller 73 determines the priority when there are DMA requests from a plurality of devices, and controls the DMA request based on the transmission and reception of the bus use request signal BRQ and the bus use permission signal BAK with the bus arbiter 77. As shown in the memory map 4b of the memory 4, a rank control circuit 78, a start address register 79 for storing a DMA start address of the DMA target area 82, and an address counter 80 for indicating the number of remaining addresses for DMA transfer.
And a mode register 81 having a field for designating a write transfer for transferring data from the I / O device to the memory or a read transfer for transferring data from the memory to the I / O device, and a field for designating the transfer mode. In the following description, it is assumed that write transfer in which the DMA transfer destination is a memory is specified for convenience.

【0006】アドレスカウンタ80にはDMA転送の開
始時に転送するデータのアドレス個数がカウント値とし
て格納され、1アドレス分のデータを転送する毎にカウ
ント値は1ずつデクリメントするので、転送残りのアド
レス個数を常に示すことになる。DMAアドレス一時レ
ジスタ75には、DMA転送開始時に開始アドレスレジ
スタの内容が転送されて格納され、1アドレス分のデー
タを転送する毎に1ずつインクリメントするので、次の
アドレスのデータの転送までの期間には次の転送先アド
レスを保持することになる。
The number of addresses of data to be transferred at the start of DMA transfer is stored as a count value in the address counter 80, and the count value is decremented by one each time data of one address is transferred. Will always be shown. The contents of the start address register are transferred and stored in the DMA address temporary register 75 at the start of the DMA transfer, and are incremented by one each time data of one address is transferred. Holds the next transfer destination address.

【0007】シングル転送モードでのDMA転送中にマ
イクロコンピュータ1aが例えば割り込み処理などの優
先度の高いプログラム(高優先プログラム)を実行する
必要が生じた場合には、シングル転送を継続すると迅速
な実行が妨げられるので、DMA転送を一時中断してC
PU71にバスを解放することが必要となる。
If it is necessary for the microcomputer 1a to execute a high-priority program (high-priority program) such as an interrupt process during the DMA transfer in the single transfer mode, if the single transfer is continued, the microcomputer 1a can execute the program quickly. , DMA transfer is temporarily suspended and C
It is necessary to release the bus to the PU 71.

【0008】図8は、シングル転送を中断してCPUに
バス使用権を渡す場合のタイミング図である。CPU7
1が高優先プログラムを実行する際には、バスサイクル
iで高優先プログラムの実行を開始すると、次のバスサ
イクル(i+1)でDMAの実行状態(ステータス)を
読み込むための命令を実行し、DMA転送が実行されて
いる場合には、さらに次のバスサイクル(i+2)でプ
ログラムによりDMA転送の中断要求をバスアービタ7
7へ発行する。次のバスサイクル(i+3)でバスアー
ビタ77がDMAコントローラ73に対するバス使用許
可信号BAKをインアクティブにしてDMA転送を中止
し、次のバスサイクル(i+4)からはCPU71がバ
ス使用権を保持するという方法をとる。
FIG. 8 is a timing chart when a single transfer is interrupted and a bus use right is transferred to the CPU. CPU7
When the high-priority program starts executing in the bus cycle i, the instruction for reading the execution state (status) of the DMA is executed in the next bus cycle (i + 1). If the transfer is being executed, the bus arbiter 7 issues a DMA transfer interruption request by the program in the next bus cycle (i + 2).
Issue to 7. In the next bus cycle (i + 3), the bus arbiter 77 inactivates the bus use permission signal BAK for the DMA controller 73 to suspend the DMA transfer, and the CPU 71 holds the bus use right from the next bus cycle (i + 4). Take.

【0009】このように従来のマイクロコンピュータで
は、CPUが迅速なメモリアクセスを必要とするプログ
ラム中に、DMAの状態を読み込み、必要に応じてDM
A転送を中止するような命令をあらかじめ記述しておく
必要があった。また、このプロセスにおいては数命令の
実行が必要となるので、図8の例ではシングル転送モー
ドのDMA転送の中断までに4バスサイクルの時間を要
していた。
As described above, in the conventional microcomputer, the CPU reads the state of the DMA during a program requiring quick memory access,
It was necessary to describe in advance an instruction to stop the A transfer. In this process, since several instructions are required to be executed, it takes four bus cycles to suspend the DMA transfer in the single transfer mode in the example of FIG.

【0010】図9は特開平9−297731号公報に記
載された第2の従来例のブロック図であり、第1の従来
例の問題点に対して改良を加えたものである。CPU9
1と他のバスマスタであるDMAコントローラ92とD
RAMリフレッシュコントローラ93とが時分割でアド
レスバス94およびデータバス95を使用するときに、
バスの使用権を制御するバス分配制御回路96の内部に
各バスマスタのバス使用率を指定するフィールドを有す
るバスコントロールレジスタ97を設け、CPU91か
らバス使用率を変更できるようにしている。また割り込
みが発生したときに一定期間の間バスをCPU専用とす
る機能をバス分配制御回路96に付与してあるので、割
り込みが発生するとバス使用権はCPU96に移り、割
り込みプログラムの実行を開始する。期間内に完了しな
い割り込み処理の場合には、割り込みプログラムの先頭
でCPU91のバス使用率を大きくするように変更すれ
ばよい。この構成により、割り込みが発生したときに
は、プログラムでの記述も命令入力も必要とせずに自動
的にバス使用権をCPU91に移し、割り込み処理が終
了するまでCPU91がバス使用権を占有することが可
能となる。
FIG. 9 is a block diagram of a second conventional example described in Japanese Patent Application Laid-Open No. 9-297731, in which the problems of the first conventional example are improved. CPU 9
1 and a DMA controller 92 which is another bus master and D
When the RAM refresh controller 93 uses the address bus 94 and the data bus 95 in a time sharing manner,
A bus control register 97 having a field for designating the bus usage rate of each bus master is provided inside a bus distribution control circuit 96 for controlling the right to use the bus, so that the CPU 91 can change the bus usage rate. When an interrupt occurs, the bus distribution control circuit 96 is provided with a function of dedicating the bus to the CPU for a certain period of time. Therefore, when an interrupt occurs, the right to use the bus is transferred to the CPU 96 and execution of the interrupt program is started. . In the case of interrupt processing that is not completed within the period, it is sufficient to change the CPU 91 to increase the bus usage rate at the beginning of the interrupt program. With this configuration, when an interrupt occurs, the bus use right is automatically transferred to the CPU 91 without the need for program description or instruction input, and the CPU 91 can occupy the bus use right until the interrupt processing ends. Becomes

【0011】[0011]

【発明が解決しようとする課題】第2の従来例では、割
り込みにおいては自動的にCPUがバス使用権を取得し
処理の間はバスを優先的に使用することができるが、割
り込み以外でバスを優先的に使用したいプログラムに対
しては第1の従来例から大きな改善はなされていない。
第2の従来例においても割り込み以外の高優先プログラ
ムにおいては、予めプログラムの先頭でCPUのバス使
用率が最大になるように変更する必要があり、これは第
1の従来例においてDMA転送を中断してCPUにバス
使用権を移す場合と比較して手続的にも時間的にも大き
な相違はないからである。
In the second prior art, the CPU automatically acquires the right to use the bus during an interrupt and can use the bus preferentially during processing. There is no significant improvement over the first prior art for programs that preferentially use.
Also in the second prior art example, in a high-priority program other than an interrupt, it is necessary to change the bus utilization of the CPU at the beginning of the program in advance so that the DMA transfer is interrupted in the first prior art example. This is because there is no great difference in procedural and temporal aspects as compared with the case where the right to use the bus is transferred to the CPU.

【0012】本発明の目的は、割り込み処理のみでなく
それ以外のバスの優先使用が必要なプログラムに対して
も、その実行に際してはCPUが自動的に且つ速やかに
バス使用権を取得し、プログラムの実行中にはバス使用
権を維持することのできるマイクロコンピュータを提供
することにある。
An object of the present invention is to automatically and promptly acquire a bus use right for a program that requires not only interrupt processing but also other priority use of a bus. To provide a microcomputer which can maintain the right to use the bus during the execution of the program.

【0013】[0013]

【課題を解決するための手段】本発明の第1の発明のマ
イクロコンピュータは、CPUと、DMAの優先順位を
決定しDMA要求を制御するDMAコントローラと、外
部のバスを制御するバスコントローラとを備え、前記D
MAコントローラと前記CPUとがバスサイクル毎に交
互にバス使用権を取得するシングル転送モードを有する
マイクロコンピュータにおいて、前記バスコントローラ
が、前記バスに接続されたメモリ内の特定アドレス領域
を指定する特定領域指定手段と、前記CPUのアクセス
するアドレスが前記特定アドレス領域内にあるときに一
致信号を出力する比較検出手段と、前記一致信号の発生
に応答して前記DMAコントローラに次のバスサイクル
における前記バスの使用禁止を指示する第1の信号を送
信し前記CPUに次のバスサイクルにおける前記バスの
使用許可を指示する第2の信号を送信するバスアービタ
とを備えている。第2の発明のマイクロコンピュータ
は、第1の発明に加えて、前記DMAコントローラが、
前記一致信号が発生したバスサイクルの次のバスサイク
ルで予定していたDMA転送アドレスをDMA停止中に
保管する停止アドレスレジスタを備えている。第3のマ
イクロコンピュータは、第1の発明に加えて、前記DM
Aコントローラが、前記第1の信号の受信により始動し
前記DMAアドレス一時レジスタのアドレスデータを読
込みDMA停止中にわたり保管する停止アドレスレジス
タを備えている。第4の発明は第1,第2または第3の
発明に加えて、前記バスアービタの前記一致信号に応答
しての前記第1の信号および前記第2の信号の出力動作
の許可または禁止を指定するデータを格納するDMA中
断許可ビットを有するレジスタを備えている。
According to a first aspect of the present invention, there is provided a microcomputer including a CPU, a DMA controller for determining a DMA priority and controlling a DMA request, and a bus controller for controlling an external bus. Equipped, said D
In a microcomputer having a single transfer mode in which an MA controller and the CPU alternately acquire a bus use right for each bus cycle, the bus controller may specify a specific address area in a memory connected to the bus. Designating means, comparison detecting means for outputting a match signal when an address accessed by the CPU is within the specific address area, and providing the DMA controller in response to generation of the match signal to the DMA controller in a next bus cycle. A bus arbiter for transmitting a first signal for instructing the use of the bus and transmitting a second signal for instructing the CPU to use the bus in the next bus cycle. According to a second aspect of the present invention, in the microcomputer according to the first aspect, the DMA controller further comprises:
A stop address register is provided for storing a DMA transfer address scheduled in a bus cycle next to the bus cycle in which the coincidence signal is generated while the DMA is stopped. A third microcomputer according to the first invention further includes the DM
The A controller includes a stop address register which starts upon receipt of the first signal and reads the address data of the DMA address temporary register and stores the read address data while the DMA is stopped. According to a fourth aspect of the present invention, in addition to the first, second, or third aspect of the present invention, the permission or prohibition of the output operation of the first signal and the second signal in response to the coincidence signal of the bus arbiter is designated. And a register having a DMA interruption permission bit for storing data to be stored.

【0014】第1、第2,第3または第4の発明におい
て、前記特定領域指定手段が、前記特定アドレス領域の
先頭アドレスを格納する先頭アドレスレジスタと、前記
特定アドレス領域の最終アドレスを格納する最終アドレ
スレジスタとを備え、前記比較検出手段が、CPUのア
クセスするアドレスの数値データが前記先頭アドレスレ
ジスタの数値データと等しいかまたはこれよりも大きい
ときに論理1を出力する第1の大小比較器と、CPUの
アクセスするアドレスの数値データが前記最終アドレス
レジスタの数値データと等しいかまたはこれよりも小さ
いときに論理1を出力する第2の大小比較器と、前記第
1の大小比較器の出力および前記第2の大小比較器の出
力を入力とし前記一致信号を出力するANDゲートとを
備えて構成してもよい。または、前記特定領域指定手段
が、前記特定アドレス領域内のアドレスのうちひとつを
格納する特定領域指定レジスタを備え、前記比較検出手
段が、CPUのアクセスするアドレスの上位の所定ビッ
ト数のデータと前記特定領域指定レジスタの格納データ
の上位の前記所定ビット数のデータとを比較し一致する
ときに前記一致信号を出力する一致比較器を備えて構成
してもよい。または、前記メモリ内に複数の特定アドレ
ス領域を有し、前記複数の特定アドレス領域のそれぞれ
に対応した複数の特定領域指定手段と、前記複数の特定
領域指定手段のそれぞれに対応して設けられ前記CPU
のアクセスするアドレスが対応する特定領域指定手段に
指定されたアドレス領域に含まれるときに一致検出信号
を出力する複数の比較検出手段と、前記複数の比較検出
手段のいずれかから前記一致検出信号を入力したときに
一致信号を出力するORゲートとを備えて構成してもよ
い。
In the first, second, third or fourth invention, the specific area designating means stores a start address register for storing a start address of the specific address area and a last address of the specific address area. A first magnitude comparator comprising a last address register, wherein the comparison and detection means outputs a logical 1 when the numerical data of the address accessed by the CPU is equal to or greater than the numerical data of the first address register A second magnitude comparator that outputs a logical 1 when the numerical data of the address accessed by the CPU is equal to or smaller than the numerical data of the last address register; and an output of the first magnitude comparator. And an AND gate which receives the output of the second magnitude comparator as an input and outputs the coincidence signal. There. Alternatively, the specific area specifying means includes a specific area specifying register for storing one of the addresses in the specific address area, and the comparing and detecting means includes a data of a predetermined number of upper bits of an address accessed by a CPU and the data. A match comparator may be configured to compare the data stored in the specific area designation register with the data of the predetermined number of higher bits and output the match signal when they match. Alternatively, the memory has a plurality of specific address areas, a plurality of specific area specifying means corresponding to each of the plurality of specific address areas, and a plurality of specific area specifying means provided corresponding to each of the plurality of specific area specifying means. CPU
A plurality of comparison detection means for outputting a match detection signal when the address to be accessed is included in the address area designated by the corresponding specific area designation means; and outputting the match detection signal from one of the plurality of comparison detection means. An OR gate that outputs a coincidence signal when input is provided.

【0015】[0015]

【発明の実施の形態】本発明のマイクロコンピュータで
は、DMA転送とCPU命令実行を交互に行うシングル
転送の実行中に、CPUから高優先プログラムが格納さ
れた特定のアドレス領域に対するアクセス要求が発生す
るとこれを検出してシングル転送を中断し、CPUによ
る特定アドレスへのアクセス終了まで継続してCPUに
バスを解放することにより、DMA転送中においても高
優先プログラムをDMAに対して優先的に実行すること
ができる。高優先プログラムは割り込みプログラムに限
定されず、バスの優先使用を要するプログラムを対象と
することができる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS In a microcomputer according to the present invention, when a CPU issues an access request to a specific address area in which a high-priority program is stored during a single transfer in which a DMA transfer and a CPU instruction execution are alternately performed. By detecting this, the single transfer is interrupted, and the bus is released to the CPU continuously until the access to the specific address by the CPU is completed, so that the high-priority program is preferentially executed with respect to the DMA even during the DMA transfer. be able to. The high-priority program is not limited to the interrupt program, but may be a program that requires a priority use of the bus.

【0016】次に、本発明の実施の形態について図面を
参照して詳細に説明する。図1は本発明のマイクロコン
ピュータの一実施例および外部のバスおよびメモリとの
接続を示すブロック図である。マイクロコンピュータ1
は、第1の従来例の図7と同様に、CPU11と、外部
のバスを制御するバスコントローラ12と、DMAの優
先順位を決定しDMA要求を制御するDMAコントロー
ラ13と、アドレスとデータをCPU11,バスコント
ローラ12,DMAコントローラ13の相互に転送する
ことができる内部バス14を備えるとともに、外部のア
ドレスバス2およびデータバス3を介してメモリ4と接
続されている。また、図には示していないが、DMA転
送に関わる他のメモリ,I/Oデバイスがアドレスバス
2およびデータバス3に接続されていることも図7の第
1の従来例と同様である。また、以下の説明では、メモ
リ4がDMA転送先となるライト転送の場合について行
うが、リード転送の場合にはメモリ4をDMA転送元と
読み替えればよい。
Next, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a microcomputer according to the present invention and connection to an external bus and memory. Microcomputer 1
7, a CPU 11, a bus controller 12 for controlling an external bus, a DMA controller 13 for determining a priority of DMA and controlling a DMA request, and transferring addresses and data to the CPU 11. , A bus controller 12 and a DMA controller 13, which are mutually transferable, and are connected to the memory 4 via an external address bus 2 and data bus 3. Although not shown, other memories and I / O devices related to the DMA transfer are connected to the address bus 2 and the data bus 3, similarly to the first conventional example of FIG. In the following description, a case where the memory 4 is a write transfer as a DMA transfer destination will be described. However, in a case of a read transfer, the memory 4 may be read as a DMA transfer source.

【0017】バスコントローラ12は、図7と同様に、
CPUのクロックに同期してバスサイクルを生成するバ
スサイクル生成回路16と、バスサイクル毎のバス使用
権を調停するバスアービタ17を備えているが、さら
に、DMA転送での次に転送するデータの転送先のアド
レスを示すDMA一時レジスタ28とCPU11が外部
をアクセスするためにアドレスバスに出すアドレスデー
タを内部バス14を介して取り込み更新するCPU一時
レジスタ29とを有するDMAアドレス一時保管回路1
5と、メモリ4の特定のアドレス領域範囲を指定する特
定領域指定手段22と、CPU一時レジスタ29内のア
ドレスデータと特定領域指定手段22に指定されたアド
レス領域とを比較し、指定されたアドレス領域内にある
ときはバスアービタ17への出力である一致信号IDT
をアクティブとする比較検出手段25とを備えている。
特定領域指定手段22は、例えばメモリ4に設ける特定
のアドレス領域の先頭アドレスを登録する先頭アドレス
レジスタ23と特定アドレス領域の最終アドレスを登録
する最終アドレスレジスタ24で構成してもよい。図2
のメモリマップ図に示すように、メモリ4のメモリマッ
プ4a上で高優先プログラムが格納された特定領域31
は、その先頭アドレスが先頭アドレスレジスタ22によ
り指定され、最終アドレスが最終アドレスレジスタ24
に指定される。
The bus controller 12, as in FIG.
A bus cycle generating circuit 16 for generating a bus cycle in synchronization with the clock of the CPU and a bus arbiter 17 for arbitrating the right to use the bus for each bus cycle are provided. DMA address temporary storage circuit 1 having a DMA temporary register 28 indicating a previous address and a CPU temporary register 29 for taking in and updating via the internal bus 14 address data which the CPU 11 outputs to the address bus for accessing the outside.
5, the specific area specifying means 22 for specifying a specific address area range of the memory 4, and the address data in the CPU temporary register 29 and the address area specified by the specific area specifying means 22 are compared. When it is within the area, the match signal IDT which is output to the bus arbiter 17
And a comparison detection unit 25 that activates
The specific area specifying means 22 may be composed of, for example, a start address register 23 for registering a start address of a specific address area provided in the memory 4 and a last address register 24 for registering a last address of the specific address area. FIG.
As shown in the memory map diagram of FIG.
The start address is specified by the start address register 22 and the last address is
Is specified.

【0018】DMAコントローラ13は、図7と同様
に、複数のデバイスからDMA要求がある場合に優先順
位を決定しバスアービタ17との間のバス使用要求信号
BRQおよびバス使用許可信号BAKの送受信に基づき
DMA要求を制御する優先順位制御回路18と、DMA
開始アドレスを格納する開始アドレスレジスタ19と、
残りアドレス個数を示すアドレスカウンタ20と、モー
ドレジスタ21とを備えているが、さらに特定領域31
へのアクセス要求が発生することによってシングル転送
が中断された時点での次のバスサイクルで転送する予定
だったアドレスを格納する停止アドレスレジスタ27を
備えている。また、モードレジスタ21には、転送方向
を指定するフィールドと転送モードを指定するフィール
ドに加えて、シングル転送モードでDMA転送中に特定
領域31へのアクセス要求が生じたときにシングル転送
モードを中断することを許可するかどうかを設定するD
MA中断許可ビット26を設けている。
As in FIG. 7, the DMA controller 13 determines the priority when there are DMA requests from a plurality of devices and, based on the transmission and reception of the bus use request signal BRQ and the bus use permission signal BAK with the bus arbiter 17. A priority control circuit 18 for controlling a DMA request;
A start address register 19 for storing a start address;
An address counter 20 indicating the number of remaining addresses and a mode register 21 are provided.
A stop address register 27 is provided for storing an address to be transferred in the next bus cycle at the time when the single transfer is interrupted by the generation of the access request to the bus. The mode register 21 includes a field for designating the transfer direction and a field for designating the transfer mode, and also suspends the single transfer mode when an access request to the specific area 31 occurs during the DMA transfer in the single transfer mode. D to set whether to allow
An MA interruption permission bit 26 is provided.

【0019】図2のように、DMA転送の開始時には、
DMA対象領域30のDMA開始アドレスを開始アドレ
スレジスタ19に格納し、DMA転送するアドレス個数
をアドレスカウンタ20に格納し、1アドレス分のデー
タを転送する毎にアドレスカウンタ20のカウント値を
1ずつデクリメントして転送残りアドレス個数を示し、
またDMA一時レジスタ28が、DMA転送開始時には
開始アドレスレジスタの内容が転送されて格納され、1
アドレス分のデータを転送する毎に1ずつインクリメン
トして次の転送先アドレスを保持する点については、図
7の第1の従来例と同様である。
As shown in FIG. 2, at the start of the DMA transfer,
The DMA start address of the DMA target area 30 is stored in the start address register 19, the number of addresses to be DMA-transferred is stored in the address counter 20, and the count value of the address counter 20 is decremented by one every time data of one address is transferred. To indicate the number of addresses remaining to be transferred,
The DMA temporary register 28 transfers and stores the contents of the start address register at the start of the DMA transfer.
Each time the data for the address is transferred, it is incremented by one and the next transfer destination address is held, similarly to the first conventional example of FIG.

【0020】図3は、高優先プログラムが格納されてい
る特定領域に対してCPUのアクセス要求が生じたとき
に、シングル転送を中断してCPUにバス使用権を渡す
場合のタイミング図である。バスサイクルiでCPU1
1から特定領域のアクセス要求が発生すると、次のバス
サイクル(i+1)でバスアービタ17は、モードレジ
スタ21中のDMA中断許可ビット26がセットされて
いることを確認し、次のバスサイクル(i+2)でバス
アービタ17は、DMAコントローラ13へのバス使用
許可信号BAKをインアクティブとしてDMAを中止す
る。次のバスサイクル(i+3)からはCPU11がバ
ス使用権を保持するので、3バスサイクルでシングル転
送モードのDMA転送を中断してCPU11がバス使用
権を占有できるようにすることができる。
FIG. 3 is a timing chart showing a case where a single transfer is interrupted and a bus use right is transferred to the CPU when a CPU access request to a specific area in which a high-priority program is stored. CPU1 in bus cycle i
When an access request for a specific area occurs from 1, in the next bus cycle (i + 1), the bus arbiter 17 confirms that the DMA interruption permission bit 26 in the mode register 21 is set, and the next bus cycle (i + 2) The bus arbiter 17 inactivates the bus use permission signal BAK to the DMA controller 13 and suspends the DMA. Since the CPU 11 holds the right to use the bus from the next bus cycle (i + 3), the DMA transfer in the single transfer mode can be interrupted in three bus cycles so that the CPU 11 can occupy the right to use the bus.

【0021】図4は、CPU11に特定領域31のアク
セス要求が発生してから、シングル転送を中断して高優
先プログラムを実行し、終了後にシングル転送を再開す
るまでの処理手順を示すフロー図である。以下、図1,
図2を参照しながら図4を説明する。
FIG. 4 is a flowchart showing a processing procedure from when a request to access the specific area 31 is issued to the CPU 11 to when the single transfer is interrupted and the high priority program is executed, and after the termination, the single transfer is resumed. is there. Hereinafter, FIG.
FIG. 4 will be described with reference to FIG.

【0022】まず、ステップ40でCPU11に特定領
域31のアクセス要求が発生したとする。このアクセス
要求発生は、CPU一時レジスタ29のアドレスが特定
領域指定手段22の示す特定領域31のアドレス範囲と
一致することを比較検出手段25が検出し一致信号ID
Tがアクティブになることによりバスアービタ17に通
知される。
First, it is assumed that an access request for the specific area 31 is issued to the CPU 11 in step 40. When this access request is generated, the comparison detection means 25 detects that the address of the CPU temporary register 29 matches the address range of the specific area 31 indicated by the specific area designating means 22, and the matching signal ID
When T becomes active, the bus arbiter 17 is notified.

【0023】次のステップ41では、バスアービタ17
はモードレジスタ21のDMA中断許可ビット26がセ
ットされているかどうかをチェックする。DMA中断許
可ビット26がセットされていないときはステップ50
に移りシングル転送をそのまま続行するが、セットされ
ているときは次のステップ42に進む。なお、DMA中
断許可ビット26を設けずに特定領域30へのアクセス
要求があったときには常にシングル転送を中断するよう
に構成されているマイクロコンピュータではステップ4
1は省略される。
In the next step 41, the bus arbiter 17
Checks whether the DMA interruption permission bit 26 of the mode register 21 is set. If the DMA suspend permission bit 26 has not been set, step 50
Then, the single transfer is continued as it is, but if it is set, the process proceeds to the next step 42. Note that the microcomputer configured to interrupt the single transfer whenever there is a request to access the specific area 30 without providing the DMA interruption permission bit 26 is executed in step 4.
1 is omitted.

【0024】ステップ42では、バスアービタ17はD
MAコントローラ13へのバス使用許可信号BAKをイ
ンアクティブとしてDMAコントローラ13のバス使用
を禁止しDMA(シングル転送)を停止する。次いでス
テップ43では、DMA一時レジスタ28のアドレスデ
ータを内部バス14を介して停止アドレスレジスタ27
に移すことによりDMA中断時点における次の転送先ア
ドレスを保管する。ステップ44では、バスアービタ1
7はバス使用停止信号CPUHLDをインアクティブに
してCPU11にバス使用権を与える。次いでステップ
45ではバスマスターがCPUのCPUサイクルを実行
する。
In step 42, the bus arbiter 17
The bus use permission signal BAK to the MA controller 13 is made inactive to prohibit the DMA controller 13 from using the bus and stop DMA (single transfer). Next, at step 43, the address data of the DMA temporary register 28 is transferred to the stop address register 27 via the internal bus 14.
To save the next transfer destination address at the time of DMA interruption. In step 44, the bus arbiter 1
7 inactivates the bus use stop signal CPUHLD to give the CPU 11 the right to use the bus. Next, at step 45, the bus master executes the CPU cycle of the CPU.

【0025】ステップ46では、バスアービタ17は、
CPUのアクセスするアドレスが特定領域内であるかを
一致信号IDTの論理レベルから判定し、特定領域への
アクセスが継続しているときにはステップ45へ戻って
CPUサイクルを継続する。特定領域へのアクセスが終
了と判定したときには高優先プログラムの実行が完了し
たとみなして次のステップ47に進む。
In step 46, the bus arbiter 17
It is determined from the logical level of the coincidence signal IDT whether the address accessed by the CPU is within the specific area. When the access to the specific area is continued, the process returns to step 45 to continue the CPU cycle. When it is determined that the access to the specific area has been completed, it is considered that the execution of the high-priority program has been completed, and the process proceeds to the next step 47.

【0026】ステップ47では、バスアービタ17は、
バス使用停止信号CPUHLDを再びアクティブにして
CPU11のバス使用を禁止する。次いでステップ48
では、バス使用許可信号BAKを再びアクティブとして
DMAコントローラ13にバス使用権を移す。次いでス
テップ49では、停止アドレスレジスタ27に保管して
いたアドレスデータを開始アドレスレジスタ19に移
し、シングル転送再開時の転送先先頭アドレスとする。
アドレスカウンタには、ステップ43の段階での転送残
りアドレス数を保持しておき、シングル転送再開時には
そこからカウント(デクリメント)を再開することにな
る。ここまでの再開準備を完了して、次のステップ50
では、DMAコントローラがバスマスターとなってDM
A転送を実行し、シングル転送モードへ復帰する。
In step 47, the bus arbiter 17
The bus use stop signal CPUHLD is activated again to prohibit the CPU 11 from using the bus. Then step 48
Then, the bus use permission signal BAK is made active again to transfer the bus use right to the DMA controller 13. Next, at step 49, the address data stored in the stop address register 27 is transferred to the start address register 19, and is set as the transfer destination head address when the single transfer is restarted.
The address counter holds the number of remaining transfer addresses at the stage of step 43, and when the single transfer is restarted, the count (decrement) is restarted therefrom. After completing the preparations for restarting up to this point, the next step 50
Then, the DMA controller becomes the bus master and the DM
A transfer is performed, and the mode returns to the single transfer mode.

【0027】以上のように、シングル転送モードへの復
帰に当たっては、停止アドレスレジスタ27を設けて中
断時のアドレスを再開時まで保管し、再開時に開始アド
レスレジスタ19にロードすることにより、中断時のア
ドレスに連続して支障なくDMA転送を実行することが
できる。
As described above, when returning to the single transfer mode, the stop address register 27 is provided to store the address at the time of interruption until the time of resumption, and is loaded into the start address register 19 at the time of resumption. The DMA transfer can be executed continuously without any trouble for the addresses.

【0028】図5(a)および(b)は、CPUのアク
セスするアドレスが特定領域の範囲にあるかを比較検出
する部分回路の実施例の回路図である。図5(a)で
は、CPU一時レジスタ29にはCPUがアクセスする
アドレスデータが格納され、特定領域指定手段22内の
先頭アドレスレジスタ23には高優先プログラムが格納
されているアドレス範囲の先頭アドレスデータが格納さ
れ、最終アドレスレジスタ24にはアドレス範囲の最終
アドレスデータが格納されている。大小比較器51,5
2はA入力側に入力する数値データINaがB入力側に
入力する数値データINbと等しいか大きい(INa≧
INb)場合に論理1を出力する比較器であり、このよ
うな機能を持ち2つのNビットデータの大小を並列に比
較する比較器は特開昭62−266617号公報または
特開平01−271834号公報に開示された技術を用
いて実現することができる。大小比較器51のA入力側
はCPU一時レジスタ29に接続されB入力側は先頭ア
ドレスレジスタ23に接続されているので、CPU11
のアクセスするアドレスのデータ値が特定領域の先頭ア
ドレスのデータ値と等しいかこれより大きいときに、大
小比較器51の出力は論理1となる。これに対して、比
較器52のA入力側は最終アドレスレジスタ24に接続
されB入力側はCPU一時レジスタ29に接続されてい
るので、CPU11のアクセスするアドレスのデータ値
が特定領域の最終アドレスのデータ値と等しいかこれよ
り小さいときに、大小比較器52の出力は論理1とな
る。したがって大小比較器51の出力と大小比較器52
の出力とを入力とするANDゲート53の出力である一
致信号IDTは、CPU11のアクセスするアドレスが
先頭アドレスレジスタ23のアドレスデータから最終ア
ドレスレジスタ24のアドレスデータまでの範囲に含ま
れるときにのみ論理1となる。
FIGS. 5A and 5B are circuit diagrams of an embodiment of a partial circuit for comparing and detecting whether an address accessed by a CPU is within a specific area. In FIG. 5A, the CPU temporary register 29 stores the address data to be accessed by the CPU, and the head address register 23 in the specific area specifying means 22 stores the head address data of the address range in which the high priority program is stored. Is stored in the last address register 24. The last address data of the address range is stored in the last address register 24. Large and small comparators 51, 5
2 is that the numerical data INa input to the A input side is equal to or larger than the numerical data INb input to the B input side (INa ≧
INb) A comparator which outputs a logical 1 in the case of the above and which has such a function and compares the size of two N-bit data in parallel is disclosed in JP-A-62-266617 or JP-A-01-271834. It can be realized using the technology disclosed in the gazette. The A input side of the magnitude comparator 51 is connected to the CPU temporary register 29 and the B input side is connected to the head address register 23.
When the data value of the address to be accessed is equal to or greater than the data value of the head address of the specific area, the output of the magnitude comparator 51 becomes logic 1. On the other hand, since the A input side of the comparator 52 is connected to the last address register 24 and the B input side is connected to the CPU temporary register 29, the data value of the address accessed by the CPU 11 becomes the last address of the specific area. When equal to or less than the data value, the output of the magnitude comparator 52 is a logical one. Therefore, the output of the magnitude comparator 51 and the magnitude comparator 52
The match signal IDT, which is the output of the AND gate 53 that receives the output of the first address register 23 as an input, is only when the address accessed by the CPU 11 is included in the range from the address data of the first address register 23 to the address data of the last address register 24. It becomes 1.

【0029】また、図5(b)では、特定領域指定手段
22a内の特定領域指定レジスタ54にはnビットのア
ドレスデータのうち上位mビットが特定領域のアドレス
と上位mビットと等しいデータを格納しておく。すなわ
ち、特定領域指定レジスタ54に格納するデータは特定
領域の先頭アドレスデータであっても、最終アドレスデ
ータであっても、またはこれらの間のアドレスデータで
あってもよい。CPU一時レジスタ29のアドレスデー
タの上位mビットと特定領域指定レジスタ54のアドレ
スデータの上位mビットとは比較検出手段25aに入力
され、それぞれ対応するビット毎に比較され一致したと
きに一致信号IDTが論理1となる。比較検出手段25
aは、例えば、m個の排他的ORゲート55−1〜55
−mとm入力のNORゲート56で構成する一致比較器
を用いて実現することができる。図5(a)に比較して
構成素子数が多い大小比較器51,52を使用しないの
でハードウェアが削減できるという利点がある。
In FIG. 5B, the specific area specifying register 54 in the specific area specifying means 22a stores data in which the upper m bits of the n-bit address data are equal to the specific area address and the upper m bits. Keep it. That is, the data stored in the specific area designation register 54 may be the head address data of the specific area, the last address data, or the address data between them. The high-order m bits of the address data of the CPU temporary register 29 and the high-order m bits of the address data of the specific area designation register 54 are input to the comparison detection means 25a, and are compared for each corresponding bit. It becomes logic 1. Comparison detection means 25
a is, for example, m exclusive OR gates 55-1 to 55
This can be realized using a coincidence comparator composed of a NOR gate 56 having −m and m inputs. Compared to FIG. 5A, there is an advantage in that hardware can be reduced because the size comparators 51 and 52 having a larger number of constituent elements are not used.

【0030】図6は、複数の特定領域を設定できる構成
としたマイクロコンピュータの比較検出部分回路の実施
例の回路図である。第1の特定領域指定手段61に指定
した第1の特定領域のアドレス範囲とCPU一時レジス
タ29のアドレスデータの一致を第1の比較検出手段6
2で比較し、第2の特定領域指定手段63に指定した第
2の特定領域のアドレス範囲とCPU一時レジスタ29
のアドレスデータの一致を第2の比較検出手段64で比
較し、第3の特定領域指定手段65に指定した第3の特
定領域のアドレス範囲とCPU一時レジスタ29のアド
レスデータの一致を第3の比較検出手段66で比較し、
第1,第2,第3の比較検出手段のそれぞれの出力ID
T1,IDT2,IDT3を入力したORゲート67の
出力として一致信号IDT得る。CPU11のアクセス
するアドレスが第1の特定領域指定手段61、第2の特
定領域指定手段63、第3の特定領域指定手段65のい
ずれかで指定されたアドレス範囲と一致すると一致信号
IDTは論理1となる。割り込み処理プログラムとそれ
以外の高優先のプログラムが存在するとき、高優先プロ
グラムの格納アドレスとデータの格納アドレスが別の領
域のときなど、図6の構成を用いることにより柔軟に対
応できるという利点がある。図6は特定領域が3個の場
合であるが、他の個数に拡張することが容易であること
は明らかである。
FIG. 6 is a circuit diagram of an embodiment of a comparison and detection partial circuit of a microcomputer having a configuration in which a plurality of specific areas can be set. The first comparison / detection unit 6 determines whether the address range of the first specific region designated by the first specific region designation unit 61 matches the address data of the CPU temporary register 29.
2, the address range of the second specific area specified by the second specific area specifying means 63 and the CPU temporary register 29
The second comparison and detection means 64 compares the coincidence of the address data of the third specific area with the address range of the third specific area specified by the third specific area specifying means 65 and the address data of the CPU temporary register 29. Comparison is made by the comparison detection means 66,
Output ID of each of the first, second and third comparison and detection means
A match signal IDT is obtained as an output of the OR gate 67 to which T1, IDT2, and IDT3 are input. When the address to be accessed by the CPU 11 matches the address range specified by any of the first specific area specifying means 61, the second specific area specifying means 63, and the third specific area specifying means 65, the coincidence signal IDT becomes logical 1 Becomes When the interrupt processing program and the other high-priority programs exist, and the storage address of the high-priority program and the storage address of the data are in different areas, there is an advantage that the configuration shown in FIG. 6 can be flexibly used. is there. FIG. 6 shows a case where the number of specific regions is three, but it is clear that the number of specific regions can be easily increased to other numbers.

【0031】[0031]

【発明の効果】以上に説明したように、本発明のマイク
ロコンピュータでは、シングル転送モードでDMAを実
行中に高優先プログラムを実行する必要が生じたときに
は、割り込み処理のみでなくそれ以外のバスの優先使用
が必要なプログラムに対しても、その実行に際してはC
PUが自動的にかつ速やかにバス使用権を取得し、プロ
グラムの実行中にはバス使用権を維持し、高優先プログ
ラムの実行が終了すると自動的にシングル転送モードに
復帰するので、予め高優先プログラム内にシングル転送
を中止する手順およびシングル転送を再開する手順を付
加しておく必要がないので、高優先プログラムの作成時
間が短縮され、プログラムサイズを縮小できるととも
に、シングル転送の中断、復帰をハードウェアで処理す
るので、処理に要する時間を短縮できるという効果があ
る。
As described above, in the microcomputer of the present invention, when it becomes necessary to execute a high-priority program during execution of DMA in the single transfer mode, not only interrupt processing but also other buses are required. Even for programs that require priority use, C
The PU automatically and quickly acquires the right to use the bus, maintains the right to use the bus during the execution of the program, and automatically returns to the single transfer mode when the execution of the high-priority program ends. Since it is not necessary to add a procedure for stopping single transfer and a procedure for restarting single transfer in the program, the time required to create a high-priority program can be reduced, the program size can be reduced, and single transfer can be interrupted and returned. Since the processing is performed by hardware, there is an effect that the time required for the processing can be reduced.

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

【図1】本発明のマイクロコンピュータのブロック図で
ある。
FIG. 1 is a block diagram of a microcomputer of the present invention.

【図2】特定領域,DMA対象領域を示すメモリマップ
図である。
FIG. 2 is a memory map diagram showing a specific area and a DMA target area.

【図3】本発明におけるシングル転送を中断するときの
タイミング図である。
FIG. 3 is a timing chart when a single transfer is interrupted in the present invention.

【図4】本発明におけるシングル転送中断から再開まで
の処理手順のフロー図である。
FIG. 4 is a flowchart of a processing procedure from interruption to resumption of single transfer in the present invention.

【図5】(a),(b)は、CPUのアクセスするアド
レスが特定領域の範囲にあるかを比較検出する部分回路
の回路図である。
FIGS. 5A and 5B are circuit diagrams of partial circuits for comparing and detecting whether an address accessed by a CPU is within a specific area.

【図6】複数の特定領域を設定できる構成とした比較検
出部分回路の回路図である。
FIG. 6 is a circuit diagram of a comparison and detection partial circuit configured to be able to set a plurality of specific regions.

【図7】第1の従来例のブロック図である。FIG. 7 is a block diagram of a first conventional example.

【図8】第1の従来例でシングル転送を中断するときの
タイミング図である。
FIG. 8 is a timing chart when a single transfer is interrupted in the first conventional example.

【図9】第2の従来例のブロック図である。FIG. 9 is a block diagram of a second conventional example.

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

1,1a マイクロコンピュータ 2,94 アドレスバス 3,95 データバス 4 メモリ 4a,4b メモリマップ 11,71,91 CPU 12,72 バスコントローラ 13,73,92 DMAコントローラ 14,74 内部バス 15 アドレス一時保管回路 16,76 バスサイクル生成回路 17,77 バスアービタ 18,78 優先順位制御回路 19,79 開始アドレスレジスタ 20,80 アドレスカウンタ 21,81 モードレジスタ 22,22a,61,63,65 特定領域指定手段 23 先頭アドレスレジスタ 24 最終アドレスレジスタ 25,25a,62,64,66 比較検出手段 26 DMA中断許可ビット 27 停止アドレスレジスタ 28 DMA一時レジスタ 29 CPU一時レジスタ 30,82 DMA対象領域 31 特定領域 51,52 比較器 53 ANDゲート 55−1,55−2,55−m 排他的ORゲート 56 NORゲート 67 ORゲート 75 DMAアドレス一時レジスタ 93 DRAMリフレッシュコントローラ 96 バス分配制御回路 97 バスコントロールレジスタ 1,1a microcomputer 2,94 address bus 3,95 data bus 4 memory 4a, 4b memory map 11,71,91 CPU 12,72 bus controller 13,73,92 DMA controller 14,74 internal bus 15 address temporary storage circuit 16, 76 bus cycle generation circuit 17, 77 bus arbiter 18, 78 priority control circuit 19, 79 start address register 20, 80 address counter 21, 81 mode register 22, 22a, 61, 63, 65 specific area designation means 23 start address Register 24 Final address register 25, 25a, 62, 64, 66 Comparison detection means 26 DMA interruption permission bit 27 Stop address register 28 DMA temporary register 29 CPU temporary register 30, 82 DMA target area 3 Specific regions 51 and 52 comparator 53 the AND gate 55-1,55-2,55-m exclusive OR gate 56 NOR gate 67 OR gate 75 DMA address temporary register 93 DRAM refresh controller 96 bus distribution control circuit 97 Bus Control Register

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 CPUと、DMAの優先順位を決定しD
MA要求を制御するDMAコントローラと、外部のバス
を制御するバスコントローラとを備え、前記DMAコン
トローラと前記CPUとがバスサイクル毎に交互にバス
使用権を取得するシングル転送モードを有するマイクロ
コンピュータにおいて、 前記バスコントローラが、前記バスに接続されたメモリ
内の特定アドレス領域を指定する特定領域指定手段と、
前記CPUのアクセスするアドレスが前記特定アドレス
領域内にあるときに一致信号を出力する比較検出手段
と、前記一致信号の発生に応答して前記DMAコントロ
ーラに次のバスサイクルにおける前記バスの使用禁止を
指示する第1の信号を送信し前記CPUに次のバスサイ
クルにおける前記バスの使用許可を指示する第2の信号
を送信するバスアービタとを備えることを特徴とするマ
イクロコンピュータ。
1. A CPU and a priority order of a DMA are determined.
A microcomputer having a single transfer mode in which a DMA controller that controls an MA request and a bus controller that controls an external bus, wherein the DMA controller and the CPU alternately acquire a bus use right every bus cycle, The bus controller, a specific area specifying means for specifying a specific address area in a memory connected to the bus,
Comparison detection means for outputting a coincidence signal when an address accessed by the CPU is within the specific address area; and inhibiting the DMA controller from using the bus in a next bus cycle in response to the generation of the coincidence signal. A microcomputer comprising: a bus arbiter that transmits a first signal to instruct the CPU and transmits a second signal to the CPU to instruct the CPU to use the bus in a next bus cycle.
【請求項2】 CPUと、DMAの優先順位を決定しD
MA要求を制御するDMAコントローラと、外部のバス
を制御するバスコントローラとを備え、前記DMAコン
トローラと前記CPUとがバスサイクル毎に交互にバス
使用権を取得するシングル転送モードを有するマイクロ
コンピュータにおいて、 前記バスコントローラが、前記バスに接続されたメモリ
内の特定アドレス領域を指定する特定領域指定手段と、
前記CPUのアクセスするアドレスが前記特定アドレス
領域内にあるときに一致信号を出力する比較検出手段
と、前記一致信号の発生に応答して前記DMAコントロ
ーラに次のバスサイクルにおける前記バスの使用禁止を
指示する第1の信号を送信し前記CPUに次のバスサイ
クルにおける前記バスの使用許可を指示する第2の信号
を送信するバスアービタとを備え、 前記DMAコントローラが、前記一致信号が発生したバ
スサイクルの次のバスサイクルで予定していたDMA転
送アドレスをDMA停止中に保管する停止アドレスレジ
スタを備えることを特徴とするマイクロコンピュータ。
2. Priorities of CPU and DMA are determined and D
A microcomputer having a single transfer mode in which a DMA controller that controls an MA request and a bus controller that controls an external bus, wherein the DMA controller and the CPU alternately acquire a bus use right every bus cycle, The bus controller, a specific area specifying means for specifying a specific address area in a memory connected to the bus,
Comparison detection means for outputting a coincidence signal when an address accessed by the CPU is within the specific address area; and inhibiting the DMA controller from using the bus in a next bus cycle in response to the generation of the coincidence signal. A bus arbiter for transmitting a first signal to instruct the CPU and a second signal to instruct the CPU to permit use of the bus in a next bus cycle, wherein the bus cycle in which the DMA controller generates the coincidence signal is provided. A stop address register for storing a DMA transfer address scheduled in the next bus cycle while the DMA is stopped.
【請求項3】 CPUと、DMAの優先順位を決定しD
MA要求を制御するDMAコントローラと、外部のバス
を制御するバスコントローラとを備え、前記DMAコン
トローラと前記CPUとがバスサイクル毎に交互にバス
使用権を取得するシングル転送モードを有するマイクロ
コンピュータにおいて、 前記バスコントローラが、前記CPUのアクセスするア
ドレスを一時的に保管するCPUアドレス一時レジスタ
とDMA転送のアドレスを一時的に保管するDMAアド
レス一時レジスタとを有するアドレス一時保管回路と、
前記バスに接続されたメモリ内の特定アドレス領域を指
定する特定領域指定手段と、前記CPUアドレス一時レ
ジスタ内のアドレスデータが前記特定アドレス領域内に
あるときに一致信号を出力する比較検出手段と、前記一
致信号の発生に応答して前記DMAコントローラに次の
バスサイクルにおける前記バスの使用禁止を指示する第
1の信号を送信し前記CPUに次のバスサイクルにおけ
る前記バスの使用許可を指示する第2の信号を送信する
バスアービタとを備え、 前記DMAコントローラが、前記第1の信号の受信によ
り始動し前記DMAアドレス一時レジスタのアドレスデ
ータを読込みDMA停止中にわたり保管する停止アドレ
スレジスタを備えることを特徴とするマイクロコンピュ
ータ。
3. The CPU and the priority of the DMA are determined and
A microcomputer having a single transfer mode in which a DMA controller that controls an MA request and a bus controller that controls an external bus, wherein the DMA controller and the CPU alternately acquire a bus use right every bus cycle, An address temporary storage circuit, wherein the bus controller has a CPU address temporary register for temporarily storing an address accessed by the CPU and a DMA address temporary register for temporarily storing an address of DMA transfer;
A specific area specifying means for specifying a specific address area in a memory connected to the bus; a comparison detecting means for outputting a match signal when address data in the CPU address temporary register is in the specific address area; A first signal instructing the DMA controller to prohibit use of the bus in the next bus cycle in response to the generation of the coincidence signal, and instructing the CPU to permit use of the bus in the next bus cycle. And a bus arbiter for transmitting the second signal. 2. The DMA controller further comprises a stop address register which starts upon receipt of the first signal and reads the address data of the DMA address temporary register and stores the data while the DMA is stopped. And a microcomputer.
【請求項4】 前記バスアービタの前記一致信号に応答
しての前記第1の信号および前記第2の信号の出力動作
の許可または禁止を指定するデータを格納するDMA中
断許可ビットを有するレジスタを備える請求項1,2,
3記載のマイクロコンピュータ。
4. A register having a DMA interruption permission bit for storing data designating permission or prohibition of an output operation of the first signal and the second signal in response to the coincidence signal of the bus arbiter. Claims 1, 2,
3. The microcomputer according to 3.
【請求項5】 前記特定領域指定手段が、前記特定アド
レス領域の先頭アドレスを格納する先頭アドレスレジス
タと、前記特定アドレス領域の最終アドレスを格納する
最終アドレスレジスタとを備え、 前記比較検出手段が、CPUのアクセスするアドレスの
数値データが前記先頭アドレスレジスタの数値データと
等しいかまたはこれよりも大きいときに論理1を出力す
る第1の大小比較器と、CPUのアクセスするアドレス
の数値データが前記最終アドレスレジスタの数値データ
と等しいかまたはこれよりも小さいときに論理1を出力
する第2の大小比較器と、前記第1の大小比較器の出力
および前記第2の大小比較器の出力を入力とし前記一致
信号を出力するANDゲートとを備える請求項1,2,
3,4記載のマイクロコンピュータ。
5. The specific area specifying means includes a head address register for storing a head address of the specific address area, and a last address register for storing a last address of the specific address area; A first magnitude comparator that outputs a logical 1 when the numerical data of the address accessed by the CPU is equal to or larger than the numerical data of the first address register; A second magnitude comparator that outputs a logical 1 when the value is equal to or smaller than the numerical data of the address register; and an output of the first magnitude comparator and an output of the second magnitude comparator. And an AND gate for outputting the coincidence signal.
The microcomputer according to any one of claims 3 and 4.
【請求項6】 前記特定領域指定手段が、前記特定アド
レス領域内のアドレスのうちひとつを格納する特定領域
指定レジスタを備え、 前記比較検出手段が、CPUのアクセスするアドレスの
上位の所定ビット数のデータと前記特定領域指定レジス
タの格納データの上位の前記所定ビット数のデータとを
比較し一致するときに前記一致信号を出力する一致比較
器を備える請求項1,2,3,4記載のマイクロコンピ
ュータ。
6. The specific area specifying means includes a specific area specifying register for storing one of addresses in the specific address area, and the comparing and detecting means includes a predetermined number of upper bits of an address accessed by a CPU. 5. The micro-computer according to claim 1, further comprising a coincidence comparator for comparing the data with the data having the predetermined number of higher bits of the data stored in the specific area designation register and outputting the coincidence signal when the data is coincident. Computer.
【請求項7】 前記メモリ内に複数の特定アドレス領域
を有し、前記複数の特定アドレス領域のそれぞれに対応
した複数の特定領域指定手段と、前記複数の特定領域指
定手段のそれぞれに対応して設けられ前記CPUのアク
セスするアドレスが対応する特定領域指定手段に指定さ
れたアドレス領域に含まれるときに一致検出信号を出力
する複数の比較検出手段と、前記複数の比較検出手段の
いずれかから前記一致検出信号を入力したときに一致信
号を出力するORゲートとを備える請求項1,2,3,
4記載のマイクロコンピュータ。
7. A memory having a plurality of specific address areas in the memory, a plurality of specific area specifying means corresponding to each of the plurality of specific address areas, and a plurality of specific area specifying means corresponding to each of the plurality of specific area specifying means. A plurality of comparison detection means for outputting a match detection signal when an address accessed by the CPU is included in an address area designated by the corresponding specific area designation means; And an OR gate for outputting a coincidence signal when a coincidence detection signal is input.
4. The microcomputer according to 4.
JP29962999A 1999-10-21 1999-10-21 Microcomputer Pending JP2001117862A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29962999A JP2001117862A (en) 1999-10-21 1999-10-21 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29962999A JP2001117862A (en) 1999-10-21 1999-10-21 Microcomputer

Publications (1)

Publication Number Publication Date
JP2001117862A true JP2001117862A (en) 2001-04-27

Family

ID=17875085

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29962999A Pending JP2001117862A (en) 1999-10-21 1999-10-21 Microcomputer

Country Status (1)

Country Link
JP (1) JP2001117862A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012168808A (en) * 2011-02-15 2012-09-06 Fujitsu Semiconductor Ltd Data transfer system and data transfer scheduling program
JP2014038651A (en) * 2013-10-10 2014-02-27 Fujitsu Ltd Multiprocessor system, control method, and control program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012168808A (en) * 2011-02-15 2012-09-06 Fujitsu Semiconductor Ltd Data transfer system and data transfer scheduling program
JP2014038651A (en) * 2013-10-10 2014-02-27 Fujitsu Ltd Multiprocessor system, control method, and control program

Similar Documents

Publication Publication Date Title
EP0166272B1 (en) Processor bus access
US4270167A (en) Apparatus and method for cooperative and concurrent coprocessing of digital information
EP0464615B1 (en) Microcomputer equipped with DMA controller
JPS5812611B2 (en) Data Tensou Seigiyohoushiki
EP0443557B1 (en) Interrupt controller capable of realizing interrupt nesting function
JP2978539B2 (en) Data transfer control device
JP2000047974A (en) Bus arbitrating method of bus controller, bus controller, and system of electronic equipment
US5487157A (en) Microprogrammed microcomputer with high-speed interrupt for DRAM refresh
JP2001117862A (en) Microcomputer
JP3205992B2 (en) Direct memory access transfer controller
JP2907533B2 (en) Multiprocessor system
JP3265582B2 (en) Microcomputer
JPH02219157A (en) Bus arbiter in computer system
JPH08249269A (en) Method and device for controlling dma transfer
JP2819705B2 (en) Data transfer control device
JP2972557B2 (en) Data transfer control device and control method
JPH05165541A (en) Electronic circuit
JPS6054065A (en) Synchronous controller
JP2847729B2 (en) Information processing device
JP3206013B2 (en) Direct memory access transfer controller
JPS5839343B2 (en) Multiprocessor system instructions
JPS6011935A (en) Display device for action mode
JP2000315187A (en) Memory control device, its controlling method and recording medium
JPH05134980A (en) Bus system
JPH04306754A (en) Dma controller

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20030909