JP4498705B2 - Cash system - Google Patents

Cash system Download PDF

Info

Publication number
JP4498705B2
JP4498705B2 JP2003312617A JP2003312617A JP4498705B2 JP 4498705 B2 JP4498705 B2 JP 4498705B2 JP 2003312617 A JP2003312617 A JP 2003312617A JP 2003312617 A JP2003312617 A JP 2003312617A JP 4498705 B2 JP4498705 B2 JP 4498705B2
Authority
JP
Japan
Prior art keywords
cache
access
control unit
cache memory
mode
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 - Fee Related
Application number
JP2003312617A
Other languages
Japanese (ja)
Other versions
JP2005084712A (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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Technology Corp filed Critical Renesas Technology Corp
Priority to JP2003312617A priority Critical patent/JP4498705B2/en
Publication of JP2005084712A publication Critical patent/JP2005084712A/en
Application granted granted Critical
Publication of JP4498705B2 publication Critical patent/JP4498705B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

本発明は、キャッシュメモリを備えるキャッシュシステムに関し、特に、低速かつ低消費電力でキャッシュメモリを動作させるアクセスモードと、高速かつ高消費電力でキャッシュメモリを動作させるアクセスモードとを有するキャッシュシステムに関する。   The present invention relates to a cache system including a cache memory, and more particularly to a cache system having an access mode for operating a cache memory at low speed and low power consumption and an access mode for operating a cache memory at high speed and high power consumption.

二つのアクセスモードを有するキャッシュシステムの第1の例が、下記特許文献1に開示されている。第1のアクセスモード(全部アクセスモード)では、アドレスメモリに関するヒット/ミス判定動作に並行して、全てのウェイに対するインデックス動作が行われる。これにより、キャッシュメモリから外部へのデータ出力の高速化が図られる。一方、第2のアクセスモード(唯一アクセスモード)では、インデックス動作に先立ってアドレスメモリに関するヒット/ミス判定動作が行われ、当該判定動作により得られたウェイ選択信号によって選択されたウェイに対してのみ、インデックス動作が行われる。これにより、必要最小限のデータメモリ領域のみが動作することとなり、消費電力の低減が図られる。   A first example of a cache system having two access modes is disclosed in Patent Document 1 below. In the first access mode (all access mode), the index operation for all ways is performed in parallel with the hit / miss determination operation for the address memory. Thereby, the speed of data output from the cache memory to the outside can be increased. On the other hand, in the second access mode (unique access mode), hit / miss determination operation regarding the address memory is performed prior to the index operation, and only for the way selected by the way selection signal obtained by the determination operation. An index operation is performed. As a result, only the minimum necessary data memory area operates, and the power consumption can be reduced.

また、二つのアクセスモードを有するキャッシュシステムの第2の例が、下記特許文献2に開示されている。キャッシュシステムはCPUとキャッシュメモリとを備えており、CPUはプロセッサコアとプリフェッチ装置とを有している。プリフェッチ装置は、命令バッファ、バッファ占有度検出器、及び分岐命令予測器を含んでいる。第1のアクセスモード(並列アクセスモード)では、アドレスメモリに関するヒット/ミス判定動作に並行して、全てのデータRAMユニットに対するインデックス動作が行われる。一方、第2のアクセスモード(直列アクセスモード)では、インデックス動作に先立ってタグRAMに関するヒット/ミス判定動作が行われ、当該判定動作により得られた一致信号によって選択された一つのデータRAMユニットに対してのみ、インデックス動作が行われる。   A second example of a cache system having two access modes is disclosed in Patent Document 2 below. The cache system includes a CPU and a cache memory, and the CPU includes a processor core and a prefetch device. The prefetch device includes an instruction buffer, a buffer occupancy detector, and a branch instruction predictor. In the first access mode (parallel access mode), index operations for all data RAM units are performed in parallel with the hit / miss determination operation for the address memory. On the other hand, in the second access mode (serial access mode), hit / miss determination operation related to the tag RAM is performed prior to the index operation, and one data RAM unit selected by the coincidence signal obtained by the determination operation is stored. Only the index operation is performed.

特開平11−39216号公報Japanese Patent Laid-Open No. 11-39216 特開平8−221324号公報JP-A-8-221324

しかしながら、上記特許文献1,2に開示された従来のキャッシュシステムには、以下のような問題がある。   However, the conventional cache systems disclosed in Patent Documents 1 and 2 have the following problems.

上記特許文献1において、全部アクセスモードと唯一アクセスモードとの選択が行われる例として記載されているのは、連続読み出しのようなバーストアクセスの場合のみである。すなわち上記特許文献1には、バーストアクセスの場合において、第1回目のアクセスでは全部アクセスモードでキャッシュメモリを動作させ、第2回目以降のアクセスでは唯一アクセスモードで動作させることが記載されている。   In the above-mentioned Patent Document 1, an example in which all access mode and only access mode are selected is described only in the case of burst access such as continuous reading. That is, Patent Document 1 describes that in the case of burst access, the cache memory is operated in the entire access mode in the first access, and the only access mode is operated in the second and subsequent accesses.

しかしながら、二つのアクセスモードの選択が必要となるのは、バーストアクセスにおける第1回目のアクセスと第2回目以降のアクセスとに限らない。   However, the selection of the two access modes is not limited to the first access and the second and subsequent accesses in burst access.

例えば、複数のキャッシュシステムが搭載されている半導体装置において、一のキャッシュシステムが消費電力優先のアクセスモード(上記第2のアクセスモード)で動作している状況で、他のキャッシュシステムから高速な処理を要するアクセス要求があった場合は、高速動作優先のアクセスモード(上記第1のアクセスモード)に切り替えて、他のキャッシュシステムからのアクセス要求に対する処理を早急に開始することが望ましい。   For example, in a semiconductor device equipped with a plurality of cache systems, high-speed processing from other cache systems in a situation where one cache system is operating in the power consumption priority access mode (second access mode). If there is an access request that requires a high-speed operation, it is desirable to switch to the access mode prioritizing high-speed operation (the first access mode) and to immediately start processing for access requests from other cache systems.

また、スヌープ処理やライトバック処理等に起因して、キャッシュシステムが新たなアクセス要求を受け付けることができない状態になった場合は、パイプライン処理の後段の処理が詰まるために複数の命令間にレジスタ依存性が生じやすくなり、その結果、性能の低下を引き起こす可能性が高くなる。従って、このような状態になった場合には、高速動作優先のアクセスモードでキャッシュメモリを動作させることが望ましい。   Also, if the cache system becomes unable to accept a new access request due to snoop processing, write back processing, etc., the processing at the later stage of pipeline processing is clogged, so that the register between multiple instructions Dependencies are likely to occur, and as a result, there is a high possibility of causing a decrease in performance. Therefore, in such a state, it is desirable to operate the cache memory in an access mode that prioritizes high-speed operation.

また、キャッシュシステムが複数のアクセス要求を同時に受けた場合、優先度の高いアクセス要求に対する処理が終了するまで、優先度の低いアクセス要求に対する処理の実行開始が待たされることとなるため、性能の低下を引き起こす。従って、複数のアクセス要求を同時に受けた場合には、高速動作優先のアクセスモードでキャッシュメモリを動作させることが望ましい。   In addition, when the cache system receives a plurality of access requests at the same time, the processing start for the low priority access request is waited until the processing for the high priority access request is completed. cause. Therefore, when a plurality of access requests are received at the same time, it is desirable to operate the cache memory in an access mode giving priority to high-speed operation.

また、分岐命令が実行された際、分岐後の処理に高速動作が求められる場合もある。例えば、組み込み用途における割り込み処理は、実時間内で応答が求められることが多い。従って、分岐先アドレスに割り込みルーチンが指定されている場合には、高速動作優先のアクセスモードでキャッシュメモリを動作させることが望ましい。   In addition, when a branch instruction is executed, high-speed operation may be required for processing after branching. For example, an interrupt process in an embedded application often requires a response within real time. Therefore, when an interrupt routine is specified for the branch destination address, it is desirable to operate the cache memory in an access mode that prioritizes high-speed operation.

また、上記特許文献1,2においては、発行される命令の種類によってアクセスモードを切り替えることができない。しかも上記特許文献2においては、プリフェッチ装置を有しない装置には対応できず、また、分岐命令予測器が必要であるために回路規模が増大する。   In Patent Documents 1 and 2, the access mode cannot be switched depending on the type of issued command. Moreover, the above-mentioned Patent Document 2 cannot deal with a device that does not have a prefetch device, and requires a branch instruction predictor, which increases the circuit scale.

また、プロセッサが必要とするデータがキャッシュメモリ内に格納されていない場合には、外部メモリとのデータのやりとりが生じるため、性能低下を引き起こす。しかも、パイプライン処理の後段の処理が詰まるために複数の命令間にレジスタ依存性が生じやすくなり、その結果、さらに性能の低下を引き起こす可能性が高くなる。従って、このような場合には、高速動作優先のアクセスモードでキャッシュメモリを動作させることが望ましい。   In addition, when data required by the processor is not stored in the cache memory, data exchange with the external memory occurs, resulting in performance degradation. In addition, since the subsequent processing of the pipeline processing is clogged, register dependency is likely to occur between a plurality of instructions, and as a result, there is a high possibility that the performance will be further deteriorated. Therefore, in such a case, it is desirable to operate the cache memory in an access mode that prioritizes high-speed operation.

また、詳細は後述するが、消費電力優先のアクセスモードから高速動作優先のアクセスモードに切り替える際に、場合によっては、高速動作を実現できないうえに消費電力の低減も図れないという、不適切な状況が発生し得る。   In addition, as will be described in detail later, when switching from an access mode that prioritizes power consumption to an access mode that prioritizes high-speed operation, in some cases it is not possible to achieve high-speed operation and reduce power consumption. Can occur.

本発明はこれらの問題を解決するために成されたものであり、プロセッサがシステム全体の内部状況を判断することにより、キャッシュシステムが搭載されている半導体装置全体の処理速度を低下させず、しかも可能な限り低消費電力で動作するように、アクセスモードを適切に選択することが可能なキャッシュシステムを得ることを目的とする。   The present invention has been made to solve these problems, and the processor determines the internal state of the entire system so that the processing speed of the entire semiconductor device on which the cache system is mounted is not reduced. An object of the present invention is to obtain a cache system capable of appropriately selecting an access mode so as to operate with as low power consumption as possible.

また、本発明は、プロセッサが実行する命令コードの種類に応じてアクセスモードを適切に選択することが可能なキャッシュシステムを得ることを目的とする。   It is another object of the present invention to provide a cache system that can appropriately select an access mode according to the type of instruction code executed by a processor.

第1の発明によれば、キャッシュシステムは、キャッシュメモリと、キャッシュメモリを制御するキャッシュ制御部と、キャッシュ制御部を介してキャッシュメモリにアクセス可能なプロセッサとを備える。キャッシュメモリには、プロセッサとは異なる機能ブロックからも、キャッシュ制御部を介してアクセス可能であり、プロセッサからキャッシュメモリへのアクセスに関して、キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、第1の速度よりも早い第2の速度、かつ第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、キャッシュ制御部は、機能ブロックからキャッシュメモリへのアクセスの状況に応じて、第1のモードと第2のモードとを切り替える。   According to the first invention, the cache system includes a cache memory, a cache control unit that controls the cache memory, and a processor that can access the cache memory via the cache control unit. The cache memory can be accessed from a functional block different from the processor via the cache control unit, and the cache control unit can switch between each other at a first speed with respect to the access to the cache memory from the processor, and A first mode for accessing at a first power consumption, and a second mode for accessing at a second speed higher than the first speed and at a second power consumption higher than the first power consumption. The cache control unit switches between the first mode and the second mode according to the state of access from the functional block to the cache memory.

第2の発明によれば、キャッシュシステムは、キャッシュメモリと、キャッシュメモリを制御するキャッシュ制御部と、キャッシュ制御部を介してキャッシュメモリにアクセス可能なプロセッサとを備える。プロセッサからキャッシュメモリへのアクセスに関して、キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、第1の速度よりも早い第2の速度、かつ第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、キャッシュ制御部は、プロセッサからキャッシュメモリへのアクセス要求を受け付けることができるか否かに応じて、第1のモードと第2のモードとを切り替える。   According to the second invention, the cache system includes a cache memory, a cache control unit that controls the cache memory, and a processor that can access the cache memory via the cache control unit. Regarding the access from the processor to the cache memory, the cache control unit can switch between the first mode and the first mode for accessing at the first power consumption and the second speed that is faster than the first speed. And whether or not the cache control unit can accept an access request to the cache memory from the processor, and has a second mode of accessing with a second power consumption higher than the first power consumption. The first mode and the second mode are switched according to the above.

第3の発明によれば、キャッシュシステムは、キャッシュメモリと、キャッシュメモリを制御するキャッシュ制御部と、キャッシュ制御部を介してキャッシュメモリにアクセス可能なプロセッサとを備える。キャッシュメモリには、プロセッサとは異なる機能ブロックからも、キャッシュ制御部を介してアクセス可能であり、プロセッサ及び機能ブロックからキャッシュメモリへの各アクセスに関して、キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、第1の速度よりも早い第2の速度、かつ第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、キャッシュ制御部は、プロセッサからキャッシュメモリへのアクセス要求と、機能ブロックからキャッシュメモリへのアクセス要求とを重複して受けた場合、プロセッサ及び機能ブロックからキャッシュメモリへの各アクセスを、いずれも第2のモードで実行する。   According to the third invention, the cache system includes a cache memory, a cache control unit that controls the cache memory, and a processor that can access the cache memory via the cache control unit. The cache memory can be accessed from a functional block different from the processor via the cache control unit, and each access to the cache memory from the processor and the functional block can be switched to each other. A first mode that is accessed at a first speed and a second power consumption that is higher than the first speed and a second power that is higher than the first power consumption. When the cache control unit receives an access request from the processor to the cache memory and an access request from the functional block to the cache memory in duplicate, the cache control unit transfers the cache memory from the processor and the functional block to the cache memory. Each access is executed in the second mode.

第4の発明によれば、キャッシュシステムは、キャッシュメモリと、キャッシュメモリを制御するキャッシュ制御部と、キャッシュ制御部を介してキャッシュメモリにアクセス可能なプロセッサとを備える。プロセッサからキャッシュメモリへのアクセスに関して、キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、第1の速度よりも早い第2の速度、かつ第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、キャッシュ制御部は、分岐命令の実行に基づくプロセッサからキャッシュメモリへのアクセスが、キャッシュメモリからの特定の分岐先データの読み出しである場合、プロセッサからキャッシュメモリへのアクセスを第2のモードで実行する。   According to the fourth invention, a cache system includes a cache memory, a cache control unit that controls the cache memory, and a processor that can access the cache memory via the cache control unit. Regarding the access from the processor to the cache memory, the cache control unit can switch between the first mode and the first mode for accessing at the first power consumption and the second speed that is faster than the first speed. And a second mode for accessing with a second power consumption higher than the first power consumption, and the cache control unit is configured to allow the processor to access the cache memory based on the execution of the branch instruction. In the case of reading specific branch destination data from the memory, the processor accesses the cache memory in the second mode.

第5の発明によれば、キャッシュシステムは、キャッシュメモリと、キャッシュメモリを制御するキャッシュ制御部と、キャッシュ制御部を介してキャッシュメモリにアクセス可能なプロセッサとを備える。プロセッサからキャッシュメモリへのアクセスに関して、キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、第1の速度よりも早い第2の速度、かつ第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、キャッシュ制御部は、プロセッサによってフェッチされた命令コード又は該命令コードのデコード結果を判定することにより、プロセッサからキャッシュメモリへのアクセスを第1のモード又は第2のモードで実行する。   According to the fifth invention, the cache system includes a cache memory, a cache control unit that controls the cache memory, and a processor that can access the cache memory via the cache control unit. Regarding the access from the processor to the cache memory, the cache control unit can switch between the first mode and the first mode for accessing at the first power consumption and the second speed that is faster than the first speed. And a second mode for accessing with a second power consumption higher than the first power consumption, and the cache control unit determines an instruction code fetched by the processor or a decoding result of the instruction code As a result, the processor accesses the cache memory in the first mode or the second mode.

第6の発明によれば、キャッシュシステムは、キャッシュメモリと、キャッシュメモリを制御するキャッシュ制御部と、キャッシュ制御部を介してキャッシュメモリにアクセス可能なプロセッサとを備える。プロセッサからキャッシュメモリへのアクセスに関して、キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、第1の速度よりも早い第2の速度、かつ第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、キャッシュ制御部は、プロセッサからキャッシュメモリへアクセスされたが、プロセッサが必要とするデータがキャッシュメモリ内に格納されていない場合、プロセッサからキャッシュメモリへの次回のアクセスを第2のモードで実行する。   According to the sixth invention, a cache system includes a cache memory, a cache control unit that controls the cache memory, and a processor that can access the cache memory via the cache control unit. Regarding the access from the processor to the cache memory, the cache control unit can switch between the first mode and the first mode for accessing at the first power consumption and the second speed that is faster than the first speed. And the second mode for accessing with a second power consumption higher than the first power consumption, and the cache control unit accesses the cache memory from the processor, but the data required by the processor Is not stored in the cache memory, the next access from the processor to the cache memory is executed in the second mode.

第7の発明によれば、キャッシュシステムは、キャッシュメモリと、キャッシュメモリを制御するキャッシュ制御部と、キャッシュ制御部を介してキャッシュメモリにアクセス可能なプロセッサとを備える。プロセッサからキャッシュメモリへのアクセスに関して、キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、第1の速度よりも早い第2の速度、かつ第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、キャッシュ制御部は、第1のモードでのアクセス要求に連続して第2のモードでのアクセス要求が発生したことに起因して、第1のモードでアクセスする第1のアクセス期間の一部に第2のモードでアクセスする第2のアクセス期間が重複することとなる場合、第2のアクセス期間におけるアクセスを第1のモードに変更する。   According to the seventh invention, a cache system includes a cache memory, a cache control unit that controls the cache memory, and a processor that can access the cache memory via the cache control unit. Regarding the access from the processor to the cache memory, the cache control unit can switch between the first mode and the first mode for accessing at the first power consumption and the second speed that is faster than the first speed. And a second mode for accessing with a second power consumption higher than the first power consumption, and the cache control unit continues to the second mode following the access request in the first mode. If the second access period accessed in the second mode overlaps with a part of the first access period accessed in the first mode due to the occurrence of the access request in The access in the second access period is changed to the first mode.

第1〜第7の発明によれば、キャッシュシステムが搭載されている半導体装置全体の処理速度を低下させず、しかも可能な限り低消費電力でキャッシュメモリを動作させることが可能となる。   According to the first to seventh inventions, the cache memory can be operated with as low power consumption as possible without reducing the processing speed of the entire semiconductor device on which the cache system is mounted.

特に第5の発明によれば、プロセッサが実行する命令コードの種類に応じてアクセスモードを適切に選択することが可能となる。   In particular, according to the fifth aspect, the access mode can be appropriately selected according to the type of instruction code executed by the processor.

実施の形態1.
図1は、本発明の実施の形態1に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。図1に示すように、半導体装置は、CPU(プロセッサ)1と、CPU1とは異なる機能ブロック(本実施の形態1の例ではCPU80)と、キャッシュ部100と、バス調停回路60と、外部バス3と、外部メモリ70とを備えている。キャッシュ部100は、キャッシュ制御部2と、キャッシュメモリ50とを有している。キャッシュ制御部2は、キャッシュメモリ50の動作を制御する。CPU1は、キャッシュ制御部2を介してキャッシュメモリ50にアクセス可能である。キャッシュメモリ50には、CPU80からも、キャッシュ制御部2を介してアクセス可能である。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a configuration of a semiconductor device in which a cache system according to Embodiment 1 of the present invention is mounted. As shown in FIG. 1, the semiconductor device includes a CPU (processor) 1, a functional block different from CPU 1 (CPU 80 in the example of the first embodiment), a cache unit 100, a bus arbitration circuit 60, and an external bus. 3 and an external memory 70. The cache unit 100 includes a cache control unit 2 and a cache memory 50. The cache control unit 2 controls the operation of the cache memory 50. The CPU 1 can access the cache memory 50 via the cache control unit 2. The cache memory 50 can also be accessed from the CPU 80 via the cache control unit 2.

CPU1には、キャッシュアクセス受付信号S5及びキャッシュデータレディ信号S6が、キャッシュ制御部2から入力される。また、CPU1には、例えば32ビットの出力データD2が、キャッシュメモリ50から入力される。CPU1は、キャッシュアクセス要求信号S4、及び、例えば27ビットのキャッシュアドレスA2を出力する。   The CPU 1 receives a cache access acceptance signal S5 and a cache data ready signal S6 from the cache control unit 2. For example, 32-bit output data D2 is input from the cache memory 50 to the CPU 1. The CPU 1 outputs a cache access request signal S4 and, for example, a 27-bit cache address A2.

キャッシュ制御部2には、キャッシュアクセス要求信号S4及びキャッシュアドレスA2が、CPU1から入力される。また、キャッシュ制御部2には、スヌープ要求信号S1、及び、例えば27ビットのスヌープアドレスA1が、CPU80から入力される。また、キャッシュ制御部2には、出力データD2及びMiss信号S11が、キャッシュメモリ50から入力される。また、キャッシュ制御部2には、バスアクセス受付信号S8が、バス調停回路60から入力される。キャッシュ制御部2は、キャッシュアクセス受付信号S5、キャッシュデータレディ信号S6、スヌープ要求受付信号S2、スヌープデータレディ信号S3、バスアクセス要求信号S7、例えば128ビットのライトバックデータD1、タグイネーブル信号S9、例えば27ビットのアクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10を出力する。   A cache access request signal S4 and a cache address A2 are input from the CPU 1 to the cache control unit 2. Further, the snoop request signal S1 and, for example, a 27-bit snoop address A1 are input from the CPU 80 to the cache control unit 2. Further, the output data D 2 and the Miss signal S 11 are input from the cache memory 50 to the cache control unit 2. The cache control unit 2 also receives a bus access acceptance signal S8 from the bus arbitration circuit 60. The cache control unit 2 includes a cache access acceptance signal S5, a cache data ready signal S6, a snoop request acceptance signal S2, a snoop data ready signal S3, a bus access request signal S7, for example, 128-bit write back data D1, a tag enable signal S9, For example, a 27-bit access address A3 and a cache access mode switching signal S10 are output.

CPU80には、スヌープ要求受付信号S2及びスヌープデータレディ信号S3が、キャッシュ制御部2から入力される。また、CPU80には、出力データD2が、キャッシュメモリ50から入力される。CPU80は、スヌープ要求信号S1及びスヌープアドレスA1を出力する。   The CPU 80 receives a snoop request acceptance signal S2 and a snoop data ready signal S3 from the cache control unit 2. Further, the CPU 80 receives output data D2 from the cache memory 50. The CPU 80 outputs a snoop request signal S1 and a snoop address A1.

キャッシュメモリ50には、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10が、キャッシュ制御部2から入力される。キャッシュメモリ50は、Miss信号S11及び出力データD2を出力する。   A tag enable signal S9, an access address A3, and a cache access mode switching signal S10 are input from the cache control unit 2 to the cache memory 50. The cache memory 50 outputs a Miss signal S11 and output data D2.

バス調停回路60には、バスアクセス要求信号S7が、キャッシュ制御部2から入力される。バス調停回路60は、バスアクセス受付信号S8を出力する。   A bus access request signal S 7 is input from the cache control unit 2 to the bus arbitration circuit 60. The bus arbitration circuit 60 outputs a bus access acceptance signal S8.

外部メモリ70には、ライトバックデータD1が、キャッシュ制御部2から外部バス3を介して入力される。   Write-back data D1 is input from the cache control unit 2 to the external memory 70 via the external bus 3.

CPU1は、キャッシュメモリ50内に格納されているデータを読み出す場合、キャッシュアクセス要求信号S4及びキャッシュアドレスA2を出力する。キャッシュアクセス要求信号S4及びキャッシュアドレスA2は、キャッシュ制御部2に入力される。   When reading data stored in the cache memory 50, the CPU 1 outputs a cache access request signal S4 and a cache address A2. The cache access request signal S4 and the cache address A2 are input to the cache control unit 2.

キャッシュ制御部2は、同一のサイクル期間内にキャッシュメモリ50への複数のアクセス要求があった場合、それらを調停する機能を有する。かかる調停機能は周知であるため、詳細な説明は省略する。   When there are a plurality of access requests to the cache memory 50 within the same cycle period, the cache control unit 2 has a function of arbitrating them. Since such an arbitration function is well known, detailed description is omitted.

キャッシュ制御部2は、キャッシュアクセス要求信号S4を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、キャッシュアクセス受付信号S5と、タグイネーブル信号S9と、キャッシュアドレスA2に基づきアクセスアドレスA3とを出力する。キャッシュアクセス受付信号S5は、CPU1に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 2 receives the cache access request signal S4, if the cache memory 50 is in an accessible state, the cache control unit 2 outputs the cache access acceptance signal S5, the tag enable signal S9, and the access address A3 based on the cache address A2. Output. The cache access acceptance signal S5 is input to the CPU1. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU80は、キャッシュメモリ50内に格納されているデータを読み出す場合、スヌープ要求信号S1及びスヌープアドレスA1を出力する。スヌープ要求信号S1及びスヌープアドレスA1は、キャッシュ制御部2に入力される。   When reading data stored in the cache memory 50, the CPU 80 outputs a snoop request signal S1 and a snoop address A1. The snoop request signal S1 and the snoop address A1 are input to the cache control unit 2.

キャッシュ制御部2は、スヌープ要求信号S1を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、スヌープ要求受付信号S2と、タグイネーブル信号S9と、スヌープアドレスA1に基づきアクセスアドレスA3とを出力する。スヌープ要求受付信号S2は、CPU80に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 2 receives the snoop request signal S1, if the cache memory 50 is in an accessible state, the cache control unit 2 outputs the snoop request reception signal S2, the tag enable signal S9, and the access address A3 based on the snoop address A1. To do. The snoop request acceptance signal S2 is input to the CPU 80. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU1及びCPU80からキャッシュメモリ50への各アクセスに関して、キャッシュ制御部2は、第1の速度、かつ第1の消費電力でアクセスするモード(以下「2サイクルアクセスモード」と称する)と、第1の速度よりも早い第2の速度、かつ第1の消費電力よりも高い第2の消費電力でアクセスするモード(本明細書において「1サイクルアクセスモード」)とを有している。   For each access from the CPU 1 and the CPU 80 to the cache memory 50, the cache control unit 2 has a first speed and a first power consumption mode (hereinafter referred to as “two-cycle access mode”), a first And a mode of accessing at a second speed higher than the speed and a second power consumption higher than the first power consumption (“one-cycle access mode” in this specification).

キャッシュ制御部2は、CPU80からキャッシュメモリ50へのアクセスの状況に応じて、2サイクルアクセスモードと1サイクルアクセスモードとを切り替える。具体的に、キャッシュ制御部2は、スヌープ要求信号S1がアサートされている「H(High)」期間、「H」レベルのキャッシュアクセスモード切替信号S10を出力し、それ以外の期間では、「L(Low)」レベルのキャッシュアクセスモード切替信号S10を出力する。キャッシュアクセスモード切替信号S10は、キャッシュメモリ50に入力される。キャッシュアクセスモード切替信号S10が「H」レベルの場合は1サイクルアクセスモードであり、キャッシュアクセスモード切替信号S10が「L」レベルの場合は2サイクルアクセスモードである。   The cache control unit 2 switches between the 2-cycle access mode and the 1-cycle access mode according to the status of access from the CPU 80 to the cache memory 50. Specifically, the cache control unit 2 outputs the cache access mode switching signal S10 of “H” level during the “H (High)” period in which the snoop request signal S1 is asserted, and “L” during other periods. (Low) "level cache access mode switching signal S10 is output. The cache access mode switching signal S10 is input to the cache memory 50. When the cache access mode switching signal S10 is at "H" level, the one cycle access mode is selected, and when the cache access mode switching signal S10 is at "L" level, the two cycle access mode is selected.

あるいは、キャッシュ制御部2は、スヌープ要求信号S1に基づくキャッシュアクセスの場合は、「H」レベルのキャッシュアクセスモード切替信号S10を出力し、一方、キャッシュアクセス要求信号S4に基づくキャッシュアクセスの場合は、「L」レベルのキャッシュアクセスモード切替信号S10を出力してもよい。   Alternatively, the cache control unit 2 outputs an “H” level cache access mode switching signal S10 in the case of cache access based on the snoop request signal S1, while in the case of cache access based on the cache access request signal S4, The “L” level cache access mode switching signal S10 may be output.

キャッシュメモリ50は、タグイネーブル信号S9を受け付けると、アクセスアドレスA3及びキャッシュアクセスモード切替信号S10に基づいて、データの読み出し処理を開始し、Miss信号S11及び出力データD2を出力する。   When the cache memory 50 receives the tag enable signal S9, the cache memory 50 starts data read processing based on the access address A3 and the cache access mode switching signal S10, and outputs the Miss signal S11 and the output data D2.

キャッシュアクセス要求信号S4に基づくキャッシュアクセスである場合、キャッシュ制御部2は、CPU1が必要とするデータがキャッシュメモリ50内に格納されていることをMiss信号S11に基づいて判別すると、出力データD2の出力タイミングに同期してキャッシュデータレディ信号S6を出力する。キャッシュデータレディ信号S6は、CPU1に入力される。   When the cache access is based on the cache access request signal S4, the cache control unit 2 determines that the data required by the CPU 1 is stored in the cache memory 50 based on the Miss signal S11. A cache data ready signal S6 is output in synchronization with the output timing. The cache data ready signal S6 is input to the CPU1.

スヌープ要求信号S1に基づくキャッシュアクセスである場合、キャッシュ制御部2は、CPU80が必要とするデータがキャッシュメモリ50内に格納されていることをMiss信号S11に基づいて判別すると、出力データD2の出力タイミングに同期してスヌープデータレディ信号S3を出力する。スヌープデータレディ信号S3は、CPU80に入力される。   When the cache access is based on the snoop request signal S1, the cache control unit 2 determines that the data required by the CPU 80 is stored in the cache memory 50 based on the Miss signal S11, and outputs the output data D2. A snoop data ready signal S3 is output in synchronization with the timing. The snoop data ready signal S3 is input to the CPU 80.

キャッシュメモリ50から読み出した出力データD2を外部メモリ70に書き戻す場合、キャッシュ制御部2は、バスアクセス要求信号S7を出力する。バスアクセス要求信号S7は、バス調停回路60に入力される。バス調停回路60は、外部メモリ70に接続されている外部バス3が使用可能である場合は、バスアクセス受付信号S8を出力する。バスアクセス受付信号S8は、キャッシュ制御部2に入力される。キャッシュ制御部2は、バスアクセス受付信号S8を受け付けると、ライトバックデータD1を出力する。ライトバックデータD1は、外部バス3を介して外部メモリ70に入力される。   When the output data D2 read from the cache memory 50 is written back to the external memory 70, the cache control unit 2 outputs a bus access request signal S7. The bus access request signal S7 is input to the bus arbitration circuit 60. The bus arbitration circuit 60 outputs a bus access acceptance signal S8 when the external bus 3 connected to the external memory 70 is usable. The bus access acceptance signal S8 is input to the cache control unit 2. When the cache control unit 2 receives the bus access acceptance signal S8, the cache control unit 2 outputs the write back data D1. The write back data D1 is input to the external memory 70 via the external bus 3.

図2,3は、キャッシュ制御部2の構成の一部をそれぞれ示すブロック図である。図2を参照して、キャッシュ制御部2は、切替信号生成回路2aを有している。切替信号生成回路2aは、スヌープ要求信号S1を、キャッシュアクセスモード切替信号S10として出力する。   2 and 3 are block diagrams respectively showing a part of the configuration of the cache control unit 2. Referring to FIG. 2, the cache control unit 2 includes a switching signal generation circuit 2a. The switching signal generation circuit 2a outputs the snoop request signal S1 as the cache access mode switching signal S10.

あるいは、図3に示すように、キャッシュ制御部2は、切替信号生成回路2bを有している。切替信号生成回路2bは、スヌープ要求受付信号S2を、キャッシュアクセスモード切替信号S10として出力する。   Alternatively, as shown in FIG. 3, the cache control unit 2 includes a switching signal generation circuit 2b. The switching signal generation circuit 2b outputs the snoop request acceptance signal S2 as the cache access mode switching signal S10.

図4は、キャッシュメモリ50の具体的な構成を示すブロック図である。キャッシュメモリ50は、2ウェイ・セット・アソシアティブ方式の構成を有している。キャッシュメモリ50は、タグメモリ101と、ラッチ回路106と、比較器92a,92bと、ミス判定装置103と、キャッシュアクセスモード切替装置109と、データメモリ104と、セレクタ105,111と、フリップフロップ110とを有している。   FIG. 4 is a block diagram showing a specific configuration of the cache memory 50. The cache memory 50 has a 2-way set associative configuration. The cache memory 50 includes a tag memory 101, a latch circuit 106, comparators 92a and 92b, a miss determination device 103, a cache access mode switching device 109, a data memory 104, selectors 105 and 111, and a flip-flop 110. And have.

タグメモリ101は、アドレスメモリであって、いずれもアドレスアレイであるタグWay0とタグWay1とを含んでいる。タグWay0及びタグWay1は、それぞれインデックスアドレスに対応させてタグアドレスを記憶している。   The tag memory 101 is an address memory, and includes a tag Way0 and a tag Way1 that are both address arrays. The tag Way0 and the tag Way1 each store a tag address corresponding to the index address.

タグWay0及びタグWay1には、図1に示したアクセスアドレスA3の下位部であるインデックスアドレスA3b(例えば8ビット)がそれぞれ入力される。タグWay0及びタグWay1は、入力されたインデックスアドレスA3bに対応するタグアドレス(例えば17ビット)をそれぞれ出力する。   An index address A3b (for example, 8 bits) which is a lower part of the access address A3 shown in FIG. 1 is input to the tag Way0 and the tag Way1. The tag Way0 and the tag Way1 each output a tag address (for example, 17 bits) corresponding to the input index address A3b.

インデックスアドレスA3bによって特定されるタグWay0のタグアドレスは、同一のインデックスアドレスA3bによって特定されるデータWay0(後述)のデータに関するアドレスである。同様に、インデックスアドレスA3bによって特定されるタグWay1のタグアドレスは、同一のインデックスアドレスA3bによって特定されるデータWay1(後述)のデータに関するアドレスである。   The tag address of the tag Way0 specified by the index address A3b is an address related to data of data Way0 (described later) specified by the same index address A3b. Similarly, the tag address of the tag Way1 specified by the index address A3b is an address related to data of data Way1 (described later) specified by the same index address A3b.

タグWay0及びタグWay1には、タグイネーブル信号S9がそれぞれ入力される。タグWay0及びタグWay1は、タグイネーブル信号S9が「H」レベルの場合には動作し、タグイネーブル信号S9が「L」レベルの場合には動作しない。   A tag enable signal S9 is input to each of the tag Way0 and the tag Way1. The tag Way0 and the tag Way1 operate when the tag enable signal S9 is at “H” level, and do not operate when the tag enable signal S9 is at “L” level.

比較器92a,92bには、図1に示したアクセスアドレスA3の上位部であるタグアドレスA3a(例えば17ビット)が、ラッチ回路106を介してそれぞれ入力される。ラッチ回路106は、入力されたタグアドレスA3aを1/2サイクル期間遅延させて出力する。   A tag address A3a (for example, 17 bits), which is the upper part of the access address A3 shown in FIG. 1, is input to the comparators 92a and 92b via the latch circuit 106, respectively. The latch circuit 106 outputs the input tag address A3a with a delay of ½ cycle.

比較器92aは、タグWay0から入力されたタグアドレスと、ラッチ回路106から入力されたタグアドレスA3aとを比較する。そして、比較器92aは、両者が一致している場合、つまり、指定されたアドレスのデータがデータWay0に存在している場合(即ちヒットの場合)には、「H」レベルのTag hit Way0信号S20を出力する。一方、両者が一致していない場合、つまり、指定されたアドレスのデータがデータWay0に存在していない場合(即ちミスヒットの場合)には、「L」レベルのTag hit Way0信号S20を出力する。Tag hit Way0信号S20は、ミス判定装置103及びキャッシュアクセスモード切替装置109に入力される。   The comparator 92a compares the tag address input from the tag Way0 with the tag address A3a input from the latch circuit 106. Then, when the two match, that is, when the data of the designated address exists in the data Way0 (that is, in the case of hit), the comparator 92a outputs the “H” level Tag hit Way0 signal. S20 is output. On the other hand, if the two do not match, that is, if the data at the designated address does not exist in the data Way0 (that is, in the case of a miss hit), the “L” level Tag hit Way0 signal S20 is output. . The Tag hit Way 0 signal S20 is input to the miss determination device 103 and the cache access mode switching device 109.

比較器92bは、タグWay1から入力されたタグアドレスと、ラッチ回路106から入力されたタグアドレスA3aとを比較する。そして、比較器92bは、両者が一致している場合、つまり、指定されたアドレスのデータがデータWay1に存在している場合(即ちヒットの場合)には、「H」レベルのTag hit Way1信号S21を出力する。一方、両者が一致していない場合、つまり、指定されたアドレスのデータがデータWay1に存在していない場合(即ちミスヒットの場合)には、「L」レベルのTag hit Way1信号S21を出力する。Tag hit Way1信号S21は、ミス判定装置103及びキャッシュアクセスモード切替装置109に入力される。   The comparator 92b compares the tag address input from the tag Way1 with the tag address A3a input from the latch circuit 106. Then, when the two match, that is, when the data at the designated address exists in the data Way1 (that is, in the case of a hit), the comparator 92b outputs an “H” level Tag hit Way1 signal. S21 is output. On the other hand, if the two do not match, that is, if the data at the designated address does not exist in the data Way1 (that is, in the case of a miss hit), an “L” level Tag hit Way1 signal S21 is output. . The Tag hit Way1 signal S21 is input to the miss determination device 103 and the cache access mode switching device 109.

ミス判定装置103は、Tag hit Way0信号S20及びTag hit Way1信号S21がいずれも「L」レベルである場合は、指定されたアドレスのデータがデータWay0内にもデータWay1内にも存在していないことを示す内容のMiss信号S11を出力する。   When both the tag hit way 0 signal S20 and the tag hit way 1 signal S21 are at the “L” level, the miss determination device 103 has no data at the designated address in the data Way 0 or the data Way 1. A Miss signal S11 having a content indicating that is output.

データメモリ104は、いずれもデータアレイであるデータWay0とデータWay1とを含んでいる。データWay0及びデータWay1は、それぞれインデックスアドレスに対応させてデータを記憶している。なお、本明細書において、「データ」という用語には、命令コード及びオペランドデータの双方が含まれるものとする。   The data memory 104 includes data Way0 and data Way1, which are data arrays. Data Way0 and Data Way1 store data in association with index addresses, respectively. In this specification, the term “data” includes both an instruction code and operand data.

データWay0内に記憶されているデータは、インデックスアドレスA3bを下位アドレスとし、同一のインデックスアドレスA3bに対応させてタグWay0内に記憶されているタグアドレスを上位アドレスとするデータである。同様に、データWay1内に記憶されているデータは、インデックスアドレスA3bを下位アドレスとし、同一のインデックスアドレスA3bに対応させてタグWay1内に記憶されているタグアドレスを上位アドレスとするデータである。   The data stored in the data Way0 is data having the index address A3b as a lower address and the tag address stored in the tag Way0 as an upper address corresponding to the same index address A3b. Similarly, the data stored in the data Way1 is data having the index address A3b as the lower address and the tag address stored in the tag Way1 corresponding to the same index address A3b as the upper address.

フリップフロップ110は、入力されたインデックスアドレスA3bを、1サイクル期間遅延させて出力する。フリップフロップ110の出力は、セレクタ111の第1の入力端子に入力される。   The flip-flop 110 outputs the input index address A3b with a delay of one cycle period. The output of the flip-flop 110 is input to the first input terminal of the selector 111.

セレクタ111の第2の入力端子には、インデックスアドレスA3bが入力される。   The index address A3b is input to the second input terminal of the selector 111.

セレクタ111には、図1に示したキャッシュ制御部2からキャッシュアクセスモード切替信号S10が入力される。セレクタ111は、キャッシュアクセスモード切替信号S10が「L」レベルの場合には第1の入力端子を選択し、「H」レベルの場合には第2の入力端子を選択する。   The selector 111 receives a cache access mode switching signal S10 from the cache control unit 2 shown in FIG. The selector 111 selects the first input terminal when the cache access mode switching signal S10 is at the “L” level, and selects the second input terminal when the cache access mode switching signal S10 is at the “H” level.

データWay0及びデータWay1には、セレクタ111の出力がそれぞれ入力されるとともに、キャッシュアクセスモード切替装置109からWay0 enable信号S22及びWay1 enable信号S23がそれぞれ入力される。   The output of the selector 111 is input to the data Way0 and the data Way1, respectively, and the Way0 enable signal S22 and the Way1 enable signal S23 are input from the cache access mode switching device 109, respectively.

Way0 enable信号S22が「H」レベルの場合には、データWay0は、セレクタ111の出力に対応するデータを出力する。データWay0から出力されたデータは、セレクタ105の第1の入力端子に入力される。Way0 enable信号S22が「L」レベルの場合には、データWay0は動作しない。   When the Way 0 enable signal S 22 is at “H” level, the data Way 0 outputs data corresponding to the output of the selector 111. Data output from the data Way 0 is input to the first input terminal of the selector 105. When the Way0 enable signal S22 is at “L” level, the data Way0 does not operate.

Way1 enable信号S23が「H」レベルの場合には、データWay1は、セレクタ111の出力に対応するデータを出力する。データWay1から出力されたデータは、セレクタ105の第2の入力端子に入力される。Way1 enable信号S23が「L」レベルの場合には、データWay1は動作しない。   When the Way 1 enable signal S 23 is at “H” level, the data Way 1 outputs data corresponding to the output of the selector 111. Data output from the data Way 1 is input to the second input terminal of the selector 105. When the Way1 enable signal S23 is at “L” level, the data Way1 does not operate.

セレクタ105には、キャッシュアクセスモード切替装置109からWay select信号S24が入力される。セレクタ105は、Way select信号S24が「L」レベルの場合には第1の入力端子を選択し、「H」レベルの場合には第2の入力端子を選択する。   The selector 105 receives the way select signal S24 from the cache access mode switching device 109. The selector 105 selects the first input terminal when the Way select signal S24 is “L” level, and selects the second input terminal when the Way select signal S24 is “H” level.

キャッシュアクセスモード切替装置109には、図1に示したキャッシュ制御部2からキャッシュアクセスモード切替信号S10が入力される。キャッシュアクセスモード切替装置109による切替制御によって、キャッシュアクセスモード切替信号S10が「H」レベルの場合にはキャッシュメモリ50は1サイクルアクセスモードで動作し、キャッシュアクセスモード切替信号S10が「L」レベルの場合にはキャッシュメモリ50は2サイクルアクセスモードで動作する。   The cache access mode switching device 109 receives a cache access mode switching signal S10 from the cache control unit 2 shown in FIG. When the cache access mode switching signal S10 is at “H” level by the switching control by the cache access mode switching device 109, the cache memory 50 operates in the one-cycle access mode, and the cache access mode switching signal S10 is at “L” level. In some cases, the cache memory 50 operates in the 2-cycle access mode.

図5は、キャッシュアクセスモード切替装置109の具体的な構成を示すブロック図である。キャッシュアクセスモード切替装置109は、ラッチ回路910,911,920,921と、セレクタ930,931,94とを有している。   FIG. 5 is a block diagram showing a specific configuration of the cache access mode switching device 109. The cache access mode switching device 109 has latch circuits 910, 911, 920, 921 and selectors 930, 931, 94.

ラッチ回路910には、図4に示した比較器92aからTag hit Way0信号S20が入力される。ラッチ回路910は、入力されたTag hit Way0信号S20を、1/2サイクル期間遅延させて出力する。ラッチ回路910から出力されたTag hit Way0信号S20は、セレクタ930の第1の入力端子に入力される。   To the latch circuit 910, the Tag hit Way 0 signal S20 is input from the comparator 92a shown in FIG. The latch circuit 910 outputs the inputted Tag hit Way 0 signal S20 with a delay of ½ cycle period. The Tag hit Way 0 signal S20 output from the latch circuit 910 is input to the first input terminal of the selector 930.

ラッチ回路911には、図4に示した比較器92bからTag hit Way1信号S21が入力される。ラッチ回路911は、入力されたTag hit Way1信号S21を、1/2サイクル期間遅延させて出力する。ラッチ回路911から出力されたTag hit Way1信号S21は、セレクタ931の第1の入力端子に入力される。   To the latch circuit 911, the Tag hit Way1 signal S21 is input from the comparator 92b shown in FIG. The latch circuit 911 delays the input Tag hit Way1 signal S21 by a ½ cycle period and outputs the delayed signal. The Tag hit Way1 signal S21 output from the latch circuit 911 is input to the first input terminal of the selector 931.

セレクタ930,931の各第2の入力端子には、「H」レベルを与える電源電位がそれぞれ入力されている。また、セレクタ930,931には、図1に示したキャッシュ制御部2からキャッシュアクセスモード切替信号S10が入力される。   A power supply potential giving an “H” level is input to each of the second input terminals of the selectors 930 and 931. Further, the cache access mode switching signal S10 is input to the selectors 930 and 931 from the cache control unit 2 shown in FIG.

キャッシュアクセスモード切替信号S10が「H」レベルの場合、セレクタ930は、Way0 enable信号S22として、「H」レベルの信号を出力する。従って、1サイクルアクセスモード時には、1サイクル期間を使ってキャッシュメモリ50からデータが出力される。   When the cache access mode switching signal S10 is at “H” level, the selector 930 outputs an “H” level signal as the Way0 enable signal S22. Accordingly, in the one cycle access mode, data is output from the cache memory 50 using one cycle period.

一方、キャッシュアクセスモード切替信号S10が「L」レベルの場合、セレクタ930は、Way0 enable信号S22として、ラッチ回路910から入力されたTag hit Way0信号S20を出力する。セレクタ930に入力されるTag hit Way0信号S20は、図4に示した比較器92aから出力されたTag hit Way0信号S20よりも、ラッチ回路910によって1/2サイクル期間遅延されている。従って、データWay0が動作するサイクル期間は、タグWay0が動作するサイクル期間よりも1サイクル期間後となる。従って、2サイクルアクセスモード時には、2サイクル期間を使ってキャッシュメモリ50からデータが出力される。   On the other hand, when the cache access mode switching signal S10 is at "L" level, the selector 930 outputs the Tag hit Way0 signal S20 input from the latch circuit 910 as the Way0 enable signal S22. The Tag hit Way 0 signal S20 input to the selector 930 is delayed by a half cycle period by the latch circuit 910 than the Tag hit Way 0 signal S20 output from the comparator 92a shown in FIG. Therefore, the cycle period in which the data Way0 operates is one cycle period after the cycle period in which the tag Way0 operates. Accordingly, in the 2-cycle access mode, data is output from the cache memory 50 using a 2-cycle period.

キャッシュアクセスモード切替信号S10が「H」レベルの場合、セレクタ931は、Way1 enable信号S23として、「H」レベルの信号を出力する。従って、1サイクルアクセスモード時には、1サイクル期間を使ってキャッシュメモリ50からデータが出力される。   When the cache access mode switching signal S10 is at “H” level, the selector 931 outputs an “H” level signal as the Way1 enable signal S23. Accordingly, in the one cycle access mode, data is output from the cache memory 50 using one cycle period.

一方、キャッシュアクセスモード切替信号S10が「L」レベルの場合、セレクタ931は、Way1 enable信号S23として、ラッチ回路911から入力されたTag hit Way1信号S21を出力する。セレクタ931に入力されるTag hit Way1信号S21は、図4に示した比較器92bから出力されたTag hit Way1信号S21よりも、ラッチ回路911によって1/2サイクル期間遅延されている。従って、データWay1が動作するサイクル期間は、タグWay1が動作するサイクル期間よりも1サイクル期間後となる。従って、2サイクルアクセスモード時には、2サイクル期間を使ってキャッシュメモリ50からデータが出力される。   On the other hand, when the cache access mode switching signal S10 is at “L” level, the selector 931 outputs the Tag hit Way1 signal S21 input from the latch circuit 911 as the Way1 enable signal S23. The Tag hit Way1 signal S21 input to the selector 931 is delayed by a half cycle period by the latch circuit 911 from the Tag hit Way1 signal S21 output from the comparator 92b shown in FIG. Therefore, the cycle period in which the data Way1 operates is one cycle period after the cycle period in which the tag Way1 operates. Accordingly, in the 2-cycle access mode, data is output from the cache memory 50 using a 2-cycle period.

ラッチ回路920は、図1に示したキャッシュ制御部2から入力されたキャッシュアクセスモード切替信号S10を、1/2サイクル期間遅延させて出力する。ラッチ回路920から出力されたキャッシュアクセスモード切替信号S10は、セレクタ94に入力される。   The latch circuit 920 outputs the cache access mode switching signal S10 input from the cache control unit 2 shown in FIG. The cache access mode switching signal S10 output from the latch circuit 920 is input to the selector 94.

ラッチ回路921は、セレクタ931から入力されたWay1 enable信号S23を、1/2サイクル期間遅延させて出力する。ラッチ回路921から出力されたWay1 enable信号S23は、セレクタ94の第1の入力端子に入力される。セレクタ94の第2の入力端子には、図4に示した比較器92bから、Tag hit Way1信号S21が入力される。   The latch circuit 921 delays the Way1 enable signal S23 input from the selector 931 and outputs the delayed signal by a ½ cycle period. The Way1 enable signal S23 output from the latch circuit 921 is input to the first input terminal of the selector 94. A Tag hit Way1 signal S21 is input to the second input terminal of the selector 94 from the comparator 92b shown in FIG.

ラッチ回路920から入力されたキャッシュアクセスモード切替信号S10が「L」レベルの場合には、セレクタ94は、ラッチ回路921から入力されたWay1 enable信号S23を、Way select信号S24として出力する。なぜなら、キャッシュアクセスモード切替信号S10が「L」レベルの場合にデータWay1が選択されるときには、Way1 enable信号S23は、タグメモリ101がアクセスされるサイクル期間の1/2サイクル期間後、つまり、データメモリ104がアクセスされるサイクル期間の1/2サイクル期間前に、「H」レベルとなるからである。   When the cache access mode switching signal S10 input from the latch circuit 920 is at “L” level, the selector 94 outputs the Way1 enable signal S23 input from the latch circuit 921 as the Way select signal S24. This is because, when the data Way1 is selected when the cache access mode switching signal S10 is at the “L” level, the Way1 enable signal S23 is after the ½ cycle period of the cycle period in which the tag memory 101 is accessed, that is, the data This is because it becomes “H” level 1/2 cycle before the cycle in which the memory 104 is accessed.

一方、ラッチ回路920から入力されたキャッシュアクセスモード切替信号S10が「H」レベルの場合には、セレクタ94は、Tag hit Way1信号S21を、Way select信号S24として出力する。なぜなら、キャッシュアクセスモード切替信号S10が「H」レベルの場合にデータWay1が選択されるときには、Tag hit Way1信号S21は、タグメモリ101がアクセスされるサイクル期間と同一であるデータメモリ104がアクセスされるサイクル期間に、「H」レベルとなるからである。   On the other hand, when the cache access mode switching signal S10 input from the latch circuit 920 is at “H” level, the selector 94 outputs the Tag hit Way1 signal S21 as the Way select signal S24. This is because, when the data Way1 is selected when the cache access mode switching signal S10 is at the “H” level, the Tag hit Way1 signal S21 is accessed by the data memory 104 that is the same as the cycle period in which the tag memory 101 is accessed. This is because it becomes “H” level during the cycle period.

図4を参照して、Way select信号S24は、セレクタ105に入力される。Way select信号S24が「L」レベルの場合には、セレクタ105は、データWay0から入力されたデータを選択して、図1に示した出力データD2として出力する。一方、Way select信号S24が「H」レベルの場合には、セレクタ105は、データWay1から入力されたデータを選択して、図1に示した出力データD2として出力する。   With reference to FIG. 4, the Way select signal S <b> 24 is input to the selector 105. When the way select signal S24 is at "L" level, the selector 105 selects the data input from the data Way0 and outputs it as the output data D2 shown in FIG. On the other hand, when the way select signal S24 is at “H” level, the selector 105 selects the data input from the data Way1 and outputs it as the output data D2 shown in FIG.

図6は、2サイクルアクセスモードで動作している場合のキャッシュメモリ50の各部の波形を示したタイミングチャートである。以下、図4,6を参照して、2サイクルアクセスモード時におけるキャッシュメモリ50の動作について詳細に説明する。図6を参照して、2サイクルアクセスモードでは、タグアクセスサイクル及びデータアクセスサイクルの2サイクル期間を使って、キャッシュメモリ50からデータが出力される。   FIG. 6 is a timing chart showing waveforms of respective parts of the cache memory 50 when operating in the 2-cycle access mode. Hereinafter, the operation of the cache memory 50 in the 2-cycle access mode will be described in detail with reference to FIGS. Referring to FIG. 6, in the 2-cycle access mode, data is output from cache memory 50 using a 2-cycle period of a tag access cycle and a data access cycle.

図4,6を参照して、まず、タグアクセスサイクルの前半で、タグメモリ101へのアクセスが実行され、タグWay0及びタグWay1からタグアドレスがそれぞれ出力される。   4 and 6, first, in the first half of the tag access cycle, access to the tag memory 101 is executed, and tag addresses are output from the tag Way0 and the tag Way1, respectively.

次に、比較器92aは、タグWay0から入力されたタグアドレスと、ラッチ回路106から入力されたタグアドレスA3aとを比較し、両者が一致している場合には「H」レベルのTag hit Way0信号S20を出力し、両者が一致していない場合には「L」レベルのTag hit Way0信号S20を出力する。比較器92bは、タグWay1から入力されたタグアドレスと、ラッチ回路106から入力されたタグアドレスA3aとを比較し、両者が一致している場合には「H」レベルのTag hit Way1信号S21を出力し、両者が一致していない場合には「L」レベルのTag hit Way1信号S21を出力する。従って、指定されたアドレスのデータがキャッシュメモリ50内に存在している場合には、Tag hit Way0信号S20及びTag hit Way1信号S21のいずれかが「H」レベルに設定され、一方、指定されたアドレスのデータがキャッシュメモリ50内に存在していない場合には、Tag hit Way0信号S20及びTag hit Way1信号S21の双方が「L」レベルに設定される。   Next, the comparator 92a compares the tag address input from the tag Way0 with the tag address A3a input from the latch circuit 106. If the two match, the “H” level Tag hit Way0. A signal S20 is output, and if they do not match, an “L” level tag hit way 0 signal S20 is output. The comparator 92b compares the tag address input from the tag Way1 with the tag address A3a input from the latch circuit 106. If the two match, the comparator 92b generates the “H” level Tag hit Way1 signal S21. If the two do not match, an “L” level Tag Hit Way 1 signal S21 is output. Therefore, when the data of the designated address exists in the cache memory 50, either the Tag hit Way 0 signal S20 or the Tag hit Way 1 signal S21 is set to the “H” level, while the designated data If the address data does not exist in the cache memory 50, both the Tag hit Way 0 signal S20 and the Tag hit Way 1 signal S21 are set to the “L” level.

次に、タグアクセスサイクルの後半で、Tag hit Way0信号S20が「H」レベルであればWay0 enable信号S22が「H」レベルに設定され、Tag hit Way1信号S21が「H」レベルであればWay1 enable信号S23が「H」レベルに設定される。   Next, in the latter half of the tag access cycle, if the Tag hit Way 0 signal S20 is at “H” level, the Way 0 enable signal S22 is set to “H” level, and if the Tag hit Way 1 signal S21 is at “H” level, Way 1 is set. The enable signal S23 is set to the “H” level.

次に、データアクセスサイクルの前半で、Way0 enable信号S22が「H」レベルであればデータWay0へのアクセスが実行されてデータが出力され、Way1 enable信号S23が「H」レベルであればデータWay1へのアクセスが実行されてデータが出力される。   Next, in the first half of the data access cycle, if the Way0 enable signal S22 is “H” level, access to the data Way0 is executed and data is output, and if the Way1 enable signal S23 is “H” level, the data Way1 Is accessed and data is output.

このように2サイクルアクセスモードでは、タグアクセスサイクルでタグメモリ101へのアクセスが行われ、続くデータアクセスサイクルでデータメモリ104へのアクセスが行われる。データアクセスサイクルにおいては、データWay0及びデータWay1のいずれか一方のみが動作し、他方は動作しないので、データWay0及びデータWay1の双方が動作する場合(1サイクルアクセスモード)と比較すると消費電力が小さい。   As described above, in the two-cycle access mode, the tag memory 101 is accessed in the tag access cycle, and the data memory 104 is accessed in the subsequent data access cycle. In the data access cycle, only one of data Way0 and data Way1 operates, and the other does not operate. Therefore, power consumption is smaller than when both data Way0 and data Way1 operate (one-cycle access mode). .

図7は、1サイクルアクセスモードで動作している場合のキャッシュメモリ50の各部の波形を示したタイミングチャートである。以下、図4,7を参照して、1サイクルアクセスモード時におけるキャッシュメモリ50の動作について詳細に説明する。図7を参照して、1サイクルアクセスモードでは、1サイクル期間であるタグ及びデータアクセスサイクルを使って、キャッシュメモリ50からデータが出力される。   FIG. 7 is a timing chart showing waveforms at various parts of the cache memory 50 when operating in the 1-cycle access mode. Hereinafter, the operation of the cache memory 50 in the one-cycle access mode will be described in detail with reference to FIGS. Referring to FIG. 7, in the 1-cycle access mode, data is output from cache memory 50 using a tag and data access cycle which is a 1-cycle period.

図4,7を参照して、まず、タグ及びデータアクセスサイクルの前半で、タグメモリ101へのアクセスが実行され、タグWay0及びタグWay1からタグアドレスがそれぞれ出力される。   4 and 7, first, in the first half of the tag and data access cycle, access to the tag memory 101 is executed, and tag addresses are output from the tag Way0 and the tag Way1, respectively.

次に、比較器92aは、タグWay0から入力されたタグアドレスと、ラッチ回路106から入力されたタグアドレスA3aとを比較し、両者が一致している場合には「H」レベルのTag hit Way0信号S20を出力し、両者が一致していない場合には「L」レベルのTag hit Way0信号S20を出力する。比較器92bは、タグWay1から入力されたタグアドレスと、ラッチ回路106から入力されたタグアドレスA3aとを比較し、両者が一致している場合には「H」レベルのTag hit Way1信号S21を出力し、両者が一致していない場合には「L」レベルのTag hit Way1信号S21を出力する。従って、指定されたアドレスのデータがキャッシュメモリ50内に存在している場合には、Tag hit Way0信号S20及びTag hit Way1信号S21のいずれかが「H」レベルに設定され、一方、指定されたアドレスのデータがキャッシュメモリ50内に存在していない場合には、Tag hit Way0信号S20及びTag hit Way1信号S21の双方が「L」レベルに設定される。   Next, the comparator 92a compares the tag address input from the tag Way0 with the tag address A3a input from the latch circuit 106. If the two match, the “H” level Tag hit Way0. A signal S20 is output, and if they do not match, an “L” level tag hit way 0 signal S20 is output. The comparator 92b compares the tag address input from the tag Way1 with the tag address A3a input from the latch circuit 106. If the two match, the comparator 92b generates the “H” level Tag hit Way1 signal S21. If the two do not match, an “L” level Tag Hit Way 1 signal S21 is output. Therefore, when the data of the designated address exists in the cache memory 50, either the Tag hit Way 0 signal S20 or the Tag hit Way 1 signal S21 is set to the “H” level, while the designated data If the address data does not exist in the cache memory 50, both the Tag hit Way 0 signal S20 and the Tag hit Way 1 signal S21 are set to the “L” level.

比較器92a,92bによる上記の処理と並行して、同一のサイクル期間において、Way0 enable信号S22及びWay1 enable信号S23がいずれも「H」レベルに設定される。   In parallel with the above-described processing by the comparators 92a and 92b, the Way0 enable signal S22 and the Way1 enable signal S23 are both set to the “H” level in the same cycle period.

次に、タグ及びデータアクセスサイクルの後半で、データWay0及びデータWay1への各アクセスが実行されて、データWay0及びデータWay1からデータがそれぞれ出力される。   Next, in the second half of the tag and data access cycle, each access to the data Way0 and the data Way1 is executed, and data is output from the data Way0 and the data Way1, respectively.

そして、セレクタ105は、Way select信号S24に基づいて、データWay0及びデータWay1からそれぞれ出力されたデータの一方を選択して出力する。   Then, the selector 105 selects and outputs one of the data output from the data Way0 and the data Way1 based on the Way select signal S24.

このように1サイクルアクセスモードでは、1サイクル期間の間にタグメモリ101へのアクセスとデータメモリ104へのアクセスとが実行される。従って、タグメモリ101へのアクセスの後にデータメモリ104へのアクセスが行われる場合(2サイクルアクセスモード)と比較すると、キャッシュメモリ50から早期にデータを出力することができる。   As described above, in the one-cycle access mode, access to the tag memory 101 and access to the data memory 104 are executed during one cycle period. Therefore, data can be output from the cache memory 50 earlier than when the data memory 104 is accessed after the access to the tag memory 101 (two-cycle access mode).

このように本実施の形態1に係るキャッシュシステムによれば、キャッシュ制御部2は、スヌープ要求信号S1がアサートされている「H」期間では「H」レベルのキャッシュアクセスモード切替信号S10を出力することにより、1サイクルアクセスモードに設定する。2サイクルアクセスモードでCPU1がキャッシュメモリ50へアクセスしている状態で、CPU80からキャッシュメモリ50へのアクセス要求が発生した場合、CPU1からのアクセス要求の優先度が高いと、CPU1からのアクセス要求に基づく残りの処理が終了するまで、CPU80からのアクセス要求に基づく処理の開始は待たされることになる。しかしながら、本実施の形態1に係るキャッシュシステムによると、このような場合には、CPU1からキャッシュメモリ50へのアクセスが2サイクルアクセスモードから1サイクルアクセスモードに切り替えられるため、CPU1からのアクセス要求に基づく残りの処理を高速に実行することができる。従って、CPU80からのアクセス要求に基づく処理を早期に開始することができ、結果として、CPU80の性能が低下することを抑制することができる。特に、CPU80が高速動作を優先させている場合に有効となる。   Thus, according to the cache system according to the first embodiment, the cache control unit 2 outputs the cache access mode switching signal S10 at the “H” level during the “H” period when the snoop request signal S1 is asserted. Thus, the one-cycle access mode is set. When an access request from the CPU 80 to the cache memory 50 is generated while the CPU 1 is accessing the cache memory 50 in the two-cycle access mode, if the priority of the access request from the CPU 1 is high, the access request from the CPU 1 Until the remaining processing is completed, the start of processing based on the access request from the CPU 80 is awaited. However, according to the cache system according to the first embodiment, in such a case, the access from the CPU 1 to the cache memory 50 is switched from the 2-cycle access mode to the 1-cycle access mode. The remaining processing can be executed at high speed. Therefore, the process based on the access request from the CPU 80 can be started at an early stage, and as a result, it is possible to suppress the performance of the CPU 80 from being deteriorated. This is particularly effective when the CPU 80 gives priority to high-speed operation.

なお、以上の説明では、CPU1のほかにキャッシュ部100にアクセス可能な素子として、スヌープ処理を実行するCPU80を挙げたが、CPU80以外のCPUであってもよい。また、CPU1のほかにキャッシュ部100にアクセス可能な素子は、CPU80又はCPU80以外のCPUに限らず、どのような機能ブロックであってもよい。後述する全ての実施の形態についても同様である。   In the above description, the CPU 80 that executes the snoop process is described as an element that can access the cache unit 100 in addition to the CPU 1. However, a CPU other than the CPU 80 may be used. In addition to the CPU 1, the elements that can access the cache unit 100 are not limited to the CPU 80 or a CPU other than the CPU 80, and may be any functional block. The same applies to all embodiments described later.

実施の形態2.
図8は、本発明の実施の形態2に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。図8に示した複数の構成要素のうち、上記実施の形態1と同一の構成要素については、図1と同一の参照符号を付している。以下、上記実施の形態1との相違点を中心に説明する。
Embodiment 2. FIG.
FIG. 8 is a block diagram showing a configuration of a semiconductor device in which the cache system according to the second embodiment of the present invention is mounted. Of the plurality of components shown in FIG. 8, the same components as those in the first embodiment are given the same reference numerals as those in FIG. Hereinafter, the difference from the first embodiment will be mainly described.

図8に示すように、半導体装置は、CPU201と、CPU80と、キャッシュ部200と、バス調停回路60と、外部バス3と、外部メモリ70とを備えている。キャッシュ部200は、キャッシュ制御部202と、キャッシュメモリ50とを有している。キャッシュ制御部202は、キャッシュメモリ50の動作を制御する。CPU201は、キャッシュ制御部202を介してキャッシュメモリ50にアクセス可能である。キャッシュメモリ50には、CPU80からも、キャッシュ制御部202を介してアクセス可能である。   As shown in FIG. 8, the semiconductor device includes a CPU 201, a CPU 80, a cache unit 200, a bus arbitration circuit 60, an external bus 3, and an external memory 70. The cache unit 200 includes a cache control unit 202 and a cache memory 50. The cache control unit 202 controls the operation of the cache memory 50. The CPU 201 can access the cache memory 50 via the cache control unit 202. The cache memory 50 can also be accessed from the CPU 80 via the cache control unit 202.

CPU201には、キャッシュアクセス受付信号S5及びキャッシュデータレディ信号S6が、キャッシュ制御部202から入力される。また、CPU201には、出力データD2が、キャッュメモリ50から入力される。CPU201は、キャッシュアクセス要求信号S4及びキャッシュアドレスA2を出力する。   The CPU 201 receives a cache access acceptance signal S5 and a cache data ready signal S6 from the cache control unit 202. Further, output data D <b> 2 is input from the cache memory 50 to the CPU 201. The CPU 201 outputs a cache access request signal S4 and a cache address A2.

キャッシュ制御部202には、キャッシュアクセス要求信号S4及びキャッシュアドレスA2が、CPU201から入力される。また、キャッシュ制御部202には、スヌープ要求信号S1及びスヌープアドレスA1が、CPU80から入力される。また、キャッシュ制御部202には、出力データD2及びMiss信号S11が、キャッシュメモリ50から入力される。また、キャッシュ制御部202には、バスアクセス受付信号S8が、バス調停回路60から入力される。キャッシュ制御部202は、キャッシュアクセス受付信号S5、キャッシュデータレディ信号S6、スヌープ要求受付信号S2、スヌープデータレディ信号S3、バスアクセス要求信号S7、ライトバックデータD1、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10を出力する。   A cache access request signal S4 and a cache address A2 are input from the CPU 201 to the cache control unit 202. Further, the snoop request signal S1 and the snoop address A1 are input from the CPU 80 to the cache control unit 202. Further, the output data D2 and the Miss signal S11 are input from the cache memory 50 to the cache control unit 202. The cache control unit 202 also receives a bus access acceptance signal S8 from the bus arbitration circuit 60. The cache control unit 202 includes a cache access acceptance signal S5, a cache data ready signal S6, a snoop request acceptance signal S2, a snoop data ready signal S3, a bus access request signal S7, a write back data D1, a tag enable signal S9, an access address A3, And the cache access mode switching signal S10 is output.

CPU80には、スヌープ要求受付信号S2及びスヌープデータレディ信号S3が、キャッシュ制御部202から入力される。また、CPU80には、出力データD2が、キャッシュメモリ50から入力される。CPU80は、スヌープ要求信号S1及びスヌープアドレスA1を出力する。   The CPU 80 receives a snoop request acceptance signal S 2 and a snoop data ready signal S 3 from the cache control unit 202. Further, the CPU 80 receives output data D2 from the cache memory 50. The CPU 80 outputs a snoop request signal S1 and a snoop address A1.

キャッシュメモリ50には、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10が、キャッシュ制御部202から入力される。キャッシュメモリ50は、Miss信号S11及び出力データD2を出力する。   A tag enable signal S9, an access address A3, and a cache access mode switching signal S10 are input from the cache control unit 202 to the cache memory 50. The cache memory 50 outputs a Miss signal S11 and output data D2.

CPU201は、キャッシュメモリ50内に格納されているデータを読み出す場合、キャッシュアクセス要求信号S4及びキャッシュアドレスA2を出力する。キャッシュアクセス要求信号S4及びキャッシュアドレスA2は、キャッシュ制御部202に入力される。   When reading data stored in the cache memory 50, the CPU 201 outputs a cache access request signal S4 and a cache address A2. The cache access request signal S4 and the cache address A2 are input to the cache control unit 202.

キャッシュ制御部202は、キャッシュアクセス要求信号S4を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、キャッシュアクセス受付信号S5と、タグイネーブル信号S9と、キャッシュアドレスA2に基づきアクセスアドレスA3とを出力する。キャッシュアクセス受付信号S5は、CPU201に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 202 receives the cache access request signal S4, if the cache memory 50 is in an accessible state, the cache control unit 202 outputs the cache access acceptance signal S5, the tag enable signal S9, and the access address A3 based on the cache address A2. Output. The cache access acceptance signal S5 is input to the CPU 201. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU80は、キャッシュメモリ50内に格納されているデータを読み出す場合、スヌープ要求信号S1及びスヌープアドレスA1を出力する。スヌープ要求信号S1及びスヌープアドレスA1は、キャッシュ制御部202に入力される。   When reading data stored in the cache memory 50, the CPU 80 outputs a snoop request signal S1 and a snoop address A1. The snoop request signal S1 and the snoop address A1 are input to the cache control unit 202.

キャッシュ制御部202は、スヌープ要求信号S1を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、スヌープ要求受付信号S2と、タグイネーブル信号S9と、スヌープアドレスA1に基づきアクセスアドレスA3とを出力する。スヌープ要求受付信号S2は、CPU80に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 202 receives the snoop request signal S1, if the cache memory 50 is accessible, the cache control unit 202 outputs the snoop request reception signal S2, the tag enable signal S9, and the access address A3 based on the snoop address A1. To do. The snoop request acceptance signal S2 is input to the CPU 80. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU201及びCPU80からキャッシュメモリ50への各アクセスに関して、キャッシュ制御部202は、上記実施の形態1と同様の2サイクルアクセスモード及び1サイクルアクセスモードを有している。   For each access from the CPU 201 and the CPU 80 to the cache memory 50, the cache control unit 202 has a two-cycle access mode and a one-cycle access mode similar to those in the first embodiment.

キャッシュ制御部202は、CPU201からキャッシュメモリ50へのアクセス要求を受け付けることができるか否かに応じて、2サイクルアクセスモードと1サイクルアクセスモードとを切り替える。   The cache control unit 202 switches between the 2-cycle access mode and the 1-cycle access mode depending on whether or not an access request to the cache memory 50 can be received from the CPU 201.

具体的に、キャッシュ制御部202は、2サイクルアクセスモードでCPU201がキャッシュメモリ50へアクセスしている状態において、キャッシュミス又はライトバック処理中等の理由により、CPU201からキャッシュメモリ50への新たなアクセス要求を受け付けることができない場合、次回のアクセス又は次回以降のアクセスにおいて、「H」レベルのキャッシュアクセスモード切替信号S10を出力する。即ち、2サイクルアクセスモードを1サイクルアクセスモードに切り替える。   Specifically, when the CPU 201 is accessing the cache memory 50 in the two-cycle access mode, the cache control unit 202 requests a new access request from the CPU 201 to the cache memory 50 due to a cache miss or a write back process. In the next access or subsequent access, the cache access mode switching signal S10 at the “H” level is output. That is, the 2-cycle access mode is switched to the 1-cycle access mode.

あるいは、キャッシュ制御部202は、2サイクルアクセスモードでCPU80がキャッシュメモリ50へアクセスしている状態において、スヌープ処理中等の理由により、CPU201からキャッシュメモリへのアクセス要求を受け付けることができない場合、次回のアクセス又は次回以降のアクセスにおいて、「H」レベルのキャッシュアクセスモード切替信号S10を出力する。即ち、2サイクルアクセスモードを1サイクルアクセスモードに切り替える。   Alternatively, when the CPU 80 is accessing the cache memory 50 in the 2-cycle access mode and the cache control unit 202 cannot accept an access request to the cache memory from the CPU 201 due to a reason such as a snoop process, the next time In an access or subsequent access, an “H” level cache access mode switching signal S10 is output. That is, the 2-cycle access mode is switched to the 1-cycle access mode.

図9は、キャッシュ制御部202の構成の一部を示すブロック図である。キャッシュ制御部202は、状態監視回路10及び切替信号生成回路11を有している。切替信号生成回路11はクリア回路12を有しており、クリア回路12は複数のカウンタ13を含んでいる。   FIG. 9 is a block diagram illustrating a part of the configuration of the cache control unit 202. The cache control unit 202 includes a state monitoring circuit 10 and a switching signal generation circuit 11. The switching signal generation circuit 11 has a clear circuit 12, and the clear circuit 12 includes a plurality of counters 13.

状態監視回路10は、キャッシュメモリ50へのアクセス要求を検出すると、アクセス発生信号S30を出力する。また、状態監視回路10は、キャッシュメモリ50への新たなアクセス要求を受け付けることができない状態になると、キャッシュビジー信号S31を出力する。アクセス発生信号S30及びキャッシュビジー信号S31は、切替信号生成回路11に入力される。   When the status monitoring circuit 10 detects an access request to the cache memory 50, the status monitoring circuit 10 outputs an access generation signal S30. In addition, when the state monitoring circuit 10 cannot accept a new access request to the cache memory 50, the state monitoring circuit 10 outputs a cache busy signal S31. The access generation signal S30 and the cache busy signal S31 are input to the switching signal generation circuit 11.

切替信号生成回路11は、キャッシュビジー信号S31が入力されると、「H」レベルのキャッシュアクセスモード切替信号S10を出力する。これにより、キャッシュメモリ50の動作が1サイクルアクセスモードに設定される。   When the cache busy signal S31 is input, the switching signal generation circuit 11 outputs an “H” level cache access mode switching signal S10. Thereby, the operation of the cache memory 50 is set to the one-cycle access mode.

上記の通り、切替信号生成回路11はクリア回路12を有しており、クリア回路12は複数のカウンタ13を含んでいる。従って、切替信号生成回路11は、キャッシュアクセスモード切替信号S10が「H」レベルに設定されてからのサイクル期間及びアクセス回数を、アクセス発生信号S30及びキャッシュビジー信号S31に基づいて把握することができる。クリア回路12には、上記の次回のアクセスが完了したこと、キャッシュアクセスモード切替信号S10が「H」レベルに設定されてから所定数のサイクル期間が経過したこと、上記の次回以降のアクセスにおいてキャッシュメモリ50へのアクセスが途切れたこと等が、クリア条件として設定されている。クリア回路12は、クリア条件が満たされると、キャッシュアクセスモード切替信号S10を「L」レベルに切り替える。   As described above, the switching signal generation circuit 11 has the clear circuit 12, and the clear circuit 12 includes a plurality of counters 13. Therefore, the switching signal generation circuit 11 can grasp the cycle period and the number of accesses after the cache access mode switching signal S10 is set to the “H” level based on the access generation signal S30 and the cache busy signal S31. . The clear circuit 12 is notified of the completion of the next access, the fact that a predetermined number of cycle periods have elapsed since the cache access mode switching signal S10 was set to the “H” level, and the cache for the subsequent and subsequent accesses. The fact that access to the memory 50 is interrupted is set as a clear condition. When the clear condition is satisfied, the clear circuit 12 switches the cache access mode switching signal S10 to “L” level.

このように本実施の形態2に係るキャッシュシステムによれば、キャッシュ制御部202は、キャッシュメモリ50への新たなアクセス要求を受け付けることができない場合、「H」レベルのキャッシュアクセスモード切替信号S10を出力することにより、1サイクルアクセスモードに設定する。例えば、2サイクルアクセスモードでCPU201がキャッシュメモリ50へアクセスしている状態で、CPU201からキャッシュメモリ50への新たなアクセス要求が発生し、キャッシュメモリ50がアクセス禁止の状態になった場合、パイプライン処理の後段の処理が詰まるために複数の命令間にレジスタ依存性が生じやすくなり、その結果、性能低下を引き起こす可能性が高くなる。しかしながら、本実施の形態2に係るキャッシュシステムによると、このような場合には、CPU201からキャッシュメモリ50へのアクセスが2サイクルアクセスモードから1サイクルアクセスモードに切り替えられるため、性能低下のペナルティを最小限に抑制することが可能となる。   As described above, according to the cache system according to the second embodiment, when the cache control unit 202 cannot accept a new access request to the cache memory 50, the cache control unit 202 outputs the cache access mode switching signal S10 of “H” level. By outputting, one cycle access mode is set. For example, when the CPU 201 is accessing the cache memory 50 in the 2-cycle access mode, a new access request from the CPU 201 to the cache memory 50 is generated, and the cache memory 50 is in an access prohibited state. Since the subsequent processing is clogged, register dependency is likely to occur between a plurality of instructions, and as a result, there is a high possibility of causing performance degradation. However, according to the cache system according to the second embodiment, in such a case, the access from the CPU 201 to the cache memory 50 is switched from the 2-cycle access mode to the 1-cycle access mode, so that the penalty for performance degradation is minimized. It becomes possible to suppress to the limit.

実施の形態3.
図10は、本発明の実施の形態3に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。図10に示した複数の構成要素のうち、上記実施の形態1と同一の構成要素については、図1と同一の参照符号を付している。以下、上記実施の形態1との相違点を中心に説明する。
Embodiment 3 FIG.
FIG. 10 is a block diagram showing a configuration of a semiconductor device in which the cache system according to the third embodiment of the present invention is mounted. Of the plurality of components shown in FIG. 10, the same components as those in the first embodiment are given the same reference numerals as those in FIG. Hereinafter, the difference from the first embodiment will be mainly described.

図10に示すように、半導体装置は、CPU301と、CPU80と、キャッシュ部300と、バス調停回路60と、外部バス3と、外部メモリ70とを備えている。キャッシュ部300は、キャッシュ制御部302と、キャッシュメモリ50とを有している。キャッシュ制御部302は、キャッシュメモリ50の動作を制御する。CPU301は、キャッシュ制御部302を介してキャッシュメモリ50にアクセス可能である。キャッシュメモリ50には、CPU80からも、キャッシュ制御部302を介してアクセス可能である。   As shown in FIG. 10, the semiconductor device includes a CPU 301, a CPU 80, a cache unit 300, a bus arbitration circuit 60, an external bus 3, and an external memory 70. The cache unit 300 includes a cache control unit 302 and a cache memory 50. The cache control unit 302 controls the operation of the cache memory 50. The CPU 301 can access the cache memory 50 via the cache control unit 302. The cache memory 50 can also be accessed from the CPU 80 via the cache control unit 302.

CPU301には、キャッシュアクセス受付信号S5及びキャッシュデータレディ信号S6が、キャッシュ制御部302から入力される。また、CPU301には、出力データD2が、キャッュメモリ50から入力される。CPU301は、キャッシュアクセス要求信号S4及びキャッシュアドレスA2を出力する。   The CPU 301 receives a cache access acceptance signal S5 and a cache data ready signal S6 from the cache control unit 302. In addition, output data D <b> 2 is input from the cache memory 50 to the CPU 301. The CPU 301 outputs a cache access request signal S4 and a cache address A2.

キャッシュ制御部302には、キャッシュアクセス要求信号S4及びキャッシュアドレスA2が、CPU301から入力される。また、キャッシュ制御部302には、スヌープ要求信号S1及びスヌープアドレスA1が、CPU80から入力される。また、キャッシュ制御部302には、出力データD2及びMiss信号S11が、キャッシュメモリ50から入力される。また、キャッシュ制御部302には、バスアクセス受付信号S8が、バス調停回路60から入力される。キャッシュ制御部302は、キャッシュアクセス受付信号S5、キャッシュデータレディ信号S6、スヌープ要求受付信号S2、スヌープデータレディ信号S3、バスアクセス要求信号S7、ライトバックデータD1、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10を出力する。   A cache access request signal S4 and a cache address A2 are input from the CPU 301 to the cache control unit 302. Further, the snoop request signal S1 and the snoop address A1 are input from the CPU 80 to the cache control unit 302. Further, the output data D 2 and the Miss signal S 11 are input from the cache memory 50 to the cache control unit 302. The cache control unit 302 also receives a bus access acceptance signal S8 from the bus arbitration circuit 60. The cache control unit 302 includes a cache access acceptance signal S5, a cache data ready signal S6, a snoop request acceptance signal S2, a snoop data ready signal S3, a bus access request signal S7, a write back data D1, a tag enable signal S9, an access address A3, And the cache access mode switching signal S10 is output.

CPU80には、スヌープ要求受付信号S2及びスヌープデータレディ信号S3が、キャッシュ制御部302から入力される。また、CPU80には、出力データD2が、キャッシュメモリ50から入力される。CPU80は、スヌープ要求信号S1及びスヌープアドレスA1を出力する。   The CPU 80 receives a snoop request acceptance signal S 2 and a snoop data ready signal S 3 from the cache control unit 302. Further, the CPU 80 receives output data D2 from the cache memory 50. The CPU 80 outputs a snoop request signal S1 and a snoop address A1.

キャッシュメモリ50には、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10が、キャッシュ制御部302から入力される。キャッシュメモリ50は、Miss信号S11及び出力データD2を出力する。   A tag enable signal S9, an access address A3, and a cache access mode switching signal S10 are input from the cache control unit 302 to the cache memory 50. The cache memory 50 outputs a Miss signal S11 and output data D2.

CPU301は、キャッシュメモリ50内に格納されているデータを読み出す場合、キャッシュアクセス要求信号S4及びキャッシュアドレスA2を出力する。キャッシュアクセス要求信号S4及びキャッシュアドレスA2は、キャッシュ制御部302に入力される。   When reading data stored in the cache memory 50, the CPU 301 outputs a cache access request signal S4 and a cache address A2. The cache access request signal S4 and the cache address A2 are input to the cache control unit 302.

キャッシュ制御部302は、キャッシュアクセス要求信号S4を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、キャッシュアクセス受付信号S5と、タグイネーブル信号S9と、キャッシュアドレスA2に基づきアクセスアドレスA3とを出力する。キャッシュアクセス受付信号S5は、CPU301に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 302 receives the cache access request signal S4, if the cache memory 50 is in an accessible state, the cache control unit 302 outputs the cache access acceptance signal S5, the tag enable signal S9, and the access address A3 based on the cache address A2. Output. The cache access acceptance signal S5 is input to the CPU 301. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU80は、キャッシュメモリ50内に格納されているデータを読み出す場合、スヌープ要求信号S1及びスヌープアドレスA1を出力する。スヌープ要求信号S1及びスヌープアドレスA1は、キャッシュ制御部302に入力される。   When reading data stored in the cache memory 50, the CPU 80 outputs a snoop request signal S1 and a snoop address A1. The snoop request signal S1 and the snoop address A1 are input to the cache control unit 302.

キャッシュ制御部302は、スヌープ要求信号S1を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、スヌープ要求受付信号S2と、タグイネーブル信号S9と、スヌープアドレスA1に基づきアクセスアドレスA3とを出力する。スヌープ要求受付信号S2は、CPU80に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 302 receives the snoop request signal S1, if the cache memory 50 is in an accessible state, the cache control unit 302 outputs the snoop request reception signal S2, the tag enable signal S9, and the access address A3 based on the snoop address A1. To do. The snoop request acceptance signal S2 is input to the CPU 80. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU301及びCPU80からキャッシュメモリ50への各アクセスに関して、キャッシュ制御部302は、上記実施の形態1と同様の2サイクルアクセスモード及び1サイクルアクセスモードを有している。   For each access from the CPU 301 and the CPU 80 to the cache memory 50, the cache control unit 302 has the same 2-cycle access mode and 1-cycle access mode as in the first embodiment.

キャッシュ制御部302は、CPU301からキャッシュメモリ50へのアクセス要求と、CPU80からキャッシュメモリ50へのアクセス要求とを重複して受けた場合、CPU301及びCPU80からキャッシュメモリ50への各アクセスに関して、いずれも「H」レベルのキャッシュアクセスモード切替信号S10を出力する。即ち、CPU301及びCPU80からキャッシュメモリ50への各アクセスを、いずれも1サイクルアクセスモードで実行する。   When the cache control unit 302 receives the access request from the CPU 301 to the cache memory 50 and the access request from the CPU 80 to the cache memory 50 in duplicate, all of the accesses from the CPU 301 and the CPU 80 to the cache memory 50 are performed. An “H” level cache access mode switching signal S10 is output. That is, each access from the CPU 301 and the CPU 80 to the cache memory 50 is executed in the one-cycle access mode.

図11は、キャッシュ制御部302の構成の一部を示すブロック図である。キャッシュ制御部302は、調停回路15及び切替信号生成回路16を有している。   FIG. 11 is a block diagram illustrating a part of the configuration of the cache control unit 302. The cache control unit 302 includes an arbitration circuit 15 and a switching signal generation circuit 16.

調停回路15は、CPU301からキャッシュメモリ50へのアクセス要求と、CPU80からキャッシュメモリ50へのアクセス要求とを同一のサイクル期間内に受けたことを検出すると、アクセス要求同時発生信号S40を出力する。アクセス要求同時発生信号S40は、切替信号生成回路16に入力される。   When the arbitration circuit 15 detects that an access request from the CPU 301 to the cache memory 50 and an access request from the CPU 80 to the cache memory 50 are received within the same cycle period, it outputs an access request simultaneous generation signal S40. The access request simultaneous generation signal S40 is input to the switching signal generation circuit 16.

切替信号生成回路16は、アクセス要求同時発生信号S40が入力されると、アクセス要求同時発生信号S40が入力されたサイクル期間、及びそのサイクル期間に続く1サイクル期間において、「H」レベルのキャッシュアクセスモード切替信号S10を出力する。これにより、キャッシュアクセス要求信号S4に基づくアクセス期間、及びスヌープ要求信号S1に基づくアクセス期間の双方において、キャッシュメモリ50の動作が1サイクルアクセスモードに設定される。   When the access request simultaneous generation signal S40 is input, the switching signal generation circuit 16 receives the cache access of “H” level in the cycle period in which the access request simultaneous generation signal S40 is input and in one cycle period following the cycle period. A mode switching signal S10 is output. Thus, the operation of the cache memory 50 is set to the one-cycle access mode in both the access period based on the cache access request signal S4 and the access period based on the snoop request signal S1.

このように本実施の形態3に係るキャッシュシステムによれば、キャッシュ制御部302は、CPU301からキャッシュメモリ50へのアクセス要求と、CPU80からキャッシュメモリ50へのアクセス要求とを重複して受けた場合、CPU301及びCPU80からキャッシュメモリ50への各アクセスをいずれも1サイクルアクセスモードで実行する。キャッシュシステムが複数のアクセス要求を同時に受けた場合、優先度の低いアクセス要求に対する処理の開始は、優先度の高いアクセス要求に対する処理が完了するのを待つこととなり、その結果、性能の低下を引き起こす。しかしながら、本実施の形態3に係るキャッシュシステムによると、このような場合には、CPU301及びCPU80からキャッシュメモリ50への各アクセスがいずれも1サイクルアクセスモードに切り替えられるため、性能低下のペナルティを最小限に抑制することが可能となる。   As described above, according to the cache system according to the third embodiment, the cache control unit 302 receives the access request from the CPU 301 to the cache memory 50 and the access request from the CPU 80 to the cache memory 50 in duplicate. Each access from the CPU 301 and the CPU 80 to the cache memory 50 is executed in the one-cycle access mode. When the cache system receives a plurality of access requests at the same time, the start of processing for an access request with a low priority waits for the processing for an access request with a high priority to be completed, resulting in performance degradation. . However, according to the cache system according to the third embodiment, in this case, each access from the CPU 301 and the CPU 80 to the cache memory 50 is switched to the 1-cycle access mode, so that the penalty for performance degradation is minimized. It becomes possible to suppress to the limit.

実施の形態4.
図12は、本発明の実施の形態4に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。図12に示した複数の構成要素のうち、上記実施の形態1と同一の構成要素については、図1と同一の参照符号を付している。以下、上記実施の形態1との相違点を中心に説明する。
Embodiment 4 FIG.
FIG. 12 is a block diagram showing a configuration of a semiconductor device in which the cache system according to the fourth embodiment of the present invention is mounted. Of the plurality of components shown in FIG. 12, the same components as those in the first embodiment are given the same reference numerals as those in FIG. Hereinafter, the difference from the first embodiment will be mainly described.

図12に示すように、半導体装置は、CPU401と、CPU80と、キャッシュ部400と、バス調停回路60と、外部バス3と、外部メモリ70とを備えている。キャッシュ部400は、キャッシュ制御部402と、キャッシュメモリ50とを有している。キャッシュ制御部402は、キャッシュメモリ50の動作を制御する。CPU401は、キャッシュ制御部402を介してキャッシュメモリ50にアクセス可能である。キャッシュメモリ50には、CPU80からも、キャッシュ制御部402を介してアクセス可能である。但し、本実施の形態4に関しては、必ずしもCPU80が設けられている必要はない。   As illustrated in FIG. 12, the semiconductor device includes a CPU 401, a CPU 80, a cache unit 400, a bus arbitration circuit 60, an external bus 3, and an external memory 70. The cache unit 400 includes a cache control unit 402 and a cache memory 50. The cache control unit 402 controls the operation of the cache memory 50. The CPU 401 can access the cache memory 50 via the cache control unit 402. The cache memory 50 can also be accessed from the CPU 80 via the cache control unit 402. However, with respect to the fourth embodiment, the CPU 80 is not necessarily provided.

CPU401には、キャッシュアクセス受付信号S5及びキャッシュデータレディ信号S6が、キャッシュ制御部402から入力される。また、CPU401には、出力データD2が、キャッュメモリ50から入力される。CPU401は、キャッシュアクセス要求信号S4、キャッシュアドレスA2、分岐要求信号S50、及び、例えば27ビットの分岐先アドレスA50を出力する。   The CPU 401 receives a cache access acceptance signal S5 and a cache data ready signal S6 from the cache control unit 402. Further, output data D <b> 2 is input from the cache memory 50 to the CPU 401. The CPU 401 outputs a cache access request signal S4, a cache address A2, a branch request signal S50, and a 27-bit branch destination address A50, for example.

キャッシュ制御部402には、キャッシュアクセス要求信号S4、キャッシュアドレスA2、分岐要求信号S50、及び、分岐先アドレスA50が、CPU401から入力される。また、キャッシュ制御部402には、スヌープ要求信号S1及びスヌープアドレスA1が、CPU80から入力される。また、キャッシュ制御部402には、出力データD2及びMiss信号S11が、キャッシュメモリ50から入力される。また、キャッシュ制御部402には、バスアクセス受付信号S8が、バス調停回路60から入力される。キャッシュ制御部402は、キャッシュアクセス受付信号S5、キャッシュデータレディ信号S6、スヌープ要求受付信号S2、スヌープデータレディ信号S3、バスアクセス要求信号S7、ライトバックデータD1、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10を出力する。   A cache access request signal S4, a cache address A2, a branch request signal S50, and a branch destination address A50 are input from the CPU 401 to the cache control unit 402. In addition, the snoop request signal S1 and the snoop address A1 are input from the CPU 80 to the cache control unit 402. Further, the output data D 2 and the Miss signal S 11 are input from the cache memory 50 to the cache control unit 402. In addition, the bus access acceptance signal S8 is input from the bus arbitration circuit 60 to the cache control unit 402. The cache control unit 402 includes a cache access acceptance signal S5, a cache data ready signal S6, a snoop request acceptance signal S2, a snoop data ready signal S3, a bus access request signal S7, a write back data D1, a tag enable signal S9, an access address A3, And the cache access mode switching signal S10 is output.

CPU80には、スヌープ要求受付信号S2及びスヌープデータレディ信号S3が、キャッシュ制御部402から入力される。また、CPU80には、出力データD2が、キャッシュメモリ50から入力される。CPU80は、スヌープ要求信号S1及びスヌープアドレスA1を出力する。   The CPU 80 receives a snoop request acceptance signal S 2 and a snoop data ready signal S 3 from the cache control unit 402. Further, the CPU 80 receives output data D2 from the cache memory 50. The CPU 80 outputs a snoop request signal S1 and a snoop address A1.

キャッシュメモリ50には、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10が、キャッシュ制御部402から入力される。キャッシュメモリ50は、Miss信号S11及び出力データD2を出力する。   A tag enable signal S9, an access address A3, and a cache access mode switching signal S10 are input from the cache control unit 402 to the cache memory 50. The cache memory 50 outputs a Miss signal S11 and output data D2.

CPU401は、キャッシュメモリ50内に格納されているデータを読み出す場合、キャッシュアクセス要求信号S4及びキャッシュアドレスA2を出力する。キャッシュアクセス要求信号S4及びキャッシュアドレスA2は、キャッシュ制御部402に入力される。   When reading data stored in the cache memory 50, the CPU 401 outputs a cache access request signal S4 and a cache address A2. The cache access request signal S4 and the cache address A2 are input to the cache control unit 402.

キャッシュ制御部402は、キャッシュアクセス要求信号S4を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、キャッシュアクセス受付信号S5と、タグイネーブル信号S9と、キャッシュアドレスA2に基づきアクセスアドレスA3とを出力する。キャッシュアクセス受付信号S5は、CPU401に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 402 receives the cache access request signal S4, if the cache memory 50 is in an accessible state, the cache control unit 402 outputs the cache access acceptance signal S5, the tag enable signal S9, and the access address A3 based on the cache address A2. Output. The cache access acceptance signal S5 is input to the CPU 401. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU80は、キャッシュメモリ50内に格納されているデータを読み出す場合、スヌープ要求信号S1及びスヌープアドレスA1を出力する。スヌープ要求信号S1及びスヌープアドレスA1は、キャッシュ制御部402に入力される。   When reading data stored in the cache memory 50, the CPU 80 outputs a snoop request signal S1 and a snoop address A1. The snoop request signal S1 and the snoop address A1 are input to the cache control unit 402.

キャッシュ制御部402は、スヌープ要求信号S1を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、スヌープ要求受付信号S2と、タグイネーブル信号S9と、スヌープアドレスA1に基づきアクセスアドレスA3とを出力する。スヌープ要求受付信号S2は、CPU80に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 402 receives the snoop request signal S1, if the cache memory 50 is in an accessible state, the cache control unit 402 outputs the snoop request reception signal S2, the tag enable signal S9, and the access address A3 based on the snoop address A1. To do. The snoop request acceptance signal S2 is input to the CPU 80. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU401からキャッシュメモリ50へのアクセスに関して、キャッシュ制御部402は、上記実施の形態1と同様の2サイクルアクセスモード及び1サイクルアクセスモードを有している。   Regarding the access from the CPU 401 to the cache memory 50, the cache control unit 402 has the same 2-cycle access mode and 1-cycle access mode as in the first embodiment.

キャッシュ制御部402は、分岐命令の実行に基づくCPU401からキャッシュメモリ50へのアクセスが、キャッシュメモリ50からの特定の分岐先データの読み出しである場合、CPU401からキャッシュメモリ50へのアクセスに関して、「H」レベルのキャッシュアクセスモード切替信号S10を出力する。即ち、CPU401からキャッシュメモリ50へのアクセスを、1サイクルアクセスモードで実行する。   When the access from the CPU 401 to the cache memory 50 based on the execution of the branch instruction is the reading of specific branch destination data from the cache memory 50, the cache control unit 402 regards the access from the CPU 401 to the cache memory 50 as “H ”Level cache access mode switching signal S10 is output. That is, access from the CPU 401 to the cache memory 50 is executed in the one-cycle access mode.

具体的に、CPU401は、分岐命令を実行する際、分岐要求信号S50及び分岐先アドレスA50を、キャッシュ制御部402に入力する。キャッシュ制御部402は、分岐要求信号S50及び分岐先アドレスA50が入力されると、分岐先アドレスA50が、予め設定されている特定のアドレス(複数)のいずれかに一致するか否かを判別する。そして、キャッシュ制御部402は、分岐先アドレスA50が上記特定のアドレスのいずれかに一致する場合は、「H」レベルのキャッシュアクセスモード切替信号S10を出力し、一方、分岐先アドレスA50が上記特定のアドレスのいずれにも一致しない場合は、「L」レベルのキャッシュアクセスモード切替信号S10を出力する。   Specifically, the CPU 401 inputs the branch request signal S50 and the branch destination address A50 to the cache control unit 402 when executing the branch instruction. When the branch request signal S50 and the branch destination address A50 are input, the cache control unit 402 determines whether or not the branch destination address A50 matches any of preset specific addresses (plural). . Then, when the branch destination address A50 matches any of the specific addresses, the cache control unit 402 outputs an “H” level cache access mode switching signal S10, while the branch destination address A50 is the specific address. If the address does not match any of the addresses, an “L” level cache access mode switching signal S10 is output.

なお、上記特定のアドレスは、システムの設計者によって、ハードウェア構成としてキャッシュ部400内に予め設定されている。あるいは、上記特定のアドレスは、システムのユーザが、キャッシュ部400内の図示しない記憶素子に、プログラムによって設定してもよい。また、上記特定のアドレスは、一つのみ設定されていてもよい。   The specific address is preset in the cache unit 400 as a hardware configuration by the system designer. Alternatively, the specific address may be set by a program in a storage element (not shown) in the cache unit 400 by a system user. Further, only one specific address may be set.

図13は、キャッシュ制御部402の構成の一部を示すブロック図である。キャッシュ制御部402は、切替信号生成回路20を有している。切替信号生成回路20は、複数の比較器211〜21n(nは2以上の自然数)と、OR回路22と、セレクタ23と、ラッチ回路24,25とを有している。 FIG. 13 is a block diagram illustrating a part of the configuration of the cache control unit 402. The cache control unit 402 has a switching signal generation circuit 20. The switching signal generation circuit 20 includes a plurality of comparators 21 1 to 21 n (n is a natural number of 2 or more), an OR circuit 22, a selector 23, and latch circuits 24 and 25.

比較器211〜21nの各第1の入力端子には、上記特定のアドレスが、設定値K1〜Knとしてそれぞれ入力されている。比較器211〜21nの各第2の入力端子には、分岐先アドレスA50がそれぞれ入力されている。比較器211〜21nの各出力端子は、OR回路22の複数の入力端子にそれぞれ接続されている。OR回路22の出力端子は、セレクタ23の第1の入力端子に接続されている。セレクタ23の出力端子はラッチ回路24の入力端子に接続されており、ラッチ回路24の出力端子はラッチ回路25の入力端子に接続されている。ラッチ回路24からは、キャッシュアクセスモード切替信号S10が出力されている。ラッチ回路25の出力端子は、セレクタ23の第2の入力端子に接続されている。セレクタ23には、分岐要求信号S50が入力されている。 The specific addresses are input as set values K 1 to K n to the first input terminals of the comparators 21 1 to 21 n , respectively. The branch destination address A50 is input to each of the second input terminals of the comparators 21 1 to 21 n . Each output terminal of the comparators 21 1 to 21 n is connected to a plurality of input terminals of the OR circuit 22. The output terminal of the OR circuit 22 is connected to the first input terminal of the selector 23. The output terminal of the selector 23 is connected to the input terminal of the latch circuit 24, and the output terminal of the latch circuit 24 is connected to the input terminal of the latch circuit 25. A cache access mode switching signal S10 is output from the latch circuit 24. The output terminal of the latch circuit 25 is connected to the second input terminal of the selector 23. A branch request signal S50 is input to the selector 23.

セレクタ23は、分岐要求信号S50が入力されている期間は第1の入力端子を選択し、それ以外の期間は第2の入力端子を選択する。図12に示したCPU401からキャッシュ制御部402に分岐要求信号S50及び分岐先アドレスA50が入力された場合、分岐先アドレスA50が設定値K1〜Knのいずれかに一致すると、セレクタ23の第1の入力端子には「H」レベルの信号が入力される。この「H」レベルの信号は、セレクタ23から出力され、ラッチ回路24に入力される。従って、ラッチ回路24からは、「H」レベルのキャッシュアクセスモード切替信号S10が出力される。これにより、図12に示したキャッシュメモリ50の動作が、1サイクルアクセスモードに設定される。 The selector 23 selects the first input terminal during the period in which the branch request signal S50 is input, and selects the second input terminal during the other periods. When the branch request signal S50 and the branch destination address A50 are input from the CPU 401 illustrated in FIG. 12 to the cache control unit 402, when the branch destination address A50 matches any of the set values K 1 to K n , An “H” level signal is input to the input terminal 1. This “H” level signal is output from the selector 23 and input to the latch circuit 24. Therefore, the latch circuit 24 outputs an “H” level cache access mode switching signal S10. Thereby, the operation of the cache memory 50 shown in FIG. 12 is set to the one-cycle access mode.

このように本実施の形態4に係るキャッシュシステムによれば、キャッシュ制御部402は、分岐命令の実行に基づくCPU401からキャッシュメモリ50へのアクセスが、キャッシュメモリ50からの特定の分岐先データの読み出しである場合、CPU401からキャッシュメモリ50へのアクセスを1サイクルアクセスモードで実行する。従って、例えば分岐先アドレスに割り込みルーチンが指定されている場合に、1サイクルアクセスモードでキャッシュメモリ50を動作させることができる。組み込み用途における割り込み処理は、実時間内で応答が求められることが多い。本実施の形態4に係るキャッシュシステムによれば、キャッシュメモリ50の動作を1サイクルアクセスモードに切り替えることによって、実時間内で割り込み処理が完了する可能性を高くすることが可能となる。   As described above, according to the cache system according to the fourth embodiment, the cache control unit 402 accesses the cache memory 50 from the CPU 401 based on the execution of the branch instruction, and reads specific branch destination data from the cache memory 50. In this case, the CPU 401 accesses the cache memory 50 in the one cycle access mode. Therefore, for example, when an interrupt routine is specified for the branch destination address, the cache memory 50 can be operated in the one-cycle access mode. Interrupt processing in embedded applications often requires a response within real time. According to the cache system of the fourth embodiment, it is possible to increase the possibility that the interrupt process is completed in real time by switching the operation of the cache memory 50 to the one-cycle access mode.

なお、実行される分岐命令は、分岐条件が確定してから実行される分岐命令のみならず、分岐が発生することを見越して(分岐予測)、予め実行が開始されるような分岐命令を含む。   Note that the branch instruction to be executed includes not only a branch instruction that is executed after the branch condition is determined but also a branch instruction that is executed in advance in anticipation of the occurrence of a branch (branch prediction). .

実施の形態5.
図14は、本発明の実施の形態5に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。図15に示した複数の構成要素のうち、上記実施の形態1と同一の構成要素については、図1と同一の参照符号を付している。以下、上記実施の形態1との相違点を中心に説明する。
Embodiment 5 FIG.
FIG. 14 is a block diagram showing a configuration of a semiconductor device in which the cache system according to the fifth embodiment of the present invention is mounted. Of the plurality of components shown in FIG. 15, the same components as those in the first embodiment are given the same reference numerals as those in FIG. Hereinafter, the difference from the first embodiment will be mainly described.

図14に示すように、半導体装置は、CPU501と、CPU80と、キャッシュ部500と、バス調停回路60と、外部バス3と、外部メモリ70とを備えている。キャッシュ部500は、キャッシュ制御部502と、キャッシュメモリ50とを有している。キャッシュ制御部502は、キャッシュメモリ50の動作を制御する。CPU501は、キャッシュ制御部502を介してキャッシュメモリ50にアクセス可能である。キャッシュメモリ50には、CPU80からも、キャッシュ制御部502を介してアクセス可能である。但し、本実施の形態5に関しては、必ずしもCPU80が設けられている必要はない。   As illustrated in FIG. 14, the semiconductor device includes a CPU 501, a CPU 80, a cache unit 500, a bus arbitration circuit 60, an external bus 3, and an external memory 70. The cache unit 500 includes a cache control unit 502 and a cache memory 50. The cache control unit 502 controls the operation of the cache memory 50. The CPU 501 can access the cache memory 50 via the cache control unit 502. The cache memory 50 can also be accessed from the CPU 80 via the cache control unit 502. However, with respect to the fifth embodiment, the CPU 80 is not necessarily provided.

CPU501には、キャッシュアクセス受付信号S5及びキャッシュデータレディ信号S6が、キャッシュ制御部502から入力される。また、CPU501には、出力データD2が、キャッュメモリ50から入力される。CPU501は、キャッシュアクセス要求信号S4、キャッシュアドレスA2、及び、例えば32ビットの命令コードC1を出力する。   A cache access acceptance signal S5 and a cache data ready signal S6 are input from the cache control unit 502 to the CPU 501. Further, the CPU 501 receives output data D2 from the cache memory 50. The CPU 501 outputs a cache access request signal S4, a cache address A2, and a 32-bit instruction code C1, for example.

キャッシュ制御部502には、キャッシュアクセス要求信号S4、キャッシュアドレスA2、及び、命令コードC1が、CPU501から入力される。また、キャッシュ制御部502には、スヌープ要求信号S1及びスヌープアドレスA1が、CPU80から入力される。また、キャッシュ制御部502には、出力データD2及びMiss信号S11が、キャッシュメモリ50から入力される。また、キャッシュ制御部502には、バスアクセス受付信号S8が、バス調停回路60から入力される。キャッシュ制御部502は、キャッシュアクセス受付信号S5、キャッシュデータレディ信号S6、スヌープ要求受付信号S2、スヌープデータレディ信号S3、バスアクセス要求信号S7、ライトバックデータD1、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10を出力する。   A cache access request signal S4, a cache address A2, and an instruction code C1 are input from the CPU 501 to the cache control unit 502. Further, the snoop request signal S1 and the snoop address A1 are input from the CPU 80 to the cache control unit 502. In addition, the output data D2 and the Miss signal S11 are input from the cache memory 50 to the cache control unit 502. The cache control unit 502 also receives a bus access acceptance signal S8 from the bus arbitration circuit 60. The cache control unit 502 includes a cache access acceptance signal S5, a cache data ready signal S6, a snoop request acceptance signal S2, a snoop data ready signal S3, a bus access request signal S7, a write back data D1, a tag enable signal S9, an access address A3, And the cache access mode switching signal S10 is output.

CPU80には、スヌープ要求受付信号S2及びスヌープデータレディ信号S3が、キャッシュ制御部502から入力される。また、CPU80には、出力データD2が、キャッシュメモリ50から入力される。CPU80は、スヌープ要求信号S1及びスヌープアドレスA1を出力する。   The CPU 80 receives a snoop request acceptance signal S2 and a snoop data ready signal S3 from the cache control unit 502. Further, the CPU 80 receives output data D2 from the cache memory 50. The CPU 80 outputs a snoop request signal S1 and a snoop address A1.

キャッシュメモリ50には、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10が、キャッシュ制御部502から入力される。キャッシュメモリ50は、Miss信号S11及び出力データD2を出力する。   A tag enable signal S9, an access address A3, and a cache access mode switching signal S10 are input from the cache control unit 502 to the cache memory 50. The cache memory 50 outputs a Miss signal S11 and output data D2.

CPU501は、キャッシュメモリ50内に格納されているデータを読み出す場合、キャッシュアクセス要求信号S4及びキャッシュアドレスA2を出力する。キャッシュアクセス要求信号S4及びキャッシュアドレスA2は、キャッシュ制御部502に入力される。   When reading data stored in the cache memory 50, the CPU 501 outputs a cache access request signal S4 and a cache address A2. The cache access request signal S4 and the cache address A2 are input to the cache control unit 502.

キャッシュ制御部502は、キャッシュアクセス要求信号S4を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、キャッシュアクセス受付信号S5と、タグイネーブル信号S9と、キャッシュアドレスA2に基づきアクセスアドレスA3とを出力する。キャッシュアクセス受付信号S5は、CPU501に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 502 receives the cache access request signal S4, if the cache memory 50 is in an accessible state, the cache control unit 502 outputs the cache access reception signal S5, the tag enable signal S9, and the access address A3 based on the cache address A2. Output. The cache access acceptance signal S5 is input to the CPU 501. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU80は、キャッシュメモリ50内に格納されているデータを読み出す場合、スヌープ要求信号S1及びスヌープアドレスA1を出力する。スヌープ要求信号S1及びスヌープアドレスA1は、キャッシュ制御部502に入力される。   When reading data stored in the cache memory 50, the CPU 80 outputs a snoop request signal S1 and a snoop address A1. The snoop request signal S1 and the snoop address A1 are input to the cache control unit 502.

キャッシュ制御部502は、スヌープ要求信号S1を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、スヌープ要求受付信号S2と、タグイネーブル信号S9と、スヌープアドレスA1に基づきアクセスアドレスA3とを出力する。スヌープ要求受付信号S2は、CPU80に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 502 receives the snoop request signal S1, if the cache memory 50 is in an accessible state, the cache control unit 502 outputs the snoop request reception signal S2, the tag enable signal S9, and the access address A3 based on the snoop address A1. To do. The snoop request acceptance signal S2 is input to the CPU 80. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU501からキャッシュメモリ50へのアクセスに関して、キャッシュ制御部502は、上記実施の形態1と同様の2サイクルアクセスモード及び1サイクルアクセスモードを有している。   Regarding the access from the CPU 501 to the cache memory 50, the cache control unit 502 has the same 2-cycle access mode and 1-cycle access mode as in the first embodiment.

キャッシュ制御部502は、CPU501によってフェッチされた命令コードC1又は該命令コードC1のデコード結果を判定することにより、CPU501からキャッシュメモリ50へのアクセスに関して、「H」レベル又は「L」レベルのキャッシュアクセスモード切替信号S10を出力する。即ち、CPU501からキャッシュメモリ50へのアクセスを、キャッシュアクセスモード切替信号S10が「H」レベルの場合は1サイクルアクセスモードで実行し、キャッシュアクセスモード切替信号S10が「L」レベルの場合は2サイクルアクセスモードで実行する。   The cache control unit 502 determines an instruction code C1 fetched by the CPU 501 or a decoding result of the instruction code C1, and thereby accesses the cache memory 50 from the CPU 501 at “H” level or “L” level. A mode switching signal S10 is output. That is, the CPU 501 accesses the cache memory 50 in the one-cycle access mode when the cache access mode switching signal S10 is at “H” level, and for two cycles when the cache access mode switching signal S10 is at “L” level. Run in access mode.

具体的に、CPU501は、フェッチした命令コードC1を、キャッシュ制御部502に入力する。キャッシュ制御部502は、入力された命令コードC1が、命令コードの種類に応じて予め設定されている特定の値(複数)のいずれに一致するか、又はいずれにも一致しないかを判定する。そして、キャッシュ制御部502は、その判定の結果に応じて、1サイクルアクセスモードに設定するか、2サイクルアクセスモードに設定するか、前状態のアクセスモードを保持するかを決定し、対応するキャッシュアクセスモード切替信号S10を出力する。   Specifically, the CPU 501 inputs the fetched instruction code C1 to the cache control unit 502. The cache control unit 502 determines whether the input instruction code C1 matches or does not match any of specific values (plurality) set in advance according to the type of instruction code. Then, the cache control unit 502 determines whether to set the one-cycle access mode, the two-cycle access mode, or keep the previous access mode according to the determination result, and the corresponding cache An access mode switching signal S10 is output.

なお、上記特定の値は、システムの設計者によって、ハードウェア構成としてキャッシュ部500内に予め設定されている。あるいは、上記特定の値は、システムのユーザが、キャッシュ部500内の図示しないレジスタに、プログラムによって設定してもよい。   The specific value is preset in the cache unit 500 as a hardware configuration by the system designer. Alternatively, the specific value may be set by a system user in a register (not shown) in the cache unit 500 by a program.

図15〜17は、本実施の形態5に係るキャッシュシステムの構成の一部をそれぞれ示すブロック図である。図14に示したキャッシュ部500は、図15〜17に示した判定装置31,33及びデコード回路30,32,34をそれぞれ有している。   15 to 17 are block diagrams respectively showing a part of the configuration of the cache system according to the fifth embodiment. The cache unit 500 illustrated in FIG. 14 includes the determination devices 31 and 33 and the decoding circuits 30, 32, and 34 illustrated in FIGS.

図15を参照して、図14に示したCPU501によってフェッチされた命令コードC1は、デコード回路30に入力される。デコード回路30は、命令コードC1をデコードし、デコード結果D10を出力する。判定装置31には、命令コードC1(又はその一部)が入力される。判定装置31は、入力された命令コードC1が、上記特定の値のいずれに一致するか、又はいずれにも一致しないかを判定する。そして、その判定の結果に応じて、対応するキャッシュアクセスモード切替信号S10を出力する。   Referring to FIG. 15, instruction code C <b> 1 fetched by CPU 501 shown in FIG. 14 is input to decode circuit 30. The decode circuit 30 decodes the instruction code C1 and outputs a decode result D10. The determination device 31 receives the instruction code C1 (or a part thereof). The determination device 31 determines whether the input instruction code C1 matches any of the specific values or does not match any of them. Then, the corresponding cache access mode switching signal S10 is output according to the determination result.

図16を参照して、図14に示したCPU501によってフェッチされた命令コードC1は、デコード回路32に入力される。デコード回路32は、命令コードC1をデコードし、デコード結果D10を出力する。判定装置33には、デコード結果D10の一部が入力される。判定装置33は、入力されたデコード結果D10に基づいて、命令コードC1が、上記特定の値のいずれに一致するか、又はいずれにも一致しないかを判定する。そして、その判定の結果に応じて、対応するキャッシュアクセスモード切替信号S10を出力する。   Referring to FIG. 16, instruction code C <b> 1 fetched by CPU 501 shown in FIG. 14 is input to decode circuit 32. The decode circuit 32 decodes the instruction code C1 and outputs a decode result D10. A part of the decoding result D10 is input to the determination device 33. Based on the input decoding result D10, the determination device 33 determines whether the instruction code C1 matches any of the specific values or does not match any of them. Then, the corresponding cache access mode switching signal S10 is output according to the determination result.

図17を参照して、図14に示したCPU501によってフェッチされた命令コードC1は、デコード回路34に入力される。デコード回路34は、命令コードC1をデコードし、デコード結果D10を出力する。また、デコード回路34は、図15,16にそれぞれ示した判定装置31,33と同様の判定機能を有しており、入力された命令コードC1が、上記特定の値のいずれに一致するか、又はいずれにも一致しないかを判定する。そして、その判定の結果に応じて、デコード結果D10の一部として、対応するキャッシュアクセスモード切替信号S10を出力する。   Referring to FIG. 17, instruction code C <b> 1 fetched by CPU 501 shown in FIG. 14 is input to decode circuit 34. The decode circuit 34 decodes the instruction code C1 and outputs a decode result D10. The decode circuit 34 has a determination function similar to that of the determination devices 31 and 33 shown in FIGS. 15 and 16, respectively, and which of the specific values the input instruction code C1 matches. Or, it is determined whether they do not match any of them. Then, according to the determination result, the corresponding cache access mode switching signal S10 is output as a part of the decoding result D10.

図18は、図14に示したキャッシュ制御部502の構成の一部を示すブロック図である。図18に示した例では、キャッシュ制御部502は、図15に示した判定装置31を有している。判定装置31は、複数の比較器351〜354と、OR回路36〜38と、セレクタ39と、ラッチ回路40,41とを有している。 FIG. 18 is a block diagram showing a part of the configuration of the cache control unit 502 shown in FIG. In the example illustrated in FIG. 18, the cache control unit 502 includes the determination device 31 illustrated in FIG. The determination device 31 includes a plurality of comparators 35 1 to 35 4 , OR circuits 36 to 38, a selector 39, and latch circuits 40 and 41.

比較器351〜354の各第1の入力端子には、上記特定の値が、設定値L1〜L4としてそれぞれ入力されている。比較器351〜354の各第2の入力端子には、命令コードC1(又はその一部)がそれぞれ入力されている。比較器351,352の各出力端子はOR回路36の2つの入力端子にそれぞれ接続されており、比較器353,354の各出力端子はOR回路37の2つの入力端子にそれぞれ接続されている。OR回路36,37の各出力端子は、OR回路38の2つの入力端子にそれぞれ接続されている。OR回路37の出力端子は、セレクタ39の第1の入力端子にも接続されている。セレクタ39には、OR回路38から出力された信号が入力されている。 The specific values are input as set values L 1 to L 4 to the first input terminals of the comparators 35 1 to 35 4 , respectively. The comparator 35 1-35 4 each second input terminal of the instruction code C1 (or portions thereof) are input, respectively. Each output terminal of the comparators 35 1 and 35 2 is connected to two input terminals of the OR circuit 36, and each output terminal of the comparators 35 3 and 35 4 is connected to two input terminals of the OR circuit 37, respectively. Has been. The output terminals of the OR circuits 36 and 37 are connected to two input terminals of the OR circuit 38, respectively. The output terminal of the OR circuit 37 is also connected to the first input terminal of the selector 39. A signal output from the OR circuit 38 is input to the selector 39.

セレクタ39の出力端子はラッチ回路40の入力端子に接続されており、ラッチ回路40の出力端子はラッチ回路41の入力端子に接続されている。ラッチ回路40からは、キャッシュアクセスモード切替信号S10が出力されている。ラッチ回路41の出力端子は、セレクタ39の第2の入力端子に接続されている。   The output terminal of the selector 39 is connected to the input terminal of the latch circuit 40, and the output terminal of the latch circuit 40 is connected to the input terminal of the latch circuit 41. A cache access mode switching signal S10 is output from the latch circuit 40. The output terminal of the latch circuit 41 is connected to the second input terminal of the selector 39.

セレクタ39は、OR回路38から「H」レベルの信号が入力されている場合は第1の入力端子を、「L」レベルの信号が入力されている場合は第2の入力端子を、それぞれ選択する。   The selector 39 selects the first input terminal when the “H” level signal is input from the OR circuit 38 and the second input terminal when the “L” level signal is input. To do.

図14に示したCPU501からキャッシュ制御部502に入力された命令コードC1が、設定値L3,L4のいずれかに一致した場合は、セレクタ39の第1の入力端子には「H」レベルの信号が入力される。この「H」レベルの信号は、セレクタ39から出力され、ラッチ回路40に入力される。従って、ラッチ回路40からは、「H」レベルのキャッシュアクセスモード切替信号S10が出力される。これにより、図14に示したキャッシュメモリ50の動作が、1サイクルアクセスモードに設定される。 When the instruction code C1 input from the CPU 501 shown in FIG. 14 to the cache control unit 502 matches one of the setting values L 3 and L 4 , the first input terminal of the selector 39 has an “H” level. Signal is input. This “H” level signal is output from the selector 39 and input to the latch circuit 40. Accordingly, the latch circuit 40 outputs the cache access mode switching signal S10 at “H” level. Thereby, the operation of the cache memory 50 shown in FIG. 14 is set to the one-cycle access mode.

図14に示したCPU501からキャッシュ制御部502に入力された命令コードC1が、設定値L1,L2のいずれかに一致した場合は、セレクタ39の第1の入力端子には「L」レベルの信号が入力される。この「L」レベルの信号は、セレクタ39から出力され、ラッチ回路40に入力される。従って、ラッチ回路40からは、「L」レベルのキャッシュアクセスモード切替信号S10が出力される。これにより、図14に示したキャッシュメモリ50の動作が、2サイクルアクセスモードに設定される。 When the instruction code C1 input from the CPU 501 shown in FIG. 14 to the cache control unit 502 matches either of the set values L 1 and L 2 , the first input terminal of the selector 39 has an “L” level. Signal is input. This “L” level signal is output from the selector 39 and input to the latch circuit 40. Accordingly, the latch circuit 40 outputs the “L” level cache access mode switching signal S10. Thereby, the operation of the cache memory 50 shown in FIG. 14 is set to the two-cycle access mode.

図14に示したCPU501からキャッシュ制御部502に入力された命令コードC1が、設定値L1〜L4のいずれにも一致しない場合は、OR回路38からは「L」レベルの信号が出力されるため、セレクタ39の第2の入力端子が選択される。セレクタ39の第2の入力端子には、前状態のアクセスモードを決定するキャッシュアクセスモード切替信号S10が、ラッチ回路41から入力されている。このキャッシュアクセスモード切替信号S10が、セレクタ39を介してラッチ回路40から出力される。これにより、図14に示したキャッシュメモリ50の動作は、前状態のアクセスモードと同一に設定される。 When the instruction code C1 input from the CPU 501 shown in FIG. 14 to the cache control unit 502 does not match any of the setting values L 1 to L 4, an “L” level signal is output from the OR circuit 38. Therefore, the second input terminal of the selector 39 is selected. A cache access mode switching signal S10 for determining the previous access mode is input from the latch circuit 41 to the second input terminal of the selector 39. The cache access mode switching signal S10 is output from the latch circuit 40 via the selector 39. Thereby, the operation of the cache memory 50 shown in FIG. 14 is set to be the same as the access mode in the previous state.

なお、図16に示した判定装置33は、比較器351〜354の各第2の入力端子へ入力される信号が、命令コードC1ではなくデコード結果D10の一部となるだけで、その他の回路構成は、図18に示した判定装置31の構成と同様である。 The determination device 33 shown in FIG. 16, only the signal inputted to each second input terminal of the comparator 35 1-35 4 becomes a part of the instruction code C1, not the decoded result D10, other The circuit configuration is the same as that of the determination device 31 shown in FIG.

このように本実施の形態5に係るキャッシュシステムによれば、キャッシュ制御部502は、CPU501によって実行される命令の種類に応じて、1サイクルアクセスモードと2サイクルアクセスモードとを切り替える。従って、ソフトウェアのコンパイルオプションを切り替えることによってアクセスモードを選択するといった使い方ができるようになる。また、1サイクルアクセスモード主体の高速道作用の命令セットと、2サイクルアクセスモード主体の低消費電力用の命令セットとを用意し、使用する命令セットに応じてアクセスモードを選択するといった使い方ができるようにもなる。   As described above, according to the cache system according to the fifth embodiment, the cache control unit 502 switches between the 1-cycle access mode and the 2-cycle access mode according to the type of instruction executed by the CPU 501. Accordingly, it is possible to use the access mode by selecting the compile option of the software. Also, a high-speed instruction set mainly for the 1-cycle access mode and a low-power consumption instruction set mainly for the 2-cycle access mode are prepared, and the access mode can be selected according to the instruction set to be used. It becomes like.

しかも、キャッシュ制御部502は、CPU501によってフェッチされた命令コードC1又は該命令コードC1のデコード結果D10を判定することによって、アクセスモードを選択する。従って、上記特許文献2に開示されたキャッシュシステムとは異なり、本実施の形態5に係るキャッシュシステムは、プリフェッチ装置を有しない装置にも対応でき、また、分岐命令予測器が不要であるために回路規模が増大することもない。   Moreover, the cache control unit 502 selects the access mode by determining the instruction code C1 fetched by the CPU 501 or the decoding result D10 of the instruction code C1. Therefore, unlike the cache system disclosed in Patent Document 2, the cache system according to the fifth embodiment is compatible with a device that does not have a prefetch device, and a branch instruction predictor is unnecessary. The circuit scale does not increase.

さらに、図16,17に示した例では、デコード回路の全部又は一部がアクセスモードの判定装置としても使用されているため、図15に示した例と比較すると、回路規模の増大を抑制することができる。   Further, in the example shown in FIGS. 16 and 17, since all or part of the decoding circuit is also used as an access mode determination device, an increase in circuit scale is suppressed as compared with the example shown in FIG. be able to.

実施の形態6.
図19は、本発明の実施の形態6に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。図19に示した複数の構成要素のうち、上記実施の形態1と同一の構成要素については、図1と同一の参照符号を付している。以下、上記実施の形態1との相違点を中心に説明する。
Embodiment 6 FIG.
FIG. 19 is a block diagram showing a configuration of a semiconductor device in which the cache system according to the sixth embodiment of the present invention is mounted. Of the plurality of components shown in FIG. 19, the same components as those in the first embodiment are given the same reference numerals as those in FIG. Hereinafter, the difference from the first embodiment will be mainly described.

図19に示すように、半導体装置は、CPU601と、CPU80と、キャッシュ部600と、バス調停回路60と、外部バス3と、外部メモリ70とを備えている。キャッシュ部600は、キャッシュ制御部602と、キャッシュメモリ50とを有している。キャッシュ制御部602は、キャッシュメモリ50の動作を制御する。CPU601は、キャッシュ制御部602を介してキャッシュメモリ50にアクセス可能である。キャッシュメモリ50には、CPU80からも、キャッシュ制御部602を介してアクセス可能である。但し、本実施の形態6に関しては、必ずしもCPU80が設けられている必要はない。   As shown in FIG. 19, the semiconductor device includes a CPU 601, a CPU 80, a cache unit 600, a bus arbitration circuit 60, an external bus 3, and an external memory 70. The cache unit 600 includes a cache control unit 602 and a cache memory 50. The cache control unit 602 controls the operation of the cache memory 50. The CPU 601 can access the cache memory 50 via the cache control unit 602. The cache memory 50 can also be accessed from the CPU 80 via the cache control unit 602. However, regarding the sixth embodiment, the CPU 80 is not necessarily provided.

CPU601には、キャッシュアクセス受付信号S5及びキャッシュデータレディ信号S6が、キャッシュ制御部602から入力される。また、CPU601には、出力データD2が、キャッュメモリ50から入力される。CPU601は、キャッシュアクセス要求信号S4及びキャッシュアドレスA2を出力する。   The CPU 601 receives a cache access acceptance signal S5 and a cache data ready signal S6 from the cache control unit 602. Further, output data D <b> 2 is input from the cache memory 50 to the CPU 601. The CPU 601 outputs a cache access request signal S4 and a cache address A2.

キャッシュ制御部602には、キャッシュアクセス要求信号S4及びキャッシュアドレスA2が、CPU601から入力される。また、キャッシュ制御部602には、スヌープ要求信号S1及びスヌープアドレスA1が、CPU80から入力される。また、キャッシュ制御部602には、出力データD2及びMiss信号S11が、キャッシュメモリ50から入力される。また、キャッシュ制御部602には、バスアクセス受付信号S8が、バス調停回路60から入力される。キャッシュ制御部602は、キャッシュアクセス受付信号S5、キャッシュデータレディ信号S6、スヌープ要求受付信号S2、スヌープデータレディ信号S3、バスアクセス要求信号S7、ライトバックデータD1、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10を出力する。   The cache control unit 602 receives a cache access request signal S4 and a cache address A2 from the CPU 601. Further, the snoop request signal S1 and the snoop address A1 are input from the CPU 80 to the cache control unit 602. In addition, the output data D2 and the Miss signal S11 are input from the cache memory 50 to the cache control unit 602. Further, the bus access acceptance signal S <b> 8 is input from the bus arbitration circuit 60 to the cache control unit 602. The cache control unit 602 includes a cache access acceptance signal S5, a cache data ready signal S6, a snoop request acceptance signal S2, a snoop data ready signal S3, a bus access request signal S7, a write back data D1, a tag enable signal S9, an access address A3, And the cache access mode switching signal S10 is output.

CPU80には、スヌープ要求受付信号S2及びスヌープデータレディ信号S3が、キャッシュ制御部602から入力される。また、CPU80には、出力データD2が、キャッシュメモリ50から入力される。CPU80は、スヌープ要求信号S1及びスヌープアドレスA1を出力する。   The CPU 80 receives a snoop request acceptance signal S 2 and a snoop data ready signal S 3 from the cache control unit 602. Further, the CPU 80 receives output data D2 from the cache memory 50. The CPU 80 outputs a snoop request signal S1 and a snoop address A1.

キャッシュメモリ50には、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10が、キャッシュ制御部602から入力される。キャッシュメモリ50は、Miss信号S11及び出力データD2を出力する。   A tag enable signal S9, an access address A3, and a cache access mode switching signal S10 are input from the cache control unit 602 to the cache memory 50. The cache memory 50 outputs a Miss signal S11 and output data D2.

CPU201は、キャッシュメモリ50内に格納されているデータを読み出す場合、キャッシュアクセス要求信号S4及びキャッシュアドレスA2を出力する。キャッシュアクセス要求信号S4及びキャッシュアドレスA2は、キャッシュ制御部602に入力される。   When reading data stored in the cache memory 50, the CPU 201 outputs a cache access request signal S4 and a cache address A2. The cache access request signal S4 and the cache address A2 are input to the cache control unit 602.

キャッシュ制御部602は、キャッシュアクセス要求信号S4を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、キャッシュアクセス受付信号S5と、タグイネーブル信号S9と、キャッシュアドレスA2に基づきアクセスアドレスA3とを出力する。キャッシュアクセス受付信号S5は、CPU601に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 602 receives the cache access request signal S4, if the cache memory 50 is in an accessible state, the cache control unit 602 generates the cache access acceptance signal S5, the tag enable signal S9, and the access address A3 based on the cache address A2. Output. The cache access acceptance signal S5 is input to the CPU 601. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU80は、キャッシュメモリ50内に格納されているデータを読み出す場合、スヌープ要求信号S1及びスヌープアドレスA1を出力する。スヌープ要求信号S1及びスヌープアドレスA1は、キャッシュ制御部602に入力される。   When reading data stored in the cache memory 50, the CPU 80 outputs a snoop request signal S1 and a snoop address A1. The snoop request signal S1 and the snoop address A1 are input to the cache control unit 602.

キャッシュ制御部602は、スヌープ要求信号S1を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、スヌープ要求受付信号S2と、タグイネーブル信号S9と、スヌープアドレスA1に基づきアクセスアドレスA3とを出力する。スヌープ要求受付信号S2は、CPU80に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 602 receives the snoop request signal S1, if the cache memory 50 is accessible, the cache control unit 602 outputs the snoop request reception signal S2, the tag enable signal S9, and the access address A3 based on the snoop address A1. To do. The snoop request acceptance signal S2 is input to the CPU 80. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU601からキャッシュメモリ50へのアクセスに関して、キャッシュ制御部602は、上記実施の形態1と同様の2サイクルアクセスモード及び1サイクルアクセスモードを有している。   Regarding the access from the CPU 601 to the cache memory 50, the cache control unit 602 has a two-cycle access mode and a one-cycle access mode similar to those in the first embodiment.

キャッシュ制御部602は、CPU601からキャッシュメモリ50へアクセスされたが、CPU601が必要とするデータがキャッシュメモリ50内に格納されていない場合に、CPU601からキャッシュメモリ50への次回のアクセス又は次回以降のアクセスにおいて、「H」レベルのキャッシュアクセスモード切替信号S10を出力する。即ち、キャッシュメモリ50の動作を1サイクルアクセスモードに設定する。   The cache control unit 602 accesses the cache memory 50 from the CPU 601, but when the data required by the CPU 601 is not stored in the cache memory 50, the CPU 601 accesses the cache memory 50 next time or after the next time. In access, the cache access mode switching signal S10 of “H” level is output. That is, the operation of the cache memory 50 is set to the one cycle access mode.

図20は、キャッシュ制御部602の構成の一部を示すブロック図である。キャッシュ制御部602は、状態監視回路51及び切替信号生成回路52を有している。切替信号生成回路52はクリア回路53を有しており、クリア回路53は複数のカウンタ54を含んでいる。   FIG. 20 is a block diagram illustrating a part of the configuration of the cache control unit 602. The cache control unit 602 includes a state monitoring circuit 51 and a switching signal generation circuit 52. The switching signal generation circuit 52 has a clear circuit 53, and the clear circuit 53 includes a plurality of counters 54.

状態監視回路51は、キャッシュメモリ50へのアクセス要求を検出すると、アクセス発生信号S51を出力する。アクセス発生信号S51は、切替信号生成回路52に入力される。また、Miss信号S11が、図19に示したキャッシュメモリ50から切替信号生成回路52に入力される。   When the status monitoring circuit 51 detects an access request to the cache memory 50, it outputs an access generation signal S51. The access generation signal S51 is input to the switching signal generation circuit 52. Further, the Miss signal S11 is input from the cache memory 50 shown in FIG.

切替信号生成回路11は、指定されたデータがキャッシュメモリ50内に格納されていないことを示す内容のMiss信号S11が入力されると、「H」レベルのキャッシュアクセスモード切替信号S10を出力する。これにより、キャッシュメモリ50の動作が1サイクルアクセスモードに設定される。   When the Miss signal S11 indicating that the designated data is not stored in the cache memory 50 is input, the switching signal generation circuit 11 outputs an “H” level cache access mode switching signal S10. Thereby, the operation of the cache memory 50 is set to the one-cycle access mode.

上記の通り、切替信号生成回路52はクリア回路53を有しており、クリア回路53は複数のカウンタ54を含んでいる。従って、切替信号生成回路52は、キャッシュアクセスモード切替信号S10が「H」レベルに設定されてからのサイクル期間及びアクセス回数を、アクセス発生信号S51及びMiss信号S11に基づいて把握することができる。クリア回路53には、上記の次回のアクセスが完了したこと、キャッシュアクセスモード切替信号S10が「H」レベルに設定されてから所定数のサイクル期間が経過したこと、上記の次回以降のアクセスにおいてキャッシュメモリ50へのアクセスが途切れたこと等が、クリア条件として設定されている。クリア回路53は、クリア条件が満たされると、キャッシュアクセスモード切替信号S10を「L」レベルに切り替える。   As described above, the switching signal generation circuit 52 has the clear circuit 53, and the clear circuit 53 includes a plurality of counters 54. Therefore, the switching signal generation circuit 52 can grasp the cycle period and the number of accesses after the cache access mode switching signal S10 is set to the “H” level based on the access generation signal S51 and the Miss signal S11. In the clear circuit 53, the above-mentioned next access is completed, the cache access mode switching signal S10 is set to the “H” level, a predetermined number of cycle periods have elapsed, and the above-mentioned next and subsequent accesses are cached. The fact that access to the memory 50 is interrupted is set as a clear condition. When the clear condition is satisfied, the clear circuit 53 switches the cache access mode switching signal S10 to the “L” level.

このように本実施の形態6に係るキャッシュシステムによれば、キャッシュ制御部602は、キャッシュメモリ50が2サイクルアクセスモードで動作している場合であっても、CPU601が必要とするデータがキャッシュメモリ50内に格納されていない場合には、「H」レベルのキャッシュアクセスモード切替信号S10を出力することにより、1サイクルアクセスモードに設定する。必要とするデータがキャッシュメモリ50内に格納されていない場合は、外部メモリ70からデータを読み出す必要があるため、性能の低下を引き起こす可能性がある。しかも、パイプライン処理の後段の処理が詰まるために複数の命令間にレジスタ依存性が生じやすくなり、その結果、性能低下を引き起こす可能性がさらに高くなる。しかしながら、本実施の形態6に係るキャッシュシステムによると、このような場合には、CPU601からキャッシュメモリ50へのアクセスが1サイクルアクセスモードに設定されるため、性能低下のペナルティを最小限に抑制することが可能となる。   As described above, according to the cache system according to the sixth embodiment, the cache control unit 602 allows the data required by the CPU 601 to be stored in the cache memory even when the cache memory 50 is operating in the two-cycle access mode. If it is not stored in 50, the cache access mode switching signal S10 at "H" level is output to set the one cycle access mode. When the necessary data is not stored in the cache memory 50, it is necessary to read the data from the external memory 70, which may cause a decrease in performance. In addition, since the subsequent processing of the pipeline processing is clogged, register dependency is likely to occur between a plurality of instructions, and as a result, the possibility of causing performance degradation is further increased. However, according to the cache system according to the sixth embodiment, in such a case, the access from the CPU 601 to the cache memory 50 is set to the one-cycle access mode, so that the penalty for performance degradation is minimized. It becomes possible.

実施の形態7.
図21,22は、上記実施の形態1〜6に係るキャッシュシステムに関して、アクセスモードが切り替わる状況をそれぞれ示すタイミングチャートである。図21に示した例では、サイクル期間P1において2サイクルアクセスモードによるアクセス要求(アクセスAC1)が発生し、サイクル期間P2においてはアクセス要求が発生せず、サイクル期間P3において1サイクルアクセスモードによるアクセス要求(アクセスAC3)が発生している。アクセスAC1のデータメモリアクセスは、サイクル期間P3の前半で完了している。従って、アクセスAC3のタグ及びデータメモリアクセスはサイクル期間P3の後半から開始され、アクセスAC3に関して高速動作が実現されている。
Embodiment 7 FIG.
FIGS. 21 and 22 are timing charts respectively showing the situation in which the access mode is switched in the cache systems according to the first to sixth embodiments. In the example shown in FIG. 21, an access request (access AC1) in the 2-cycle access mode is generated in the cycle period P1, an access request is not generated in the cycle period P2, and an access request in the 1-cycle access mode in the cycle period P3. (Access AC3) has occurred. The data memory access of access AC1 is completed in the first half of the cycle period P3. Therefore, access AC3 tag and data memory access is started from the latter half of the cycle period P3, and high-speed operation is realized for access AC3.

図22に示した例では、サイクル期間P1において2サイクルアクセスモードによるアクセス要求(アクセスAC1)が発生し、サイクル期間P2においても2サイクルアクセスモードによるアクセス要求(アクセスAC2)が発生し、サイクル期間P3において1サイクルアクセスモードによるアクセス要求(アクセスAC3)が発生している。この場合、サイクル期間P3の後半からアクセスAC3のタグ及びデータメモリアクセスを開始しようとしても、その時点では、アクセスAC2のデータメモリアクセスがまだ完了していない。そのため、アクセスAC3のタグ及びデータメモリアクセスの開始は、サイクル期間P4の後半まで待たなければならない。その結果、アクセスAC3に関しては、アクセスAC1,AC2と比較して消費電力が高いうえに、高速動作も実現されていない。かかる状況は、上記実施の形態1〜6に係るキャッシュシステムに限らず、低速及び高速の二つのアクセスモードを有する任意のキャッシュシステム(上記特許文献1,2に開示されたキャッシュシステムを含む)において発生する。   In the example shown in FIG. 22, an access request (access AC1) in the 2-cycle access mode is generated in the cycle period P1, and an access request (access AC2) in the 2-cycle access mode is also generated in the cycle period P2. , An access request (access AC3) is generated in the 1-cycle access mode. In this case, even if it is attempted to start the access AC3 tag and data memory access from the latter half of the cycle period P3, the access AC2 data memory access is not yet completed. Therefore, the start of access AC3 tag and data memory access must wait until the second half of the cycle period P4. As a result, the access AC3 has higher power consumption than the access AC1 and AC2, and a high-speed operation is not realized. Such a situation is not limited to the cache systems according to Embodiments 1 to 6 described above, but in any cache system having two low-speed and high-speed access modes (including the cache systems disclosed in Patent Documents 1 and 2). appear.

本実施の形態7では、かかる状況が発生することを回避し得るキャッシュシステムについて説明する。   In the seventh embodiment, a cache system that can avoid such a situation will be described.

図23は、本発明の実施の形態7に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。図23に示した複数の構成要素のうち、上記実施の形態1と同一の構成要素については、図1と同一の参照符号を付している。以下、上記実施の形態1との相違点を中心に説明する。   FIG. 23 is a block diagram showing a configuration of a semiconductor device in which the cache system according to the seventh embodiment of the present invention is mounted. Of the plurality of components shown in FIG. 23, the same components as those in the first embodiment are given the same reference numerals as those in FIG. Hereinafter, the difference from the first embodiment will be mainly described.

図23に示すように、半導体装置は、CPU701と、CPU80と、キャッシュ部700と、バス調停回路60と、外部バス3と、外部メモリ70とを備えている。キャッシュ部700は、キャッシュ制御部702と、キャッシュメモリ50とを有している。キャッシュ制御部702は、キャッシュメモリ50の動作を制御する。CPU701は、キャッシュ制御部702を介してキャッシュメモリ50にアクセス可能である。キャッシュメモリ50には、CPU80からも、キャッシュ制御部702を介してアクセス可能である。   As shown in FIG. 23, the semiconductor device includes a CPU 701, a CPU 80, a cache unit 700, a bus arbitration circuit 60, an external bus 3, and an external memory 70. The cache unit 700 includes a cache control unit 702 and a cache memory 50. The cache control unit 702 controls the operation of the cache memory 50. The CPU 701 can access the cache memory 50 via the cache control unit 702. The cache memory 50 can also be accessed from the CPU 80 via the cache control unit 702.

CPU701には、キャッシュアクセス受付信号S5及びキャッシュデータレディ信号S6が、キャッシュ制御部702から入力される。また、CPU701には、出力データD2が、キャッュメモリ50から入力される。CPU701は、キャッシュアクセス要求信号S4及びキャッシュアドレスA2を出力する。   The CPU 701 receives a cache access acceptance signal S5 and a cache data ready signal S6 from the cache control unit 702. Further, output data D <b> 2 is input from the cache memory 50 to the CPU 701. The CPU 701 outputs a cache access request signal S4 and a cache address A2.

キャッシュ制御部702には、キャッシュアクセス要求信号S4及びキャッシュアドレスA2が、CPU701から入力される。また、キャッシュ制御部702には、スヌープ要求信号S1及びスヌープアドレスA1が、CPU80から入力される。また、キャッシュ制御部702には、出力データD2及びMiss信号S11が、キャッシュメモリ50から入力される。また、キャッシュ制御部702には、バスアクセス受付信号S8が、バス調停回路60から入力される。キャッシュ制御部702は、キャッシュアクセス受付信号S5、キャッシュデータレディ信号S6、スヌープ要求受付信号S2、スヌープデータレディ信号S3、バスアクセス要求信号S7、ライトバックデータD1、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10を出力する。   The cache control unit 702 receives a cache access request signal S4 and a cache address A2 from the CPU 701. In addition, the snoop request signal S1 and the snoop address A1 are input from the CPU 80 to the cache control unit 702. In addition, the output data D 2 and the Miss signal S 11 are input from the cache memory 50 to the cache control unit 702. Further, the bus access acceptance signal S8 is input from the bus arbitration circuit 60 to the cache control unit 702. The cache control unit 702 includes a cache access acceptance signal S5, a cache data ready signal S6, a snoop request acceptance signal S2, a snoop data ready signal S3, a bus access request signal S7, a write back data D1, a tag enable signal S9, an access address A3, And the cache access mode switching signal S10 is output.

CPU80には、スヌープ要求受付信号S2及びスヌープデータレディ信号S3が、キャッシュ制御部702から入力される。また、CPU80には、出力データD2が、キャッシュメモリ50から入力される。CPU80は、スヌープ要求信号S1及びスヌープアドレスA1を出力する。   The CPU 80 receives a snoop request acceptance signal S2 and a snoop data ready signal S3 from the cache control unit 702. Further, the CPU 80 receives output data D2 from the cache memory 50. The CPU 80 outputs a snoop request signal S1 and a snoop address A1.

キャッシュメモリ50には、タグイネーブル信号S9、アクセスアドレスA3、及び、キャッシュアクセスモード切替信号S10が、キャッシュ制御部702から入力される。キャッシュメモリ50は、Miss信号S11及び出力データD2を出力する。   A tag enable signal S9, an access address A3, and a cache access mode switching signal S10 are input from the cache control unit 702 to the cache memory 50. The cache memory 50 outputs a Miss signal S11 and output data D2.

CPU701は、キャッシュメモリ50内に格納されているデータを読み出す場合、キャッシュアクセス要求信号S4及びキャッシュアドレスA2を出力する。キャッシュアクセス要求信号S4及びキャッシュアドレスA2は、キャッシュ制御部702に入力される。   When reading data stored in the cache memory 50, the CPU 701 outputs a cache access request signal S4 and a cache address A2. The cache access request signal S4 and the cache address A2 are input to the cache control unit 702.

キャッシュ制御部702は、キャッシュアクセス要求信号S4を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、キャッシュアクセス受付信号S5と、タグイネーブル信号S9と、キャッシュアドレスA2に基づきアクセスアドレスA3とを出力する。キャッシュアクセス受付信号S5は、CPU701に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 702 receives the cache access request signal S4, if the cache memory 50 is in an accessible state, the cache control unit 702 outputs the cache access acceptance signal S5, the tag enable signal S9, and the access address A3 based on the cache address A2. Output. The cache access acceptance signal S5 is input to the CPU 701. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU80は、キャッシュメモリ50内に格納されているデータを読み出す場合、スヌープ要求信号S1及びスヌープアドレスA1を出力する。スヌープ要求信号S1及びスヌープアドレスA1は、キャッシュ制御部702に入力される。   When reading data stored in the cache memory 50, the CPU 80 outputs a snoop request signal S1 and a snoop address A1. The snoop request signal S1 and the snoop address A1 are input to the cache control unit 702.

キャッシュ制御部702は、スヌープ要求信号S1を受け付けると、キャッシュメモリ50がアクセス可能な状態であれば、スヌープ要求受付信号S2と、タグイネーブル信号S9と、スヌープアドレスA1に基づきアクセスアドレスA3とを出力する。スヌープ要求受付信号S2は、CPU80に入力される。タグイネーブル信号S9及びアクセスアドレスA3は、キャッシュメモリ50に入力される。   When the cache control unit 702 receives the snoop request signal S1, if the cache memory 50 is accessible, the cache control unit 702 outputs the snoop request reception signal S2, the tag enable signal S9, and the access address A3 based on the snoop address A1. To do. The snoop request acceptance signal S2 is input to the CPU 80. The tag enable signal S9 and the access address A3 are input to the cache memory 50.

CPU701及びCPU80からキャッシュメモリ50への各アクセスに関して、キャッシュ制御部702は、上記実施の形態1と同様の2サイクルアクセスモード及び1サイクルアクセスモードを有している。   With respect to each access from the CPU 701 and CPU 80 to the cache memory 50, the cache control unit 702 has a two-cycle access mode and a one-cycle access mode similar to those in the first embodiment.

キャッシュ制御部702は、2サイクルアクセスモードでのアクセス要求に連続して1サイクルアクセスモードでのアクセス要求が発生したことに起因して、2サイクルアクセスモードでアクセスする期間(第1のアクセス期間)の一部に1サイクルアクセスモードでアクセスする期間(第2のアクセス期間)が重複することとなる場合、上記第2のアクセス期間におけるアクセスを2サイクルアクセスモードに変更する。例えば図22に示した例を参照すると、2サイクルアクセスモードでアクセスする第1のアクセス期間(サイクル期間P2の後半からサイクル期間P4の前半)の後半部分に、1サイクルアクセスモードでアクセスする第2のアクセス期間(サイクル期間P3の後半からサイクル期間P4の前半)が重複している。従って、キャッシュ制御部702は、上記第2のアクセス期間におけるアクセスAC3を、1サイクルアクセスモードから2サイクルアクセスモードに変更する。   The cache control unit 702 accesses in the 2-cycle access mode due to the occurrence of the access request in the 1-cycle access mode following the access request in the 2-cycle access mode (first access period). If a period (second access period) for accessing a part of the second access period overlaps, the access in the second access period is changed to the two-cycle access mode. For example, referring to the example shown in FIG. 22, the second access to the second half of the first access period (the second half of the cycle period P2 to the first half of the cycle period P4) to be accessed in the two-cycle access mode. Access periods (the second half of the cycle period P3 to the first half of the cycle period P4) overlap. Accordingly, the cache control unit 702 changes the access AC3 in the second access period from the 1-cycle access mode to the 2-cycle access mode.

図24は、本実施の形態7に係るキャッシュシステムに関して、アクセスモードが切り替わる状況を示すタイミングチャートである。図22に示した例と同様に、サイクル期間P1においては、2サイクルアクセスモードの判定条件を満たしたことにより、2サイクルアクセスモードによるアクセス要求(アクセスAC1)が発生している。また、サイクル期間P1に連続するサイクル期間P2においても、2サイクルアクセスモードの判定条件を満たしたことにより、2サイクルアクセスモードによるアクセス要求(アクセスAC2)が発生している。また、サイクル期間P2に連続するサイクル期間P3においては、1サイクルアクセスモードの判定条件を満たしたことにより、1サイクルアクセスモードによるアクセス要求(アクセスAC3)が発生している。   FIG. 24 is a timing chart illustrating a situation where the access mode is switched in the cache system according to the seventh embodiment. Similar to the example shown in FIG. 22, in the cycle period P1, an access request (access AC1) in the 2-cycle access mode is generated because the determination condition for the 2-cycle access mode is satisfied. Also, in the cycle period P2 that is continuous with the cycle period P1, the access request (access AC2) in the 2-cycle access mode is generated because the determination condition for the 2-cycle access mode is satisfied. Further, in the cycle period P3 continuous to the cycle period P2, the access request (access AC3) in the one-cycle access mode is generated because the determination condition for the one-cycle access mode is satisfied.

キャッシュ制御部702は、1サイクルアクセスモードでのアクセスAC3が2サイクルアクセスモードでのアクセスAC2に連続していることを判別すると、アクセスAC3に対応するキャッシュアクセスモード切替信号S10を、「H」レベルから「L」レベルに変更する。これにより、アクセスAC3のアクセスモードが、1サイクルアクセスモードから2サイクルアクセスモードに変更される。   When the cache control unit 702 determines that the access AC3 in the one-cycle access mode is continuous with the access AC2 in the two-cycle access mode, the cache control unit 702 sets the cache access mode switching signal S10 corresponding to the access AC3 to the “H” level. To “L” level. Thereby, the access mode of the access AC3 is changed from the 1-cycle access mode to the 2-cycle access mode.

なお、2サイクルアクセスモードでのアクセスの後に1サイクルアクセスモードでのアクセスが実行される場合であっても、1サイクルアクセスモードでのアクセスが2サイクルアクセスモードでのアクセスに連続していない場合には、図21と同様の動作が行われる。   In addition, even when the access in the 1 cycle access mode is executed after the access in the 2 cycle access mode, the access in the 1 cycle access mode is not continuous with the access in the 2 cycle access mode. The same operation as in FIG. 21 is performed.

図25は、キャッシュ制御部702の構成の一部を示すブロック図である。キャッシュ制御部702は、切替信号生成回路60を有している。切替信号生成回路60は、アクセスサイクル判定回路61、AND回路62,63,65、及び、フリップフロップ64を有している。アクセスサイクル判定回路61の出力端子は、AND回路63,65の各第1の入力端子に接続されている。AND回路63の出力端子は、フリップフロップ64の入力端子に接続されている。フリップフロップ64の出力端子は、AND回路62の第1の入力端子と、AND回路65の第2の入力端子とに接続されている。AND回路65からは、キャッシュアクセスモード切替信号S10が出力される。AND回路62の第2の入力端子には、タグイネーブル信号S9が入力される。AND回路62の出力端子は、AND回路63の第2の入力端子に接続されている。   FIG. 25 is a block diagram illustrating a part of the configuration of the cache control unit 702. The cache control unit 702 has a switching signal generation circuit 60. The switching signal generation circuit 60 includes an access cycle determination circuit 61, AND circuits 62, 63 and 65, and a flip-flop 64. The output terminal of the access cycle determination circuit 61 is connected to each first input terminal of the AND circuits 63 and 65. The output terminal of the AND circuit 63 is connected to the input terminal of the flip-flop 64. The output terminal of the flip-flop 64 is connected to the first input terminal of the AND circuit 62 and the second input terminal of the AND circuit 65. A cache access mode switching signal S10 is output from the AND circuit 65. A tag enable signal S9 is input to the second input terminal of the AND circuit 62. The output terminal of the AND circuit 62 is connected to the second input terminal of the AND circuit 63.

アクセスサイクル判定回路61は、通常は「H」レベルの信号を出力し、2サイクルアクセスモードでキャッシュメモリ50へのアクセスを行う場合には、1サイクル期間だけ「L」レベルの信号を出力する。   The access cycle determination circuit 61 normally outputs an “H” level signal, and outputs an “L” level signal only for one cycle period when accessing the cache memory 50 in the two-cycle access mode.

アクセスサイクル判定回路61が1サイクル期間だけ「L」レベルの信号を出力すると、この1サイクル期間と、この1サイクル期間に続く次の1サイクル期間とにおいて、「L」レベルのキャッシュアクセスモード切替信号S10が出力される。   When the access cycle determination circuit 61 outputs an “L” level signal for only one cycle period, an “L” level cache access mode switching signal is output during this one cycle period and the next one cycle period following this one cycle period. S10 is output.

一方、アクセスサイクル判定回路61が「H」レベルの信号を出力すると、同一のサイクル期間内にタグメモリへのアクセスがあり、かつ、2サイクルアクセスモードでのデータメモリへのアクセスがある場合には、「L」レベルの信号がフリップフロップ64へ入力される。また、それ以外の場合には、「H」レベルの信号がフリップフロップ64へ入力される。AND回路65は、フリップフロップ64から入力される信号と、アクセスサイクル判定回路61から入力される信号との論理積をとり、キャッシュアクセスモード切替信号S10として出力する。   On the other hand, when the access cycle determination circuit 61 outputs an “H” level signal, there is an access to the tag memory within the same cycle period, and there is an access to the data memory in the 2-cycle access mode. , “L” level signals are input to the flip-flop 64. In other cases, an “H” level signal is input to the flip-flop 64. The AND circuit 65 takes a logical product of the signal input from the flip-flop 64 and the signal input from the access cycle determination circuit 61 and outputs the logical product as the cache access mode switching signal S10.

なお、本実施の形態7に係るキャッシュシステムにおいて、1サイクルアクセスモード及び2サイクルアクセスモードの各判定条件は、上記実施の形態1〜6で説明した判定条件に限定されるものではなく、どのようなものであってもよい。   In the cache system according to the seventh embodiment, the determination conditions for the one-cycle access mode and the two-cycle access mode are not limited to the determination conditions described in the first to sixth embodiments. It may be anything.

このように本実施の形態7に係るキャッシュシステムによれば、キャッシュ制御部702は、1サイクルアクセスモードでのアクセスAC3が2サイクルアクセスモードでのアクセスAC2に連続していることを判別すると、アクセスAC3のアクセスモードを、1サイクルアクセスモードから2サイクルアクセスモードに変更する。従って、1サイクルアクセスモードに切り替えても高速動作が実現できない場合に2サイクルアクセスモードが維持されることによって、消費電力を抑制することが可能となる。   As described above, according to the cache system according to the seventh embodiment, when the cache control unit 702 determines that the access AC3 in the one-cycle access mode is continuous with the access AC2 in the two-cycle access mode, The AC3 access mode is changed from the 1-cycle access mode to the 2-cycle access mode. Therefore, when the high-speed operation cannot be realized even when the mode is switched to the 1-cycle access mode, the 2-cycle access mode is maintained, so that the power consumption can be suppressed.

本発明の実施の形態1に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of a semiconductor device in which a cache system according to a first embodiment of the present invention is mounted. 本発明の実施の形態1に係るキャッシュシステムに関して、キャッシュ制御部の構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of a cache control part regarding the cache system which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るキャッシュシステムに関して、キャッシュ制御部の構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of a cache control part regarding the cache system which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るキャッシュシステムに関して、キャッシュメモリの具体的な構成を示すブロック図である。1 is a block diagram showing a specific configuration of a cache memory in the cache system according to Embodiment 1 of the present invention. 本発明の実施の形態1に係るキャッシュシステムに関して、キャッシュアクセスモード切替装置の具体的な構成を示すブロック図である。1 is a block diagram showing a specific configuration of a cache access mode switching device in the cache system according to Embodiment 1 of the present invention. 本発明の実施の形態1に係るキャッシュシステムに関して、2サイクルアクセスモードで動作している場合のキャッシュメモリの各部の波形を示したタイミングチャートである。4 is a timing chart showing waveforms of respective parts of the cache memory when operating in the two-cycle access mode with respect to the cache system according to the first embodiment of the present invention. 本発明の実施の形態1に係るキャッシュシステムに関して、1サイクルアクセスモードで動作している場合のキャッシュメモリの各部の波形を示したタイミングチャートである。5 is a timing chart showing waveforms of respective parts of the cache memory when operating in the one-cycle access mode with respect to the cache system according to the first embodiment of the present invention. 本発明の実施の形態2に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device with which the cache system which concerns on Embodiment 2 of this invention is mounted. 本発明の実施の形態2に係るキャッシュシステムに関して、キャッシュ制御部の構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of a cache control part regarding the cache system which concerns on Embodiment 2 of this invention. 本発明の実施の形態3に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device with which the cache system which concerns on Embodiment 3 of this invention is mounted. 本発明の実施の形態3に係るキャッシュシステムに関して、キャッシュ制御部の構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of a cache control part regarding the cache system which concerns on Embodiment 3 of this invention. 本発明の実施の形態4に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device with which the cache system based on Embodiment 4 of this invention is mounted. 本発明の実施の形態4に係るキャッシュシステムに関して、キャッシュ制御部の構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of a cache control part regarding the cache system which concerns on Embodiment 4 of this invention. 本発明の実施の形態5に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device with which the cache system based on Embodiment 5 of this invention is mounted. 本発明の実施の形態5に係るキャッシュシステムの構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of the cache system which concerns on Embodiment 5 of this invention. 本発明の実施の形態5に係るキャッシュシステムの構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of the cache system which concerns on Embodiment 5 of this invention. 本発明の実施の形態5に係るキャッシュシステムの構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of the cache system which concerns on Embodiment 5 of this invention. 本発明の実施の形態5に係るキャッシュシステムに関して、キャッシュ制御部の構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of a cache control part regarding the cache system which concerns on Embodiment 5 of this invention. 本発明の実施の形態6に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device with which the cache system which concerns on Embodiment 6 of this invention is mounted. 本発明の実施の形態6に係るキャッシュシステムに関して、キャッシュ制御部の構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of a cache control part regarding the cache system which concerns on Embodiment 6 of this invention. 本発明の実施の形態1〜6に係るキャッシュシステムに関して、アクセスモードが切り替わる状況を示すタイミングチャートである。It is a timing chart which shows the condition where an access mode switches regarding the cache system which concerns on Embodiment 1-6 of this invention. 本発明の実施の形態1〜6に係るキャッシュシステムに関して、アクセスモードが切り替わる状況を示すタイミングチャートである。It is a timing chart which shows the condition where an access mode switches regarding the cache system which concerns on Embodiment 1-6 of this invention. 本発明の実施の形態7に係るキャッシュシステムが搭載されている半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device with which the cache system based on Embodiment 7 of this invention is mounted. 本発明の実施の形態7に係るキャッシュシステムに関して、アクセスモードが切り替わる状況を示すタイミングチャートである。It is a timing chart which shows the condition where an access mode switches regarding the cache system which concerns on Embodiment 7 of this invention. 本発明の実施の形態7に係るキャッシュシステムに関して、キャッシュ制御部の構成の一部を示すブロック図である。It is a block diagram which shows a part of structure of a cache control part regarding the cache system which concerns on Embodiment 7 of this invention.

符号の説明Explanation of symbols

1,80,201,301,401,501,601,701 CPU、2,202,302,402,502,602,702 キャッシュ制御部、50 キャッシュメモリ。
1, 80, 201, 301, 401, 501, 601, 701 CPU, 2, 202, 302, 402, 502, 602, 702 Cache control unit, 50 cache memory.

Claims (10)

キャッシュメモリと、
前記キャッシュメモリを制御するキャッシュ制御部と、
前記キャッシュ制御部を介して前記キャッシュメモリにアクセス可能なプロセッサと
を備え、
前記キャッシュメモリには、前記プロセッサとは異なる機能ブロックからも、前記キャッシュ制御部を介してアクセス可能であり、
前記プロセッサから前記キャッシュメモリへのアクセスに関して、前記キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、前記第1の速度よりも早い第2の速度、かつ前記第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、
前記キャッシュ制御部は、前記機能ブロックから前記キャッシュメモリへのアクセスの状況に応じて、前記第1のモードと前記第2のモードとを切り替える、キャッシュシステム。
Cache memory,
A cache control unit for controlling the cache memory;
A processor accessible to the cache memory via the cache control unit,
The cache memory can be accessed from the functional block different from the processor via the cache control unit,
Regarding the access to the cache memory from the processor, the cache control unit can switch to each other at a first speed and a first mode that is accessed at a first power consumption, and is faster than the first speed. And a second mode for accessing at a second speed and a second power consumption higher than the first power consumption,
The cache control unit, wherein the cache control unit switches between the first mode and the second mode according to a state of access from the functional block to the cache memory.
前記キャッシュ制御部は、前記第1のモードで前記プロセッサが前記キャッシュメモリへアクセスしている状態において、前記機能ブロックから前記キャッシュメモリへのアクセス要求を受けた場合、前記第1のモードを前記第2のモードに切り替える、請求項1に記載のキャッシュシステム。   When the cache controller receives an access request to the cache memory from the functional block while the processor is accessing the cache memory in the first mode, the cache control unit changes the first mode to the first mode. The cache system according to claim 1, wherein the mode is switched to a second mode. キャッシュメモリと、
前記キャッシュメモリを制御するキャッシュ制御部と、
前記キャッシュ制御部を介して前記キャッシュメモリにアクセス可能なプロセッサと
を備え、
前記プロセッサから前記キャッシュメモリへのアクセスに関して、前記キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、前記第1の速度よりも早い第2の速度、かつ前記第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、
前記キャッシュ制御部は、前記プロセッサから前記キャッシュメモリへのアクセス要求を受け付けることができるか否かに応じて、前記第1のモードと前記第2のモードとを切り替える、キャッシュシステム。
Cache memory,
A cache control unit for controlling the cache memory;
A processor accessible to the cache memory via the cache control unit,
Regarding the access from the processor to the cache memory, the cache control unit can switch to each other at a first speed and a first mode that is accessed at a first power consumption, and is faster than the first speed. And a second mode for accessing at a second speed and a second power consumption higher than the first power consumption,
The cache system, wherein the cache control unit switches between the first mode and the second mode depending on whether or not an access request to the cache memory can be received from the processor.
前記キャッシュ制御部は、前記第1のモードで前記プロセッサが前記キャッシュメモリへアクセスしている状態において、前記プロセッサから前記キャッシュメモリへの新たなアクセス要求を受け付けることができない場合、前記第1のモードを前記第2のモードに切り替える、請求項3に記載のキャッシュシステム。
When the processor is accessing the cache memory in the first mode and the cache control unit cannot accept a new access request to the cache memory from the processor, The cache system according to claim 3, wherein the cache system is switched to the second mode.
前記キャッシュメモリには、前記プロセッサとは異なる機能ブロックからも、前記キャッシュ制御部を介してアクセス可能であり、
前記機能ブロックから前記キャッシュメモリへのアクセスに関しても、前記キャッシュ制御部は、互いに切替可能な、前記第1のモードと前記第2のモードとを有しており、
前記キャッシュ制御部は、前記第1のモードで前記機能ブロックが前記キャッシュメモリへアクセスしている状態において、前記プロセッサから前記キャッシュメモリへのアクセス要求を受け付けることができない場合、前記第1のモードを前記第2のモードに切り替える、請求項3に記載のキャッシュシステム。
The cache memory can be accessed from the functional block different from the processor via the cache control unit,
Regarding the access from the functional block to the cache memory, the cache control unit has the first mode and the second mode that can be switched to each other,
In the state where the functional block is accessing the cache memory in the first mode, the cache control unit is configured to change the first mode when the processor cannot accept an access request to the cache memory. The cache system according to claim 3, wherein the cache system is switched to the second mode.
キャッシュメモリと、
前記キャッシュメモリを制御するキャッシュ制御部と、
前記キャッシュ制御部を介して前記キャッシュメモリにアクセス可能なプロセッサと
を備え、
前記キャッシュメモリには、前記プロセッサとは異なる機能ブロックからも、前記キャッシュ制御部を介してアクセス可能であり、
前記プロセッサ及び前記機能ブロックから前記キャッシュメモリへの各アクセスに関して、前記キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、前記第1の速度よりも早い第2の速度、かつ前記第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、
前記キャッシュ制御部は、前記プロセッサから前記キャッシュメモリへのアクセス要求と、前記機能ブロックから前記キャッシュメモリへのアクセス要求とを重複して受けた場合、前記プロセッサ及び前記機能ブロックから前記キャッシュメモリへの各アクセスを、いずれも前記第2のモードで実行する、キャッシュシステム。
Cache memory,
A cache control unit for controlling the cache memory;
A processor accessible to the cache memory via the cache control unit,
The cache memory can be accessed from the functional block different from the processor via the cache control unit,
With respect to each access from the processor and the functional block to the cache memory, the cache control unit can switch between each other at a first speed and at a first power consumption, and the first mode. And a second mode for accessing at a second speed higher than the first power consumption and at a second power consumption higher than the first power consumption,
When the cache control unit receives an access request from the processor to the cache memory and an access request from the functional block to the cache memory, the cache control unit transfers the cache memory from the processor and the functional block to the cache memory. A cache system that executes each access in the second mode.
キャッシュメモリと、
前記キャッシュメモリを制御するキャッシュ制御部と、
前記キャッシュ制御部を介して前記キャッシュメモリにアクセス可能なプロセッサと
を備え、
前記プロセッサから前記キャッシュメモリへのアクセスに関して、前記キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、前記第1の速度よりも早い第2の速度、かつ前記第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、
前記キャッシュ制御部は、分岐命令の実行に基づく前記プロセッサから前記キャッシュメモリへのアクセスが、前記キャッシュメモリからの特定の分岐先データの読み出しである場合、前記プロセッサから前記キャッシュメモリへのアクセスを前記第2のモードで実行する、キャッシュシステム。
Cache memory,
A cache control unit for controlling the cache memory;
A processor accessible to the cache memory via the cache control unit,
Regarding the access from the processor to the cache memory, the cache control unit can switch to each other at a first speed and a first mode that is accessed at a first power consumption, and is faster than the first speed. And a second mode for accessing at a second speed and a second power consumption higher than the first power consumption,
When the access from the processor to the cache memory based on execution of a branch instruction is a read of specific branch destination data from the cache memory, the cache control unit controls the access from the processor to the cache memory. A cache system that executes in the second mode.
キャッシュメモリと、
前記キャッシュメモリを制御するキャッシュ制御部と、
前記キャッシュ制御部を介して前記キャッシュメモリにアクセス可能なプロセッサと
を備え、
前記プロセッサから前記キャッシュメモリへのアクセスに関して、前記キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、前記第1の速度よりも早い第2の速度、かつ前記第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、
前記キャッシュ制御部は、前記プロセッサによってフェッチされた命令コード又は該命令コードのデコード結果を判定することにより、前記プロセッサから前記キャッシュメモリへのアクセスを、前記第1のモード又は前記第2のモードで実行する、キャッシュシステム。
Cache memory,
A cache control unit for controlling the cache memory;
A processor accessible to the cache memory via the cache control unit,
Regarding the access to the cache memory from the processor, the cache control unit can switch to each other at a first speed and a first mode that is accessed at a first power consumption, and is faster than the first speed. And a second mode for accessing at a second speed and a second power consumption higher than the first power consumption,
The cache control unit determines access to the cache memory from the processor in the first mode or the second mode by determining an instruction code fetched by the processor or a decoding result of the instruction code. The cache system to execute.
キャッシュメモリと、
前記キャッシュメモリを制御するキャッシュ制御部と、
前記キャッシュ制御部を介して前記キャッシュメモリにアクセス可能なプロセッサと
を備え、
前記プロセッサから前記キャッシュメモリへのアクセスに関して、前記キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、前記第1の速度よりも早い第2の速度、かつ前記第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、
前記キャッシュ制御部は、前記プロセッサから前記キャッシュメモリへアクセスされたが、前記プロセッサが必要とするデータが前記キャッシュメモリ内に格納されていない場合、前記プロセッサから前記キャッシュメモリへの次回のアクセスを前記第2のモードで実行する、キャッシュシステム。
Cache memory,
A cache control unit for controlling the cache memory;
A processor accessible to the cache memory via the cache control unit,
Regarding the access from the processor to the cache memory, the cache control unit can switch to each other at a first speed and a first mode that is accessed at a first power consumption, and is faster than the first speed. And a second mode for accessing at a second speed and a second power consumption higher than the first power consumption,
When the cache control unit is accessed from the processor to the cache memory, but the data required by the processor is not stored in the cache memory, the cache control unit performs the next access from the processor to the cache memory. A cache system that executes in the second mode.
キャッシュメモリと、
前記キャッシュメモリを制御するキャッシュ制御部と、
前記キャッシュ制御部を介して前記キャッシュメモリにアクセス可能なプロセッサと
を備え、
前記プロセッサから前記キャッシュメモリへのアクセスに関して、前記キャッシュ制御部は、互いに切替可能な、第1の速度、かつ第1の消費電力でアクセスする第1のモードと、前記第1の速度よりも早い第2の速度、かつ前記第1の消費電力よりも高い第2の消費電力でアクセスする第2のモードとを有しており、
前記キャッシュ制御部は、前記第1のモードでのアクセス要求に連続して前記第2のモードでのアクセス要求が発生したことに起因して、前記第1のモードでアクセスする第1のアクセス期間の一部に前記第2のモードでアクセスする第2のアクセス期間が重複することとなる場合、前記第2のアクセス期間におけるアクセスを前記第1のモードに変更する、キャッシュシステム。
Cache memory,
A cache control unit for controlling the cache memory;
A processor accessible to the cache memory via the cache control unit,
Regarding the access from the processor to the cache memory, the cache control unit can switch to each other at a first speed and a first mode that is accessed at a first power consumption, and is faster than the first speed. And a second mode for accessing at a second speed and a second power consumption higher than the first power consumption,
The cache control unit has a first access period in which access is made in the first mode because an access request in the second mode is generated following an access request in the first mode. A cache system that changes access in the second access period to the first mode when a second access period for accessing a part of the second access period overlaps in part in the second mode.
JP2003312617A 2003-09-04 2003-09-04 Cash system Expired - Fee Related JP4498705B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003312617A JP4498705B2 (en) 2003-09-04 2003-09-04 Cash system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003312617A JP4498705B2 (en) 2003-09-04 2003-09-04 Cash system

Publications (2)

Publication Number Publication Date
JP2005084712A JP2005084712A (en) 2005-03-31
JP4498705B2 true JP4498705B2 (en) 2010-07-07

Family

ID=34413821

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003312617A Expired - Fee Related JP4498705B2 (en) 2003-09-04 2003-09-04 Cash system

Country Status (1)

Country Link
JP (1) JP4498705B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011257800A (en) * 2010-06-04 2011-12-22 Panasonic Corp Cache memory device, program conversion device, cache memory control method, and program conversion method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000200217A (en) * 1999-01-06 2000-07-18 Toshiba Corp Instruction cache memory
JP2002169790A (en) * 2000-12-01 2002-06-14 Sharp Corp Semiconductor integrated circuit
JP2003150446A (en) * 2001-11-16 2003-05-23 Matsushita Electric Ind Co Ltd Cache memory
JP2003519836A (en) * 1999-12-31 2003-06-24 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ A method for managing a set associative cache using parallel and serial reads initiated while a processor is in a wait state
JP2003242029A (en) * 2002-02-15 2003-08-29 Hitachi Ltd Semi-conductor integrated circuit

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01154261A (en) * 1987-12-11 1989-06-16 Toshiba Corp Information processor
JPH01260690A (en) * 1988-04-08 1989-10-17 Fujitsu Ltd Memory access control system
JPH01292416A (en) * 1988-05-19 1989-11-24 Fuji Facom Corp System for reducing power consumption of processor
JPH08263370A (en) * 1995-03-27 1996-10-11 Toshiba Microelectron Corp Cache memory system
JPH0950403A (en) * 1995-06-01 1997-02-18 Hitachi Ltd Cache memory and microprocessor using the same
JPH09223068A (en) * 1996-02-15 1997-08-26 Toshiba Microelectron Corp Cache memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000200217A (en) * 1999-01-06 2000-07-18 Toshiba Corp Instruction cache memory
JP2003519836A (en) * 1999-12-31 2003-06-24 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ A method for managing a set associative cache using parallel and serial reads initiated while a processor is in a wait state
JP2002169790A (en) * 2000-12-01 2002-06-14 Sharp Corp Semiconductor integrated circuit
JP2003150446A (en) * 2001-11-16 2003-05-23 Matsushita Electric Ind Co Ltd Cache memory
JP2003242029A (en) * 2002-02-15 2003-08-29 Hitachi Ltd Semi-conductor integrated circuit

Also Published As

Publication number Publication date
JP2005084712A (en) 2005-03-31

Similar Documents

Publication Publication Date Title
US6105051A (en) Apparatus and method to guarantee forward progress in execution of threads in a multithreaded processor
EP1029269B1 (en) Method and apparatus for selecting thread switch events in a multithreaded processor
US6076157A (en) Method and apparatus to force a thread switch in a multithreaded processor
JP4119945B2 (en) Task processing device
US6963962B2 (en) Memory system for supporting multiple parallel accesses at very high frequencies
JP4127848B2 (en) Task processing device
JPH03129433A (en) Device and method for parallel processing
JP2004171177A (en) Cache system and cache memory controller
JPH04343151A (en) Memory access device
US5465344A (en) Microprocessor with dual-port cache memory for reducing penalty of consecutive memory address accesses
JP2007133456A (en) Semiconductor device
JP2001092662A (en) Processor core and processor using the same
US7636812B2 (en) Cache memory control method and cache memory control device
JPH08292918A (en) Validation device of system resource
US7376777B2 (en) Performing an N-bit write access to an M×N-bit-only peripheral
JP3790626B2 (en) Method and apparatus for fetching and issuing dual word or multiple instructions
JP4173858B2 (en) Instruction cache and method for reducing memory contention
US20030196072A1 (en) Digital signal processor architecture for high computation speed
JP4498705B2 (en) Cash system
KR100457478B1 (en) Memory access method and data processing system
US7606991B2 (en) Dynamic clock switch mechanism for memories to improve performance
JP3520372B2 (en) Elimination of critical path in operation of memory control unit and input / output control unit
JP2004094807A (en) Instruction cache, microprocessor, and design method for same
JP3956698B2 (en) Memory control device
JPH07210463A (en) Cache memory system and data processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060821

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20091110

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100114

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100202

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100324

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

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

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

Free format text: PAYMENT UNTIL: 20130423

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20130423

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20140423

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees