JP4307604B2 - Computer circuit system and method using partial cache cleaning - Google Patents
Computer circuit system and method using partial cache cleaning Download PDFInfo
- Publication number
- JP4307604B2 JP4307604B2 JP37702898A JP37702898A JP4307604B2 JP 4307604 B2 JP4307604 B2 JP 4307604B2 JP 37702898 A JP37702898 A JP 37702898A JP 37702898 A JP37702898 A JP 37702898A JP 4307604 B2 JP4307604 B2 JP 4307604B2
- Authority
- JP
- Japan
- Prior art keywords
- value
- address
- cache
- lines
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
【0001】
【発明の属する技術分野】
本実施例は、1つまたはそれ以上のキャッシュメモリを実現する計算機使用環境に関する。
【0002】
【発明が解決しようとする課題】
キャッシュ回路は、(たとえば、マイクロプロセッサなど)現代の計算システムにおいて、情報にアクセスするために必要な時間の潜在的な長さを短縮することによって、システムの性能を高めるために頻繁に使用される重要な構成要素である。普通、キャッシュ回路には、一般にランダムアクセスメモリ(RAM)であるタグメモリなど、各種の構成要素が含まれている。タグRAMは、一般に個別のキャッシュ・データRAMに格納されたキャッシュデータに対応する、いわゆるタグ情報を格納する。タグ情報には(たとえば、外部メモリ構造体のような)何らかの別のメモリデバイス内でキャッシュに入れられたデータ(cached data)を見つけることができる実際のアドレスのように、キャッシュに入れられたデータに対応する各種の特長が含まれている。回路の他の構成要素は、タグRAMに関連しているヒット検出回路である。(Nウエイ・セット・アソシアティヴ・キャッシュ回路(N-way set associative cache circuit)にはこの回路がn個ある)ヒット検出回路は、タグ情報の一部として格納されている実際のアドレスと、着信アドレス(incoming address)を比較する。この比較が一致すると、キャッシュ回路にヒットがあるという。つまり、キャッシュ・データRAMから、この着信アドレスで探索されるデータを直接検索することができ、反対にこの比較が一致しなければ、キャッシュ回路でミスがあるという。つまり、この着信アドレスで探索されるデータはキャッシュ・データRAMの中に位置していないか、何らかの別の理由であてにできない。キャッシュ・ミスの場合は、メイン・メモリ(つまり外部メモリ)など、メモリ階層の上位メモリか、システムの上位レベルに位置している別のキャッシュメモリからデータを検索しなければならない。したがって、キャッシュ・ミスの後のデータアクセスは、キャッシュ・ヒットの場合のアクセス時間に比較して、非常に長い時間が必要になる。実際、外部メモリから検索するためのアクセスの場合、キャッシュ・ヒットが発生したときのアクセス時間に比較すると、所要時間はかなり長くなるであろう。
【0003】
上述の説明は、キャッシュ・メモリが有利であると一般に考えられていることを示しているが、計算機および計算機使用環境がさらに複雑になると、キャッシュ動作をもっと詳細に精査して、さらに能率が追加するか否かを決定する必要がある。この点に関し、本発明者は、キャッシュ回路のある種の動作のコンテクストにおいて、いくつかのクロックサイクルを減少させることができることを確認している。キャッシュ動作に関連して使用されるクロックサイクルを減少させると、システムの速度が改善する。またこのクロックサイクルの減少は、携帯形コンピュータなど、多くの現代のシステムで大きな問題になっているシステム全体の電力消費を減少させることにもなる。
【0004】
【発明が解決しようとする課題】
1つの好適実施例の中に、計算システムを動作させる方法がある。この計算システムにはキャッシュ・メモリが含まれており、このキャッシュ・メモリには所定の数のキャッシュ・ラインがある。最初にこの方法は、複数の書込みアドレスに対して、その複数の書込みアドレスのそれぞれに対応する位置にあるキャッシュ・メモリにデータを書込む。次にこの方法は、キャッシュ・メモリ内の選択した数のラインをクリーニングする。クリーニングするステップは、選択した数のラインのそれぞれに対して、そのラインにおけるデータに対応するダーティ・インジケータを評価して、ダーティ・インジケータがそのライン内のデータがダーティであることを示している場合は、そのラインから他のメモリにデータをコピーする。最終的に、選択されたクリーニングするラインの数は、所定のキャッシュ・ラインの数より少ない。また、その他の回路、システムおよび方法が開示されているとともに請求の範囲に明記されている。
【0005】
【発明の実施の形態】
図1は、一般的な無線データプラットホーム10の好適実施例を示しており、この無線データプラットホームの中で、この本明細書中に説明されている各種のキャッシュの実施例を実現することができるとともに、この無線データプラットホームは、たとえば、スマートホン(Smartphone)または携帯コンピュータの実現に使用することができる。無線データ・プラットホーム10には、それぞれ対応する命令メモリ管理ユニット(MMU)12c、12dを備えた命令キャッシュ12aおよびデータキャッシュ12bを有する汎用(ホスト)プロセッサ12が含まれており、バッファ回路12eおよび動作コア12fも示されているが、これらの回路はすべてシステムバスSBUSを使用して交信する。SBUSには、データSBUSd、アドレスSBUSaおよび制御SBUScの導線が含まれている。(示されていない)自身の内部キャッシュを有するディジタル信号プロセッサ(DSP)14aおよび周辺装置インターフェース14bがSBUSに接続されている。示されていないが、ディジタル・アナログ変換器(DAC)またはネットワークインターフェースを含む各種周辺装置を周辺装置インターフェース14bに接続することができる。DSP14aおよび周辺装置インターフェース14bは、DMAインターフェース16に接続されており、DMAインターフェース16はさらにDMAコントローラ18に接続されている。またDMAコントローラ18は、LCDまたはビデオディスプレー22と交信するビデオまたはLCDコントローラ20と同様、SBUSに接続されている。DMAコントローラ18は、アドレスバス24a、データバス24dおよび制御バス24cを介してメイン・メモリに接続されているが、この好適実施例のメインメモリは同期ダイナミックランダムアクセスメモリ(SDRAM)24である。同様にDMAコントローラ18は、アドレスバス26a、データバス26dおよび制御バス26cを介して、1つ(または複数)のフラッシュメモリ26に接続されている。
【0006】
無線データ・プラットホーム10の一般的動作の側面は、無線データ・プラットホーム10が汎用プロセッサ12とDSP14aとの双方を使用していることを説明することによって、本発明の概念と関連して理解される。このように、1つのメモリを共用する複数のコアがあるので、後で説明する本発明の方法は、マルチコアシステムなどのシステム性能に各種の改善をもたらすことが理解できるであろう(これは、無線データ・プラットホーム10とは別のシステムの場合であってもよい)。また、以下に説明する本発明の側面の多くは、単一プロセッサシステムの動作を改善することもできることに注意されたい。
【0007】
次に本好適実施例のキャッシュの側面に注意を向けると、図2は、例として、図1の汎用プロセッサ12のデータキャッシュ12bのアーキテクチャを示している。これの構造を詳細に説明する前に、本発明の各種の教示は、命令キャッシュ12a、DSP14aの1つまたは両方のキャッシュ、または(たとえば、一体化されたキャッシュのような)プラットホーム10内のさらに別のキャッシュなど、他のキャッシュと関連して実現されうることが理解されるはずである。また、以下に説明する本発明の各種教示は、キャッシュ・メモリの恩恵を受けるであろうスマートホン、PDA、パームトップコンピュータ、ノートブックコンピュータ、デスクトップコンピュータなどを含む処理装置とともに使用されうる。最後に、データキャッシュ12bに関して各種の詳細が以下に示されるが、(たとえば、セット・アソシエーション、アレイ・サイズ、アドレスおよび記憶装置の長さなど)これらの詳細の多くは、説明を判りやすくする目的にすぎないことに注意されたい。
【0008】
次に図2に示すデータ・キャッシュ12bの詳細に注目すると、データ・キャッシュ12bには、メモリアドレスを受信するキャッシュ制御装置28が含まれているが、この場合のメモリアドレスは32ビットのデータアドレスDA[31:0]の一部分であり、この受信される部分には、メモリアドレスを受信するキャッシュ制御装置28が、32ビットのアドレスのビット「4」からビット「11」を受信することを示すビット「[11:4]」と、これと同様、32ビットのアドレスのビット「0」からビット「1」を受信することを示すビットDA[1:0]とが含まれている。キャッシュ制御装置28は、バーチャル・タグ・アレイ30vに接続されており、データ・アレイ32のラインに対応するタグを格納する。この点と後で行う考察の説明に関しては、バーチャル・タグ・アレイ30vはデータ・アレイ32の中の各ラインのダーティ・ビットを格納するが、この場合、ダーティ・データの表示は、データ・アレイ32にもってこられたデータが変更されたが、メモリシステム(たとえば、メイン・メモリ)の上位メモリに、その変更されたコピーが出力されていないことを表していることは、キャッシュ技術において公知である。またデータ・アレイ32の各ラインに対応して含まれている表示は、LRUインジケータ・アレイ34内のLRUビット(最近少しも使用されていないことを示すビット)および有効性インジケータ・アレイ36内の有効性ビットである。
【0009】
好適実施例においては、データ・キャッシュ12bは2ウエイセットアソシアティブキャッシュ(2way set associative cache)として配列されているので、タグ・アレイ30vには、それぞれ2つのプレイン30av、30bvがある。同様にデータ・アレイ32には、2つのメモリプレイン32a、32bがある。図示の実施例においては、各プレイン32a、32bは1024×32ビット(すなわち4バイト)であるから、16バイトのラインを形成するためには4つの連続したアドレスを必要とする。プレイン30av、30bvの出力は、それぞれの比較器38a、38bに出力される。DA[31:12]も両比較器38a、38bに接続されている。各比較器38a、38bは、それぞれウエイ1ヒット(Hit way1)およびウエイ2ヒット(Hit way2)と命名された1ビットの出力を発生させる。ウエイ1ヒット信号およびウエイ2ヒット信号は、それぞれの転送ゲート40a、40bの制御入力に接続され、各転送ゲートは、出力としてアドレスが指定されたデータ・アレイ32ビットのデータDD[31:0]を与える。
【0010】
セットアソシアティブキャッシュの動作は当技術では公知であるから、キャッシュ・クリーニング・プロセスに、より詳細に関連して後で行う考察で理解できる詳細な説明のコンテクストを与えるために、ここでは読取り動作だけについて要約されている。読取り動作に注目すると、メモリアクセスのためにアドレスDA[31:0]が受信されると、アドレスビットDA[11:4]は、バーチャル・タグ・アレイ30vの各プレインプレイン30av、30bvへのアドレスとして使用される。各プレイン30av、30bvは、そのアドレスに対応して、タグ・ビットTag_DA[31:12]を出力するが、この場合、そのタグにはデータ・アレイ32に格納されるデータのアドレスの表示が含まれている。次にビットDA[31:12]は、一致(すなわちヒット)するか否かを決定するため比較器38a、38bを介してそのタグと比較され、一致する場合は、比較器38a、38bのどちらかの出力が、それぞれウエイ1ヒット信号またはウエイ2ヒット信号を動作可能にする。この同じプロセス中に、この例ではビットDA[11:4]になっているアドレスのインデックス部がデータ・アレイのプレイン32a、32bに適用される。したがって、両プレインが、そのインデックスからの情報を出力して、ウエイ1ヒット信号またはウエイ2ヒット信号が動作可能になると、出力データDD[31:0]としてこれらのプレインのどれか1つの出力が現れる。いうまでもなく、キャッシュミスが発生すると(つまり、ウエイ1ヒット信号もウエイ2ヒット信号も動作可能にならないと)、メモリ階層におけるキャッシュ12bより上位のメモリからアドレス指定された情報が探索される。最後にタグメモリ内の各メモリアドレスに、アレイ・インジケータ36内の対応する有効性ビットがあるようになることを想起されたい。これらのビットは、キャッシュ内の対応する位置にあるデータが有効であるか否かを表示する。LRUアレイ・インジケータ34内のビットは、キャッシュミスの後、プレイン32a、32bのどのラインを更新するか決定する。
【0011】
データ・キャッシュ12bにはキャッシュ・クリーン機能も含まれているが、この機能は、次に図3のブロック図によって最初に機能的に詳細に説明するように、キャッシュ動作の能率を大幅に改善することができる。特に図3は、キャッシュ・クリーン機能に関する限り、キャッシュ制御装置28を非常に詳細に示している。キャッシュ制御装置28には、I_MAXと命名されたアドレスの値を格納するためのアドレス・レジスタ42が含まれており、後で判るように、このアドレス・レジスタ42は、次に説明する追加回路によって制御され、データアドレス・インデックス(つまりDA[11:4])のいくつかのコピーを格納する。アドレス・レジスタ42のアドレス入力は転送ゲート(passgate)44の出力に接続されており、このゲートには、アドレス・インデックスDA[11:4]を受信するために接続されているデータ入力がある。また、アドレス・インデックスDA[11:4]は比較器46の入力に接続されており、さらに比較器46はアドレス・レジスタ42に格納されたI_MAXの値を受信するように接続されている。以下、詳細に説明する理由から、データ・キャッシュ12bへの書込みに応答してキャッシュヒットが発生すると、比較器46は、I_MAXの値が着信アドレス・インデックスDA[11:4]より大きいか否かを決定し、大きい場合は、転送ゲート44の制御入力を動作可能にするので、その時の着信アドレス・インデックスDA[11:4]がアドレス・レジスタ42にコピーされて、I_MAXの値を更新する。
【0012】
図3について補足すると、キャッシュ制御装置28にはキャッシュ・クリーン処理回路48が含まれており、この回路48は、バーチャル・タグ・アレイ30vから与えられる1つの入力としてダーティ・ビットを受信するために接続されているとともに、以下、詳細に説明する機能を動作可能にするCACHE_CLEAN信号を受信するために接続されている。実際にCACHE_CLEAN信号は、レジスタ42内のI_MAXの値をクリアーするために接続されることに注意されたい。またレジスタ42内のI_MAXの値は、キャッシュ・クリーン処理回路48に対する入力である。キャッシュ・クリーン処理回路48の構造は、次に述べる図4、5の説明から判るように、キャッシュ・クリーン処理回路48の機能が与えられている各種の代替回路から当業者によって選択されうる。
【0013】
図4は、全体を参照番号50で示す方法の流れ図を示しており、この流れ図はデータ・アレイ32の書込みに関するキャッシュ制御装置28の好適動作を説明しているが、かかる方法の大部分は、図3に示す回路ブロックの動作を介して達成される。方法50はステップ52で開始し、ここで(レジスタ42内の)I_MAXの値がゼロにクリアーされる。好適実施例においては、CACHE_CLEAN信号を立ち上げることによって、このステップを達成することができることに注意されたい。さらにこの点について、本実施例が、コンテクストスイッチを含む動作に関連して改善をもたらしていることは、方法50の考察の結論によって理解できるであろう。示されていないが、実際にステップ52は、第1のコンテクストスイッチに対する応答に伴うデータ・キャッシュ12bの初期化の重要な役割であろう。コンテクストスイッチは当業者には公知の用語であるにしても、これらの代替方法を説明した後では、コンテクストスイッチの意味を吟味することは、本明細書の読者のために役立つであろう。コンテクストスイッチは、オペレーティングシステムによって頻繁に実行される外部割り込みまたはクロックタイマーの満了など、いろいろな事象(events)に応答して発生する。このスイッチがプロセスの変更に関連していることは、プラットホーム10または各種動作が複数のプロセスに分かれている、他のプロセッサに制御されるシステムの中で判ることである。各プロセスは各種の事項(matters)によって定義されており、しかもこれらの事項には、プロセスによって使用されるメモリの領域、プロセスの入出力マッピング、アドレス変換のようなプロセスのメモリ管理、および通常は汎用レジスタに格納される値を特長づけるプロセスが含まれることが多い。コンテクストスイッチは、現在のプロセスが新しいプロセスに変更される場合に発生する。このため、次のプロセス(または、いくつかの別のプロセス)が正しく動作するように、この最新のプロセスに関するこれらの側面のそれぞれを説明する情報を格納する必要がある場合、現在の最新プロセスであることが、もう一度切り替えられると、そのプロセスが再び最新プロセスになるように、この情報を検索することができる。
【0014】
次に方法50に戻ると、ステップ52の後、流れはステップ54に続く。ステップ54は、データ・キャッシュ12bを含むメモリシステムに書込みアドレスが発行されることを表している。したがって、図1を簡単に振り返ってみると、SDRAM24にデータを書込むためコア12fがアドレスを発行するとステップ52の実例が発生するのであるから、SDRAM24は、下位レベルにあるデータ・キャッシュ12bを含むメモリシステムの中では上位にあることに注意されたい。次に方法50はステップ54からステップ56に続く。
【0015】
ステップ56は、ステップ54で発行された書込みアドレスに応答して、データ・キャッシュ12bでヒットが発生するか否かを決定する。キャッシュヒットが発生しないと(つまりキャッシュミスが発生すると)、方法50はステップ56からステップ58に続く。逆に、キャッシュヒットが発生すると、方法50はステップ56からステップ60に続く。これらの代替経路のそれぞれを以下に説明する。
【0016】
ステップ58の場合に注目するとともに、キャッシュミスに応答してステップ58が発生することを認識すると、ステップ58は、キャッシュ技術で公知の方法と同様に単独で動作する。特にステップ58は、データ・キャッシュ12b以外の記憶回路の中のアドレス位置にデータを書込む。たとえばプラットホーム10においては、この書込みはSDRAM24内の適切なアドレスに対して行われる。
【0017】
キャッシュヒットが発生すると実行されるステップ60の場合に注目すると、ステップ60は、現在のアドレス・インデックスDA[11:4]の値がI_MAXの値より大きいか否かを決定する。しばらく図3に戻ると、ステップ60の動作は比較器46によって達成されうることに注意されたい。アドレス・インデックスDA[11:4]の値がI_MAXの値より大きい場合、方法50はステップ60からステップ62に続き、そうでない場合は、方法50はステップ64に進むが、まずステップ62の動作を検討した後、これについて以下に説明する。アドレス・インデックスDA[11:4]の値がI_MAXの値より大きいため、すでに到達しているステップ62は、新しいI_MAXの値として、最新のアドレス・インデックスDA[11:4]を格納する。この点について、2つの事項に注意されたい。第1に、I_MAXの値がステップ52でクリアーされてから、初めてステップ60に到達し、かつアドレス・インデックスDA[11:4]の値がゼロでない場合、ステップ60は、この方法の流れをステップ62に移しているはずであるから、I_MAXの値は、最新のアドレス・インデックスまで増加している。第2に再び図3に戻ると、ステップ62は、比較器46の出力と、転送ゲート44に対する比較器46の制御とによって実行される。特にステップ60を実行する際、比較器46が、DA[11:4]がI_MAXの値以上になっていると決定すると、レジスタ42にDA[11:4]がコピーされて、DA[11:4]が、I_MAXの新しい値になるように、比較器46の出力が転送ゲート44を動作可能にする。次に方法50はステップ62からステップ64に続く。
【0018】
ステップ64は、ステップ54で指定されたアドレスで、データ・アレイ32に問題のデータを書込む。また、バーチャル・タグ・アレイ30v内のダーティ・ビットと書込まれたデータに対応するキャッシュ・ラインとは、ダーティの状態に設定される。次に方法50はステップ64からステップ66に続く。ステップ66は待ち合わせ状態を表しており、ここで、方法50は2つの事象のうちの1つを待ち合わせるが、その2つの事象は、別の書込みアドレスまたはコンテクストスイッチの発行である。別の書込みアドレスが発行されると、方法50はステップ66からステップ54に戻る。そのとき、先行ステップが再び発生し、新しく発行された書込みアドレスのインデックスがI_MAXの最新の値より大きい場合、そのインデックスがI_MAXの新しい値になるであろうことは、当業者には理解できるであろう。実際にこのループ動作は、連続する多数の書込みに対して発生し、そのたびに先行ステップが動作するため、I_MAXは増加するであろう。次に最新のコンテクストスイッチの効果に注目すると、方法50は、先行ステップが続き、ステップ66からステップ68に続くので、この時のI_MAXの値は、最後のコンテクストスイッチ以降かつ最新のコンテクストスイッチの前に書込まれているアドレス・インデックスの最大値を表すことは、上述のことから理解されるはずである。
【0019】
ステップ68はキャッシュクリーンプロセスを表しているが、後で判るように、このキャッシュクリーンプロセスは、従来の技術とは対照的に性能と効率を劇的に改善することができる。詳細に説明すると、ステップ68は以下のことを表している。すなわち、I_MAXに等しいLの値から小さくなり、Lの値が0に等しくなるまでのLのループに対してステップ70が発生して、Lに等しいアドレスをもつ各キャッシュ・ラインがクリーニングされることを表している。換言すると、Lの値は、I_MAXから始まって小さくなり、0に等しくなるときまでの間一貫して、ステップ68にくるたびに小さくなり、流れは、ステップ70のクリーニング動作に続き、次の反復のためステップ68に戻ってループする。ステップ70に注目すると、キャッシュ・ラインのクリーニングは当業者には公知であり、そのラインのタグ(または複数のタグ)を評価して、そのライン内のどのデータがダーティであるか否かを決定することが含まれている。本実施例におけるこの動作は、CACHE_CLEAN信号によって動作可能になる図3のキャッシュ・クリーン処理回路48によって制御される。このプロセスは、そのラインにダーティ・データが含まれているか否かを決定し、含まれている場合は、そのデータ(またはライン全体)が上位メモリに書込まれる。それとは反対に、所定のラインに対してそのラインのダーティ・ビット(または複数のダーティ・ビット)が、そのライン全体がクリーンなことを示していると、そのダーティ・ビット(または複数のダーティ・ビット)に対応するデータ・ラインは、上位メモリに書出されない。
【0020】
上記の説明から、詳細にはI_MAXとステップ68、70の効果から、コンテクストスイッチの後、データ・キャッシュ12bがクリーニングされるが、クリーニングプロセスはキャッシュのアドレス0から、コンテクストスイッチの前に書込まれた(つまりI_MAXに格納された)最上位キャッシュアドレスまでを対照にしているにすぎないことは、当業者には理解されるはずである。この方法は、例を示すことによってよく理解されるであろう。ステップ52の後、それぞれのインデックス・アドレス0、2、4、6および8に対し、連続する5つのキャッシュ書込みがあり、これらの書込みの後にコンテクストスイッチがあるとする。したがって、この時点のI_MAXの値は8に等しく、ステップ68、70は、コンテクストスイッチに応答して、アドレス0からアドレス32までのデータ・アレイ32をクリーニングするにすぎない。次に、かかる動作は従来の技術とまったく異なることに注意されたい。特に従来の技術においては、コンテクストスイッチに応答して全キャッシュがクリーニングされる。したがって、各キャッシュ・ラインの内容がダーティであるか否かを決定するために、各キャッシュ・ラインが評価され、ダーティな場合は、それらのダーティの内容を上位メモリに書出す。この違いがあるので、本発明の実施例がかなり能率的になることは、当業者には理解されるはずである。説明のためと、5つの連続アドレスの例に戻る手段として、キャッシュには255までのアドレスが含まれているものとする。かかる場合、従来の技術は、9から255までのアドレスのそれぞれを評価してクリーニングするため、余計な時間を使うであろうが、アドレス指定できるラインごとに1つクロックサイクルがある以上、そうなることは当然である。これとは反対に、好適実施例は、キャッシュ全体より小さいどこかのポイントでクリーニング動作を停止するが、説明したばかりの実施例における中止ポイントは、コンテクストの変更以前に書込まれた最上位アドレスのクリーニングが終了した後である(現在の例では、そのアドレスは8である)。したがって、クリーニング動作に必要な全クロックサイクルの数を大幅に減少させることができ、このクロックサイクル数の減少によって全体の電力消費量も低減する。また、プラットホーム10に実際に起きる環境のように、頻繁にコンテクストスイッチが発生する環境では、各コンテクストスイッチが発生するたびに、好適実施例の能率が累積される。コンテクストスイッチが発生する合間に数回のキャッシュ書込みがあるにすぎない場合は、この総合的能率は非常に有効であると断言できる。
【0021】
またステップ68に関する上記考察から、ステップ68はアドレス0までクリーニングプロセスを進めることに注意されたい。この方法は、キャッシュの大きさから独立しているので望ましい方法である。したがってどんな場合でも、このような方法に対しては、アドレス0までのクリーニング動作が終了すると、ダーティ・データをもつラインがメイン・メモリに書出されることが想定される。しかし、このような観察ができるため、アドレス0のデータまたはアドレス0に近いデータが変化しているように思われない場合には、2つの代替方法が使用できることに注意されたい。この2つの代替方法のそれぞれを以下に説明する。
【0022】
上で考察したI_MAXの方法の第1の代替方法においては、所定のコンテクストスイッチに対してキャッシュヒットを発生させる最低位のアドレス・インデックスを決定するため第2のアドレスの値が確定され、I_MAXの値とともにこの第2の値が使用される。したがって、この第2の値をI_MINと命名することにすると、当初この値を大きな値(たとえば、キャッシュの最上位のアドレス)に設定し、所定のコンテクストスイッチ中にキャッシュヒットを発生する最低位のアドレス・インデックスの値まで小さくしてもよい。したがって、例として、キャッシュの最上位インデックス・アドレスは255であり、それぞれのインデックス・アドレス8、16、24、32および40に対して連続する5つのキャッシュ書込みがあり、これらの書込みの後にコンテクストスイッチがあるものとする。この例においては、当初I_MAXは0に等しく、I_MINは255に等しい。5回のアクセスに基づいて、I_MAXは、40に等しくなるまでアクセスのたびに大きくなる。これに反し、アドレス8への最初のアクセスは、I_MINの値を値8まで小さくするけれども、残りのアクセスは、I_MINの更新された値より上位のインデックス・アドレスであるため、残りのアクセスはその値に影響を及ぼさないであろう。この代替方法を結論すると、ステップ70が、I_MINのアドレスからI_MAXのアドレスまでの間の全ラインであり、かつ、これらのアドレスを含む全ラインをクリーニングして、キャッシュ内のラインの全数よりも少ない、いくつかのラインを再びクリーニングするように、ステップ60が修正されるであろう。
【0023】
上で考察したI_MAXの方法の第2の代替方法においては、所定のコンテクストスイッチにキャッシュヒットを発生させる最低位のアドレス・インデックスを決定するため異なるアドレスの値が確定され、この異なる値は、単独で使用されるとともに、キャッシュの最上位アドレスまでクリーニングするために使用される。簡単にいうと、これは、I_MAXの値を使用するプロセスと正反対の動作である。ここでも、この異なるアドレスの値をI_MINと命名することにすると、当初この値を大きな値(たとえば、キャッシュの最上位のアドレス)に設定し、所定のコンテクストスイッチ中にキャッシュヒットを発生する最低位のアドレス・インデックスの値まで小さくしてもよい。しかし、ステップ68が実行されると、ステップ70が、I_MINのアドレス値から、キャッシュの最上位、つまりキャッシュの最上位アドレスまでの全てのラインをクリーニングするように、ステップ68が修正されるであろう。
【0024】
I_MAXの値の観点から制限的なループ動作になるため、本発明の範囲に、図5に示すような別の実施例が含まれる。方法50aと示されているこの代替方法においては、図3の比較器46の機能が使用されるのではなく、コンテクストスイッチの時点のI_MAXの値を決定するために、最新のコンテクストに関連していて、オペレーティングシステムによって保持されているアドレスの値が使用される。この違いは、ステップ72について以下に説明されているが、図5に示す残りのステップは、図4に示すステップと同じである。
【0025】
方法50aを参照すると、ステップ52からステップ66は上で考察済みなので、ここでは詳細に説明しない。このため、ステップ72に注目すると、ステップ72はI_MAXの値を設定するが、ここではその値は、オペレーティングシステムで何か実行中にアクセス可能な値に基づいて設定される。特にある種のオペレーティングシステムは、所定のコンテクストに対してキャッシュ・ラインの最大の値を保持している。したがって、ステップ66の条件を満たすと、オペレーティングシステムは、終了中の(つまり、そこからスイッチが発生中の)コンテクストスイッチに対応するキャッシュ・ラインの最上位アドレスを使用できるようになるであろう。ステップ72は、このキャッシュ・ラインの最上位アドレスに等しいI_MAXの値を設定する。このように、方法50aがステップ68に続く場合であって、このキャッシュ・ラインの最上位アドレスがキャッシュ・ラインの全数より小さいという条件の場合、ステップ68およびステップ70によって発生するループ動作は、再びデータ・キャッシュ・ラインをクリーニングするので、このキャッシュのクリーニングされるラインの数は、キャッシュ・ラインの全数より小さい。
【0026】
上記諸実施例が、コンテクストスイッチの後のキャッシュ・クリーニング動作に関連するクロックサイクルの数を減少させ、従来の技術に各種の改善をもたらすことは、上記説明から理解できるであろう。本実施例を詳細に説明してきたが、上記教示に加え、本発明の範囲から逸脱せずに上述の説明に対する各種の代替、修正または変更ができることに注意されたい。たとえば、好適実施例におけるコンテクストスイッチの発生は、I_MAXのリセットをトリガすることであるとともに、その後に連いて発生するコンテクストスイッチに応答して、I_MAXのリセットを限定することであるが、何らかの別の事象によって最初の事象が発生すると、I_MAXの値をリセットし、第2の事象が発生すると、I_MAXの値の上方向の調整を終了して、その後で、どれか最小のアドレスから、最後に退避された I_MAXの値まで、キャッシュを再びクリーニングすることは、当業者ならば確認することができるであろう。別の例として、図4、5は、流れ図を介して一般的な逐次形方法を示しているが、これらのステップを実行する状態マシンのように、かかる動作を実現するために各種の回路を使用できるため、この流れ図に示すような逐次形ではなく、流れが各状態から別の代替状態になりうることは理解されるはずである。さらに別の例として、各種側面を示すためにデータ・キャッシュ18bが使用されてきたが、本発明の教示の多くは、各種の別のキャッシュアーキテクチャにも応用される。さらに最後の例として、プラットホーム10は説明のためにすぎず、プラットホーム10はさらに修正されうることと、また多くの創造的な側面が、1つまたはそれ以上のキャッシュメモリを有する別のシステムで実現されうることも理解されるはずである。したがって、前記説明、これらの例、および本発明の教示を得た当業者によって確かめることができるその他の事項は、請求の範囲によって定義されているように、本発明の範囲を示すために役立つはずである。
【図面の簡単な説明】
【図1】本実施例を実現することができる無線データ・プラットホームのブロック図を示す図。
【図2】図1のプラットホームおよび他のプロセス装置において使用することができるキャッシュのアーキテクチャのブロック図を示す図。
【図3】図2のキャッシュ制御装置の各部分のブロック図を示す図であって、これらの部分は、この好適実施例のキャッシュをクリーニングする方法に使用される。
【図4】図1の汎用プロセッサのコンテクストスイッチ中に生起するキャッシュ・クリーンに関連して必要になるクロックサイクルを減少させる第1の実施例の流れ図を示す図であって、キャッシュ・クリーンの程度は、コンテクストスイッチの前にキャッシュに書込まれた最上位のアドレスによって決定される。
【図5】図1の汎用プロセッサのコンテクストスイッチ中に生起するキャッシュクリーンに関連して必要になるクロックサイクルを減少させる第2の実施例の流れ図を示す図であって、キャッシュクリーンの程度は、コンテクストスイッチの前にキャッシュに書込むためにオペレーティングシステムに使用できる最上位のアドレスによって決定される。
【符号の説明】
10 データ・プラットホーム
12 プロセッサ
12a 命令キャッシュ
12b データ・キャッシュ
12c、12d 命令メモリ管理ユニット(MMU)
12e 入力バッファ回路
12f 動作コア
14a DSPコア
14b 周辺装置インターフェース
16 DMAインターフェース
18 DMAコントローラ
18a FIFO
18b 記憶装置
18c タイマー
20 ビデオまたはLCDコントローラ
22 LCDまたはビデオ
24 メイン・メモリ(同期DRAM)
24a、26a アドレス・バス
24b、26b データ・バス
24c、26c 制御バス
26 フラッシュメモリ
28 キャッシュ制御装置
30av、30bv バーチャル・タグ・アレイのメモリプレイン
30v バーチャル・タグ・アレイ
32 データ・アレイ
32a,32b データ・アレイのメモリプレイン
34 LRUインジケータ・アレイ
36 有効性インジケータ・アレイ
38a、38b 比較器
40a、40b、44 転送ゲート
42 アドレス・レジスタ
46 比較器
48 キャッシュ・クリーン処理回路
50 方法
64 キャッシュメモリにデータを書込み、状態をダーテイに設定するステップ
68 キャッシュメモリの選択されたラインをクリーニングするステップ[0001]
BACKGROUND OF THE INVENTION
The present embodiment relates to a computer use environment that realizes one or more cache memories.
[0002]
[Problems to be solved by the invention]
Cache circuits are frequently used in modern computing systems (eg, microprocessors) to increase system performance by reducing the potential length of time required to access information. It is an important component. Normally, a cache circuit includes various components such as a tag memory, which is generally a random access memory (RAM). The tag RAM generally stores so-called tag information corresponding to the cache data stored in the individual cache data RAM. The tag information includes cached data, such as the actual address where cached data can be found in some other memory device (such as an external memory structure). Various features corresponding to are included. Another component of the circuit is a hit detection circuit associated with the tag RAM. (The N-way set associative cache circuit has n circuits) The hit detection circuit receives the actual address stored as part of the tag information and the incoming call Compare addresses (incoming addresses). If this comparison matches, there is a hit in the cache circuit. In other words, the data searched for by this incoming address can be directly searched from the cache data RAM. On the contrary, if this comparison does not match, there is a mistake in the cache circuit. That is, the data searched for at this incoming address is not located in the cache data RAM or cannot be relied on for some other reason. In the case of a cache miss, data must be retrieved from the upper memory of the memory hierarchy, such as main memory (ie, external memory), or another cache memory located at the upper level of the system. Therefore, data access after a cache miss requires a very long time compared to the access time in the case of a cache hit. In fact, in the case of an access for retrieving from external memory, the required time will be considerably longer than the access time when a cache hit occurs.
[0003]
The above description shows that cache memory is generally considered advantageous, but as computers and computer usage environments become more complex, the cache operation will be scrutinized in more detail to add more efficiency. It is necessary to decide whether or not to do so. In this regard, the inventor has confirmed that several clock cycles can be reduced in the context of certain operations of the cache circuit. Reducing the clock cycles used in connection with cache operations improves system speed. This reduction in clock cycles also reduces overall system power consumption, which is a major problem in many modern systems, such as portable computers.
[0004]
[Problems to be solved by the invention]
In one preferred embodiment is a method of operating a computing system. The computing system includes a cache memory, which has a predetermined number of cache lines. Initially, the method writes data to a cache memory at a position corresponding to each of the plurality of write addresses. The method then cleans a selected number of lines in the cache memory. If the cleaning step evaluates the dirty indicator corresponding to the data in that line for each selected number of lines, and the dirty indicator indicates that the data in that line is dirty Copies data from that line to another memory. Finally, the number of lines to be selected is less than the predetermined number of cache lines. In addition, other circuits, systems, and methods are disclosed and specified in the claims.
[0005]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 shows a preferred embodiment of a typical
[0006]
The general operational aspects of the
[0007]
Turning attention now to the cache aspect of the preferred embodiment, FIG. 2 shows, by way of example, the architecture of the
[0008]
Next, paying attention to the details of the
[0009]
In the preferred embodiment, the
[0010]
Since the operation of set associative caches is well known in the art, in order to give the cache cleaning process a context with a detailed description that can be understood in more detail and later in the discussion, only read operations will be discussed here. It is summarized. Focusing on the read operation, when the address DA [31: 0] is received for memory access, the address bits DA [11: 4] are the addresses to the respective plain planes 30av, 30bv of the virtual tag array 30v. Used as. Each plane 30av, 30bv outputs a tag bit Tag_DA [31:12] corresponding to its address. In this case, the tag includes an indication of the address of the data stored in the
[0011]
The
[0012]
To supplement FIG. 3, the
[0013]
FIG. 4 shows a flow diagram of a method, generally designated by the
[0014]
Returning now to
[0015]
[0016]
Focusing on the case of
[0017]
Focusing on the case of
[0018]
[0019]
[0020]
From the above description, in particular, from the effect of I_MAX and steps 68 and 70, after the context switch, the
[0021]
Also note from the above
[0022]
In a first alternative to the I_MAX method discussed above, the value of the second address is determined to determine the lowest address index that causes a cache hit for a given context switch, This second value is used with the value. Therefore, if this second value is named I_MIN, this value is initially set to a large value (eg, the highest address of the cache) and the lowest value that will cause a cache hit during a given context switch. You may make it small to the value of an address index. Thus, by way of example, the top index address of the cache is 255, and there are five consecutive cache writes for each
[0023]
In a second alternative to the I_MAX method discussed above, different address values are established to determine the lowest address index that causes a cache hit for a given context switch, And used to clean up to the highest address of the cache. Simply put, this is the opposite of a process that uses the value of I_MAX. Again, if you decide to name this different address as I_MIN, initially set this value to a large value (for example, the highest address in the cache) and the lowest level that will cause a cache hit during a given context switch. The address index value may be reduced. However, when
[0024]
Since the loop operation is limited from the viewpoint of the value of I_MAX, another embodiment as shown in FIG. 5 is included in the scope of the present invention. In this alternative method, shown as method 50a, the function of
[0025]
Referring to method 50a, steps 52 through 66 have been discussed above and will not be described in detail here. Thus, paying attention to step 72,
[0026]
It will be appreciated from the above description that the above embodiments reduce the number of clock cycles associated with cache cleaning operations after a context switch and provide various improvements over the prior art. Although this embodiment has been described in detail, it should be noted that in addition to the above teachings, various alternatives, modifications, or changes to the above description can be made without departing from the scope of the present invention. For example, the occurrence of a context switch in the preferred embodiment is to trigger a reset of I_MAX and limit the reset of I_MAX in response to a subsequent context switch, but some other When the first event occurs, the value of I_MAX is reset, and when the second event occurs, the upward adjustment of the value of I_MAX is finished, and then the last save is performed from the smallest address. One skilled in the art will be able to confirm cleaning the cache again to the I_MAX value given. As another example, FIGS. 4 and 5 show a general sequential method through flowcharts, but various circuits may be used to implement such operations, such as a state machine that performs these steps. It should be understood that the flow can go from each state to another alternative state, rather than being sequential as shown in this flow chart, as it can be used. As yet another example,
[Brief description of the drawings]
FIG. 1 is a block diagram of a wireless data platform that can implement the present embodiment.
2 illustrates a block diagram of a cache architecture that can be used in the platform and other process devices of FIG.
FIG. 3 is a block diagram of portions of the cache controller of FIG. 2, which are used in the method of cleaning the cache of this preferred embodiment.
FIG. 4 is a flow diagram of a first embodiment that reduces the clock cycles required in connection with cache clean that occurs during the context switch of the general purpose processor of FIG. Is determined by the highest address written to the cache before the context switch.
FIG. 5 shows a flow diagram of a second embodiment for reducing the clock cycles required in connection with cache clean that occurs during the context switch of the general purpose processor of FIG. It is determined by the highest address that can be used by the operating system to write to the cache before the context switch.
[Explanation of symbols]
10 Data platform
12 processor
12a instruction cache
12b data cache
12c, 12d Instruction memory management unit (MMU)
12e input buffer circuit
12f operating core
14a DSP core
14b Peripheral device interface
16 DMA interface
18 DMA controller
18a FIFO
18b storage device
18c timer
20 Video or LCD controller
22 LCD or video
24 Main memory (synchronous DRAM)
24a, 26a Address bus
24b, 26b Data bus
24c, 26c Control bus
26 Flash memory
28 Cache control device
30av, 30bv virtual tag array memory plane
30v virtual tag array
32 Data array
32a, 32b Data array memory plane
34 LRU indicator array
36 Effectiveness Indicator Array
38a, 38b comparator
40a, 40b, 44 Transfer gate
42 Address register
46 Comparator
48 Cache Clean Processing Circuit
50 methods
64 Writing data to the cache memory and setting the state to dirty
68 Cleaning the selected line of the cache memory
Claims (11)
第1に、複数の書込みアドレスに対して、前記複数の書込みアドレスのそれぞれに対応するキャッシュメモリ内の位置にデータを書込むステップと、
第2に、該計算システムによるコンテクストスイッチに応答して前記キャッシュメモリの選択された数のラインをクリーニングするステップとを含み、
前記選択された数のラインに対して、該クリーニングするステップは、
前記ライン内のデータに対応するダーティ・インジケータを評価するステップと、
前記ダーティ・インジケータが、前記ライン内のデータがダーティであることを示している場合、前記ラインから別のメモリにデータをコピーするステップとを含み、
前記選択されたラインの数は、所定のキャッシュ・ラインの数より少なく、さらに、前記計算システムを動作させる方法は、
アドレス・インジケータに値を保持するステップと、
複数の書込みアドレスの各々に応じて、書込みアドレスに対応するキャッシュメモリ内の位置を示すインデックスとアドレス・インジケータに保持された値とを比較し、前記インデックスがアドレス・インジケータに保持された値より大きい場合には、前記アドレス・インジケータの値を前記インデックスと同じ値に設定するステップであって、複数の書込みアドレスについて比較と設定を終了すると、アドレス・インジケータの値が最新の値を示し、選択されたラインの数が前記最新の値に対応する、該設定するステップとを含む、
方法。A method of operating a computing system including a cache memory having a predetermined number of cache lines, comprising:
First, for a plurality of write addresses, writing data to a location in the cache memory corresponding to each of the plurality of write addresses;
Second, cleaning a selected number of lines of the cache memory in response to a context switch by the computing system;
For the selected number of lines, the cleaning step comprises:
Evaluating a dirty indicator corresponding to the data in the line;
Copying the data from the line to another memory if the dirty indicator indicates that the data in the line is dirty;
The number of selected lines is less than a predetermined number of cache lines, and the method of operating the computing system comprises:
Holding a value in the address indicator;
According to each of the plurality of write addresses, an index indicating a position in the cache memory corresponding to the write address is compared with a value held in the address indicator, and the index is larger than a value held in the address indicator. In the case, the step of setting the value of the address indicator to the same value as the index, and when the comparison and setting for a plurality of write addresses is completed, the value of the address indicator indicates the latest value and is selected. The step of setting, wherein the number of defined lines corresponds to the latest value;
Method.
書込み要求に係る書込みデータを前記キャッシュメモリに書き込むごとに、当該書込み要求に係る書込みデータを書き込んだキャッシュ・ラインの位置を示すインデックスと、アドレス・インジケータに保持されている値とを比較するステップと、
前記比較するステップの結果、前記書込みデータを書き込んだ前記キャッシュ・ラインの位置を示すインデックスの方が前記アドレス・インジケータに保持されている値よりも大きい場合に、前記書込みデータを書き込んだ前記キャッシュ・ラインの位置を示すインデックスを、前記アドレス・インジケータに保持する新たな値とするステップと、
0以上で、かつ、キャッシュメモリのクリーニングを行う際に前記アドレス・インジケータに保持されている値以下である値を持つすべてのキャッシュ・ラインについて、当該キャッシュ・ラインのダーティ・インジケータを評価するステップと、
評価した前記ダーティ・インジケータがダーティであることを示しているキャッシュ・ラインのデータを別のメモリにコピーするステップと、
を有する方法。A method of operating a computing system including a cache memory having a predetermined number of cache lines, comprising:
A step of comparing the index indicating the position of the cache line where the write data related to the write request is written with the value held in the address indicator each time the write data related to the write request is written to the cache memory; ,
As a result of the comparing step, when the index indicating the position of the cache line to which the write data is written is larger than the value held in the address indicator, the cache data to which the write data is written is written. Setting an index indicating the position of the line as a new value held in the address indicator;
Evaluating the cache line dirty indicator for all cache lines having a value greater than or equal to 0 and less than or equal to the value held in the address indicator when cleaning the cache memory; ,
Copying cache line data indicating that the evaluated dirty indicator is dirty to another memory;
Having a method.
所定の数のキャッシュ・ラインを有するキャッシュメモリと、
複数の書込みアドレスに応じて、前記複数の書込みアドレスのそれぞれに対応するキャッシュメモリ内の位置にデータを書込むための回路と、
前記キャッシュメモリの選択された数のラインをクリーニングするための回路であって、
前記選択された数のラインのそれぞれに対して、前記ライン内のデータに対応するダーティ・インジケータを評価するための回路と、
前記ダーティ・インジケータが、前記ライン内のデータがダーティであることを示している場合、前記ラインから別のメモリにデータをコピーするための回路と、
を含む、前記クリーニングするための回路と、
を含み、
前記選択されたラインの数が、所定のキャッシュ・ラインの数より少なく、
さらに前記クリーニングするための回路は、
値を保持するためのアドレス・インジケータと、
複数の書込みアドレスの各々に応じて、書込みアドレスに対応するキャッシュメモリ内の位置を示すインデックスとアドレス・インジケータの値を比較して、前記インデックスがアドレス・インジケータに保持された値より小さい場合に、前記インデックスと同一の値に前記アドレス・インジケータの値を設定する回路であって、複数の書込みアドレスについて比較と設定を終了すると、アドレス・インジケータの値が最新の値を示す、該設定する回路と、
を含み、選択されたラインの数が該最新の値に応じたものである、
計算システム。A computing system,
A cache memory having a predetermined number of cache lines;
A circuit for writing data to a location in the cache memory corresponding to each of the plurality of write addresses in response to the plurality of write addresses;
A circuit for cleaning a selected number of lines of the cache memory,
Circuitry for evaluating a dirty indicator corresponding to the data in the line for each of the selected number of lines;
A circuit for copying data from the line to another memory if the dirty indicator indicates that the data in the line is dirty;
A circuit for cleaning, comprising:
Including
The number of selected lines is less than a predetermined number of cache lines;
Furthermore, the circuit for cleaning is
An address indicator to hold the value;
In response to each of the plurality of write addresses, the index indicating the position in the cache memory corresponding to the write address and the value of the address indicator are compared, and when the index is smaller than the value held in the address indicator, A circuit for setting the value of the address indicator to the same value as the index, the circuit for setting indicating the value of the address indicator indicating the latest value when the comparison and setting for a plurality of write addresses are completed; ,
And the number of selected lines depends on the latest value,
Calculation system.
第1に、複数の書込みアドレスに対して、前記複数の書込みアドレスのそれぞれに対応するキャッシュメモリ内の位置にデータを書込むステップと、
第2に、前記キャッシュメモリの選択された数のラインをクリーニングするステップであって、該選択されたラインの数は、前記所定のキャッシュ・ラインの数よりも少ない、該クリーニングするステップと、を含み、
前記選択された数のラインの各々に対して、該クリーニングするステップは、
前記ライン内のデータに対応するダーティ・インジケータを評価するステップと、
前記ダーティ・インジケータが、前記ライン内のデータがダーティであることを示している場合に、前記ラインから別のメモリにデータをコピーするステップと、
を含み、
さらに、前記クリーニングするステップは、
第1のアドレス・インジケータに値を保持するステップと、
第2のアドレス・インジケータに値を保持するステップと、
複数の書込みアドレスの各々に応じて、書込みアドレスに対応するキャッシュメモリ内の位置を示すインデックスと第1のアドレス・インジケータの値を比較して、前記インデックスが第1のアドレス・インジケータに保持された値より大きい場合に、前記インデックスと同じ値に第1のアドレス・インジケータの値を設定するステップであって、複数の書込みアドレスについて比較と設定を終了すると、第1のアドレス・インジケータの値が第1の最新の値を示す、該設定するステップと、
複数の書込みアドレスの各々に応じて、書込みアドレスに対応するキャッシュメモリ内の位置を示すインデックスと第2のアドレス・インジケータの値を比較して、前記インデックスが第2のアドレス・インジケータに保持された値より小さい場合に、前記インデックスと同じ値に第2のアドレス・インジケータの値を設定するステップであって、複数の書込みアドレスについて比較と設定を終了すると、第2のアドレス・インジケータの値が第2の最新の値を示す、該設定するステップと、
を含み、
選択されたラインの数が該第1と第2の最新の値に応じたものである、
方法。A method of operating a computing system including a cache memory having a predetermined number of cache lines, comprising:
First, for a plurality of write addresses, writing data to a location in the cache memory corresponding to each of the plurality of write addresses;
Second, cleaning the selected number of lines in the cache memory, wherein the number of selected lines is less than the predetermined number of cache lines. Including
For each of the selected number of lines, the cleaning step comprises:
Evaluating a dirty indicator corresponding to the data in the line;
Copying the data from the line to another memory if the dirty indicator indicates that the data in the line is dirty;
Including
Further, the cleaning step includes
Holding a value in the first address indicator;
Holding a value in the second address indicator;
According to each of the plurality of write addresses, the index indicating the position in the cache memory corresponding to the write address is compared with the value of the first address indicator, and the index is held in the first address indicator. If the value is greater than the value, the step of setting the value of the first address indicator to the same value as the index, and when the comparison and setting for a plurality of write addresses is completed, the value of the first address indicator The setting step indicating the latest value of 1;
In accordance with each of the plurality of write addresses, the index indicating the position in the cache memory corresponding to the write address is compared with the value of the second address indicator, and the index is held in the second address indicator. And setting the second address indicator value to the same value as the index when the value is smaller than the value, and when the comparison and setting for a plurality of write addresses is completed, the second address indicator value is The setting step indicating the latest value of 2;
Including
The number of selected lines depends on the first and second latest values;
Method.
所定の数のキャッシュ・ラインを有するキャッシュメモリと、
複数の書込みアドレスに応じて、前記複数の書込みアドレスのそれぞれに対応するキャッシュメモリ内の位置にデータを書込むための回路と、
前記キャッシュメモリの選択された数のラインをクリーニングするための回路であって、前記選択されたラインの数は、所定のキャッシュ・ラインの数より少なく、前記選択された数のラインのそれぞれに対して、
前記ライン内のデータに対応するダーティ・インジケータを評価するための回路と、
前記ダーティ・インジケータが、前記ライン内のデータがダーティであることを示している場合に、前記ラインから別のメモリにデータをコピーするための回路と、
を含む、前記クリーニングするための回路と、
を含み、
さらに前記クリーニングするための回路は、
値を保持する第1のアドレス・インジケータと、
値を保持する第2のアドレス・インジケータと、
複数の書込みアドレスの各々に応じて、書込みアドレスに対応するキャッシュメモリ内の位置を示すインデックスと第1のアドレス・インジケータの値を比較して、前記インデックスが第1のアドレス・インジケータに保持された値より大きい場合に、前記インデックスと同一の値に前記第1のアドレス・インジケータの値を設定する回路であって、複数の書込みアドレスについて比較と設定を終了すると、第1のアドレス・インジケータの値が第1の最新の値を示す、該設定する回路と、
複数の書込みアドレスの各々に応じて、書込みアドレスに対応するキャッシュメモリ内の位置を示すインデックスと第2のアドレス・インジケータの値を比較して、前記インデックスが第2のアドレス・インジケータに保持された値より小さい場合に、前記インデックスと同じ値に第2のアドレス・インジケータの値を設定する回路であって、複数の書込みアドレスについて比較と設定を終了すると、第2のアドレス・インジケータの値が第2の最新の値を示す、該設定する回路と、
を含み、
選択されたラインの数が該第1と第2の最新の値に応じたものである、
計算システム。A computing system,
A cache memory having a predetermined number of cache lines;
A circuit for writing data to a location in the cache memory corresponding to each of the plurality of write addresses in response to the plurality of write addresses;
A circuit for cleaning a selected number of lines of the cache memory, wherein the number of selected lines is less than a predetermined number of cache lines and for each of the selected number of lines; And
A circuit for evaluating a dirty indicator corresponding to the data in the line;
A circuit for copying data from the line to another memory when the dirty indicator indicates that the data in the line is dirty;
A circuit for cleaning, comprising:
Including
Furthermore, the circuit for cleaning is
A first address indicator holding a value;
A second address indicator holding a value;
According to each of the plurality of write addresses, the index indicating the position in the cache memory corresponding to the write address is compared with the value of the first address indicator, and the index is held in the first address indicator. A circuit for setting the value of the first address indicator to the same value as the index when the value is larger than the value, and when the comparison and setting for a plurality of write addresses are completed, the value of the first address indicator The setting circuit in which indicates the first latest value;
In accordance with each of the plurality of write addresses, the index indicating the position in the cache memory corresponding to the write address is compared with the value of the second address indicator, and the index is held in the second address indicator. A circuit that sets the value of the second address indicator to the same value as the index when the value is smaller than the value, and when the comparison and setting for a plurality of write addresses is completed, the value of the second address indicator The setting circuit indicating the latest value of 2;
Including
The number of selected lines depends on the first and second latest values;
Calculation system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP37702898A JP4307604B2 (en) | 1998-12-07 | 1998-12-07 | Computer circuit system and method using partial cache cleaning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP37702898A JP4307604B2 (en) | 1998-12-07 | 1998-12-07 | Computer circuit system and method using partial cache cleaning |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2000172563A JP2000172563A (en) | 2000-06-23 |
JP4307604B2 true JP4307604B2 (en) | 2009-08-05 |
Family
ID=18508140
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP37702898A Expired - Lifetime JP4307604B2 (en) | 1998-12-07 | 1998-12-07 | Computer circuit system and method using partial cache cleaning |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4307604B2 (en) |
-
1998
- 1998-12-07 JP JP37702898A patent/JP4307604B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2000172563A (en) | 2000-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230418759A1 (en) | Slot/sub-slot prefetch architecture for multiple memory requestors | |
US6665749B1 (en) | Bus protocol for efficiently transferring vector data | |
US6813701B1 (en) | Method and apparatus for transferring vector data between memory and a register file | |
US6513107B1 (en) | Vector transfer system generating address error exception when vector to be transferred does not start and end on same memory page | |
JP4218820B2 (en) | Cache system including direct mapped cache and full associative buffer, its control method and recording medium | |
KR19980079433A (en) | Method and system for implementing cache coherency mechanism for use in non-cache cache hierarchy | |
JP2001195303A (en) | Translation lookaside buffer whose function is parallelly distributed | |
US6553486B1 (en) | Context switching for vector transfer unit | |
US6772326B2 (en) | Interruptible and re-entrant cache clean range instruction | |
CN112559389A (en) | Storage control device, processing device, computer system, and storage control method | |
JP2008502069A (en) | Memory cache controller and method for performing coherency operations therefor | |
EP1030243B1 (en) | Optimized hardware cleaning function for virtual index virtual tag data cache | |
WO2001075607A2 (en) | Multi-tiered memory bank having different data buffer sizes with a programmable bank select | |
US6321299B1 (en) | Computer circuits, systems, and methods using partial cache cleaning | |
US8661169B2 (en) | Copying data to a cache using direct memory access | |
US6976130B2 (en) | Cache controller unit architecture and applied method | |
JP4307604B2 (en) | Computer circuit system and method using partial cache cleaning | |
US20130145097A1 (en) | Selective Access of a Store Buffer Based on Cache State | |
US6625720B1 (en) | System for posting vector synchronization instructions to vector instruction queue to separate vector instructions from different application programs | |
EP0929039A2 (en) | Computer circuits, systems and methods using partial cache cleaning | |
KR20040047398A (en) | Method for data access using cache memory | |
JP2001222467A (en) | Cache device | |
US8099533B2 (en) | Controller and a method for controlling the communication between a processor and external peripheral device | |
JPH07152650A (en) | Cache control unit | |
JPH0981458A (en) | Access method to cache in data-processing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20051207 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080411 |
|
A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20080711 |
|
A602 | Written permission of extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A602 Effective date: 20080716 |
|
A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20080811 |
|
A602 | Written permission of extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A602 Effective date: 20080814 |
|
A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20080911 |
|
A602 | Written permission of extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A602 Effective date: 20080917 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080929 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081010 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090108 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090120 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090330 |
|
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: 20090410 |
|
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: 20090430 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120515 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130515 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130515 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |