JPH04367957A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH04367957A
JPH04367957A JP14470791A JP14470791A JPH04367957A JP H04367957 A JPH04367957 A JP H04367957A JP 14470791 A JP14470791 A JP 14470791A JP 14470791 A JP14470791 A JP 14470791A JP H04367957 A JPH04367957 A JP H04367957A
Authority
JP
Japan
Prior art keywords
dma
data
bus
dmac
transfer
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
JP14470791A
Other languages
Japanese (ja)
Inventor
Takashi Harada
尚 原田
Satoru Tashiro
哲 田代
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 JP14470791A priority Critical patent/JPH04367957A/en
Publication of JPH04367957A publication Critical patent/JPH04367957A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Abstract

PURPOSE:To obtain the microcomputer having a DMA transfer function which can utilize effectively an MPU and can improve the processing efficiency of the whole system. CONSTITUTION:A DMAC is constituted of a main DMAC 5 and a local DMAC 6, and a DMA transfer to a memory 2 from an I/O 3 is executed by a first data transfer between the I/O 3 and the local DMAC 6 through a local bus 23, an in-DMAC data transfer between the local DMAC 6 and the main DMAC 5 through a system bus 22, and a second data transfer processing between the main DMAC 5 and the memory 2 through a main bus 21, and an execution timing of a second data transfer processing is determined by comparing the priority of an instruction of an MPU 1 to be executed next to an instruction of the MPU 1 under operation with a DMA transfer instruction. In such a way, the MPU can be utilized effectively and the processing efficiency of the whole system can be improved.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】この発明はメモリ,周辺装置間の
データ転送を直接行うDMA機能を有するマイクロコン
ピュータに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer having a DMA function for directly transferring data between memory and peripheral devices.

【0002】0002

【従来の技術】図4は従来のDMA機能を有するマイク
ロコンピュータの内部構成を示すブロック図である。
2. Description of the Related Art FIG. 4 is a block diagram showing the internal configuration of a conventional microcomputer having a DMA function.

【0003】同図に示すように、MPU1,メモリ2,
入出力装置3(以下、「I/O」という)及びDMAコ
ントローラ4(以下、「DMAC」という)がそれぞれ
データバス11〜14を介して共通に32ビットのメイ
ンバス10に接続されている。なお、データバス11、
12及び14は32ビット構成であり、データバス13
が8ビット構成である。また、DMAC4は、MPU1
の指示に従い後述するDMA転送の制御を行う。
As shown in the figure, an MPU 1, a memory 2,
An input/output device 3 (hereinafter referred to as "I/O") and a DMA controller 4 (hereinafter referred to as "DMAC") are commonly connected to a 32-bit main bus 10 via data buses 11 to 14, respectively. Note that the data bus 11,
12 and 14 have a 32-bit configuration, and the data bus 13
has an 8-bit configuration. In addition, DMAC4 is MPU1
DMA transfer, which will be described later, is controlled according to the instructions.

【0004】このような構成において、I/O3からメ
モリ2へのデータのDMA転送は、以下に示すように行
われる。
In such a configuration, DMA transfer of data from the I/O 3 to the memory 2 is performed as shown below.

【0005】まず、I/O3からDMA要求信号を受け
ると、MPU1の指示によりDMAC4は、I/O3に
対しDMAC4へのデータ転送を命令する。これを受け
たI/O3は8ビットのデータバス13、メインバス1
0中の特定の8ビットバス及びデータバス14中の特定
の8ビットバスを介して4個の8ビットのデータD1〜
D4をDMAC4に順次出力する。
First, upon receiving a DMA request signal from the I/O 3, the DMAC 4 instructs the I/O 3 to transfer data to the DMAC 4 according to instructions from the MPU 1. The I/O3 that receives this is an 8-bit data bus 13 and a main bus 1.
Four 8-bit data D1 through a specific 8-bit bus in data bus 14 and a specific 8-bit bus in data bus 14
D4 is sequentially output to DMAC4.

【0006】そして、DMAC4は4個の8ビットのデ
ータD1〜D4からなる32ビットのデータD0を、3
2ビットのデータバス14、メインバス10及びデータ
バス12を介して、メモリ2に出力する。
[0006] Then, the DMAC 4 converts the 32-bit data D0 consisting of four 8-bit data D1 to D4 into three
The data is output to the memory 2 via a 2-bit data bus 14, a main bus 10, and a data bus 12.

【0007】このように、DMAC4の制御下でメモリ
2とI/O3との直接データ転送を行うDMA機能を備
えることにより、その間、MPU1は他の処理を実行す
ることができるため、MPU1の有効利用が図れる。
[0007] In this way, by providing the DMA function for direct data transfer between the memory 2 and the I/O 3 under the control of the DMAC 4, the MPU 1 can perform other processing during that time, so that the effectiveness of the MPU 1 can be reduced. It can be used.

【0008】図5は、DMAC4の内部を詳細に示す説
明図である。同図に示すように、DMAC4は内部に4
個の8ビット構成のレジスタ41〜44を有している。 これらのレジスタ41〜44は、前述したI/O3から
メモリ2へのデータのDMA転送時に、4個の8ビット
データD1〜D4を1個の32ビットデータD0に変換
するために用いられる。すなわち、I/O3からDMA
C4へのデータ転送時において、データバス13、メイ
ンバス10中の特定の8ビットバス10A及びデータバ
ス14中の特定の8ビットバス14Aを介して、データ
D1はレジスタ41に、データD2はレジスタ42に、
データD3はレジスタ43に、データD4はレジスタ4
4にそれぞれ格納される。そして、DMAC4からメモ
リ2へのデータ転送時において、32ビットのデータバ
ス14及びメインバス10を介して、レジスタ41〜4
4に格納されたデータD1〜D4が一括して、32ビッ
トデータD0として、メモリ2に出力される。
FIG. 5 is an explanatory diagram showing the inside of the DMAC 4 in detail. As shown in the figure, DMAC4 has four internal
It has 8-bit registers 41 to 44. These registers 41 to 44 are used to convert four pieces of 8-bit data D1 to D4 into one piece of 32-bit data D0 during DMA transfer of data from the I/O 3 to the memory 2 described above. In other words, from I/O3 to DMA
During data transfer to C4, data D1 is transferred to the register 41 and data D2 is transferred to the register 41 via the data bus 13, a specific 8-bit bus 10A in the main bus 10, and a specific 8-bit bus 14A in the data bus 14. At 42,
Data D3 is stored in register 43, and data D4 is stored in register 4.
4 respectively. When data is transferred from the DMAC 4 to the memory 2, the registers 41 to 4 are transferred via the 32-bit data bus 14 and the main bus 10.
Data D1 to D4 stored in memory 2 are collectively output to memory 2 as 32-bit data D0.

【0009】図6は、I/O3からメモリ2へのデータ
のDMA転送時における各バスの状況を示すタイミング
図である。同図に示すように、I/O3からDMAC4
へのデータ転送期間T1において、8ビットのデータD
1〜D4がメインバス10を4サイクル占有し、DMA
C4からメモリ2へのデータ転送期間T2において、3
2ビットのデータD0がメインバス10を1サイクル占
有する。なお、図6は信号遅延等は全く考慮していない
FIG. 6 is a timing diagram showing the status of each bus during DMA transfer of data from the I/O 3 to the memory 2. As shown in the figure, from I/O3 to DMAC4
During the data transfer period T1, the 8-bit data D
1 to D4 occupy the main bus 10 for 4 cycles, and the DMA
During the data transfer period T2 from C4 to memory 2, 3
The 2-bit data D0 occupies the main bus 10 for one cycle. Note that FIG. 6 does not take into account signal delay or the like at all.

【0010】0010

【発明が解決しようとする課題】従来のDMA機能を有
するマイクロコンピュータは以上のように構成されてお
り、I/O3,メモリ2間のDMA転送における全期間
でメインバス10が占有されてしまう。このため、DM
A転送時間が長いとその間MPU1はメインバス10を
利用する処理を行うことができないため、マイクロコン
ピュータシステム全体の処理速度が遅くなるという問題
点があった。特に、I/O3のデータバス13のビット
数が少ない場合に上記問題点が顕著になる。
A conventional microcomputer having a DMA function is constructed as described above, and the main bus 10 is occupied during the entire period of DMA transfer between the I/O 3 and the memory 2. For this reason, DM
If the A transfer time is long, the MPU 1 cannot perform processing using the main bus 10 during that time, resulting in a problem that the processing speed of the entire microcomputer system becomes slow. In particular, the above problem becomes noticeable when the number of bits of the data bus 13 of the I/O 3 is small.

【0011】また、MPU1の命令とDMA転送との間
の優先順位は考慮されていないため、I/O3からDM
A要求信号が発生されると、実行中の命令の次に行うM
PU1の命令が重要性の高い命令であっても、実行中の
命令が終了すると、次に行うべきMPU1の命令より優
先してメインバス10を利用したDMA転送を行ってし
まうため、マイクロコンピュータシステム全体の処理速
度が遅くなるという問題点があった。
[0011] Furthermore, since the priority order between MPU1 instructions and DMA transfer is not taken into account, DM transfer from I/O3
When the A request signal is generated, M
Even if the instruction of PU1 is a highly important instruction, once the instruction being executed is finished, the DMA transfer using the main bus 10 will be performed with priority over the next instruction of MPU1, so the microcomputer system There was a problem that the overall processing speed became slow.

【0012】この発明は上記問題点を解決するためにな
されたもので、MPUの有効利用及びシステム全体の処
理効率の向上を図ったマイクロコンピュータを得ること
を目的とする。
The present invention has been made in order to solve the above-mentioned problems, and an object thereof is to provide a microcomputer that makes effective use of the MPU and improves the processing efficiency of the entire system.

【0013】[0013]

【課題を解決するための手段】この発明にかかるマイク
ロコンピュータは、DMA機能を有しており、メインバ
スと、ローカルバスと、前記メインバスに接続されたM
PUと、前記メインバスに接続されたメモリと、前記ロ
ーカルバスに接続され、あらかじめDMA転送時におけ
る優先順位が設定された周辺装置と、前記メインバスに
接続された第1のDMA制御部と前記ローカルバスに接
続された第2のDMA制御部とからなり、前記第1のD
MA制御部と前記第2のDMA制御部とは前記メインバ
ス及び前記ローカルバスを介さずにデータ転送可能なD
MA制御部とを備え、前記メモリ,前記周辺装置間のデ
ータ転送を直接行うDMAデータ転送を、前記第2のD
MA制御部の制御下で、前記周辺装置のDMA転送デー
タを前記ローカルバスを介して前記DMA制御部に転送
する第1のデータ転送動作と、前記第1のDMA制御部
の制御下で、前記DMA制御部に転送された前記DMA
転送データを前記メインバスを介して前記メモリに転送
する第2のデータ転送動作とを実行することにより行い
、前記第2のデータ転送動作の開始タイミングは、実行
中の前記MPUの命令の次に実行すべき前記MPUの命
令と前記DMAデータ転送処理との優先順位を比較して
、前者が後者より優先順位が高ければ前記次に実行すべ
きMPUの命令の終了以降に設定され、前者が後者より
優先順位が低ければ実行中の前記MPUの命令の終了直
後に設定される。
[Means for Solving the Problems] A microcomputer according to the present invention has a DMA function, and has a main bus, a local bus, and an M bus connected to the main bus.
a PU, a memory connected to the main bus, a peripheral device connected to the local bus and having priorities set in advance for DMA transfer, a first DMA control unit connected to the main bus, and a first DMA control unit connected to the main bus; a second DMA control unit connected to a local bus;
The MA control unit and the second DMA control unit are DMA controllers that can transfer data without going through the main bus and the local bus.
and an MA control unit, and the second D
a first data transfer operation of transferring DMA transfer data of the peripheral device to the DMA control unit via the local bus under the control of the first DMA control unit; The DMA transferred to the DMA control unit
A second data transfer operation for transferring transfer data to the memory via the main bus is executed, and the start timing of the second data transfer operation is after the instruction of the MPU that is being executed. The priorities of the MPU instruction to be executed and the DMA data transfer processing are compared, and if the former has a higher priority than the latter, it will be set after the end of the MPU instruction to be executed next, and the former will be set after the end of the MPU instruction to be executed next, and the former will be If the priority is lower, it is set immediately after the instruction of the MPU that is being executed ends.

【0014】[0014]

【作用】この発明においては、DMA制御部に転送され
たDMA転送データをメインバスを介してメモリに転送
する第2のデータ転送を行う際、その開始タイミングが
、第1のDMA制御部の制御下で、実行中のMPUの命
令の次に実行すべき命令とDMA転送処理との優先順位
を比較して、前者が後者より優先順位が高ければ次に実
行すべきMPUの命令の終了以降に設定され、低ければ
実行中のMPUの命令の終了直後に設定されるため、D
MA転送処理における第2のデータ転送命令の実行開始
タイミングを、次に実行すべきMPUの命令の重要度に
応じて変えることができる。
[Operation] In this invention, when performing the second data transfer in which the DMA transfer data transferred to the DMA control unit is transferred to the memory via the main bus, the start timing is controlled by the control of the first DMA control unit. Below, compare the priorities of the instruction to be executed next to the MPU instruction being executed and the DMA transfer process, and if the former has a higher priority than the latter, it will be executed after the completion of the next MPU instruction to be executed. If it is set, D
The execution start timing of the second data transfer instruction in the MA transfer process can be changed depending on the importance of the MPU instruction to be executed next.

【0015】[0015]

【実施例】図1はこの発明の一実施例であるDMA転送
機能を有するマイクロコンピュータの内部構成を示すブ
ロック図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing the internal structure of a microcomputer having a DMA transfer function, which is an embodiment of the present invention.

【0016】同図に示すように、従来と異なり、DMA
CはメインDMAC5とローカルDMAC6とから構成
されており、MPU1、メモリ2及びメインDMAC5
はそれぞれデータバス11、12及び15を介して共通
にメインバス21に接続される。また、メインDMAC
5はデータバス25を介してシステムバス22にも接続
される。
As shown in the figure, unlike the conventional method, DMA
C is composed of a main DMAC 5 and a local DMAC 6, and includes an MPU 1, a memory 2 and a main DMAC 5.
are commonly connected to the main bus 21 via data buses 11, 12 and 15, respectively. Also, the main DMAC
5 is also connected to the system bus 22 via a data bus 25.

【0017】一方、あらかじめDMA転送命令の優先順
位がそれぞれ設定された3個のI/O3(3A〜3C)
及びローカルDMAC6はそれぞれデータバス13A〜
13C及びデータバス16を介して共通にローカルバス
23に接続される。また、ローカルDMAC6はデータ
バス26を介してシステムバス22にも接続される。
On the other hand, three I/O3s (3A to 3C) each have a priority order of DMA transfer commands set in advance.
and the local DMAC 6 are connected to data buses 13A to 13A, respectively.
13C and a data bus 16, they are commonly connected to a local bus 23. The local DMAC 6 is also connected to the system bus 22 via a data bus 26.

【0018】メインDMAC5及びローカルDMAC6
はMPU1の指示に従い、互いに協調してメモリ2,I
/O3間のDMA転送の制御を行う。なお、データバス
11,12,15,25及び26並びにメインバス21
及びシステムバス22は32ビット構成であり、データ
バス13A〜13C、16及びローカルバス23は8ビ
ット構成である。
[0018] Main DMAC 5 and local DMAC 6
follow instructions from MPU 1 and cooperate with each other to store memories 2 and I.
Controls DMA transfer between /O3. In addition, the data buses 11, 12, 15, 25 and 26 and the main bus 21
The system bus 22 has a 32-bit configuration, and the data buses 13A to 13C, 16 and the local bus 23 have an 8-bit configuration.

【0019】このような構成において、I/O3(3A
〜3C)からメモリ2へのデータのDMA転送は、以下
に示すように行われる。
In such a configuration, I/O3 (3A
DMA transfer of data from ~3C) to memory 2 is performed as shown below.

【0020】あるI/O(仮にI/O3Bとする。)か
らMPU1にDMA転送要求が付与されると、MPU1
はメインDMAC5にメモリ2とI/O3Bとの間にお
けるDMA転送命令を与える。すると、メインDMAC
5はローカルDMAC6に対しDMA転送指示を与える
When a DMA transfer request is given to MPU1 from a certain I/O (temporarily assumed to be I/O3B), MPU1
gives the main DMAC 5 a DMA transfer command between the memory 2 and the I/O 3B. Then, the main DMAC
5 gives a DMA transfer instruction to the local DMAC 6.

【0021】これを受けたローカルDMAC6はI/O
3Bに対し、ローカルDMAC6にDMA転送データを
転送するように命令する。これを受けたI/O3Bは8
ビットのデータバス13B、ローカルバス23及びデー
タバス16を介して4個の8ビットのデータD1〜D4
をローカルDMAC6に順次出力する。この際、I/O
3Bは図示しない信号線を介してコントロール信号をロ
ーカルDMAC6に付与する。このコントロール信号は
、データD1〜D4がどのI/O3から転送されたデー
タであるか及びその優先順位を情報として含んでいる。 このようにして、I/O3BからローカルDMAC6へ
の第1のデータ転送動作が行われる。
[0021] Upon receiving this, the local DMAC 6 performs I/O
3B is instructed to transfer the DMA transfer data to the local DMAC 6. The I/O3B that received this is 8
Four 8-bit data D1 to D4 are transmitted via the bit data bus 13B, the local bus 23, and the data bus 16.
are sequentially output to the local DMAC 6. At this time, I/O
3B provides a control signal to the local DMAC 6 via a signal line (not shown). This control signal includes information about which I/O 3 the data D1 to D4 are transferred from and the priority thereof. In this way, the first data transfer operation from the I/O 3B to the local DMAC 6 is performed.

【0022】そして、ローカルDMAC6は4個の8ビ
ットのデータD1〜D4からなる32ビットのデータD
0を、32ビットのデータバス26、システムバス22
及びデータバス25を介して一括してメインDMAC5
に出力する。この際、コントロール信号も図示しない信
号線を介してメインDMAC5に出力される。このよう
にローカルDMAC6からメインDMAC5へのDMA
C内データ転送が行われる。
Then, the local DMAC 6 receives 32-bit data D consisting of four 8-bit data D1 to D4.
0, 32-bit data bus 26, system bus 22
and the main DMAC 5 all at once via the data bus 25.
Output to. At this time, a control signal is also output to the main DMAC 5 via a signal line (not shown). In this way, DMA from local DMAC6 to main DMAC5
Data transfer within C is performed.

【0023】メインDMAC5は、実行中のMPU1の
命令の次に実行すべきMPU1の命令の優先順位と取り
込んだコントロール信号により判明したI/O3BのD
MA転送命令の優先順位とを照合し、優先順位の高い方
の命令を、実行中のMPU1の命令終了後に行う。なお
、次に実行すべきMPU1の命令の優先順位は、図示し
ない信号線を介して次に実行すべき命令の実行開始前に
はメインDMAC5に付与される。
The main DMAC 5 determines the priority of the MPU 1 instruction to be executed next to the currently executed MPU 1 instruction and the I/O 3B D
The priorities of the MA transfer commands are checked, and the command with the higher priority is executed after the command of the MPU 1 being executed is completed. Note that the priority order of the next instruction to be executed by the MPU 1 is given to the main DMAC 5 via a signal line (not shown) before starting execution of the next instruction to be executed.

【0024】すなわち、次に実行すべきMPU1の命令
の優先順位がDMA転送対象であるI/O3BのDMA
データ転送命令の優先順位より高ければ、MPU1は実
行中の命令に連続して次に実行すべき命令を行い、I/
O3BのDMA転送命令の実行は待機状態となる。そし
て、次に実行すべきMPU1の命令が終了し次の次に実
行すべきMPU1の命令の優先順位よりI/O3BのD
MAデータ転送命令の優先順位が高ければ、メインDM
AC5の制御下で、格納した32ビットデータD0をデ
ータバス、メインバス21及びデータバス12を介して
メモリ12に出力することにより、メインDMAC5か
らメモリ2への第2のデータ転送が行われる。つまり、
第2のデータ転送は、I/O3BのDMA転送命令の優
先順位がMPU1の命令の優先順位より高くなるまで、
待機状態となる。
That is, the priority of the next instruction of MPU1 to be executed is DMA of I/O3B which is the target of DMA transfer.
If the priority is higher than that of the data transfer instruction, the MPU 1 executes the next instruction to be executed following the instruction being executed, and
Execution of the O3B DMA transfer command is in a standby state. Then, when the next MPU1 instruction to be executed is completed, the priority of the next MPU1 instruction to be executed is
If the priority of the MA data transfer command is high, the main DM
A second data transfer from the main DMAC 5 to the memory 2 is performed by outputting the stored 32-bit data D0 to the memory 12 via the data bus, the main bus 21, and the data bus 12 under the control of the AC 5. In other words,
The second data transfer continues until the priority of the I/O3B DMA transfer command becomes higher than the priority of the MPU1 command.
It will be in a standby state.

【0025】一方、次に実行すべきMPU1の命令の優
先順位がI/O3BのDMA転送命令の優先順位より低
ければ、実行中のMPU1の命令の終了後に、前述した
メインDMAC5からメモリ2への第2のデータ転送が
直ちに行われる。以下、上記動作を優先順位比較処理と
言う。なお、優先順位比較処理時に、複数のI/O3か
らDMA要求があった場合は、メインDMAC5におい
て、最も優先順位の高いI/O3におけるDMA転送命
令の優先順位と次に実行すべきMPU1の命令の優先順
位とが比較される。
On the other hand, if the priority of the MPU 1 instruction to be executed next is lower than the priority of the I/O 3B DMA transfer instruction, the above-mentioned main DMAC 5 to memory 2 A second data transfer occurs immediately. Hereinafter, the above operation will be referred to as priority comparison processing. If there are DMA requests from multiple I/O3s during the priority comparison process, the main DMAC 5 compares the priority of the DMA transfer instruction in the I/O3 with the highest priority and the MPU1 instruction to be executed next. The priority order of

【0026】以上、第1のデータ転送、DMAC内デー
タ転送及び第2のデータ転送を順次実行することにより
、I/O3からメモリ2へのDMA転送動作が行われる
As described above, the DMA transfer operation from the I/O 3 to the memory 2 is performed by sequentially executing the first data transfer, intra-DMAC data transfer, and second data transfer.

【0027】図2は、メインDMAC5及びローカルD
MAC6の内部を詳細に示す説明図である。同図に示す
ように、ローカルDMAC6は内部に4個の8ビット構
成のレジスタ61〜64を有している。これらのレジス
タ61〜64は、4個の8ビットデータD1〜D4を1
個の32ビットデータD0に変換するために用いられる
。すなわち、I/O3からローカルDMAC6へのデー
タ転送時において、データD1はレジスタ61に、デー
タD2はレジスタ62に、データD3はレジスタ63に
、データD4はレジスタ64にそれぞれ格納され、ロー
カルDMAC6からメインDMAC5へのデータ転送時
において、レジスタ61〜64に格納されたデータD1
〜D4が一括して、つまり32ビットデータD0として
、メインDMAC5中の32ビットのレジスタ50に出
力される。また、メインDMAC5のレジスタ50に格
納されたデータは、メインDMAC5からメモリ2への
DMA転送時に、32ビット単位でメモリ2へ転送され
る。
FIG. 2 shows the main DMAC 5 and local DMAC 5.
It is an explanatory diagram showing the inside of MAC6 in detail. As shown in the figure, the local DMAC 6 has four 8-bit registers 61 to 64 inside. These registers 61 to 64 store four 8-bit data D1 to D4 in one
32-bit data D0. That is, when data is transferred from the I/O 3 to the local DMAC 6, data D1 is stored in the register 61, data D2 is stored in the register 62, data D3 is stored in the register 63, and data D4 is stored in the register 64. At the time of data transfer to DMAC5, data D1 stored in registers 61 to 64
~D4 are output all at once, that is, as 32-bit data D0, to the 32-bit register 50 in the main DMAC 5. Further, the data stored in the register 50 of the main DMAC 5 is transferred to the memory 2 in units of 32 bits during DMA transfer from the main DMAC 5 to the memory 2.

【0028】図3は、I/O3からメモリ2へのDMA
データ転送時における各バスの状況を示すタイミング図
である。同図に示すように、DMA転送時間は、I/O
3からローカルDMAC6への第1のデータ転送期間T
01、ローカルDMAC6からメインDMAC5へのD
MAC内データ転送期間T02、待機時間T03及びメ
インDMAC5からメモリ2への第2のデータ転送期間
T04からなる。なお、当然のことながら、待機時間T
03は、DMA転送対象のI/O3におけるDMAデー
タ転送命令の優先順位が高ければ、短くなる傾向にある
FIG. 3 shows DMA from I/O3 to memory 2.
FIG. 3 is a timing diagram showing the status of each bus during data transfer. As shown in the figure, the DMA transfer time is
The first data transfer period T from 3 to the local DMAC 6
01, D from local DMAC6 to main DMAC5
It consists of an intra-MAC data transfer period T02, a standby time T03, and a second data transfer period T04 from the main DMAC 5 to the memory 2. In addition, as a matter of course, the waiting time T
03 tends to be shorter if the priority of the DMA data transfer command in the I/O3 to which the DMA transfer is performed is higher.

【0029】このように、DMACをメインDMAC5
及びローカルDMAC6に分割するとともに共用される
データバスをメインバス21、システムバス22及びロ
ーカルバスに分割することにより、I/O3からメモリ
2へのデータのDMAデータ転送において、I/O3か
らメインDMAC5への第1のデータ転送及びDMAC
内データ転送をメインバス21を用いることなく実行す
ることができる。したがって、第1のデータ転送時間T
01及びDMAC内データ転送期間T02において、M
PU1はメインバス21を使用したデータ処理を行うこ
とができるため、MPU1の効率利用が図れる。
[0029] In this way, the DMAC is
By dividing the shared data bus into the main bus 21, the system bus 22, and the local bus, in the DMA data transfer of data from the I/O 3 to the memory 2, the data bus from the I/O 3 to the main DMAC 5 is First data transfer to and DMAC
Internal data transfer can be performed without using the main bus 21. Therefore, the first data transfer time T
01 and during the intra-DMAC data transfer period T02, M
Since the PU 1 can perform data processing using the main bus 21, the MPU 1 can be used efficiently.

【0030】また、メインDMAC5からメモリ2への
第2のデータ転送時において、メインバス21の使用は
、MPU1の命令及び実行対象のI/OにおけるDMA
転送命令のうち、優先順位の高い命令から優先的に許可
されるため、マイクロコンピュータシステムの処理効率
を高めることができる。
Furthermore, during the second data transfer from the main DMAC 5 to the memory 2, the use of the main bus 21 is limited to the instruction of the MPU 1 and the DMA in the I/O to be executed.
Among the transfer instructions, instructions with a higher priority are preferentially permitted, so that the processing efficiency of the microcomputer system can be improved.

【0031】また、メモリ2側とI/O3側それぞれで
独立して処理が行えるため、例えば、I/O3側にサブ
のMPUが存在する場合、メインのMPU1とサブのM
PUとでそれぞれ独立して処理を行うことができ、マイ
クロコンピュータシステムの利用効率の向上が図れる。
Furthermore, since processing can be performed independently on the memory 2 side and the I/O 3 side, for example, if a sub MPU exists on the I/O 3 side, the main MPU 1 and the sub MPU
Each of the PUs can perform processing independently, and the efficiency of using the microcomputer system can be improved.

【0032】なお、本実施例では、メインDMAC5は
、I/O3からローカルバス23を介さずに得たコント
ロール信号に基づき優先順位等を把握したが、I/O3
からローカルバス23を介して転送されるデータにコン
トロール信号の情報を含ませるようにしてもよい。
In this embodiment, the main DMAC 5 grasps the priority order based on the control signal obtained from the I/O 3 without going through the local bus 23.
Control signal information may also be included in the data transferred from the local bus 23 through the local bus 23.

【0033】また、本実施例では、メインDMAC5は
、第1のデータ転送が行われた後、DMAC内データ転
送を行うことにより、メインDMAC5のレジスタ50
内にI/Oからの転送データを一度格納した後、優先順
位比較処理を行って第2のデータ転送を行ったが、第1
のデータ転送が行われた後にDMAC内転送動作を行う
ことなく優先順位比較処理を行い、第2のデータ転送を
、ローカルDMAC4から、システムバス22及びメイ
ンバス21を介して直接メインバス21にデータ転送を
行うように構成することもできる。
Further, in this embodiment, the main DMAC 5 performs intra-DMAC data transfer after the first data transfer, thereby updating the register 50 of the main DMAC 5.
After storing the transfer data from I/O in the memory, priority comparison processing was performed and the second data transfer was performed, but the first
After the second data transfer is performed, priority comparison processing is performed without performing an intra-DMAC transfer operation, and the second data transfer is performed directly from the local DMAC 4 to the main bus 21 via the system bus 22 and the main bus 21. It can also be configured to perform transfer.

【0034】また、本実施例では、I/Oが3個の場合
を示したが、これに限定されるものではない。
Further, in this embodiment, the case where there are three I/Os is shown, but the present invention is not limited to this.

【0035】また、本実施例では、メインDMAC5の
内部レジスタ構成は32ビットレジスタ1つであったが
、複数のレジスタが存在してもよい。この場合、個々の
I/Oに対応してメインDMAC5中に複数のレジスタ
を設けることにより、優先順位比較処理時において、複
数のレジスタに格納されたすべてのDMA転送対象のI
/OにおけるDMA転送命令とMPU1の命令のうち、
優先順位の高い命令から順次実行することができる。
Furthermore, in this embodiment, the internal register configuration of the main DMAC 5 is one 32-bit register, but a plurality of registers may exist. In this case, by providing multiple registers in the main DMAC 5 corresponding to individual I/Os, all I/Os to be transferred stored in multiple registers can be processed during priority comparison processing.
Of the DMA transfer command in /O and the MPU1 command,
Instructions can be executed sequentially starting from the highest priority.

【0036】また、本実施例のように共用のデータバス
を3分割せず、メモリ2側及びI/O3側に2分割し、
両者の間にバススイッチを設けた構成にし、バススイッ
チを必要に応じてオン/オフさせるようにしてもよい。
Furthermore, instead of dividing the shared data bus into three parts as in this embodiment, it is divided into two parts, one on the memory 2 side and one on the I/O 3 side.
A bus switch may be provided between the two, and the bus switch may be turned on/off as necessary.

【0037】また、ローカルDMAC6、複数のI/O
3及びローカルバス23からなるI/O側の構成を、シ
ステムバス22に対し並列に複数組設けてもよい。
[0037] Also, local DMAC 6, multiple I/O
A plurality of sets of I/O side configurations consisting of the local bus 23 and the local bus 23 may be provided in parallel to the system bus 22.

【0038】さらに、本発明のマイクロコンピュータが
1チップ上に構成されてもよく、また、メインバス21
、MPU1、メモリ2及びメインDMAC5等のメモリ
側の構成がメインボードに、ローカルバス23、ローカ
ルDMAC6及びI/O3等のI/O側の構成がサブボ
ードに形成され、メインボードとサブボードとをシステ
ムバス22で接続するような分割されたシステム構成で
も良い。
Furthermore, the microcomputer of the present invention may be configured on one chip, and the main bus 21
, MPU 1, memory 2, main DMAC 5, and other memory side configurations are formed on the main board, and I/O side configurations such as local bus 23, local DMAC 6, and I/O 3 are formed on subboards. A divided system configuration may also be used in which the two are connected via the system bus 22.

【0039】なお、本実施例においては、メインDMA
C5によって複数のI/O3の優先順位を判断したが、
この判断をローカルDMAC6が行っても良い。この場
合、例えば次のようなシステムが考えられる。
Note that in this embodiment, the main DMA
The priority order of multiple I/O3 was determined by C5, but
This determination may be made by the local DMAC 6. In this case, for example, the following system may be considered.

【0040】MPU1が命令を実行している間に、I/
O3A及びI/O3Bからそれぞれ異なる時間にDMA
転送要求があったとする。このDMA転送要求は、コン
トロール信号を介してローカルDMAC6にも伝えられ
る。ローカルDMAC6は、各DMA転送要求の優先順
位を判断し、ローカルDMAC6へ優先順位の高いI/
O3からデータを転送させる。次にローカルDMAC6
は、コントロール信号を用いてメインDMAC5にDM
A転送の準備が終了したことを伝える。このとき、ロー
カルDMAC6はメインDMAC5へどのI/O3から
データを受け取ったかという情報も伝える。そして、ロ
ーカルDMAC6からはメインDMAC5へデータが転
送される。データを受け取ったメインDMAC5は、次
に行うべきMPU1の命令とDMA転送命令との優先順
位比較処理を行いDMA転送命令の優先順位が高ければ
、実行中のMPV1の命令終了直後にメモリへDMA転
送を実行し、次に行うべきMPU1の命令の優先順位の
方が高ければ待機状態となる。そして、次に行うべきM
PUの命令実行中に次の次に行うべきMPU1の命令と
DMA転送命令との優先順位比較処理を先ほどと同様に
して行いMPUの次々命令またはDMA転送が実行され
る。
While the MPU 1 is executing instructions, the I/
DMA from O3A and I/O3B at different times
Assume that there is a transfer request. This DMA transfer request is also transmitted to the local DMAC 6 via a control signal. The local DMAC 6 determines the priority of each DMA transfer request and transfers the I/O with the higher priority to the local DMAC 6.
Transfer data from O3. Next, local DMAC6
sends DM to the main DMAC5 using the control signal.
Inform that the preparation for A transfer is complete. At this time, the local DMAC 6 also conveys information to the main DMAC 5 from which I/O 3 the data was received. Then, data is transferred from the local DMAC 6 to the main DMAC 5. The main DMAC 5 that has received the data compares the priorities of the next MPU 1 instruction and the DMA transfer instruction, and if the DMA transfer instruction has a higher priority, transfers the DMA to the memory immediately after the currently executed MPV 1 instruction ends. is executed, and if the priority of the MPU 1 instruction to be executed next is higher, the CPU 1 enters a standby state. And what to do next
While the PU instruction is being executed, priority comparison processing is performed between the next MPU 1 instruction and the DMA transfer instruction in the same way as before, and the MPU instruction or DMA transfer is executed one after another.

【0041】[0041]

【発明の効果】以上説明したように、この発明によれば
、DMA制御部に転送されたDMA転送データをメイン
バスを介してメモリに転送する第2のデータ転送を行う
際、その開始タイミングが、第1のDMA制御部の制御
下で、実行中のMPUの命令の次に実行すべきMPUの
命令とDMA転送処理との優先順位を比較して、前者が
後者より優先順位が高ければ次に実行すべきMPUの処
理の終了以降に設定され、低ければ実行中のMPUの命
令の終了直後に設定されるため、DMA転送処理におけ
る第2のデータ転送命令の実行開始タイミングを、MP
Uの命令の重要度に応じて変えることができ、効率のよ
いDMA転送命令の制御が可能となる。
As described above, according to the present invention, when performing the second data transfer in which the DMA transfer data transferred to the DMA control unit is transferred to the memory via the main bus, the start timing is , under the control of the first DMA control unit, compare the priorities of the MPU instruction to be executed next to the MPU instruction being executed and the DMA transfer process, and if the former has a higher priority than the latter, the next If it is low, it is set immediately after the end of the MPU instruction that is being executed, so the execution start timing of the second data transfer instruction in the DMA transfer process is
It can be changed depending on the importance of the U instruction, allowing efficient control of DMA transfer instructions.

【0042】また、DMA転送処理における第1のデー
タ転送は、MPUの接続されたメインバスを使用せずに
行われるため、第1のデータ転送の期間において、MP
Uはメインバスを使用した処理を実行することができる
[0042] Furthermore, since the first data transfer in the DMA transfer process is performed without using the main bus connected to the MPU, during the period of the first data transfer, the MP
U can execute processing using the main bus.

【0043】したがって、MPUの有効利用及びシステ
ム全体の処理効率の向上を図ることができる。
[0043] Therefore, it is possible to effectively utilize the MPU and improve the processing efficiency of the entire system.

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

【図1】この発明の一実施例であるDMA転送機能を有
するマイクロコンピュータの内部構成を示すブロック図
である。
FIG. 1 is a block diagram showing the internal configuration of a microcomputer having a DMA transfer function, which is an embodiment of the present invention.

【図2】図1で示したDMACの内部を詳細に示す説明
図である。
FIG. 2 is an explanatory diagram showing in detail the inside of the DMAC shown in FIG. 1;

【図3】図1及び図2で示したマイクロコンピュータに
おける各バスの状況を示すタイミング図である。
FIG. 3 is a timing diagram showing the status of each bus in the microcomputer shown in FIGS. 1 and 2;

【図4】従来のDMA転送機能を有するマイクロコンピ
ュータの内部構成を示すブロック図である。
FIG. 4 is a block diagram showing the internal configuration of a conventional microcomputer with a DMA transfer function.

【図5】図4で示したDMACの内部を詳細に示す説明
図である。
FIG. 5 is an explanatory diagram showing in detail the inside of the DMAC shown in FIG. 4;

【図6】図4及び図5で示したマイクロコンピュータに
おける各バスの状況を示すタイミング図である。
6 is a timing chart showing the status of each bus in the microcomputer shown in FIGS. 4 and 5. FIG.

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

1    MPU 2    メモリ 3    I/O 5    メインDMAC 6    ローカルDMAC 21  メインバス 22  システムバス 23  ローカルバス 1 MPU 2. Memory 3 I/O 5 Main DMAC 6 Local DMAC 21 Main bus 22 System bus 23 Local bus

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  DMA機能を有するマイクロコンピュ
ータであって、メインバスと、ローカルバスと、前記メ
インバスに接続されたMPUと、前記メインバスに接続
されたメモリと、前記ローカルバスに接続され、あらか
じめDMA転送時における優先順位が設定された周辺装
置と、前記メインバスに接続された第1のDMA制御部
と前記ローカルバスに接続された第2のDMA制御部と
からなり、前記第1のDMA制御部と前記第2のDMA
制御部とは前記メインバス及び前記ローカルバスを介さ
ずにデータ転送可能なDMA制御部とを備え、前記メモ
リ,前記周辺装置間のデータ転送を直接行うDMAデー
タ転送を、前記第2のDMA制御部の制御下で、前記周
辺装置のDMA転送データを前記ローカルバスを介して
前記DMA制御部に転送する第1のデータ転送動作と、
前記第1のDMA制御部の制御下で、前記DMA制御部
に転送された前記DMA転送データを前記メインバスを
介して前記メモリに転送する第2のデータ転送動作とを
実行することにより行い、前記第2のデータ転送動作の
開始タイミングは、実行中の前記MPUの命令の次に実
行すべき前記MPUの命令と前記DMAデータ転送処理
との優先順位を比較して、前者が後者より優先順位が高
ければ前記次に実行すべきMPUの命令の終了以降に設
定され、前者が後者より優先順位が低ければ実行中の前
記MPUの命令の終了直後に設定されることを特徴とす
るマイクロコンピュータ。
1. A microcomputer having a DMA function, comprising a main bus, a local bus, an MPU connected to the main bus, a memory connected to the main bus, and a microcomputer connected to the local bus, It consists of a peripheral device whose priority order during DMA transfer is set in advance, a first DMA control section connected to the main bus, and a second DMA control section connected to the local bus, and the first DMA control section is connected to the local bus. DMA control unit and the second DMA
The control unit includes a DMA control unit that can transfer data without going through the main bus and the local bus, and the second DMA control unit performs DMA data transfer that directly transfers data between the memory and the peripheral device. a first data transfer operation of transferring DMA transfer data of the peripheral device to the DMA control unit via the local bus under the control of the DMA control unit;
and a second data transfer operation of transferring the DMA transfer data transferred to the DMA control unit to the memory via the main bus under the control of the first DMA control unit, The start timing of the second data transfer operation is determined by comparing the priorities of the MPU instruction to be executed next to the MPU instruction being executed and the DMA data transfer process, and determining whether the former has higher priority than the latter. If the former is higher in priority than the latter, the setting is set after the completion of the MPU instruction to be executed next, and if the former has a lower priority than the latter, the setting is set immediately after the completion of the MPU instruction currently being executed.
JP14470791A 1991-06-17 1991-06-17 Microcomputer Pending JPH04367957A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14470791A JPH04367957A (en) 1991-06-17 1991-06-17 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14470791A JPH04367957A (en) 1991-06-17 1991-06-17 Microcomputer

Publications (1)

Publication Number Publication Date
JPH04367957A true JPH04367957A (en) 1992-12-21

Family

ID=15368421

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14470791A Pending JPH04367957A (en) 1991-06-17 1991-06-17 Microcomputer

Country Status (1)

Country Link
JP (1) JPH04367957A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1322441C (en) * 2003-10-30 2007-06-20 株式会社东芝 Multi-chip package type memory system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1322441C (en) * 2003-10-30 2007-06-20 株式会社东芝 Multi-chip package type memory system

Similar Documents

Publication Publication Date Title
JP3573614B2 (en) Image processing apparatus and image processing system
US20080276021A1 (en) Data transfer control apparatus
JPS62156752A (en) Multiplex processor calculation system
JPS6138507B2 (en)
US6286070B1 (en) Shared memory access device and method
EP0055623B1 (en) Direct memory-access mode for a high-speed memory system
JPH04367957A (en) Microcomputer
WO2021075076A1 (en) Information processing device and information processing method
JP3094944B2 (en) Arbitration method and device
US5797040A (en) Computer system having system bus which couples adapter and processing units and requires acquisition for data transmission thereover
JPH05282242A (en) Bus control system
JP4292218B2 (en) Image processing apparatus and image processing system
US20030177229A1 (en) Microcomputer, bus control circuit, and data access method for a microcomputer
JPH09218859A (en) Multiprocessor control system
JP2004021713A (en) Semiconductor storage device
JPH05151143A (en) Interruption processing system for computer containing dma controller
JPH04225458A (en) Computer
JPH0895899A (en) Dma transfer controller
JPS6336543B2 (en)
JPH05173936A (en) Data transfer processing device
JPS61174851A (en) Bus control system
JPH05233525A (en) Input/otuput processor
JPH05134980A (en) Bus system
JPH05128279A (en) One-chip microcomputer
JPH0773136A (en) Operation method for computer system