JPH01233537A - Information processor provided with cache memory - Google Patents

Information processor provided with cache memory

Info

Publication number
JPH01233537A
JPH01233537A JP63059345A JP5934588A JPH01233537A JP H01233537 A JPH01233537 A JP H01233537A JP 63059345 A JP63059345 A JP 63059345A JP 5934588 A JP5934588 A JP 5934588A JP H01233537 A JPH01233537 A JP H01233537A
Authority
JP
Japan
Prior art keywords
cache memory
information
address
data
selector
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.)
Pending
Application number
JP63059345A
Other languages
Japanese (ja)
Inventor
Toshiya Yoshida
俊哉 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP63059345A priority Critical patent/JPH01233537A/en
Publication of JPH01233537A publication Critical patent/JPH01233537A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To enlarge the degree of freedom of a utilization type of a cache memory and to improve the execution efficiency and the execution speed of a program by changing the constituting system and the capacity of the cache memory in accordance with the program to be executed. CONSTITUTION:In case of two ways, command information X, Y becomes '0' and '1', a control signal B becomes active, and an address of 9 bits of address information 7 is decoded by a decoder 5. By a decoded output, one entry is selected from cache memories 1a, 1b or cache memories 1c, 1d, given to the respective selectors 17a, 17c or 17b, 17d, and by selecting information of 2-3 bits of the address information 7, one set of data is selected against the respective selectors 17a, 17c. Subsequently, by a coincidence signal from comparators 15a-15c, one set of data is selected by a selector 23 and outputted through a selector 25.

Description

【発明の詳細な説明】 [発明の目的1 (産業上の利用分野) この発明は、キャッシュメモリを備えた情報処理装置に
関し、特に利用形態が変更されるキャッシュメモリを備
えた情報処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention 1 (Field of Industrial Application) The present invention relates to an information processing device equipped with a cache memory, and particularly relates to an information processing device equipped with a cache memory whose usage mode can be changed.

(従来の技術) 一コンピュータ・システムにおいて、CPUのサイクル
タイムと主記憶のアクセス時間の差を埋めるために、両
者の間に高速なキャッシュメモリが置かれることがある
。キャッシュメモリは、CPUと主記憶との中間のレベ
ルに位置し、プログラムからは見えない存在となってい
る。
(Prior Art) In one computer system, a high-speed cache memory is sometimes placed between the CPU cycle time and the main memory access time in order to bridge the difference between the two. Cache memory is located at an intermediate level between the CPU and main memory, and is invisible to programs.

このようなキャッシュメモリは、初めは汎用の大型コン
ピュータに使用されていたが、現在ではマイクロコンピ
ュータにも使われはじめている。
This kind of cache memory was first used in general-purpose large computers, but now it is also beginning to be used in microcomputers.

最近のマイクロプロセッサでは、プロセッサが形成され
たと周一のチップ上にキャッシュメモリが形成されて、
オンチップ化されたものがある。
In modern microprocessors, the processor is formed and the cache memory is formed on the chip of Shuichi.
Some are on-chip.

このようなオンチップ化されたキャッシュメモリにあっ
て、その構成方式は、例えば文献「プロセッサMC68
020(モトローラ社製)のユーザーズマニュアル、第
7章、P2Jや、[クリッパー・セミナー・テキスト(
フェアチャイルド社)、P45J等に記載されているよ
うに、様々なものがある。例えば、セット・アソシアテ
ィブ(S6t  A 5sociative)方式で構
成されたものであっても、主記憶と対応づけるために分
割された単位(ライン)の大きさヤウエイ数が異なるも
のがある。
The configuration method of such an on-chip cache memory is described, for example, in the document "Processor MC68
020 (manufactured by Motorola) User's Manual, Chapter 7, P2J, [Clipper Seminar Text (
There are various types, as described in Fairchild Inc.), P45J, etc. For example, even if the memory is configured using the set associative (S6tA5sociative) method, there are some that have different sizes and numbers of divided units (lines) to be associated with the main memory.

また、オンチップ化されたキャッシュメモリにあっては
、その目的がデータ専用あるいは命令専用になっており
、プロセッサはデータ用のキャッシュ、命令用のキャッ
シュの一方あるいは両方を備えている。
Furthermore, an on-chip cache memory is used exclusively for data or instructions, and a processor is equipped with one or both of a data cache and an instruction cache.

このようなオンチップ化されたキャッシュメモリは、ユ
ーザによって使用されるか否かの選択が行なわれるよう
に構成されている。すなわち、オンチップ化されたキャ
ッシュメモリは、以下の文献が示すように、チップの外
部から与えられる外部信号あるいは、内部レジスタから
与えられる信号によって選択されるようになっている。
Such an on-chip cache memory is configured such that a user can select whether or not to use it. That is, as shown in the following document, an on-chip cache memory is selected by an external signal applied from outside the chip or a signal applied from an internal register.

(文献「プロセッサMC68020(モトローラ社製)
のユーザーズマニ5ユアル、第7章、P1〜P4」、r
7DtッサZ80.000CD技術マニユアル、第2章
、P4J、[プロセッサMC68030(モトローラ社
製)の半導体技術データ、P8」)。
(Reference “Processor MC68020 (manufactured by Motorola)
User's Manual 5, Chapter 7, P1-P4'', r
7Dt Sensor Z80.000CD Technical Manual, Chapter 2, P4J, [Semiconductor Technical Data for Processor MC68030 (manufactured by Motorola Corporation, P8)].

一方、キャッシュメモリの構成方式及び8石は、実行さ
れるプログラムに左右される。すなわち、容置を大きく
するにしたがって効果も増大するとは限らず、実行され
るそれぞれのプログラムによって最適な容itsが存在
する。例えば、取扱うデータ0が少ない場合であっても
、プログラムの規模が大きい場合には、データ・キャッ
シュよりも命令キャッシュの容量を大きくすることが望
まれる。
On the other hand, the configuration method and number of cache memories depends on the program being executed. That is, the effect does not necessarily increase as the capacity increases, and there are optimum capacities depending on each program to be executed. For example, even if there is only a small amount of data 0 to be handled, if the scale of the program is large, it is desirable to have a larger capacity for the instruction cache than for the data cache.

(発明が解決しようとする課題) しかしながら、従来のオンチップ化されたキャッシュメ
モリにあっては、その構成方式及び格納される情報の種
類に対する容量がプロセッサに応じて予め決められてい
た。このため、構成方式及び容量をプログラムに応じて
最適となるように変更することができなかった。
(Problems to be Solved by the Invention) However, in the conventional on-chip cache memory, its configuration method and capacity for the type of information stored are predetermined depending on the processor. For this reason, it has not been possible to optimally change the configuration method and capacity depending on the program.

しかるに、キャッシュメモリを用いたことによる効果を
十分に引き出すことができず、プロセッサの能力を十分
に発揮させることが困難であった。
However, it has been difficult to fully utilize the effects of using the cache memory, and it has been difficult to fully utilize the capabilities of the processor.

このため、プログラムの実行効率及び実行速度が最大限
にならないという不具合を招いていた。
This has caused a problem in that the program execution efficiency and execution speed are not maximized.

そこで、この発明は、上記に鑑みてなされたものであり
、その目的とするところは、キャッシュメモリの構成方
式及び容量をプログラムに応じて変更することによって
、キャッシュメモリと同一のチップ上に形成された情報
処理装置の能力を十分に発揮させて、プログラムの実行
効率及び実行速度を向上させるキャッシュメモリを備え
た情報処理装置を提供することにある。
Therefore, the present invention has been made in view of the above, and its purpose is to create a cache memory that is formed on the same chip by changing the configuration method and capacity of the cache memory according to a program. An object of the present invention is to provide an information processing device equipped with a cache memory that fully utilizes the capabilities of the information processing device and improves program execution efficiency and execution speed.

[発明の構成] (課題を解決するための手段) 上記目的を達成するために、この第1の発明は、複数の
ブロックからなるキャッシュメモリと、前記キャッシュ
メモリの所定のブロックにアドレスを供給するアドレス
供給手段と、前記アドレス供給手段から供給されるアド
レスの構成及びアドレスが供給されるブロックを前記キ
ャッシュメモリの構成変更を指令する指令情報にしたが
って変更する変更手段と、前記アドレス供給手段から供
給されるアドレスにしたがって前記キャッシュメモリの
所定のブロックから出力された複数の情報の中から読出
そうとする所定の情報を選択する選択手段と、前記キャ
ッシュメモリの所定のプロッりから出力された複数の情
報に付加されたタグ情報及び外部から与えられるアドレ
ス情報にしたがって前記選択手段に選択すべき情報を指
示する制御手段とから構成される。
[Structure of the Invention] (Means for Solving the Problems) In order to achieve the above object, the first invention provides a cache memory consisting of a plurality of blocks, and supplying an address to a predetermined block of the cache memory. an address supplying means; a changing means for changing the configuration of addresses supplied from the address supplying means and blocks to which the addresses are supplied according to command information for instructing a configuration change of the cache memory; selection means for selecting predetermined information to be read from a plurality of pieces of information output from a predetermined block of the cache memory according to an address of the cache memory; and a plurality of pieces of information output from a predetermined plot of the cache memory. and control means for instructing the selection means to select information according to tag information added to the tag information and address information given from the outside.

また、この第2の発明は、複数のブロックからなるキャ
ッシュメモリと、記憶保持する情報の種類及び前記キャ
ッシュメモリの属性を前記複数のブロックからなるそれ
ぞれのキャッシュメモリ毎に変更可能に指定して定義す
る指定定義手段とから構成される。
Further, the second invention provides a cache memory consisting of a plurality of blocks, and the type of information to be stored and the attributes of the cache memory being changeably specified and defined for each cache memory consisting of the plurality of blocks. It consists of a specification definition means.

〈作用) 上記一方の構成において、この第1の発明は、複数のブ
ロックに与えるアドレスの構成及びアドレスを与えるブ
ロックを変更することにより、複数のブロックからなる
キャッシュメモリの構成方式及び容量を適宜変更するよ
うにしている。
<Operations> In one of the above configurations, the first invention appropriately changes the configuration method and capacity of the cache memory composed of the plurality of blocks by changing the structure of the addresses given to the plurality of blocks and the blocks to which the addresses are given. I try to do that.

また、上記他方の構成において、この第2の発明は、複
数のブロックからなるキャッシュメモリのそれぞれのブ
ロック毎に、記憶保持する情報の種類及びキャッシュメ
モリの属性を指定して定義するようにして、格納される
情報に対して容量が可変となるようにしている。
Further, in the other configuration, the second invention specifies and defines the type of information to be stored and the attributes of the cache memory for each block of the cache memory consisting of a plurality of blocks, The capacity is made variable for the information stored.

(実施例) 以下図面を用いてこの発明の詳細な説明する。(Example) The present invention will be described in detail below using the drawings.

第1図はこの発明の第1の実施例に係るキャッシュメモ
リを備えたプロセッサの要部構成を示す図である。同図
に示すプロセッサは、総置−が16にバイト、4ウ工イ
Φセツト会アソシアテイブ方式として構成されたキャッ
シュメモリを備えている。この第1の実施例は、このよ
うに構成されたキャッシュメモリを2ウエイ・セット・
アソシアティブ方式として使用する際の構成を示したも
のである。
FIG. 1 is a diagram showing the main part configuration of a processor equipped with a cache memory according to a first embodiment of the present invention. The processor shown in the figure is equipped with a cache memory having a total of 16 bytes and configured as an associative system with a 4-way Φ set. This first embodiment uses the cache memory configured in this way as a two-way set.
This figure shows the configuration when used as an associative method.

第1図において、16にバイトのキャッシュメモリは、
4にバイトの同様に構成された4つのキャッシュメモリ
1a〜1dからなる。
In Figure 1, the cache memory of 16 bytes is
It consists of four similarly configured cache memories 1a to 1d of 4 to 4 bytes.

それぞれのキャッシュメモリ1a〜1dは、256のエ
ントリ(E1〜E2se)で構成されている。それぞれ
のエントリは、20ピツトのアドレスからなるタグ(T
AG)部と、それぞれ4バイトのライン(L+〜L4)
からなる16バイトのラインサイズのデータ部とから構
成されている。
Each cache memory 1a-1d is composed of 256 entries (E1-E2se). Each entry has a tag (T) consisting of a 20-pit address.
AG) section and 4-byte lines each (L+ to L4)
It consists of a 16-byte line size data section consisting of:

このように構成された16にバイトのキャッシュメモリ
′は、その構成方式及び容量がデコーダ(DEC)3か
ら出力される制御信号A−Dにしたがって変更される。
The configuration and capacity of the 16-byte cache memory ' thus configured are changed in accordance with control signals A to D output from the decoder (DEC) 3.

デコーダ3は、キャッシュのウェイ数と容量を指令する
2ビツトの指令情報(X、Y)をデコー、ドして、制御
信号A−Dのいずれかを与えるものである。すなわち、
デコーダ3は、与えられる指令情報に対して第2図に示
すように制御信@A〜Dのいずれかをアクティブ状態と
し、キャッシュの構成方式ど容量を決定する。この第1
・の実施例にあっては、キャッシュメモリを4ウエイ、
16にバイトから2ウエイ16にバイトに変更するので
、指令情報は(1,1)から(0,1)に変化し、アク
ティブとなる制御信号がI制御信号八へら制憚信号Bに
変化する。これらの制御信号はデコーダ5に与えられる
The decoder 3 decodes and decodes 2-bit command information (X, Y) that commands the number of ways and capacity of the cache, and provides one of the control signals A to D. That is,
The decoder 3 activates any one of the control signals @A to D as shown in FIG. 2 in response to the given command information, and determines the configuration and capacity of the cache. This first
・In the embodiment, the cache memory is 4-way,
Since the byte is changed from 16 to 2-way 16 byte, the command information changes from (1, 1) to (0, 1), and the active control signal changes to I control signal eight hera control signal B. . These control signals are given to decoder 5.

デコーダ5は、キャッシュメモリを4ウエイとして使用
する場合に、32ビツトのアドレス情報7のう−ち4ビ
ツト目から11ビツト目の8ピツトをv4tIl信号八
にしたがってデコードして、それぞれのキャッシュメモ
リの256のエントリの1つを選択する。一方、デコー
ダ5・は、キャッシュメモリを2ウエイとして使用する
場合には、アドレス7の4ビツト目から12ビツト目の
9ピツトをIII tll信号已にしたがってデコード
して、キャッシュメモリ1a、1bの中から1つのエン
トリを選択し、キャッシュメモリ1c、1dの中から1
つのエントリを選択する。      ・−したがって
、デコーダ5は、4ウエイの場合には256のデコード
出力Aを、キャッシュメモリ1a、1c及びセレクタ9
を介してキャッシュメモリ1b、1d’に与える。一方
、2ウエイの場合には、512のデコード出力(A、B
)のうち、デコード出力Aをキャッシュメモリ1a、1
cに、デコード出力Bをキャッシュメモリ1t)、Id
に与える。
When the cache memory is used as a 4-way cache memory, the decoder 5 decodes 8 bits from the 4th bit to the 11th bit of the 32-bit address information 7 according to the v4tIl signal 8, and decodes each cache memory. Select one of the 256 entries. On the other hand, when the cache memory is used as a 2-way, the decoder 5 decodes the 9th bit from the 4th bit to the 12th bit of the address 7 in accordance with the III tll signal, and stores it in the cache memories 1a and 1b. Select one entry from cache memories 1c and 1d.
Select one entry. - Therefore, in the case of 4-way, the decoder 5 outputs 256 decoded outputs A to the cache memories 1a, 1c and the selector 9.
The data is given to the cache memories 1b and 1d' via the memory. On the other hand, in the case of 2-way, 512 decode outputs (A, B
), the decoded output A is sent to the cache memory 1a, 1
c, the decode output B is sent to the cache memory 1t), Id
give to

デコーダ5によって選択されたそれぞれのキャッシュメ
モリ1a〜1dのエントリのうちタグ部のアドレスは、
それぞれのキャッシュメモリ1a〜1dに対応して設け
られているセレクタ11a〜11d (セレクタ11C
,lidは図示せず)に与えられる。
The address of the tag part of the entries in each of the cache memories 1a to 1d selected by the decoder 5 is as follows:
Selectors 11a to 11d (selector 11C) provided corresponding to each cache memory 1a to 1d
, lid are not shown).

セレクタ11aは、キャッシュメモリ1a11bから選
択されて与えられるタグ部の19ビツトのアドレスある
いはキャッシュメモリ1aから選択されて与えられるタ
グ部の20ビツトのアドレスを虐択する。
The selector 11a selects the 19-bit address of the tag part selected and given from the cache memory 1a11b or the 20-bit address of the tag part selected and given from the cache memory 1a.

すなわち、セレクタ11aは、4ウエイの場合には、キ
ャッシュメモリ1aから与えられる20ビツトのアドレ
スを選択し、2ウエイの場合には、キャッシュメモリi
a、ibから与えられる19ビツトのアドレスを選択す
る。
That is, in the case of 4-way, selector 11a selects the 20-bit address provided from cache memory 1a, and in the case of 2-way, selector 11a selects the 20-bit address given from cache memory 1a.
Select the 19-bit address given from a and ib.

セレクタ11bは、制御信号Aにより4ウエイの場合に
キャッシュメモリ16から与えられる20ビツトのアド
レスを選択する。セレクタ11C111dは、それぞれ
対応するキャッシュメモリ1c、Idに対してそれぞれ
セレクタ11a、11bと同様に機能する。
The selector 11b selects a 20-bit address given from the cache memory 16 in the case of 4-way in response to the control signal A. The selector 11C111d functions similarly to the selectors 11a and 11b for the corresponding cache memories 1c and Id, respectively.

また、セレクタ138〜13d (13b〜13dは図
示せず)が、それぞれのセレクタ11a〜11dに対応
して設けられている。セレクタ13a〜13dは、4ウ
エイの場合には、制御信号Aにしたがって32ビツトの
アドレス情報7のうち12〜31ビツト目の20ビツト
のアドレスを選択する。一方、2ウエイの場合には、制
御信号Bにしたがってアドレス情報7のうち13〜31
ビツト目の19ビツトのアドレスを選択する。
Further, selectors 138 to 13d (13b to 13d are not shown) are provided corresponding to the respective selectors 11a to 11d. In the case of 4-way, the selectors 13a to 13d select the 20-bit address from the 12th to 31st bits of the 32-bit address information 7 in accordance with the control signal A. On the other hand, in the case of 2-way, 13 to 31 of address information 7 according to control signal B.
Select the 19th bit address.

それぞれのセレクタ11a〜11d及び13a〜、13
dによって選択されたそれぞれのアドレスは、一対ノセ
レクタ11a、13a、11b、13b111c、13
c、lid、13dに対応して設けられた比較器(CM
P)15a 〜15d(15b〜15dは図示せず)に
それぞれ対応して与えられる。
Respective selectors 11a to 11d and 13a to 13
The respective addresses selected by
Comparators (CM
P) 15a to 15d (15b to 15d are not shown), respectively.

比較器15aは、セレクタ11a及びセレクタ13aに
よって選択されたアドレスを比較して、一致するアドレ
スがある場合には一致信号を出力する。すなわち、比較
器15aは、キャッシュメモリ1aから出力されたエン
トリが、読出そうとするデータであるか否かを検出する
ものである。
Comparator 15a compares the addresses selected by selector 11a and selector 13a, and outputs a match signal if there is a matching address. That is, the comparator 15a detects whether the entry output from the cache memory 1a is data to be read.

比較器1b〜1dあるにあっても、比較器1aと同様に
機能するものである。
Even if there are comparators 1b to 1d, they function in the same way as comparator 1a.

一方、キャッシュメモリ18〜1dから出力されたエン
トリは、その16バイトのデータ部がセレクタ178〜
17dに与えられる。
On the other hand, the entries output from the cache memories 18 to 1d have their 16-byte data portions set to the selectors 178 to 1d.
17d.

セレクタ17aは、4ウエイの場合には、キャッシュメ
モリ1aから出力された4つのデータ(し1〜し4)の
中あるから、32ビツトのアドレス情報7のうち2〜3
ビツト目の2ビツトの選択情報により4バイトの1つの
データを選択する。
In the case of 4-way, the selector 17a selects 2 to 3 of the 32-bit address information 7 because it is among the four data (1 to 4) output from the cache memory 1a.
One piece of data of 4 bytes is selected based on the selection information of the 2nd bit of the bit.

一方、2ウエイの場合には、キャッシュメモリ1aある
いはセレクタ19bにより選択されたキャッシュメモリ
1bの4つのデータの中から、2ビツトの選択情報にし
たがって4バイトの1つのデータを選択する。
On the other hand, in the case of 2-way, one 4-byte data is selected from among the four data in the cache memory 1a or the cache memory 1b selected by the selector 19b according to the 2-bit selection information.

セレクタ17bは、4ウエイの場合に、セレクタ19b
によって選択されたキャッシュメモリ1bの4つのデー
タの中から、2ビツトの選択情報にしたがって4バイト
の1つのデータを選択する。
In the case of 4-way, the selector 17b is the selector 19b.
One piece of 4-byte data is selected from among the four pieces of data in the cache memory 1b selected by , according to the 2-bit selection information.

セレクタ17c、17dは、それぞれ対応するキャッシ
ュメモリ1c、1dに対して、それぞれセレクタ11a
、11bと同様に機能する。
Selectors 17c and 17d select selector 11a for corresponding cache memories 1c and 1d, respectively.
, 11b.

それぞれのセレクタ17a〜17dによって選択された
それぞれのデータは、セレクタ21に与えられ、さらに
、セレクタ17a 、 17Cによって選択されたデー
タはセレクタ23に与えられる。
The respective data selected by the respective selectors 17a to 17d are provided to the selector 21, and the data selected by the selectors 17a and 17C are further provided to the selector 23.

セレクタ21は、それぞれのセレクタ17a〜17dに
よって選択されたデータを受けて、これらの中から1つ
のデータを比較器15a〜15dから出力される一致信
号にしたがって選択する。
The selector 21 receives the data selected by the respective selectors 17a-17d, and selects one data from among them according to the match signal output from the comparators 15a-15d.

すなわち、セレクタ21は、4ウエイの場合に、比較器
15a〜15dの一致信号に対応したキャッシュメモリ
1a〜1dのデータを選択する。
That is, in the case of 4-way, the selector 21 selects data in the cache memories 1a-1d corresponding to the match signals of the comparators 15a-15d.

セレクタ23は、セレクタ17a117cによって選択
されたデータを受けて、これらの中から1つのデータを
比較器15a、15cから出力される一致信号にしたが
って選択する。すなわち、セレクタ23は、2ウエイの
場合に、比較器15a、i5cの一致信号に対応したキ
ャッシュメモリ18〜1dのデータを選択する。それぞ
れのセレクタ21.23によって選択されたデータはセ
レクタ25に与えられる。
The selector 23 receives the data selected by the selector 17a117c and selects one data from among them according to the match signal output from the comparators 15a and 15c. That is, in the case of 2-way, the selector 23 selects data in the cache memories 18 to 1d corresponding to the match signals from the comparators 15a and i5c. The data selected by each selector 21, 23 is given to the selector 25.

セレクタ25は、4ウエイの場合には、制御信号へによ
りセレクタ21の出力を選択し、2ウエイの場合には、
制御信号Bによりセレクタ23の出力を選択する。
In the case of 4-way, the selector 25 selects the output of the selector 21 according to the control signal, and in the case of 2-way,
The output of the selector 23 is selected by the control signal B.

次に、この第1の実施例の作用を説明する。Next, the operation of this first embodiment will be explained.

まず、キャッシュメモリ18〜1dを4ウエイとして使
用する場合について説明する。
First, a case where the cache memories 18 to 1d are used as a 4-way system will be described.

4ウエイの場合には、指令情報(X、Y)が(1,1)
となり、制御信号Aがアクティブ状態となる。これによ
り、アドレス情報7の4〜11ビツト目の8ビツトのア
ドレスがデコーダ5によってデコードされて、デコード
出力により、それぞれのキャッシュメモリ1a〜1dか
ら1つのエントリが選択される。
In the case of 4-way, command information (X, Y) is (1, 1)
Therefore, control signal A becomes active. As a result, the 8-bit address of the 4th to 11th bits of the address information 7 is decoded by the decoder 5, and one entry is selected from each of the cache memories 1a to 1d by the decoded output.

選択されたエントリのうちタグ部の20ビツトのアドレ
スは、それぞれ対応するセレクタ118〜11dを介し
てそれぞれ対応する比較器158〜15dに与えられる
。比較器158〜15dに与えられたそれぞれのアドレ
スは、アドレス情報7の12〜31ビツト目の20ビツ
トのアドレスと比較され、一致するアドレスがある場合
には、一致信号が対応する比較器158〜15dから出
力される。
The 20-bit address of the tag part of the selected entry is given to the corresponding comparators 158-15d via the corresponding selectors 118-11d, respectively. Each address given to the comparators 158-15d is compared with the 20-bit address of the 12th to 31st bits of the address information 7, and if there is a matching address, the matching signal is sent to the corresponding comparators 158-15d. It is output from 15d.

一方、選択されたエントリのうちデータ部の16バイト
の4つのデータ(Ll”L4)は、それぞれ対応するセ
レクタ17a〜17dに与えられる。それぞれのセレク
タ1,78〜17dに与えられた4つのデータは、アド
レス情報7の2〜3ビツト目の選択情報により1つのデ
ータが選択される。
On the other hand, among the selected entries, four data (Ll"L4) of 16 bytes in the data section are given to the corresponding selectors 17a to 17d.The four data given to the respective selectors 1 and 78 to 17d One piece of data is selected according to the selection information of the second and third bits of the address information 7.

それぞれのセレクタ17a〜17dによって選択された
それぞれ4バイトの4つのデータは、比較器15a〜1
5dから出力さ・れる一致信号にしたがってセレクタ2
1により1つのデータが選択される。例えば、キャッシ
ュメモリ1aに読出そうとするデータが存在する場合に
は、比較器15aから出力される一致信号によりセレク
タ17aから出力されたデータがセレクタ21によつ、
て選択される。セレクタ21によって選択された4バイ
トのデータは、セレクタ25を介して読出される。
The four data of 4 bytes each selected by the respective selectors 17a to 17d are sent to the comparators 15a to 1.
Selector 2 according to the match signal output from 5d.
1 selects one piece of data. For example, when data to be read exists in the cache memory 1a, the data output from the selector 17a is passed to the selector 21 by the match signal output from the comparator 15a.
selected. The 4-byte data selected by selector 21 is read out via selector 25.

次に、キャッシュの総容量を変えずに、構成方式を4ウ
エイから2ウエイに変更する場合について説明する。
Next, a case will be described in which the configuration method is changed from 4-way to 2-way without changing the total cache capacity.

2ウエイの場合には、指令情報(X、Y)が(0,1)
となり、制御信号Bがアクティブ状態となる。これによ
り、アドレス情報7の4〜12ビツト目の9ビツトのア
ドレスがデコーダ5によってデコードされて、デコード
出力によりキャッシュメモリ1a11bから1つのエン
トリが選択され、キャッシュメモリic、ldから1つ
のエントリが選択される。
In the case of 2-way, the command information (X, Y) is (0, 1)
Therefore, control signal B becomes active. As a result, the 9-bit address of the 4th to 12th bits of the address information 7 is decoded by the decoder 5, and one entry is selected from the cache memory 1a11b by the decoded output, and one entry is selected from the cache memories ic and ld. be done.

キャッシュメモリ1a、1bから選択されたエントリの
うちタグ部の19ビツトのアドレスは゛、セレクタ11
aを介して比較器15aに与えられる。一方、キャッシ
ュメモリ1c、1dから選択されたエントリのうちタグ
部の19ビツトのアドレスは、セレクタ11Cを介して
比較器15Cに与えられる。
The 19-bit address of the tag part of the entries selected from the cache memories 1a and 1b is ', and the selector 11
a to the comparator 15a. On the other hand, the 19-bit address of the tag part of the entries selected from the cache memories 1c and 1d is given to the comparator 15C via the selector 11C.

それぞれ比較器15a115Cに与えられたアドレスは
、アドレス情9117の13〜31ビツト目の19ビツ
トのアドレスと比較され、一致するアドレスがある場合
には、一致信号が対応する比較器15aあるいは比較器
15cから出力される。
Each address given to the comparator 15a115C is compared with the 19th address of the 13th to 31st bits of the address information 9117, and if there is a matching address, a matching signal is sent to the corresponding comparator 15a or comparator 15c. is output from.

一方、選択されたエントリがキャッシュメモリ1a、i
cの場合には、エントリのデータ部の4つのデータは直
接対応するセレクタ17a、17Cに与えられる。また
、選択されたエントリが゛キャッシュメモリ1b11d
の場合には、エントリのデータ部の4組のデータは対応
するセレクタ19b119d(図示せず)を介して対応
するセレクタ17b 、 17dに与えられる。
On the other hand, the selected entry is cache memory 1a, i
In case c, the four pieces of data in the data portion of the entry are directly given to the corresponding selectors 17a and 17C. Also, the selected entry is ``cache memory 1b11d''.
In this case, the four sets of data in the data section of the entry are provided to the corresponding selectors 17b and 17d via the corresponding selectors 19b and 119d (not shown).

それぞれのセレクタ17a、170に与えられた4組の
データは、アドレス情報7の2〜3ピット目の選択情報
によりそれぞれのセレクタ17a117cに対して1組
のデータが選択される。選択された4バイトの2組のデ
ータは、比較器15a1150から出力される一致信号
にしたがってセレクタ23により1組のデータが選択さ
れる。選択された4バイトのデータは、セレクタ25を
介して読出される。
Of the four sets of data given to the respective selectors 17a and 170, one set of data is selected for each selector 17a117c based on the selection information of the second and third pits of the address information 7. One set of the selected two sets of 4-byte data is selected by the selector 23 in accordance with the match signal output from the comparator 15a1150. The selected 4 bytes of data are read out via the selector 25.

このように、キャッシュメモリ1a、1b及びキャッシ
ュメモリ1c、1dを1組のウェイとして、置屋を変え
ることなく2ウエイの構成方式を実現している。したが
って、第1図に示す構成にあっては、指令情報(X、Y
)を(1,1)から(1,O)に変化させることにより
、構成方式を4ウエイから2ウエイに変更することがで
きるようになる。
In this way, by using the cache memories 1a, 1b and the cache memories 1c, 1d as one set of ways, a two-way configuration system is realized without changing the storage space. Therefore, in the configuration shown in FIG.
) from (1, 1) to (1, O), the configuration method can be changed from 4-way to 2-way.

これにより、キャッシュメモリの利用形態の自由度が拡
大し、プログラムに最適な構成をとり得ることが可能と
なる。したがって、プロセッサの能力が十分に発揮され
、プログラムを効率良く実行処理することができる。
This expands the degree of freedom in how the cache memory is used, and makes it possible to create an optimal configuration for the program. Therefore, the capabilities of the processor are fully utilized and programs can be executed efficiently.

第3図はこの発明の第2の実施例に係るキャッシュメモ
リを備えたプロセッサの要部構成を示す図である。なお
、第3図において、第1図と同符号のものは同一機能を
有するものであり、その説明は省略する。
FIG. 3 is a diagram showing the main part configuration of a processor equipped with a cache memory according to a second embodiment of the present invention. Note that in FIG. 3, components having the same reference numerals as those in FIG. 1 have the same functions, and their explanations will be omitted.

この第2の実施例は、4ウエイ、16にバイトで使用し
ていたキャッシュメモリを、指令情報を(1,1)から
(0、O)に変化させることによって、2ウエイ、8に
バイトに変更する場合を示したものである。このように
した場合には、キャッシュメモリ1c、ld及びセレク
タ17c117dは不要となる。
In this second embodiment, by changing the command information from (1, 1) to (0, O), the cache memory that was used for 4 ways and 16 bytes can be used for 2 ways and 8 bytes. This shows cases in which changes are made. In this case, the cache memories 1c, ld and selector 17c117d become unnecessary.

この第2の実施例の特徴、とするところは、2ウエイで
使用する際に、デコーダ5のデコード結果のキャッシュ
メモリ1C,1dへの供給を、制御信号Cをインバータ
31で反転した信号にしたがって制御されるアドレスバ
ッファ33により停止させるとともに、インバータ31
の出力によりセレクタ17c、17dの動作を停止させ
るようにしたことにある。
The feature of this second embodiment is that when used in two-way, the decoding result of the decoder 5 is supplied to the cache memories 1C and 1d according to a signal obtained by inverting the control signal C by an inverter 31. It is stopped by the address buffer 33 controlled, and the inverter 31
The reason is that the operation of the selectors 17c and 17d is stopped by the output.

このような構成とすることにより、2ウエイとして使用
する場合に、不要となるキャッシュメモIJIC11d
及びセレクタ17c、17dの消費電力を低減して、プ
ロセッサ全体としての濫費電力を低減することができる
ようになる。
With this configuration, when used as a 2-way, the cache memory IJIC11d becomes unnecessary.
In addition, the power consumption of the selectors 17c and 17d can be reduced, and the wasted power of the processor as a whole can be reduced.

第4図はこの発明の第3の実施例に係るキャッシュメモ
リを備えたプロセッサの要部構成を示す図である。同図
に示すプロセッサ41は、同一チップ上に集積化された
キャッシュメモリA、Bの機能を、機能定義回路43に
よって決定する。
FIG. 4 is a diagram showing the main part configuration of a processor equipped with a cache memory according to a third embodiment of the present invention. A processor 41 shown in the figure determines the functions of cache memories A and B integrated on the same chip using a function definition circuit 43.

機能定義回路43は、プロセッサ41の外部から与えら
れる2ビツトの機能定義信号PCI、Fe2にしたがっ
て、第5図に示すように、キャッシュメモリA、Bを命
令用として用いるか、あるいはデータ用として用いるか
、または両者ともに使用しないかを決定する。
The function definition circuit 43 uses the cache memories A and B for instructions or for data according to 2-bit function definition signals PCI and Fe2 applied from outside the processor 41, as shown in FIG. Decide whether to use both or neither.

したがって、キャッシュメモリA、Bは、機能定義回路
43によって、プログラムに応じて命令用あるいはデー
タ用として、それぞれ区別して用いることができるよう
になる。
Therefore, the function definition circuit 43 allows the cache memories A and B to be used separately for instructions or data, depending on the program.

さらに、プロセッサ41の外部から与えられる2ビツト
の機能定義信号FC3、Fe2を追加して、機能定義回
路43が第6図に示すように、キャッシュメモリASB
をユーザ領域あるいはスーパバイザ領域として定義し、
それぞれのキャッシュメモリA、8を用いるようにして
もよい。
Furthermore, by adding 2-bit function definition signals FC3 and Fe2 given from the outside of the processor 41, the function definition circuit 43 controls the cache memory ASB as shown in FIG.
Define as user area or supervisor area,
The respective cache memories A and 8 may be used.

なお、機能定義信号は、プロセッサ内部に設けられたレ
ジスタから機能定義回路43に与えるようにしてもよい
Note that the function definition signal may be provided to the function definition circuit 43 from a register provided inside the processor.

例えば、3つのキャッシュメモリを備えたプロセッサに
あって、プロセッサ内部に設けられた4ビツトのレジス
タ01〜C4の情報により、命令用あるいはデータ用と
して機能するキャッシュメモリ及び使用しないキャッシ
ュメモリの個数を第7図に示すように定義することもで
きる。
For example, in a processor equipped with three cache memories, information in 4-bit registers 01 to C4 provided inside the processor determines the number of cache memories that function for instructions or data and the number of cache memories that are not used. It can also be defined as shown in Figure 7.

また、プロセッサの内部に設けられたレジスタに、第8
図に示すように、キャッシュメモリの属性を示す命令(
1)/データ(D)、ユーザ領域(U)/スーパバイザ
領域(S)を区別する情報の他に、リード及びライト可
能(W)/リードのみ(R)を区別する情報を与えて、
それぞれのキャッシュメモリの機能を選択するようにし
てもよい。
In addition, the eighth
As shown in the figure, an instruction (
1) In addition to information that distinguishes data (D), user area (U), and supervisor area (S), information that distinguishes between readable and writable (W) and read only (R) is provided,
The function of each cache memory may be selected.

第9図はこの発明の第4の実施例に係るキャッシュメモ
リを備えたプロセッサの要部構成を示す図である。
FIG. 9 is a diagram showing the main part configuration of a processor equipped with a cache memory according to a fourth embodiment of the present invention.

この第4の実施例の特徴とするところは、n個のキャッ
シュメモリ1〜nに対して、それぞれ2ビツトの機能定
義ビットC1、C2を設け、これらの機能定義ビットC
1、C2とキャッシュメモリの機能を第10図に示すよ
うに対応させて、n個のキャッシュメモリの機能を制御
するようにしたことにある。
The feature of this fourth embodiment is that 2-bit function definition bits C1 and C2 are provided for each of the n cache memories 1 to n, and these function definition bits C
1. The functions of C2 and the cache memory are made to correspond as shown in FIG. 10, and the functions of n cache memories are controlled.

このように、第3の実施例及び第4の実施例においては
、オンチップ化された複数のキャッシュメモリの機能を
それぞれのキャッシュメモリに対応して選択するように
したので、複数のキャッシュメモリにおけるそれぞれの
機能の自由度を大幅に拡大することができる。これによ
り、キャッシュメモリをプログラムに最適な構成とする
ことができるようになる。
In this way, in the third and fourth embodiments, the functions of a plurality of on-chip cache memories are selected corresponding to each cache memory, so that The degree of freedom of each function can be greatly expanded. This allows the cache memory to have an optimal configuration for the program.

さらに、それぞれのキャッシュメモリに対応した制御を
行なうことにより、アクセススピード及び消費電力の無
駄を低減することが可能となる。
Furthermore, by performing control corresponding to each cache memory, access speed and wasteful power consumption can be reduced.

[発明の効末] 以上説明したように、この第1及び第2の発明によれば
、キャッシュメモリの構成方式及び容量を、実行しよう
とするプログラムに応じて変更するようにしたので、キ
ャッシュメモリの利用形態の自由度を大幅に拡大するこ
とができる。
[Effects of the Invention] As explained above, according to the first and second inventions, the configuration method and capacity of the cache memory are changed depending on the program to be executed. can greatly expand the degree of freedom in how it can be used.

これにより、このようなキャッシュメモリを備えた情報
処理装置は、その能力を十分に発揮することが可能とな
り、プログラムの実行効率及び実行速度を向上させるこ
とができるようになる。
As a result, an information processing device equipped with such a cache memory is able to fully utilize its capabilities, and the efficiency and speed of program execution can be improved.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の第1の実施例の構成を示す図、第2
図は第1の実施例における動作説明図、第3図はこの発
明の第2の実施例の構成を示す図、第4図はこの発明の
第3の実施例の構成を示す図、第5図乃至第8図は第3
の実施例の動作説明図、第9図はこの発明の第4の実施
例の構成を示す図、第10図は第4の実施例の動作説明
図である。 1a〜1d・・・キャッシュメモリ 3.5・・・デコーダ 7・・・アドレス情報 9.11a 〜11d 、13a 〜13d 、17a
〜17d、21.23・・・セレクタ 153〜15d・・・比較器 43・・・機能定義回路
FIG. 1 is a diagram showing the configuration of a first embodiment of the present invention, and FIG.
3 is a diagram showing the configuration of the second embodiment of the present invention. FIG. 4 is a diagram showing the configuration of the third embodiment of the present invention. Figures to Figures 8 are
FIG. 9 is a diagram showing the configuration of the fourth embodiment of the present invention, and FIG. 10 is an explanatory diagram of the operation of the fourth embodiment. 1a to 1d... Cache memory 3.5... Decoder 7... Address information 9.11a to 11d, 13a to 13d, 17a
~17d, 21.23...Selector 153-15d...Comparator 43...Function definition circuit

Claims (2)

【特許請求の範囲】[Claims] (1)複数のブロックからなるキャッシュメモリと、前
記キャッシュメモリの所定のブロックにアドレスを供給
するアドレス供給手段と、 前記アドレス供給手段から供給されるアドレスの構成及
びアドレスが供給されるブロックを前記キャッシュメモ
リの構成変更を指令する指令情報にしたがつて変更する
変更手段と、 前記アドレス供給手段から供給されるアドレスにしたが
って前記キャッシュメモリの所定のブロックから出力さ
れた複数の情報の中から読出そうとする所定の情報を選
択する選択手段と、 前記キャッシュメモリの所定のブロックから出力された
複数の情報に付加されたタグ情報及び外部から与えられ
るアドレス情報にしたがって前記選択手段に選択すべき
情報を指示する制御手段とを有することを特徴とするキ
ャッシュメモリを備えた情報処理装置。
(1) A cache memory consisting of a plurality of blocks, an address supply means for supplying an address to a predetermined block of the cache memory, and a configuration of the address supplied from the address supply means and a block to which the address is supplied to the cache memory. changing means for changing the configuration of the memory in accordance with command information that instructs to change the configuration of the memory, and reading out from among the plurality of pieces of information output from a predetermined block of the cache memory according to the address supplied from the address supplying means. selecting means for selecting predetermined information to be selected, and instructing the selecting means to select information according to tag information added to a plurality of pieces of information outputted from a predetermined block of the cache memory and address information given from the outside. 1. An information processing device equipped with a cache memory, characterized in that it has a control means for controlling.
(2)複数のブロックからなるキャッシュメモリと、記
憶保持する情報の種類及び前記キャッシュメモリの属性
を前記複数のブロックからなるそれぞれのキャッシュメ
モリ毎に変更可能に指定して定義する指定定義手段と を有することを特徴とするキャッシュメモリを備えた情
報処理装置。
(2) A cache memory consisting of a plurality of blocks, and a specification definition means for specifying and defining the type of information to be stored and the attributes of the cache memory so as to be changeable for each cache memory consisting of the plurality of blocks. An information processing device comprising a cache memory.
JP63059345A 1988-03-15 1988-03-15 Information processor provided with cache memory Pending JPH01233537A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63059345A JPH01233537A (en) 1988-03-15 1988-03-15 Information processor provided with cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63059345A JPH01233537A (en) 1988-03-15 1988-03-15 Information processor provided with cache memory

Publications (1)

Publication Number Publication Date
JPH01233537A true JPH01233537A (en) 1989-09-19

Family

ID=13110615

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63059345A Pending JPH01233537A (en) 1988-03-15 1988-03-15 Information processor provided with cache memory

Country Status (1)

Country Link
JP (1) JPH01233537A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0395649A (en) * 1989-09-08 1991-04-22 Matsushita Electric Ind Co Ltd Cache device
JPH04233049A (en) * 1990-06-19 1992-08-21 Dell Usa Corp Computer system having selectable cashe subsystem
JP2006510992A (en) * 2002-12-17 2006-03-30 インターナショナル・ビジネス・マシーンズ・コーポレーション Memory that can selectively change the line width
JP2010170292A (en) * 2009-01-22 2010-08-05 Nec Computertechno Ltd Cache memory control circuit and cache memory management method
US7818502B2 (en) 2005-03-31 2010-10-19 Semiconductor Energy Laboratory Co., Ltd. Selectively powering down tag or data memories in a cache based on overall cache hit rate and per set tag hit rate
US8908406B2 (en) 2011-06-09 2014-12-09 Semiconductor Energy Laboratory Co., Ltd. Cache memory and method for driving the same
US8953354B2 (en) 2011-06-09 2015-02-10 Semiconductor Energy Laboratory Co., Ltd. Semiconductor memory device and method of driving semiconductor memory device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63201850A (en) * 1987-02-18 1988-08-19 Matsushita Electric Ind Co Ltd On chip cash memory
JPH01187650A (en) * 1988-01-21 1989-07-27 Mitsubishi Electric Corp Buffer storage device
JPH01237835A (en) * 1988-01-20 1989-09-22 Advanced Micro Devicds Inc Single-chip integrated cash unit architecture and implementation of cash function thereinside

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63201850A (en) * 1987-02-18 1988-08-19 Matsushita Electric Ind Co Ltd On chip cash memory
JPH01237835A (en) * 1988-01-20 1989-09-22 Advanced Micro Devicds Inc Single-chip integrated cash unit architecture and implementation of cash function thereinside
JPH01187650A (en) * 1988-01-21 1989-07-27 Mitsubishi Electric Corp Buffer storage device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0395649A (en) * 1989-09-08 1991-04-22 Matsushita Electric Ind Co Ltd Cache device
JPH04233049A (en) * 1990-06-19 1992-08-21 Dell Usa Corp Computer system having selectable cashe subsystem
JP2006510992A (en) * 2002-12-17 2006-03-30 インターナショナル・ビジネス・マシーンズ・コーポレーション Memory that can selectively change the line width
JP4741844B2 (en) * 2002-12-17 2011-08-10 インターナショナル・ビジネス・マシーンズ・コーポレーション Memory that can selectively change the line width
US7818502B2 (en) 2005-03-31 2010-10-19 Semiconductor Energy Laboratory Co., Ltd. Selectively powering down tag or data memories in a cache based on overall cache hit rate and per set tag hit rate
JP2010170292A (en) * 2009-01-22 2010-08-05 Nec Computertechno Ltd Cache memory control circuit and cache memory management method
US8908406B2 (en) 2011-06-09 2014-12-09 Semiconductor Energy Laboratory Co., Ltd. Cache memory and method for driving the same
US8953354B2 (en) 2011-06-09 2015-02-10 Semiconductor Energy Laboratory Co., Ltd. Semiconductor memory device and method of driving semiconductor memory device

Similar Documents

Publication Publication Date Title
US5657288A (en) Efficient addressing of large memories
JP3598589B2 (en) Processor
US20080270707A1 (en) Data processor
US8443162B2 (en) Methods and apparatus for dynamically managing banked memory
US6687808B2 (en) Data processor using indirect register addressing
US6578139B1 (en) Processor architecture scheme which uses virtual address registers to implement different addressing modes and method therefor
JPH01233537A (en) Information processor provided with cache memory
JP2009032257A (en) Processor architecture selectively using finite-state-machine for control code
US20020103977A1 (en) Low power consumption cache memory structure
JPH03141434A (en) Microcomputer
JPH02162422A (en) Preference branch circuit
US7124261B2 (en) Access to bit values within data words stored in a memory
WO2021061626A1 (en) Instruction executing method and apparatus
JPH04104350A (en) Micro processor
US6321319B2 (en) Computer system for allowing a two word jump instruction to be executed in the same number of cycles as a single word jump instruction
JPS63201850A (en) On chip cash memory
KR200204909Y1 (en) A microcontroller including an divided internal code memory
JP2000099399A (en) Way predictive cache memory and access method therefor
JPH01177145A (en) Information processor
KR920003845B1 (en) Rom region expansion system for users of pc
US20020072810A1 (en) Enhanced memory addressing control
JPS59106047A (en) Microcomputer
JP3345050B2 (en) Two-dimensional array type memory system
JPH02230324A (en) Microprogram controller
JPS61289447A (en) Memory bank access system