JP3899784B2 - Clock control device, semiconductor integrated circuit device, microcomputer and electronic device - Google Patents
Clock control device, semiconductor integrated circuit device, microcomputer and electronic device Download PDFInfo
- Publication number
- JP3899784B2 JP3899784B2 JP2000183494A JP2000183494A JP3899784B2 JP 3899784 B2 JP3899784 B2 JP 3899784B2 JP 2000183494 A JP2000183494 A JP 2000183494A JP 2000183494 A JP2000183494 A JP 2000183494A JP 3899784 B2 JP3899784 B2 JP 3899784B2
- Authority
- JP
- Japan
- Prior art keywords
- clock
- address
- waits
- cache
- microcomputer
- 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
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Power Sources (AREA)
- Memory System (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、クロック制御装置、クロック制御装置を含む半導体集積回路装置、マイクロコンピュータ及び電子機器に関する。
【0002】
【背景技術及び発明が解決しようとする課題】
従来より、例えばPDAや移動体通信端末といった電子機器(特に、携帯型の電子機器)を制御するマイクロコンピュータは、回路技術やプロセス技術のみならず、アーキテクチャの改良や集積化技術により、高速化及び低消費電力化が図られる。
【0003】
このようなマイクロコンピュータは、用途に適した性能及びコードサイズを実現するCPUコアと、必要な機能があらかじめマクロ化された周辺回路(直接メモリアクセス回路(DMA)やメモリ制御回路などのマクロ化ブロック)とにより集積化されることが多い。従って、これまでの多くのマイクロコンピュータは、開発工数を短縮し、設計品質を維持できる反面、CPUコアやマクロ化ブロックをブロックボックスとせざるを得なかった。このため、マイクロコンピュータの各種性能を改良する場合、これらコア及びマクロ化ブロックの内部を変更することは困難であった。
【0004】
特に、集積化されたマイクロコンピュータの消費電力について改良を行う場合、CPUコアやマクロ化ブロックのアーキテクチャや回路構成に関わることが多いため、CPUコアやマクロ化ブロック以外の部分で低消費電力化を図る必要があった。
【0005】
例えば、マイクロコンピュータ内で、動的或いは静的に各部に供給されるクロック信号を停止させることによって、最も簡素かつ効率的に低消費電力化を図ることが行われる。
【0006】
又は、例えば外部からの信号により所与のユニットに供給されるクロック信号を停止させたり、CPUコアで実行されたHALT命令により一時的にCPUの動作を中止させたときに動作不要なキャッシュ装置に供給されるクロック信号を停止させたりすることが行われていた。
【0007】
ところで、多くのマイクロコンピュータでは、CPUコア以外に、(キャッシュメモリとキャッシュ制御装置からなる)キャッシュ装置や、メモリ制御回路が集積化される。
【0008】
キャッシュ装置は、CPUコアが局所的、局時的にアクセスするデータを一時的にバッファリングすることで、外部に接続されるメモリ回路のアクセス時間を省略して高速化を図る。
【0009】
メモリ制御回路は、直結されるメモリ装置(ROM、SRAM、DRAMなど)に応じて、アドレスデコードや、DRAMのRAS/CAS制御やリフレッシュ制御といった複雑なメモリ制御を行うメモリ・インタフェース機能を有する。さらにメモリ制御回路は、プログラマブル・ウェイト・コントローラ(或いは、ウェイト制御装置)を備え、アドレス領域に応じてメモリ装置に対して行うデータアクセスに必要なバスサイクルのウェイト制御を行う。こうすることで、マイクロコンピュータはアクセス対象のデータを格納する汎用的なメモリ装置を直結することができ、部品点数の小型化を図り、結果的に低コスト化を図ることができる。
【0010】
このようなマイクロコンピュータに組み込まれたキャッシュ装置において、キャッシュミスが発生したとき、該当するアドレスに対応するデータを格納するメモリ装置に対して、メモリ制御回路によって発行された外部バスサイクルによりデータが取得される。
【0011】
しかしながら、この間、CPUコアはストール状態となるにも関わらず、外部バスサイクルによりデータが取得され次第動作を再開する必要があるため、CPUコアに供給されるクロック信号は停止されることはなかった。従って、CPUコアがストール状態であっても無駄な電力が消費されていた。
【0012】
本発明は、以上のような技術的課題に鑑みてなされたものであり、その目的とするところは、性能低下を招くことなく、データアクセス時に発生するストール状態にある各部に供給されるクロック信号の供給を停止して、効果的かつ簡素に低消費電力化を図るクロック制御装置、クロック制御装置を含む半導体集積回路装置、マイクロコンピュータ及び電子機器を提供することにある。
【0013】
【課題を解決するための手段】
上記課題を解決するために、本発明は、所与の回路に対して供給されるクロック信号を制御するクロック制御装置であって、前記所与の回路がアクセスするアドレスを受け付ける手段と、前記アドレスによって特定されるアドレス領域に応じたクロック数分だけ前記クロック信号の供給を停止するクロック供給停止信号を前記所与の回路に対して出力する手段とを含むことを特徴とする。
【0014】
本発明によれば、クロック制御装置において、所与の回路に対するクロック信号を停止するクロック供給停止信号を、所与の回路がアクセスするアドレスによって特定されるアドレス領域に応じたクロック数分だけ停止させるように生成するようにした。これにより、アドレス領域によってアクセス時間が異なるデータアクセスによりストール状態が発生した場合であっても、所与のクロック数分だけクロック供給を停止させることができるので、従来のようにデータ処理能力を低下させることなく、効果的かつ簡素に低消費電力化を図ることができる。
【0015】
また本発明は、キャッシュ装置とこれにアクセスする所与の回路とに対して供給されるクロック信号を制御するクロック制御装置であって、前記所与の回路がアクセスするアドレスと、前記アドレスに基づいて判定されたキャッシュミス信号とを受け付ける手段と、前記キャッシュミス信号を受け付けたとき前記アドレスによって特定されるアドレス領域に応じたクロック数分だけ少なくとも前記所与の回路及び前記キャッシュ装置の一方に供給される前記クロック信号を停止するクロック供給停止信号を出力する手段とを含むことを特徴とする。
【0016】
本発明によれば、キャッシュ装置に対するデータアクセスによりキャッシュミスが発生したときに、クロック制御装置において、所与の回路に対するクロック信号を停止するクロック供給停止信号を、所与の回路がアクセスするアドレスによって特定されるアドレス領域に応じたクロック数分だけ、上述した所与の回路又はキャッシュ装置のいずれか一方を停止させるように生成するようにした。これにより、キャッシュミスが発生したときのストール状態であっても、いつデータが返ってくるか不明のためクロック供給を停止することができなかったが、所与のクロック数分だけクロック供給を停止させることができるので、従来のようにデータ処理能力を低下させることなく、ストール状態において効果的かつ簡素に低消費電力化を図ることができる。
【0017】
また本発明に係るクロック制御装置は、アドレス領域に対応して所与のウェイト数を記憶する手段を含み、前記アドレスによって特定されるアドレス領域に対応して記憶されたウェイト数に応じたクロック数分だけ前記クロック信号の供給を停止するクロック供給停止信号を出力することを特徴とする。
【0018】
このようにすることで、クロック供給を停止させるクロック数の制御を精度よく行うことができるので、より効果的な低消費電力化と、低コスト化を実現することができる。
【0019】
また本発明は、アクセスされるアドレス領域に対応してメモリ装置に格納されるデータをアクセスするためのウェイト数を記憶するウェイト制御装置を含み、キャッシュ装置とこれにアクセスする所与の回路とに対して供給されるクロック信号を制御するクロック制御装置であって、前記所与の回路がアクセスするアドレスと、前記アドレスに基づいて判定されたキャッシュミス信号とを受け付ける手段と、前記キャッシュミス信号を受け付けたとき前記アドレスによって特定されるアドレス領域に対応したウェイト数に基づいて前記アドレスに対応するデータを格納するメモリ装置に対してアクセスすると共に、前記アドレス領域に対応して記憶されたウェイト数に応じたクロック数分だけ少なくとも前記所与の回路及び前記キャッシュ装置の一方に供給される前記クロック信号を停止するクロック供給停止信号を出力する手段とを含むことを特徴とする。
【0020】
本発明によれば、データアクセスの際に多く用いられるウェイト制御装置で設定されるウェイト数から、キャッシュミスが発生したときに停止させるべきクロック数を決めるようにしたので、従来に比べても、ほとんど付加回路を設けることなく、有効な低消費電力化を図ることができる。
【0021】
また本発明に係るクロック制御装置は、前記記憶されるウェイト数を可変とするウェイト数可変手段を含むことを特徴とする。このようにすることで、OSといったソフトウェア制御によってデータアクセスに伴うアクセス時間が変化する場合であっても、簡素な構成で、精度良く消費電力制御を行うことができる。
【0022】
また本発明に係る半導体集積回路装置は、上記いずれかに記載のクロック制御装置を含むことを特徴とする。
【0023】
また本発明に係るマイクロコンピュータは、上記いずれかに記載のクロック制御装置と、前記所与の回路と、CPUと、前記所与の回路又は前記CPUによってアクセスされる前記キャッシュ装置とを少なくとも含むことを特徴とする。
【0024】
また本発明に係るマイクロコンピュータは、上記いずれかに記載のクロック制御装置と、前記所与の回路としてのCPUと、前記CPUによってアクセスされる前記キャッシュ装置とを少なくとも含むことを特徴とする。
【0025】
また本発明に係るマイクロコンピュータは、前記所与の回路は前記アドレスを生成するDMAであることを特徴とする。
【0026】
ここで、所与の回路として、アドレスデータを出力してデータアクセスを行い、その際にアクセス時間を要することでストール状態になる可能性があるCPU、或いはその期間にデータアクセスできないDMAといったバスマスタを考えるようにした。これにより、データアクセス時に発生するストール状態における効果的かつ簡素な方法で低消費電力化を図るマイクロコンピュータを安価に提供することができる。
【0027】
また本発明に係るマイクロコンピュータは、所与の周辺回路ごとに前記ウェイト数を記憶する手段を有し、前記周辺回路に対して前記記憶されたウェイト数に応じたクロック数分だけ各周辺回路に供給されるクロック信号の供給を停止するクロック供給停止信号を出力することを特徴とする。
【0028】
このようにマイクロコンピュータを構成する周辺回路ごとに停止させるべきクロック数を設定するようにしたので、マイクロコンピュータを構成する各部の動作タイミングによって決まる最適な消費電力制御が、非常に簡素な構成で実現することができる。
【0029】
また本発明に係る電子機器は、上記いずれかに記載のマイクロコンピュータと、前記マイクロコンピュータの処理対象となるデータの入力手段と、前記マイクロコンピュータにより処理されたデータを出力するための出力手段とを含むことを特徴とする。こうすることで、低消費電力、かつ低コストな電子機器を提供することができる。
【0030】
【発明の実施の形態】
以下、本発明の好適な実施の形態について図面を用いて詳細に説明する。
【0031】
1.本実施形態のマイクロコンピュータの構成の概要
図1に、本実施形態のクロック制御装置を適用したマイクロコンピュータの構成の概要を示す。
【0032】
本実施形態におけるマイクロコンピュータ10は、CPUコア11と、キャッシュ装置12と、クロックジェネレータ(CG)13と、プログラマブル・ウェイト・コントローラ(広義には、クロック制御装置)14と、各周辺回路とを含んで集積化されている。
【0033】
本実施形態では、周辺回路として直接メモリアクセスコントローラ(DMAC)15と、デバッグユニット16とを含む。
【0034】
CG13は、例えば外部に接続された水晶発振子を用いて所与の周波数の原クロック信号SCLKを生成する。CG13は、原クロック信号線17を介して、この原クロック信号SCLKを第1及び第2のクロックドライバ18、19に供給する。
【0035】
第1のクロックドライバ18は、受信した原クロック信号SCLKの増幅(或いは、波形整形)を行って、これを基準クロック信号CLK1、CLK2としてそれぞれ基準クロック信号線20、21を介して、CPUコア11及びキャッシュ装置12に供給する。
【0036】
第2のクロックドライバ19は、受信した原クロック信号SCLKの増幅(或いは、波形整形)を行って、これを基準クロック信号CLK3としてそれぞれを他の周辺回路(プログラマブル・ウェイト・コントローラ14、DMAC15、デバッグユニット16その他の周辺回路各部)に供給する。
【0037】
CPUコア11、キャッシュ装置12は、それぞれ基準クロック信号CLK1、CLK2、或いはそれぞれ基準クロック信号CLK1、CLK2を基準に生成した内部クロックに同期して動作する。
【0038】
DMAC15、デバッグユニット16は、それぞれ基準クロック信号CLK3のいずれか1つ、或いはそれぞれ基準クロック信号CLK3のいずれか1つを基準に生成した内部クロックに同期して動作する。
【0039】
CPUコア11は、キャッシュ装置12或いは外部に接続されたメモリ装置に格納されたデータに対して各種処理を行う。より具体的には、CPUコア11は、キャッシュ装置12若しくは外部に接続されたメモリ装置に格納されたフェッチデータをデコードし、このデコード結果に対応する命令を実行する(命令フェッチと命令デコード)。また、CPUコア11は、或いはデコードされた命令に従ってフェッチデータを用いてそのままデータ処理(実行)を行う(データフェッチと命令実行)。
【0040】
DMAC15は、バスマスタとなって、CPUコア11に代わってメモリ装置などに格納されたデータの転送制御を行う。このため、DMAC15がバス使用権を譲り受けて所与のデータ転送を開始するのに先立って、内部で所与の処理を行っているCPUコア11に対して、DMA要求信号35を出力する。CPUコア11は、当該処理が終了してバス使用権を譲渡するとき、DMAアクノリッジ信号36をDMAC15に対して出力する。このDMAアクノリッジ信号36は、キャッシュ装置12に対しても出力される。
【0041】
DMAアクノリッジ信号36を受け付けたDMAC15は、バス使用権を譲り受け、設定されたアドレス領域間のデータ転送を行う。これにより、CPUコア11によるデータ転送処理に伴う負荷を省略することができる。
【0042】
デバッグユニット16は、アドレスデータを監視してデバッグ用メモリ空間にアクセスデータをトレースし、ソフトウェア及びハードウェアのデバッグに使用される。このため、デバッグユニット16は、アドレス監視部と、割込発生部と、データトレース部と、通信部とを含む。アドレス監視部にアドレスデータが監視され、特定のアドレスへのアクセスが検出されたとき、割込発生部によりCPUコア11に割り込みをかけて、CPUコア11の動作を一時停止させる。これにより、デバッガが起動され、アドレス監視部で一致検出されたアドレスデータ及びアクセスデータからなるトレースデータがデバッグ用メモリに蓄積される。デバッガへの入出力やトレースデータは、通信部を介して外部との間で行われる。このようなデバッガがバスマスタとなって、アドレスデータを発生してそのメモリやI/O空間上のデータをアクセスできるようにすることによって、CPU上でデバッガを動作させることなく、外部から操作できるようになる。
【0043】
キャッシュ装置12は、CPUコア11がアクセスするデータを、アドレスに対応付けてキャッシングする。即ち、キャッシュ装置12は、外部に接続されたメモリ装置に格納されたデータの一部又は全部をバッファリングする。そして、キャッシュ装置12がCPUコア11によって出力された内部アドレスデータに対応するデータをバッファリングしているとき(キャッシュヒットが発生したとき)、CPUコア11はこのキャッシュ装置12の蓄積データに対してアクセスする。これにより、データアクセス時間の大幅に短縮させる。
【0044】
一方、キャッシュ装置12がCPUコア11によって出力された内部アドレスデータに対応するデータをバッファリングしていないとき(キャッシュミスが発生したとき)、CPUコア11はプログラマブル・ウェイト・コントローラ14を介して、外部に接続されたメモリ装置に格納されたデータに対してアクセスする。その際、キャッシュ装置12は、所与の入れ替えアルゴリズムに従って、そのアクセスデータを所与の格納場所にバッファリングして、次のアクセスに備える(キャッシュ・フィル)。
【0045】
また、キャッシュ装置12は、CPUコア11からDMAアクノリッジ信号36を受け付けたとき、キャッシュ内容をフラッシュする。即ち、DMAアクノリッジ信号36が出力されてから開始されるDMA転送が行われているとき、キャッシュ装置12は、キャッシングされている内容を無効化する。
【0046】
さらに、キャッシュ装置12は、アクセスされたデータをバッファリングしているか否かについて、キャッシュヒット判定信号として通知するようになっている。
【0047】
プログラマブル・ウェイト・コントローラ(広義には、クロック制御装置)14は、所与のアドレス領域ごとに、データをアクセスするために発行されるバスサイクルに必要なウェイト制御を行う。ここで、プログラマブル・ウェイト・コントローラ14は、バス制御装置或いはメモリ制御装置としての機能を有し、外部アドレスバス14に接続される第1〜第3のメモリ装置25〜27にアクセスするための外部バスサイクルを発行するものとする。
【0048】
マイクロコンピュータ10は、内部アドレスバス23が設けられており、これにCPUコア11、キャッシュ装置12、プログラマブル・ウェイト・コントローラ14、DMAC15、デバッグユニット16が接続される。CPUコア11、DMAC15或いはデバッグユニット16は、この内部アドレスバス23を共通バスとして、アクセス対象となるデータの格納場所を特定するための32ビットの内部アドレスデータを出力する。
【0049】
マイクロコンピュータ10の外部には、外部アドレスバス24が設けられており、これにマイクロコンピュータ10のプログラマブル・ウェイト・コントローラ14、メモリ装置としての第1〜第3のメモリ装置25〜27が接続されている。
【0050】
第1〜第3のメモリ装置25〜27には、それぞれアドレス領域ごとに、アクセス対象となるデータが格納される。さらに、これら第1〜第3のメモリ装置25〜27は、それぞれ異なるアクセス時間を有する。このため、マイクロコンピュータ10は、プログラマブル・ウェイト・コントローラ14によって行われるアクセス対象となるデータが格納されるメモリ装置に対応したウェイト制御により、これら各メモリ装置にアクセスする。
【0051】
次に、このような構成のマイクロコンピュータ10の動作について、説明する。
【0052】
本実施形態におけるマイクロコンピュータ10が特徴とするところは、プログラマブル・ウェイト・コントローラ14において、キャッシュ装置12から出力されたキャッシュヒット判定信号に基づいて、キャッシュミスが発生したときに基準クロックCLK1、CLK2のいずれか一方を停止させて、CPUコア11及びキャッシュ装置12のいずれ一方の動作を停止して、消費電力の低減を図る点である。
【0053】
ここで、キャッシュヒット判定信号は、キャッシュ装置12によって生成される。キャッシュ装置12は、キャッシュヒット判定信号線28を介し、キャッシュヒット判定信号をプログラマブル・ウェイト・コントローラ14に供給される。
【0054】
プログラマブル・ウェイト・コントローラ14は、キャッシュヒット判定信号線28を介して受信したキャッシュヒット判定信号により、キャッシュ装置12においてキャッシュミスの発生を判別すると、基準クロックCLK1、CLK2の少なくとも一方を停止させるためのクロック供給停止信号を第1のクロックドライバ18に出力する。
【0055】
クロック供給停止信号は、クロック供給停止信号線29を介して、第1のクロックドライバ18に供給される。
【0056】
さらに本実施形態のプログラマブル・ウェイト・コントローラ14によって生成されるクロック供給停止信号は、キャッシュミスが発生したとき、外部に接続されたメモリ装置にアクセスする際のストール期間に応じた期間だけ、上述した基準クロックの動作を停止するようになっている。そして、この期間については、ウェイト制御装置として機能するプログラマブル・ウェイト・コントローラ14で設定されているウェイト制御テーブルに従って生成する。
【0057】
図2に、本実施形態におけるプログラマブル・ウェイト・コントローラ14によるウェイト制御を行うためのウェイト制御テーブルの一例を示す。
【0058】
このウェイト制御テーブル40は、マイクロコンピュータ10の内部アドレスバス23に接続されバスマスタとなり得る各部によってアクセスされるアドレス領域41ごとに、アクセスデータを格納するメモリ装置にアクセスするために必要なウェイト数42が記憶されている。
【0059】
プログラマブル・ウェイト・コントローラ14は、キャッシュミスが発生したとき、例えば外部に接続されたメモリ装置に対して「A0000000H」番地から「A000FFFFH」番地までのアドレス領域のいずれかのアドレスにアクセスする際、判別したアドレス領域に対応したウェイト数「3」だけウェイト・サイクルが挿入された所与の外部バスサイクルを発行する。
【0060】
このとき、プログラマブル・ウェイト・コントローラ14は、ウェイト数「3」に応じたクロック数分だけ基準クロックCLK1、CLK2の少なくとも一方を停止させるためのクロック供給停止信号を生成する。これにより、CPUコア11、キャッシュ装置12の少なくとも一方の動作が停止し、その停止した期間分だけ消費電力を削減することができる。
【0061】
このようにキャッシュミスが発生した場合、従来ではいつデータが返ってくるか不明なためにストール状態にあったCPUコアなどのクロック信号を停止することができなかった。これに対して、本実施形態では外部に接続されたメモリ装置をアクセスするためのプログラマブル・ウェイト・コントローラ14に設定されたウェイト数に対応したクロック数だけクロックを停止させるようにした。これにより、従来のような性能低下を伴うことなく、ストール状態にある各部の消費電力を、効果的かつ簡素に低減させることが可能となる。
【0062】
以下、上述した本実施形態のマイクロコンピュータ10の要部について説明する。
【0063】
2.本実施形態のクロック制御装置
図3に、本実施形態のクロック制御装置を適用したプログラマブル・ウェイト・コントローラの構成要部を示す。
【0064】
ここで、図1に示すマイクロコンピュータ10と同一部分には同一符号を付し、説明を省略する。
【0065】
プログラマブル・ウェイト・コントローラ14は、第1〜第8のウェイト制御レジスタ群501〜508と、MUX部51と、MUX制御部52と、ウェイト数制御カウンタ53と、ゼロ検出器54とを含む。
【0066】
ここでは、ウェイト制御レジスタ群を8組としているが、組数に限定されるものではない。
【0067】
第1〜第8のウェイト制御レジスタ群501〜508は、内部アドレスバス23を介して供給されたアドレスデータに基づいて、アクセスされるアドレス領域を判別するためのレジスタ群と、判別したアドレス領域に対応したウェイト数が設定されるレジスタとを含む。
【0068】
MUX部51は、各ウェイト制御レジスタ群501〜508それぞれに設定され読み出されたウェイト数551〜558と、デフォルト値「0」の中から択一的に選択するためのセレクタである。
【0069】
MUX制御部52は、各ウェイト制御レジスタ群501〜508それぞれからのアドレス領域判別結果561〜568に基づいて、MUX部51のセレクタ制御を行うセレクタ制御信号57を生成する。
【0070】
ウェイト数制御カウンタ53は、MUX部51によって択一的に選択されたウェイト数を毎クロック、デクリメントする。
【0071】
ゼロ検出器54は、キャッシュヒット判定信号28によってキャッシュ装置12でキャッシュミスが発生したことが検出されたとき、ウェイト数制御カウンタ53でデクリメントされるカウントが「0」であるか否かを検出する。
【0072】
また、ゼロ検出器54は、カウント値が「0」であるか否かを示すゼロ検出信号に基づいて、クロック供給停止信号を生成する。
【0073】
第1〜第8のウェイト数制御レジスタ群501〜508は、それぞれアドレス領域ごとに、外部に接続された複数のメモリ装置にアクセスするために発行されるバスサイクルに必要なウェイト数が設定される。
【0074】
第1のウェイト数制御レジスタ群501は、ウェイト数設定レジスタ601と、比較アドレス設定レジスタ611と、比較アドレスマスク設定レジスタ621と、アドレスコンパレータ631とを含む。
【0075】
第2〜第8のウェイト数制御レジスタ群502〜508は、第1のウェイト数制御レジスタ群501と同様の構成をなしている。
【0076】
ウェイト数設定レジスタ601〜608には、各ウェイト制御レジスタ群ごとに設定されたアドレス領域に対応したウェイト数が設定される。
【0077】
比較アドレス設定レジスタ611〜618には、アドレス領域の先頭アドレスに対応したアドレスデータが設定される。
【0078】
比較アドレスマスク設定レジスタ621〜628には、比較アドレス設定レジスタ611〜618によって設定された先頭アドレスからのアドレス領域の領域サイズに対応したマスク値が設定される。
【0079】
アドレスコンパレータ631〜638は、内部アドレスバス23を介して入力されたアドレスデータと、比較アドレス設定レジスタ611〜618に設定されたアドレスデータとを比較する。その際に、アドレスコンパレータ631〜638は、比較アドレスマスク設定レジスタ621〜628に設定されたマスク値でマスクすることによって、内部アドレスバス23上のアドレスデータによって特定されるアドレス領域が各ウェイト制御レジスタ群に設定されたアドレス領域であるか否かを判別する。その判別結果は、アドレス領域判別結果561〜568として出力される。
【0080】
例えば、第1のウェイト制御レジスタ群501に、図2に示すような「A00000000H」番地から「A000FFFFH」番地までの64KB(キロバイト)のアドレス領域に3ウェイトを設定する場合は、次のように設定する。
【0081】
ウェイト数設定レジスタ601には、ウェイト数「3」が設定される。
【0082】
比較アドレス設定レジスタ611には、32ビットの16進データ「A000xxxxH」(ここで、「x」は任意の4ビットデータ)が設定される。
【0083】
比較アドレスマスク設定レジスタ621には、32ビットの16進データ「0000FFFFH」が設定される。
【0084】
このような構成のプログラマブル・ウェイト・コントローラ14は、内部アドレスバス23を介して32ビットのアドレスデータが供給されると、各ウェイト制御レジスタ群501〜508のアドレスコンパレータ631〜638に入力される。
【0085】
アドレスコンパレータ631〜638は、上述したように、それぞれ比較アドレス設定レジスタ611〜618に設定されたアドレスデータと、内部アドレスバス23上のアドレスデータとを1ビットずつ比較する。この際、アドレスコンパレータ631〜638は、比較アドレスマスク設定レジスタ621〜628の「1」が立っているビットについて比較結果をマスクして、一致したビットとして扱う。
【0086】
このようにしてアドレスコンパレータ631〜638それぞれは、供給されたアドレスデータの全ビットが一致したとき、自ウェイト制御レジスタ群に設定されたアドレス領域であると判別する。一方、1ビットでも不一致のとき、自ウェイト制御レジスタ群に設定されたアドレス領域ではないと判別する。この判別結果は、アドレス領域判別信号561〜568としてMUX制御部52に対し出力される。
【0087】
MUX制御部52は、アドレス領域判別信号561〜568から、各ウェイト制御レジスタ群に設定されたアドレス領域であると判別されたウェイト制御レジスタ群を択一的に選択する。
【0088】
ここで、各ウェイト制御レジスタ群の各アドレスの設定値は、ソフトウェア(OSなど)によって、各ウェイト制御レジスタ群によるアドレス領域が重複しないように制御されている。
【0089】
MUX制御部52によって択一的に選択されたウェイト制御レジスタ群を示すセレクタ制御信号57は、MUX部51に供給される。
【0090】
MUX部51は、セレクタ制御信号57によって択一的に選択されたウェイト制御レジスタ群が出力するウェイト数設定レジスタのウェイト数を選択する。
【0091】
なお、MUX部51は、第1〜第8のウェイト制御レジスタ群それぞれに設定されたアドレス領域ではない場合には、セレクタ制御信号57によりデフォルト値「0」を選択する。
【0092】
こうしてMUX部51によって選択されたウェイト数設定レジスタのウェイト数は、ウェイト数制御カウンタ53に入力される。
【0093】
ウェイト数制御カウンタ53に入力されたウェイト数は、まずゼロ検出器54により「0」であるか否かが検出される。
【0094】
ゼロ検出器54により「0」であると検出されたときには、ウェイト数制御カウンタ53は動作しない。例えばクロック供給停止信号の論理レベルが「H」のときクロックの供給の停止を指示するものとすると、ゼロ検出器54により「0」であると検出され、かつその論理レベルが「H」のとき、図示しないクロックに同期してこれをリセットする。
【0095】
ゼロ検出器54により「0」ではないと検出されたときには、例えばクロック供給停止信号が論理レベル「L」のとき図示しないクロックに同期してこれをセットする。さらに、ウェイト数制御カウンタ54は図示しないクロックに同期してデクリメント動作を行う。
【0096】
デクリメント結果は、再びゼロ検出器54により「0」であるか否かが検出される。
【0097】
このようにして、毎クロックごとにウェイト数制御カウンタ53のカウンタ値を、ゼロ検出器54で「0」であるか否かを検出することで、ウェイト数制御カウンタ53でデクリメントされるカウンタ値「0」が検出されるまでの間に対応した期間だけ論理レベル「H」となるクロック供給停止信号を生成する。
【0098】
なお、ウェイト数制御カウンタ53によって制御されるカウンタ値は、図示しない外部バスサイクル発生部によるウェイト制御に参照され、外部に接続されたメモリ装置に格納されるデータのアクセスが行われる。
【0099】
図4に、本実施形態のプログラマブル・ウェイト・コントローラ14の動作タイミングの一例を示す。
【0100】
以下では、2フェーズ、ノンオーバラップクロックシステムにおける動作タイミングで、ウェイト数が「0」の場合を示す。
【0101】
ここで、2フェーズ、ノンオーバラップクロックシステムとは、クロック系統を、PH1、PH2と呼ばれる互いに非重複の2相クロックにより構成するようにしたシステムをいう。これにより、順序回路を同期化するフリップフロップをトランスペアレント(透過データ型)ラッチとすることができ、フリップフロップの回路構成の小型化が可能となる。
【0102】
また、本実施形態のマイクロコンピュータ10の外部バスサイクルは、2クロックを1バスサイクルであるものとする。さらに、各バスサイクルの終端部でウェイト・サイクルを挿入するか否かを判別して、バスサイクルを延長するようになっているものとする。
【0103】
即ち、図4に示すようにウェイト数「0」の場合、バスサイクルは、互いに重複しないPH1、PH2によって規定されるクロックサイクルT0、T1から構成される。
【0104】
本実施形態のマイクロコンピュータでは、クロックサイクルT0のPH1に同期してアドレスデータが出力され、バスサイクルが開始される。
【0105】
これと同時に、プログラマブル・ウェイト・コントローラ14の第1〜第8のウェイト制御レジスタ群501〜508のアドレスコンパレータ631〜638に、内部アドレスバス23上のアドレスデータであるメモリアドレス70が入力される。
【0106】
アドレスコンパレータ631〜638では、上述したようにアドレス領域の判別が行われる。その結果は、アドレス領域判別結果71としてクロックサイクルT0のPH2に同期して出力される。
【0107】
MUX制御部52及びMUX部51は、このアドレス領域判別結果を用いて、該当するウェイト制御レジスタ群のウェイト数を選択する。
【0108】
上述したように、ソフトウェアによって各ウェイト制御レジスタ群が同一のアドレスでアドレス領域を判別した旨のアドレス領域判別結果を出力しないように制御していたが、プライオリティ回路により複数のアドレス領域判別結果が自レジスタ群に設定されたアドレス領域として判別した場合であっても優先順位の最も高いレジスタ群のみを選択するようにすることが望ましい。
【0109】
このようにして選択されたウェイト数は、ウェイト数制御カウンタ53に入力される。
【0110】
ウェイト数制御カウンタ53は、クロックサイクルT1のPH1で、カウンタ値CNTとして「0」を設定する(カウンタ値72)。
【0111】
ウェイト数制御カウンタ53に設定されるカウンタ値は、ゼロ検出器54で「0」であるか否かが検出される。
【0112】
ゼロ検出器54は、クロックサイクルT1のPH2に同期して、その検出結果73を示すゼロ検出信号を出力する。ここでは、「0」が検出されたため、図示しない外部バスサイクル発生部によって制御される外部バスサイクルを終了させ、それ以降のカウント動作を停止させる。
【0113】
従って、クロックサイクルT2以降は、次のバスサイクルが新たに開始される。
【0114】
図5に、本実施形態のプログラマブル・ウェイト・コントローラ14の動作タイミングの他の例を示す。
【0115】
以下では、図4と同様の2フェーズ、ノンオーバラップクロックシステムにおける動作タイミングで、ウェイト数が「N(Nは自然数)」の場合を示す。
【0116】
即ち、図5に示すようにウェイト数「N」の場合、バスサイクルは、互いに重複しないPH1、PH2によって規定されるクロックサイクルT0、TN+1から構成される。
【0117】
クロックサイクルT0のPH1に同期してアドレスデータが出力されて、バスサイクルが開始されると同時に、内部アドレスバス23上のアドレスデータであるメモリアドレス80がプログラマブル・ウェイト・コントローラ14の第1〜第8のウェイト制御レジスタ群501〜508のアドレスコンパレータ631〜638に入力される。
【0118】
アドレスコンパレータ631〜638では、上述したようにアドレス領域の判別が行われ、アドレス領域判別結果82としてクロックサイクルT0のPH2に同期して出力される。
【0119】
MUX制御部52及びMUX部51は、このアドレス領域判別結果を用いて、該当するウェイト制御レジスタ群のウェイト数を選択し、選択されたウェイト数は、ウェイト数制御カウンタ53に入力される。
【0120】
ウェイト数制御カウンタ53は、クロックサイクルT1のPH1で、カウンタ値CNTとして「N」を設定する(カウンタ値84)。
【0121】
ウェイト数制御カウンタ53に設定されるカウンタ値は、ゼロ検出器54で「0」であるか否かが検出される。
【0122】
ゼロ検出器54は、クロックサイクルT1のPH2に同期して、その検出結果86を示すゼロ検出信号を出力する。
【0123】
ここでは、ウェイト数制御カウンタ53に設定されるカウンタ値は「N」であるため、クロックサイクルT1のPH2に同期して、それまで論理レベル「L」のクロック供給停止信号がセット88される。
【0124】
ウェイト数制御カウンタ53は、クロックサイクルごとにPH1に同期してカウンタ値をデクリメントする。
【0125】
従って、クロックサイクルT2のPH1に同期してカウンタ値は「N−1」に設定される(カウンタ値90)。
【0126】
カウンタ値が更新されるたびに、ゼロ検出器54で「0」であるか否かが検出される。
【0127】
クロックサイクルT2においても、ウェイト数制御カウンタ53に設定されるカウンタ値は「N−1」であるため、クロック供給停止信号は論理レベル「H」のままである。
【0128】
以下同様にして、CNTが「0」になるまで繰り返される。
【0129】
その結果、クロックサイクルTN+1のPH1で、ウェイト数制御カウンタ53は、カウンタ値CNTとして「0」を設定する(カウンタ値92)。
【0130】
ウェイト数制御カウンタ53に設定されるカウンタ値は、ゼロ検出器54で「0」であるか否かが検出される。
【0131】
ゼロ検出器54は、クロックサイクルT1のPH2に同期して、その検出結果86を示すゼロ検出信号を出力する。
【0132】
ウェイト数制御カウンタ53は、クロックサイクルごとにPH1に同期してカウンタ値をデクリメントし、カウンタ値が更新されるたびに、ゼロ検出器54で「0」であるか否かが検出される。
【0133】
ここでは、「0」が検出されたため、図示しない外部バスサイクル発生部によって制御される外部バスサイクルを終了させ、それ以上のカウント動作を停止させる。
【0134】
また、クロックサイクルTN+2のPH2に同期して、クロック供給停止信号は、論理レベル「H」のクロック供給停止信号がリセットされる(リセット94)。
【0135】
即ち、ここではクロック供給停止信号として、次のように生成する。
【0136】
クロック供給停止信号の論理レベルが「H」のとき、クロックの供給の停止を指示するものとすると、ウェイト数制御カウンタ53でデクリメントされるカウンタ値が「0」の場合、クロック供給停止信号は、論理レベル「L」のときは変化しないが、論理レベル「H」のときリセットされる。ウェイト数制御カウンタ53でデクリメントされるカウンタ値が「0」ではない場合、論理レベル「L」のときは論理レベル「H」にセットするが、論理レベル「H」のときは変化しない。
【0137】
このようにすることによって、ゼロ検出器54は、キャッシュミスが発生したときに、例えばウェイト数制御カウンタ53でデクリメントされるカウンタ値「0」が検出されるまで、論理レベル「H」のクロック供給停止信号を生成することができる。このようなクロック供給停止信号は、ゼロ検出結果と同一タイミングで生成することができる。
【0138】
ところで、クロック供給停止信号は、アドレス領域が判別される場合には必ずウェイとサイクルが必要となるという前提で、アドレス領域が判別されたときに論理レベル「H」にセットし、ゼロ検出器54のゼロ検出により論理レベル「L」にリセットすることで、ゼロ検出タイミングより早いタイミングでクロック供給停止信号を生成することができる。
【0139】
この場合、クロック供給停止信号は、クロックサイクルT1のPH1に同期して論理レベル「H」となり、クロックサイクルTN+2のPH1に同期して論理レベル「L」となる。
【0140】
さらに、リセットタイミングとして、カウンタ値が「0」ではなく「1」又は「2」といった値になったときにクロック供給停止信号を論理レベル「L」にすることによって、クロック供給再開を少しは早めることも可能となる。
【0141】
このような種々のクロック供給停止信号の生成タイミングについては、マイクロコンピュータの各部の動作タイミングに依存するものであって、この生成タイミングに限定されるものではない。
【0142】
要は、プログラマブル・ウェイト・コントローラ14として、ウェイト制御テーブルに設定されたウェイト数を参照し、これに対応したクロック数だけ論理レベル「H」となるクロック供給停止信号を生成することができればよい。
【0143】
3.本実施形態のマイクロコンピュータ
次に、本実施形態のマイクロコンピュータにおけるクロック供給停止動作について、具体的に説明する。
【0144】
そのため、まず本実施形態のプログラマブル・ウェイト・コントローラ(広義には、クロック制御装置)14に対して、キャッシュヒット判定信号を供給するキャッシュ装置の構成及び動作タイミングについて説明した後、本実施形態のクロック供給停止動作について説明する。
【0145】
(1)キャッシュ装置の構成例
図6に、本実施形態のキャッシュ装置12の構成の一例を示す。
【0146】
ここでは、キャッシュ装置12が、命令/データとが混在した2ウェイセットアソシアティブ方式であり、ラインサイズ8バイトで、4Kバイト(=8バイト×256エントリ×2ウェイ)の容量であるものとする。
【0147】
キャッシュ装置12は、ウェイごとに、コンパレータ1000、1001と、タグRAM読出・書込制御回路1020、1021と、タグアレイ1040、1041と、データRAM読出・書込制御回路1060、1061と、データアレイ1080、1081とを含み、さらにMUX110を含む。
【0148】
コンパレータ1000、1001は、アドレスデータの上位ビットと、タグRAM読出・書込制御回路1020、1021によって読み出されたタグアドレスデータとを比較し、その比較結果をタグ比較結果1120、1121としてMUX110に対して出力する。
【0149】
その際、コンパレータ1000、1001は、タグアレイの各エントリごとに有効であるか否かを示すValidビットが「1」のときにのみ比較結果が一致したものと判定するようになっている。
【0150】
タグRAM読出・書込制御回路1020、1021は、それぞれアドレスデータの中位ビットによって特定されるタグアレイ1040、1041の各エントリに対して、アドレスデータの上位ビットの読み出し及び書き込み制御を行うと共に、有効なエントリを示すValidビットの制御を行う。
【0151】
タグアレイ1040、1041は、アドレスデータの上位ビットを、中位ビットによって特定されるエントリ数分だけ記憶する。
【0152】
データRAM読出・書込制御回路1060、1061は、それぞれアドレスデータの中位ビットによって特定されるデータアレイ1080、1081の各エントリに対して、キャッシュデータの1ラインの読み出し及び書き込み制御を行う。
【0153】
データアレイ1080、1081は、アドレスデータに対応した1ラインサイズのデータを、アドレスデータの中位ビットによって特定されるエントリ数分だけ記憶する。
【0154】
MUX110は、タグ比較結果1120、1121から、一致したウェイの1ラインデータを選択し、そのうちアドレスデータ下位ビットで特定されるデータが図示しないデータバスに出力される。
【0155】
ここで、内部アドレスバス23を介して32ビットのアドレスデータ120がキャッシュ装置12に供給されたものとする。
【0156】
32ビットのアドレスデータ120の上位21ビット122は、コンパレータ1000、1001に入力される。即ち、コンパレータ1000、1001は、この上位21ビット122と、タグアレイ1040、1041から読み出されたタグアドレスとを比較する。
【0157】
32ビットのアドレスデータ120の中位8ビット124は、タグアレイ1040、1041、データアレイ1080、1081に入力される。即ち、この中位8ビット124によって、タグアレイ1040、1041、データアレイ1080、1081の256エントリのいずれかのエントリが特定される。
【0158】
32ビットのアドレスデータ120の下位3ビット126は、データRAM読出・書込制御回路1060、1061によってデータアレイ1080、1081から読み出された8バイトのデータのライン内の指定を行う。
【0159】
コンパレータ1000、1001が、タグアレイ1040、1041から中位8ビット124によって特定されるエントリからタグアドレスとともに読み出されたValidビットから、タグアドレスの一致、かつValidビットが「1」であることを一致成立の条件に比較を行い、タグ比較結果1120、1121として出力する。
【0160】
MUX110は、データRAM読出・書込制御回路1060、1061によってデータアレイ1080、1081から読み出されたアドレスデータ120の中位8ビット124によって特定されるエントリの1ラインサイズの8バイトデータを、タグ比較結果1120、1121に基づいて、択一的に選択する。
【0161】
さらに、MUX110は、選択した1ラインデータをアドレスデータ120の下位3ビット126によって特定される位置の32ビットデータを図示しないデータバスに出力する。
【0162】
ここでは、データバスを32ビットとすると、下位3ビット126の最上位1ビットのみが用いられる。すなわち、下位3ビット126の最上位ビットが「0」のとき1ラインサイズの下位4バイトを選択し、下位3ビット126の最上位ビットが「1」のとき1ラインサイズの上位4バイトを選択する。
【0163】
なお、キャッシュヒット判定信号は、タグ比較結果1120、1121の論理和演算の結果として、プログラマブル・ウェイト・コントローラ14に対して出力される。
【0164】
図7に、本実施形態のキャッシュ装置12の動作タイミングの一例を示す。
【0165】
ここでは、2フェーズ、ノンオーバラップクロックシステムにおける動作タイミングで、キャッシュヒットした場合の動作タイミングを示す。
【0166】
即ち、図7に示すようにクロックサイクルT0のPH1に同期してアドレスデータADR1が出力されると、キャッシュ装置12のタグRAM読出・書込制御回路1020、1021によりタグアドレスが読み出されて、比較される。
【0167】
その結果であるタグ比較結果1120、1121が論理和演算されたキャッシュヒット判定信号は、クロックサイクルT0のPH2に同期して出力される。
【0168】
アドレスデータADR1がキャッシュヒットした場合には、MUX110においてタグ比較結果1120、1121により選択された32ビットのData1がクロックサイクルT0のPH2に同期して出力される。
【0169】
続いて、クロックサイクルT1のPH1に同期してアドレスデータADR2が出力されると、キャッシュ装置12のタグRAM読出・書込制御回路1020、1021によりタグアドレスが読み出されて、比較される。
【0170】
以下同様に、キャッシュヒット判定信号と、キャッシュヒットしたアドレスデータADR2に対応したData2が、クロックサイクルT0のPH2に同期して出力される。
【0171】
(2)クロック供給停止動作タイミング
次に、上述した構成のプログラマブル・ウェイト・コントローラ14、キャッシュ装置12を含む本実施形態のマイクロコンピュータにおけるクロック供給停止動作タイミングについて、図8を参照しながら説明する。
【0172】
図8に、本実施形態のマイクロコンピュータにおけるクロック供給停止動作タイミングの一例を示す。
【0173】
ここでは、クロック供給停止信号をアドレス領域判別信号とPH1に同期してセットし、ゼロ検出信号とPH1に同期してリセットして生成されたものとするが、このクロック供給停止信号のタイミングはマイクロコンピュータの構成に依存する。要は、プログラマブル・ウェイト・コントローラ14に設定されたアドレス領域に対応したウェイト数に基づくクロック数だけ少なくともCPUコア或いはキャッシュ装置12に供給される基準クロックを停止させるクロック供給停止信号を生成することができればよい。
【0174】
さらに、本実施形態におけるキャッシュ装置12は、高速化のため、アドレスが供給された時点で、タグアレイ及びデータアレイの読み出し動作を同時開始するものとする。
【0175】
クロックサイクルT0のPH1に同期して出力されたアドレスデータADR1は、キャッシュ装置12でキャッシュヒットが発生したとすると、クロックサイクルT0のPH2でタグ比較結果であるキャッシュヒット判定信号が、「ヒット」を意味する論理レベル「H」となる。
【0176】
キャッシュヒットしたキャッシュ装置12は、図7で説明したようにこのクロックサイクルT0のPH2で、ヒットしたデータData1を出力する。
【0177】
続いて、クロックサイクルT1のPH1に同期して出力されたアドレスデータADR2は、キャッシュ装置12でキャッシュミスが発生したとすると、クロックサイクルT1のPH2でタグ比較結果であるキャッシュヒット判定信号が、「ミス」を意味する論理レベル「L」となる。
【0178】
これに伴い、キャッシュ装置12は、外部に接続されたメモリ装置に対して、リィル動作を行う。
【0179】
即ち、外部アドレスバスにクロックサイクルT1のPH1に同期して、ADR2に対応したメモリアドレス(2a)を出力して、32ビットデータをフィルした後、メモリアドレス(2b)を出力して他の32ビットデータをフィルする。このように、2バスサイクルにより、64ビットの1ラインサイズのデータをフィルする。
【0180】
ここで、ADR2が例えば「A0000000H」番地であるとすると、クロックサイクルT1のPH2に同期して、アドレス領域判別結果が一致を意味する論理レベル「H」となる。これにしたがって、図2に示したように、「A000000H」番地から「A000FFFFH」番地までのアドレス領域に対応するクロック数「3」が読み出される。
【0181】
続いて、クロック供給停止信号は、上述したようにこのアドレス領域判別結果とPH1に同期して、クロックサイクルT2のPH1で論理レベル「H」にセットされると共に、プログラマブル・ウェイト・コントローラ14のカウンタ値CNTが「3」に設定される。
【0182】
このカウンタ値は、デクリメントされて、各クロックサイクルのPH1で更新される。
クロックサイクルT5のPH1で、カウンタ値CNTが「0」に更新されると、ゼロ検出器54で「0」が検出されて、クロックサイクルT5のPH2でゼロ検出を示す論理レベル「H」となる。
【0183】
クロック供給停止信号は、上述したようにゼロ検出信号とPH1に同期してリセットされるので、クロックサイクルT6のPH1で論理レベル「L」となる。
【0184】
従って、クロック供給停止信号が論理レベル」H」の期間であるクロックサイクルT2からクロックサイクルT5にかけての間、第1のクロックドライバ18において例えばキャッシュ装置12の供給される基準クロックの動作が停止する。また、場合によってはCPUコア11に供給される基準クロックについても、同様に停止させるようにしてもよい。
【0185】
そして、クロックサイクルT6ではCPUコア11、或いはキャッシュ装置12の基準クロックの動作停止は解除される。
【0186】
これにより、プログラマブル・ウェイト・コントローラ14のウェイト制御テーブルによって記憶されるウェイト数にしたがってウェイト・サイクルが挿入された外部バスサイクルにより、外部に接続されたメモリ装置からは所望のアクセスデータがデータバス上に出力される。
【0187】
このようにして、クロックサイクルT5〜T6にかけて外部に接続されたメモリ装置から出力される外部データは、クロック信号が動作しているキャッシュ装置12のADR2に対応したタグアドレスの1ラインデータの一部としてフィルされる。
【0188】
その後、クロックサイクルT6以降で、ADR2に対応したタグアドレスの1ラインデータの他のデータをフィルするためのメモリアドレス(2b)による、外部バスサイクルが発行される。
【0189】
以上説明したように、本実施形態では、CPUコア11及びキャッシュ装置12を含むマイクロコンピュータ10において、キャッシュ装置12でキャッシュミスが発生したとき、外部に接続されたメモリ装置にアクセスするためのプログラマブル・ウェイト・コントローラ14において、アクセスされるアドレス領域に対応して設定されるウェイト数に応じたクロック数だけ基準クロックの動作を停止させるクロック供給停止信号を生成するようにした。そして、このクロック供給停止信号を、第1のクロックドライバ18からCPUコア11及びキャッシュ装置12に供給される基準クロックのうち少なくとも一方を停止するようにした。これにより、性能低下を伴うことなく、ストール状態にある各部の消費電力を、効果的かつ簡素に低減させることが可能となる。
【0190】
なお、本実施形態におけるマイクロコンピュータでは、プログラマブル・ウェイト・コントローラ14のウェイト制御テーブルに設定されたウェイト数を参照して、クロック供給停止信号はこのウェイト数に応じたクロック数(例えば、1クロックだけ短いクロック数)だけクロック供給の停止を指示するようにしていた。これは、例えばフリップフロップなどの簡素な順序回路からなるロジックで実現できる。しかしながら、このようなクロック数に限定されるものではない。
【0191】
例えば、クロック供給を停止させるためのクロック数を、図2に示したウェイト制御テーブルに設定するようにしてもよい。
【0192】
図9は、本実施形態におけるプログラマブル・ウェイト・コントローラ14によるウェイト制御を行うためのウェイト制御テーブルの他の例を示す。
【0193】
このウェイト制御テーブル180は、マイクロコンピュータ10の内部アドレスバス23に接続されるバスマスタとなり得る各部によってアクセスされるアドレス領域182ごとに、アクセスデータを格納するメモリ装置にアクセスするために必要な外部バスサイクルウェイト数184と、キャッシュミスが発生して外部アクセスに要するキャッシュ装置12のウェイト数186とが記憶されている。
【0194】
プログラマブル・ウェイト・コントローラは、例えばキャッシュミス発生時など外部に接続されたメモリ装置に対して「A0000000H」番地から「A000FFFFH」番地までのアドレス領域のいずれかのアドレスにアクセスする際、判別したアドレス領域に対応したウェイト数「3」だけウェイトさせた所与の外部バスサイクルを発行する。
【0195】
このとき、プログラマブル・ウェイト・コントローラ14は、キャッシュウェイト数「2」だけ基準クロックCLK2を停止させるためのクロック供給停止信号を生成する。これにより、外部に接続されるメモリ装置のアクセス時間に応じて、キャッシュ装置12の動作を停止させるべきクロック数を可変とすることができ、ソフトウェア(OSなど)により最適な消費電力制御を行うことができるようになる。
【0196】
4.他の実施形態のマイクロコンピュータの構成例
本実施形態における、キャッシュ装置からキャッシュミスが発生したときに外部に接続されたメモリ装置にアクセスするためのウェイト制御テーブルに基づいてクロック供給停止信号を生成するプログラマブル・ウェイト・コントローラ(広義には、クロック制御装置)の機能については、他の周辺回路に含むことが考えられる。
【0197】
図10に、他の実施形態のマイクロコンピュータのハードウェアブロック図の一例を示す。
【0198】
このマイクロコンピュータ1700は、本実施形態のクロック制御装置の機能をバスコントローラ1600に含むと共に、本実施形態のキャッシュ装置1520を含んで構成されており、CPU1510、リセット回路1540、プログラマブルタイマ1550、リアルタイムクロック(RTC)1560、DMA1570、割り込みコントローラ1580、シリアルインターフェース1590、A/D変換器1610、D/A変換器1620、入力ポート1630、出力ポート1640、I/Oポート1650、クロック発生装置1560、プリスケーラ1570、及びそれらを接続する各種バス1680など、各種ピン1690などを含む。
【0199】
本実施形態のクロック制御装置をマイクロコンピュータに組み込むことにより、効果的かつ簡素な方法で低消費電力化を図るマイクロコンピュータを安価に提供することができる。
【0200】
5.本実施形態の電子機器
図11に、本実施形態の電子機器のブロック図の一例を示す。本電子機器800は、マイクロコンピュータ(またはASIC)810、入力部820、メモリ830、電源生成部840、画像出力部850、音出力860を含む。
【0201】
本マイクロコンピュータ(またはASIC)810或いはメモリ830は、本実施形態のクロック制御装置を含んでいる。
【0202】
ここで、入力部820は、種々のデータを入力するためのものである。マイクロコンピュータ810は、この入力部820により入力されたデータに基づいて種々の処理を行うことになる。メモリ830は、マイクロコンピュータ810等の作業領域となるものである。電源生成部840は、電子機器800で使用される各種電源を生成するためのものである。画像出力部850は、電子機器が表示する各種の画像(文字、アイコン、グラフィック等)を出力するためのものであり、その機能は、LCDやCRT等のハードウェアにより実現できる。音出力部860は、電子機器800が出力する各種の音(音声、ゲーム音等)を出力するためのものであり、その機能は、スピーカ等のハードウェアにより実現できる。
【0203】
図12(A)に、電子機器の1つである携帯電話950の外観図の例を示す。この携帯電話950は、入力部として機能するダイヤルボタン952や、画像出力部として機能し電話番号や名前やアイコン等を表示するLCD954や、音出力部として機能し音声を出力するスピーカ956を備える。
【0204】
図12(B)に、電子機器の1つである携帯型ゲーム装置960の外観図の例を示す。この携帯型ゲーム装置960は、入力部として機能する操作ボタン962、十字キー964や、画像出力部として機能しゲーム画像を表示するLCD966や、音出力部として機能しゲーム音を出力するスピーカ968を備える。
【0205】
図12(C)に、電子機器の1つであるパーソナルコンピュータ970の外観図の例を示す。このパーソナルコンピュータ970は、入力部として機能するキーボード972や、画像出力部として機能し文字、数字、グラフィック等を表示するLCD974、音出力部976を備える。
【0206】
本実施形態のクロック制御装置を図12(A)〜図12(C)の電子機器に組み込むことにより、低消費電力、かつ低コストな電子機器を提供することができる。
【0207】
なお、本実施形態を利用できる電子機器としては、図12(A)、(B)、(C)に示すもの以外にも、携帯型情報端末、ページャ、電子卓上計算機、タッチパネルを備えた装置、プロジェクタ、ワードプロセッサ、ビューファインダ型又はモニタ直視型のビデオテープレコーダ、カーナビゲーション装置、プリンタ等、種々の電子機器を考えることができる。
【0208】
なお、本発明は本実施形態に限定されず、本発明の要旨の範囲内で種々の変形実施が可能である。
【0209】
また、本実施形態では、CPUコア或いはキャッシュ装置に供給される基準クロックを停止させるようにしていたが、これに限定されるものではない。例えば、プログラマブル・ウェイト・コントローラ(広義には、クロック制御装置)14によって生成されたクロック供給停止信号により、第2のクロックドライバ19からDMAC15或いはデバッグユニット16に供給される基準クロックを停止させるようにしてもよい。
【0210】
さらにまた、例えばCPUコア11がキャッシュ装置12をアクセスしてキャッシュミスが発生し、このキャッシュ装置12がアドレスをスヌープしてキャッシュのコヒーレンシを保つようにした場合、キャッシュ装置12のクロック停止期間はこのスヌープに要するクロック数を除いて設定するようにすれば、バススヌープ機能を有する場合にも容易に適用することが可能となる。
【0211】
また、キャッシュ装置12、プログラマブル・ウェイト・コントローラ14、DMAC15、デバッグユニット16における内部アドレスバスは、そのバス幅に限定されるものではない。
【0212】
さらにまた、本実施形態では、クロック供給停止信号をウェイト数に応じたクロック数分だけ停止させるようにしているが、内部構成によってはそのままウェイト数分だけ基準クロックを停止させるようにしてもよい。
【0213】
さらに、本実施形態のマイクロコンピュータを構成する各部(CPUコア、キャッシュ装置、DMAC、デバッグユニットなど)ごとにクロック供給を停止させるクロック数を、アクセスされるアドレス領域ごとに図2又は図9に示したウェイト制御テーブルに記憶させるようにしてもよい。これにより、マイクロコンピュータを構成する各部の動作タイミングによって決まる最適な消費電力制御が、非常に簡素な構成で実現することができる。
【図面の簡単な説明】
【図1】本実施形態のクロック制御装置を適用したマイクロコンピュータの構成の概要を示すブロック図である。
【図2】本実施形態におけるウェイト制御テーブルの一例を示す説明図である。
【図3】本実施形態のクロック制御装置を適用したプログラマブル・ウェイト・コントローラの構成要部を示すブロック図である。
【図4】本実施形態のプログラマブル・ウェイト・コントローラの動作タイミングの一例を示すタイミングチャートである。
【図5】本実施形態のプログラマブル・ウェイト・コントローラの動作タイミングの他の例を示すタイミングチャートである。
【図6】本実施形態のキャッシュ装置の構成の一例を示すブロック図である。
【図7】本実施形態のキャッシュ装置の動作タイミングの一例を示すタイミングチャートである。
【図8】本実施形態のマイクロコンピュータにおけるクロック供給停止動作タイミングの一例を示すタイミングチャートである。
【図9】本実施形態におけるウェイト制御テーブルの他の例を示す説明図である。
【図10】他の実施形態のマイクロコンピュータの構成の一例を示すブロック図である。
【図11】本実施形態の電子機器の構成の一例を示すブロック図である。
【図12】図12(A)、(B)、(C)は、種々の電子機器の外観図の例である。
【符号の説明】
10 マイクロコンピュータ
11 CPUコア
12 キャッシュ装置
13 CG
14 プログラマブル・ウェイト・コントローラ(クロック制御装置)
15 DMAC
16 デバッグユニット
17 原クロック信号線
18 第1のクロックドライバ
19 第2のクロックドライバ
20、21 基準クロック信号線
23 内部アドレスバス
24 外部アドレスバス
25 第1のメモリ装置
26 第2のメモリ装置
27 第3のメモリ装置
28 キャッシュヒット判定信号線
29 クロック供給停止信号線
35 DMA要求信号
36 DMAアクノリッジ信号[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a clock control device, a semiconductor integrated circuit device including the clock control device, a microcomputer, and an electronic apparatus.
[0002]
[Background Art and Problems to be Solved by the Invention]
2. Description of the Related Art Conventionally, microcomputers that control electronic devices (particularly portable electronic devices) such as PDAs and mobile communication terminals have been improved not only in circuit technology and process technology, but also in architecture and improved integration technology. Low power consumption is achieved.
[0003]
Such a microcomputer includes a CPU core that realizes performance and code size suitable for the application, and peripheral circuits (macro blocks such as a direct memory access circuit (DMA) and a memory control circuit) in which necessary functions are macroized in advance. ). Therefore, many of the microcomputers up to now can reduce the development man-hours and maintain the design quality, but have had to use the CPU core and the macro block as a block box. For this reason, when improving various performances of the microcomputer, it is difficult to change the inside of these cores and macro blocks.
[0004]
In particular, when improving the power consumption of an integrated microcomputer, it is often related to the architecture and circuit configuration of the CPU core and macro block, so the power consumption is reduced in parts other than the CPU core and macro block. It was necessary to plan.
[0005]
For example, the power consumption can be reduced most simply and efficiently by stopping a clock signal supplied to each unit dynamically or statically in a microcomputer.
[0006]
Or, for example, when a clock signal supplied to a given unit is stopped by a signal from the outside, or when a CPU operation is temporarily stopped by a HALT instruction executed by the CPU core, a cache device that does not require operation is used. In some cases, the supplied clock signal is stopped.
[0007]
In many microcomputers, in addition to the CPU core, a cache device (comprising a cache memory and a cache control device) and a memory control circuit are integrated.
[0008]
The cache device temporarily speeds up the access time of the memory circuit connected to the outside by temporarily buffering data accessed locally and locally by the CPU core.
[0009]
The memory control circuit has a memory interface function that performs complex memory control such as address decoding, DRAM RAS / CAS control, and refresh control in accordance with a directly connected memory device (ROM, SRAM, DRAM, etc.). Further, the memory control circuit includes a programmable wait controller (or a wait control device), and performs wait control of bus cycles necessary for data access performed on the memory device according to the address area. In this way, the microcomputer can be directly connected to a general-purpose memory device that stores data to be accessed, and the number of parts can be reduced, resulting in a reduction in cost.
[0010]
In a cache device incorporated in such a microcomputer, when a cache miss occurs, data is acquired by an external bus cycle issued by the memory control circuit to the memory device storing data corresponding to the corresponding address. Is done.
[0011]
However, during this time, although the CPU core is in a stalled state, it is necessary to restart the operation as soon as data is acquired by the external bus cycle, so the clock signal supplied to the CPU core has not been stopped. . Therefore, wasteful power is consumed even when the CPU core is in a stalled state.
[0012]
The present invention has been made in view of the technical problems as described above, and an object of the present invention is to provide a clock signal supplied to each part in a stalled state that occurs during data access without causing performance degradation. To provide a clock control device, a semiconductor integrated circuit device including the clock control device, a microcomputer, and an electronic device that effectively and simply reduce power consumption.
[0013]
[Means for Solving the Problems]
In order to solve the above-mentioned problems, the present invention provides a clock control device for controlling a clock signal supplied to a given circuit, the means for receiving an address accessed by the given circuit, and the address And a means for outputting to the given circuit a clock supply stop signal for stopping the supply of the clock signal by the number of clocks corresponding to the address area specified by.
[0014]
According to the present invention, in the clock control device, the clock supply stop signal for stopping the clock signal for the given circuit is stopped by the number of clocks corresponding to the address area specified by the address accessed by the given circuit. Was generated as follows. As a result, even if a stall occurs due to data access with different access times depending on the address area, the clock supply can be stopped for a given number of clocks, reducing the data processing capacity as before. Therefore, the power consumption can be reduced effectively and simply.
[0015]
The present invention also provides a clock control device for controlling a clock signal supplied to a cache device and a given circuit that accesses the cache device, the address being accessed by the given circuit, and based on the address And a means for receiving the cache miss signal determined in response, and supplying the cache miss signal to at least one of the given circuit and the cache device by the number of clocks corresponding to the address area specified by the address when the cache miss signal is received. And a means for outputting a clock supply stop signal for stopping the clock signal.
[0016]
According to the present invention, when a cache miss occurs due to data access to the cache device, the clock controller stops the clock supply stop signal for stopping the clock signal for the given circuit by the address accessed by the given circuit. One of the given circuits or the cache device described above is generated so as to be stopped by the number of clocks corresponding to the specified address area. As a result, the clock supply could not be stopped because it is unknown when the data will be returned even if it is in a stall state when a cache miss occurs, but the clock supply is stopped for a given number of clocks. Therefore, it is possible to effectively and simply reduce the power consumption in the stalled state without reducing the data processing capacity as in the prior art.
[0017]
The clock control device according to the present invention includes means for storing a given number of waits corresponding to an address area, and the number of clocks according to the number of waits stored corresponding to the address area specified by the address A clock supply stop signal for stopping the supply of the clock signal by the amount is output.
[0018]
By doing so, it is possible to accurately control the number of clocks for stopping the clock supply, and thus it is possible to realize more effective power consumption reduction and cost reduction.
[0019]
The present invention also includes a wait control device for storing the number of waits for accessing the data stored in the memory device corresponding to the address area to be accessed, and includes a cache device and a given circuit for accessing the cache device. A clock control device for controlling a clock signal supplied to the device, wherein the cache circuit is configured to receive an address accessed by the given circuit and a cache miss signal determined based on the address; When received, the memory device storing the data corresponding to the address is accessed based on the number of waits corresponding to the address area specified by the address, and the number of waits stored corresponding to the address area is set. At least the given circuit and the cache device by the number of clocks according to Characterized in that it comprises a said clock signal supplied to one and means for outputting the clock supply stopping signal for stopping.
[0020]
According to the present invention, the number of clocks to be stopped when a cache miss occurs is determined from the number of waits set by the wait control device often used for data access. Effective power consumption can be reduced without providing an additional circuit.
[0021]
The clock control device according to the present invention is characterized in that it includes a weight number varying means for varying the stored number of waits. In this way, even when the access time associated with data access is changed by software control such as the OS, it is possible to perform power consumption control with high accuracy with a simple configuration.
[0022]
A semiconductor integrated circuit device according to the present invention includes any one of the clock control devices described above.
[0023]
A microcomputer according to the present invention includes at least the clock control device according to any one of the above, the given circuit, a CPU, and the cache device accessed by the given circuit or the CPU. It is characterized by.
[0024]
A microcomputer according to the present invention includes at least the clock control device according to any one of the above, a CPU as the given circuit, and the cache device accessed by the CPU.
[0025]
In the microcomputer according to the present invention, the given circuit is a DMA for generating the address.
[0026]
Here, as a given circuit, address data is output by performing data access, and a CPU that may be in a stalled state due to access time required at that time, or a bus master such as DMA that cannot access data during that period. I tried to think. As a result, it is possible to inexpensively provide a microcomputer that can reduce power consumption by an effective and simple method in a stalled state that occurs during data access.
[0027]
The microcomputer according to the present invention further includes means for storing the number of waits for each given peripheral circuit, and the peripheral circuit is provided for each peripheral circuit by the number of clocks corresponding to the stored number of waits. A clock supply stop signal for stopping the supply of the supplied clock signal is output.
[0028]
In this way, the number of clocks to be stopped is set for each peripheral circuit that constitutes the microcomputer, so that optimum power consumption control determined by the operation timing of each part constituting the microcomputer is realized with a very simple configuration. can do.
[0029]
An electronic apparatus according to the present invention comprises any one of the microcomputers described above, data input means to be processed by the microcomputer, and output means for outputting data processed by the microcomputer. It is characterized by including. Thus, an electronic device with low power consumption and low cost can be provided.
[0030]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.
[0031]
1. Outline of the configuration of the microcomputer of the present embodiment
FIG. 1 shows an outline of the configuration of a microcomputer to which the clock control device of this embodiment is applied.
[0032]
The
[0033]
In this embodiment, a direct memory access controller (DMAC) 15 and a
[0034]
The
[0035]
The
[0036]
The
[0037]
The
[0038]
Each of the
[0039]
The
[0040]
The
[0041]
The
[0042]
The
[0043]
The
[0044]
On the other hand, when the
[0045]
Further, when the
[0046]
Further, the
[0047]
The programmable wait controller (clock controller in a broad sense) 14 performs wait control necessary for a bus cycle issued for accessing data for each given address area. Here, the
[0048]
The
[0049]
An
[0050]
The first to
[0051]
Next, the operation of the
[0052]
The
[0053]
Here, the cache hit determination signal is generated by the
[0054]
When the
[0055]
The clock supply stop signal is supplied to the
[0056]
Furthermore, the clock supply stop signal generated by the
[0057]
FIG. 2 shows an example of a weight control table for performing weight control by the
[0058]
This wait control table 40 has the number of
[0059]
When a cache miss occurs, the
[0060]
At this time, the
[0061]
Thus, when a cache miss occurs, it is not possible to stop the clock signal of the CPU core or the like that has been in a stalled state because it is unclear when data will be returned. In contrast, in this embodiment, the clocks are stopped by the number of clocks corresponding to the number of waits set in the
[0062]
Hereafter, the principal part of the
[0063]
2. Clock control device of this embodiment
FIG. 3 shows a configuration main part of a programmable wait controller to which the clock control device of the present embodiment is applied.
[0064]
Here, the same parts as those of the
[0065]
The
[0066]
Here, eight sets of wait control registers are used, but the number of sets is not limited.
[0067]
First to eighth wait control register group 50 1 ~ 50 8 Includes a register group for determining an address area to be accessed based on address data supplied via the
[0068]
The
[0069]
The
[0070]
The wait number control counter 53 decrements the number of waits alternatively selected by the
[0071]
The zero
[0072]
The zero
[0073]
First to eighth wait number control register group 50 1 ~ 50 8 In each address area, the number of waits required for a bus cycle issued for accessing a plurality of externally connected memory devices is set.
[0074]
First wait number control register group 50 1 The wait number setting register 60 1 And comparison address setting register 61 1 And comparison address mask setting register 62 1 And address comparator 63 1 Including.
[0075]
Second to eighth wait number control register group 50 2 ~ 50 8 Is the first wait number control register group 50 1 It has the same configuration as
[0076]
Wait number setting register 60 1 ~ 60 8 Is set to the number of waits corresponding to the address area set for each wait control register group.
[0077]
Comparison address setting register 61 1 ~ 61 8 Is set with address data corresponding to the head address of the address area.
[0078]
Comparison address mask setting register 62 1 ~ 62 8 Includes a comparison address setting register 61. 1 ~ 61 8 A mask value corresponding to the area size of the address area from the head address set by is set.
[0079]
Address comparator 63 1 ~ 63 8 The address data input via the
[0080]
For example, the first wait control register group 50 1 In addition, when 3 weights are set in the 64 KB (kilobyte) address area from the address “A00000000H” to the address “A000FFFFH” as shown in FIG.
[0081]
Wait number setting register 60 1 Is set to the number of waits “3”.
[0082]
Comparison address setting register 61 1 Is set with 32-bit hexadecimal data “A000xxxxH” (where “x” is arbitrary 4-bit data).
[0083]
Comparison address mask setting register 62 1 Is set with 32-bit hexadecimal data “0000FFFFH”.
[0084]
When the 32-bit address data is supplied via the
[0085]
Address comparator 63 1 ~ 63 8 As described above, each of the comparison address setting registers 61 1 ~ 61 8 And the address data on the
[0086]
In this way, the address comparator 63 1 ~ 63 8 Each of them is determined to be an address area set in its own wait control register group when all the bits of the supplied address data match. On the other hand, when even one bit does not match, it is determined that the address area is not set in the own wait control register group. This discrimination result is obtained as an address area discrimination signal 56. 1 ~ 56 8 Is output to the
[0087]
The
[0088]
Here, the set value of each address of each wait control register group is controlled by software (OS or the like) so that the address areas by each wait control register group do not overlap.
[0089]
A
[0090]
The
[0091]
Note that the
[0092]
The number of waits in the wait number setting register thus selected by the
[0093]
The number of waits input to the wait
[0094]
When the zero
[0095]
When it is detected by the zero
[0096]
Whether or not the decrement result is “0” is again detected by the zero
[0097]
In this way, by detecting whether the count value of the wait
[0098]
The counter value controlled by the wait
[0099]
FIG. 4 shows an example of the operation timing of the
[0100]
In the following, a case where the number of waits is “0” at the operation timing in the two-phase non-overlapping clock system is shown.
[0101]
Here, the two-phase non-overlapping clock system is a system in which the clock system is configured by non-overlapping two-phase clocks called PH1 and PH2. Thus, the flip-flop for synchronizing the sequential circuit can be a transparent (transparent data type) latch, and the circuit configuration of the flip-flop can be reduced.
[0102]
Further, it is assumed that the external bus cycle of the
[0103]
That is, as shown in FIG. 4, when the number of waits is “0”, the bus cycle is a clock cycle T defined by PH1 and PH2 that do not overlap each other. 0 , T 1 Consists of
[0104]
In the microcomputer of this embodiment, the clock cycle T 0 Address data is output in synchronism with PH1 and a bus cycle is started.
[0105]
At the same time, the first to eighth wait control register groups 50 of the
[0106]
Address comparator 63 1 ~ 63 8 Then, as described above, the address area is determined. The result is the clock cycle T as the address
[0107]
The
[0108]
As described above, control is performed so that each wait control register group does not output an address area determination result indicating that the address area is determined by the same address by software. However, the priority circuit automatically determines a plurality of address area determination results. Even when it is determined as an address area set in the register group, it is desirable to select only the register group having the highest priority.
[0109]
The number of waits thus selected is input to the wait
[0110]
The number-of-
[0111]
Whether or not the counter value set in the wait
[0112]
Zero
[0113]
Therefore, the clock cycle T 2 Thereafter, the next bus cycle is newly started.
[0114]
FIG. 5 shows another example of the operation timing of the
[0115]
In the following, a case where the number of waits is “N (N is a natural number)” at the operation timing in the two-phase non-overlapping clock system similar to FIG.
[0116]
That is, as shown in FIG. 5, when the number of waits is “N”, the bus cycle is a clock cycle T defined by PH1 and PH2 that do not overlap each other. 0 , T N + 1 Consists of
[0117]
Clock cycle T 0 The address data is output in synchronization with PH1 of the memory and the bus cycle is started. At the same time, the
[0118]
Address comparator 63 1 ~ 63 8 Then, as described above, the address area is determined, and the address
[0119]
The
[0120]
The number-of-
[0121]
Whether or not the counter value set in the wait
[0122]
Zero
[0123]
Here, since the counter value set in the wait
[0124]
The wait number control counter 53 decrements the counter value in synchronization with PH1 every clock cycle.
[0125]
Therefore, the clock cycle T 2 The counter value is set to “N−1” in synchronization with PH1 (counter value 90).
[0126]
Every time the counter value is updated, it is detected by the zero
[0127]
Clock cycle T 2 Also, since the counter value set in the wait
[0128]
In the same manner, the process is repeated until CNT becomes “0”.
[0129]
As a result, clock cycle T N + 1 At PH1, the wait number control counter 53 sets “0” as the counter value CNT (counter value 92).
[0130]
Whether or not the counter value set in the wait
[0131]
Zero
[0132]
The wait number control counter 53 decrements the counter value in synchronization with PH1 every clock cycle, and each time the counter value is updated, it is detected by the zero
[0133]
Here, since “0” is detected, the external bus cycle controlled by the external bus cycle generation unit (not shown) is terminated, and the counting operation beyond that is stopped.
[0134]
Clock cycle T N + 2 As for the clock supply stop signal, the clock supply stop signal of logic level “H” is reset (reset 94).
[0135]
That is, here, the clock supply stop signal is generated as follows.
[0136]
If the clock supply stop signal is instructed to stop the clock supply when the logic level of the clock supply stop signal is “H”, when the counter value decremented by the wait
[0137]
By doing so, the zero
[0138]
By the way, the clock supply stop signal is set to the logic level “H” when the address area is determined on the assumption that the way and the cycle are always required when the address area is determined, and the zero
[0139]
In this case, the clock supply stop signal is the clock cycle T 1 Becomes a logic level “H” in synchronization with PH1 of the clock cycle T N + 2 The logic level becomes “L” in synchronization with PH1.
[0140]
Furthermore, as a reset timing, when the counter value becomes “1” or “2” instead of “0”, the clock supply stop signal is set to the logic level “L”, so that the clock supply restart is slightly advanced. It is also possible.
[0141]
The generation timing of such various clock supply stop signals depends on the operation timing of each part of the microcomputer, and is not limited to this generation timing.
[0142]
In short, it is only necessary that the
[0143]
3. Microcomputer of this embodiment
Next, the clock supply stop operation in the microcomputer of this embodiment will be specifically described.
[0144]
Therefore, first, the configuration and operation timing of the cache device that supplies the cache hit determination signal to the programmable wait controller (clock controller in a broad sense) 14 according to the present embodiment will be described, and then the clock according to the present embodiment. The supply stop operation will be described.
[0145]
(1) Configuration example of cache device
FIG. 6 shows an example of the configuration of the
[0146]
Here, it is assumed that the
[0147]
The
[0148]
Comparator 100 0 , 100 1 Are the upper bits of the address data and the tag RAM read / write control circuit 102 0 , 102 1 Is compared with the tag address data read out by, and the comparison result is compared with the tag comparison result 112. 0 , 112 1 To the
[0149]
At that time, the comparator 100 0 , 100 1 The comparison result is determined to match only when the Valid bit indicating whether or not each entry of the tag array is valid is “1”.
[0150]
Tag RAM read / write control circuit 102 0 , 102 1 Are tag arrays 104 identified by the middle bits of the address data, respectively. 0 , 104 1 For each of these entries, reading and writing control of the upper bits of the address data are performed, and a valid bit indicating a valid entry is controlled.
[0151]
Tag array 104 0 , 104 1 Stores as many upper bits of the address data as the number of entries specified by the middle bits.
[0152]
Data RAM read / write control circuit 106 0 , 106 1 Are data arrays 108 respectively identified by the middle bits of the address data. 0 , 108 1 For each entry, read and write control of one line of cache data is performed.
[0153]
Data array 108 0 , 108 1 Stores one line size data corresponding to the address data by the number of entries specified by the middle bit of the address data.
[0154]
[0155]
Here, it is assumed that 32-
[0156]
The upper 21
[0157]
The middle 8
[0158]
The lower 3
[0159]
Comparator 100 0 , 100 1 Tag array 104 0 , 104 1 From the Valid bits read from the entry specified by the middle 8
[0160]
The
[0161]
Further, the
[0162]
Here, if the data bus is 32 bits, only the most significant 1 bit of the lower 3
[0163]
The cache hit determination signal is a tag comparison result 112. 0 , 112 1 Is output to the
[0164]
FIG. 7 shows an example of the operation timing of the
[0165]
Here, the operation timing in the case of a cache hit is shown as the operation timing in the two-phase non-overlap clock system.
[0166]
That is, as shown in FIG. 0 When the address data ADR1 is output in synchronization with PH1 of the tag RAM, the tag RAM read / write control circuit 102 of the
[0167]
Result of tag comparison 112 0 , 112 1 The cache hit determination signal obtained by performing an OR operation on the clock cycle T 0 Is output in synchronization with PH2.
[0168]
If the address data ADR1 has a cache hit, the tag comparison result 112 is stored in the
[0169]
Subsequently, clock cycle T 1 When the address data ADR2 is output in synchronization with PH1 of the tag RAM, the tag RAM read / write control circuit 102 of the
[0170]
In the same manner, the cache hit determination signal and Data2 corresponding to the cache hit address data ADR2 are clock cycles T 0 Is output in synchronization with PH2.
[0171]
(2) Clock supply stop operation timing
Next, the clock supply stop operation timing in the microcomputer of the present embodiment including the
[0172]
FIG. 8 shows an example of the clock supply stop operation timing in the microcomputer of this embodiment.
[0173]
Here, it is assumed that the clock supply stop signal is generated in synchronization with the address area determination signal and PH1, and reset in synchronization with the zero detection signal and PH1. Depends on computer configuration. The point is to generate a clock supply stop signal for stopping at least the reference clock supplied to the CPU core or the
[0174]
Further, the
[0175]
Clock cycle T 0 Address data ADR1 output in synchronism with PH1 of the
[0176]
As described with reference to FIG. 0 The hit data Data1 is output at PH2.
[0177]
Subsequently, clock cycle T 1 Address data ADR2 output in synchronization with PH1 of the
[0178]
Along with this, the
[0179]
That is, the external address bus has clock cycle T 1 In synchronization with PH1, the memory address (2a) corresponding to ADR2 is output to fill the 32-bit data, and then the memory address (2b) is output to fill the other 32-bit data. As described above, data of one line size of 64 bits is filled by two bus cycles.
[0180]
Here, assuming that ADR2 is, for example, an address “A0000000H”, a clock cycle T 1 In synchronism with PH2, the address area discrimination result is a logic level “H” indicating coincidence. In accordance with this, as shown in FIG. 2, the clock number “3” corresponding to the address area from the address “A000000H” to the address “A000FFFFH” is read.
[0181]
Subsequently, the clock supply stop signal is set to the logic level “H” at PH1 of the clock cycle T2 in synchronization with the address area determination result and PH1, as described above, and the counter of the
[0182]
This counter value is decremented and updated with PH1 of each clock cycle.
Clock cycle T Five When the counter value CNT is updated to “0” at PH1, the zero
[0183]
Since the clock supply stop signal is reset in synchronization with the zero detection signal and PH1 as described above, the clock cycle T 6 The logic level becomes “L” at PH1.
[0184]
Therefore, the clock cycle T during which the clock supply stop signal is at the logic level “H”. 2 To clock cycle T Five In the meantime, in the
[0185]
And clock cycle T 6 Then, the operation stop of the reference clock of the
[0186]
As a result, the desired access data is transferred from the externally connected memory device to the data bus by the external bus cycle in which the wait cycle is inserted according to the number of waits stored in the wait control table of the
[0187]
In this way, the clock cycle T Five ~ T 6 The external data output from the externally connected memory device is filled as part of one line data of the tag address corresponding to ADR2 of the
[0188]
Then clock cycle T 6 Thereafter, an external bus cycle is issued by the memory address (2b) for filling other data of one line data of the tag address corresponding to ADR2.
[0189]
As described above, in the present embodiment, in the
[0190]
In the microcomputer according to the present embodiment, referring to the number of waits set in the wait control table of the
[0191]
For example, the number of clocks for stopping clock supply may be set in the wait control table shown in FIG.
[0192]
FIG. 9 shows another example of a weight control table for performing weight control by the
[0193]
This wait control table 180 has an external bus cycle necessary for accessing a memory device storing access data for each
[0194]
When the programmable wait controller accesses any address in the address area from the address “A0000000H” to the address “A000FFFFH”, for example, when a cache miss occurs, the address area determined A given external bus cycle in which the number of waits corresponding to “3” is waited is issued.
[0195]
At this time, the
[0196]
4). Configuration example of microcomputer of other embodiment
In this embodiment, when a cache miss occurs from the cache device, a programmable weight controller that generates a clock supply stop signal based on a wait control table for accessing an externally connected memory device (in a broad sense, It is conceivable that the function of the clock control device is included in another peripheral circuit.
[0197]
FIG. 10 shows an example of a hardware block diagram of a microcomputer according to another embodiment.
[0198]
The microcomputer 1700 includes the function of the clock control device of the present embodiment in the
[0199]
By incorporating the clock control device of this embodiment into a microcomputer, it is possible to provide a microcomputer that can reduce power consumption by an effective and simple method at low cost.
[0200]
5). Electronic device of this embodiment
FIG. 11 shows an example of a block diagram of the electronic apparatus of this embodiment. The electronic apparatus 800 includes a microcomputer (or ASIC) 810, an
[0201]
The microcomputer (or ASIC) 810 or the
[0202]
Here, the
[0203]
FIG. 12A illustrates an example of an external view of a
[0204]
FIG. 12B illustrates an example of an external view of a
[0205]
FIG. 12C illustrates an example of an external view of a
[0206]
By incorporating the clock control device of this embodiment into the electronic devices in FIGS. 12A to 12C, an electronic device with low power consumption and low cost can be provided.
[0207]
As electronic devices that can use this embodiment, in addition to those shown in FIGS. 12A, 12B, and 12C, a portable information terminal, a pager, an electronic desk calculator, a device including a touch panel, Various electronic devices such as a projector, a word processor, a viewfinder type or a monitor direct-view type video tape recorder, a car navigation device, and a printer can be considered.
[0208]
In addition, this invention is not limited to this embodiment, A various deformation | transformation implementation is possible within the range of the summary of this invention.
[0209]
In this embodiment, the reference clock supplied to the CPU core or the cache device is stopped. However, the present invention is not limited to this. For example, a reference clock supplied from the
[0210]
Furthermore, for example, when the
[0211]
Further, the internal address buses in the
[0212]
Furthermore, in this embodiment, the clock supply stop signal is stopped for the number of clocks corresponding to the number of waits, but the reference clock may be stopped for the number of waits as it is depending on the internal configuration.
[0213]
Further, the number of clocks for stopping the clock supply for each part (CPU core, cache device, DMAC, debug unit, etc.) constituting the microcomputer of this embodiment is shown in FIG. 2 or FIG. 9 for each address area to be accessed. The weight control table may be stored. Thereby, optimal power consumption control determined by the operation timing of each part constituting the microcomputer can be realized with a very simple configuration.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an outline of a configuration of a microcomputer to which a clock control device according to an embodiment is applied.
FIG. 2 is an explanatory diagram showing an example of a weight control table in the present embodiment.
FIG. 3 is a block diagram showing a main configuration part of a programmable wait controller to which the clock control device of the present embodiment is applied.
FIG. 4 is a timing chart showing an example of operation timing of the programmable wait controller of the present embodiment.
FIG. 5 is a timing chart showing another example of the operation timing of the programmable wait controller of the present embodiment.
FIG. 6 is a block diagram illustrating an example of a configuration of a cache device according to the present embodiment.
FIG. 7 is a timing chart illustrating an example of operation timing of the cache device according to the embodiment.
FIG. 8 is a timing chart showing an example of clock supply stop operation timing in the microcomputer of the present embodiment.
FIG. 9 is an explanatory diagram showing another example of the weight control table in the present embodiment.
FIG. 10 is a block diagram showing an example of the configuration of a microcomputer according to another embodiment.
FIG. 11 is a block diagram illustrating an example of a configuration of an electronic apparatus according to the present embodiment.
12A, 12B, and 12C are examples of external views of various electronic devices.
[Explanation of symbols]
10 Microcomputer
11 CPU core
12 Cache device
13 CG
14 Programmable wait controller (clock controller)
15 DMAC
16 Debug unit
17 Original clock signal line
18 First clock driver
19 Second clock driver
20, 21 Reference clock signal line
23 Internal address bus
24 External address bus
25 First memory device
26 Second memory device
27 Third memory device
28 Cache hit judgment signal line
29 Clock supply stop signal line
35 DMA request signal
36 DMA acknowledge signal
Claims (10)
前記所与の回路がアクセスするアドレスを受け付ける手段と、
前記アドレスによって特定されるアドレス領域ごとに、前記所与の回路がアクセスする際のストール期間に応じたウェイト数を記憶する手段と、
前記アドレスに対応して前記ウェイト数を記憶する手段に記憶されたウェイト数に対応したクロック数分だけ前記クロック信号の供給を停止するクロック供給停止信号を前記所与の回路に対して出力する手段と、
を含むことを特徴とするクロック制御装置。A clock controller for controlling a clock signal supplied to a given circuit,
Means for receiving an address to be accessed by the given circuit;
Means for storing a number of waits corresponding to a stall period when the given circuit accesses each address area specified by the address;
Means for outputting to the given circuit a clock supply stop signal for stopping supply of the clock signal by the number of clocks corresponding to the number of waits stored in the means for storing the number of waits corresponding to the address When,
A clock control apparatus comprising:
前記所与の回路がアクセスするアドレスと、前記アドレスに基づいて判定されたキャッシュミス信号とを受け付ける手段と、
前記アドレスによって特定されるアドレス領域ごとに、前記所与の回路がアクセスする際のストール期間に応じたウェイト数を記憶する手段と、
前記キャッシュミス信号を受け付けたとき、前記アドレスに対応して前記ウェイト数を記憶する手段に記憶されたウェイト数に対応したクロック数分だけ少なくとも前記所与の回路及び前記キャッシュ装置の一方に供給される前記クロック信号を停止するクロック供給停止信号を出力する手段と、
を含むことを特徴とするクロック制御装置。A clock control device for controlling a clock signal supplied to a cache device and a given circuit for accessing the cache device,
Means for receiving an address accessed by the given circuit and a cache miss signal determined based on the address;
Means for storing a number of waits corresponding to a stall period when the given circuit accesses each address area specified by the address;
When the cache miss signal is received, it is supplied to at least one of the given circuit and the cache device by the number of clocks corresponding to the number of waits stored in the means for storing the number of waits corresponding to the address. Means for outputting a clock supply stop signal for stopping the clock signal;
A clock control apparatus comprising:
前記ウェイト数を記憶する手段は、前記アドレス領域ごとに、キャッシュミス時にメモリにアクセスするためのウェイト数と、キャッシュヒット時にキャッシュ装置にアクセスするためのウェイト数とを記憶し、
前記キャッシュミス信号を受け付けたとき、前記キャッシュ装置にアクセスするために前記アドレスに対応して記憶されたウェイト数に応じたクロック数分だけ前記クロック信号の供給を停止するクロック供給停止信号を出力し、
前記キャッシュミス信号を受け付けたとき、前記メモリにアクセスするために前記アドレスに対応して記憶されたウェイト数に応じたクロック数分だけ前記クロック信号の供給を停止するクロック供給停止信号を出力することを特徴とするクロック制御装置。In claim 2,
The means for storing the number of waits stores, for each address area, the number of waits for accessing the memory at the time of a cache miss and the number of waits for accessing the cache device at the time of a cache hit,
When the cache miss signal is received, a clock supply stop signal is output to stop the supply of the clock signal by the number of clocks corresponding to the number of waits stored corresponding to the address in order to access the cache device. ,
When the cache miss signal is received, a clock supply stop signal for stopping the supply of the clock signal by the number of clocks corresponding to the number of waits stored corresponding to the address to access the memory is output. A clock control device.
前記記憶されるウェイト数を可変とするウェイト数可変手段を含むことを特徴とするクロック制御装置。In claim 3,
A clock control apparatus comprising: a weight number varying means for varying the stored number of waits.
前記所与の回路は前記アドレスを生成するDMAであることを特徴とするマイクロコンピュータ。In claim 6,
The microcomputer according to claim 1, wherein the given circuit is a DMA for generating the address.
所与の周辺回路ごとに前記ウェイト数を記憶する手段を有し、前記周辺回路に対して前記記憶されたウェイト数に応じたクロック数分だけ各周辺回路に供給されるクロック信号の供給を停止するクロック供給停止信号を出力することを特徴とするマイクロコンピュータ。In any of claims 6 to 8,
Means for storing the number of waits for each given peripheral circuit, and stopping the supply of the clock signal supplied to each peripheral circuit by the number of clocks corresponding to the stored number of waits for the peripheral circuit A microcomputer for outputting a clock supply stop signal to be output.
前記マイクロコンピュータの処理対象となるデータの入力手段と、
前記マイクロコンピュータにより処理されたデータを出力するための出力手段と、
を含むことを特徴とする電子機器。A microcomputer according to any one of claims 6 to 9,
Means for inputting data to be processed by the microcomputer;
Output means for outputting data processed by the microcomputer;
An electronic device comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000183494A JP3899784B2 (en) | 2000-06-19 | 2000-06-19 | Clock control device, semiconductor integrated circuit device, microcomputer and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000183494A JP3899784B2 (en) | 2000-06-19 | 2000-06-19 | Clock control device, semiconductor integrated circuit device, microcomputer and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2002006979A JP2002006979A (en) | 2002-01-11 |
JP3899784B2 true JP3899784B2 (en) | 2007-03-28 |
Family
ID=18684074
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000183494A Expired - Fee Related JP3899784B2 (en) | 2000-06-19 | 2000-06-19 | Clock control device, semiconductor integrated circuit device, microcomputer and electronic device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3899784B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPWO2007004323A1 (en) * | 2005-06-30 | 2009-01-22 | パナソニック株式会社 | Information processing device |
WO2009075102A1 (en) | 2007-12-13 | 2009-06-18 | Panasonic Corporation | Clock control device, clock control method, clock control program, and integrated circuit |
JP4966956B2 (en) * | 2008-12-22 | 2012-07-04 | 株式会社日立製作所 | Semiconductor device |
JP5485055B2 (en) * | 2010-07-16 | 2014-05-07 | パナソニック株式会社 | Shared memory system and control method thereof |
-
2000
- 2000-06-19 JP JP2000183494A patent/JP3899784B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2002006979A (en) | 2002-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6748507B2 (en) | Single-chip microcomputer with integral clock generating unit providing clock signals to CPU, internal circuit modules and synchronously controlling external dynamic memory | |
JP3136257B2 (en) | Computer memory interface device | |
JP2003228480A (en) | Interface device for image display device of pachinko game machine | |
JPH0628254A (en) | Personal computer having memory system provided with write through cache and with pipeline snoop cycle | |
IE990754A1 (en) | An apparatus for software initiated prefetch and method therefor | |
JP2734468B2 (en) | Processor | |
US5687131A (en) | Multi-mode cache structure | |
JP3899784B2 (en) | Clock control device, semiconductor integrated circuit device, microcomputer and electronic device | |
US6735683B2 (en) | Single-chip microcomputer with hierarchical internal bus structure having data and address signal lines coupling CPU with other processing elements | |
JP4490585B2 (en) | Processor or core logic unit with internal registers for peripheral status | |
JP2004318877A (en) | Intelligent waiting method | |
US7757046B2 (en) | Method and apparatus for optimizing line writes in cache coherent systems | |
JP3214613B2 (en) | Microprocessor and data processing system | |
US20050235100A1 (en) | Semiconductor integrated circuit device, microcomputer, and electronic equipment | |
JP2004287761A (en) | Semiconductor device, semiconductor circuit, electronic device, and clock supply control method | |
JP2007087416A (en) | Single-chip data processor | |
JP3962923B2 (en) | Semiconductor device, semiconductor circuit, electronic device, and clock supply control method | |
JP4645840B2 (en) | Integrated circuit device, microcomputer and electronic device | |
US7363465B2 (en) | Semiconductor device, microcomputer, and electronic equipment | |
JP4448917B2 (en) | Semiconductor integrated circuit device, data processing device, and microcomputer | |
JP2006285760A (en) | Integrated circuit device, microcomputer and electronic device | |
JPH0212358A (en) | Data transfer system | |
JP2002108702A (en) | Microcomputer and data processing device | |
JP2001306394A (en) | Cache device, semiconductor integrated circuit device, microcomputer, and electronic device | |
JP2006285761A (en) | Integrated circuit device, microcomputer and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060322 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060522 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20060522 |
|
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: 20061205 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20061218 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 3899784 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100112 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110112 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110112 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120112 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120112 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130112 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130112 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140112 Year of fee payment: 7 |
|
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 |