JPH03113659A - Cache memory testing method - Google Patents

Cache memory testing method

Info

Publication number
JPH03113659A
JPH03113659A JP1252784A JP25278489A JPH03113659A JP H03113659 A JPH03113659 A JP H03113659A JP 1252784 A JP1252784 A JP 1252784A JP 25278489 A JP25278489 A JP 25278489A JP H03113659 A JPH03113659 A JP H03113659A
Authority
JP
Japan
Prior art keywords
instruction
cache memory
test
data
register
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
JP1252784A
Other languages
Japanese (ja)
Inventor
Yoshitaka Narita
成田 良孝
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP1252784A priority Critical patent/JPH03113659A/en
Publication of JPH03113659A publication Critical patent/JPH03113659A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To conduct a test on an instruction cache memory only by means of adding a test mode signal to an instruction decoder by checking the built-in instruction cache memory at the external part of a micro processor. CONSTITUTION:When a signal 104 comes to '1' and is inputted, the instruction decoder 10 continuously outputs '0' even if the instruction code of a signal 105 comes to any value. A content which is read from the instruction cache memory 6 is inputted to a computing element 17, which outputs data as it is and sets it in a register 18. Then, a program sequencer 12 generates a subsequent address, sequentially reads the instruction cache memory 6 and outputs it to a data address bus 102, namely, the external part of the micro processor. Thus, the test of the instruction cache memory 6 is conducted only by adding the test mode signal for instruction decoding and without adding hardware for the test and without cache access being delayed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、情報処理装置に使用される中央処理装置であ
るマイクロプロセッサに内蔵される命令キャッシュメモ
リの試験方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for testing an instruction cache memory built into a microprocessor, which is a central processing unit used in an information processing device.

〔従来技術〕[Prior art]

第4図はマイクロプロセッサを使用した情報処理装置の
構成を示すブロック図である。図示するように、情報処
理装置は、マイクロプロセッサ1、データキャシュメモ
リ2、主記憶メモリ3及び入出力装置4を具備する。
FIG. 4 is a block diagram showing the configuration of an information processing device using a microprocessor. As shown in the figure, the information processing device includes a microprocessor 1, a data cache memory 2, a main memory 3, and an input/output device 4.

第5図は従来の命令キャッシュメモリ試験回路を持った
マイクロプロセッサの構成を示すブロック図である。即
ち第5図は第4図のマイクロプロセッサ1に該当する。
FIG. 5 is a block diagram showing the configuration of a microprocessor having a conventional instruction cache memory test circuit. That is, FIG. 5 corresponds to the microprocessor 1 shown in FIG.

第5図において、5は演算回路、6は命令キャッシュメ
モリ、7はアドレス切換回路、8はテストアドレスレジ
スタ、100は命令用アドレスバス、101は命令用デ
ータバス、102はデータ用アドレスバス、103はデ
ータ用データバスである。
In FIG. 5, 5 is an arithmetic circuit, 6 is an instruction cache memory, 7 is an address switching circuit, 8 is a test address register, 100 is an instruction address bus, 101 is an instruction data bus, 102 is a data address bus, 103 is a data bus for data.

上記構成のマイクロプロセッサにおいて、先ず命令を命
令キャッシュメモリ6より読み出す動作について説明す
る。演算回路5より命令用アドレスバス100に命令ア
ドレスが出力きれ、この命令アドレスはアドレス切換回
路7を通って命令キャッシュメモリ6に入力される。命
令キャッシュメモリ6は命令アドレスで指定された命令
を命令用データバス101を通して演算回路5へ出力す
る。
In the microprocessor having the above configuration, the operation of reading an instruction from the instruction cache memory 6 will first be explained. An instruction address is output from the arithmetic circuit 5 to the instruction address bus 100, and this instruction address is input to the instruction cache memory 6 through the address switching circuit 7. The instruction cache memory 6 outputs the instruction specified by the instruction address to the arithmetic circuit 5 through the instruction data bus 101.

次に、命令キャッシュメモリ6の試験について説明する
。演算回路5よりデータ用データバス103にテストア
ドレスが出力され、テストアドレスレジスタ8にセット
される。テストアドレスレジスタ8にセットされたテス
トアドレスはアドレス切換回路7を通って命令キャッシ
ュメモリ6に入力される。次に演算回路5よりデータ用
データバス103にテストデータが出力され、このデー
タを命令キャッシュメモリ6に書き込む。書き込んだ後
キャッシュデータを読み出し、データ用データバス10
3を通して演算回路5に入力される。これらの動作は全
てマイクロプロセッサ1の内部で処理諮れており、外部
からはデータがわからない。そのため、チェックしたい
データを演算回路5からデータ用データバス103を通
してマイクロプロセッサ外部に出力し、このデータをチ
ェックする。テストアドレスを順次更新し、命令キャッ
シュメモリ6の全体をライト、リード、チェックし、試
験を行なう。
Next, a test of the instruction cache memory 6 will be explained. A test address is outputted from the arithmetic circuit 5 to the data data bus 103 and set in the test address register 8. The test address set in the test address register 8 is input to the instruction cache memory 6 through the address switching circuit 7. Next, test data is output from the arithmetic circuit 5 to the data data bus 103, and this data is written into the instruction cache memory 6. After writing, the cache data is read, and the data bus 10 for data is read.
3 to the arithmetic circuit 5. All of these operations are processed within the microprocessor 1, and the data is not known from the outside. Therefore, the data to be checked is output from the arithmetic circuit 5 to the outside of the microprocessor through the data bus 103 for data, and this data is checked. Test addresses are sequentially updated and the entire instruction cache memory 6 is written, read, and checked to perform a test.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかしながら上記従来の命令キャッシュメモリの試験方
法では、命令キャッシュメモリ6のアドレスにアドレス
切換回路7が接続されているため、キャッシュアクセス
が遅れ、マイクロプロセッサ1を高速動作許せにくくな
ってしまうという問題−がある。また、アドレス切換回
路7やテストアドレスレジスタ8が必要なこと及び制御
が複雑になり、ハード量が増えてしまうという問題があ
った。
However, in the conventional instruction cache memory testing method described above, since the address switching circuit 7 is connected to the address of the instruction cache memory 6, cache access is delayed and it becomes difficult to allow the microprocessor 1 to operate at high speed. be. Further, there is a problem in that the address switching circuit 7 and the test address register 8 are required, the control becomes complicated, and the amount of hardware increases.

本発明は上述の点に鑑みてなされたもので、上記欠点を
M消できるキャッシュメモリの試験フコ法を提供するこ
とにある。
The present invention has been made in view of the above-mentioned points, and it is an object of the present invention to provide a test method for cache memory which can eliminate the above-mentioned drawbacks.

〔課題を解決するための手段〕[Means to solve the problem]

上記課題を解決するため本発明は、試験モードを設定す
る手段と、試験モードの指定により前記命令キャッシュ
メモリから読み込んだ命令の解読・実行を変更する手段
と、命令キャッシュメモリより読み込んだ内容をマイク
ロプロセッサの外部に出力する手段とを有し、マイクロ
プロセッサの外部で内蔵の命令キャッシュメモリのチェ
ックができるようにしたことを特徴とする。
In order to solve the above problems, the present invention provides means for setting a test mode, means for changing the decoding and execution of instructions read from the instruction cache memory based on the designation of the test mode, and a means for changing the decoding and execution of instructions read from the instruction cache memory. The microprocessor is characterized in that it has a means for outputting to the outside of the processor, so that the built-in instruction cache memory can be checked from outside the microprocessor.

〔作用〕[Effect]

キャッシュメモリの試験方法を上記の如く行なうことに
より、本来命令を実行するのに必要な機構を利用し、命
令解読に試験モード信号を追加するだけで、試験のため
にハードウェアを殆ど追加することなく、且つキャッシ
ュアクセスが遅くなることなく命令キャッシュメモリの
試験が可能となる。
By performing the cache memory testing method as described above, most of the hardware for testing can be added by using the mechanism originally required to execute instructions and simply adding a test mode signal for instruction decoding. This makes it possible to test the instruction cache memory without slowing down cache access.

〔実施例〕〔Example〕

以下、本発明の一実施例を図面に基づいて説明する。 Hereinafter, one embodiment of the present invention will be described based on the drawings.

第1図は本発明に係るキャッシュメモリ試験方法を実施
するマイクロプロセッサの構成を示すブロック図、第2
図は演算回路5の構成を示すブロック図である。第1図
及び第2図において、第4図及び第5図と同じ符号を付
した部分は同一部分を示す。第2図において、9は命令
レジスタ、10は命令解読器、11は汎用レジスタ、1
2はプログラムシーケンサ、13,14,15.16は
ゲート、17は演算器、18,19.20はレジスタ、
21はゲートである。
FIG. 1 is a block diagram showing the configuration of a microprocessor that implements the cache memory testing method according to the present invention, and FIG.
The figure is a block diagram showing the configuration of the arithmetic circuit 5. As shown in FIG. In FIG. 1 and FIG. 2, parts given the same reference numerals as in FIGS. 4 and 5 indicate the same parts. In FIG. 2, 9 is an instruction register, 10 is an instruction decoder, 11 is a general-purpose register, 1
2 is a program sequencer, 13, 14, 15.16 are gates, 17 is an arithmetic unit, 18, 19.20 is a register,
21 is a gate.

第3図はこのマイクロプロセッサの実行する命令の一部
を示す図であり、キャッシュメモリの試験はこれらの命
令を実行する機構を利用して行なわれるものであるから
、まず第3図の命令を実行する動作から説明する。
Figure 3 is a diagram showing some of the instructions executed by this microprocessor, and since cache memory testing is performed using a mechanism that executes these instructions, first the instructions in Figure 3 are executed. Let's start by explaining the actions to be performed.

これらの命令を実行するため、信号104をOとして試
験モードをオフとする。AD全命令、5O9S1で指定
した汎用レジスタ11の内容を加算し、Dで指定した汎
用レジスタに格納する加算命令である。プログラムシー
ケンサ12で生成された命令アドレスは命令用アドレス
バス100に出力され、命令キャッシュメモリ6に入力
される。命令は命令キャッシュメモリ6より命令用デー
タバス101に出力され、命令レジスタ9にセットされ
る。命令コードは信号105により命令解読器10へ入
力され、汎用レジスタ11へ信号106〜108により
アドレスが入力される。
To execute these instructions, signal 104 is set to O to turn off the test mode. This is an addition instruction that adds the contents of the general-purpose register 11 specified by the AD all instruction, 5O9S1, and stores it in the general-purpose register specified by D. The instruction address generated by the program sequencer 12 is output to the instruction address bus 100 and input to the instruction cache memory 6. The instruction is output from the instruction cache memory 6 to the instruction data bus 101 and set in the instruction register 9. The instruction code is input to the instruction decoder 10 by signal 105, and the address is input to general register 11 by signals 106-108.

命令解読器10は信号110〜112を1として、出力
ゲート13,15をオンとし、出力ゲート14.16を
オフとする。汎用レジスタ11の出力はバス113及び
バス114、ゲート13゜バス118を通って演算器1
7で加算され、バス115、ゲート15.バス117を
通って汎用レジスタ11に書き込まれ、AD命令動作は
完了する。次にST全命令ついて説明する。
The instruction decoder 10 sets the signals 110 to 112 to 1, turns on the output gates 13 and 15, and turns off the output gates 14 and 16. The output of the general-purpose register 11 is sent to the arithmetic unit 1 through a bus 113, a bus 114, and a gate 13° bus 118.
7, bus 115, gate 15. Written to general purpose register 11 via bus 117, the AD instruction operation is complete. Next, the ST all command will be explained.

ST全命令、Xで指定された汎用レジスタ11の内容と
即値工を加算し、その結果をメモリアドレスとし、Sで
指定された汎用レジスタ11の内容をこのメモリアドレ
スで指定した主記憶メモリ(第4図参照)にライトする
命令である。命令が命令レジスタ9にセットされるまで
は、AD全命令同じである。命令コードが信号105に
より命令解読器10に入力され、汎用レジスタ11へ信
号106〜108によりアドレスが入力され′る。
For all ST instructions, add the contents of the general-purpose register 11 specified by This is a command to write to (see Figure 4). All AD instructions are the same until the instruction is set in the instruction register 9. An instruction code is inputted to the instruction decoder 10 by a signal 105, and an address is inputted to a general-purpose register 11 by signals 106-108.

命令解読器10は信号111を0、信号120を1とし
て出力ゲート14及び出力ゲート21をオンとし、出力
ゲート13をオフとする。汎用レジスタ11の出力バス
113と命令レジスタ9の出力信号109が演算器17
で加算され、レジスタ18にセットされる。また、汎用
レジスタ11の出力114はレジスタ19にセットされ
る。レジスタ18の内容はデータ用アドレスバス102
へ、レジスタ19の内容はゲート21を通ってデータ用
データバス103へ出力きれ、マイクロプロセッサ内部
のST命令動作は完了する。
The instruction decoder 10 sets the signal 111 to 0 and the signal 120 to 1, turns on the output gate 14 and the output gate 21, and turns off the output gate 13. The output bus 113 of the general-purpose register 11 and the output signal 109 of the instruction register 9 are connected to the arithmetic unit 17.
are added and set in register 18. Further, the output 114 of the general-purpose register 11 is set in the register 19. The contents of register 18 are stored in data address bus 102.
Then, the contents of the register 19 are outputted to the data bus 103 through the gate 21, and the ST instruction operation inside the microprocessor is completed.

LD命令は、ST全命令データの流れが逆に動作するも
ので、主記憶メモリの内容をDで指定した汎用レジスタ
に格納する命令である。命令解読器10は信号110を
1、信号111を0、信号112を01信号120を0
とし、ST全命令同様にデータ用アドレスバス102ヘ
メモリアドレスを出力する。−実生記憶メモリの内容は
データ用データバス103、レジスタ20.ゲート16
を通って汎用レジスタ11へ格納される。
The LD instruction is an instruction in which the data flow of all ST instructions is reversed, and the contents of the main memory are stored in the general-purpose register specified by D. The instruction decoder 10 sets the signal 110 to 1, the signal 111 to 0, the signal 112 to 0, and the signal 120 to 0.
As in all ST instructions, the memory address is output to the data address bus 102. - The contents of the seedling storage memory are the data bus 103 for data, the register 20 . gate 16
The data is stored in the general-purpose register 11 through the .

次に、信号104を1として試験モードの動作を説明す
る。信号104が1となって、命令解読器10に入力さ
れると、該命令解読器1oは信号105の命令フードが
どんな値になっても信号110.111に0を出力し続
け、ゲート13をオフとし、ゲート14をオンとする。
Next, the operation in the test mode will be explained with the signal 104 set to 1. When the signal 104 becomes 1 and is input to the instruction decoder 10, the instruction decoder 1o continues to output 0 to the signals 110 and 111 no matter what value the instruction food of the signal 105 becomes, and the gate 13 is input to the instruction decoder 10. OFF, and gate 14 is ON.

命令レジスタ9の内容、即ち、命令キャッシュメモリ6
から読み出された内容は、バス109及びゲート14を
通って演算器17に入力され、演算器17はこのデータ
をそのまま出力し、レジスタ18にセットする。レジス
タ18の内容はデータ用アドレスバス102を通ってマ
イクロプロセッサの外に出力される。
The contents of the instruction register 9, i.e., the instruction cache memory 6
The contents read from the data are input to the arithmetic unit 17 through the bus 109 and the gate 14, and the arithmetic unit 17 outputs this data as it is and sets it in the register 18. The contents of register 18 are output to the outside of the microprocessor via data address bus 102.

次にプログラムシーケンサ12は次のアドレスを生成す
る。即ち、命令レジスタ9に格納されている命令アドレ
スに1を加えた値を命令用アドレスバス100に出力し
、命令キャッシュメモリ6をアクセスし、次の命令を読
み出し、命令レジスタ9に格納する。この命令も同様に
データ用アドレスバス102へ出力される。こうして次
々と命令−キャッシュメモリ6を読み出し。データ用ア
ドレスバス102、即ちマイクロプロセッサの外部に出
力する。この出力を外部でチェックすれば命令キャッシ
ュメモリ6の試験が可能となる。上記の如く命令解読器
10に信号104による試験モードを追加するだけで、
命令キャッシュメモリー6の試験が可能となる。
Program sequencer 12 then generates the next address. That is, a value obtained by adding 1 to the instruction address stored in the instruction register 9 is output to the instruction address bus 100, the instruction cache memory 6 is accessed, the next instruction is read, and the next instruction is stored in the instruction register 9. This instruction is also output to the data address bus 102 in the same way. In this way, instructions are read out from the cache memory 6 one after another. It is output to the data address bus 102, that is, to the outside of the microprocessor. By checking this output externally, the instruction cache memory 6 can be tested. By simply adding a test mode using the signal 104 to the instruction decoder 10 as described above,
The instruction cache memory 6 can be tested.

・〔発明の効果〕 以上説明したように本発明によれば、マイクロプロセッ
サの本来の命令を実行するのに必要な機構を利用し、命
令解読器に試験モード信号を追加するだけで、試験のた
めにハードウェアを殆ど追加することなく、且つキャッ
シュアクセスが遅くなることもなく、命令キャッシュメ
モリの試験が可能となるという優れた効果が得られる。
- [Effects of the Invention] As explained above, according to the present invention, testing can be performed by simply adding a test mode signal to the instruction decoder by using the mechanism necessary for executing the original instructions of the microprocessor. Therefore, an excellent effect can be obtained in that the instruction cache memory can be tested without adding almost any hardware and without slowing down cache access.

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

第1図は一本発明に係るキャッシュメモリ試験方法を実
施するマイクロプロセッサの構成を示すブロック図、第
2図は第1図の演算回路5の構成を示すブロック図、第
3図はマイクロプロセッサの命令の一部を示す図、第4
図はマイクロプロセッサを使用した情報処理装置の構成
を示すブロック図、第5図は従来の命令キャッシュメモ
リ試験回路を持ったマイクロプロセッサの構成を示すブ
ロック図である。 図中、1・・・・マイクロプロセッサ、2・・・・デー
タキャシュメモリ、3・・・・主記憶メモリ、4・・・
・入出力装置、5・・・・演算回路、6・・・・命令キ
ャッシュメモリ、7・・・・アドレス切換回路、8・・
・・テストアドレスレジスタ、9・・・・命令レジスタ
、10・・・・命令解読器、11・・・・汎用レジスタ
、12・・・プログラムシーケンザ、13,14,15
゜16・・・・ゲート、17・・・・演算器、18,1
9゜20・・・・レジスタ、21・・・・ゲート。
FIG. 1 is a block diagram showing the configuration of a microprocessor that implements a cache memory testing method according to the present invention, FIG. 2 is a block diagram showing the configuration of the arithmetic circuit 5 in FIG. 1, and FIG. Diagram showing part of the instruction, No. 4
This figure is a block diagram showing the configuration of an information processing device using a microprocessor, and FIG. 5 is a block diagram showing the configuration of a microprocessor having a conventional instruction cache memory test circuit. In the figure, 1... microprocessor, 2... data cache memory, 3... main memory memory, 4...
- Input/output device, 5... Arithmetic circuit, 6... Instruction cache memory, 7... Address switching circuit, 8...
...Test address register, 9...Instruction register, 10...Instruction decoder, 11...General purpose register, 12...Program sequencer, 13, 14, 15
゜16...Gate, 17...Arithmetic unit, 18,1
9゜20...Register, 21...Gate.

Claims (1)

【特許請求の範囲】 命令キャッシュメモリを内蔵したマイクロプロセッサに
おいて、 試験モードを設定する手段と、 試験モードの指定により前記命令キャッシュメモリから
読み込んだ命令の解読・実行を変更する手段と、 命令キャッシュメモリより読み込んだ内容をマイクロプ
ロセッサの外部に出力する手段とを有し、 マイクロプロセッサの外部で内蔵の命令キャッシュメモ
リのチェックをすることを特徴とするキャッシュメモリ
試験方法。
[Scope of Claims] A microprocessor with a built-in instruction cache memory, comprising means for setting a test mode, means for changing the decoding and execution of instructions read from the instruction cache memory based on the designation of the test mode, and an instruction cache memory. 1. A cache memory testing method comprising: means for outputting contents read from the microprocessor to the outside of the microprocessor, and checking a built-in instruction cache memory outside the microprocessor.
JP1252784A 1989-09-28 1989-09-28 Cache memory testing method Pending JPH03113659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1252784A JPH03113659A (en) 1989-09-28 1989-09-28 Cache memory testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1252784A JPH03113659A (en) 1989-09-28 1989-09-28 Cache memory testing method

Publications (1)

Publication Number Publication Date
JPH03113659A true JPH03113659A (en) 1991-05-15

Family

ID=17242221

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1252784A Pending JPH03113659A (en) 1989-09-28 1989-09-28 Cache memory testing method

Country Status (1)

Country Link
JP (1) JPH03113659A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05134892A (en) * 1991-11-11 1993-06-01 Nec Corp Microprocessor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05134892A (en) * 1991-11-11 1993-06-01 Nec Corp Microprocessor

Similar Documents

Publication Publication Date Title
JPH05204644A (en) Data processor
JPH03113659A (en) Cache memory testing method
JPH03271829A (en) Information processor
JP2760228B2 (en) Microprocessor with built-in cache memory and its trace analyzer
JPH024010B2 (en)
JP2731618B2 (en) emulator
JPH04305783A (en) Microcomputer
JP3123758B2 (en) Software coverage measurement device
JPH0241770B2 (en)
JPS6286442A (en) Data processor
JPS60193046A (en) Detecting system for instruction exception
JPS59106048A (en) Microprocessor system
JPH0259495B2 (en)
JPH0683986A (en) Single chip microcomputer
JPH039438A (en) Diagnostic circuit
JPH06230958A (en) Processor
JPH05100901A (en) Microcomputer
JPS6028014B2 (en) microprocessor
JPH05151014A (en) Evaluation chip
JPH07191844A (en) Microprocessor with programmable logic
JPH0351009B2 (en)
JPH0895784A (en) Processor and method for arithmetic processing
JPS6320631A (en) Register selecting system
JPH03263135A (en) Branch control circuit
JPS6381532A (en) Processor circuit