JP4472426B2 - Bus bridge circuit - Google Patents

Bus bridge circuit Download PDF

Info

Publication number
JP4472426B2
JP4472426B2 JP2004152859A JP2004152859A JP4472426B2 JP 4472426 B2 JP4472426 B2 JP 4472426B2 JP 2004152859 A JP2004152859 A JP 2004152859A JP 2004152859 A JP2004152859 A JP 2004152859A JP 4472426 B2 JP4472426 B2 JP 4472426B2
Authority
JP
Japan
Prior art keywords
system bus
bridge circuit
bus
address
data
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.)
Expired - Lifetime
Application number
JP2004152859A
Other languages
Japanese (ja)
Other versions
JP2005338900A (en
Inventor
司郎 山岸
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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2004152859A priority Critical patent/JP4472426B2/en
Publication of JP2005338900A publication Critical patent/JP2005338900A/en
Application granted granted Critical
Publication of JP4472426B2 publication Critical patent/JP4472426B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)
  • Memory System (AREA)

Description

本発明は、第1のシステムバスと第2のシステムバスとの間に設けられるバスブリッジ回路に関する。   The present invention relates to a bus bridge circuit provided between a first system bus and a second system bus.

近年、携帯電話に搭載されるシステムLSIでは、リアルタイム性が要求されるアプリケーションの実現が要望されている。リアルタイム性が要求される主なアプリケーションとしては、動作処理などが代表的である。リアルタイム性が要求されるアプリケーションの場合には、ある特定の処理を一定期間内に終了させる必要があるので、キャッシュを用いたCPUにそのような処理を行わせる場合には、キャッシュのヒット率を正確に見積もるか、十分に余裕をもって見積もることが必要となる。しかしながら、キャッシュのヒット率を、ソフト開発が全く行われていないLSI設計開発の段階で正確に見積もることは難しく、また十分な容量のキャッシュを搭載することもコストや消費電力の問題から困難である。   In recent years, system LSIs mounted on mobile phones have been desired to realize applications that require real-time performance. A typical application that requires real-time performance is typically operation processing. In the case of an application that requires real-time performance, it is necessary to finish a specific process within a certain period of time. Therefore, if you want the CPU using the cache to perform such a process, set the cache hit rate to It is necessary to estimate accurately or with sufficient margin. However, it is difficult to accurately estimate the cache hit rate at the stage of LSI design and development, where no software development has been performed, and it is difficult to install a cache with sufficient capacity due to cost and power consumption issues. .

そのような場合においての解決策として、高いリアルタイム性が要求されるプログラム領域についてのみ、CPUのキャッシュをイネーブルとし、それ以外のリアルタイム性がそれほど要求されないプログラム領域についてはCPUのキャッシュをディスエーブルすることにより、キャッシュがイネーブルにされるメインメモリの領域を限定し、その範囲内でのキャッシュヒット率を向上させる、という手段が考えられる。   In such a case, the solution is to enable the CPU cache only for program areas that require high real-time performance, and disable the CPU cache for other program areas that do not require much real-time performance. Thus, a means for limiting the area of the main memory in which the cache is enabled and improving the cache hit rate within the range can be considered.

この手段であれば、LSI設計終了後においても、ソフト設計による工夫である程度の柔軟な対応が可能である。しかしながら、このような手法であっても、以下のような課題が生じる。それは、組み込み機器向けのリアルタイムOSで動作するようなCPUは、キャッシュを搭載するとしても、バス制御部は、Linux等が搭載されるようなMMU(メモリ管理ユニット)が搭載されているCPUに比べ、貧弱な構成であることが多く、キャッシュがイネーブルされていれば、CPUからのアクセスは連続的(バースト転送)となるが、ディスエーブルされている領域に対しては、単発的(シングル転送)となってしまう場合が多い。   With this means, even after LSI design is completed, a certain degree of flexibility can be dealt with by means of software design. However, even such a method has the following problems. Even if a CPU that runs on a real-time OS for embedded devices is equipped with a cache, the bus control unit is compared to a CPU with an MMU (memory management unit) that is equipped with Linux, etc. If the cache is enabled, access from the CPU is continuous (burst transfer), but for disabled areas, it is single (single transfer). In many cases.

一方、メインメモリとしては、システムLSIの処理能力向上に伴い、それに見合った大容量のメモリが要望されている。しかしながら、システムLSI内部でそのような大容量のメモリを持つことは難しく、一般には外付けのSDRAM(Synchronous Dynamic Random Access Memory)が使用されることが多い。SDRAMはクロックに同期して動作するDRAMであり、いわゆるバーストアクセスによって高速アクセスを実現する。具体的には、コマンドを一回入力すれば、連続する複数のアドレスからデータを順次読み出すことができる。しかしながら、とびとびのアドレスに対してランダムにアクセスするような場合には、バースト転送を有効に使用することはできず、アクセス速度は大幅に低下してしまう特性を持っている。   On the other hand, as the main memory, as the processing capacity of the system LSI is improved, a large-capacity memory commensurate with it has been demanded. However, it is difficult to have such a large-capacity memory inside the system LSI, and generally an external SDRAM (Synchronous Dynamic Random Access Memory) is often used. SDRAM is a DRAM that operates in synchronization with a clock, and realizes high-speed access by so-called burst access. Specifically, if a command is input once, data can be sequentially read from a plurality of consecutive addresses. However, when random access is made to discrete addresses, burst transfer cannot be used effectively, and the access speed is greatly reduced.

これらのCPUの特性およびメインメモリの特性を考慮すると、上述のように高いリアルタイム性が要求されるプログラム領域のみCPUのキャッシュをイネーブルとし、それ以外のリアルタイム性がそれほど要求されないプログラム領域についてはCPUのキャッシュをディスエーブルすることにより、高いリアルタイム性が要求される領域に対してのキャッシュヒット率を向上させることができたとしても、それ以外の領域に対しては、キャッシュがディスエーブルされていることから、単発的(シングル転送)アクセスとなってしまい、SDRAMへのアクセス効率が大幅に低下してしまう、という副作用が生じることになる。   Considering these CPU characteristics and main memory characteristics, the CPU cache is enabled only for program areas that require high real-time performance as described above, and other program areas that do not require much real-time performance, as described above. Even if the cache hit rate can be improved by disabling the cache to improve the area where high real-time performance is required, the cache must be disabled for other areas. As a result, the side-by-side (single transfer) access occurs and the access efficiency to the SDRAM is greatly reduced.

上記課題を解決する手段として、例えば、メモリ制御回路内部にバッファリング機能を設け、アクセス速度向上を図る手段がある(例えば、特許文献1参照)。またCPUを高性能化し、キャッシュの補助機能としてCPU内部にプリフェッチバッファを設ければ、システムバスに対しての連続転送を確保できる(例えば、特許文献2参照)。同様にCPUを高性能化するため、CPU外部に2次キャッシュを設ければ、システムバスに対しての連続転送を確保できる(例えば、特許文献3参照)。
特開2001−175534号公報 特開平6−28180号公報 特開平10−187532号公報
As means for solving the above problems, for example, there is means for improving the access speed by providing a buffering function in the memory control circuit (see, for example, Patent Document 1). If the CPU is improved in performance and a prefetch buffer is provided in the CPU as an auxiliary function of the cache, continuous transfer to the system bus can be secured (see, for example, Patent Document 2). Similarly, if a secondary cache is provided outside the CPU in order to improve the performance of the CPU, continuous transfer to the system bus can be secured (for example, see Patent Document 3).
JP 2001-175534 A JP-A-6-28180 JP-A-10-187532

しかしながら、特許文献1に記載された手段では、CPUの命令アクセス特有のシーケンシャルに変化するアドレスをうまく利用することができないという事情がある。また、特許文献2,3に記載された手段では、キャッシュをディスエーブルした場合の考慮はされていないし、CPUの高性能化に伴う面積増加のデメリットが大きいという事情がある。本発明はアクセス速度の低下を防止することができるバスブリッジ回路を提供することを目的とする。   However, with the means described in Patent Document 1, there is a situation in which a sequentially changing address peculiar to the instruction access of the CPU cannot be used well. Further, the means described in Patent Documents 2 and 3 do not consider the case where the cache is disabled, and there is a situation that the demerit of the increase in area due to the high performance of the CPU is large. It is an object of the present invention to provide a bus bridge circuit that can prevent a decrease in access speed.

本発明のバスブリッジ回路は、第1のシステムバスと第2のシステムバスとの間に設けられるバスブリッジ回路であって、前記第1のシステムバスから供給される特定のリードアクセスを判別する判別手段と、データバッファと、前記データバッファに記憶するデータのアドレスを一時保存するアドレスタグと、前記第1のシステムバスから供給される特定のリードアクセスを判別した場合に、前記アドレスタグに保存したアドレスと、前記リードアクセスのアドレスを比較し、比較結果が不一致の場合には、前記第2のシステムバスに対して前記リードアクセスを発生させ、前記メインメモリから読み出したデータを前記データバッファに格納し、前記比較結果が一致の場合には、前記第1のデータバッファに格納されたデータを、前記第1のシステムバスに受け渡す制御を行う制御部とを備える。   A bus bridge circuit according to the present invention is a bus bridge circuit provided between a first system bus and a second system bus, and discriminates a specific read access supplied from the first system bus. Means, a data buffer, an address tag for temporarily storing an address of data stored in the data buffer, and a specific read access supplied from the first system bus, when stored in the address tag If the address and the address of the read access are compared, and the comparison result does not match, the read access is generated for the second system bus, and the data read from the main memory is stored in the data buffer If the comparison result is coincident, the data stored in the first data buffer is changed to the first data buffer. And a control unit which performs the system bus to receive and passes control.

上記構成によれば、第1のシステムバスから供給される特定のリードアクセスを判別した場合に、アドレスタグに保存したアドレスとリードアクセスのアドレスとを比較し、比較結果が一致の場合には、データバッファに格納されたデータを第1のシステムバスを介して受け渡す制御を行うことにより、第2のシステムバスへのアクセスすることなくデータバッファに格納されたデータの受け渡しが可能となるためアクセス速度の低下を防止することができる。   According to the above configuration, when the specific read access supplied from the first system bus is determined, the address stored in the address tag is compared with the address of the read access. By controlling the data stored in the data buffer via the first system bus, the data stored in the data buffer can be transferred without accessing the second system bus. A decrease in speed can be prevented.

本発明において、前記制御部は、前記アドレスタグに保存したアドレスと、前記リードアクセスのアドレスを比較する比較器と、前記比較器の比較結果が不一致の場合には、前記第2のシステムバスに対して前記リードアクセスを発生させ、前記メインメモリから読み出したデータを前記データバッファに格納し、前記比較結果が一致の場合には、前記第1のデータバッファに格納されたデータを前記第1のシステムバスに受け渡す制御を行う制御回路とを備える。   In the present invention, when the control result of the comparator does not match the address stored in the address tag and the address of the read access, and the comparison result of the comparator does not match, In response to the read access, the data read from the main memory is stored in the data buffer. If the comparison result is coincident, the data stored in the first data buffer is stored in the first buffer. And a control circuit for performing control to be transferred to the system bus.

本発明において、前記判別手段は、前記メインメモリの特定範囲のアドレスに対するリードアクセスを前記特定のリードアクセスとして判別する。また、前記判別手段は、前記第1のシステムバスから供給される制御情報により前記特定リードアクセスを判別する。   In the present invention, the determination unit determines a read access to an address in a specific range of the main memory as the specific read access. The determination unit determines the specific read access based on control information supplied from the first system bus.

本発明において、前記制御部は、前記第1のシステムバスのプロトコルを前記第2のシステムバスのプロトコルに変換する機能や、前記制御部は、前記第1のシステムバスと前記第2のシステムバスとの動作周波数を整合させる機能を有する。   In the present invention, the control unit functions to convert the protocol of the first system bus into the protocol of the second system bus, and the control unit includes the first system bus and the second system bus. And the function of matching the operating frequency.

本発明において、前記判別手段は、前記第1のシステムバスに接続されたCPUから前記第2のシステムバスに接続されたメインメモリへの命令フェッチアクセスを前記特定のリードアクセスとして判別する。   In the present invention, the determination means determines an instruction fetch access from the CPU connected to the first system bus to the main memory connected to the second system bus as the specific read access.

本発明において、前記CPUからデータアクセスが発行される場合に、前記メインメモリに対するリードデータおよびライトデータを一時保存するバッファを備えることが好ましい。   In the present invention, it is preferable to provide a buffer for temporarily storing read data and write data for the main memory when data access is issued from the CPU.

本発明によれば、第2のシステムバスへのアクセスすることなくデータバッファに格納されたデータの受け渡しが可能となるためアクセス速度の低下を防止することができる。   According to the present invention, the data stored in the data buffer can be transferred without accessing the second system bus, so that the access speed can be prevented from decreasing.

図1は、本発明の実施の形態にかかるバスブリッジ回路3が適用されるバス構成システムの例を示す。第1のシステムバス2と第2のシステムバス5は、本実施形態のバスブリッジ回路3を介して接続されている。第1のシステムバス2には、キャッシュメモリ9を内蔵するCPU1およびブロックA4が接続されており、第2のシステムバス5には、SDRAMコントローラ6を介してメインメモリであるSDRAMメモリ8が接続され、またブロックB7が接続されている。このシステムにおいては、CPU1のプログラムは、SDRAM8に配置されており、CPU1は、SDRAM8から命令データをフェッチすることにより動作することになる。   FIG. 1 shows an example of a bus configuration system to which a bus bridge circuit 3 according to an embodiment of the present invention is applied. The first system bus 2 and the second system bus 5 are connected via the bus bridge circuit 3 of the present embodiment. The first system bus 2 is connected to the CPU 1 including the cache memory 9 and the block A4, and the second system bus 5 is connected to the SDRAM memory 8 as the main memory via the SDRAM controller 6. In addition, the block B7 is connected. In this system, the program of the CPU 1 is arranged in the SDRAM 8, and the CPU 1 operates by fetching instruction data from the SDRAM 8.

ここで、第1のシステムバス2と第2のシステムバス5について説明すると、第1のシステムバス2と第2のシステムバス5は、その使用目的によって、バスプロトコルが相違している場合や、バス周波数が異なる場合がある。そのため、第1のシステムバス2と第2のシステムバス5との間のバスブリッジ回路3は、プロトコルの整合や、異なる動作周波数の整合をとるために、通常、ある程度のデータのバッファリングが必要となる。   Here, the first system bus 2 and the second system bus 5 will be described. When the first system bus 2 and the second system bus 5 have different bus protocols depending on the purpose of use, The bus frequency may be different. For this reason, the bus bridge circuit 3 between the first system bus 2 and the second system bus 5 usually requires a certain amount of data buffering in order to achieve matching of protocols and matching of different operating frequencies. It becomes.

一方、第1のシステムバス2に接続されるCPU1は、キャッシュメモリ9を内蔵しており、ある領域毎にキャッシュ可能、キャッシュ不可能を選択することができる。また内部で命令バスとデータバスが分離されており、命令、データそれぞれにキャッシュメモリ9を持っているが、双方のバスがまとめられた形で、第1のシステムバス2に接続されている。キャッシュ可能な領域に対しては、キャッシュが機能することにより、第1のシステムバス2に対してはバースト転送が実行されるが、キャッシュ不可能な領域に対しては、キャッシュは機能せず、第1のシステムバス2に対してはシングル転送になる。   On the other hand, the CPU 1 connected to the first system bus 2 has a built-in cache memory 9, and can select cacheable or non-cacheable for each area. In addition, the instruction bus and the data bus are internally separated, and the cache memory 9 is provided for each of the instruction and data. However, both buses are connected to the first system bus 2 in a combined form. For the cacheable area, the cache functions, so that burst transfer is executed for the first system bus 2, but for the non-cacheable area, the cache does not function. Single transfer is performed for the first system bus 2.

図2は、本発明の実施の形態を説明するためのバスブリッジ回路3の概略構成を示すブロック図である。図1および図2に示すように、本実施形態のバスブリッジ回路3は、キャッシュメモリ9を有するCPU1が接続される第1のシステムバス2と、SDRAMコントローラ6を介してSDRAM8が接続される第2のシステムバス5との間に設けられ、第1のシステムバスから供給される特定のリードアクセスを判別する判別機能を備える第1バスインターフェース10と、キャッシュメモリ9の1ライン分の容量を有するデータバッファ13と、データバッファ13に記憶するデータのアドレスを一時保存するアドレスタグ12と、第1のシステムバス2から供給される特定のリードアクセスを判別した場合に、アドレスタグ12に保存したアドレスと、リードアクセスのアドレスを比較し、比較結果が不一致の場合には、第2のシステムバス5に対してリードアクセスを発生させ、SDRAM8から読み出したデータをデータバッファ13に格納し、比較結果が一致の場合には、データバッファ13に格納されたデータを、第1のシステムバス2に受け渡す制御を行う制御部16とを備える。   FIG. 2 is a block diagram showing a schematic configuration of the bus bridge circuit 3 for explaining the embodiment of the present invention. As shown in FIGS. 1 and 2, the bus bridge circuit 3 of the present embodiment includes a first system bus 2 to which a CPU 1 having a cache memory 9 is connected and an SDRAM 8 to which a SDRAM 8 is connected via an SDRAM controller 6. The first bus interface 10 provided between the two system buses 5 and having a discrimination function for discriminating a specific read access supplied from the first system bus, and the capacity of one line of the cache memory 9 The address stored in the address tag 12 when the data buffer 13, the address tag 12 for temporarily storing the address of the data stored in the data buffer 13, and the specific read access supplied from the first system bus 2 are determined. And the read access address are compared, and if the comparison result does not match, the read address is read from the second system bus 5. Control for generating access and storing the data read from the SDRAM 8 in the data buffer 13, and when the comparison result is coincident, the data stored in the data buffer 13 is transferred to the first system bus 2. Part 16.

また、制御部16は、アドレスタグ12に保存したアドレスと、リードアクセスのアドレスを比較する比較器11と、比較器11の比較結果が不一致の場合には、第2のシステムバス5に対してリードアクセスを発生させ、SDRAM8から読み出したデータをデータバッファ13に格納し、比較結果が一致の場合には、データバッファ13に格納されたデータを、第1のシステムバス2に受け渡す制御を行う制御回路14とを備える。   The control unit 16 compares the address stored in the address tag 12 with the read access address, and the comparison result of the comparator 11 does not match the second system bus 5. A read access is generated, the data read from the SDRAM 8 is stored in the data buffer 13, and when the comparison result is coincident, the data stored in the data buffer 13 is controlled to be transferred to the first system bus 2. And a control circuit 14.

バスブリッジ回路3は、第1のシステムバス2に接続される第1バスインターフェース10と、第2のシステムバス5に接続される第2バスインターフェース15とによりバスのコントロールを行う。   The bus bridge circuit 3 controls the bus by a first bus interface 10 connected to the first system bus 2 and a second bus interface 15 connected to the second system bus 5.

第1バスインターフェース10によって受け付けられたアドレスは、比較回路11に送られ、アドレスタグ12と比較される。比較回路11の比較結果は、制御回路14に伝達され、制御回路14はその情報をもとに、第2バスインターフェース15、第1バスインターフェース10を操作し、データバッファ13へデータを書き込み、あるいはデータの読み出しを行う。   The address received by the first bus interface 10 is sent to the comparison circuit 11 and compared with the address tag 12. The comparison result of the comparison circuit 11 is transmitted to the control circuit 14, and the control circuit 14 operates the second bus interface 15 and the first bus interface 10 based on the information, and writes data to the data buffer 13, or Read data.

次に、図1および図2を参照して、バスブリッジ回路3の動作について説明する。まずSDRAM8のキャッシュ不可能領域に対してCPU1がアクセスした場合、バスブリッジ回路3は、第1バスインターフェース10により受け付け、そのアクセス種類がどのようなものであるかを判別する。   Next, the operation of the bus bridge circuit 3 will be described with reference to FIG. 1 and FIG. First, when the CPU 1 accesses the non-cacheable area of the SDRAM 8, the bus bridge circuit 3 accepts it through the first bus interface 10 and determines what kind of access it is.

具体的には、ライトであるか、リードであるか、もしくは命令フェッチであるか、データアクセスであるかを、第1のシステムバス2上の制御情報により判別する。もし、第1のシステムバス2のプロトコルにそのような情報がないのであれば、アドレスを観測し、該当するアクセス領域であるかにより、内部のアドレスタグ12等を動作させるかを判別する。   Specifically, it is determined by the control information on the first system bus 2 whether it is a write, a read, an instruction fetch, or a data access. If there is no such information in the protocol of the first system bus 2, the address is observed, and it is determined whether the internal address tag 12 or the like is to be operated depending on whether the access area is applicable.

上記のように特定のアクセスを判別した後、所望のアクセスであること、具体的には、CPU1からの命令フェッチであることを判別した場合は、内部のアドレスタグ12と第1のシステムバス2のアクセスアドレスを比較回路11で比較する。   After determining the specific access as described above, if it is determined that it is a desired access, specifically, an instruction fetch from the CPU 1, the internal address tag 12 and the first system bus 2 Are compared by the comparison circuit 11.

ここで命令フェッチであることを判別する理由は、命令フェッチのみであれば、アドレス変化がおおよそシーケンシャルであって、アドレスタグ12と一致する確率が高いためである。もしデータアクセスと混在して扱ってしまった場合には、それぞれのアクセスアドレスが異なるため、毎回のようにアドレスタグ12とアクセスアドレスは不一致となっていまい、効率が大幅に低下してしまうことが予想される。またデータアクセスの場合は、バスブリッジ回路3内部のデータバッファ13とSDRAM8との間のコヒーレンシ(coherency)の問題を解決しなければならない。   The reason for discriminating that it is an instruction fetch is that, if only an instruction fetch is used, the address change is approximately sequential and the probability of matching with the address tag 12 is high. If they are handled together with data access, the access addresses are different, so the address tag 12 and the access address do not match each time, and the efficiency may be greatly reduced. is expected. In the case of data access, it is necessary to solve the problem of coherency between the data buffer 13 in the bus bridge circuit 3 and the SDRAM 8.

アドレスの比較結果は、制御回路14に伝達され、比較一致の場合と比較不一致の場合で異なる制御を行う。比較一致の場合は、第2バスインターフェース15を起動することはなく、データバッファ13内部のデータを第1バスインターフェース10に受け渡す。このとき、データバッファ13は、CPU1内部のキャッシュメモリ9の1ラインと同等のワード数を保持する。それにより、キャッシュ可能領域に対しても同様の動作を行うことが可能である。比較不一致の場合には、第2バスインターフェース15を起動し、第2のシステムバス5においてリードアクセスを行う。第2のシステムバス5から読み出してきたデータは、データバッファ13に格納され、その後、第1バスインターフェース10にそのデータを受け渡す。   The address comparison result is transmitted to the control circuit 14, and different control is performed depending on whether the comparison coincides or does not coincide. In the case of the comparison match, the second bus interface 15 is not activated, and the data in the data buffer 13 is transferred to the first bus interface 10. At this time, the data buffer 13 holds the same number of words as one line of the cache memory 9 in the CPU 1. As a result, the same operation can be performed on the cacheable area. If the comparison does not match, the second bus interface 15 is activated and read access is performed on the second system bus 5. The data read from the second system bus 5 is stored in the data buffer 13 and then transferred to the first bus interface 10.

この時、第2のシステムバス5に対してのリードアクセスは、データバッファ13の容量分のデータを一度に読み出してくるため、バースト転送となる。第1バスインターフェース10からのアクセスがデータバッファ13の容量に満たない要求、例えばシングル転送であっても、第2のシステムバス5に対しては、バースト転送となる。これにより、第2のシステムバス5にSDRAM8のようなバースト転送方式を採用するメモリが接続されている場合であっても、転送効率を低下させることなくアクセスすることが可能となる。   At this time, read access to the second system bus 5 is burst transfer because data corresponding to the capacity of the data buffer 13 is read at a time. Even if the access from the first bus interface 10 is less than the capacity of the data buffer 13, for example, single transfer, burst transfer is performed to the second system bus 5. As a result, even when a memory adopting a burst transfer system such as SDRAM 8 is connected to the second system bus 5, it is possible to access without lowering the transfer efficiency.

図3は、第1のシステムバス2および第2のシステムバス5のタイミングチャートである。図3に示すタイミングチャートを用いてより具体的な動作について説明する。まず、図3に示す各信号について説明すると、クロック(1)とクロック(2)は、それぞれ第1のシステムバス2と第2のシステムバス5のクロック信号であり、本実施形態においては、第1のシステムバス2に対して第2のシステムバス5の動作周波数は2倍となっている。   FIG. 3 is a timing chart of the first system bus 2 and the second system bus 5. A more specific operation will be described with reference to the timing chart shown in FIG. First, the signals shown in FIG. 3 will be described. The clock (1) and the clock (2) are clock signals of the first system bus 2 and the second system bus 5, respectively. The operating frequency of the second system bus 5 is twice that of the one system bus 2.

アドレス(1)およびアドレス(2)は、アクセス対象のアドレスを表示している。ライト(1)およびライト(2)は、“H”の時にライトであることを示す信号である。また、転送タイプ(1)、転送タイプ(2)は、そのアクセスが、シングル転送であるか、バースト転送であるか、バースト長は幾つかを示す信号である。   Address (1) and address (2) indicate addresses to be accessed. Write (1) and write (2) are signals indicating that they are write when they are “H”. The transfer type (1) and transfer type (2) are signals indicating whether the access is single transfer or burst transfer, and the burst length is some.

ウエイト(1)、ウエイト(2)は、スレーブ側から出力する信号で“L”の時、マスタ側はウエイトする必要がある。データ(1)、データ(2)は、リードデータであってアドレスAに対してのリードデータをD(A)として表記している。また、アドレスタグ(1)は、バスブリッジ回路3内部のアドレスタグ12の値である。   Wait (1) and wait (2) are signals output from the slave side. When “L”, the master side needs to wait. Data (1) and data (2) are read data, and the read data for address A is represented as D (A). The address tag (1) is the value of the address tag 12 in the bus bridge circuit 3.

次に図3における動作について時系列にクロックサイクル単位で説明する。1サイクル目は、第1のシステムバス2においてアドレスAに対するリードアクセスが開始されている。バスブリッジ回路3内部においては、まずこのアクセスが特定のアクセスであるか、つまり命令アクセスであるかを判断する。   Next, the operation in FIG. 3 will be described in time series in units of clock cycles. In the first cycle, read access to address A is started on the first system bus 2. In the bus bridge circuit 3, it is first determined whether this access is a specific access, that is, an instruction access.

この判断手法については、タイミングチャートには記載していないが別途、制御情報信号をもらっているのであれば、その制御信号により判断し、もらっていないのであれば、アドレスAの値が、特定領域であるか否かによって判断する。   Although this determination method is not described in the timing chart, if a control information signal is separately obtained, it is determined based on the control signal. If not, the value of address A is a specific area. Judgment by whether or not.

この特定領域については、アドレス空間に写像領域があるのであれば、メモリの同一番地について2種類以上のアドレスが割り振られているのであるから、そのどちらを用いるかによって、このバスブリッジ回路3の特定アクセス判別機能をソフトで操作することができる。   As for this specific area, if there is a mapping area in the address space, two or more types of addresses are allocated to the same address in the memory, so that the bus bridge circuit 3 can be specified depending on which one is used. The access discrimination function can be operated by software.

また特定アクセスであることが認定できた場合は、内部のアドレスタグ(1)と現在アクセスしようとしているアドレス(1)とを比較する。今回の場合は、アドレスタグ(1)にはBアドレスが保持されているので不一致となる。   If it is recognized that the access is specific access, the internal address tag (1) is compared with the address (1) to be accessed at present. In this case, the address tag (1) does not match because the B address is held.

ただし、ここでアドレスタグは、アドレス(1)のビット数に対して、バスブリッジ回路3に内蔵されているデータバッファ13の容量分だけ少ないことに注意する。つまり、データバッファ13の容量が例えば8ワード(1ワード=4バイト)である場合には、アドレス(1)の下位5ビット分だけ少ないビット数がアドレスタグ(1)のビット数となる。   However, note that the address tag is smaller than the number of bits of the address (1) by the capacity of the data buffer 13 built in the bus bridge circuit 3. That is, when the capacity of the data buffer 13 is, for example, 8 words (1 word = 4 bytes), the number of bits corresponding to the lower 5 bits of the address (1) is the number of bits of the address tag (1).

2サイクル目では、アドレス比較結果が不一致であったので、データバッファ13の入れ替えを行うため、第1のシステムバス2については、バスブリッジ回路3からウエイト(1)を“L”にすることで、待機状態とする一方で、第2のシステムバス5については、データバッファ13の容量分のバースト転送を開始する。   In the second cycle, since the address comparison result is inconsistent, the data buffer 13 is replaced, so that the wait (1) is set to “L” from the bus bridge circuit 3 for the first system bus 2. On the other hand, on the second system bus 5, burst transfer for the capacity of the data buffer 13 is started while the standby state is set.

ここでは、データバッファ13の容量を8ワードとしているので、転送タイプ(2)は8バーストとしている。この点、第1のシステムバス2へのアクセスの転送タイプ(1)がシングルであったにもかかわらず、第2のシステムバス5のアクセスは、バースト転送となっており、SDRAM8を効率的に使用できる転送形態となっている。   Here, since the capacity of the data buffer 13 is 8 words, the transfer type (2) is 8 bursts. In this regard, even though the transfer type (1) of access to the first system bus 2 is single, the access of the second system bus 5 is burst transfer, and the SDRAM 8 is efficiently It is a transfer form that can be used.

3サイクル目以降は、第2のシステムバス5のリード転送が終了するまで、第1のシステムバス2は待機状態となっている。   After the third cycle, the first system bus 2 is in a standby state until the read transfer of the second system bus 5 is completed.

7サイクル目において、第2のシステムバス5のリード転送が終了し、第1のシステムバス2へは、データバッファ13からデータが出力されている。ここでデータバッファ13は、8ワードの容量があり、どのワードを取り出すかが問題となるが、それは、アドレス(1)に依存している。   In the seventh cycle, the read transfer of the second system bus 5 is completed, and data is output from the data buffer 13 to the first system bus 2. Here, the data buffer 13 has a capacity of 8 words, and it becomes a problem which word is taken out, but it depends on the address (1).

つまり前サイクルのアドレスAの下位5ビットにより、データバッファ13のどこのデータを取り出すかを決定しており、本サイクルの場合は、データバッファ13の最初のデータD(A)が取り出されている。   That is, the lower 5 bits of the address A of the previous cycle determine which data is extracted from the data buffer 13, and in this cycle, the first data D (A) of the data buffer 13 is extracted. .

また7サイクル目において注目が必要なのは、アドレスA+4に対してのアクセスが第1のシステムバス2に対して開始されており、1サイクル目と同様に特定アクセスであることが判別され、アドレスタグ(1)と比較されているが、この場合、1サイクル目と異なり、比較結果が一致となっている点である。   In the seventh cycle, attention should be paid to the fact that access to the address A + 4 has started for the first system bus 2, and it is determined that the access is a specific access as in the first cycle. Compared with the tag (1), in this case, unlike the first cycle, the comparison result is the same.

このように一致の場合は、すぐ次のサイクルでデータバッファ13に蓄積されているD(A+4)のデータをデータ(1)に出力することができる。また第2のシステムバス5へのアクセスは開始されない。   In the case of coincidence as described above, the data of D (A + 4) stored in the data buffer 13 can be output to the data (1) in the next cycle. Also, access to the second system bus 5 is not started.

8サイクル目以降においても明らかになるように、後続するアクセスはすべて内部のアドレスタグ(1)と一致するため(下位5ビットは比較されない点に注意)、同様に第2のシステムバス5へのアクセスは発生していない。   As will be apparent from the 8th cycle onward, since all subsequent accesses match the internal address tag (1) (note that the lower 5 bits are not compared), the access to the second system bus 5 is similarly performed. No access has occurred.

このように、第2のシステムバス5へのアクセスは、必ずバースト転送を形成し、またアドレスタグ12により比較を行うことで、第2のシステムバス5に無駄なアクセスを発生させることがなくCPU1の性能の向上を図ることができる。   As described above, the access to the second system bus 5 always forms a burst transfer, and the comparison by the address tag 12 does not cause unnecessary access to the second system bus 5. It is possible to improve the performance.

このように本実施形態のバスブリッジ回路3によれば、第1のシステムバス2から供給される特定のリードアクセスを判別した場合に、アドレスタグ12に保存したアドレスと、リードアクセスのアドレスを比較し、比較結果が一致の場合には、データバッファ13に格納されたデータを、第1のシステムバス2を介してCPU1に受け渡す制御を行うので、CPU1のキャッシュメモリ9がディスエーブルされている領域に対して、SDRAM8のアクセス速度の低下を防止することができる。   As described above, according to the bus bridge circuit 3 of the present embodiment, when a specific read access supplied from the first system bus 2 is determined, the address stored in the address tag 12 is compared with the read access address. On the other hand, if the comparison result is coincident, control is performed to transfer the data stored in the data buffer 13 to the CPU 1 via the first system bus 2, so that the cache memory 9 of the CPU 1 is disabled. It is possible to prevent a decrease in the access speed of the SDRAM 8 with respect to the area.

また、本実施形態のバスブリッジ回路3によれば、特定のリードアクセスを、SDRAM8の特定範囲のアドレスに対するリードアクセスであるかどうかにより判別するので、CPU1のキャッシュメモリ9がディスエーブルされている領域を容易に判別することができ、SDRAM8のアクセス速度の低下を防止することができる。   Further, according to the bus bridge circuit 3 of the present embodiment, the specific read access is discriminated based on whether or not the read access is made to an address within a specific range of the SDRAM 8, so that the cache memory 9 of the CPU 1 is disabled. Can be easily determined, and a decrease in the access speed of the SDRAM 8 can be prevented.

また、本実施形態のバスブリッジ回路3によれば、制御部16は、第1のシステムバス2から供給される制御情報により、特定リードアクセスを判別するので、CPU1のキャッシュメモリ9がディスエーブルされている領域を容易に判別することができ、SDRAM8のアクセス速度の低下を防止することができる。   Further, according to the bus bridge circuit 3 of the present embodiment, the control unit 16 determines specific read access based on the control information supplied from the first system bus 2, so that the cache memory 9 of the CPU 1 is disabled. It is possible to easily determine the area that is being accessed, and to prevent a decrease in the access speed of the SDRAM 8.

本発明のバスブリッジ回路は、第2のシステムバスへのアクセスすることなくデータバッファに格納されたデータの受け渡しが可能となるためアクセス速度の低下を防止することができるという効果を有し、第1のシステムバスと第2のシステムバスとの間に設けられるバスブリッジ回路等として有用である。   The bus bridge circuit of the present invention has the effect of preventing the access speed from being lowered because the data stored in the data buffer can be transferred without accessing the second system bus. This is useful as a bus bridge circuit or the like provided between one system bus and the second system bus.

本発明の実施の形態のバスブリッジ回路が適用されるバス構成を示すシステム構成図。1 is a system configuration diagram showing a bus configuration to which a bus bridge circuit according to an embodiment of the present invention is applied. 本発明の実施の形態のバスブリッジ回路の概略構成を示すブロック図。1 is a block diagram showing a schematic configuration of a bus bridge circuit according to an embodiment of the present invention. 第1のシステムバスおよび第2のシステムバスのアクセスタイミングを示すタイミングチャート。The timing chart which shows the access timing of the 1st system bus and the 2nd system bus.

符号の説明Explanation of symbols

1 CPU
2 第1のシステムバス
3 バスブリッジ回路
4 ブロックA
5 第2のシステムバス
6 SDRAMコントローラ
7 ブロックB
8 SDRAM
9 キャッシュメモリ
10 第1バスインターフェース
11 比較回路
12 アドレスタグ
13 データバッファ
14 制御回路
15 第2バスインターフェース
16 制御部
1 CPU
2 First system bus 3 Bus bridge circuit 4 Block A
5 Second system bus 6 SDRAM controller 7 Block B
8 SDRAM
DESCRIPTION OF SYMBOLS 9 Cache memory 10 1st bus interface 11 Comparison circuit 12 Address tag 13 Data buffer 14 Control circuit 15 2nd bus interface 16 Control part

Claims (8)

キャッシュメモリを内蔵するCPUが接続された第1のシステムバスと、メインメモリが接続された第2のシステムバスとの間に設けられるバスブリッジ回路であって、
前記第1のシステムバスから供給される特定のリードアクセスを判別する判別手段と、
データバッファと、
前記データバッファに記憶するデータのアドレスを一時保存するアドレスタグと、
前記第1のシステムバスから供給される特定のリードアクセスを判別した場合に、前記アドレスタグに保存したアドレスと、前記リードアクセスのアドレスを比較し、比較結果が不一致の場合には、前記第2のシステムバスに対して前記リードアクセスを発生させ、前記メインメモリから読み出したデータを前記データバッファに格納し、前記比較結果が一致の場合には、前記第1のデータバッファに格納されたデータを、前記第1のシステムバスに受け渡す制御を行う制御部と、を備え、
前記判別手段は、前記メインメモリに対するリードアクセスのうち、前記CPUのキャッシュメモリがディスエーブルされた領域に対するリードアクセスを、前記特定のリードアクセスとして判別し、
前記制御部は、前記特定のリードアクセスがシングル転送である場合に、前記第2のシステムバスに対して前記特定のリードアクセスをバースト転送として発生させる
バスブリッジ回路。
A bus bridge circuit provided between a first system bus to which a CPU incorporating a cache memory is connected and a second system bus to which a main memory is connected ;
Discrimination means for discriminating a specific read access supplied from the first system bus;
A data buffer;
An address tag for temporarily storing an address of data stored in the data buffer;
When a specific read access supplied from the first system bus is determined, the address stored in the address tag is compared with the address of the read access, and if the comparison result does not match, the second The read access to the system bus is generated, the data read from the main memory is stored in the data buffer, and if the comparison result is coincident, the data stored in the first data buffer is A control unit for performing control to pass to the first system bus,
The determining means determines a read access to an area where the cache memory of the CPU is disabled among the read accesses to the main memory as the specific read access,
The bus bridge circuit , wherein the control unit generates the specific read access as a burst transfer for the second system bus when the specific read access is a single transfer .
請求項1記載のバスブリッジ回路であって、前記制御部は、
前記アドレスタグに保存したアドレスと前記リードアクセスのアドレスとを比較する比較器と、
前記比較器の比較結果が不一致の場合には、前記第2のシステムバスに対して前記リードアクセスを発生させ、前記メインメモリから読み出したデータを前記データバッファに格納し、前記比較結果が一致の場合には、前記データバッファに格納されたデータを前記第1のシステムバスに受け渡す制御を行う制御回路と、
を備えるバスブリッジ回路。
The bus bridge circuit according to claim 1, wherein the control unit includes:
A comparator that compares the address stored in the address tag with the address of the read access;
If the comparison result of the comparator does not match, the read access is generated for the second system bus, the data read from the main memory is stored in the data buffer, and the comparison result is not matched. In this case, a control circuit that performs control to transfer the data stored in the data buffer to the first system bus;
A bus bridge circuit comprising:
請求項1記載のバスブリッジ回路であって、前記判別手段は、
前記メインメモリの特定範囲のアドレスに対するリードアクセスを前記特定のリードアクセスとして判別するバスブリッジ回路。
The bus bridge circuit according to claim 1, wherein the determination unit includes:
A bus bridge circuit that determines a read access to an address in a specific range of the main memory as the specific read access.
請求項1記載のバスブリッジ回路であって、前記判別手段は、
前記第1のシステムバスから供給される制御情報により前記特定リードアクセスを判別するバスブリッジ回路。
The bus bridge circuit according to claim 1, wherein the determination unit includes:
A bus bridge circuit that determines the specific read access based on control information supplied from the first system bus.
請求項1記載のバスブリッジ回路であって、前記制御部は、
前記第1のシステムバスのプロトコルを前記第2のシステムバスのプロトコルに変換する機能を有するバスブリッジ回路。
The bus bridge circuit according to claim 1, wherein the control unit includes:
A bus bridge circuit having a function of converting a protocol of the first system bus into a protocol of the second system bus.
請求項1記載のバスブリッジ回路であって、前記制御部は、
前記第1のシステムバスと前記第2のシステムバスとの動作周波数を整合させる機能を有するバスブリッジ回路。
The bus bridge circuit according to claim 1, wherein the control unit includes:
A bus bridge circuit having a function of matching operating frequencies of the first system bus and the second system bus.
請求項1ないし6のいずれか一項記載のバスブリッジ回路であって、前記判別手段は、
前記第1のシステムバスに接続されたCPUから前記第2のシステムバスに接続された
メインメモリへの命令フェッチアクセスを前記特定のリードアクセスとして判別するバスブリッジ回路。
The bus bridge circuit according to any one of claims 1 to 6, wherein the determination unit includes:
A bus bridge circuit that determines an instruction fetch access from a CPU connected to the first system bus to a main memory connected to the second system bus as the specific read access.
請求項7記載のバスブリッジ回路であって、
前記CPUからデータアクセスが発行される場合に、前記メインメモリに対するリードデ
ータおよびライトデータを一時保存するバッファを備えるバスブリッジ回路。
The bus bridge circuit according to claim 7, wherein
A bus bridge circuit comprising a buffer for temporarily storing read data and write data for the main memory when data access is issued from the CPU.
JP2004152859A 2004-05-24 2004-05-24 Bus bridge circuit Expired - Lifetime JP4472426B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004152859A JP4472426B2 (en) 2004-05-24 2004-05-24 Bus bridge circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004152859A JP4472426B2 (en) 2004-05-24 2004-05-24 Bus bridge circuit

Publications (2)

Publication Number Publication Date
JP2005338900A JP2005338900A (en) 2005-12-08
JP4472426B2 true JP4472426B2 (en) 2010-06-02

Family

ID=35492445

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004152859A Expired - Lifetime JP4472426B2 (en) 2004-05-24 2004-05-24 Bus bridge circuit

Country Status (1)

Country Link
JP (1) JP4472426B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7870323B2 (en) * 2007-12-26 2011-01-11 Marvell World Trade Ltd. Bridge circuit for interfacing processor to main memory and peripherals

Also Published As

Publication number Publication date
JP2005338900A (en) 2005-12-08

Similar Documents

Publication Publication Date Title
TWI454909B (en) Memory device, method and system to reduce the power consumption of a memory device
CN106326140B (en) Data copying method, direct memory access controller and computer system
JP2005050324A (en) Interface conversion system and its method
JP6859361B2 (en) Performing memory bandwidth compression using multiple Last Level Cache (LLC) lines in a central processing unit (CPU) -based system
KR20160074648A (en) Final level cache system and corresponding method
JP2010191638A (en) Cache device
JPS6336466A (en) Bus expander
JP2007073052A (en) Accessing external memory from integrated circuit
JP2019096309A (en) Execution of maintenance operation
US7376791B2 (en) Memory access systems and methods for configuring ways as cache or directly addressable memory
US8639840B2 (en) Processing unit, chip, computing device and method for accelerating data transmission
US6718439B1 (en) Cache memory and method of operation
JP2011081553A (en) Information processing system and control method thereof
JP4113524B2 (en) Cache memory system and control method thereof
JP2003015949A (en) Control device for semiconductor storage device and control method for semiconductor storage device
US20080201528A1 (en) Memory access systems for configuring ways as cache or directly addressable memory
JP4791714B2 (en) Method, circuit, and system for using pause time of dynamic frequency scaling cache memory
WO2016106738A1 (en) Transaction conflict detection method and apparatus and computer system
JP4472426B2 (en) Bus bridge circuit
JP2000082010A (en) Method and device for data processing with address conversion
JP2006251923A (en) Look-ahead control method
US20080016296A1 (en) Data processing system
US5724548A (en) System including processor and cache memory and method of controlling the cache memory
US20040083344A1 (en) Method, apparatus, and system for improving memory access speed
US20020188771A1 (en) Direct memory access controller for carrying out data transfer by determining whether or not burst access can be utilized in an external bus and access control method thereof

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060327

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061222

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20071114

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071121

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20071128

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071205

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091030

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091110

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091225

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: 20100202

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: 20100303

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

Free format text: PAYMENT UNTIL: 20130312

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150