JP2009205601A - Memory access control device - Google Patents

Memory access control device Download PDF

Info

Publication number
JP2009205601A
JP2009205601A JP2008049572A JP2008049572A JP2009205601A JP 2009205601 A JP2009205601 A JP 2009205601A JP 2008049572 A JP2008049572 A JP 2008049572A JP 2008049572 A JP2008049572 A JP 2008049572A JP 2009205601 A JP2009205601 A JP 2009205601A
Authority
JP
Japan
Prior art keywords
microprocessor
data
memory
read
address
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.)
Granted
Application number
JP2008049572A
Other languages
Japanese (ja)
Other versions
JP5104402B2 (en
Inventor
Mitsuhiro Kurono
光宏 黒野
Yoshinori Kobayashi
義徳 小林
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa 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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP2008049572A priority Critical patent/JP5104402B2/en
Publication of JP2009205601A publication Critical patent/JP2009205601A/en
Application granted granted Critical
Publication of JP5104402B2 publication Critical patent/JP5104402B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a memory access control device for executing memory readout at a high speed by reducing a processing waiting time during memory access of a microprocessor and a DMA master. <P>SOLUTION: The memory access control device controls the memory access from the microprocessor and DMA master. The memory access control device includes an access arbitration means for arbitrating readout requests from the microprocessor and DMA master, and a command generation means for generating a command signal to be transmitted to a memory in accordance with an arbitration result of the access arbitration means. When the access arbitration means determines the readout requests are made simultaneously from the microprocessor and DMA master, the command generation means successively transmits a command signal for the microprocessor and a command signal for the DMA master to the memory in accordance with predetermined priority. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、マイクロプロセッサ(uP)とDMAマスターからのメモリへのアクセスを制御するメモリアクセス制御装置に関するものである。   The present invention relates to a memory access control apparatus for controlling access to a memory from a microprocessor (uP) and a DMA master.

図5は従来のメモリアクセス制御装置の構成図である。図5(a)はメモリアクセスの動作をブロック図で示しており、図5(b)は図5(a)の動作を表で示している。
マイクロプロセッサ1、DMA(Direct Memory Access)マスター2がそれぞれメモリ3にアクセスし、コントローラ10がマイクロプロセッサ1とDMAマスター2のメモリアクセスの調停を行う。
FIG. 5 is a block diagram of a conventional memory access control device. FIG. 5A shows a memory access operation in a block diagram, and FIG. 5B shows a table in FIG. 5A operation.
The microprocessor 1 and DMA (Direct Memory Access) master 2 each access the memory 3, and the controller 10 arbitrates memory access between the microprocessor 1 and the DMA master 2.

マイクロプロセッサ1がコントローラ10に対して、メモリ3に格納されているデータの読み出し要求を出す場合は、フロントサイドバスが使用される。
DMAマスター2がコントローラ10に対して、メモリ3に格納されているデータの読み出し要求を出す場合は、DMAバスが使用される。
When the microprocessor 1 issues a read request for data stored in the memory 3 to the controller 10, a front side bus is used.
When the DMA master 2 issues a read request for data stored in the memory 3 to the controller 10, the DMA bus is used.

コントローラ10の調停器11は、マイクロプロセッサ1とDMAマスター2からのデータの読み出し要求を受け取り、優先順位の高い方から処理を行い、アドレス,コマンド生成命令をコマンド生成器12へ送る。コマンド生成器12は、アドレスや読み出し要求であることを伝えるコマンド(オーバーヘッド)をメモリ3に対して発行し、メモリ3からデータの読み出しを順次実行する。この際、メモリバスが使用される。   The arbiter 11 of the controller 10 receives a data read request from the microprocessor 1 and the DMA master 2, performs processing from the higher priority, and sends an address and command generation instruction to the command generator 12. The command generator 12 issues a command (overhead) indicating that it is an address or a read request to the memory 3 and sequentially reads data from the memory 3. At this time, a memory bus is used.

マイクロプロセッサ1からのデータの読み出し要求の方がDMAマスター2からのデータの読み出し要求よりも優先順位が高い。図5(b)に示すように、マイクロプロセッサ1とDMAマスター2から同時にデータの読み出し要求があった場合には、マイクロプロセッサ1の処理を優先し、マイクロプロセッサ1の処理が終わり次第DMAマスター2の処理を実行する。   The data read request from the microprocessor 1 has a higher priority than the data read request from the DMA master 2. As shown in FIG. 5B, when there is a data read request simultaneously from the microprocessor 1 and the DMA master 2, the processing of the microprocessor 1 is prioritized, and the DMA master 2 is finished as soon as the processing of the microprocessor 1 is completed. Execute the process.

図6は従来のメモリアクセス制御装置におけるメモリアクセスの動作を説明するタイミングチャートである。
マイクロプロセッサ1とDMAマスター2から同時にデータの読み出し要求があった場合(A部)、マイクロプロセッサ1の処理が優先され、マイクロプロセッサ1用のアドレス,コマンドが生成されてメモリ3に発行される。
メモリ3から読み出されたデータAは、コントローラ10を経由してマイクロプロセッサ1へ渡される。これによりマイクロプロセッサ1からのデータの読み出し要求が解除される(B部)。
FIG. 6 is a timing chart for explaining the memory access operation in the conventional memory access control apparatus.
When there is a data read request simultaneously from the microprocessor 1 and the DMA master 2 (A part), the processing of the microprocessor 1 is prioritized, and the address and command for the microprocessor 1 are generated and issued to the memory 3.
Data A read from the memory 3 is passed to the microprocessor 1 via the controller 10. As a result, the data read request from the microprocessor 1 is canceled (B section).

このマイクロプロセッサ1からのデータの読み出し要求の解除により、待たされていたDMAマスター2の読み出し要求に移行し、DMAマスター2用のアドレス,コマンドが生成されてメモリ3に発行される(B部)。
メモリ3から読み出されたデータBは、コントローラ10を経由してDMAマスター2へ渡される。これによりDMAマスター2からのデータの読み出し要求が解除される(C部)。
By canceling the data read request from the microprocessor 1, the process proceeds to the DMA master 2 read request that has been waiting, and the address and command for the DMA master 2 are generated and issued to the memory 3 (part B). .
Data B read from the memory 3 is transferred to the DMA master 2 via the controller 10. As a result, the data read request from the DMA master 2 is canceled (C section).

特開昭61−123969号公報Japanese Patent Laid-Open No. 61-123969

マイクロプロセッサとDMAマスターから同時にメモリに対しアクセスがあった場合、DMAマスターはマイクロプロセッサよりも優先順位が低いため、DMAマスターの処理はマイクロプロセッサの処理が終わるまで待たされていた。
一方、DMAマスターがメモリに対してアクセスする権利を優先して持っていた場合は、マイクロプロセッサの処理がDMAマスターの処理が終わるまで待たされていた。
When the microprocessor and the DMA master access the memory at the same time, the DMA master has a lower priority than the microprocessor, so that the DMA master processing is waited until the processing of the microprocessor is completed.
On the other hand, when the DMA master preferentially has the right to access the memory, the processing of the microprocessor is waited until the processing of the DMA master is completed.

また、マイクロプロセッサから1つのデータの読み出し要求があると、コントローラはマイクロプロセッサから要求された1回のデータ分だけメモリから読み出しを行う仕組みであるため、マイクロプロセッサがメモリからデータを読み出す頻度が高い場合には、オーバーヘッドが多くなり、マイクロプロセッサの処理性能の低下を引き起こすという問題点があった。   In addition, when there is a request for reading one data from the microprocessor, the controller reads the data from the memory for one data requested from the microprocessor, so the microprocessor reads the data from the memory frequently. In such a case, there is a problem that the overhead increases and the processing performance of the microprocessor is lowered.

本発明は上述した問題点を解決するためになされたものであり、マイクロプロセッサとDMAマスターのメモリアクセスの際の処理待ち時間を少なくし、高速にメモリ読み出しを実行できるメモリアクセス制御装置を実現することを目的とする。   The present invention has been made to solve the above-described problems, and realizes a memory access control device capable of executing a memory read at a high speed by reducing a processing waiting time when accessing a memory of a microprocessor and a DMA master. For the purpose.

このような課題を達成するために、本発明は次のとおりの構成になっている。
(1)マイクロプロセッサとDMAマスターからのメモリアクセスを制御するメモリアクセス制御装置において、
前記マイクロプロセッサと前記DMAマスターからの読み出し要求を調停するアクセス調停手段と、
該アクセス調停手段の調停結果に従い前記メモリへ送るコマンド信号を生成するコマンド生成手段と、を有し、
前記アクセス調停手段が、前記マイクロプロセッサと前記DMAマスターから同時に読み出し要求があったと判断した場合、前記コマンド生成手段は、前記マイクロプロセッサ用のコマンド信号と前記DMAマスター用のコマンド信号を、定められた優先順位に従い連続して前記メモリへ送ることを特徴とするメモリアクセス制御装置。
In order to achieve such a subject, the present invention is configured as follows.
(1) In a memory access control device that controls memory access from a microprocessor and a DMA master,
Access arbitration means for arbitrating read requests from the microprocessor and the DMA master;
Command generation means for generating a command signal to be sent to the memory in accordance with the arbitration result of the access arbitration means,
When the access arbitration means determines that there is a simultaneous read request from the microprocessor and the DMA master, the command generation means determines a command signal for the microprocessor and a command signal for the DMA master. A memory access control device for continuously sending data to the memory according to priority.

(2)前記アクセス調停手段は、前記メモリアクセスの優先順位を定めたマスター信号を生成するマスター信号生成手段と、
前記マイクロプロセッサと前記DMAマスターからの読み出し要求及び前記マスター信号から前記コマンド信号を生成する手順を制御する選択信号制御手段と、
を有することを特徴とする(1)記載のメモリアクセス制御装置。
(2) The access arbitration means includes a master signal generation means for generating a master signal that defines the priority order of the memory access;
Selection signal control means for controlling a read request from the microprocessor and the DMA master and a procedure for generating the command signal from the master signal;
(1) The memory access control device according to (1).

(3)前記コマンド生成手段は、前記マイクロプロセッサからの読み出しアドレスと、該アドレスに所定値を加算したアドレスと、前記DMAマスターからの読み出しアドレスとから使用するアドレスを選択するアドレス選択手段を有し、前記選択信号制御手段により該アドレス選択手段を制御して前記コマンド信号を生成することを特徴とする(2)記載のメモリアクセス制御装置。 (3) The command generation means includes address selection means for selecting an address to be used from a read address from the microprocessor, an address obtained by adding a predetermined value to the address, and a read address from the DMA master. The memory access control device according to (2), wherein the command signal is generated by controlling the address selection means by the selection signal control means.

(4)前記メモリから読み出したデータを一時的に保持する第1のバッファと、前記データを読み出す際に該データに連続する1つ先のデータも読み出して一時的に保持する第2のバッファと、前記第1及び第2のバッファのデータのうちどちらのデータを使用するか選択するデータ選択手段とからなるデータ制御手段を有し、
前記マイクロプロセッサからの読み出しアドレスが連続する場合に、前記第2のバッファのデータを使用することを特徴とする(1)乃至(3)のいずれかに記載のメモリアクセス制御装置。
(4) a first buffer that temporarily holds data read from the memory, and a second buffer that also reads and temporarily holds one data ahead of the data when the data is read Data control means comprising data selection means for selecting which data of the first and second buffer data to use,
4. The memory access control device according to any one of (1) to (3), wherein data in the second buffer is used when read addresses from the microprocessor are continuous.

(5)前記マイクロプロセッサからの読み出しアドレスと、前回の読み出しアドレスに所定値を加算したアドレスとを比較するアドレス判定手段を有し、
前記比較による値が一致した場合に、前記第2のバッファのデータを使用することを特徴とする(4)記載のメモリアクセス制御装置。
(5) having an address determination means for comparing a read address from the microprocessor with an address obtained by adding a predetermined value to the previous read address;
The memory access control device according to (4), wherein the data in the second buffer is used when the values by the comparison match.

本発明によれば次のような効果がある。
マイクロプロセッサとDMAマスターのメモリへのアクセスにおいて、オーバーヘッドが少なくなるようにしたので、高速にメモリ読み出しを実行することができる。
The present invention has the following effects.
Since the overhead is reduced in accessing the memory of the microprocessor and the DMA master, the memory can be read at a high speed.

以下、図面を用いて本発明を詳細に説明する。
図1は本発明の一実施例を示す構成図である。図1(a)はメモリアクセスの動作をブロック図で示しており、図1(b)は図1(a)の動作を表で示している。前出の図と同一のものは同一符号を付ける。
マイクロプロセッサ1、DMAマスター2がそれぞれメモリ3にアクセスし、コントローラ20がマイクロプロセッサ1とDMAマスター2のメモリアクセスの調停を行う。メモリ3としては、SDRAM(Synchronous Dynamic Random Access Memory)やDDRSDRAM(Double Data Rate SDRAM)、DDR2SDRAM等が使用される。
Hereinafter, the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram showing an embodiment of the present invention. FIG. 1A is a block diagram showing the memory access operation, and FIG. 1B is a table showing the operation of FIG. The same parts as those in the previous figure are given the same reference numerals.
The microprocessor 1 and the DMA master 2 each access the memory 3, and the controller 20 arbitrates memory access between the microprocessor 1 and the DMA master 2. As the memory 3, an SDRAM (Synchronous Dynamic Random Access Memory), a DDR SDRAM (Double Data Rate SDRAM), a DDR2 SDRAM, or the like is used.

例えば、プラントのフィールド機器を制御するプラント制御システムのプロセッサモジュールでは、マイクロプロセッサ1が演算処理を行い、DMAマスターは他のプロセッサモジュールとの間でデータの等値化処理を行う。   For example, in a processor module of a plant control system that controls plant field devices, the microprocessor 1 performs arithmetic processing, and the DMA master performs data equalization processing with other processor modules.

マイクロプロセッサ1がコントローラ20に対してメモリ3に格納されているデータの読み出し要求を出す場合は、フロントサイドバスが使用される。
DMAマスター2がコントローラ20に対してメモリ3に格納されているデータの読み出し要求を出す場合は、DMAバスが使用される。
When the microprocessor 1 issues a read request for data stored in the memory 3 to the controller 20, the front side bus is used.
When the DMA master 2 issues a read request for data stored in the memory 3 to the controller 20, the DMA bus is used.

コントローラ20のアクセス調停手段21は、マイクロプロセッサ1とDMAマスター2からのデータの読み出し要求を受け取る。アクセス調停手段21は、マイクロプロセッサ1とDMAマスター2からのデータの読み出し要求の優先順位等の調停条件を利用して、それぞれの読み出し要求のタイミングに合わせた調停処理を行う。   The access arbitration unit 21 of the controller 20 receives data read requests from the microprocessor 1 and the DMA master 2. The access arbitration means 21 uses the arbitration conditions such as the priority of data read requests from the microprocessor 1 and the DMA master 2 to perform arbitration processing in accordance with the timing of each read request.

コマンド生成手段22は、アクセス調停手段21の調停結果に従い、アドレスと読み出し要求であることを伝えるコマンド(以下、これらをまとめてコマンド信号という)をメモリ3に対して発行する。この際、アクセス調停手段21は、コマンド信号のオーバーヘッドが小さくなるようにコマンド生成手段22を制御する。   The command generation unit 22 issues a command (hereinafter, collectively referred to as a command signal) that conveys an address and a read request to the memory 3 according to the arbitration result of the access arbitration unit 21. At this time, the access arbitration unit 21 controls the command generation unit 22 so that the overhead of the command signal is reduced.

データ制御手段23は、メモリ3から読み出されたデータをバッファに一時的に保持する。この際、メモリバスが使用される。
バッファには、通常のバッファとマイクロプロセッサ1の連続読み出し用バッファとがある。マイクロプロセッサ1の連続読み出し用バッファは、次に読み出されるであろうデータを予測して予め保持しておくバッファである。
データ制御手段23に保持されているデータのうち、どのデータを取り込むかをアクセス調停手段21により制御し、マイクロプロセッサ1とDMAマスター2へそれぞれデータを渡す。
The data control unit 23 temporarily holds the data read from the memory 3 in a buffer. At this time, a memory bus is used.
The buffer includes a normal buffer and a continuous read buffer for the microprocessor 1. The continuous reading buffer of the microprocessor 1 is a buffer for predicting and holding data to be read next.
Of the data held in the data control means 23, which data is taken in is controlled by the access arbitration means 21, and the data is transferred to the microprocessor 1 and the DMA master 2, respectively.

図1(b)に示すように、マイクロプロセッサ1とDMAマスター2から同時にデータの読み出し要求があった場合には、マイクロプロセッサ1とDMAマスター2の両方の読み出し要求を同時に処理するコマンド信号を生成し、両データの読み出し処理を実行する。
また、マイクロプロセッサ1からの読み出し要求はあるが、DMAマスター2からの読み出し要求がない場合には、通常のバッファとマイクロプロセッサ1の連続読み出し用バッファを用いた読み出し処理を実行する。
一方、DMAマスター2からの読み出し要求はあるが、マイクロプロセッサ1からの読み出し要求がない場合には、通常のバッファのみを用いた読み出し処理を実行する。
As shown in FIG. 1B, when there is a data read request from the microprocessor 1 and the DMA master 2 at the same time, a command signal for simultaneously processing the read requests of both the microprocessor 1 and the DMA master 2 is generated. Then, read processing of both data is executed.
If there is a read request from the microprocessor 1 but no read request from the DMA master 2, a read process using the normal buffer and the continuous read buffer of the microprocessor 1 is executed.
On the other hand, when there is a read request from the DMA master 2 but no read request from the microprocessor 1, a read process using only a normal buffer is executed.

図2は本発明の具体的な回路例を示した図である。
図1ではマイクロプロセッサ1とDMAマスター2からの読み出し要求の中に、それぞれ読み出しアドレスを含めて記載しているが、図2では具体的な回路を示すため、読み出しアドレスを読み出し要求から分離して記載している。
FIG. 2 is a diagram showing a specific circuit example of the present invention.
In FIG. 1, the read request from the microprocessor 1 and the DMA master 2 is described including the read address, but in FIG. 2, the read address is separated from the read request to show a specific circuit. It is described.

アクセス調停手段21は、マイクロプロセッサ1とDMAマスター2からのデータの読み出し要求を受け取ると、マスター信号生成手段211において、どちらの読み出し要求を優先させるかを決定して優先順位を定めたマスター信号を生成する。
どちらの読み出し要求を優先させるかの決定方法としては、予め優先順位を設定しておく方法や、過去のマイクロプロセッサ1とDMAマスター2からの読み出し要求の発生状況から優先すべき読み出し要求を決める方法等がある。
When the access arbitration unit 21 receives a data read request from the microprocessor 1 and the DMA master 2, the master signal generation unit 211 determines which read request is to be prioritized and outputs a master signal that defines a priority order. Generate.
As a method for determining which read request is to be prioritized, a method in which priorities are set in advance, or a method in which a read request to be prioritized is determined based on the generation status of read requests from the past microprocessor 1 and DMA master 2. Etc.

選択信号制御手段212には、マスター信号生成手段211で生成されたマスター信号と、マイクロプロセッサ1とDMAマスター2からの読み出し要求が入力される。選択信号制御手段212は、マスター信号と、マイクロプロセッサ1とDMAマスター2からのデータの読み出し要求のタイミングから、コマンド生成手段22でコマンド信号を生成する手順を制御する。   The selection signal control unit 212 receives the master signal generated by the master signal generation unit 211 and the read request from the microprocessor 1 and the DMA master 2. The selection signal control unit 212 controls the procedure for generating the command signal by the command generation unit 22 based on the master signal and the timing of the data read request from the microprocessor 1 and the DMA master 2.

コマンド生成手段22には、マイクロプロセッサ1からの読み出しアドレスと、DMAマスター2からの読み出しアドレスが入力される。マイクロプロセッサ1からの読み出しアドレスはアドレス選択手段221に入力されるとともに、このアドレスに加算手段224で所定値を加算したアドレスがアドレス選択手段222に入力される。また、DMAマスター2からの読み出しアドレスはアドレス選択手段223に入力される。
ここで、加算手段224は、マイクロプロセッサ1がメモリ3から読み出すべきデータに連続する1つ先のデータも一緒に読み出せるようにするものであり、読み出すべきデータのアドレスにデータ構造により定まる値(所定値)を加算して、1つ先のデータのアドレスを設定するものである。
The command generation unit 22 receives a read address from the microprocessor 1 and a read address from the DMA master 2. A read address from the microprocessor 1 is input to the address selection unit 221, and an address obtained by adding a predetermined value to the address by the addition unit 224 is input to the address selection unit 222. Further, the read address from the DMA master 2 is input to the address selection means 223.
Here, the adding means 224 enables the microprocessor 1 to read the data ahead of the data to be read from the memory 3 together with a value determined by the data structure at the address of the data to be read ( A predetermined value) is added to set the address of the next data.

アドレス選択手段221,222,223は、選択信号制御手段212からそれぞれに対して選択信号を受ける。これによりコマンド生成手段22は、アドレス選択手段221,222,223のそれぞれに入力されている読み出しアドレスのうち選択信号がアクティブになったアドレスを取り入れてコマンド信号を作成する。   Address selection means 221, 222, and 223 receive selection signals from selection signal control means 212, respectively. As a result, the command generation unit 22 creates a command signal by taking in the address at which the selection signal becomes active among the read addresses input to the address selection units 221, 222, and 223, respectively.

データ制御手段23は、メモリ3から読み出されたデータをバッファで一時的に保持する。バッファには、通常のデータの読み出しに使用される第1のバッファ231と、マイクロプロセッサ1の連続読み出し用に使用される第2のバッファ232とがある。第2のバッファ232は、マイクロプロセッサ1からのデータの読み出し要求に対し、次に読み出されるであろうデータを予測して予め保持しておくバッファであり、加算手段224を経由して設定されたアドレスのデータに該当する。   The data control unit 23 temporarily holds the data read from the memory 3 in a buffer. The buffers include a first buffer 231 that is used for reading normal data and a second buffer 232 that is used for continuous reading by the microprocessor 1. The second buffer 232 is a buffer that predicts and holds data that will be read next in response to a data read request from the microprocessor 1, and is set via the adding means 224. Corresponds to address data.

第1のバッファ231に保持されたデータはデータ選択手段233を経由してマイクロプロセッサ1又はDMAマスター2に渡され、第2のバッファ232に保持されたデータはデータ選択手段234を経由してマイクロプロセッサ1に渡される。
データ選択手段233,234は、アドレス判定手段213からそれぞれに対して選択信号を受ける。これによりデータ制御手段23は、第1のバッファ231と第2のバッファ232のそれぞれに保持されているデータのうち選択信号がアクティブになったデータをマイクロプロセッサ1やDMAマスター2に渡すことになる。
The data held in the first buffer 231 is passed to the microprocessor 1 or the DMA master 2 via the data selection means 233, and the data held in the second buffer 232 is sent to the micro via the data selection means 234. Passed to the processor 1.
Data selection means 233 and 234 receive selection signals from address determination means 213, respectively. As a result, the data control means 23 passes to the microprocessor 1 or the DMA master 2 the data for which the selection signal is active among the data held in the first buffer 231 and the second buffer 232 respectively. .

アドレス判定手段213は、マイクロプロセッサ1からの今回の読み出しアドレスと、マイクロプロセッサ1からの前回の読み出しアドレスに加算手段224で所定値を加算したアドレスを比較する。比較の結果、アドレスが一致した場合は、データ選択手段234への選択信号をアクティブにして、第2のバッファ232からのデータを取り込み、アドレスが不一致の場合は、データ選択手段233への選択信号をアクティブにして、第1のバッファ231からのデータを取り込む。これにより、アドレスが一致した場合にはいきなり第2のバッファ232からデータを取り込むことができ、従来よりも早いタイミングで読み出したデータをマイクロプロセッサ1に返すことができる。   The address determination unit 213 compares the current read address from the microprocessor 1 with the address obtained by adding a predetermined value by the adding unit 224 to the previous read address from the microprocessor 1. If the addresses match as a result of the comparison, the selection signal to the data selection means 234 is activated, the data from the second buffer 232 is taken in. If the addresses do not match, the selection signal to the data selection means 233 Is activated, and the data from the first buffer 231 is captured. As a result, when the addresses match, the data can be taken in from the second buffer 232 suddenly, and the read data can be returned to the microprocessor 1 at a timing earlier than before.

図3はマイクロプロセッサとDMAマスターが同時にメモリアクセスした場合の動作を説明するタイミングチャートである。
マイクロプロセッサ1とDMAマスター2から同時にデータの読み出し要求があった場合(D部)、マイクロプロセッサ1用のコマンド信号とDMAマスター2用のコマンド信号を、定められた優先順位に従い連続してメモリ3へ送る(E部)。ここでは、マイクロプロセッサ1からの読み出し要求をDMAマスター2からの読み出し要求よりも高い優先順位とした例を示している。
FIG. 3 is a timing chart for explaining the operation when the microprocessor and the DMA master simultaneously access the memory.
When there is a data read request from the microprocessor 1 and the DMA master 2 at the same time (D section), the command signal for the microprocessor 1 and the command signal for the DMA master 2 are continuously stored in the memory 3 according to a predetermined priority order. To (E part). Here, an example is shown in which a read request from the microprocessor 1 has a higher priority than a read request from the DMA master 2.

メモリ3はマイクロプロセッサ1とDMAマスター2からの読み出し要求が連続したコマンド信号を受け取るので、マイクロプロセッサ1用のデータAとDMAマスター2用のデータBを連続して読み出すことができる(F部)。   Since the memory 3 receives a command signal in which read requests from the microprocessor 1 and the DMA master 2 are continuously received, the data A for the microprocessor 1 and the data B for the DMA master 2 can be read continuously (part F). .

これにより、従来2回必要であったオーバーヘッドが1回で済むことになり、マイクロプロセッサ1とDMAマスター2のメモリアクセスが競合した際の処理待ち時間を少なくすることができる。メモリバスのスピードが、フロントサイドバス、DMAバスよりも高速なシステムにおいては、さらに高速にメモリ読み出しを実行することができる。   As a result, the overhead that has been required twice in the past is only required once, and the processing waiting time when the memory access between the microprocessor 1 and the DMA master 2 competes can be reduced. In a system in which the speed of the memory bus is higher than that of the front side bus and the DMA bus, memory reading can be executed at a higher speed.

図4はマイクロプロセッサの連続メモリアクセスの動作を説明するタイミングチャートである。
マイクロプロセッサ1からの読み出し要求はあるが、DMAマスター2からの読み出し要求がない場合には、マイクロプロセッサ1の連続メモリアクセスの動作を実行する。この際、第1のバッファ231(通常のバッファ)と第2のバッファ232(マイクロプロセッサ1の連続読み出し用バッファ)を用いた読み出し処理が実行される。
FIG. 4 is a timing chart for explaining the continuous memory access operation of the microprocessor.
When there is a read request from the microprocessor 1 but there is no read request from the DMA master 2, the operation of the continuous memory access of the microprocessor 1 is executed. At this time, a read process using the first buffer 231 (normal buffer) and the second buffer 232 (continuous read buffer of the microprocessor 1) is executed.

マイクロプロセッサ1からデータA0の読み出し要求に対し、コントローラ20はデータA0の格納先アドレスを指定したコマンド信号をメモリ3へ送る(G部)。この際、本来の読み出し目的であるデータA0のアドレスと、データA0の次のデータA1のアドレスをセットにしたコマンド信号をメモリ3へ送ることで、データA0の読み出しの際に、データA1も先取りして読み出しておき、マイクロプロセッサ1の連続読み出し用バッファに保持しておく(H部)。   In response to a read request for data A0 from the microprocessor 1, the controller 20 sends a command signal designating the storage destination address of the data A0 to the memory 3 (G section). At this time, the data A1 is also prefetched when the data A0 is read by sending to the memory 3 a command signal in which the address of the data A0 which is the original read purpose and the address of the data A1 next to the data A0 are set. The data is read out and held in the continuous reading buffer of the microprocessor 1 (H section).

次に、マイクロプロセッサ1からデータA1の読み出し要求に対し、コントローラ20はデータA1の格納先アドレスを指定したコマンド信号をメモリ3へ送る(I部)。ここで、今回指定したアドレスと、前回先取りして読み出しておいたアドレスを比較し、両アドレスが一致すれば、予め先取りしておいたマイクロプロセッサ1の連続読み出し用バッファのデータA1を使用する(J部)。
この際にも、本来の読み出し目的であるデータA1のアドレスと、データA1の次のデータA2のアドレスをセットにしたコマンド信号をメモリ3へ送り、データA2を先取りして読み出しておき、マイクロプロセッサ1の連続読み出し用バッファに保持しておく(K部)。
Next, in response to a read request for data A1 from the microprocessor 1, the controller 20 sends a command signal designating the storage destination address of the data A1 to the memory 3 (part I). Here, the address designated this time is compared with the address prefetched and read last time, and if the two addresses match, the prefetched data A1 of the continuous read buffer of the microprocessor 1 is used ( Part J).
Also at this time, a command signal in which the address of the data A1 which is the original read purpose and the address of the data A2 next to the data A1 is set is sent to the memory 3, and the data A2 is prefetched and read. 1 is held in the continuous reading buffer (K section).

このように、マイクロプロセッサ1の連続読み出し用バッファに先行して保持していたデータを使用することで、コントローラ20がメモリ3にアクセスしてデータを読み出すのを待つことなくマイクロプロセッサ1にデータを返すことができ、高速応答をすることができる。   In this way, by using the data held in advance in the continuous reading buffer of the microprocessor 1, the data is sent to the microprocessor 1 without waiting for the controller 20 to access the memory 3 and read the data. It can be returned and can respond quickly.

本発明の一実施例を示す構成図である。It is a block diagram which shows one Example of this invention. 本発明の具体的な回路例を示した図である。It is the figure which showed the specific circuit example of this invention. マイクロプロセッサとDMAマスターが同時にメモリアクセスした場合の動作を説明するタイミングチャートである。6 is a timing chart for explaining an operation when a microprocessor and a DMA master simultaneously access memory. マイクロプロセッサの連続メモリアクセスの動作を説明するタイミングチャートである。It is a timing chart explaining operation | movement of the continuous memory access of a microprocessor. 従来のメモリアクセス制御装置の構成図である。It is a block diagram of the conventional memory access control apparatus. 従来のメモリアクセス制御装置におけるメモリアクセスの動作を説明するタイミングチャートである。It is a timing chart explaining operation | movement of the memory access in the conventional memory access control apparatus.

符号の説明Explanation of symbols

1 マイクロプロセッサ
2 DMAマスター
3 メモリ
21 アクセス調停手段
22 コマンド生成手段
23 データ制御手段
211 マスター信号生成手段
212 選択信号制御手段
213 アドレス判定手段
221,222,223 アドレス選択手段
231 第1のバッファ
232 第2のバッファ
233,234 データ選択手段
DESCRIPTION OF SYMBOLS 1 Microprocessor 2 DMA master 3 Memory 21 Access arbitration means 22 Command generation means 23 Data control means 211 Master signal generation means 212 Selection signal control means 213 Address determination means 221, 222, 223 Address selection means 231 First buffer 232 Second Buffer 233,234 data selection means

Claims (5)

マイクロプロセッサとDMAマスターからのメモリアクセスを制御するメモリアクセス制御装置において、
前記マイクロプロセッサと前記DMAマスターからの読み出し要求を調停するアクセス調停手段と、
該アクセス調停手段の調停結果に従い前記メモリへ送るコマンド信号を生成するコマンド生成手段と、を有し、
前記アクセス調停手段が、前記マイクロプロセッサと前記DMAマスターから同時に読み出し要求があったと判断した場合、前記コマンド生成手段は、前記マイクロプロセッサ用のコマンド信号と前記DMAマスター用のコマンド信号を、定められた優先順位に従い連続して前記メモリへ送ることを特徴とするメモリアクセス制御装置。
In a memory access control device for controlling memory access from a microprocessor and a DMA master,
Access arbitration means for arbitrating read requests from the microprocessor and the DMA master;
Command generation means for generating a command signal to be sent to the memory in accordance with the arbitration result of the access arbitration means,
When the access arbitration means determines that there is a simultaneous read request from the microprocessor and the DMA master, the command generation means determines a command signal for the microprocessor and a command signal for the DMA master. A memory access control device for continuously sending data to the memory according to priority.
前記アクセス調停手段は、前記メモリアクセスの優先順位を定めたマスター信号を生成するマスター信号生成手段と、
前記マイクロプロセッサと前記DMAマスターからの読み出し要求及び前記マスター信号から前記コマンド信号を生成する手順を制御する選択信号制御手段と、
を有することを特徴とする請求項1記載のメモリアクセス制御装置。
The access arbitration means includes a master signal generation means for generating a master signal that defines a priority order of the memory access;
Selection signal control means for controlling a read request from the microprocessor and the DMA master and a procedure for generating the command signal from the master signal;
2. The memory access control apparatus according to claim 1, further comprising:
前記コマンド生成手段は、前記マイクロプロセッサからの読み出しアドレスと、該アドレスに所定値を加算したアドレスと、前記DMAマスターからの読み出しアドレスとから使用するアドレスを選択するアドレス選択手段を有し、前記選択信号制御手段により該アドレス選択手段を制御して前記コマンド信号を生成することを特徴とする請求項2記載のメモリアクセス制御装置。   The command generation means includes address selection means for selecting an address to be used from a read address from the microprocessor, an address obtained by adding a predetermined value to the address, and a read address from the DMA master. 3. The memory access control device according to claim 2, wherein the command signal is generated by controlling the address selection means by a signal control means. 前記メモリから読み出したデータを一時的に保持する第1のバッファと、前記データを読み出す際に該データに連続する1つ先のデータも読み出して一時的に保持する第2のバッファと、前記第1及び第2のバッファのデータのうちどちらのデータを使用するか選択するデータ選択手段とからなるデータ制御手段を有し、
前記マイクロプロセッサからの読み出しアドレスが連続する場合に、前記第2のバッファのデータを使用することを特徴とする請求項1乃至3のいずれかに記載のメモリアクセス制御装置。
A first buffer that temporarily holds data read from the memory; a second buffer that also reads and temporarily holds data immediately preceding the data when the data is read; and Data control means comprising data selection means for selecting which one of the data in the first and second buffers is used;
4. The memory access control device according to claim 1, wherein the data in the second buffer is used when read addresses from the microprocessor are continuous.
前記マイクロプロセッサからの読み出しアドレスと、前回の読み出しアドレスに所定値を加算したアドレスとを比較するアドレス判定手段を有し、
前記比較による値が一致した場合に、前記第2のバッファのデータを使用することを特徴とする請求項4記載のメモリアクセス制御装置。
Address determining means for comparing a read address from the microprocessor with an address obtained by adding a predetermined value to the previous read address;
5. The memory access control device according to claim 4, wherein when the values by the comparison match, the data in the second buffer is used.
JP2008049572A 2008-02-29 2008-02-29 Memory access control device Active JP5104402B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008049572A JP5104402B2 (en) 2008-02-29 2008-02-29 Memory access control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008049572A JP5104402B2 (en) 2008-02-29 2008-02-29 Memory access control device

Publications (2)

Publication Number Publication Date
JP2009205601A true JP2009205601A (en) 2009-09-10
JP5104402B2 JP5104402B2 (en) 2012-12-19

Family

ID=41147757

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008049572A Active JP5104402B2 (en) 2008-02-29 2008-02-29 Memory access control device

Country Status (1)

Country Link
JP (1) JP5104402B2 (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0573473A (en) * 1991-09-11 1993-03-26 Toshiba Corp Industrial computer system
JPH10144073A (en) * 1996-11-08 1998-05-29 Fujitsu Ltd Access mechanism for synchronous dram
JPH11224221A (en) * 1998-02-04 1999-08-17 Matsushita Electric Ind Co Ltd Unit and method for memory control
JPH11345165A (en) * 1997-12-05 1999-12-14 Texas Instr Inc <Ti> Traffic controller using priority and burst control for reducing access times
JP2001125826A (en) * 1999-08-31 2001-05-11 Koninkl Philips Electronics Nv Device provided with plural processors having interface for set memory
JP2001135079A (en) * 1999-11-04 2001-05-18 Ricoh Co Ltd Memory control device
JP2001142840A (en) * 1999-11-15 2001-05-25 Nec Niigata Ltd Dma controller circuit and memory control method
JP2002132707A (en) * 2000-10-25 2002-05-10 Kyocera Mita Corp Memory access arbitrating method
JP2003085125A (en) * 2001-08-31 2003-03-20 Internatl Business Mach Corp <Ibm> Memory controller and memory control method
JP2004288021A (en) * 2003-03-24 2004-10-14 Matsushita Electric Ind Co Ltd Memory access controller

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0573473A (en) * 1991-09-11 1993-03-26 Toshiba Corp Industrial computer system
JPH10144073A (en) * 1996-11-08 1998-05-29 Fujitsu Ltd Access mechanism for synchronous dram
JPH11345165A (en) * 1997-12-05 1999-12-14 Texas Instr Inc <Ti> Traffic controller using priority and burst control for reducing access times
JPH11224221A (en) * 1998-02-04 1999-08-17 Matsushita Electric Ind Co Ltd Unit and method for memory control
JP2001125826A (en) * 1999-08-31 2001-05-11 Koninkl Philips Electronics Nv Device provided with plural processors having interface for set memory
JP2001135079A (en) * 1999-11-04 2001-05-18 Ricoh Co Ltd Memory control device
JP2001142840A (en) * 1999-11-15 2001-05-25 Nec Niigata Ltd Dma controller circuit and memory control method
JP2002132707A (en) * 2000-10-25 2002-05-10 Kyocera Mita Corp Memory access arbitrating method
JP2003085125A (en) * 2001-08-31 2003-03-20 Internatl Business Mach Corp <Ibm> Memory controller and memory control method
JP2004288021A (en) * 2003-03-24 2004-10-14 Matsushita Electric Ind Co Ltd Memory access controller

Also Published As

Publication number Publication date
JP5104402B2 (en) 2012-12-19

Similar Documents

Publication Publication Date Title
JP5552569B2 (en) Bus arbitration technique to reduce access latency
JP2015505114A (en) System and method for dynamic priority control
US5627968A (en) Data transfer apparatus which allows data to be transferred between data devices without accessing a shared memory
JP5104402B2 (en) Memory access control device
JP2006251923A (en) Look-ahead control method
JP2006293950A (en) Processor controller
JP2008140065A (en) Access arbitration device, access arbitration method and information processor
JP4327081B2 (en) Memory access control circuit
US10540305B2 (en) Semiconductor device
JP4633334B2 (en) Information processing apparatus and memory access arbitration method
JP2011034214A (en) Memory controller
JP2002055940A (en) Bus system and command transmitting method thereof
JP2009003633A (en) Information processor
WO2012098655A1 (en) Data writing control device, data writing control method, and information processing device
JP2007219942A (en) Signal processor
JP6416488B2 (en) Semiconductor device
JP3820831B2 (en) Memory control method and apparatus
JP4633290B2 (en) Data processing apparatus and access arbitration method in the apparatus
JP2000227895A (en) Device and method for transferring image data
JP2010140440A (en) Bus arbitration device
JP2009032085A (en) Data processing system
JP2007304830A (en) Arbitrating method and device based on information previous acquisition
JP2005316546A (en) Memory controller
JP2016085683A (en) Memory access device, memory access control method
JP2022124897A (en) Control circuit and control circuit control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101018

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120201

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120319

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120425

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120904

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120917

R150 Certificate of patent or registration of utility model

Ref document number: 5104402

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151012

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250