JP2007188137A - Microprocessor - Google Patents
Microprocessor Download PDFInfo
- Publication number
- JP2007188137A JP2007188137A JP2006003438A JP2006003438A JP2007188137A JP 2007188137 A JP2007188137 A JP 2007188137A JP 2006003438 A JP2006003438 A JP 2006003438A JP 2006003438 A JP2006003438 A JP 2006003438A JP 2007188137 A JP2007188137 A JP 2007188137A
- Authority
- JP
- Japan
- Prior art keywords
- wait
- cpu
- prefetch
- upper limit
- limit value
- 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.)
- Withdrawn
Links
Images
Landscapes
- Advance Control (AREA)
- Executing Machine-Instructions (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
本発明は、命令コードもしくはデータの先読み機能を有するマイクロプロセッサに関する。 The present invention relates to a microprocessor having an instruction code or data prefetching function.
近年、マイクロプロセッサの高速化はめざましく、主記憶装置として使用される外部メモリとマイクロプロセッサとの動作周波数の差は広がる傾向にある。このため、外部メモリへのアクセスがマイクロプロセッサの性能に大きな影響を与えないようキャッシュメモリを内蔵もしくは付加する機構を備え、命令コードおよびデータをキャッシュメモリに先読み(プリフェッチ)する機能を有したマイクロプロセッサが主流になっている。しかし、こうしたマイクロプロセッサでは、キャッシュメモリにプリフェッチされていない命令またはデータへのアクセス(キャッシュミスヒット)が発生すると、キャッシュメモリの書き換え(リロード)が必要となるため、場合によっては、処理性能が大幅に低下する。このようなキャッシュミスヒットは、ジャンプ命令やサブルーチンコール命令などで発生する確率が高く、このため、これらの命令をあらかじめ検出してキャッシュメモリへのプリフェッチを制御する方法(例えば、「特許文献1」および「特許文献2」を参照。)が開発されている。
In recent years, the speed of microprocessors has been remarkably increased, and the difference in operating frequency between an external memory used as a main storage device and the microprocessor tends to widen. Therefore, a microprocessor having a mechanism for incorporating or adding a cache memory so that access to the external memory does not greatly affect the performance of the microprocessor, and having a function of prefetching instruction codes and data into the cache memory. Has become mainstream. However, in such a microprocessor, when an instruction or data that has not been prefetched to the cache memory (cache miss hit) occurs, the cache memory needs to be rewritten (reloaded). To drop. Such a cache miss hit has a high probability of occurring in a jump instruction, a subroutine call instruction, or the like. For this reason, a method of detecting these instructions in advance and controlling prefetch to the cache memory (for example, “
一方、マイクロプロセッサは、ソフトウェアのバージョンアップにより機能追加などに柔軟に対応できるので、ゲーム機や家電製品から通信装置や情報処理装置に至るまであらゆる機器のコントローラとして採用されるようになっている。このため、このような応用では、マイクロプロセッサが実装されるシステムにおいて、主記憶装置をはじめとするメモリ構成やメモリ空間に割り付けられる入出力装置の構成をあらかじめ想定しておくことは非常に困難であるという問題があった。例えば、メモリ空間内に主記憶とは別にEEPROMなどのウェイトサイクル数が多い低速な外部メモリが割り付けられた場合に、EEPROMにアクセスする時だけプリフェッチ機能を選択的に停止するなどの制御が望ましい。しかし、このような構成は、特定のユーザ仕様に基づくシステム固有のものであり、EEPROMが割り付けられるアドレスもあらかじめ固定されているとは限らない。したがって、従来のマイクロプロセッサでこれに対応するためには外部に特別な制御機構をシステムごとに用意する必要があった。 On the other hand, since microprocessors can flexibly cope with function additions by software upgrades, they have been adopted as controllers for all devices ranging from game machines and home appliances to communication devices and information processing devices. Therefore, in such an application, it is very difficult to assume in advance a memory configuration including a main storage device and a configuration of an input / output device allocated to a memory space in a system in which a microprocessor is mounted. There was a problem that there was. For example, when a low-speed external memory having a large number of wait cycles, such as an EEPROM, is allocated in the memory space in addition to the main memory, control such as selectively stopping the prefetch function only when accessing the EEPROM is desirable. However, such a configuration is unique to the system based on a specific user specification, and the address to which the EEPROM is allocated is not always fixed in advance. Therefore, in order to cope with the conventional microprocessor, it is necessary to prepare a special control mechanism for each system.
すなわち、命令コードもしくはデータの先読み機能を有する従来のマイクロプロセッサには、それが実装されるシステム固有のメモリ構成や入出力装置の構成に最適なプリフェッチ制御を行えないという問題があった。
本発明は、システム固有のメモリ構成や入出力装置の構成に最適なプリフェッチ制御を行うことができるマイクロプロセッサを提供する。 The present invention provides a microprocessor capable of performing prefetch control optimal for a system-specific memory configuration and input / output device configuration.
本発明の一態様によれば、CPUがデータまたは命令コードを読み出すために必要なウェイトサイクル数を生成するウェイト数生成手段と、前記CPUのプリフェッチを許す前記ウェイトサイクル数の上限を示すウェイト上限値を保持する保持手段と、前記ウェイト数生成手段からの前記ウェイトサイクル数および前記保持手段からの前記ウェイト上限値を比較判定し、当該判定結果に基づいて前記CPUのプリフェッチ機能を停止させるプリフェッチ禁止信号を出力する判定手段を有することを特徴とするマイクロプロセッサが提供される。 According to one aspect of the present invention, wait number generation means for generating the number of wait cycles necessary for the CPU to read data or instruction code, and a weight upper limit value indicating the upper limit of the number of wait cycles that allow the CPU to prefetch A prefetch prohibition signal for comparing and determining the number of wait cycles from the wait number generation unit and the upper limit value of the wait from the holding unit, and stopping the prefetch function of the CPU based on the determination result There is provided a microprocessor characterized by having a judging means for outputting.
本発明によれば、システム固有の多様なメモリ構成および入出力装置の構成に柔軟に対応してプリフェッチ機能を制御することができる。 According to the present invention, the prefetch function can be controlled flexibly corresponding to various memory configurations and input / output device configurations unique to the system.
以下、図面を参照しながら、本発明の実施例を説明する。 Embodiments of the present invention will be described below with reference to the drawings.
図1は、本発明の実施例1に係わるマイクロプロセッサを示す回路ブロック図である。ここでは、主に、キャッシュメモリに命令コードおよびデータを先読みする機能(以下、「プリフェッチ機能」という。)の制御にかかわる部分を示した。
FIG. 1 is a circuit block diagram showing a microprocessor according to
本発明の実施例1に係わるマイクロプロセッサは、命令コードに基づいて処理を行う中央演算処理装置11(以下、「CPU11」という。)、次に読み出す命令コードまたはデータのアドレスがCPU11から出力されるアドレスバス12、およびアドレスバス12上のアドレスに基づいてCPU11のプリフェッチ機能を制御するためのプリフェッチ禁止信号13を生成するプリフェッチ制御部14を備えている。
The microprocessor according to the first embodiment of the present invention outputs from the CPU 11 a central processing unit 11 (hereinafter referred to as “
CPU11の入力にはプリフェッチ制御部14からのプリフェッチ禁止信号13が入力され、CPU11のアドレス出力はアドレスバス12に接続され、プリフェッチ制御部14の入力にはアドレスバス12が接続されている。
A prefetch prohibiting signal 13 from the prefetch control unit 14 is input to the input of the
CPU11は、外部メモリ(図示していない。)から読み込んだ命令コードを解釈し、その結果に基づいて、その命令コードの実行に必要なデータのアドレスまたは次に実行する命令コードのアドレスをアドレスバス12へ出力する。
The
これらのアドレスは、次にCPU11が読み込むべき命令コードまたはデータのアドレスであり、そのアドレスがすでにプリフェッチされているアドレス範囲からはずれる場合(一般に「キャッシュミスヒット」と呼ばれる。)には、プリフェッチ制御部14がプリフェッチ禁止信号13を出力している場合を除いて、CPU11は、プログラム実行の継続を一時中断してそのアドレスが属する一連の命令コードまたはデータをデータバス(図示していない。)を介してキャッシュメモリへプリフェッチ(先読み)するよう動作する。
These addresses are the addresses of instruction codes or data to be read next by the
一方、プリフェッチ禁止信号13が出力されている場合は、CPU11は、上述したプリフェッチ動作を行わず、逐次動作を行う。すなわち、CPU11は、外部メモリからの命令コードまたはデータがデータバスを介して読み込み可能になるまで待機(ウェイト)する。
On the other hand, when the prefetch prohibition signal 13 is output, the
プリフェッチ制御部14は、図1に示したように、アドレスをデコードするアドレスデコーダ15、メモリ空間ごとのウェイトサイクル数16(以下、「ウェイト数16」という。)を保持するウェイト数設定レジスタ17、ウェイト数16の上限値(以下、「ウェイト上限値18」という。)を保持するウェイト上限値設定レジスタ19、およびウェイト数16とウェイト上限値18を比較判定する判定回路20を備えている。
As shown in FIG. 1, the prefetch control unit 14 includes an
アドレスデコーダ15の入力にはアドレスバス12が接続され、アドレスデコーダ15の出力はウェイト数設定レジスタ17の入力に供給されている。ウェイト数設定レジスタ17の出力はウェイト数16として判定回路20の第1の入力に供給され、ウェイト上限値設定レジスタ19の出力はウェイト上限値18として判定回路20の第2の入力に供給され、判定回路20の出力はプリフェッチ禁止信号13としてCPU11の入力に供給されている。
The address bus 12 is connected to the input of the
アドレスデコーダ15はFPGAで構成され、アドレスバス12上のアドレスとウェイト数設定レジスタ17との対応付けを行う。すなわち、アドレスデコーダ15は、あらかじめ設定されている対応付けに従って、そのアドレスに対応する選択信号をウェイト数設定レジスタ17へ出力する。
The
具体的な対応付けの一例は図2を用いて後述するが、これらは、電源投入時またはシステムリセット時に、CPU11がシステムプログラムに従ってFPGAを初期化することで設定される。
An example of specific association will be described later with reference to FIG. 2. These are set when the
ウェイト数16は、メモリ空間に実装される外部メモリまたは入出力装置の性能によって規定され、図2を用いて後述するように、分割されたメモリ空間ごとに設定される。 The number of waits 16 is defined by the performance of the external memory or input / output device mounted in the memory space, and is set for each divided memory space, as will be described later with reference to FIG.
ウェイト数設定レジスタ17は、ウェイト数16を保持する複数のレジスタで構成され、アドレスデコーダ15からの選択信号によってアドレスバス12上のアドレスに対応したウェイト数16を判定回路へ選択的に出力する。
The wait
ウェイト数設定レジスタ17が保持するそれぞれのウェイト数16は、電源投入時またはシステムリセット時に、システムプログラムに従ってCPU11によって設定される。
Each wait number 16 held by the wait
ウェイト上限値18はCPU11のプリフェッチ動作の停止を判定する基準値で、判定回路20は、この値に基づいて、外部メモリまたは入出力装置の性能に基づいたウェイト数設定レジスタ17からのウェイト数16を判定する。
The weight
ウェイト上限値設定レジスタ19はウェイト上限値を保持するレジスタで、この値は、電源投入時またはシステムリセット時に、システムプログラムに従ってCPU11によって設定される。
The wait upper limit
判定回路20は、ウェイト数設定レジスタ17からのウェイト数16とウェイト上限値設定レジスタ19からのウェイト上限値18とを比較し、ウェイト数16がウェイト上限値18を超えている場合にプリフェッチ禁止信号13を生成しCPU11へ出力する。
The
図2は、本発明の実施例1に係わるマイクロプロセッサにおける設定情報の一例を示すテーブルである。
本発明の実施例1に係わるマイクロプロセッサにおける設定情報は、分割されたメモリ空間を識別するメモリ空間番号、メモリ空間番号に対応するアドレス範囲、メモリ空間番号に対応するウェイト数16、およびウェイト上限値18を備えている。
FIG. 2 is a table showing an example of setting information in the microprocessor according to the first embodiment of the present invention.
The setting information in the microprocessor according to the first embodiment of the present invention includes a memory space number for identifying the divided memory space, an address range corresponding to the memory space number, a weight number 16 corresponding to the memory space number, and a weight upper limit value. 18 is provided.
CPU11のメモリ空間は、メモリ空間に割り付けられた外部メモリおよび入出力装置の種類や性能ごとに分割され、それぞれを識別するためにメモリ空間番号が付与されている。
The memory space of the
アドレス範囲は、外部メモリまたは入出力装置ごとに一連のアドレスが割り付けられる。例えば、図2に示したように、メモリ空間番号“1”にはアドレス範囲“0〜0FFFF番地”が対応し、メモリ空間番号“2”にはアドレス範囲“10000〜1FFFF番地”が対応し、メモリ空間番号“3”にはアドレス範囲“1FFFF〜2FFFF番地”が対応している。 In the address range, a series of addresses are assigned to each external memory or input / output device. For example, as illustrated in FIG. 2, the memory space number “1” corresponds to the address range “0 to 0FFFF”, the memory space number “2” corresponds to the address range “10000 to 1FFFF”, The memory space number “3” corresponds to the address range “addresses 1FFFF to 2FFFF”.
ウェイト数16は、それぞれのアドレス範囲に割り付けられた外部メモリまたは入出力装置の性能によって規定され、具体的には、CPU11がデータを読み込むためにリード信号を出力してから実際にそのデータをデータバスから読み込むことができるまでの待機時間をシステムクロック数で示したものである。
The number of waits 16 is defined by the performance of the external memory or input / output device assigned to each address range. Specifically, after the
例えば、図2に示したように、メモリ空間番号“1”ではウェイト数16は“0”であり、メモリ空間番号“2”ではウェイト数16は“5”であり、メモリ空間番号“3”ではウェイト数16は“20”となっている。 For example, as shown in FIG. 2, when the memory space number is “1”, the number of waits is “0”, and when the memory space number is “2”, the number of waits is 16 and the memory space number is “3”. The number of waits 16 is “20”.
これらは、それぞれ、SRAMなどの高速な主記憶、DRAMなどの低速な主記憶、およびEEPROMなどの2次記憶を想定して設定されたウェイト数16である。 These are the number of waits 16 set assuming high-speed main memory such as SRAM, low-speed main memory such as DRAM, and secondary storage such as EEPROM.
ウェイト上限値18は、図2では“8”に設定されている。これは、メモリ空間番号“1”および“2”の主記憶に対しては、CPU11のプリフェッチ動作を許可し、メモリ空間番号“3”の2次記憶に対しては、CPU11のプリフェッチ動作を停止させることを意味している。
The weight
次に、上述した構成を持つマイクロプロセッサの動作について説明する。
図3は、本発明の実施例1に係わるマイクロプロセッサにおける動作の一例を示すテーブルである。ここでは、図2の設定情報がアドレスデコーダ15、ウェイト数設定レジスタ17、およびウェイト上限値設定レジスタ19にあらかじめセットされているものとしてマイクロプロセッサの動作を説明する。
Next, the operation of the microprocessor having the above configuration will be described.
FIG. 3 is a table showing an example of the operation in the microprocessor according to the first embodiment of the present invention. Here, the operation of the microprocessor will be described assuming that the setting information of FIG. 2 is set in advance in the
図3に示したテーブルの第1欄はCPU11がアドレスバス12へ出力するアドレスを示し、第2欄はそのアドレスでの命令コードを示し、第3欄はそのアドレスが属するメモリ空間番号を示している。
The first column of the table shown in FIG. 3 shows the address that the
まず、CPU11は、“02000番地”で“ジャンプ1”命令を実行する。この時のメモリ空間番号は“1”である。そして、“ジャンプ1”命令によってCPU11の実行は“20000番地”へジャンプする。
First, the
次に、CPU11は、“20000番地”で“演算1”命令を実行する。この時のメモリ空間番号は“3”になる。そして、処理が進み、CPU11の実行は“20100番地”に到達する。“20100番地”では、CPU11は、“ジャンプ2”命令を実行し、“10000番地”へジャンプする。
Next, the
“10000番地”のメモリ空間番号は“2”である。すなわち、図3に示した動作では、メモリ空間番号は“1”→“3”→“2”と変化する。ここで注意することは、アドレスバス12へCPU11が出力するアドレスは次の命令コートのアドレスであることである。
The memory space number of “10000 addresses” is “2”. That is, in the operation shown in FIG. 3, the memory space number changes from “1” → “3” → “2”. Note that the address output by the
したがって、CPU11が“02000番地”で“ジャンプ1”命令を解釈実行する段階で次の“20000番地”がアドレスバス12へ出力され、アドレスデコーダ15は、メモリ空間番号“3”に対応する選択信号をウェイト数設定レジスタ17へ出力する。
Therefore, when the
図4は、本発明の実施例1に係わるマイクロプロセッサにおけるプリフェッチ禁止信号13の一例を示す波形図である。ここでは、図3に示した動作に従って生成されるプリフェッチ禁止信号13を時間軸で示している。 FIG. 4 is a waveform diagram showing an example of the prefetch inhibition signal 13 in the microprocessor according to the first embodiment of the present invention. Here, the prefetch prohibition signal 13 generated in accordance with the operation shown in FIG. 3 is shown on the time axis.
プリフェッチ禁止信号13は、“H”でCPU11のプリフェッチ動作を停止させる。すなわち、図4に示したように、メモリ空間番号“1”および“2”では、プリフェッチ禁止信号13は“L”であり、CPU11のプリフェッチ動作は許可される。また、メモリ空間番号“3”では、プリフェッチ禁止信号13は“H”であり、CPU11のプリフェッチ動作は停止される。
The prefetch inhibition signal 13 is “H” and stops the prefetch operation of the
図5は、本発明の実施例1に係わるマイクロプロセッサにおける詳細動作の一例を示すイメージ図である。ここでは、図3のメモリ空間番号“1”から“3”への遷移にかかわる動作を示した。 FIG. 5 is an image diagram showing an example of detailed operation in the microprocessor according to the first embodiment of the present invention. Here, the operation related to the transition from the memory space number “1” to “3” in FIG. 3 is shown.
図5の最上段はシステムクロック(CLK)の波形を示し、2番目の段はプリフェッチ禁止信号13を示し、3番目の段は命令コードの読み込みタイミングを示し、4番目の段はCPU11の内部動作タイミングを示し、最下段はCPU11が外部メモリへ出力するリード信号の波形を示している。
5 shows the waveform of the system clock (CLK), the second stage shows the prefetch inhibition signal 13, the third stage shows the instruction code read timing, and the fourth stage shows the internal operation of the
図5に示したように、アドレスがメモリ空間番号“3”に遷移すると、CPU11の動作は逐次処理となり、長い待機期間に無駄なリード動作は発生しない。これにより、たとえ分岐命令があっても分岐判定後にバスサイクルを起動するので、無駄なバスサイクルは発生せず、アドレスバス12およびデータバスの負荷が軽減される。
As shown in FIG. 5, when the address transitions to the memory space number “3”, the operation of the
重要なことは、設定情報をあらかじめプログラムによって設定しておくことができるので、ウェイト数設定レジスタ17およびウェイト上限値設定レジスタ19に適宜値をセットすることで、ユーザがシステム固有の構成に応じた最適なプリフェッチ制御を行うことができるということである。
Importantly, since the setting information can be set in advance by a program, the user can set the values in the number-of-
上記実施例1によれば、メモリ空間ごとにマイクロプロセッサのプリフェッチ機能が制御されるので、システム固有の多様なメモリ構成および入出力装置の構成に柔軟に対応することができる。 According to the first embodiment, since the prefetch function of the microprocessor is controlled for each memory space, it is possible to flexibly cope with various memory configurations and input / output device configurations unique to the system.
また、上記実施例1によれば、メモリ空間ごとのウェイト数16およびアドレスとウェイト数設定レジスタ17との対応付けを電源投入時またはシステムリセット時にシステムプログラムによって設定するので、システム稼働後も必要に応じてCPU11のプリフェッチ制御を容易に変更することができる。
Further, according to the first embodiment, the number of waits 16 for each memory space and the correspondence between the address and the wait
さらに、上記実施例1によれば、ウェイト数16が大きい外部メモリまたは入出力装置に対して、CPU11は、キャッシュミスヒット時でもプリフェッチ動作を行わず待機状態であるので、無駄なバスサイクルは発生せず、アドレスバス12およびデータバスの負荷が軽減される。また、同時に、ブリフェッチ動作に必要なCPU11の負荷も軽減される。
Furthermore, according to the first embodiment, for the external memory or input / output device having a large number of waits 16, the
上述の実施例1では、アドレスデコーダ15は、構成の柔軟性を考慮してFPGAで構成するとしたが、本発明はこれに限られるものではなく、例えば、メモリ空間番号とアドレス範囲をあらかじめ固定しておき、それらの対応をロジック回路で構成することもできる。
In the first embodiment described above, the
また、上述の実施例1では、説明のためメモリ空間を3つに分割しそれぞれに外部メモリを割り当てたが、本発明はこれに限られるものではなく、原理的にはCPU11のメモリ空間に割り付けることができる任意の数の外部メモリおよび入出力装置に対応した構成とすることができる。
In the first embodiment, the memory space is divided into three and the external memory is assigned to each of them for the sake of explanation. However, the present invention is not limited to this, and in principle, the memory space is assigned to the memory space of the
図6は、本発明の実施例2に係わるマイクロプロセッサを示す回路ブロック図である。ここでは、主に、プリフェッチ機能の制御にかかわる部分を示した。
FIG. 6 is a circuit block diagram showing a microprocessor according to
本発明の実施例2に係わるマイクロプロセッサは、命令コードに基づいて処理を行うCPU61、および外部ウェイト信号62に基づいてCPU61のプリフェッチ機能を制御するためのプリフェッチ禁止信号63を生成するプリフェッチ制御部64を備えている。
The microprocessor according to the second embodiment of the present invention includes a
CPU61の入力にはプリフェッチ制御部64からのプリフェッチ禁止信号63が入力され、CPU61の出力はプリフェッチ制御部64の第1の入力に供給されている。また、プリフェッチ制御部64の第2の入力には、外部ウェイト信号62が入力されている。
A prefetch inhibition signal 63 from the prefetch control unit 64 is input to the input of the
CPU61の機能および動作は、リセット信号65の出力を除いて実施例1と同様であるので、詳しい説明は省略する。
Since the functions and operations of the
プリフェッチ制御部64は、図6に示したように、外部ウェイト信号62に同期してシステムクロック(以下、「CLK」という。)をカウントアップすることでウェイト数66を生成するウェイト数カウンタ67、ウェイト数66の上限値であるウェイト上限値68を保持するウェイト上限値設定レジスタ69、およびウェイト数66とウェイト上限値68を比較判定する判定回路70を備えている。
As shown in FIG. 6, the prefetch control unit 64 counts a system clock (hereinafter referred to as “CLK”) in synchronization with the
ウェイト数カウンタ67の第1の入力にはCPU61からのリセット信号65が入力され、ウェイト数カウンタ67の第2の入力には外部ウェイト信号62が入力されている。ウェイト数カウンタ67の出力はウェイト数66として判定回路70の第1の入力に供給され、ウェイト上限値設定レジスタ69の出力はウェイト上限値68として判定回路70の第2の入力に供給され、判定回路70の出力はプリフェッチ禁止信号63としてCPU61に供給されている。
A reset signal 65 from the
ウェイト数カウンタ67は、外部ウェイト信号62によってCLKのカウントアップを開始し、そのカウント数をウェイト数66として判定回路70へ出力する。また、ウェイト数カウンタ67は、CPU61からのリセット信号65によってカウントアップが停止され初期状態にリセットされる。
The wait number counter 67 starts counting up the CLK by the
CPU61は、プリフェッチ禁止信号63によってプリフェッチ動作を停止させられた後、データバスから次の命令コードまたはデータを読み込むとリセット信号65を出力する。
After the prefetch operation is stopped by the prefetch inhibition signal 63, the
ウェイト上限値設定レジスタ69および判定回路70の機能および動作は、実施例1と同様であるので説明は省略する。
Since the functions and operations of the wait upper
実施例2では、実施例1と異なり、外部ウェイト信号62が入力されている間はCPU61を待機状態にすることができる。したがって、外部メモリまたは入出力装置のウェイト数66があらかじめ固定されていない場合にも対応することができる。
In the second embodiment, unlike the first embodiment, the
上記実施例2によれば、外部メモリまたは入出力装置ごとにマイクロプロセッサのプリフェッチ機能が制御されるので、システム固有の多様な構成に柔軟に対応することができる。 According to the second embodiment, since the prefetch function of the microprocessor is controlled for each external memory or input / output device, it is possible to flexibly cope with various configurations unique to the system.
また、上記実施例2によれば、ウェイト上限値68を電源投入時またはシステムリセット時にシステムプログラムによって設定するので、システム稼働後も必要に応じてCPU61のプリフェッチ制御を容易に変更することができる。
Further, according to the second embodiment, the wait
さらに、上記実施例2によれば、外部メモリまたは入出力装置のアドレスに関係なくウェイト数66が生成されるので、システム稼働後に外部メモリおよび入出力装置のメモリ空間への割付を容易に変更することができる。 Further, according to the second embodiment, since the number of waits 66 is generated regardless of the address of the external memory or the input / output device, the allocation of the external memory and the input / output device to the memory space is easily changed after the system is operated. be able to.
さらに、上記実施例2によれば、ウェイト数66が可変の外部メモリまたは入出力装置に対して、CPU61は、キャッシュミスヒット時でもプリフェッチ動作を行わず待機状態であるので、無駄なバスサイクルは発生せず、アドレスバスおよびデータバスの負荷が軽減される。また、同時に、ブリフェッチ動作に必要なCPU61の負荷も軽減される。
Further, according to the second embodiment, for the external memory or input / output device having a variable number of waits 66, the
上述の実施例1および2では、説明を容易にするため、ウェイト数設定レジスタ17を用いる構成とウェイト数カウンタ67を用いる構成を別々に記述したが、本発明はこれに限られるものではなく、ウェイト数設定レジスタ17とウェイト数カウンタ67の両方を用いる構成にしても良い。
In the first and second embodiments described above, the configuration using the wait
11、61 CPU
12 アドレスバス
13、63 プリフェッチ禁止信号
14、64 プリフェッチ制御部
15 アドレスデコーダ
16、66 ウェイト数
17 ウェイト数設定レジスタ
18、68 ウェイト上限値
19、69 ウェイト上限値設定レジスタ
20、70 判定回路
62 外部ウェイト信号
65 リセット信号
67 ウェイト数カウンタ
11, 61 CPU
12 Address bus 13, 63 Prefetch prohibition signal 14, 64
Claims (5)
前記CPUのプリフェッチを許す前記ウェイトサイクル数の上限を示すウェイト上限値を保持する保持手段と、
前記ウェイト数生成手段からの前記ウェイトサイクル数および前記保持手段からの前記ウェイト上限値を比較判定し、当該判定結果に基づいて前記CPUのプリフェッチ機能を停止させるプリフェッチ禁止信号を出力する判定手段を有することを特徴とするマイクロプロセッサ。 Wait number generation means for generating the number of wait cycles necessary for the CPU to read data or instruction code;
Holding means for holding a weight upper limit value indicating an upper limit of the number of wait cycles allowing the CPU to prefetch;
A determination unit that compares and determines the number of wait cycles from the wait number generation unit and the upper limit value of the wait from the holding unit, and outputs a prefetch prohibition signal that stops the prefetch function of the CPU based on the determination result; A microprocessor characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006003438A JP2007188137A (en) | 2006-01-11 | 2006-01-11 | Microprocessor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006003438A JP2007188137A (en) | 2006-01-11 | 2006-01-11 | Microprocessor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007188137A true JP2007188137A (en) | 2007-07-26 |
Family
ID=38343289
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006003438A Withdrawn JP2007188137A (en) | 2006-01-11 | 2006-01-11 | Microprocessor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007188137A (en) |
-
2006
- 2006-01-11 JP JP2006003438A patent/JP2007188137A/en not_active Withdrawn
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7290393B2 (en) | game machine | |
US20080320280A1 (en) | Microprogrammed processor having mutiple processor cores using time-shared access to a microprogram control store | |
US7636812B2 (en) | Cache memory control method and cache memory control device | |
US6125440A (en) | Storing executing instruction sequence for re-execution upon backward branch to reduce power consuming memory fetch | |
CN101432691B (en) | Method and system for controlling timing in a processor | |
JP4635063B2 (en) | Cache memory control circuit and processor | |
WO2009098737A1 (en) | External device access apparatus, its controlling method and system lsi | |
JP2005018553A (en) | Memory interface circuit | |
KR100321745B1 (en) | A micro controller unit for external memory access | |
JP2007188137A (en) | Microprocessor | |
JP7290395B2 (en) | game machine | |
KR20050113499A (en) | Cache system having branch target address cache | |
KR100442290B1 (en) | A circuit for controlling program counter | |
JP2004094807A (en) | Instruction cache, microprocessor, and design method for same | |
JP7290394B2 (en) | game machine | |
JP4283226B2 (en) | Data processing device that performs instruction parallel processing depending on address range | |
JPH0683986A (en) | Single chip microcomputer | |
US7124281B1 (en) | Processing system having sequential address indicator signals | |
JP4343244B2 (en) | Microcomputer | |
JP2003337790A (en) | Bus control circuit and processor | |
JP4480787B2 (en) | Processor power control apparatus and power control method | |
JP2007128336A (en) | Parallel register access device and system lsi | |
JP2005056033A (en) | Register circuit | |
JP2006048258A (en) | Data processor | |
JP2005084712A (en) | Cache system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20081226 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090210 |
|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20090407 |