JP2011085989A - Memory arbitration circuit and memory arbitration method - Google Patents

Memory arbitration circuit and memory arbitration method Download PDF

Info

Publication number
JP2011085989A
JP2011085989A JP2009236337A JP2009236337A JP2011085989A JP 2011085989 A JP2011085989 A JP 2011085989A JP 2009236337 A JP2009236337 A JP 2009236337A JP 2009236337 A JP2009236337 A JP 2009236337A JP 2011085989 A JP2011085989 A JP 2011085989A
Authority
JP
Japan
Prior art keywords
memory
bus master
access
memory access
bus
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
JP2009236337A
Other languages
Japanese (ja)
Inventor
Mamoru Nomura
守 野村
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2009236337A priority Critical patent/JP2011085989A/en
Publication of JP2011085989A publication Critical patent/JP2011085989A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a memory arbitration circuit and a memory arbitration method for further shortening the latency of one bus master. <P>SOLUTION: A system having a memory arbitration circuit is provided with: a priority order determination part 22 for determining the priority order of bus masters A11, B12 and 13; and a signal generation part 23 for receiving memory access requests from the bus masters A11, B12 and 13, and generating a control signal for memory access on the basis of the priority order. When receiving the memory access request of a bus master A11 during the memory access processing of the bus master B12, the signal generation part 23 temporarily stops the memory access processing of the bus master B12, and processes the memory access request of the bus master A11. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、複数のバスマスタからメモリにアクセスする際のアクセス要求を調停するメモリ調停回路及びメモリ調停方法に関する。   The present invention relates to a memory arbitration circuit and a memory arbitration method that arbitrate access requests when accessing a memory from a plurality of bus masters.

図5は、従来のメモリ調停回路を有するシステムを示す図である。従来のシステムは、例えばCPU(Central Processing Unit)等のようにメモリアクセスのレイテンシを短くしたいバスマスタA111と、例えば画像表示回路等のようにバーストアクセスを長くすることでバス帯域効率を向上したいバスマスタB112と、その他のバスマスタ113と、全てのバスマスタからアクセスされるメモリ(DDR(Double-Data-Rate)1、DDR2など)130と、各バスマスタからメモリへのアクセス要求を受け、メモリへのアクセスを調停するメモリ調停回路120とを有する。メモリ調停回路120は、バスマスタ優先順位を判定する優先順位判定部122と、メモリへの制御信号(アドレス及びデータなども含む)を生成する信号生成部121とを有する。   FIG. 5 is a diagram showing a system having a conventional memory arbitration circuit. In the conventional system, for example, a bus master A111 that wants to shorten memory access latency, such as a CPU (Central Processing Unit), and a bus master B112 that wants to improve bus bandwidth efficiency by increasing burst access, such as an image display circuit, for example. And other bus masters 113, memories (DDR (Double-Data-Rate) 1, DDR 2, etc.) 130 accessed from all bus masters, and access requests to the memories from the respective bus masters to arbitrate access to the memory And a memory arbitration circuit 120. The memory arbitration circuit 120 includes a priority determination unit 122 that determines the bus master priority, and a signal generation unit 121 that generates a control signal (including address and data) to the memory.

各バスマスタからのアクセスのための制御信号は、メモリ調停回路120の優先順位判定部122へ入力される。優先順位判定部122は、特定の優先順位アルゴリズムを有している。そして、優先順位判定部122は、同時に複数のバスマスタからのアクセスがあった場合、この特定の優先順位アルゴリズムに従って、アクセス順序を決め、先に選ばれた優先順位の高いバスマスタからのアクセスを優先させるよう信号生成部121へ通知する。信号生成部121はメモリに対してアクセスのための信号生成を行う。   A control signal for access from each bus master is input to the priority determination unit 122 of the memory arbitration circuit 120. The priority determination unit 122 has a specific priority algorithm. Then, when there are accesses from a plurality of bus masters at the same time, the priority determination unit 122 determines the access order according to this specific priority algorithm, and gives priority to the access from the bus master having the higher priority selected earlier. The signal generator 121 is notified. The signal generation unit 121 generates a signal for accessing the memory.

DDR1又はDDR2等のメモリ130は、複数のバンクを有し、そのバンクに対しては高速なバーストアクセスをおこなうことができる。信号生成部121は、各バーストアクセス毎にバンクアクティブコマンドを発行し、バンクを選択し、その後、連続クロックごとにバーストアクセスを行う。このようなバーストアクセスが使用できるメモリシステムでは、なるべくバンクアクティブコマンドの回数を減らし、連続クロックによるバーストアクセスできるデータ量を増やすことで、メモリアクセス効率を向上することができる。   The memory 130 such as DDR1 or DDR2 has a plurality of banks and can perform high-speed burst access to the banks. The signal generation unit 121 issues a bank active command for each burst access, selects a bank, and then performs burst access for each continuous clock. In a memory system that can use such burst access, memory access efficiency can be improved by reducing the number of bank active commands as much as possible and increasing the amount of data that can be burst-accessed by a continuous clock.

メモリ調停回路120は、各アクセス毎に同じバンクにあるデータのアクセスかどうかを判定し、もし同じであればそのままバーストアクセスを行う。もし異なれば、バンクを変更するために、新たにバンクアクティブコマンドを発行し、バーストアクセスを行う。   The memory arbitration circuit 120 determines whether or not the data in the same bank is accessed every access, and if it is the same, performs the burst access as it is. If they are different, in order to change the bank, a new bank active command is issued to perform burst access.

また、特許文献1には、同一マスタに対するアクセス許可の集中を回避してワーストレイテンシを低減し、共有リソースの種類に応じてアクセス効率を向上させることを目的としたリソース管理装置が開示されている。このリソース管理装置では、バス調停部は、複数のマスタのうち2以上のマスタが同時にアクセス要求を行っている場合には、当該2以上のアクセス要求マスタのうち所定時間内にアクセス許可を受けた回数が第1設定値に満たないアクセス要求マスタに対して優先的にアクセス許可を与えるようにしている。   Further, Patent Document 1 discloses a resource management device for the purpose of reducing the worst latency by avoiding concentration of access permission for the same master and improving the access efficiency according to the type of shared resource. . In this resource management device, when two or more masters among a plurality of masters are requesting access simultaneously, the bus arbitration unit receives an access permission within a predetermined time among the two or more access request masters. An access permission is preferentially given to an access request master whose number of times is less than the first set value.

特開2007−207024号公報JP 2007-207024 A

しかしながら、このような通常のシステム又は特許文献1に記載のシステムにおいては、各バーストアクセスのバースト長は決められた長さで行う。そのため、アクセス待ちのバスマスタは、別のバスマスタによるその前のバーストアクセスが終わるまで、アクセスを開始できない待ち時間T1が生じる。また、複数のバスマスタのアクセスが生じる場合、必ず同じバンクがアクティブになっていることは保障できず、バンクアクティブコマンド発行の待ち時間T2が生じることがある。   However, in such a normal system or the system described in Patent Document 1, the burst length of each burst access is performed with a predetermined length. Therefore, the bus master waiting for access has a waiting time T1 during which access cannot be started until the previous burst access by another bus master is completed. In addition, when a plurality of bus masters are accessed, it cannot be guaranteed that the same bank is always active, and a waiting time T2 for issuing a bank active command may occur.

従来のシステムでは、CPU等のアクセスレイテンシを短くしたいバスマスタA111のアクセスは、ワーストケースで、待ち時間T1及び待ち時間T2が生じる。この待ち時間はCPUの動作待ち時間となり、CPU動作効率が落ちる要因となる。   In the conventional system, the access of the bus master A111 that wants to shorten the access latency of the CPU or the like causes a waiting time T1 and a waiting time T2 in the worst case. This waiting time becomes an operation waiting time of the CPU, and causes a reduction in CPU operation efficiency.

バスマスタA111がCPU、バスマスタB112が画像表示回路のような場合、バスマスタB112のデータアクセス量、頻度はバスマスタA111に比べ、非常に大きく、かつバス帯域効率向上のため、通常、バースト長さを長くする。そのため、上記の待ち時間T1及び待ち時間T2が発生するワーストケースの確率は非常に高い。   When the bus master A111 is a CPU and the bus master B112 is an image display circuit, the data access amount and frequency of the bus master B112 are much larger than those of the bus master A111, and the burst length is usually increased to improve the bus bandwidth efficiency. . For this reason, the probability of the worst case in which the waiting time T1 and the waiting time T2 occur is very high.

本発明にかかるメモリ調停回路は、第1及び第2のバスマスタからのメモリへのアクセスを調停するメモリ調停回路であって、前記第1及び第2のバスマスタの優先順位を判定する優先順位判定部と、前記第1及び第2のバスマスタからのメモリアクセス要求を受け、前記優先順位に基づき、メモリアクセスのための制御信号を生成する信号生成部と、を有し、前記信号生成部は、前記第2のバスマスタのメモリアクセス処理中に、前記第1のバスマスタのメモリアクセス要求を受け取ると、前記第2のバスマスタのメモリアクセス処理を一旦停止し、前記第1のバスマスタのメモリアクセス要求を処理するものである。   The memory arbitration circuit according to the present invention is a memory arbitration circuit that arbitrates access to the memory from the first and second bus masters, and determines a priority order of the first and second bus masters. And a signal generation unit that receives a memory access request from the first and second bus masters and generates a control signal for memory access based on the priority, and the signal generation unit includes: When the memory access request of the first bus master is received during the memory access process of the second bus master, the memory access process of the second bus master is temporarily stopped and the memory access request of the first bus master is processed. Is.

本発明にかかるメモリ調停方法は、第1及び第2のバスマスタからのメモリへのアクセスを調停するメモリ調停方法であって、第2のバスマスタのメモリアクセス処理中に、第1のバスマスタのメモリアクセス要求を受け取ると、前記第2のバスマスタのメモリアクセス処理を一旦停止し、前記第1のバスマスタのメモリアクセス要求を処理するものである。   A memory arbitration method according to the present invention is a memory arbitration method for arbitrating access to a memory from a first bus master and a second bus master, wherein the memory access of the first bus master is performed during memory access processing of the second bus master. When the request is received, the memory access process of the second bus master is temporarily stopped, and the memory access request of the first bus master is processed.

本発明においては、第1のバスマスタがメモリにアクセス要求を行うと、第2のバスマスタのアクセス処理を一旦中断し、第1のバスマスタのアクセス要求を優先して処理するため、第1のバスマスタのレイテンシを短くすることができる。   In the present invention, when the first bus master makes an access request to the memory, the access processing of the second bus master is temporarily interrupted, and the access request of the first bus master is preferentially processed. Latency can be shortened.

本発明によれば、一方のバスマスタのレイテンシをより短くすることができるメモリ調停回路及びメモリ調停方法を提供することができる。   According to the present invention, it is possible to provide a memory arbitration circuit and a memory arbitration method that can shorten the latency of one bus master.

本発明の実施の形態1にかかるメモリ調停回路を有するシステムを示す図である。It is a figure which shows the system which has a memory arbitration circuit concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかるメモリ調停回路の動作を示すフローチャートである。3 is a flowchart showing an operation of the memory arbitration circuit according to the first exemplary embodiment of the present invention; 本発明の実施の形態3にかかるメモリ調停回路を有するシステムを示す図である。It is a figure which shows the system which has a memory arbitration circuit concerning Embodiment 3 of this invention. 本発明の実施の形態3にかかるメモリ調停回路の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the memory arbitration circuit concerning Embodiment 3 of this invention. 従来のメモリ調停回路を有するシステムを示す図である。It is a figure which shows the system which has the conventional memory arbitration circuit.

以下、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。この実施の形態は、本発明を、複数のバスマスタからのメモリアクセス要求を処理するメモリ調停回路を備える、例えばテレビ等に使用されるシステムに適用したものである。ここで、複数のバスマスタとは、CPU等のようにメモリアクセスのレイテンシを短くしたいバスマスタAと、画像表示回路等のようにバーストアクセスを長くすることでバス帯域効率を向上したいバスマスタBとを含む。   Hereinafter, specific embodiments to which the present invention is applied will be described in detail with reference to the drawings. In this embodiment, the present invention is applied to a system used in, for example, a television set provided with a memory arbitration circuit that processes memory access requests from a plurality of bus masters. Here, the plurality of bus masters include a bus master A that wants to shorten memory access latency, such as a CPU, and a bus master B that wants to improve bus bandwidth efficiency by increasing burst access, such as an image display circuit. .

すなわち、これらのバスマスタがDDR1やDDR2等の1つのメモリを共有するシステムにおいて、バスマスタBの帯域効率を落とさず、バスマスタAのレイテンシの高速化を図る。このため、本実施の形態にかかるメモリ調停回路は、CPUなどのようにメモリアクセスのレイテンシを短くしたいバスマスタAのアクセスが発生した時、現在実行中の他のバスマスタのバスマスタを中断して、バスマスタAのアクセスを割り込ませる機能を備える。また、バスマスタAのアクセス終了後、その前のアクセスを再開する機能を有する。   That is, in a system in which these bus masters share one memory such as DDR1 and DDR2, the bandwidth efficiency of the bus master B is not reduced, and the latency of the bus master A is increased. For this reason, the memory arbitration circuit according to the present embodiment interrupts the bus master of the other bus master that is currently being executed when the access of the bus master A that wants to shorten the latency of memory access, such as a CPU, occurs. A function for interrupting access of A is provided. In addition, after the access of the bus master A is completed, the previous access is resumed.

さらに、本実施の形態にかかる他のメモリ調停回路は、バスマスタAのためのみにメモリバンクを占有し、他のバスマスタからのアクセスが行われてもそのアクセスを許可しないようにする機能を有する。さらに、本実施の形態にかかるさらに他のメモリ調停回路は、これらの機能の有効又は無効を判定する機能や、このアクセス割込条件判定のために、バスマスタAのアクセスの増加を検出したり、その他のバスマスタのアクセスの減少を検出したり、さらにはバスマスタAのアクセスの過多を検出する機能などを備える。以下、本実施の形態について添付の図面を参照して詳細に説明する。   Furthermore, the other memory arbitration circuit according to the present embodiment has a function of occupying a memory bank only for the bus master A and not permitting the access even if an access from another bus master is performed. Furthermore, another memory arbitration circuit according to the present embodiment detects the increase or decrease in the access of the bus master A for the function of determining whether these functions are valid or invalid, and for determining the access interrupt condition. A function of detecting a decrease in access of other bus masters, and further detecting an excessive number of accesses of the bus master A is provided. Hereinafter, this embodiment will be described in detail with reference to the accompanying drawings.

[本発明の実施の形態1.]
図1は、本発明の実施の形態1にかかるメモリ調停回路を有するシステムを示す図である。本実施の形態にかかるシステムは、第1のバスマスタ及び第2のバスマスタからのメモリへのアクセス要求を受け、当該メモリへのアクセスを調停するメモリ調停回路20を有する。第1のバスマスタは、CPU等のようにメモリアクセスのレイテンシを短くしたいバスマスタA11であり、第2のバスマスタは、画像表示回路等のようにバーストアクセスを長くすることでバス帯域効率を向上したいバスマスタB12である。更にその他のバスマスタ13を有する。当該システムは更に、全てのバスマスタ11、12、13からアクセスされるメモリ30を有する。メモリ30は、例えばDDR1やDDR2等のSDRAM(Synchronous Dynamic Random Access Memory)とすることができる。なお、SFRAM以外のメモリであってもよいことは勿論である。
[Embodiment 1 of the present invention] ]
FIG. 1 is a diagram showing a system having a memory arbitration circuit according to the first exemplary embodiment of the present invention. The system according to the present embodiment includes a memory arbitration circuit 20 that receives an access request to the memory from the first bus master and the second bus master and arbitrates access to the memory. The first bus master is a bus master A11 that wants to shorten the latency of memory access, such as a CPU, and the second bus master is a bus master that wants to improve bus bandwidth efficiency by lengthening burst access, such as an image display circuit. B12. Furthermore, it has another bus master 13. The system further includes a memory 30 that is accessed by all bus masters 11, 12, 13. The memory 30 can be, for example, an SDRAM (Synchronous Dynamic Random Access Memory) such as DDR1 or DDR2. Of course, a memory other than the SFRAM may be used.

メモリ調停回路20は、バスマスタA11、バスマスタB12及び他のバスマスタ13のメモリへのアクセスの優先順位を判定する優先順位判定部22と、バスマスタA11、バスマスタB12及び他のバスマスタ13からのメモリアクセス要求を受け、その優先順位に基づき、メモリアクセスのための制御信号を生成する信号生成部21とを有する。そして、この信号生成部21は、バスマスタB112のメモリアクセス処理中に、バスマスタA11のメモリアクセス要求を受け取ると、バスマスタB12のメモリアクセス処理を一旦停止し、バスマスタA11のメモリアクセス要求を処理する。   The memory arbitration circuit 20 receives a memory access request from the bus master A 11, the bus master B 12, and the other bus master 13, and a priority determination unit 22 that determines the priority of access to the memory of the bus master A 11, the bus master B 12, and the other bus master 13. And a signal generator 21 for generating a control signal for memory access based on the priority. When the signal generation unit 21 receives the memory access request of the bus master A11 during the memory access process of the bus master B112, the signal generation unit 21 temporarily stops the memory access process of the bus master B12 and processes the memory access request of the bus master A11.

このように、バスマスタA11のメモリアクセス要求を割り込み処理することで、バスマスタA11の待ち時間を短縮化することができる。一方、信号生成部21は、バスマスタB12のメモリアクセス要求を一旦停止し、バスマスタA11のメモリアクセス要求の処理が終了したら、バスマスタB12のメモリアクセス要求を再開することで、バスマスタB12の待ち時間も最小とすることができる。   In this way, by interrupting the memory access request of the bus master A11, the waiting time of the bus master A11 can be shortened. On the other hand, the signal generation unit 21 temporarily stops the memory access request of the bus master B12, and when the processing of the memory access request of the bus master A11 is completed, the waiting time of the bus master B12 is minimized by restarting the memory access request of the bus master B12. It can be.

図2は、本実施の形態にかかるメモリ調停回路の動作を示すフロー例である。ここでは、バスマスタB12のメモリアクセス要求処理中に割り込み処理が行われるケースについて説明する。   FIG. 2 is a flow example showing the operation of the memory arbitration circuit according to the present exemplary embodiment. Here, a case where interrupt processing is performed during memory access request processing of the bus master B12 will be described.

バスマスタB12のメモリアクセス要求を受け、処理を開始する(ステップS1)。このバスマスタB12のメモリアクセス処理実行中に、バスマスタA11のメモリアクセス要求が発生すると(ステップS2:Yes)、バスマスタB12のメモリアクセス処理を中断する(ステップS3)。そして、バスマスタA11のメモリアクセス処理を優先実施する(ステップS4)。その後、バスマスタA11のメモリアクセス処理が終了したら、バスマスタB12のメモリアクセス処理を再開する(ステップS5)。なお、その後、バスマスタB12のメモリアクセス処理が終了するまでに、再びバスマスタA11の割込み処理を行う。   In response to a memory access request from the bus master B12, the processing is started (step S1). If a memory access request from the bus master A11 is generated during execution of the memory access process of the bus master B12 (step S2: Yes), the memory access process of the bus master B12 is interrupted (step S3). Then, the memory access process of the bus master A11 is preferentially performed (step S4). Thereafter, when the memory access process of the bus master A11 is completed, the memory access process of the bus master B12 is resumed (step S5). Thereafter, the interrupt processing of the bus master A11 is performed again until the memory access processing of the bus master B12 is completed.

本実施の形態においては、バスマスタB12でバーストアクセス中に、CPUなどのバスマスタA11のアクセスが発生した時には、信号生成部21で現在実行中の他のバスマスタB12のアクセスを中断して、バスマスタA11のアクセスを割り込ませる。他のバスマスタのバーストアクセスを即時中断するため、他のバスマスタのバーストアクセスが終了するまでの待ち時間を生じることがない。   In this embodiment, when the bus master A12 such as a CPU is accessed during burst access by the bus master B12, the signal generator 21 interrupts the access of the other bus master B12 currently being executed, Interrupt access. Since the burst access of the other bus master is immediately interrupted, there is no waiting time until the burst access of the other bus master is completed.

[本発明の実施の形態2.]
次に、本発明の実施の形態2について説明する。本実施の形態におけるシステム構成は、実施の形態1と同様である。ただし、信号生成部21の機能が異なる。本実施の形態にかかるメモリ30は、SDRAMであり、メモリセルを独立して動作可能なバンクと呼ばれるブロックを複数有する。そして、信号生成部21は、これら複数のバンクのうち特定のバンクをバスマスタA11の専用のバンクとする。
[Embodiment 2 of the present invention] ]
Next, a second embodiment of the present invention will be described. The system configuration in the present embodiment is the same as that in the first embodiment. However, the function of the signal generation unit 21 is different. The memory 30 according to the present embodiment is an SDRAM, and includes a plurality of blocks called banks that can operate memory cells independently. The signal generation unit 21 sets a specific bank among the plurality of banks as a dedicated bank for the bus master A11.

メモリ30からデータを読み出す際、データを読み出すバンクをアクティブにし、データ線をプリチャージする必要がある。これがデータ読み出し時の待ち時間である。これに対し、あるバンクをバスマスタA11の専用バンクとすることで、読み出すデータが連続しているアドレスを有する場合、バンクアクティブコマンドの待ち時間が生じない。したがって、バスマスタA11のデータ読み出しにかかる待ち時間をさらに短縮化することができる。   When reading data from the memory 30, it is necessary to activate the bank from which data is read and precharge the data lines. This is the waiting time when reading data. On the other hand, by setting a certain bank as a dedicated bank for the bus master A11, when the data to be read has continuous addresses, there is no waiting time for the bank active command. Accordingly, it is possible to further reduce the waiting time for reading data from the bus master A11.

そして、バスマスタB12のバースト読み出し中にバスマスタA11のアクセス要求があった場合、バスマスタA11の読み出しには専用のバンクを使用するため、バスマスタB12の使用していたバンクはそのままアクティブとしておくことができる。よって、バスマスタA11のアクセス要求処理終了後は、バスマスタB12のバースト読み出しを即時再開することができ、バスマスタB12のアクセス要求再開時の待ち時間も短縮化することができる。   When there is an access request from the bus master A11 during the burst read of the bus master B12, a dedicated bank is used for the read from the bus master A11. Therefore, the bank used by the bus master B12 can be kept active. Therefore, after completion of the access request processing of the bus master A11, burst reading of the bus master B12 can be immediately restarted, and the waiting time when the access request of the bus master B12 is restarted can be shortened.

本実施の形態においては、バスマスタB12でバーストアクセス中にCPU等のバスマスタA11のアクセスが発生した場合には、信号生成部21で現在実行中のバスマスタB12のバースト読み出しを中断して、バスマスタA11のアクセスを割り込ませる機能と、バスマスタA11のためにメモリバンクを占有する機能とを有する。このことにより、バスマスタA11のアクセス時に発生するバンクアクティブコマンドの待ち時間と、バスマスタB12のバーストアクセスが終了するまでの待ち時間が生じない。また、バスマスタB12のメモリアクセス要求を一旦停止し、バスマスタA11のメモリアクセス要求の処理が終了したら、バスマスタB12のメモリアクセス要求を再開することで、バスマスタB12のバースト読み出し再開時の待ち時間も発生しない。このことにより、バスマスタA11、B12のメモリ30に対するアクセスの待ち時間をさらに短縮することができる。   In the present embodiment, when the bus master A12 such as a CPU is accessed during burst access in the bus master B12, the signal generator 21 interrupts burst reading of the bus master B12 currently being executed, and the bus master A11 It has a function of interrupting access and a function of occupying a memory bank for the bus master A11. As a result, there is no waiting time for the bank active command generated when the bus master A11 is accessed and no waiting time until the burst access of the bus master B12 is completed. Also, once the memory access request of the bus master B12 is temporarily stopped and the processing of the memory access request of the bus master A11 is completed, the memory master request of the bus master B12 is resumed, so that no waiting time occurs when the bus master B12 resumes burst reading. . As a result, the waiting time for access to the memory 30 of the bus masters A11 and B12 can be further reduced.

[本発明の実施の形態3.]
次に、本発明の実施の形態について説明する。図3は、本実施の形態にかかるメモリ調停回路を有するシステムを示す図である。なお、図3に示す本実施の形態において、図1に示す実施の形態1と同一の構成要素は同一の符号を付し、その詳細な説明を省略する。
[Embodiment 3 of the present invention] ]
Next, an embodiment of the present invention will be described. FIG. 3 is a diagram illustrating a system having a memory arbitration circuit according to the present embodiment. In the present embodiment shown in FIG. 3, the same components as those in the first embodiment shown in FIG. 1 are denoted by the same reference numerals, and detailed description thereof is omitted.

図3に示すように、本実施の形態にかかるシステムも、実施の形態1と同様、バスマスタA11、B12、13と、メモリ調停回路20と、メモリ30とを有する点は同様である。ただし、メモリ調停回路20の構成が異なる。すなわち、メモリ調停回路20は、信号生成部21及び優先順位判定部22に加え、アクセスプロファイル部23及びアクセス割込条件判定部24を有する。   As shown in FIG. 3, the system according to the present embodiment is the same as the first embodiment in that it includes bus masters A11, B12, and 13, a memory arbitration circuit 20, and a memory 30. However, the configuration of the memory arbitration circuit 20 is different. That is, the memory arbitration circuit 20 includes an access profile unit 23 and an access interrupt condition determination unit 24 in addition to the signal generation unit 21 and the priority order determination unit 22.

アクセスプロファイル部23は、各バスマスタのメモリアクセス量を監視するアクセス監視部であり、少なくともバスマスタA11のメモリ30に対するアクセス量を測定する。なお、メモリ30に対するアクセス期間を測定してもよい。   The access profile unit 23 is an access monitoring unit that monitors the memory access amount of each bus master, and measures at least the access amount to the memory 30 of the bus master A11. Note that the access period to the memory 30 may be measured.

アクセス割込条件判定部24は、アクセスプロファイル部23の監視結果に基づき、バスマスタA11からのメモリアクセス割込み要求の許否を決定する。このアクセス割込条件判定部24は、バスマスタA11のメモリアクセス量が所定の閾値を超えた場合、割り込み機能を有効とし、バスマスタA11からのメモリ30に対する割込アクセス機能を有効とする。ここで、アクセス割込条件判定部24は、複数の閾値を有し、状況に応じて当該閾値を変更し、メモリアクセス割込み要求の許否を決定するようにしてもよい。   The access interrupt condition determination unit 24 determines whether or not to permit a memory access interrupt request from the bus master A11 based on the monitoring result of the access profile unit 23. When the memory access amount of the bus master A11 exceeds a predetermined threshold, the access interrupt condition determination unit 24 enables the interrupt function and enables the interrupt access function for the memory 30 from the bus master A11. Here, the access interrupt condition determination unit 24 may have a plurality of threshold values, change the threshold values according to the situation, and determine whether or not to permit the memory access interrupt request.

すなわち、第1の期間と、第2のバスマスタからメモリ30へのアクセスが第1の期間より頻繁に必要になる第2の期間とがある場合、アクセス割込条件判定部24は、第2の期間の閾値を第1の期間の閾値より高く設定するようにしてもよい。すなわち、第2の期間のようにバスマスタB11のメモリ30へのアクセスが第1の期間より頻繁になる場合、バスマスタA11のメモリ30へのアクセスを抑制するものである。   That is, when there is a first period and a second period in which access from the second bus master to the memory 30 is required more frequently than the first period, the access interrupt condition determination unit 24 The threshold value for the period may be set higher than the threshold value for the first period. That is, when access to the memory 30 of the bus master B11 is more frequent than in the first period as in the second period, the access to the memory 30 of the bus master A11 is suppressed.

この第2の期間は、例えば、バスマスタB12が画像データの取得を要求する間に対応し、第1の期間は、バスマスタB12が画像データの取得後、次の画像データの取得を要求するまでの間に対応する。具体的には、第1の期間はブランキング期間に対応し、第2の期間は有効表示期間に対応するものとすることができる。通常、ブランキング期間には、バスマスタB12のメモリアクセスは生ずることはないため、バスマスタA11の割込処理を許可し、一方、有効表示期間には、バスマスタB12は画像データを取得する必要があるので、バスマスタA11のアクセス要求を一定以上は拒否し、バスマスタB12が必要な画像データを取得できるようにする。   This second period corresponds to, for example, while the bus master B12 requests acquisition of image data, and the first period is after the bus master B12 acquires image data until it requests acquisition of the next image data. Corresponding between. Specifically, the first period can correspond to a blanking period, and the second period can correspond to an effective display period. Normally, memory access of the bus master B12 does not occur during the blanking period, so that the interrupt processing of the bus master A11 is permitted. On the other hand, during the valid display period, the bus master B12 needs to acquire image data. The access request from the bus master A11 is rejected above a certain level so that the bus master B12 can acquire necessary image data.

閾値の設定は、処理の性質などに応じて種々設定することができる。例えば、バスマスタA11のアクセス量が閾値Aを超えた時(アクセス頻度高くなったことを検知した時)、アクセス割り込みを有効にしたり(ON条件)、その他のバスマスタB12、13のアクセス量が閾値Bを下回った時(最低アクセス量を下回ったことを検知した時)、バスマスタA11のアクセス割り込みを無効にしたりすることができる(OFF条件)。また、バスマスタA11のアクセス量が閾値Cを超えた時(アクセス頻度が高くなりすぎたことを検知した時)、アクセス割り込みを無効にする(OFF条件)ことも可能である。   Various threshold values can be set according to the nature of processing. For example, when the access amount of the bus master A11 exceeds the threshold A (when it is detected that the access frequency has increased), the access interrupt is enabled (ON condition), and the access amounts of the other bus masters B12 and 13 are the threshold B. (When it is detected that the amount of access is below the minimum access amount), the access interrupt of the bus master A11 can be disabled (OFF condition). Further, when the access amount of the bus master A11 exceeds the threshold C (when it is detected that the access frequency is too high), it is possible to invalidate the access interrupt (OFF condition).

図4は、本実施の形態の動作を示すフローチャートである。図2に示す実施の形態1と同一の工程は同一のステップとしている。図4に示すように、バスマスタB12のアクセス要求処理中に、バスマスタA11からのアクセス要求が生じた場合(ステップS2:Yes)、アクセス割込条件判定部24は、アクセスプロファイル部23でカウントされているバスマスタA11のアクセス量がある閾値以内であるか否かを判定する。このアクセス量がある閾値を超えたときに、バスマスタA11のアクセス割込み機能を有効とする。したがって、アクセス量がある閾値以上である場合、バスマスタA11の割込を許可する(ステップS11:Yes)。その他の工程は、実施の形態1と同様である。   FIG. 4 is a flowchart showing the operation of the present embodiment. The same steps as those in the first embodiment shown in FIG. 2 are the same steps. As shown in FIG. 4, when an access request from the bus master A11 is generated during the access request processing of the bus master B12 (step S2: Yes), the access interrupt condition determination unit 24 is counted by the access profile unit 23. It is determined whether the access amount of the bus master A11 is within a certain threshold. When this access amount exceeds a certain threshold, the access interrupt function of the bus master A11 is validated. Therefore, when the access amount is greater than or equal to a certain threshold value, the interrupt of the bus master A11 is permitted (step S11: Yes). Other steps are the same as those in the first embodiment.

ここで、ある単位時間に、その他のバスマスタB12、13のアクセス量がある閾値を下回った場合に、割り込み機能を無効とすることも可能である。さらにまた、バスマスタA11のアクセス割込みによるアクセス量がある閾値を超えた場合に、割り込み機能を無効とすることができる。これらを1つ以上組み合わせて使用してもよい。   Here, it is also possible to disable the interrupt function when the access amount of the other bus masters B12, 13 falls below a certain threshold value during a certain unit time. Furthermore, the interrupt function can be disabled when the access amount by the access interrupt of the bus master A11 exceeds a certain threshold. One or more of these may be used in combination.

バスマスタB11が画像表示回路の場合、有効表示期間にはメモリアクセスは集中し、ブランキング期間(無効表示期間)はアクセスが発生しない。したがって、有効表示期間時の閾値とブランキング期間時の閾値とを異なる閾値としてもよい。このことで、有効期間時には、アクセス割込みのための閾値を大きくし、アクセス割込み条件に合致しにくくし、画像表示部であるバスマスタB12のアクセスを優先させる。逆にブランキング期間には、閾値を小さくし、アクセス割込み条件に合致しやすくさせる。このように2種類の期間に対応する2種類の閾値を設定することができる。   When the bus master B11 is an image display circuit, memory access is concentrated during the valid display period, and no access occurs during the blanking period (invalid display period). Therefore, the threshold value during the effective display period may be different from the threshold value during the blanking period. As a result, during the effective period, the threshold for access interrupt is increased to make it difficult to meet the access interrupt condition, and priority is given to access by the bus master B12 as the image display unit. On the other hand, during the blanking period, the threshold value is decreased so that the access interrupt condition is easily met. Thus, two types of threshold values corresponding to two types of periods can be set.

本実施の形態においては、実施の形態1と同様の効果を奏すると共に、アクセスプロファイル部23によりバスマスタA11のアクセス量を測定し、この測定したアクセス量に基づき、バスマスタA11の割込機能を有効又は無効にすることとする。このことにより、バスマスタA11の過剰な割込を禁止することができるとともに、バスマスタB12のメモリ30の使用頻度が低いときは、バスマスタA11の割込を許可し、バスマスタA11のレイテンシを最小限とするとともに、バスマスタB12のアクセスも確保することができる。   In the present embodiment, the same effect as in the first embodiment is obtained, the access amount of the bus master A11 is measured by the access profile unit 23, and the interrupt function of the bus master A11 is enabled or disabled based on the measured access amount. It will be disabled. As a result, excessive interrupts of the bus master A11 can be prohibited, and when the frequency of use of the memory 30 of the bus master B12 is low, the interrupt of the bus master A11 is permitted and the latency of the bus master A11 is minimized. At the same time, access of the bus master B12 can be secured.

なお、本発明は上述した実施の形態のみに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。   It should be noted that the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the present invention.

例えば、上述の実施の形態では、ハードウェアの構成として説明したが、これに限定されるものではなく、任意の処理を、CPU(Central Processing Unit)にコンピュータプログラムを実行させることにより実現することも可能である。この場合、コンピュータプログラムは、記録媒体に記録して提供することも可能であり、また、インターネットその他の伝送媒体を介して伝送することにより提供することも可能である。   For example, in the above-described embodiment, the hardware configuration has been described. However, the present invention is not limited to this, and arbitrary processing may be realized by causing a CPU (Central Processing Unit) to execute a computer program. Is possible. In this case, the computer program can be provided by being recorded on a recording medium, or can be provided by being transmitted via the Internet or another transmission medium.

11,111 バスマスタA
12,112 バスマスタB
13,113 バスマスタ
20,120 メモリ調停回路
21,121 信号生成部
22,122 優先順位判定部
23 アクセスプロファイル部
24 アクセス割込条件判定部
30,130 メモリ
11,111 Bus master A
12,112 Bus master B
13, 113 Bus master 20, 120 Memory arbitration circuit 21, 121 Signal generation unit 22, 122 Priority determination unit 23 Access profile unit 24 Access interrupt condition determination unit 30, 130 Memory

Claims (17)

第1及び第2のバスマスタからのメモリへのアクセスを調停するメモリ調停回路であって、
前記第1及び第2のバスマスタの優先順位を判定する優先順位判定部と、
前記第1及び第2のバスマスタからのメモリアクセス要求を受け、前記優先順位に基づき、メモリアクセスのための制御信号を生成する信号生成部と、
を有し、
前記信号生成部は、前記第2のバスマスタのメモリアクセス処理中に、前記第1のバスマスタのメモリアクセス要求を受け取ると、前記第2のバスマスタのメモリアクセス処理を一旦停止し、前記第1のバスマスタのメモリアクセス要求を処理する、メモリ調停回路。
A memory arbitration circuit that arbitrates access to the memory from the first and second bus masters,
A priority determination unit for determining the priority of the first and second bus masters;
A signal generation unit that receives memory access requests from the first and second bus masters and generates a control signal for memory access based on the priority;
Have
When the signal generator receives a memory access request from the first bus master during the memory access process of the second bus master, the signal generator temporarily stops the memory access process of the second bus master, and the first bus master Memory arbitration circuit that processes memory access requests.
前記メモリは、複数のバンクを備え、
前記信号生成部は、当該複数のバンクのうち1以上のバンクを前記第1のバスマスタ専用のバンクとする、請求項1記載のメモリ調停回路。
The memory includes a plurality of banks,
The memory arbitration circuit according to claim 1, wherein the signal generation unit uses one or more of the plurality of banks as a bank dedicated to the first bus master.
各バスマスタのメモリアクセス量を監視するアクセス監視部と、
前記アクセス監視部の監視結果に基づき、前記第1のバスマスタからのメモリアクセス割込み要求の許否を決定するアクセス割込条件判定部とを更に有し、
前記アクセス割込条件判定部は、前記第1のバスマスタのメモリアクセス量が所定の閾値を超えた場合、当該第1のバスマスタからのメモリアクセスを許可する、請求項1又は2記載のメモリ調停回路。
An access monitoring unit for monitoring the memory access amount of each bus master;
An access interrupt condition determination unit that determines permission / refusal of a memory access interrupt request from the first bus master based on a monitoring result of the access monitoring unit;
The memory arbitration circuit according to claim 1, wherein the access interrupt condition determination unit permits a memory access from the first bus master when a memory access amount of the first bus master exceeds a predetermined threshold. .
前記アクセス割込条件判定部は、複数の閾値を有し、状況に応じて当該閾値を変更し、メモリアクセス割込み要求の許否を決定する、請求項3記載のメモリ調停回路。   The memory arbitration circuit according to claim 3, wherein the access interrupt condition determination unit has a plurality of thresholds, changes the thresholds according to a situation, and determines whether or not to permit a memory access interrupt request. 第1の期間と、前記第2のバスマスタの前記メモリへのアクセスが前記第1の期間より頻繁に必要になる第2の期間とを有し、
前記アクセス割込条件判定部は、前記第2の期間の閾値を前記第1の期間の閾値より高く設定する、請求項3又は4記載のメモリ調停回路。
A first period and a second period in which the second bus master needs to access the memory more frequently than the first period;
5. The memory arbitration circuit according to claim 3, wherein the access interrupt condition determination unit sets a threshold value of the second period higher than a threshold value of the first period.
前記第2の期間は前記第2のバスマスタが画像データの取得を要求する間に対応し、前記第1の期間は前記第2のバスマスタが画像データの取得後、次の画像データの取得を要求するまでの間に対応する、請求項5記載のメモリ調停回路。   The second period corresponds to the time when the second bus master requests acquisition of image data, and the first period requests the acquisition of the next image data after the second bus master acquires image data. The memory arbitration circuit according to claim 5, which corresponds to the period until 第1の期間はブランキング期間に対応し、前記第2の期間は有効表示期間に対応する、請求項5又は6記載のメモリ調停回路。   The memory arbitration circuit according to claim 5 or 6, wherein the first period corresponds to a blanking period, and the second period corresponds to an effective display period. 前記信号生成部は、前記第2のバスマスタのメモリアクセス要求を一旦停止し、前記第1のバスマスタのメモリアクセス要求の処理が終了したら、前記第2のバスマスタのメモリアクセス要求を再開する、請求項1乃至7のいずれか1項記載のメモリ調停回路。   The signal generation unit temporarily stops the memory access request of the second bus master, and resumes the memory access request of the second bus master when processing of the memory access request of the first bus master is completed. 8. The memory arbitration circuit according to any one of 1 to 7. 前記第1のバスマスタは、メモリアクセスのレイテンシをできるだけ短くする必要があるバスマスタである、請求項1乃至8のいずれか1項記載のメモリ調停回路。   9. The memory arbitration circuit according to claim 1, wherein the first bus master is a bus master that needs to make a memory access latency as short as possible. 10. 前記第2のバスマスタは、バーストアクセスによりバス帯域効率を高くする必要があるバスマスタである、請求項1乃至9のいずれか1項記載のメモリ調停回路。   The memory arbitration circuit according to any one of claims 1 to 9, wherein the second bus master is a bus master that needs to increase bus bandwidth efficiency by burst access. 前記第1のバスマスタは、CPU(Central Processing Unit)である、請求項1乃至10のいずれか1項記載のメモリ調停回路。   The memory arbitration circuit according to claim 1, wherein the first bus master is a CPU (Central Processing Unit). 前記第2のバスマスタは、画像表示回路である、請求項1乃至11のいずれか1項記載のメモリ調停回路。   The memory arbitration circuit according to claim 1, wherein the second bus master is an image display circuit. 前記メモリはSDRAM(Synchronous Dynamic Random Access Memory)である、請求項1乃至12のいずれか1項記載のメモリ調停回路。   The memory arbitration circuit according to claim 1, wherein the memory is an SDRAM (Synchronous Dynamic Random Access Memory). 第1及び第2のバスマスタからのメモリへのアクセスを調停するメモリ調停方法であって、
第2のバスマスタのメモリアクセス処理中に、第1のバスマスタのメモリアクセス要求を受け取ると、前記第2のバスマスタのメモリアクセス処理を一旦停止し、前記第1のバスマスタのメモリアクセス要求を処理する、メモリ調停方法。
A memory arbitration method for arbitrating access to memory from first and second bus masters,
When the memory access request of the first bus master is received during the memory access process of the second bus master, the memory access process of the second bus master is temporarily stopped and the memory access request of the first bus master is processed. Memory arbitration method.
前記メモリは、複数のバンクを備え、
前記複数のバンクのうち1以上のバンクを前記第1のバスマスタ専用のバンクとする、請求項14記載のメモリ調停方法。
The memory includes a plurality of banks,
The memory arbitration method according to claim 14, wherein one or more banks among the plurality of banks are dedicated to the first bus master.
各バスマスタのメモリアクセス量を監視し、
当該監視結果に基づき、前記第1のバスマスタのメモリアクセス量が所定の閾値を超えた場合、当該第1のバスマスタからのメモリアクセスを許可する、請求項14又は15記載のメモリ調停方法。
Monitor the memory access amount of each bus master,
16. The memory arbitration method according to claim 14, wherein when the memory access amount of the first bus master exceeds a predetermined threshold based on the monitoring result, memory access from the first bus master is permitted.
前記第2のバスマスタのメモリアクセス要求を一旦停止し、前記第1のバスマスタのメモリアクセス要求の処理が終了したら、前記第2のバスマスタのメモリアクセス要求を再開する、請求項14乃至16のいずれか1項記載のメモリ調停方法。   17. The memory access request of the second bus master is temporarily stopped, and when the processing of the memory access request of the first bus master is finished, the memory access request of the second bus master is resumed. The memory arbitration method according to claim 1.
JP2009236337A 2009-10-13 2009-10-13 Memory arbitration circuit and memory arbitration method Pending JP2011085989A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009236337A JP2011085989A (en) 2009-10-13 2009-10-13 Memory arbitration circuit and memory arbitration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009236337A JP2011085989A (en) 2009-10-13 2009-10-13 Memory arbitration circuit and memory arbitration method

Publications (1)

Publication Number Publication Date
JP2011085989A true JP2011085989A (en) 2011-04-28

Family

ID=44078907

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009236337A Pending JP2011085989A (en) 2009-10-13 2009-10-13 Memory arbitration circuit and memory arbitration method

Country Status (1)

Country Link
JP (1) JP2011085989A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013045299A (en) * 2011-08-24 2013-03-04 Key Asic Inc Memory card multiplex system
JP2014035628A (en) * 2012-08-08 2014-02-24 Canon Inc Information processing apparatus, memory control apparatus, and control method thereof
CN105590620A (en) * 2014-11-07 2016-05-18 卡西欧计算机株式会社 Processing device, processing method, and electronic musical instrument

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013045299A (en) * 2011-08-24 2013-03-04 Key Asic Inc Memory card multiplex system
JP2014035628A (en) * 2012-08-08 2014-02-24 Canon Inc Information processing apparatus, memory control apparatus, and control method thereof
CN105590620A (en) * 2014-11-07 2016-05-18 卡西欧计算机株式会社 Processing device, processing method, and electronic musical instrument
JP2016090869A (en) * 2014-11-07 2016-05-23 カシオ計算機株式会社 Processor, processing method, program, musical sound generation device, and electronic musical instrument
US10127164B2 (en) 2014-11-07 2018-11-13 Casio Computer Co., Ltd. Processing device, processing method, storage medium, and electronic musical instrument

Similar Documents

Publication Publication Date Title
JP5597546B2 (en) Bank sharing and refresh in shared multiport memory devices
US6330645B1 (en) Multi-stream coherent memory controller apparatus and method
TWI468926B (en) Processor power management and method
US20080126643A1 (en) Semiconductor circuit
AU687627B2 (en) Multiprocessor system bus protocol for optimized accessing of interleaved storage modules
US20080270658A1 (en) Processor system, bus controlling method, and semiconductor device
JP2008276391A (en) Memory access control device
JP2010134628A (en) Memory controller and data processor
JP2019522257A (en) Low power memory throttling
JP2011081553A (en) Information processing system and control method thereof
CN110059035B (en) Semiconductor device and bus generator
JP2011085989A (en) Memory arbitration circuit and memory arbitration method
JP2003015949A (en) Control device for semiconductor storage device and control method for semiconductor storage device
JP2011034214A (en) Memory controller
JP2010092101A (en) Information processor
JP6700739B2 (en) Controller and control method
KR100546678B1 (en) Apparatus and Method for Controlling Refresh Operation of Data Processing System
JPH01243147A (en) Buffer storage device
US20230133458A1 (en) Memory controller, control method for memory controller, and storage medium
JP5106864B2 (en) Bus system and image forming apparatus
JP5111940B2 (en) Information processing apparatus and access control method
JP2011076584A (en) Semiconductor integrated circuit device
US8327054B2 (en) Data check circuit for checking program data stored in memory
JPH117763A (en) Method for refresh control to dram and circuit therefor
JP2006164099A (en) Memory control unit