JP4068828B2 - Integrated separation-type switching cache memory and processor system having the cache memory - Google Patents

Integrated separation-type switching cache memory and processor system having the cache memory Download PDF

Info

Publication number
JP4068828B2
JP4068828B2 JP2001327733A JP2001327733A JP4068828B2 JP 4068828 B2 JP4068828 B2 JP 4068828B2 JP 2001327733 A JP2001327733 A JP 2001327733A JP 2001327733 A JP2001327733 A JP 2001327733A JP 4068828 B2 JP4068828 B2 JP 4068828B2
Authority
JP
Japan
Prior art keywords
cache memory
data
address
bank
control signal
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
JP2001327733A
Other languages
Japanese (ja)
Other versions
JP2003131943A (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 JP2001327733A priority Critical patent/JP4068828B2/en
Publication of JP2003131943A publication Critical patent/JP2003131943A/en
Application granted granted Critical
Publication of JP4068828B2 publication Critical patent/JP4068828B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

【0001】
【発明の属する技術分野】
本発明はキャッシュメモリを有するプロセッサシステムに係わり、特に複数のコマンドを処理可能なプロセッサと該プロセッサからのアクセス要求に応じて動作しうるキャッシュメモリを有するプロセッサシステムに関する。更に、統合型および分離型の双方のキャッシュメモリシステムを同一アーキテクチャで実現することを可能にし、また、統合型キャッシュメモリシステムを分離型並に高速化することを可能にするものである。
【0002】
【従来の技術】
図1にキャッシュメモリアーキテクチャの変遷の概略を示す。キャッシュメモリ導入以前は(1)のようにプロセッサCPUとメインメモリMMは直接命令およびデータをやり取りしていた。その後、メインメモリMMの容量増大およびプロセッサCPUの高速化によって、メインメモリMMの速度がプロセッサシステムの性能を律速するようになった。
【0003】
そこで、(2)のようにメインメモリMMに比べて小容量かつ高速なのキャッシュメモリUCをプロセッサCPUとメインメモリMMの間に配置して性能を向上させた。初期のキャッシュメモリUCは命令とデータの双方を扱う統合型であった。
【0004】
その後、(3)のようにプロセスの微細化によってプロセッサCPUとキャッシュメモリUCを同一チップ上に集積することが可能になった。これによってプロセッサCPUとキャッシュメモリUCを結ぶ信号線数を大幅に増加させることが可能となり、(4)のように、キャッシュメモリUCを命令キャッシュICとデータキャッシュDCに分離して同時アクセスを可能にした、ハーバードアーキテクチャが登場した。そして、高性能なキャッシュアーキテクチャはハーバードアーキテクチャであるということが常識となった。
【0005】
その後、スーパスカラまたはVLIW (Very Long Instruction Word) アーキテクチャが登場し、同時に複数のデータアクセスを行うことが可能となった。このため、(5)のようにデータキャッシュDCを複数ポート化したプロセッサが登場した。この複数ポート化はバンクインターリーブ方式によって異なるバンクへのアクセスのみ同時実行するのが一般的である。
【0006】
また、統合型キャッシュメモリアーキテクチャがハーバードアーキテクチャより低コストであることから、同一のプロセッサファミリにおいて、ローエンド版は統合型、ハイエンド版はハーバードアーキテクチャという場合がある。例えば、「Microprocessor Report Vol.9, no.3,3/6/95, p.12」記載のSH−3と「Microprocessor Report Vol.10, no.14, 10/28/96, pp.32−35」記載のSH−4は同じSuperH シリーズのプロセッサであるが、前者は統合型、後者はハーバードアーキテクチャである。
【0007】
近年、プロセッサに依存しないプログラミング言語としてJAVAが急速に普及しつつある。JAVAは命令の書き換えを行う言語である。初回に実行した複雑な命令を、一度実行することによって確定した情報をもとに高速実行する命令に書き換える。更に、JAVAで書かれたプログラムを高速実行するために、実行頻度の高いルーチンを検出してプロセッサ固有の機械語のプログラムに書き換えて高速実行する方式もJIT (Just−in−time) コンパイル方式として一般化している。
【0008】
キャッシュメモリによる性能向上はメモリアクセスの空間的時間的局所性を前提としている。したがって、該局所性がない場合は有効に働かない。例えば、「Microprocessor Report Vol.13, no.12,9/13/99, pp1,6−10」記載のネットワークプロセッサIXP1200はデータキャッシュを内蔵せず、外付けのSRAMやSDRAMに直接アクセスする。また、「Microprocessor Report Vol.13, no.5, 4/19/99, pp1,6−11」記載のエモーションエンジンEEのベクトル浮動小数点ユニットVPUはキャッシュの代わりに専用のRAMを持っている。そして、ソフトウェアによって制御されるダイレクトメモリアクセスユニットが該RAMへのデータアクセスを行う。
【0009】
【発明が解決しようとする課題】
上記のようなキャッシュアーキテクチャの歴史的変遷の結果、性能を重視する場合はハーバードアーキテクチャ、コストを重視する場合は統合型キャッシュメモリアーキテクチャとすることが常識となっている。しかし、プロセス微細化に伴う集積度の向上により、統合型アーキテクチャとハーバードアーキテクチャのコストの差がチップ全体のコストに比べて小さくなってきており、2種類のキャッシュメモリアーキテクチャを製品別に作り分けるメリットがなくなってきている。
【0010】
また、上記JAVAのように命令の書き換えを行う言語が普及してくると、ハーバードアーキテクチャが必ずしも良いとは限らない。ハーバードアーキテクチャにおいては命令の書き換えをハードウェアで検出しないのが一般的である。このため、命令を書き換えた場合はソフトウェア責任で書き換え前の命令が実行されないことを保証しなければならない。命令書き換え時には、書き換えられる命令はデータとして扱われるため、書き換えた命令はデータキャッシュDCに格納される。この時、書き換え前の命令が命令キャッシュICに存在しても更新されない。
【0011】
ソフトウェアは、命令キャッシュIC上の書き換え前命令をクリアし、データキャッシュDC上の書き換え後、命令をメインメモリMMに書き戻してから、書き換え後の命令を実行する。すると、ハードウェアは書き換え後の命令をメインメモリMMからフェッチして実行する。尚、命令の書き換えをハードウェアで検出したとしても、上記ソフトウェア処理をハード化するだけなので効率的な処理は困難である。
【0012】
一方、統合型キャッシュメモリアーキテクチャでは命令書き換えによってキャッシュメモリUC上の命令が書き換えられる。したがって、命令書き換え後にキャッシュメモリUCから命令フェッチすれば書き換え後命令をフェッチすることが出来る。このためには、通常のパイプライン方式のプロセッサでは、命令書き換え後にパイプライン上に存在する実行中の命令をキャンセルするだけでよい。したがって、命令書き換えをサポートするには統合型キャッシュメモリアーキテクチャの方が適している。
【0013】
プロセス微細化に伴う集積度の向上により、小規模システムではメインメモリMMをオンチップ化することが可能となってきている。また、上記エモーションエンジンEEのように命令またはデータをオンチップメモリに載せ、ダイレクトメモリアクセス等により、ソフトウェアであらかじめオンチップメモリに命令やデータを転送して、実際に使用する際に確実に高速アクセスすることも可能である。こうすることにより、使用する命令やデータが予測可能であれば、メモリアクセスに空間的時間的局所性がなくても高速化が可能である。このような状況では、キャッシュメモリが不要であったり、命令キャッシュとデータキャッシュのうち一方のみが必要であったりする。
【0014】
更に、プロセッサシステムが、メインフレーム、ワークステーション、PC等に限定されていた時代から、携帯電話、デジタル家電、自動車といった多種多様な製品に搭載される時代となり、用途に応じてキャッシュメモリの最適な構成も多様化している。したがって、同一プロセッサで多様なキャッシュメモリ構成を取れることも重要になってきている。
【0015】
本発明が解決しようとする第1の課題は、従来、ハーバードアーキテクチャでのみ達成可能であった命令フェッチとデータアクセスの同時実行を統合型キャッシュメモリアーキテクチャで達成することである。これによって、高性能と命令書き換えの容易性とを同時に達成することが可能となる。また、命令とデータの一方を重点的にキャッシングしたいアプリケーションの場合でも、ハーバードアーキテクチャのように一方のキャッシュが無駄になることなく、全容量を活用することが出来る。
【0016】
本発明が解決しようとする第2の課題は、同一のプロセッサで統合型キャッシュメモリアーキテクチャとハーバードアーキテクチャの双方を実現することである。そして更に、同一プロセッサで多様なキャッシュメモリ構成を実現することである。
【0017】
【課題を解決するための手段】
上記第1の課題は、統合型キャッシュメモリを複数ポート化することによって解決される。これによって命令フェッチとデータアクセス要求を同時に処理することが可能となり、ハーバードアーキテクチャと同等の性能が達成される。但し、純粋な複数ポート化はハードウェア量を増大させ、同一面積で実現できるキャッシュメモリ容量が小さくなってしまう。そこで、キャッシュメモリをアドレスの一部によって指定される複数バンクによって構成し、各バンクを1ポートキャッシュとし、命令フェッチとデータアクセス要求が異なるバンクに対するものであれば同時処理、同一バンクに対する場合は逐次処理することにより、完全な複数ポートキャッシュメモリよりも、ハードウェア量を削減し、キャッシュメモリ容量を維持することが出来る。プロセス微細化に伴ってキャッシュメモリの大容量化が可能となっているが、大容量化にはメモリマットの分割が必要であり、分割されたメモリマットをバンクに割当てれば、バンク分割に伴うコストの増大は回避できる。
【0018】
上記第2の課題は、上記ポートまたはバンクの指定にアドレスの一部だけでなく命令フェッチとデータアクセス要求の識別信号も用いることによって解決される。統合型キャッシュメモリアーキテクチャとして使用する場合はアドレスの一部を、ハーバードアーキテクチャとして使用する場合は識別信号を使用する。このようにポートまたはバンク指定に使用する信号を切替えることにより、2つのキャッシュメモリアーキテクチャを同一のプロセッサで実現する。更に、信号切替の仕方によってハーバードアーキテクチャの命令キャッシュとデータキャッシュの容量配分を変えることも可能である。また、複数ポート化を複数のウェイに対して異なるアドレスでアクセスできるようにすることによっても、同様に上記第1および第2の課題の解決が可能である。
【0019】
さらに、上記課題を解決する為に、本発明は複数のコマンドを独立に処理可能なプロセッサと、該プロセッサからのアクセス要求に応じて動作するキャッシュメモリを有するプロセッサシステムにおいて、前記キャッシュメモリが複数個のポートを有し、該複数個のポートを介して前記プロセッサから送信される命令フェッチを含む複数の制御コマンド及び複数のアドレス信号を同時に処理しうることを特徴とするプロセッサシステムを提供することにある。
【0020】
さらに、本発明は命令フェッチとデータアクセスを独立に処理可能なプロセッサと、該プロセッサからのアクセス要求に呼応して動作するキャッシュメモリを有するシステムにおいて、前記キャッシュメモリを複数のセレクタ及び複数のアドレスの一部によって指定される複数バンクによって構成し、各バンクを1ポートキャッシュとし、前記命令フェッチ要求と前記データアクセス要求が異なるバンクに対するものであれば同時処理、同一バンクに対する場合は逐次処理することを特徴とするプロセッサシステムを提供することにある。
【0021】
さらに、本発明は複数のバンクを備え、該複数のバンクを制御するコントローラを有し、該コントローラは前記複数のバンクの各々に命令或いはデータの書き込み又は読み出しを行う為の制御信号を生成し、前記コントローラの制御により該制御信号を前記複数のバンクに供給し、前記複数のバンク内の異なるバンクに対し前記命令或いはデータの書き込み或いは読み出し動作を同時に行い、同一のバンクに対し、前記命令或いはデータの書き込み或いは読み出し動作を逐次に行うことを特徴とするキャッシュメモリを提供することにある。
【0022】
【発明の実施の形態】
以下、本発明の各実施例を図を用いて説明する。各実施例の図における同一符号は同一物または相当物を示す。図2は本発明を適用したプロセッサシステムの例である。プロセッサLSIおよびメインメモリMMから成る。プロセッサLSIは中央処理装置CPU、キャッシュメモリCM、外部メモリインタフェイスEMI、および周辺モジュールPMから成り、内部バスIBで接続されている。中央処理装置CPUは命令フェッチユニットIFU、実行ユニットEXU、およびバスインタフェイスユニットBIUから成る。又、当該プロセッサ及びキャッシュメモリCMは同一のLSIチップ上に集積されている。
【0023】
中央処理装置CPUの基本動作は以下の通りである。まず、命令フェッチユニットIFUがキャッシュメモリCMに命令アドレスAIと共に命令フェッチ要求REQIを出す。キャッシュメモリCMは要求REQIに応じて読出した命令RIを命令フェッチユニットIFUに返す。命令フェッチユニットIFUは命令RIを実行ユニットEXUに供給する。実行ユニットEXUは命令RIをデコードし実行する。デコードした命令がメモリ読出し命令の場合は、データアドレスADと共にデータアクセス要求REQDを出す。キャッシュメモリCMは要求REQDに応じて読出したデータRDを実行ユニットEXUに返す。また、デコードした命令がメモリ書込み命令の場合は、データアドレスADおよび書込みデータWDと共にデータアクセス要求REQDを出す。キャッシュメモリCMは要求REQDに応じてデータWDを書込む。
【0024】
命令フェッチ要求REQIまたはデータアクセス要求REQDがキャッシュミスした場合は、バスインタフェイスユニットBIUが該要求に関連する命令アドレスAI、データアドレスADおよび書込みデータWD等を受け取り、内部バスIBを経由して外部メモリインタフェイスEMIに外部メモリフェッチ要求を出す。外部メモリインタフェイスEMIは要求に応じてメインメモリMMにアドレスAを出力して外部メモリフェッチ要求を出し、メインメモリMMはこれに呼応してデータDを返す。外部メモリインタフェイスEMIは内部バスIBを経由してデータDをバスインタフェイスユニットBIUに返す。バスインタフェイスユニットBIUは、外部アドレスAX、書込みデータWXと共に外部アクセス要求REQXを出し、キャッシュメモリCMは外部アクセス要求REQX(外部からのアクセス要求である)を処理するポートを有し、要求REQXに応じて書込みデータWXを書込む。
【0025】
中央処理装置CPUにおいてパイプライン動作が行われると、命令フェッチユニットIFUは実行ユニットEXUの命令処理と同時に後続命令のフェッチを行う。更に、実行ユニットEXUのデータアクセスがノンブロッキングであると、キャッシュメモリCMのデータアクセスミスによる外部メモリアクセスと同時に後続命令によるデータアクセスが行われる。このため、キャッシュメモリCMには、命令フェッチ要求とデータアクセス要求、或いは命令フェッチ要求REQI、データアクセス要求REQD、および外部アクセス要求REQXの内の何れか1組から成る複数の制御コマンド、及び命令アドレス信号AIとデータアドレス信号AD、或いは信号AI、信号ADと外部アドレス信号AXの内の何れか1組から成る複数のアドレス信号を同時に処理する能力が必要である。
【0026】
図3は本発明を適用したキャッシュメモリCMの第1の実施例である。キャッシュメモリCMはキャッシュ制御レジスタCCR、バンク信号生成部BKG(或いは信号生成部)、CMを制御するキャッシュ制御部CC、およびキャッシュ本体から成る。BKGは複数のアドレス信号に基づき、CCに与える複数の制御信号(BKI,BKD,BKX)を生成する。
【0027】
キャッシュメモリ本体は、複数のアドレス信号(AI,AD,及びAX)の各々における該複数のアドレスの一部で有る特定のビットによって指定される4つのバンクBK0〜BK3に分割されており異なるバンクへの同時アクセスが可能である。
【0028】
キャッシュメモリ内の複数バンクの各々を指定する際に、上記特定のビットの代わりに命令フェッチ要求又はデータアクセス要求、及び上記複数の制御信号の入力に基づき、キャッシュメモリ内に有するキャッシュ制御部にて生成される複数のアドレス選択制御信号及び書き込みデータ選択制御信号の制御により複数のセレクタの各々を介してバンクを指定することにより、命令データ分離型キャッシュメモリとして動作する。
【0029】
バンクBK0〜BK3はそれぞれアクセスアドレスA0〜A3、書込み時は更に書込みデータW0〜W3を受取って、読出しまたは書込み動作を行い、読出し時には読出しデータR0〜R3を出力する。バンクBK0〜BK3の各々は1ポートキャッシュと見なされる。アクセスアドレスA0〜A3はそれぞれアドレスマルチプレクサ(又はセレクタ)AM0〜AM3において、アドレス選択制御信号CA0〜CA3によって、アドレスAI、AD、またはAXから選択される。書込みデータW0〜W3はそれぞれ書込みデータマルチプレクサ(又はセレクタ)WM0〜WM3において、書込みデータ選択制御信号CW0〜CW3によって、書込みデータWDまたはWXから選択される。読出しデータRI、RD、およびRXはそれぞれ読出しデータマルチプレクサ(又はセレクタ)RMI、RMD、およびRMXにおいて、読出しデータ選択制御信号CRI、CRD、およびCRXによって、読出しデータR0〜R3から選択される。尚、図中の各マルチプレクサの入力信号に振られた番号は、その入力を選択する場合にアサートされる選択制御信号のビット番号である。
【0030】
図4は第1の実施例のキャッシュ制御部CCの詳細である。バンク信号生成部BKGからの命令バンクBKI、データバンクBKD、および外部バンクBKXと、命令フェッチ要求REQI、データアクセス要求REQD、および外部アクセス要求REQXとから、キャッシュ本体の各マルチプレクサの制御信号を生成する。
【0031】
詳細に説明すると、キャッシュ制御部は命令フェッチ要求、データアクセス要求及び複数の制御信号(BKI,BKD,BKX)の入力に対し、制御信号に基づいて指定されたバンクに既にデータアクセス要求が割り当てられた場合は、更なる割り当てを実行しないように遅延信号を生成し、制御信号に基づいて指定されたバンクに未だデータアクセス要求が割り当てられていない場合は、複数のアドレス選択制御信号又は書き込みデータ選択制御信号を生成する。
【0032】
図3の読出しデータ選択制御信号CRI、CRD、およびCRXは4入力マルチプレクサを制御する4ビットの信号である。それぞれ2ビットの命令バンクBKI、データバンクBKD、および外部バンクBKXを単純にデコードすれば生成できるので図示していない。
【0033】
アドレス選択制御信号CA0〜CA3および書込みデータ選択制御信号CW0〜CW3は命令フェッチ、データアクセス、および外部アクセスの優先度を決定しなければ生成できない。最も単純な優先度決定方式はプログラム本来の逐次実行順序を守ることである。外部アクセスは先行するキャッシュアクセスのミスによって生じるので最も逐次実行順序が早い。また、命令フェッチは後続命令の準備であり最も逐次実行順序が遅い。したがって、優先度は第1が外部アクセス、第2がデータアクセス、第3が命令フェッチである。
【0034】
しかしながら、高度に最適化されたプログラムでは命令やデータをプリフェッチ命令等によって事前にメインメモリMMからキャッシュメモリCMにキャッシングし、実際に使用する際にキャッシュミスが起こらないようにする。このようなプログラムでは外部アクセスの優先度を下げた方が性能は向上する。ジャストオンタイムでキャッシングするようにプログラムを最適化することは困難なので、少し余裕時間を見てキャッシングした場合、本来必要な時刻より早くキャッシングするので、これを待たせて内部動作をストールさせない方が良いからである。そこで、本実施例では優先度を第1がデータアクセス、第2が命令フェッチ、第3が外部アクセスとする。
【0035】
図3に示すアクセスアドレスA0〜A3はアドレスAI、AD、またはAXから選択されるので、アドレスマルチプレクサAM0〜AM3は3入力であり、制御信号CA0〜CA3は3ビットである。そこで、制御信号のビット番号は命令アドレスに2、データアドレスに1、外部アドレスに0を割当てる。
【0036】
まず、図4に示す通り、最優先のデータアクセス要求REQDがアサートされたら、データバンクBKDで指定されるバンクを割当て、アドレス選択制御信号CA0〜CA3のうち割当てたバンクの制御信号のビット1をアサートする。即ち、2ビットのデータバンクBKDをデータバンクデコーダBDDによってデコードした4ビット信号のそれぞれとデータアクセス要求REQDのAND論理を取る。
【0037】
次に、命令フェッチ要求REQIがアサートされたら、命令バンクBKIで指定されるバンクを割当てる。この時、該当バンクに既にデータアクセスが割当てられていた場合は、命令フェッチ遅延信号DLIをアサートし、命令フェッチの割当ては行わない。割当てを行った場合はアドレス選択制御信号CA0〜CA3のうち割当てたバンクの制御信号のビット2をアサートする。即ち、2ビットの命令バンクBKIを命令バンクデコーダBDIによってデコードした4ビット信号のそれぞれと命令アクセス要求REQIのAND論理を取り、更に、アドレス選択制御信号CA0〜CA3のビット1の反転信号とAND論理を取る。アドレス選択制御信号CA0〜CA3のビット0は該当バンクにデータアクセスも命令アクセスも行わない場合にアサートする。即ち、アドレス選択制御信号CA0〜CA3のビット1の反転信号と、ビット2の元になっている命令アクセス要求REQIと当該BDIからの信号とのAND論理を取った信号の反転信号とのAND論理を取った信号である。
【0038】
また、2ビットの外部バンクBKXを外部バンクデコーダBDXによってデコードした4ビット信号のそれぞれと外部アクセス要求REQXのAND論理を取った信号がアサートされて、該当バンクへの外部アクセス要求が出たにもかかわらず、該当バンクアドレスとして外部アドレスを選択する信号、即ち、アドレス選択制御信号CA0〜CA3のビット0がアサートされない場合、必要なバンクが選択できなかったので外部アクセス遅延信号DLXをアサートする。
【0039】
図3に示す書込みデータW0〜W3は書込みデータWDまたはWXから選択されるので、書込みデータマルチプレクサWM0〜WM3は2入力であり、制御信号CW0〜CW3は2ビットである。そこで、制御信号のビット番号はデータアドレスに1、外部アドレスに0を割当てる。まず、書込みデータ選択制御信号CW0〜CW3のビット1は、アドレス選択制御信号CA0〜CA3のビット1と同一論理である。データアクセスがない場合は、書込みデータとして図3に示す外部書込みデータWXを選択するので、図4に示す通り、書込みデータ選択制御信号CW0〜CW3のビット0はビット1の反転である。
【0040】
図5はバンク信号生成部BKGの第1の例である。キャッシュメモリCMの容量を128KBとし、4ウェイセットアソシアティブ方式とすると、1ウェイ当りの容量は32KBであり、インデクスは15ビットである。バンクインタリーブ方式ではバンク指定にインデクスの一部を使用する。本実施例ではバンク数が4なので、バンク指定に2ビット使用する。どのビットをバンク指定に用いたときにバンク競合によるストール頻度が最小になるかはプログラムに依存する。逆に、バンク指定ビットをプログラマに公開することによって競合を抑えたプログラムを作成することも可能である。図5ではアドレスのビット14〜0をインデクスとし、インデクスの上位2ビットをバンク指定ビットとする。したがって、ビット14〜13がバンク指定ビットである。
【0041】
バンク信号生成部BKGは、キャッシュ制御レジスタCCRのバンク制御フィールドBCによって制御される。図5ではバンク制御フィールドBCは1ビットで、バンクマルチプレクサBMI、BMD、およびBMXを制御して2ビットのバンク信号BKI、BKD、およびBKXの上位ビットを選択する。本実施例では下位ビットは常にアドレスAI、AD、およびAXのビット13である。図5においてバンクマルチプレクサBMI、BMD、およびBMXの入力信号に振られた番号は、該入力信号を選択する時のバンク制御フィールドBCの値である。即ち、バンク制御フィールドBCが1であれば、バンク信号BKI、BKD、およびBKXの上位ビットとして、それぞれアドレスAI、AD、およびAXのビット14を選択する。一方、バンク制御フィールドBCが0であれば、それぞれ値0、値1、および外部データアクセス信号DAを選択する。外部データアクセス信号DAは外部アクセスがデータ系である時にアサートされる。
【0042】
この結果、バンク制御フィールドBCが1であれば、バンク信号BKI、BKD、およびBKXはそれぞれアドレスAI、AD、およびAXのビット14〜13となる。したがって、キャッシュメモリCMは統合型の4バンクインタリーブキャッシュとなる。
【0043】
バンク制御フィールドBCが0であれば、バンク信号BKIはアドレスAIのビット13の値に応じて0または1となり、バンク信号BKDはアドレスADのビット13の値に応じて2または3となり、バンク信号BKXはアドレスAXのビット13の値に応じて、外部データアクセス信号DAがネゲートされれば0または1、アサートされれば2または3となる。
【0044】
したがって、命令フェッチおよび命令系外部アクセスに対しては、バンク信号BKIおよびBKXが常にバンク0または1を指定し、データアクセスおよびデータ系外部アクセスに対してはバンク信号BKDおよびBKXが常にバンク2または3を指定する。この結果、バンク0および1が2バンクインタリーブ命令キャッシュ、バンク2および3が2バンクインタリーブデータキャッシュとして動作する。そして、アクセスするバンクが異なれば同時アクセス可能なので、ハーバードアーキテクチャとなる。尚、この時アドレスのビット14は常にタグとして使用する。バンク制御フィールドBCが1であればビット14をタグとすることは冗長であるが誤動作はせず、バンク制御フィールドBCが0であればビット14はタグとして必要である。1ビットの冗長性を取り除こうとするとかえって論理が複雑になり速度が低下する。
【0045】
図6はバンク生成部BKGの第2の例である。通常、システムによってプログラムを置くアドレス空間とデータを置くアドレス空間はあらかじめ決まっていることが多いので、これら2つの空間を識別するアドレスのビットがあれば、これをバンク指定ビットとすることにより、命令とデータのバンク競合を避けることができる。この結果、統合型の4バンクインタリーブキャッシュでありながら、ハーバードアーキテクチャと同等の性能を得ることが出来る。
【0046】
図6の例ではバンク制御フィールドBCを2ビットとし、図5のバンク制御フィールドBCが0および1の場合に加えて、2および3の場合を追加している。そして、バンク制御フィールドBCが2の場合にはアドレスのビット20を、3の場合にはビット24を選択する。
【0047】
この結果、プログラムサイズが1MB程度の比較的小さいシステムではビット20を、16MB程度のやや大きなシステムではビット24をバンク指定ビットとすることにより、命令とデータのバンク競合を避けることができる。この場合も図5の場合と同様に、ビット24、20、14は常にタグとしても使用する。
【0048】
図7〜9は本実施例の第1の動作例である。図7はバンク生成部BKGの動作例である。図中太い信号線はアサート、細い信号線はネゲートとなっている。本動作例ではキャッシュコントロールレジスタCCRのバンク制御フィールドBCが1で統合型キャッシュモードであるとする。そして、命令アドレスAI、データアドレスAD、および外部アドレスAXを16進数で00001230、00102468、001048C0とし、命令フェッチ要求REQI、データアクセス要求REQD、および外部アクセス要求REQXが全てアサートされたとする。
【0049】
尚、図7においてはビット14〜13の値が明確と成るように16進数を2進数に展開してある。バンク制御フィールドBCが1なので、命令バンクマルチプレクサBMI、データバンクマルチプレクサBMD、および外部バンクマルチプレクサBMXはそれぞれ命令アドレスAI、データアドレスAD、および外部アドレスAXのビット14を選択し、それぞれ0、0、および1を出力する。該出力と常にバンク指定信号として使用されるビット13とを結合した信号がバンク信号であるから、命令バンクBKI、データバンクBKD、および外部バンクBKXはそれぞれ0、1、および2となる。
【0050】
図8はキャッシュ制御部CCの動作例である。図中太い信号線はアサート、細い信号線はネゲートとなっている。命令バンクBKI、データバンクBKD、および外部バンクBKXはそれぞれ命令バンクデコーダBDI、データバンクデコーダBDD、および外部バンクデコーダBDXによってデコードされ、該デコーダ出力のそれぞれビット0、1、および2がアサートされる。
【0051】
命令フェッチ要求REQI、データアクセス要求REQD、および外部アクセス要求REQXは全てアサートされているので、これらの信号とのAND論理後もアサート状態を保つ。そして優先度判定論理のANDゲートにより、アドレス選択制御信号はCA0のビット2、CA1のビット1、CA2のビット0、CA3のビット0がアサートされ、書込みデータ選択信号はCW0のビット0、CW1のビット1、CW2のビット0、CW3のビット0がアサートされる。
【0052】
また、バンク競合判定論理により命令フェッチ遅延DLIおよび外部アクセス遅延DLXはネゲートされる。また、図示していないが、読出しデータ選択信号CRI、CRD、およびCRXは命令バンクBKI、データバンクBKD、および外部バンクBKXの単純デコードであるから、それぞれビット0、1、および2がアサートされる。
【0053】
図9はキャッシュメモリCMの動作例である。キャッシュ制御部CCからの制御信号CTLとして、アドレス選択制御信号はCA0のビット2、CA1のビット1、CA2のビット0、CA3のビット0、書込みデータ選択信号はCW1のビット1、他CW0,2,3のビット0、読出しデータ選択信号はCRIのビット0、CRDのビット1、およびCRXのビット2がアサートされている。
【0054】
この結果、アドレスA0〜A3にはそれぞれ命令アドレスAI、データアドレスAD、および外部アドレスAXが選択される。また、書込みデータW0〜W3としては、W1には書込みデータWDが、他には書込みデータWXが選択される。そして、読出しデータRI、RD、およびRXにはそれぞれ読出しデータR0、R1、およびR2が選択される。
【0055】
以上のようにキャッシュコントロールレジスタCCRのバンク制御フィールドBCを1として統合型キャッシュモードとし、バンク指定ビットとして使用されるビット14〜13が異なるアドレスでアクセスすれば、命令フェッチ要求、データアクセス要求、および外部アクセス要求を同時に異なるバンクで処理することが出来る。すなわち、同時処理が実行される。
【0056】
図10〜12は本実施例の第2の動作例である。本動作例でもキャッシュコントロールレジスタCCRのバンク制御フィールドBCが1で統合型キャッシュモードであるとする。そして、命令アドレスAI、データアドレスAD、および外部アドレスAXを16進数で00001230、00101357、00100240とし、命令フェッチ要求REQI、データアクセス要求REQD、および外部アクセス要求REQXが全てアサートされたとする。
【0057】
すると、図10のように、命令バンクマルチプレクサBMI、データバンクマルチプレクサBMD、および外部バンクマルチプレクサBMXは全て0を出力する。更にビット13と結合すると、命令バンクBKI、データバンクBKD、および外部バンクBKXは全て0となる。
【0058】
図11はキャッシュ制御部CCの動作例である。命令バンクデコーダBDI、データバンクデコーダBDD、および外部バンクデコーダBDXの出力は全てビット0がアサートされ、命令フェッチ要求REQI、データアクセス要求REQD、および外部アクセス要求REQXとのAND論理後もアサート状態を保つ。そして優先度判定論理のANDゲートにより、アドレス選択制御信号としてはCA0のビット1、他CA1〜3のビット0がアサートされ、書込みデータ選択信号としてはCW0のビット1、他CW1〜3のビット0がアサートされる。
【0059】
また、バンク競合判定論理により命令フェッチ遅延DLIおよび外部アクセス遅延DLXがアサートされる。即ち、命令フェッチおよび外部アクセスは待たされる。また、図示していないが、読出しデータ選択信号CRI、CRD、およびCRXは命令バンクBKI、データバンクBKD、および外部バンクBKXの単純デコードであるから、全て0がアサートされる。
【0060】
図12はキャッシュメモリCMの動作例である。キャッシュ制御部CCからの制御信号CTLとして、アドレス選択制御信号はCA0のビット1、他CA1〜3のビット0、書込みデータ選択信号はCW0のビット1、他CW1〜3のビット0、読出しデータ選択信号は全てビット0がアサートされている。
【0061】
この結果、アドレスA0にはデータアドレスAD、他のアドレスA1からA3には外部アドレスAXが選択される。また、書込みデータW0には書込みデータWDが、他の書込みデータW1〜W3には書込みデータWXが選択される。そして、読出しデータRI、RD、およびRXには全て読出しデータR0が選択される。
【0062】
以上のようにキャッシュコントロールレジスタCCRのバンク制御フィールドBCを1として統合型キャッシュモードとし、バンク指定ビットとして使用されるビット14〜13が同一のアドレスでアクセスすると、バンク競合によりデータアクセスのみが実行され、命令フェッチおよび外部アクセスは待たされる。即ち、逐次処理が実行される。
【0063】
図13〜15は第3の動作例である。第2の動作例と同一のアドレスによるアクセス要求を用い、キャッシュコントロールレジスタCCRのバンク制御フィールドBCを0としてハーバードアーキテクチャモードとする。また、外部アクセスはデータ系のアクセスとする。即ち外部データアクセス信号DAをアサートする。すると、図13のようにバンク制御フィールドBCが0なので、命令バンクマルチプレクサBMI、データバンクマルチプレクサBMD、および外部バンクマルチプレクサBMXはそれぞれ値0、値1、および外部データアクセス信号DAの値1を選択して出力する。該出力と常にバンク指定信号として使用されるビット13とを結合した信号がバンク信号であるから、命令バンクBKI、データバンクBKD、および外部バンクBKXはそれぞれ0、2、および2となる。
【0064】
図14はキャッシュ制御部CCの動作例である。命令バンクデコーダBDI、データバンクデコーダBDD、および外部バンクデコーダBDXの出力はそれぞれビット0、2、および2がアサートされ、命令フェッチ要求REQI、データアクセス要求REQD、および外部アクセス要求REQXとのAND論理後もアサート状態を保つ。そして優先度判定論理のANDゲートにより、アドレス選択制御信号はCA0のビット2、CA1のビット0、CA2のビット1、CA3のビット0がアサートされ、書込みデータ選択信号はCW2のビット1、他CW0,1,3のビット0がアサートされる。また、バンク競合判定論理により外部アクセス遅延DLXがアサートされる。即ち、外部アクセスは待たされる。また、図示していないが、読出しデータ選択信号CRI、CRD、およびCRXは命令バンクBKI、データバンクBKD、および外部バンクBKXの単純デコードであるから、それぞれビット0、2、および2がアサートされる。
【0065】
図15はキャッシュメモリCMの動作例である。キャッシュ制御部CCからの制御信号CTLとして、アドレス選択制御信号はCA0のビット2、CA1のビット0、CA2のビット1、CA3のビット0が、書込みデータ選択信号はCW2のビット1、他CW0,1,3のビット0、読出しデータ選択信号はCRIのビット0、CRDのビット2、およびCRXのビット2がアサートされている。
【0066】
この結果、アドレスA0〜A3にはそれぞれ命令アドレスAI、外部アドレスAX、データアドレスAD、および外部アドレスAXが選択される。また、書込みデータW0〜W3に関しては、W2には書込みデータWDが、他W0,1,3には書込みデータWXが選択される。そして、読出しデータRI、RD、およびRXにはそれぞれ読出しデータR0、R2、およびR2が選択される。
【0067】
以上のようにキャッシュコントロールレジスタCCRのバンク制御フィールドBCを0としてハーバードアーキテクチャモードとすると、第2の動作例と同一アドレスでアクセスしても、命令フェッチとデータアクセスのバンク競合を回避できる。一方、データアクセスとデータ系外部アクセスのバンク競合は回避できないが、これは通常のハーバードアーキテクチャでも回避できない。
【0068】
図16はバンク信号生成部の第4の動作例である。第2の動作例と同一のアドレスによるアクセス要求を処理しているが、図6のバンク生成部BKGを用い、キャッシュコントロールレジスタCCRのバンク制御フィールドBCを2とする。また、プログラムとデータのアドレス空間を区別するアドレスビットはビット20とする。
【0069】
すると、図16のようにバンク制御フィールドBCが2なので、命令バンクマルチプレクサBMI、データバンクマルチプレクサBMD、および外部バンクマルチプレクサBMXはそれぞれ0、1、および1を出力する。該出力と常にバンク指定信号として使用されるビット13とを結合した信号がバンク信号であるから、命令バンクBKI、データバンクBKD、および外部バンクBKXはそれぞれ0、2、および2となる。即ち、第3の動作例と同一のバンク信号を出力する。この結果、キャッシュ制御部CCおよびキャッシュメモリCMも同様に動作し、統合型キャッシュでありながら、ハーバードアーキテクチャと同様、命令フェッチとデータアクセスの競合を回避できる。
【0070】
前述した各図の動作例をまとめると命令フェッチ要求、データアクセス要求及び外部アクセス要求並びに複数の制御信号(BKI,BKD,BKX)の入力によりキャッシュ制御部にて生成される複数のアドレス選択制御信号及び書き込みデータ選択制御信号の制御により、複数のアドレス信号(AI,AD,AX)及び書き込みデータ(WD,WX)から複数のセレクタの各々を介して、複数のバンク内の異なるバンクに対しては同時に、同一バンクに対しては逐次的に、複数のアクセスアドレスを与える。
【0071】
さらに上記複数のバンクの各々において、複数のアクセスアドレスへの書き込みデータの書き込みまたは各々のアクセスアドレスからのデータ読出しを、異なるバンクに対しては同時に、同一バンクに対しては逐次的に任意に行う。
【0072】
特に逐次処理について換言して表現すれば、キャッシュ制御部CC(コントローラ)の制御により制御信号(CA0〜3、CW0〜3)を複数のバンクの各々に供給し、同一のバンクに対し、命令或いはデータの書き込み或いは読み出し動作を逐次に行う。
【0073】
図17は本発明の第2の実施例のキャッシュメモリCMである。バンク毎に優先的に選択するアクセス要求を、キャッシュ制御レジスタCCRのバンク選択フィールドBS0〜BS3によってあらかじめ指定しておき、同時に2つ以上アクセス要求がきた場合はバンク毎に優先度の高いアクセス要求を受け付ける。図3に示す第1の実施例との違いはキャッシュ制御レジスタCCRからキャッシュ制御部CCへバンク選択フィールドBS0〜BS3を出力し、これと命令フェッチ要求REQIおよびデータアクセス要求REQDとの入力からキャッシュ制御信号CTLを生成している点である。
【0074】
図18は第2の実施例のキャッシュ制御部CCである。本方式の長所は、アクセス要求に比べて確定の遅いアドレス情報をバンク選択に使用しないため、高速にキャッシュアクセスを開始できることである。バンクの使用効率よりキャッシュのアクセス速度を重視する場合に適している。アドレスから生成されるバンク信号BKI、BKD、およびBKXを使用せずにアドレス選択制御信号CA0〜CA3および書込みデータ選択制御信号CW0〜CW3を生成する。
【0075】
アドレス選択制御信号CA0はバンク選択フィールドBS0と命令フェッチ要求REQIおよびデータアクセス要求REQDとから以下のように生成する。バンク選択フィールドBS0は命令フェッチ優先時に0、データアクセス優先時に1となる。アドレス選択制御信号CA0のビット2、1、および0はそれぞれ命令アドレスAI、データアドレスAD、および外部アドレスAXに対応する。
【0076】
まず、ビット2は命令フェッチ要求REQIがアサートされた場合に、データアクセス要求REQDがネゲートされているか、又はバンク選択フィールドBS0が0で命令フェッチ優先である場合にアサートされる。同様にビット1はデータアクセス要求REQDがアサートされた場合に、命令フェッチ要求REQIがネゲートされているか、又はバンク選択フィールドBS0が1でデータアクセス優先である場合にアサートされる。ビット0は命令フェッチ要求REQIおよびデータアクセス要求REQDのどちらもネゲートされている場合にアサートする。アドレス選択制御信号CA1〜CA3も同様にバンク選択フィールドBS1〜BS3と命令フェッチ要求REQIおよびデータアクセス要求REQDとから生成される。書込みデータ選択制御信号CW0〜CW3は、図4に示す第1の実施例同様、ビット1はアドレス選択制御信号CA0〜CA3のビット1と同一論理であり、ビット0はビット1の反転である。
【0077】
尚、本実施例においても読出しデータ選択信号CRI、CRD、およびCRXはそれぞれバンク信号BKI、BKD、およびBKXのデコードによって得られる。アクセス要求REQI、REQD、およびREQXとバンク選択フィールドBS0〜3のみでバンク選択を行うので、各アクセスに必要なバンクが確保されたかをチェックし、確保できなかった場合はアクセス遅延信号DLI、DLD、およびDLXをアサートして、アクセスを待たせる。このチェックはキャッシュアクセスと並列に行えばよい。
【0078】
具体的には、第1の実施例と同様にバンク信号BKIまたはBKDとアクセス要求REQIまたはREQDとからアクセスすべきバンクを決定し、そのバンクにおいてアドレス選択制御信号CA0〜CA3によって、命令アドレスAIまたはデータアドレスADが選択されていなければ、それぞれアクセス遅延信号DLIまたはDLDをアサートする。本実施例では外部アクセスは全てのバンクで常に優先度が低いのでアクセス要求REQIまたはREQDが出ているとバンクを確保できない。このため、バンクに依らずアクセス要求REQXアサート時にREQIまたはREQDがアサートされていればアクセス遅延信号DLXをアサートする。
【0079】
第2の実施例では外部アクセスは常に優先度を最低にしているが、外部アクセスを含めて自由に優先度を可変にすることは可能である。第1および第2の実施例は4バンク構成の場合であるが、様々なバンク数の場合に本発明を拡張することは本発明の属する分野の通常の技術者であれば可能である。
【0080】
図19は本発明の第3の実施例のキャッシュメモリCMである。複数ウェイ構成のキャッシュメモリを全て命令データ共用にするか、ウェイ毎に命令用、データ用のいずれかに指定するかする。バンク数が2の累乗でないと実現困難であるのに対し、ウェイ数は任意の数が可能なので設計の自由度が増す。また、バンクインタリーブ化する必要もない。例えば4ウェイセットアソシアティブの統合型キャッシュメモリを、全てのウェイを命令データ共用とすればそのまま統合型に、2ウェイを命令用、残りの2ウェイをデータ用とすればハーバードアーキテクチャになる。複数個のウェイの各々に対して命令またはデータの内何れか1つのみをキャッシングすることにより、命令データ分離型キャッシュメモリとして動作させることが出来る。但し、バンクインタリーブ化しないと外部アクセスと命令またはデータアクセスを同時に実行することは出来ない。また、ウェイ毎に異なるアドレスを指定する必要があるため、1つのメモリマットに複数のウェイを実装することは出来ない。
【0081】
さて、第2と第3の実施例のキャッシュメモリCMの違いは、図17と図19に示されるCMを構成するブロックの違いである。まず、キャッシュメモリ本体はバンクBK0〜BK3の代わりにウェイWY0〜WY3に分割されて、それぞれのウェイがアドレスマルチプレクサAM0〜AM3(又はセレクタ)によって選択される固有のアドレスでアクセスされる。そして、バンクはないのでバンク生成部BKGはない。また、外部アクセスと命令またはデータアクセスを同時に実行することは出来ないので、外部アクセス専用のポートは不要である。
【0082】
図22はキャッシュメモリ本体にウェイを使用した場合のプロセッサ構成例を示した図である。外部アクセスは命令系とデータ系に分けて、通常のハーバードアーキテクチャのように、事前に命令アクセスおよびデータアクセスにマージしておく。プロセッサCPUから命令フェッチ要求REQI,データアクセス要求REQDから成る複数の制御コマンド及びAI,ADから成る複数のアドレス信号がキャッシュメモリ本体に送信される。
【0083】
前述したバンクBK0〜BK3を採用したキャッシュメモリCMを備えたプロセッサシステム(図2)とバンクの代わりにウェイを採用したCMを備えたプロセッサシステム(図22)の相違点としては、実行ユニットEXUからCMに送信される書き込みデータWD及びBIUからCMに送信される書き込みデータの内、何れか1データがセレクタにて選択されCMに書き込まれ、並行してBIUからの命令系書き込みデータWIがCMに書き込まれることにある。
【0084】
同図22のプロセッサシステムを採用した結果、図17に示すキャッシュメモリ構成例と比較し、図19のキャッシュメモリ構成においてアドレスマルチプレクサAM0〜AM3は命令アドレスAIとデータアドレスADの2入力に、書込みデータマルチプレクサWM0〜WM3の外部書込みデータWX(図17)は、命令系は命令系書込みデータWIに、データ系はデータ系書込みデータWDにマージされて不要になる。命令系外部アクセスAX(図17)をマージした結果、マージ前にはなかった命令系書込みデータWI(図19)が存在する。
【0085】
更に、バンクインタリーブ方式では単純なバンク信号のデコード結果であった読出しデータ選択制御信号CRIおよびCRDは、図19のキャッシュメモリCMに具備されるウェイ選択制御部WSCによって生成される。ウェイ選択制御部WSCの詳細を図20に示す。キャッシュ制御部CC(図21)からの読出しデータ選択制御信号CR0〜CR3と各ウェイからのヒット信号HT0〜HT3とのAND論理によって上記信号CRI及びCRDは生成される。図19に示すように読出しデータRI、RDは読出しデータ選択制御信号CRI及びCRDによる制御の下、それぞれ読出しデータマルチプレクサRMI及びRMDを介して、各ウェイWY0〜WY3から読み出される読出しデータR0〜R3から選択される信号である。
【0086】
図21は図19に示す第3の実施例のキャッシュメモリCM内のキャッシュ制御部CCを示している。キャッシュ制御レジスタCCRには統合ビットU(キャッシュメモリが統合型か分離型かを区別するビット)およびウェイ選択フィールドWS0〜WS3がある。統合ビットUは全てのウェイを命令データ共用にすることを示す。ウェイ選択フィールドWS0〜WS3は、統合ビットUがアサートされている時には命令データアクセス競合においてウェイ毎にどちらのアクセスを優先するかを示し、統合ビットUがネゲートされている時にはウェイが命令用かデータ用かを示す。ウェイ選択フィールドWS0〜WS3は命令選択時に0、データ選択時に1とする。この時、キャッシュ制御部CCから出力されるアドレス選択制御CA0〜CA3、書込みデータ選択制御CW0〜CW3、および読出しデータ選択制御CR0〜CR3は全て同一論理で生成できる。尚、図中1、0はビット1、0を表し、それぞれ命令系およびデータ系の選択制御信号である。
【0087】
例えば、図19に示す通リ、アドレス選択制御信号CA0のビット0はウェイ0のデータアドレスADの選択制御信号である。データアドレスADを選択する条件は、図21にてデータアクセス要求REQDアサート時に、命令アクセス要求REQIがネゲートされているか、ウェイ選択フィールドWS0が1の場合である。この時、ウェイ0は、統合ビットUの値によってデータアクセスが優先されているか、データ用であるかのいずれかである。いずれの場合もデータアクセスを行う。アドレス選択制御CA0のビット1はビット0の反転信号である。このため、本実施例では命令アクセス要求REQIおよびデータアクセス要求REQDの双方がネゲートされた場合等、アドレスとしてどちらを選択しても良い場合は、命令アドレスAIが選択される。他の制御信号も同様に生成される。
【0088】
統合ビットUは通常のキャッシュアクセスでは不要であるが、キャッシュエントリのリプレース時に必要となる。統合ビットUがアサートされている場合は、リプレースエントリの候補は全ウェイである。この結果、命令とデータの混在した統合型キャッシュメモリとなる。統合ビットUがネゲートされている場合は、リプレースエントリの候補となるウェイは、命令リプレース時はウェイ選択フィールドWS0〜WS3が0であるウェイ、データリプレース時はウェイ選択フィールドWS0〜WS3が1であるウェイのみである。この結果、ウェイ毎に命令またはデータのみが書込まれるため、ハーバードアーキテクチャとなる。
【0089】
前述したキャッシュメモリCMにウェイを使用した際の動作例をまとめると、命令フェッチ要求REQIとデータアクセス要求REQDの入力によりキャッシュ制御部CCにて生成される複数のアドレス選択制御信号及び書き込みデータ選択制御信号により、複数のアドレス信号(AI,AD)及び書き込みデータ(WI,WD)から複数のセレクタの各々を介して、複数個のウェイ内の異なるウェイに対しては同時に、同一ウェイに対しては逐次的に、複数のアクセスアドレス又は書き込みデータを与える。
【0090】
さらに複数個のウェイの各々において、アクセスアドレスへの書き込みデータの書き込みまたはアクセスアドレスからのデータ読出しを異なるウェイに対しては同時に、同一ウェイに対しては逐次的に任意に行う。
【0091】
【発明の効果】
本発明によって、従来、ハーバードアーキテクチャでのみ達成可能であった命令フェッチとデータアクセスの同時実行を統合型キャッシュメモリアーキテクチャで達成することが可能となる。これによって、命令書き換えの容易性と高性能とを同時に達成することができる。
【0092】
また、アプリケーションを使用し、が命令とデータの一方を重点的にキャッシングしたい場合でも、ハーバードアーキテクチャのように一方のキャッシュが無駄になることなく、全容量を活用することが出来る。
【0093】
また、同一のプロセッサで統合型キャッシュメモリアーキテクチャとハーバードアーキテクチャの双方を実現することが可能となる。更に、同一プロセッサで多様なキャッシュメモリ構成を実現することも可能となる。
【図面の簡単な説明】
【図1】キャッシュメモリアーキテクチャの変遷を示す図である。
【図2】本発明を適用したプロセッサシステムの例を示す図である。
【図3】本発明を適用したキャッシュメモリの第1の実施例を示す図である。
【図4】本発明の第1の実施例のキャッシュ制御部を示す図である。
【図5】バンク信号生成部の第1の例を示す図である。
【図6】バンク信号生成部の第2の例を示す図である。
【図7】バンク信号生成部の第1の動作例を示す図である。
【図8】キャッシュ制御部の第1の動作例を示す図である。
【図9】キャッシュメモリの第1の動作例を示す図である。
【図10】バンク信号生成部の第2の動作例を示す図である。
【図11】キャッシュ制御部の第2の動作例を示す図である。
【図12】キャッシュメモリの第2の動作例を示す図である。
【図13】バンク信号生成部の第3の動作例を示す図である。
【図14】キャッシュ制御部の第3の動作例を示す図である。
【図15】キャッシュメモリの第3の動作例を示す図である。
【図16】バンク信号生成部の第4の動作例を示す図である。
【図17】本発明を適用したキャッシュメモリの第2の実施例を示す図である。
【図18】第2の実施例のキャッシュ制御部を示す図である。
【図19】本発明を適用したキャッシュメモリの第3の実施例を示す図である。
【図20】第3の実施例のウェイ選択制御部を示す図である。
【図21】第3の実施例のキャッシュ制御部を示す図である。
【図22】本発明を適用したキャッシュメモリにおいて、バンクの代わりにウェイを使用した場合のプロセッサシステムの例を示す図である。
【符号の説明】
CPU:中央処理装置、IFU:命令フェッチユニット、EXU:実行ユニット、BIU:バスインタフェイスユニット、AI:命令アドレス、AD:データアドレス、AX:外部アドレス、REQI:命令フェッチ要求、REQD:データアクセス要求、REQX:外部アクセス要求、RI、RD、RX:読出しデータ、WD、WX:書込みデータ。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a processor system having a cache memory, and more particularly to a processor system having a processor capable of processing a plurality of commands and a cache memory operable in response to an access request from the processor. Further, both the integrated cache memory system and the separated cache memory system can be realized by the same architecture, and the integrated cache memory system can be accelerated at the same speed as the separated cache memory system.
[0002]
[Prior art]
FIG. 1 shows an outline of the transition of the cache memory architecture. Prior to the introduction of the cache memory, the processor CPU and the main memory MM directly exchanged instructions and data as in (1). After that, the main memory MM speed has been determined by the increase in the capacity of the main memory MM and the increase in the speed of the processor CPU.
[0003]
Therefore, as shown in (2), the cache memory UC having a smaller capacity and higher speed than the main memory MM is arranged between the processor CPU and the main memory MM to improve the performance. The initial cache memory UC was an integrated type that handles both instructions and data.
[0004]
Thereafter, the processor CPU and the cache memory UC can be integrated on the same chip by miniaturizing the process as shown in (3). As a result, the number of signal lines connecting the processor CPU and the cache memory UC can be greatly increased. As shown in (4), the cache memory UC can be separated into the instruction cache IC and the data cache DC and simultaneously accessed. Harvard architecture has appeared. And it became common sense that high-performance cache architecture is Harvard architecture.
[0005]
Subsequently, a superscalar or VLIW (Very Long Instruction Word) architecture appeared, enabling a plurality of data accesses simultaneously. For this reason, a processor having a plurality of data cache DC ports as shown in (5) has appeared. In general, the multi-port configuration is such that only accesses to different banks are simultaneously executed by the bank interleaving method.
[0006]
In addition, since the integrated cache memory architecture is less expensive than the Harvard architecture, the low-end version may be the integrated type and the high-end version may be the Harvard architecture in the same processor family. For example, SH-3 described in “Microprocessor Report Vol. 9, no. 3, 3/6/95, p. 12” and “Microprocessor Report Vol. 10, no. 14, 10/28/96, pp. 32- SH-4 described in "35" is the same SuperH series processor, but the former is an integrated type and the latter is a Harvard architecture.
[0007]
In recent years, JAVA is rapidly spreading as a programming language independent of processors. JAVA is a language for rewriting instructions. The complex instruction executed at the first time is rewritten to an instruction that is executed at high speed based on information determined by executing it once. Furthermore, in order to execute a program written in JAVA at high speed, a method of detecting a routine with high execution frequency, rewriting it into a machine language program specific to the processor and executing it at high speed is also a JIT (Just-in-time) compilation method. Generalized.
[0008]
The performance improvement by the cache memory is premised on the spatial and temporal locality of memory access. Therefore, it does not work effectively without the locality. For example, the network processor IXP1200 described in “Microprocessor Report Vol.13, no.12, 9/13/99, pp1, 6-10” does not include a data cache, and directly accesses an external SRAM or SDRAM. In addition, the vector floating point unit VPU of the emotion engine EE described in “Microprocessor Report Vol. 13, No. 5, 4/19/99, pp1, 6-11” has a dedicated RAM instead of a cache. A direct memory access unit controlled by software performs data access to the RAM.
[0009]
[Problems to be solved by the invention]
As a result of the historical transition of the cache architecture as described above, it has become common sense to use a Harvard architecture when emphasizing performance and an integrated cache memory architecture when emphasizing cost. However, due to the improvement in integration due to process miniaturization, the difference in cost between the integrated architecture and the Harvard architecture has become smaller than the cost of the entire chip, and there is an advantage of creating two types of cache memory architecture for each product. It is gone.
[0010]
Further, when a language for rewriting instructions such as JAVA becomes widespread, the Harvard architecture is not always good. In the Harvard architecture, instruction rewriting is generally not detected by hardware. For this reason, when the instruction is rewritten, it must be ensured that the instruction before rewriting is not executed by software responsibility. At the time of instruction rewriting, since the rewritten instruction is handled as data, the rewritten instruction is stored in the data cache DC. At this time, even if the instruction before rewriting exists in the instruction cache IC, it is not updated.
[0011]
The software clears the instruction before rewriting on the instruction cache IC, writes the instruction back to the main memory MM after rewriting on the data cache DC, and then executes the instruction after rewriting. Then, the hardware fetches and executes the rewritten instruction from the main memory MM. Even if the instruction rewrite is detected by hardware, efficient processing is difficult because only the above-described software processing is hardwareized.
[0012]
On the other hand, in the integrated cache memory architecture, instructions on the cache memory UC are rewritten by instruction rewriting. Therefore, if an instruction is fetched from the cache memory UC after instruction rewriting, the instruction after rewriting can be fetched. For this purpose, in a normal pipeline processor, it is only necessary to cancel an executing instruction existing on the pipeline after the instruction is rewritten. Therefore, the integrated cache memory architecture is more suitable for supporting instruction rewriting.
[0013]
Due to the improvement of the degree of integration accompanying the process miniaturization, it is possible to make the main memory MM on-chip in a small-scale system. Also, like the Emotion Engine EE, instructions or data are placed on the on-chip memory, and the instructions and data are transferred to the on-chip memory in advance by direct memory access, etc., so that high-speed access is ensured when actually used. It is also possible to do. In this way, if the instruction or data to be used can be predicted, the speed can be increased even if the memory access has no spatial and temporal locality. In such a situation, a cache memory is unnecessary, or only one of an instruction cache and a data cache is required.
[0014]
In addition, from the era when processor systems were limited to mainframes, workstations, PCs, etc., the era has come to be installed in a wide variety of products such as mobile phones, digital home appliances, and automobiles. The composition is also diversified. Therefore, it is important to have various cache memory configurations with the same processor.
[0015]
A first problem to be solved by the present invention is to achieve simultaneous execution of instruction fetch and data access, which can be achieved only with a Harvard architecture, with an integrated cache memory architecture. This makes it possible to achieve both high performance and ease of instruction rewriting at the same time. In addition, even in the case of an application that wants to cache one of instructions and data intensively, the entire capacity can be utilized without wasting one cache as in the Harvard architecture.
[0016]
A second problem to be solved by the present invention is to realize both an integrated cache memory architecture and a Harvard architecture with the same processor. Furthermore, it is to realize various cache memory configurations with the same processor.
[0017]
[Means for Solving the Problems]
The first problem is solved by forming a plurality of ports in the integrated cache memory. This allows instruction fetches and data access requests to be processed at the same time, achieving the same performance as the Harvard architecture. However, pure multiple ports increase the amount of hardware and reduce the cache memory capacity that can be realized in the same area. Therefore, the cache memory is constituted by a plurality of banks specified by a part of the address, each bank is a one-port cache, and if the instruction fetch and the data access request are for different banks, simultaneous processing is performed, and if the same bank is sequentially processed By processing, the amount of hardware can be reduced and the cache memory capacity can be maintained as compared with a complete multi-port cache memory. Although the capacity of cache memory can be increased along with the process miniaturization, it is necessary to divide the memory mat in order to increase the capacity, and if the divided memory mat is assigned to the bank, it will accompany the bank division. An increase in cost can be avoided.
[0018]
The second problem is solved by using not only a part of the address but also an instruction fetch and a data access request identification signal for specifying the port or bank. When used as an integrated cache memory architecture, a part of the address is used, and when used as a Harvard architecture, an identification signal is used. In this way, by switching signals used for port or bank designation, two cache memory architectures are realized by the same processor. Furthermore, it is possible to change the capacity distribution of the Harvard architecture instruction cache and data cache depending on the signal switching method. Also, the first and second problems can be solved in the same way by making it possible to access a plurality of ways with different addresses.
[0019]
Further, in order to solve the above problems, the present invention provides a processor system having a processor capable of independently processing a plurality of commands and a cache memory that operates in response to an access request from the processor. And a plurality of control commands including instruction fetches transmitted from the processor via the plurality of ports, and a plurality of address signals can be simultaneously processed. is there.
[0020]
Furthermore, the present invention provides a system having a processor capable of independently processing instruction fetch and data access and a cache memory operating in response to an access request from the processor, wherein the cache memory includes a plurality of selectors and a plurality of addresses. It is composed of a plurality of banks specified by a part, each bank is a one-port cache, and if the instruction fetch request and the data access request are for different banks, simultaneous processing is performed, and if the same bank is processed, sequential processing is performed. An object is to provide a processor system.
[0021]
Further, the present invention includes a plurality of banks and a controller that controls the plurality of banks, the controller generates a control signal for writing or reading a command or data to each of the plurality of banks, The control signal is supplied to the plurality of banks under the control of the controller, and the command or data is written or read simultaneously to different banks in the plurality of banks, and the command or data is transferred to the same bank. It is another object of the present invention to provide a cache memory characterized by sequentially performing the writing or reading operation.
[0022]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings. The same reference numerals in the drawings of the respective embodiments indicate the same or equivalent. FIG. 2 shows an example of a processor system to which the present invention is applied. It consists of a processor LSI and a main memory MM. The processor LSI includes a central processing unit CPU, a cache memory CM, an external memory interface EMI, and a peripheral module PM, and is connected by an internal bus IB. The central processing unit CPU includes an instruction fetch unit IFU, an execution unit EXU, and a bus interface unit BIU. The processor and the cache memory CM are integrated on the same LSI chip.
[0023]
The basic operation of the central processing unit CPU is as follows. First, the instruction fetch unit IFU issues an instruction fetch request REQI together with an instruction address AI to the cache memory CM. The cache memory CM returns the read instruction RI to the instruction fetch unit IFU in response to the request REQI. The instruction fetch unit IFU supplies the instruction RI to the execution unit EXU. The execution unit EXU decodes and executes the instruction RI. If the decoded instruction is a memory read instruction, a data access request REQD is issued together with the data address AD. The cache memory CM returns the read data RD to the execution unit EXU in response to the request REQD. If the decoded instruction is a memory write instruction, a data access request REQD is issued together with the data address AD and the write data WD. The cache memory CM writes the data WD in response to the request REQD.
[0024]
When the instruction fetch request REQI or the data access request REQD has a cache miss, the bus interface unit BIU receives the instruction address AI, data address AD, write data WD, and the like related to the request, and externally passes through the internal bus IB. An external memory fetch request is issued to the memory interface EMI. In response to the request, the external memory interface EMI outputs an address A to the main memory MM to issue an external memory fetch request, and the main memory MM returns data D in response thereto. The external memory interface EMI returns data D to the bus interface unit BIU via the internal bus IB. The bus interface unit BIU issues an external access request REQX together with the external address AX and write data WX, and the cache memory CM has a port for processing the external access request REQX (access request from the outside). Write data WX is written accordingly.
[0025]
When the pipeline operation is performed in the central processing unit CPU, the instruction fetch unit IFU fetches the subsequent instruction simultaneously with the instruction processing of the execution unit EXU. Further, if the data access of the execution unit EXU is non-blocking, the data access by the subsequent instruction is performed simultaneously with the external memory access due to the data access miss of the cache memory CM. Therefore, the cache memory CM includes an instruction fetch request and a data access request, or a plurality of control commands composed of any one of the instruction fetch request REQI, the data access request REQD, and the external access request REQX, and an instruction address. An ability to simultaneously process a plurality of address signals including any one of the signal AI and the data address signal AD, or the signal AI, the signal AD, and the external address signal AX is required.
[0026]
FIG. 3 shows a first embodiment of a cache memory CM to which the present invention is applied. The cache memory CM includes a cache control register CCR, a bank signal generation unit BKG (or signal generation unit), a cache control unit CC that controls the CM, and a cache body. BKG generates a plurality of control signals (BKI, BKD, BKX) to be given to CC based on a plurality of address signals.
[0027]
The cache memory main body is divided into four banks BK0 to BK3 designated by specific bits which are a part of the plurality of addresses in each of a plurality of address signals (AI, AD, and AX), and to different banks. Simultaneous access is possible.
[0028]
When specifying each of the plurality of banks in the cache memory, the cache control unit included in the cache memory based on the input of the instruction fetch request or data access request and the plurality of control signals instead of the specific bit By specifying a bank via each of the plurality of selectors under the control of the plurality of generated address selection control signals and write data selection control signals, it operates as an instruction data separation type cache memory.
[0029]
The banks BK0 to BK3 respectively receive access addresses A0 to A3, and further write data W0 to W3 at the time of writing, and perform a read or write operation, and output read data R0 to R3 at the time of reading. Each of the banks BK0 to BK3 is regarded as a one-port cache. Access addresses A0 to A3 are selected from addresses AI, AD, or AX by address selection control signals CA0 to CA3 in address multiplexers (or selectors) AM0 to AM3, respectively. Write data W0 to W3 are selected from write data WD or WX by write data selection control signals CW0 to CW3 in write data multiplexers (or selectors) WM0 to WM3, respectively. Read data RI, RD, and RX are selected from read data R0 to R3 by read data selection control signals CRI, CRD, and CRX in read data multiplexers (or selectors) RMI, RMD, and RMX, respectively. Note that the number assigned to the input signal of each multiplexer in the figure is the bit number of the selection control signal that is asserted when that input is selected.
[0030]
FIG. 4 shows details of the cache control unit CC of the first embodiment. A control signal for each multiplexer of the cache body is generated from the instruction bank BKI, data bank BKD, and external bank BKX from the bank signal generation unit BKG, and the instruction fetch request REQI, data access request REQD, and external access request REQX. .
[0031]
More specifically, the cache control unit has already assigned a data access request to a bank designated based on a control signal in response to an instruction fetch request, a data access request, and a plurality of control signals (BKI, BKD, BKX) inputs. If a data access request is not yet assigned to the bank specified based on the control signal, a plurality of address selection control signals or write data selections are generated. Generate a control signal.
[0032]
The read data selection control signals CRI, CRD, and CRX in FIG. 3 are 4-bit signals that control the 4-input multiplexer. Each of the 2-bit instruction bank BKI, the data bank BKD, and the external bank BKX can be generated by simple decoding and is not shown.
[0033]
Address selection control signals CA0 to CA3 and write data selection control signals CW0 to CW3 cannot be generated unless the priority of instruction fetch, data access, and external access is determined. The simplest priority determination method is to maintain the original sequential execution order of the program. Since external access is caused by a previous cache access miss, the sequential execution order is the fastest. Further, instruction fetch is preparation of subsequent instructions, and the sequential execution order is the slowest. Therefore, the priority is first for external access, second for data access, and third for instruction fetch.
[0034]
However, in a highly optimized program, instructions and data are cached in advance from the main memory MM to the cache memory CM by a prefetch instruction or the like so that a cache miss does not occur when actually used. In such a program, lowering the external access priority improves performance. Since it is difficult to optimize the program so that it is just-on-time caching, when caching with a little extra time, caching is performed earlier than necessary, so it is better not to stall internal operations by waiting for this Because it is good. Therefore, in this embodiment, the priority is set to data access for the first, instruction fetch for the second, and external access for the third.
[0035]
Since the access addresses A0 to A3 shown in FIG. 3 are selected from the addresses AI, AD, or AX, the address multiplexers AM0 to AM3 have 3 inputs, and the control signals CA0 to CA3 have 3 bits. Therefore, as the bit number of the control signal, 2 is assigned to the instruction address, 1 is assigned to the data address, and 0 is assigned to the external address.
[0036]
First, as shown in FIG. 4, when the highest priority data access request REQD is asserted, a bank designated by the data bank BKD is assigned, and bit 1 of the control signal of the assigned bank among the address selection control signals CA0 to CA3 is assigned. Assert. In other words, each of the 4-bit signals obtained by decoding the 2-bit data bank BKD by the data bank decoder BDD and the data access request REQD are ANDed.
[0037]
Next, when the instruction fetch request REQI is asserted, a bank designated by the instruction bank BKI is allocated. At this time, if data access has already been assigned to the bank, the instruction fetch delay signal DLI is asserted and instruction fetch is not assigned. When the allocation is performed, bit 2 of the control signal of the allocated bank is asserted among the address selection control signals CA0 to CA3. That is, the AND logic of each of the 4-bit signals obtained by decoding the 2-bit instruction bank BKI by the instruction bank decoder BDI and the instruction access request REQI is taken, and further, the inverted signal of the bit 1 of the address selection control signals CA0 to CA3 and the AND logic. I take the. Bit 0 of the address selection control signals CA0 to CA3 is asserted when neither data access nor instruction access is performed in the corresponding bank. That is, the AND logic of the inverted signal of bit 1 of the address selection control signals CA0 to CA3 and the inverted signal of the signal obtained by ANDing the instruction access request REQI that is the source of bit 2 and the signal from the BDI. It is a signal taken.
[0038]
Further, a signal obtained by ANDing the 4-bit signal obtained by decoding the 2-bit external bank BKX by the external bank decoder BDX and the external access request REQX is asserted, and an external access request to the corresponding bank is issued. Regardless, if the signal for selecting an external address as the bank address, that is, bit 0 of the address selection control signals CA0 to CA3 is not asserted, the necessary access bank cannot be selected, and the external access delay signal DLX is asserted.
[0039]
Since the write data W0 to W3 shown in FIG. 3 is selected from the write data WD or WX, the write data multiplexers WM0 to WM3 have two inputs and the control signals CW0 to CW3 have two bits. Therefore, the bit number of the control signal is assigned 1 to the data address and 0 to the external address. First, bit 1 of write data selection control signals CW0 to CW3 has the same logic as bit 1 of address selection control signals CA0 to CA3. When there is no data access, the external write data WX shown in FIG. 3 is selected as the write data. Therefore, bit 0 of the write data selection control signals CW0 to CW3 is the inversion of bit 1 as shown in FIG.
[0040]
FIG. 5 shows a first example of the bank signal generator BKG. If the capacity of the cache memory CM is 128 KB and the 4-way set associative method is used, the capacity per way is 32 KB and the index is 15 bits. In the bank interleave method, a part of the index is used for bank designation. In this embodiment, since the number of banks is 4, 2 bits are used for bank designation. Which bit is used for bank designation determines the stall frequency due to bank contention to a minimum, depending on the program. Conversely, it is also possible to create a program that suppresses contention by disclosing bank designation bits to the programmer. In FIG. 5, bits 14 to 0 of the address are used as indexes, and the upper 2 bits of the index are used as bank designation bits. Therefore, bits 14 to 13 are bank designation bits.
[0041]
The bank signal generator BKG is controlled by the bank control field BC of the cache control register CCR. In FIG. 5, the bank control field BC is 1 bit, and the bank multiplexers BMI, BMD, and BMX are controlled to select the upper bits of the 2-bit bank signals BKI, BKD, and BKX. In this embodiment, the lower bits are always bit 13 of addresses AI, AD, and AX. In FIG. 5, the numbers assigned to the input signals of the bank multiplexers BMI, BMD, and BMX are the values of the bank control field BC when the input signals are selected. That is, if the bank control field BC is 1, the bits 14 of the addresses AI, AD, and AX are selected as the upper bits of the bank signals BKI, BKD, and BKX, respectively. On the other hand, if the bank control field BC is 0, the value 0, the value 1, and the external data access signal DA are selected. The external data access signal DA is asserted when the external access is a data system.
[0042]
As a result, if the bank control field BC is 1, the bank signals BKI, BKD, and BKX are bits 14 to 13 of the addresses AI, AD, and AX, respectively. Therefore, the cache memory CM is an integrated 4-bank interleaved cache.
[0043]
If the bank control field BC is 0, the bank signal BKI is 0 or 1 depending on the value of the bit 13 of the address AI, and the bank signal BKD is 2 or 3 depending on the value of the bit 13 of the address AD. BKX is 0 or 1 when the external data access signal DA is negated, or 2 or 3 when asserted, depending on the value of bit 13 of the address AX.
[0044]
Therefore, for instruction fetch and instruction system external access, bank signals BKI and BKX always specify bank 0 or 1, and for data access and data system external access, bank signals BKD and BKX are always bank 2 or Specify 3. As a result, banks 0 and 1 operate as a 2-bank interleave instruction cache, and banks 2 and 3 operate as a 2-bank interleave data cache. Since different banks can be accessed simultaneously, the Harvard architecture is achieved. At this time, bit 14 of the address is always used as a tag. If the bank control field BC is 1, it is redundant to set bit 14 as a tag, but no malfunction occurs. If the bank control field BC is 0, bit 14 is necessary as a tag. If one bit of redundancy is removed, the logic becomes complicated and the speed decreases.
[0045]
FIG. 6 shows a second example of the bank generation unit BKG. Normally, the address space where the program is placed and the address space where the data is placed are often determined in advance by the system. Therefore, if there is an address bit for identifying these two spaces, the instruction bit is designated as a bank designation bit. And data bank conflicts can be avoided. As a result, it is possible to obtain the same performance as the Harvard architecture while being an integrated four-bank interleaved cache.
[0046]
In the example of FIG. 6, the bank control field BC is 2 bits, and in addition to the cases where the bank control field BC of FIG. When the bank control field BC is 2, the bit 20 of the address is selected, and when the bank control field BC is 3, the bit 24 is selected.
[0047]
As a result, bank conflict between instruction and data can be avoided by using bit 20 as a bank designation bit in a relatively small system with a program size of about 1 MB and bit 24 in a slightly larger system of about 16 MB. Also in this case, as in the case of FIG. 5, the bits 24, 20, and 14 are always used as tags.
[0048]
7 to 9 show a first operation example of this embodiment. FIG. 7 shows an example of the operation of the bank generator BKG. In the figure, thick signal lines are asserted, and thin signal lines are negated. In this operation example, it is assumed that the bank control field BC of the cache control register CCR is 1 and the integrated cache mode is set. It is assumed that the instruction address AI, the data address AD, and the external address AX are hexadecimal numbers 00001230, 00102468, and 001048C0, and the instruction fetch request REQI, data access request REQD, and external access request REQX are all asserted.
[0049]
In FIG. 7, hexadecimal numbers are expanded to binary numbers so that the values of bits 14 to 13 are clear. Since bank control field BC is 1, instruction bank multiplexer BMI, data bank multiplexer BMD, and external bank multiplexer BMX select bit 14 of instruction address AI, data address AD, and external address AX, respectively, and 0, 0, and 1 is output. Since a signal obtained by combining the output and the bit 13 that is always used as a bank designation signal is a bank signal, the instruction bank BKI, the data bank BKD, and the external bank BKX are 0, 1, and 2, respectively.
[0050]
FIG. 8 shows an operation example of the cache control unit CC. In the figure, thick signal lines are asserted, and thin signal lines are negated. Instruction bank BKI, data bank BKD, and external bank BKX are decoded by instruction bank decoder BDI, data bank decoder BDD, and external bank decoder BDX, respectively, and bits 0, 1, and 2 of the decoder output are asserted, respectively.
[0051]
Since the instruction fetch request REQI, the data access request REQD, and the external access request REQX are all asserted, the asserted state is maintained even after AND logic with these signals. Then, the AND gate of the priority determination logic asserts the CA2 bit 2, the CA1 bit 1, the CA2 bit 0, and the CA3 bit 0 as the address selection control signal, and the write data selection signal is the CW0 bit 0 and the CW1 bit. Bit 1, bit 0 of CW2, and bit 0 of CW3 are asserted.
[0052]
Further, the instruction fetch delay DLI and the external access delay DLX are negated by the bank conflict determination logic. Although not shown, read data selection signals CRI, CRD, and CRX are simple decodes of instruction bank BKI, data bank BKD, and external bank BKX, so that bits 0, 1, and 2 are asserted, respectively. .
[0053]
FIG. 9 shows an operation example of the cache memory CM. As a control signal CTL from the cache control unit CC, the address selection control signal is bit 2 of CA0, bit 1 of CA1, bit 0 of CA2, bit 0 of CA3, write data selection signal is bit 1 of CW1, and other CW0,2 , 3 bit 0, and CRI bit 0, CRD bit 1 and CRX bit 2 are asserted in the read data selection signal.
[0054]
As a result, the instruction address AI, the data address AD, and the external address AX are selected as the addresses A0 to A3, respectively. As the write data W0 to W3, the write data WD is selected for W1, and the write data WX is selected for the other. Then, read data R0, R1, and R2 are selected as read data RI, RD, and RX, respectively.
[0055]
As described above, if the bank control field BC of the cache control register CCR is set to 1, the integrated cache mode is set, and the bits 14 to 13 used as the bank designation bits are accessed with different addresses, an instruction fetch request, a data access request, and External access requests can be processed simultaneously in different banks. That is, simultaneous processing is executed.
[0056]
10 to 12 show a second operation example of this embodiment. Also in this operation example, it is assumed that the bank control field BC of the cache control register CCR is 1 and the integrated cache mode is set. Then, assume that the instruction address AI, the data address AD, and the external address AX are hexadecimal 00001230, 00101357, and 00100240, and the instruction fetch request REQI, the data access request REQD, and the external access request REQX are all asserted.
[0057]
Then, as shown in FIG. 10, the instruction bank multiplexer BMI, the data bank multiplexer BMD, and the external bank multiplexer BMX all output 0. When further combined with bit 13, instruction bank BKI, data bank BKD, and external bank BKX are all zero.
[0058]
FIG. 11 shows an operation example of the cache control unit CC. The output of the instruction bank decoder BDI, data bank decoder BDD, and external bank decoder BDX is all asserted bit 0, and remains asserted after AND logic with the instruction fetch request REQI, data access request REQD, and external access request REQX . Then, the AND gate of the priority determination logic asserts bit 1 of CA0 and bit 0 of other CA1 to 3 as the address selection control signal, and bit 1 of CW0 and bit 0 of the other CW1 to 3 as the write data selection signal. Is asserted.
[0059]
Further, the instruction fetch delay DLI and the external access delay DLX are asserted by the bank conflict determination logic. That is, instruction fetch and external access are awaited. Although not shown, since the read data selection signals CRI, CRD, and CRX are simple decodes of the instruction bank BKI, the data bank BKD, and the external bank BKX, all 0s are asserted.
[0060]
FIG. 12 shows an operation example of the cache memory CM. As the control signal CTL from the cache control unit CC, the address selection control signal is bit 1 of CA0, bit 0 of other CA1-3, the write data selection signal is bit 1 of CW0, bit 0 of other CW1-3, read data selection All signals have bit 0 asserted.
[0061]
As a result, the data address AD is selected as the address A0, and the external address AX is selected as the other addresses A1 to A3. The write data WD is selected as the write data W0, and the write data WX is selected as the other write data W1 to W3. Then, the read data R0 is selected for all the read data RI, RD, and RX.
[0062]
As described above, when the bank control field BC of the cache control register CCR is set to 1, the integrated cache mode is set, and the bits 14 to 13 used as the bank designation bits are accessed with the same address, only the data access is executed due to the bank conflict. Instruction fetches and external accesses are awaited. That is, sequential processing is executed.
[0063]
13 to 15 show a third operation example. The access request with the same address as in the second operation example is used, and the bank control field BC of the cache control register CCR is set to 0 to set the Harvard architecture mode. External access is data-based access. That is, the external data access signal DA is asserted. Then, since the bank control field BC is 0 as shown in FIG. 13, the instruction bank multiplexer BMI, the data bank multiplexer BMD, and the external bank multiplexer BMX select the value 0, the value 1, and the value 1 of the external data access signal DA, respectively. Output. Since a signal obtained by combining the output and the bit 13 that is always used as the bank designation signal is a bank signal, the instruction bank BKI, the data bank BKD, and the external bank BKX are 0, 2, and 2, respectively.
[0064]
FIG. 14 shows an operation example of the cache control unit CC. The outputs of the instruction bank decoder BDI, data bank decoder BDD, and external bank decoder BDX are asserted with bits 0, 2, and 2, respectively, and after AND logic with the instruction fetch request REQI, data access request REQD, and external access request REQX Keep asserted. Then, by the AND gate of the priority determination logic, the CA2 bit 0, the CA1 bit 0, the CA2 bit 1, and the CA3 bit 0 are asserted as the address selection control signal, the write data selection signal is the CW2 bit 1, and the other CW0. , 1, 3 bit 0 is asserted. The external access delay DLX is asserted by the bank conflict determination logic. That is, external access is awaited. Although not shown, read data selection signals CRI, CRD, and CRX are simple decodes of instruction bank BKI, data bank BKD, and external bank BKX, so that bits 0, 2, and 2 are asserted, respectively. .
[0065]
FIG. 15 shows an operation example of the cache memory CM. As the control signal CTL from the cache control unit CC, the address selection control signal is bit 2 of CA0, bit 0 of CA1, bit 1 of CA2, bit 0 of CA3, the write data selection signal is bit 1 of CW2, other CW0, As for the read data selection signal, CRI bit 0, CRD bit 2, and CRX bit 2 are asserted.
[0066]
As a result, the instruction address AI, the external address AX, the data address AD, and the external address AX are selected as the addresses A0 to A3, respectively. As for the write data W0 to W3, the write data WD is selected for W2, and the write data WX is selected for the other W0, 1, and 3. Then, read data R0, R2, and R2 are selected as read data RI, RD, and RX, respectively.
[0067]
As described above, when the bank control field BC of the cache control register CCR is set to 0 and the Harvard architecture mode is set, bank contention between instruction fetch and data access can be avoided even when accessed with the same address as in the second operation example. On the other hand, bank conflicts between data access and data system external access cannot be avoided, but this cannot be avoided even with a normal Harvard architecture.
[0068]
FIG. 16 shows a fourth operation example of the bank signal generation unit. Although an access request with the same address as that in the second operation example is processed, the bank generator BKG in FIG. 6 is used and the bank control field BC of the cache control register CCR is set to 2. The address bit for distinguishing the address space between the program and data is bit 20.
[0069]
Then, since the bank control field BC is 2 as shown in FIG. 16, the instruction bank multiplexer BMI, the data bank multiplexer BMD, and the external bank multiplexer BMX output 0, 1, and 1, respectively. Since a signal obtained by combining the output and the bit 13 that is always used as the bank designation signal is a bank signal, the instruction bank BKI, the data bank BKD, and the external bank BKX are 0, 2, and 2, respectively. That is, the same bank signal as in the third operation example is output. As a result, the cache control unit CC and the cache memory CM operate in the same manner, and it is possible to avoid contention between instruction fetch and data access as in the Harvard architecture, although it is an integrated cache.
[0070]
To summarize the operation examples of the above-described figures, a plurality of address selection control signals generated by the cache control unit by inputting an instruction fetch request, a data access request, an external access request, and a plurality of control signals (BKI, BKD, BKX). In addition, by controlling the write data selection control signal, a plurality of address signals (AI, AD, AX) and write data (WD, WX) are sent to different banks in the plurality of banks through each of the plurality of selectors. At the same time, a plurality of access addresses are sequentially given to the same bank.
[0071]
Further, in each of the plurality of banks, writing of write data to a plurality of access addresses or reading of data from each access address is arbitrarily performed simultaneously for different banks and sequentially for the same bank. .
[0072]
In particular, in terms of sequential processing, control signals (CA0-3, CW0-3) are supplied to each of a plurality of banks under the control of the cache control unit CC (controller), and instructions or Data write or read operations are sequentially performed.
[0073]
FIG. 17 shows a cache memory CM according to the second embodiment of the present invention. An access request to be preferentially selected for each bank is designated in advance by the bank selection fields BS0 to BS3 of the cache control register CCR. If two or more access requests are received at the same time, an access request with a high priority is assigned to each bank. Accept. The difference from the first embodiment shown in FIG. 3 is that the bank selection fields BS0 to BS3 are output from the cache control register CCR to the cache control unit CC, and the cache control is performed from the input of the instruction fetch request REQI and the data access request REQD. The point is that the signal CTL is generated.
[0074]
FIG. 18 shows the cache control unit CC of the second embodiment. The advantage of this method is that cache access can be started at a high speed because address information that is slower than the access request is not used for bank selection. This is suitable when the cache access speed is more important than the bank usage efficiency. Address selection control signals CA0 to CA3 and write data selection control signals CW0 to CW3 are generated without using bank signals BKI, BKD, and BKX generated from addresses.
[0075]
Address selection control signal CA0 is generated from bank selection field BS0, instruction fetch request REQI and data access request REQD as follows. The bank selection field BS0 is 0 when instruction fetch is prioritized and 1 when data access is prioritized. Bits 2, 1, and 0 of address selection control signal CA0 correspond to instruction address AI, data address AD, and external address AX, respectively.
[0076]
First, bit 2 is asserted when the data fetch request REQD is negated when the instruction fetch request REQI is asserted or when the bank selection field BS0 is 0 and the instruction fetch priority is given. Similarly, bit 1 is asserted when the data access request REQD is asserted, when the instruction fetch request REQI is negated, or when the bank selection field BS0 is 1 and data access is prioritized. Bit 0 is asserted when both the instruction fetch request REQI and the data access request REQD are negated. Similarly, address selection control signals CA1 to CA3 are generated from bank selection fields BS1 to BS3, instruction fetch request REQI and data access request REQD. In the write data selection control signals CW0 to CW3, the bit 1 is the same logic as the bit 1 of the address selection control signals CA0 to CA3, and the bit 0 is the inversion of the bit 1, as in the first embodiment shown in FIG.
[0077]
In this embodiment, the read data selection signals CRI, CRD, and CRX are obtained by decoding the bank signals BKI, BKD, and BKX, respectively. Since bank selection is performed only by the access requests REQI, REQD, and REQX and the bank selection fields BS0 to BS3, it is checked whether a bank necessary for each access is secured. If the bank is not secured, access delay signals DLI, DLD, And assert DLX to wait for access. This check may be performed in parallel with the cache access.
[0078]
Specifically, as in the first embodiment, the bank to be accessed is determined from the bank signal BKI or BKD and the access request REQI or REQD, and the instruction address AI or the address is selected by the address selection control signals CA0 to CA3 in the bank. If the data address AD is not selected, the access delay signal DLI or DLD is asserted, respectively. In this embodiment, since external access always has a low priority in all banks, a bank cannot be secured if an access request REQI or REQD is issued. Therefore, the access delay signal DLX is asserted if REQI or REQD is asserted when the access request REQX is asserted regardless of the bank.
[0079]
In the second embodiment, external access always has the lowest priority, but it is possible to freely change the priority including external access. Although the first and second embodiments are of a four-bank configuration, it is possible for ordinary engineers in the field to which the present invention belongs to expand the present invention in the case of various numbers of banks.
[0080]
FIG. 19 shows a cache memory CM according to the third embodiment of the present invention. Whether all the cache memories having a multi-way configuration are shared by instruction data, or each way is designated for instruction or data. Whereas the number of banks is not a power of 2, it is difficult to realize, while the number of ways can be any number, so that the degree of freedom of design increases. In addition, there is no need for bank interleaving. For example, if a 4-way set associative integrated cache memory is used to share instruction data for all ways, it becomes an integrated type as it is, and if 2 ways are used for instructions and the remaining 2 ways are used for data, a Harvard architecture is obtained. By caching only one of instructions or data for each of the plurality of ways, it is possible to operate as an instruction data separation type cache memory. However, external access and instruction or data access cannot be executed at the same time without bank interleaving. In addition, since it is necessary to specify a different address for each way, a plurality of ways cannot be mounted on one memory mat.
[0081]
The difference between the cache memories CM of the second and third embodiments is the difference between the blocks constituting the CM shown in FIGS. First, the cache memory main body is divided into ways WY0 to WY3 instead of the banks BK0 to BK3, and each way is accessed with a unique address selected by the address multiplexers AM0 to AM3 (or selectors). Since there is no bank, there is no bank generation unit BKG. Also, since external access and instruction or data access cannot be executed at the same time, a dedicated port for external access is unnecessary.
[0082]
FIG. 22 is a diagram showing a processor configuration example when a way is used in the cache memory main body. External access is divided into an instruction system and a data system, and merged into instruction access and data access in advance as in a normal Harvard architecture. A plurality of control commands including an instruction fetch request REQI and a data access request REQD and a plurality of address signals including AI and AD are transmitted from the processor CPU to the cache memory body.
[0083]
The difference between the processor system having the cache memory CM adopting the banks BK0 to BK3 (FIG. 2) and the processor system having the CM adopting the way instead of the bank (FIG. 22) is that from the execution unit EXU. One of the write data WD transmitted to the CM and the write data transmitted from the BIU to the CM is selected by the selector and written to the CM, and the command-based write data WI from the BIU is concurrently sent to the CM. It is to be written.
[0084]
As a result of adopting the processor system shown in FIG. 22, in comparison with the cache memory configuration example shown in FIG. 17, in the cache memory configuration shown in FIG. 19, the address multiplexers AM0 to AM3 receive the write data at the two inputs of the instruction address AI and the data address AD. The external write data WX (FIG. 17) of the multiplexers WM0 to WM3 becomes unnecessary because the instruction system is merged with the instruction system write data WI and the data system is merged with the data system write data WD. As a result of merging instruction-related external access AX (FIG. 17), there is instruction-related write data WI (FIG. 19) that was not present before the merge.
[0085]
Furthermore, the read data selection control signals CRI and CRD, which are simple bank signal decoding results in the bank interleaving method, are generated by the way selection control unit WSC provided in the cache memory CM of FIG. Details of the way selection control unit WSC are shown in FIG. The signals CRI and CRD are generated by AND logic of read data selection control signals CR0 to CR3 from the cache control unit CC (FIG. 21) and hit signals HT0 to HT3 from each way. As shown in FIG. 19, read data RI and RD are read from read data R0 to R3 read from each way WY0 to WY3 through read data multiplexers RMI and RMD, respectively, under the control of read data selection control signals CRI and CRD. The signal to be selected.
[0086]
FIG. 21 shows the cache control unit CC in the cache memory CM of the third embodiment shown in FIG. The cache control register CCR has an integrated bit U (a bit for distinguishing whether the cache memory is an integrated type or a separated type) and a way selection field WS0 to WS3. The integrated bit U indicates that all ways are shared with instruction data. The way selection fields WS0 to WS3 indicate which access is prioritized for each way in the instruction data access conflict when the integrated bit U is asserted. When the integrated bit U is negated, the way selection data Indicates whether it is for use. The way selection fields WS0 to WS3 are set to 0 when an instruction is selected and 1 when data is selected. At this time, the address selection controls CA0 to CA3, write data selection controls CW0 to CW3, and read data selection controls CR0 to CR3 output from the cache control unit CC can all be generated with the same logic. In the figure, 1 and 0 represent bits 1 and 0, respectively, which are instruction system and data system selection control signals.
[0087]
For example, as shown in FIG. 19, bit 0 of the address selection control signal CA0 is a selection control signal for the data address AD of way 0. The condition for selecting the data address AD is that the instruction access request REQI is negated or the way selection field WS0 is 1 when the data access request REQD is asserted in FIG. At this time, the way 0 is either prioritized for data access or for data depending on the value of the integrated bit U. In either case, data access is performed. Bit 1 of the address selection control CA0 is an inverted signal of bit 0. For this reason, in this embodiment, when both of the instruction access request REQI and the data access request REQD are negated, the instruction address AI is selected when either can be selected as the address. Other control signals are similarly generated.
[0088]
The integrated bit U is not required for normal cache access, but is required for replacement of a cache entry. When the integrated bit U is asserted, the replacement entry candidates are all ways. As a result, an integrated cache memory in which instructions and data are mixed is obtained. When the integrated bit U is negated, the way that is a candidate for the replacement entry is a way in which the way selection fields WS0 to WS3 are 0 at the time of instruction replacement, and the way selection fields WS0 to WS3 are 1 at the time of data replacement. Way only. This results in a Harvard architecture because only instructions or data are written for each way.
[0089]
The operation example when the way is used for the cache memory CM described above is summarized. A plurality of address selection control signals and write data selection control generated by the cache control unit CC by inputting the instruction fetch request REQI and the data access request REQD. Depending on the signal, a plurality of address signals (AI, AD) and write data (WI, WD) are passed through each of a plurality of selectors to different ways in a plurality of ways at the same time. Sequentially, a plurality of access addresses or write data are given.
[0090]
Further, in each of the plurality of ways, writing of the write data to the access address or reading of the data from the access address is optionally performed simultaneously for different ways and sequentially for the same way.
[0091]
【The invention's effect】
According to the present invention, it is possible to achieve simultaneous execution of instruction fetch and data access, which can be achieved only with the Harvard architecture, with the integrated cache memory architecture. This makes it possible to simultaneously achieve ease of instruction rewriting and high performance.
[0092]
In addition, even when using an application and wanting to cache one of the instructions and data intensively, the entire capacity can be utilized without wasting one cache as in the Harvard architecture.
[0093]
In addition, both the integrated cache memory architecture and the Harvard architecture can be realized with the same processor. Furthermore, various cache memory configurations can be realized by the same processor.
[Brief description of the drawings]
FIG. 1 is a diagram showing the transition of a cache memory architecture.
FIG. 2 is a diagram illustrating an example of a processor system to which the present invention is applied.
FIG. 3 is a diagram showing a first embodiment of a cache memory to which the present invention is applied;
FIG. 4 is a diagram illustrating a cache control unit according to the first embodiment of this invention.
FIG. 5 is a diagram illustrating a first example of a bank signal generation unit.
FIG. 6 is a diagram illustrating a second example of the bank signal generation unit.
FIG. 7 is a diagram illustrating a first operation example of a bank signal generation unit.
FIG. 8 is a diagram illustrating a first operation example of a cache control unit.
FIG. 9 is a diagram illustrating a first operation example of a cache memory.
FIG. 10 is a diagram illustrating a second operation example of the bank signal generation unit.
FIG. 11 is a diagram illustrating a second operation example of the cache control unit.
FIG. 12 is a diagram illustrating a second operation example of the cache memory.
FIG. 13 is a diagram illustrating a third operation example of the bank signal generation unit.
FIG. 14 is a diagram illustrating a third operation example of the cache control unit.
FIG. 15 is a diagram illustrating a third operation example of the cache memory;
FIG. 16 is a diagram illustrating a fourth operation example of the bank signal generation unit.
FIG. 17 is a diagram showing a second embodiment of a cache memory to which the present invention is applied;
FIG. 18 illustrates a cache control unit according to the second embodiment.
FIG. 19 is a diagram showing a third embodiment of a cache memory to which the present invention is applied.
FIG. 20 is a diagram illustrating a way selection control unit according to a third embodiment;
FIG. 21 is a diagram illustrating a cache control unit according to a third embodiment;
FIG. 22 is a diagram showing an example of a processor system when a way is used instead of a bank in a cache memory to which the present invention is applied.
[Explanation of symbols]
CPU: Central processing unit, IFU: Instruction fetch unit, EXU: Execution unit, BIU: Bus interface unit, AI: Instruction address, AD: Data address, AX: External address, REQI: Instruction fetch request, REQD: Data access request , REQX: external access request, RI, RD, RX: read data, WD, WX: write data.

Claims (16)

複数のコマンドを独立に処理可能なプロセッサと、該プロセッサからのアクセス要求に応じて動作するキャッシュメモリを有するプロセッサシステムにおいて、
前記キャッシュメモリが複数のバンクを有するとともに複数個のポートを有し、該複数個のポートを介して前記プロセッサから送信される命令フェッチを含む複数の制御コマンド及び複数のアドレス信号を同時に処理することが可能であり、さらに、
前記キャッシュメモリは、前記キャッシュメモリのアドレス及びデータ書込みを制御するキャッシュ制御部と、前記キャッシュ制御部を制御する制御信号を生成する信号生成部と、前記信号生成部を制御するバンク制御フィールドを備えるキャッシュ制御レジスタとを有し、
前記信号生成部は、前記制御信号を、アドレスに設けた特定ビットの値に対応させ、かつ前記バンク制御フィールドに応じて出力し、
前記キャッシュ制御部は、前記制御信号及び前記アクセス要求に応じて前記キャッシュメモリのアドレス及びデータ書込みをそれぞれ制御するアドレス選択制御信号又は書き込みデータ選択制御信号を出力し、
前記キャッシュメモリは、前記アドレス選択制御信号又は書き込みデータ選択制御信号に応じて統合型キャッシュメモリとして機能するか、分離型キャッシュメモリとして機能するかが選択されることを特徴とするプロセッサシステム。
In a processor system having a processor capable of independently processing a plurality of commands and a cache memory that operates in response to an access request from the processor,
The cache memory has a plurality of banks and a plurality of ports, and simultaneously processes a plurality of control commands and a plurality of address signals including an instruction fetch transmitted from the processor via the plurality of ports. Is possible, and
The cache memory includes a cache control unit that controls address and data writing of the cache memory, a signal generation unit that generates a control signal that controls the cache control unit, and a bank control field that controls the signal generation unit. A cache control register,
The signal generation unit corresponds to a value of a specific bit provided in an address and outputs the control signal according to the bank control field;
The cache control unit is configured to output an address selection control signal or write data selection control signal for controlling the cache memory address and data writing, respectively in response to said control signal and said access request,
2. The processor system according to claim 1, wherein whether the cache memory functions as an integrated cache memory or a separate cache memory is selected according to the address selection control signal or the write data selection control signal.
命令フェッチとデータアクセスを独立に処理可能なプロセッサと、該プロセッサからのアクセス要求に呼応して動作するキャッシュメモリを有するプロセッサシステムにおいて、
前記キャッシュメモリを複数のセレクタ及び複数のアドレスの一部によって指定される複数バンクによって構成し、各バンクを1ポートキャッシュとし、前記命令フェッチ要求と前記データアクセス要求が異なるバンクに対するものであれば同時処理、同一バンクに対する場合は逐次処理し、さらに、
前記キャッシュメモリは、前記キャッシュメモリのアドレス及びデータ書込みを制御するキャッシュ制御部と、前記キャッシュ制御部を制御する制御信号を生成する信号生成部と、前記信号生成部を制御するバンク制御フィールドを備えるキャッシュ制御レジスタとを有し、
前記信号生成部は、前記制御信号を、アドレスに設けた特定ビットの値に対応させ、かつ前記バンク制御フィールドに応じて出力し、
前記キャッシュ制御部は、前記制御信号及び前記アクセス要求に応じて前記キャッシュメモリのアドレス及びデータ書込みをそれぞれ制御するアドレス選択制御信号又は書き込みデータ選択制御信号を出力し、
前記キャッシュメモリは、前記アドレス選択制御信号又は書き込みデータ選択制御信号に応じて統合型キャッシュメモリとして機能するか、分離型キャッシュメモリとして機能するかが選択されることを特徴とするプロセッサシステム。
In a processor system having a processor capable of independently processing instruction fetch and data access and a cache memory operating in response to an access request from the processor ,
The cache memory is composed of a plurality of banks specified by a plurality of selectors and a part of a plurality of addresses, each bank is a one-port cache, and if the instruction fetch request and the data access request are for different banks, Processing, in the case of the same bank, sequentially processing,
The cache memory includes a cache control unit that controls address and data writing of the cache memory, a signal generation unit that generates a control signal that controls the cache control unit, and a bank control field that controls the signal generation unit. A cache control register,
The signal generation unit corresponds to a value of a specific bit provided in an address and outputs the control signal according to the bank control field;
The cache control unit is configured to output an address selection control signal or write data selection control signal for controlling the cache memory address and data writing, respectively in response to said control signal and said access request,
2. The processor system according to claim 1, wherein whether the cache memory functions as an integrated cache memory or a separate cache memory is selected according to the address selection control signal or the write data selection control signal.
請求項1記載のプロセッサシステムにおいて、
前記複数の制御コマンドは、命令フェッチ要求とデータアクセス要求、或いは前記命令フェッチ要求、前記データアクセス要求及び外部アクセス要求の内の何れか1組から成り、前記複数のアドレス信号は、命令アドレス信号とデータアドレス信号、或いは前記命令アドレス信号、前記データアドレス信号及び外部アドレス信号の内の何れか1組から成ることを特徴とするプロセッサシステム。
The processor system according to claim 1, wherein
The plurality of control commands include any one of an instruction fetch request and a data access request, or the instruction fetch request, the data access request, and an external access request, and the plurality of address signals include an instruction address signal and A processor system comprising a data address signal or any one of the instruction address signal, the data address signal, and an external address signal.
請求項3記載のプロセッサシステムにおいて、
前記キャッシュ制御部は前記命令フェッチ要求、前記データアクセス要求及び前記制御信号の入力に対し、前記制御信号に基づいて指定されたバンクに既に前記データアクセス要求が割り当てられた場合は、更なる割り当てを実行しないように遅延信号を生成し、前記制御信号に基づいて指定されたバンクに未だ前記データアクセス要求が割り当てられていない場合は、前記アドレス選択制御信号又は書き込みデータ選択制御信号を生成することを特徴とするプロセッサシステム。
The processor system according to claim 3, wherein
In response to the instruction fetch request, the data access request, and the input of the control signal, the cache control unit performs further allocation when the data access request is already assigned to the bank designated based on the control signal. A delay signal is generated so as not to be executed, and when the data access request is not yet assigned to the bank designated based on the control signal, the address selection control signal or the write data selection control signal is generated. A featured processor system.
請求項3記載のプロセッサシステムにおいて、
さらに前記命令フェッチ要求、前記データアクセス要求及び前記外部アクセス要求並びに前記制御信号の入力により前記キャッシュ制御部にて生成される前記アドレス選択制御信号及び書き込みデータ選択制御信号の制御により、前記アドレス信号及び書き込みデータから複数のセレクタの各々を介して、複数のバンク内の異なるバンクに対しては同時に、同一バンクに対しては逐次的に、複数のアクセスアドレスを与えることを特徴とするプロセッサシステム。
The processor system according to claim 3, wherein
Further, the address signal and the data access request and the external access request, and the control of the address selection control signal and the write data selection control signal generated by the cache control unit upon input of the control signal, A processor system characterized in that a plurality of access addresses are given to different banks in a plurality of banks simultaneously and sequentially to the same bank through each of a plurality of selectors from write data.
請求項5記載のプロセッサシステムにおいて、
さらに前記複数のバンクの各々において、前記複数のアクセスアドレスへの前記書き込みデータの書き込みまたは前記アクセスアドレスからのデータ読出しを、前記異なるバンクに対しては同時に、前記同一バンクに対しては逐次的に任意に行うことを特徴とするプロセッサシステム。
The processor system according to claim 5, wherein
Further, in each of the plurality of banks, the writing of the write data to the plurality of access addresses or the data reading from the access address is performed simultaneously for the different banks and sequentially for the same bank. A processor system that is optionally performed.
請求項2記載のプロセッサシステムにおいて、
前記複数のアドレスの一部は、前記複数のアドレスの各々における特定のビットの事であり、前記キャッシュメモリ内の前記複数バンクの各々を指定する際に、前記特定のビットを用いることにより命令データ統合型のキャッシュメモリとして動作し、前記特定のビットの一部の代わりに所定の値を用いて生成する前記制御信号の入力に基づき、前記キャッシュメモリ内に有するキャッシュ制御部にて生成される複数のアドレス選択制御信号及び書き込みデータ選択制御信号の制御により前記複数のセレクタの各々を介して前記バンクを指定することにより、命令データ分離型キャッシュメモリとして動作することを特徴とするプロセッサシステム。
The processor system according to claim 2, wherein
A part of the plurality of addresses is a specific bit in each of the plurality of addresses, and instruction data is obtained by using the specific bit when designating each of the plurality of banks in the cache memory. A plurality of cache control units that operate as an integrated cache memory and are generated by a cache control unit included in the cache memory based on an input of the control signal generated using a predetermined value instead of a part of the specific bit A processor system which operates as an instruction data separation type cache memory by designating the bank via each of the plurality of selectors under the control of an address selection control signal and a write data selection control signal.
請求項3から6のいずれかに記載のプロセッサシステムにおいて、
前記キャッシュメモリは更に外部からのアクセス要求である前記外部アクセス要求を処理するポートを有し、前記命令フェッチ要求、前記データアクセス要求、および前記外部アクセス要求のうち、少なくとも2つの要求を同時に処理することを特徴とするプロセッサシステム。
The processor system according to any one of claims 3 to 6,
The cache memory further includes a port for processing the external access request that is an external access request, and simultaneously processes at least two requests among the instruction fetch request, the data access request, and the external access request. A processor system characterized by the above.
複数のコマンドを独立に処理可能なプロセッサと、該プロセッサからのアクセス要求に応じて動作するキャッシュメモリを有するプロセッサシステムにおいて、
前記キャッシュメモリが複数個のポートを有し、該複数個のポートを介して前記プロセッサから送信される命令フェッチを含む複数の制御コマンド及び複数のアドレス信号を同時に処理することが可能であり、さらに、
前記複数の制御コマンドは、命令フェッチ要求及びデータアクセス要求から成り、前記複数のアドレス信号は命令アドレス信号及びデータアドレス信号から成り、前記キャッシュメモリはさらに前記キャッシュメモリを制御するキャッシュ制御部、前記キャッシュ制御部を制御する統合ビット及びウェイ選択フィールドを備えるキャッシュ制御レジスタ、複数個のウェイ、複数のセレクタ及びウェイ選択制御部を含み、
前記統合ビットは、前記キャッシュメモリが統合型か分離型かを区別するビットであり、
前記キャッシュメモリは、前記統合ビットに基づいて統合型キャッシュメモリとして機能するか、分離型キャッシュメモリとして機能するかが選択され、
前記ウェイ選択フィールドは、前記統合ビットの値により、前記複数個のウェイのそれぞれにおけるデータアクセス、命令アクセスに対する優先度を示す信号か、前記複数個のウェイのそれぞれデータアクセス用、命令アクセス用として指定する信号かに切り替えられることを特徴とするプロセッサシステム。
In a processor system having a processor capable of independently processing a plurality of commands and a cache memory that operates in response to an access request from the processor,
The cache memory has a plurality of ports, and is capable of simultaneously processing a plurality of control commands and a plurality of address signals including an instruction fetch transmitted from the processor via the plurality of ports. ,
The plurality of control commands include an instruction fetch request and a data access request, the plurality of address signals include an instruction address signal and a data address signal, the cache memory further includes a cache control unit for controlling the cache memory, the cache A cache control register having an integrated bit and a way selection field for controlling the control unit, a plurality of ways, a plurality of selectors, and a way selection control unit,
The integrated bit is a bit for distinguishing whether the cache memory is integrated or separated,
The cache memory is selected to function as an integrated cache memory or a separate cache memory based on the integrated bit,
The way selection field is a signal indicating a priority for data access and instruction access in each of the plurality of ways according to the value of the integrated bit, or each of the plurality of ways is used for data access and instruction access. A processor system, wherein the signal is switched to a designated signal.
請求項9記載のプロセッサシステムにおいて、
さらに前記命令フェッチ要求と前記データアクセス要求の入力により前記キャッシュ制御部にて生成されるアドレス選択制御信号及び書き込みデータ選択制御信号により、前記複数のアドレス信号及び書き込みデータから前記複数のセレクタの各々を介して、前記複数個のウェイ内の異なるウェイに対しては同時に、同一ウェイに対しては逐次的に、複数のアクセスアドレス又は前記書き込みデータを与えることを特徴とするプロセッサシステム
The processor system according to claim 9, wherein
Further, each of the plurality of selectors is selected from the plurality of address signals and write data by an address selection control signal and a write data selection control signal generated by the cache control unit upon input of the instruction fetch request and the data access request. Thus, a plurality of access addresses or the write data are given to different ways in the plurality of ways simultaneously and sequentially to the same way .
請求項10記載のプロセッサシステムにおいて、
さらに前記複数個のウェイの各々において、前記アクセスアドレスへの書き込みデータの書き込みまたは前記アクセスアドレスからのデータ読出しを前記異なるウェイに対しては同時に、前記同一ウェイに対しては逐次的に任意に行うことを特徴とするプロセッサシステム。
The processor system according to claim 10, wherein
Further, in each of the plurality of ways, writing of write data to the access address or reading of data from the access address is arbitrarily performed simultaneously for the different ways and sequentially for the same way. A processor system characterized by the above.
請求項9記載のプロセッサシステムにおいて、
前記複数個のウェイの各々に対して命令またはデータの内何れか1つのみをキャッシングすることにより、命令データ分離型キャッシュメモリとして動作することを特徴とするプロセッサシステム。
The processor system according to claim 9, wherein
A processor system which operates as an instruction data separation type cache memory by caching only one of an instruction and data for each of the plurality of ways.
請求項1から12のいずれかに記載のプロセッサシステムにおいて、
前記プロセッサおよび前記キャッシュメモリが同一チップ上に集積されていることを特徴とするプロセッサシステム。
The processor system according to any one of claims 1 to 12,
A processor system, wherein the processor and the cache memory are integrated on the same chip.
複数のバンクを備え、該複数のバンクを制御するコントローラを有し、該コントローラは前記複数のバンクの各々に命令或いはデータの書き込み又は読み出しを行う為の制御信号を生成し、前記複数のバンク内の異なるバンクに対し前記命令或いはデータの書き込み或いは読み出し動作を同時に行うキャッシュメモリであって、
前記キャッシュメモリは、前記制御信号を生成するときに前記コントローラを制御するバンク制御フィールドを備えるキャッシュ制御レジスタを備え、
前記コントローラは、前記制御信号を、アドレスに設けた特定ビットの値に対応させ、かつ前記バンク制御フィールドに応じて出力し、さらに、前記制御信号及びアクセス要求に応じて前記キャッシュメモリのアドレス及びデータ書込みをそれぞれ制御するアドレス選択制御信号又は書き込みデータ選択制御信号を出力し、
前記キャッシュメモリは、前記アドレス選択制御信号又は書き込みデータ選択制御信号に応じて統合型キャッシュメモリとして機能するか、分離型キャッシュメモリとして機能するかが選択されることを特徴とするキャッシュメモリ。
Comprising a plurality of banks, a controller for controlling the plurality of banks, the controller generates a control signal for writing or reading instruction or data to each of the plurality of banks, before Symbol plurality of banks A cache memory for simultaneously writing or reading the instruction or data to different banks in the bank,
The cache memory includes a cache control register including a bank control field that controls the controller when generating the control signal;
The controller is the control signal, in correspondence with the value of a specific bit provided to the address, and outputs in response to the bank control field, further, the address of the cache memory in response to said control signal及beauty access request and outputs the address selection control signal or write data selection control signal for controlling data writing, respectively,
The cache memory is selected to function as an integrated cache memory or a separate cache memory in accordance with the address selection control signal or the write data selection control signal.
請求項14記載のキャッシュメモリにおいて、
さらに前記コントローラの制御により前記アドレス選択制御信号又は前記書き込みデータ選択制御信号を前記複数のバンクの各々に供給し、同一のバンクに対し、前記命令或いはデータの書き込み或いは読み出し動作を逐次に行うことを特徴とするキャッシュメモリ。
The cache memory according to claim 14, wherein
Further, the address selection control signal or the write data selection control signal is supplied to each of the plurality of banks under the control of the controller , and the command or data write or read operation is sequentially performed on the same bank. Characteristic cache memory.
複数のウェイを備え、該複数のウェイを制御するコントローラを有し、該コントローラは前記複数のウェイの各々に命令或いはデータの書き込み又は読み出しを行う為の制御信号を生成し、前記コントローラの制御により該制御信号を前記複数のウェイに供給し、前記複数のウェイ内の異なるウェイに対し前記命令或いはデータの書き込み或いは読み出し動作を同時に行い、さらに前記コントローラの制御により前記制御信号を前記複数のウェイの各々に供給し、同一のウェイに対し、前記命令或いはデータの書き込み或いは読み出し動作を逐次に行うキャッシュメモリであって、
前記キャッシュメモリは、前記制御信号を生成するときに前記コントローラを制御する統合ビット及びウェイ選択フィールドを備えるキャッシュ制御レジスタを備え、
前記統合ビットは、前記キャッシュメモリが統合型か分離型かを区別するビットであり、
前記キャッシュメモリは、前記統合ビットに基づいて統合型キャッシュメモリとして機能するか、分離型キャッシュメモリとして機能するかが選択され、
前記ウェイ選択フィールドは、前記統合ビットの値により、前記複数個のウェイのそれぞれにおけるデータアクセス、命令アクセスに対する優先度を示す信号か、前記複数個のウェイのそれぞれデータアクセス用、命令アクセス用として指定する信号かに切り替えられることを特徴とするキャッシュメモリ。
A plurality of ways, and a controller for controlling the plurality of ways, the controller generating a control signal for writing or reading a command or data in each of the plurality of ways; The control signal is supplied to the plurality of ways, the command or data is written to or read from different ways in the plurality of ways at the same time, and the control signal is controlled by the controller. A cache memory that sequentially supplies the instructions or data to the same way and performs write or read operations on the same way,
The cache memory includes a cache control register including an integration bit and a way selection field for controlling the controller when generating the control signal;
The integrated bit is a bit for distinguishing whether the cache memory is integrated or separated,
The cache memory is selected to function as an integrated cache memory or a separate cache memory based on the integrated bit,
The way selection field is a signal indicating a priority for data access and instruction access in each of the plurality of ways according to the value of the integrated bit, or each of the plurality of ways is used for data access and instruction access. A cache memory characterized by being switched to a designated signal.
JP2001327733A 2001-10-25 2001-10-25 Integrated separation-type switching cache memory and processor system having the cache memory Expired - Fee Related JP4068828B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001327733A JP4068828B2 (en) 2001-10-25 2001-10-25 Integrated separation-type switching cache memory and processor system having the cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001327733A JP4068828B2 (en) 2001-10-25 2001-10-25 Integrated separation-type switching cache memory and processor system having the cache memory

Publications (2)

Publication Number Publication Date
JP2003131943A JP2003131943A (en) 2003-05-09
JP4068828B2 true JP4068828B2 (en) 2008-03-26

Family

ID=19143914

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001327733A Expired - Fee Related JP4068828B2 (en) 2001-10-25 2001-10-25 Integrated separation-type switching cache memory and processor system having the cache memory

Country Status (1)

Country Link
JP (1) JP4068828B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101022473B1 (en) 2004-02-13 2011-03-15 삼성전자주식회사 Memory bank interleaving method and apparatus in the multi-layer bus system
JP5223220B2 (en) * 2007-03-30 2013-06-26 日本電気株式会社 Vector processing apparatus and vector processing system
WO2012137599A1 (en) * 2011-04-05 2012-10-11 ルネサスエレクトロニクス株式会社 Semiconductor device

Also Published As

Publication number Publication date
JP2003131943A (en) 2003-05-09

Similar Documents

Publication Publication Date Title
US7284092B2 (en) Digital data processing apparatus having multi-level register file
EP1550032B1 (en) Method and apparatus for thread-based memory access in a multithreaded processor
US5966734A (en) Resizable and relocatable memory scratch pad as a cache slice
EP1027650B1 (en) Method and apparatus for altering thread priorities in a multithreaded processor
EP2650778B1 (en) Method and apparatus for token triggered multithreading
US7219185B2 (en) Apparatus and method for selecting instructions for execution based on bank prediction of a multi-bank cache
JP3683739B2 (en) Method and apparatus for overlapping L1 and L2 memory access
US9658877B2 (en) Context switching using a context controller and on-chip context cache
US6963962B2 (en) Memory system for supporting multiple parallel accesses at very high frequencies
IL134823A (en) Method and apparatus for selecting thread switch events in a multithreaded processor
JPH0612327A (en) Data processor having cache memory
JPH03129433A (en) Device and method for parallel processing
EP1189132A2 (en) Shared peripheral architecture
GB2297638A (en) Transferring data between memory and processor via vector buffers
US5860101A (en) Scalable symmetric multiprocessor data-processing system with data allocation among private caches and segments of system memory
JP2003296191A (en) Integrated circuit operable as general purpose processor and processor of peripheral device
US10482017B2 (en) Processor, method, and system for cache partitioning and control for accurate performance monitoring and optimization
US20030196072A1 (en) Digital signal processor architecture for high computation speed
US20080177979A1 (en) Hardware multi-core processor optimized for object oriented computing
JP7070384B2 (en) Arithmetic processing device, memory device, and control method of arithmetic processing device
JP4068828B2 (en) Integrated separation-type switching cache memory and processor system having the cache memory
US8732368B1 (en) Control system for resource selection between or among conjoined-cores
US6119220A (en) Method of and apparatus for supplying multiple instruction strings whose addresses are discontinued by branch instructions
CN112148106A (en) System, apparatus and method for hybrid reservation station for processor
CN112395000A (en) Data preloading method and instruction processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041019

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070703

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070710

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070910

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20070910

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071016

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071205

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080111

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

Free format text: PAYMENT UNTIL: 20110118

Year of fee payment: 3

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

Year of fee payment: 3

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

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120118

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130118

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130118

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140118

Year of fee payment: 6

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