JPH04162147A - Microprocessor test method - Google Patents

Microprocessor test method

Info

Publication number
JPH04162147A
JPH04162147A JP2288703A JP28870390A JPH04162147A JP H04162147 A JPH04162147 A JP H04162147A JP 2288703 A JP2288703 A JP 2288703A JP 28870390 A JP28870390 A JP 28870390A JP H04162147 A JPH04162147 A JP H04162147A
Authority
JP
Japan
Prior art keywords
register
microprocessor
observed
registers
bus
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
JP2288703A
Other languages
Japanese (ja)
Inventor
Takahiro Nagaoka
長岡 恭弘
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2288703A priority Critical patent/JPH04162147A/en
Publication of JPH04162147A publication Critical patent/JPH04162147A/en
Pending legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Microcomputers (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To observe a desired register in a period when no external access is carried out with an external bus shared by providing a selection register which selects a register to be observed. CONSTITUTION:A selection register 108 is divided into an S part 108A and an E part 108B. The registers 106 and 107 are selected with the bit pattern of the part 1088A, and the selected register is connected to a monitor bus 121 via a selector 120. The contents of a PC register can be dynamically observed via the bus 121 serving an internal bus in the timing of a normal operation HiZ state when the part 108B of the register 108 is set at '1' in a test state of a microprocessor 101. That is, the time transitions of the registers 106 and 107 showing the internal states are observed so that the operating transition of the microprocessor 101 is grasped.

Description

【発明の詳細な説明】 産業上の利用分野 本発明(よ マイクロプロセッサのテスト時における内
部状態を観察するマイクロプロセッサのテスト方法に関
すム 従来の技術 マイクロプロセッサの高機能・高速化に伴いキャッシュ
を内部に搭載する傾向にあム キャッシュを搭載するマ
イクロプロセッサ4;LCPUとキャッシュとのアクセ
スが多くなるほど、外部へのアクセスが減少し それに
伴い外部で観測される情報も減少す、L  CPUと内
部キャッシュとのアクセスが多くなるほど、外部へのア
クセスが減少し それに伴い外部で観測される情報も減
少しマイクロプロセッサの内部動作の推移の観察が困難
になってきへ そのためテスト時(よ 外部で観察され
る情報により、マイクロプロセッサの内部動作の推移を
把握するので、外部で観察される情報の減少によりマイ
クロプロセッサの内部動作の推移の把握が困難になる。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to a microprocessor testing method for observing the internal state of a microprocessor during testing. Microprocessors with internal cache 4: The more accesses between the LCPU and the cache, the fewer external accesses and the less information that can be observed externally. As the number of accesses to the microprocessor increases, the number of external accesses decreases, and as a result, the amount of information that can be observed externally decreases, making it difficult to observe the changes in the internal operation of the microprocessor. Since the transition of the internal operation of a microprocessor is grasped from information, the decrease in information observed externally makes it difficult to grasp the transition of the internal operation of the microprocessor.

従来 テスト時においてマイクロプロセッサに誤動作が
生じた場合には 誤動作時点の内部レジスタの内容の観
察を行しく 誤動作の原因を推測してい九 またテスト
時において、マイクロプロセッサの内部動作の推移を推
測するためへ 逐次内部レジスタの内容を観察するに必
要な複数の命令をテストプログラムに前記観察対象のレ
ジスタに応じて挿入する必要があつ九 発明が解決しようとする課題 従来のマイクロプロセッサのテスト方法で(よ前記命令
の実行に伴い一時格納するCPUレジスタを確保する必
要があり、前記命令により観測できるレジスタ(よ 前
記レジスタのリード/ライトがそれぞれ命令コード化さ
れているものに限られており、観察できるレジスタも自
ずから制限されていた そのた敢 マイクロプロセッサ
の誤動作の原因(上 前記命令により観察できるレジス
タから内部状態の推移を推測して検討するという経緯を
たどり、誤動作の原因を検出するのに多大の時間と労力
を要した また 前述のように命令によりマイクロプロセッサの内
部レジスタの内容を観察することはできる力叉 観察し
たいタイミングにおけるレジスタの内容の保持もしくは
観察が困難であった今後、マイクロプロセッサの高機能
・高集積化に伴(\ マイクロプロセッサにキャッシュ
・TLB等が搭載される傾向にあり、より一層内部状態
の観察が困難になり、テストに多大の時間を要する傾向
にあム そのた数 テスト時においてより多くの内部状
態を、観察すべきタイミングにおいて観察できるように
してテスト/デパックの効率化を図る必要があム 本発明(友 上述の課題に鑑みてなされ 内部状態を表
わしているレジスタの時間的推移を観察しマイクロプロ
セッサの動作の推移を把握することができるマイクロプ
ロセッサのテスト方法を提供することを目的とすム 課題を解決するための手段 本発明は 上述の課題を解決するために マイクロプロ
セッサに複数存在する観察対象レジスタに対して、観察
対象のレジスタからレジスタを選択するセレクトレジス
タを投法 前記セレクトレジスタをソフトウェアで書き
換えることにより、より多くの観察対象のレジスタを選
択できるようにすも そして、前記セレクトレジスタに
選択された観察対象のレジスタの内容を内部バスを介し
通常動作において使用していない空き期間に逐次出力し
て前記観察対象のレジスタが観察できる機能を有したも
のである。
Conventionally, when a malfunction occurs in a microprocessor during a test, it is necessary to observe the contents of the internal registers at the time of the malfunction to infer the cause of the malfunction. The problem to be solved by the present invention is that it is necessary to insert multiple instructions necessary to sequentially observe the contents of internal registers into a test program according to the registers to be observed. It is necessary to secure a CPU register for temporary storage as the instruction is executed, and registers that can be observed by the instruction (i.e., registers that can be read and written are limited to registers that are coded as instructions). Causes of malfunctions in microprocessors (Part 1) It takes a lot of time to trace the process of inferring and examining the internal state transitions from the registers that can be observed by the above instructions, and to detect the causes of malfunctions. In addition, as mentioned above, it is possible to observe the contents of the internal registers of a microprocessor using commands.However, it was difficult to maintain or observe the contents of the registers at the desired timing.・As microprocessors become more highly integrated (cache, TLB, etc. tend to be installed in microprocessors, it becomes even more difficult to observe the internal state, and testing tends to take a lot of time). It is necessary to improve the efficiency of testing/depacking by making it possible to observe more internal states at the appropriate timing. An object of the present invention is to provide a method for testing a microprocessor that is capable of observing the changes in the operation of the microprocessor and understanding the changes in the operation of the microprocessor. A select register that selects a register from among the observation target registers that exist in the processor can be used.By rewriting the select register with software, it is possible to select more observation target registers. The register has a function of sequentially outputting the contents of the register to be observed selected by the select register through an internal bus during an idle period not used in normal operation so that the register to be observed can be observed.

さらに 観察対象のレジスタをプログラミングされたタ
イミングで、FIFOレジスタに格納していき、前記F
IFOレジスタの内容を観察することで、前記観察対象
のレジスタのテストプログラム上での流れを検出し マ
イクロプロセッサの内部動作の状況を容易に把握できる
機能を有したものである。
Furthermore, the register to be observed is stored in the FIFO register at the programmed timing, and the
By observing the contents of the IFO register, it is possible to detect the flow of the register to be observed in the test program and to easily grasp the status of the internal operation of the microprocessor.

作用 本発明は 上述の構成によって、観察対象のレジスタを
選択するセレクトレジスタを設けることにより、観察し
たいレジスタを、外部へアクセスしていない期間に外部
バスを共有して観察することが可能であム また観察対
象のレジスタをプログラミングされたタイミングにおい
てFIFOレジスタに格納することにより、前記観察対
象のしジスタの推移の観察が可能となム 実施例 (実施例1) 第1図は本発明の実施例1におけるマイクロプロセッサ
のテスト方法の構成図であも 第1図において、マイクロプロセッサl O1+&主に
CPU (中央処理装置)102、命令キャッシュ10
3、データキャッシュ104、バス制all装置105
、セレクトレジスタ108で構成されてい、L  CP
U102と命令キャッシュ103のモジュール内にそれ
ぞれ内部状態を保持するレジスタ106,107が存在
すも セレクトレジスタ108i;l、3部108Aと8部1
08Bに分割され 3部108Aのビットパターンによ
り、 レジスタ106,107の選択を行(\ 選択さ
れたレジスタをセレクタ120を介してモニタバス12
1に接続す4 また8部108B(よ モニタイネーブ
ルビットであり、8部108Bがl″のとき外部でモニ
タバス121の内容を観察するモードとなる。 リセッ
ト時(よ 8部108Bは0”になる。ここで観察対象
のレジスタ106,107ζよ それぞれPC(プログ
ラム・カウンタ)・命令コードをフェッチしているレジ
スタを表している場合を考えも 以下に 説明に使用する命令コードを定義すム命令コー
ド[l]: セレクトレジスタ108に2進法で”10
000001″をライトすム この場合58108Aに
は2進法で”1000000″が対応LE部108Bに
は″1″′が対応す第4図はマイクロプロセッサのテス
ト方法を示すタイミングチャートであり、状態(1)〜
(3)からなa 以下テスト時の動作を第4図を参照し
ながら説明する。
Effects of the present invention With the above-described configuration, by providing a select register for selecting a register to be observed, it is possible to observe a register to be observed by sharing an external bus during a period when the external bus is not accessed. Further, by storing the register to be observed in the FIFO register at the programmed timing, it is possible to observe the transition of the register to be observed. (Embodiment 1) FIG. 1 shows an embodiment of the present invention. 1 is a block diagram of the microprocessor testing method in FIG. 1. In FIG.
3. Data cache 104, bus-based all device 105
, a select register 108, L CP
There are registers 106 and 107 that hold the internal state in the U102 and instruction cache 103 modules, respectively.
The registers 106 and 107 are selected according to the bit pattern of the three parts 108A.
When connected to 1, 4 is also a monitor enable bit, and when 8 part 108B is 1'', it becomes a mode to externally observe the contents of monitor bus 121. At reset (8 part 108B is set to 0). Here, let us consider the case where the observed registers 106 and 107ζ respectively represent the PC (program counter) and the register that fetches the instruction code. [l]: Input “10” in binary to the select register 108.
000001'' is written. In this case, 58108A corresponds to ``1000000'' in binary, and LE section 108B corresponds to ``1''. 1) ~
(3) From a The operation during the test will be explained below with reference to FIG.

状態(1): セレクトレジスタ108の8部108B
が11011のとき、通常モードであり、CPU102
がアクセスするアドレスに対して命令/データキャッシ
ュがヒツトし 外部へのアクセスがない場合 外部アド
レスバス122はHin状態になっていも また命令キャッシュ103力<、  CPU102の命
令キャッシュ103へのリクエスト信号CIREQII
Oに対してミスヒツトしたとき、命令キャッシュ103
 U  リクエスト信号IBREQ115をバス制御装
置105に出力し外部ヘアドレスバス122を介してア
ドレスを出力すム状態(2): 既存のテストプログラ
ムに 命令コード[1]を挿入すム セレクトレジスタ
108の3部108Aの最上位ビット!&CPUのレジ
スタ106をモニタバス121に接続するイネーブル信
号になっているので、命令コード[1]により、 レジ
スタ106をモニタバス121に接続することになム 命令キャッシュ103力<、 CPU102のCIRE
QIIOに対してヒツトし かつデータキャッシュ10
4もCPU102のデータキャッシュへのリクエスト信
号CDREQI 13に対してヒツトしたとき、命令キ
ャッシュ103のヒツト信号CIHIT109を使用し
 モニタバス121を外部へ出力するためのリクエスト
信号TBREQ119をバス制御装置105に与えも 
リクエスト信号TBREQI 19が与えられたバス制
御装置1051よ 状態(1)とは異なり外部へはアク
セスしない力丈 モニタバス121を介してCPUの内
部レジスタ106の内容が外部アドレスバス122に出
力される。
State (1): Part 8 108B of select register 108
When is 11011, it is the normal mode and the CPU 102
When the instruction/data cache hits the address accessed by the CPU 102 and there is no external access, even if the external address bus 122 is in the Hin state, the request signal CIREQII to the instruction cache 103 of the CPU 102 is sent to the instruction cache 103.
When there is a miss to O, the instruction cache 103
U State (2) where the request signal IBREQ115 is output to the bus control device 105 and the address is output via the external address bus 122: Inserting the instruction code [1] into the existing test program Three parts of the select register 108 The most significant bit of 108A! & Since it is an enable signal to connect the register 106 of the CPU to the monitor bus 121, instruction code [1] causes the register 106 to be connected to the monitor bus 121.
Hit against QIIO and data cache 10
4, when the request signal CDREQI 13 to the data cache of the CPU 102 is hit, the hit signal CIHIT 109 of the instruction cache 103 is used to provide the request signal TBREQ 119 for outputting the monitor bus 121 to the outside to the bus control device 105.
The bus control device 1051 to which the request signal TBREQI 19 is applied does not access the outside, unlike state (1).The contents of the internal register 106 of the CPU are output to the external address bus 122 via the monitor bus 121.

(3)命令キャッシュ103力<  CPU102のC
rREQl 10に対してヒラhL、  データキャッ
シュ104力(CPU102のCDREQ113に対し
てミスヒツトしたとき、モニタバス121を外部へ出力
するためのリクエスト信号TBR,EQ119i1  
データキャッシュのリクエスト信号DBREQI 17
により取り消され データキャッシュ104 L  前
記リクエスト信号117により外部へアクセスレ アド
レスバス122にアドレスを出力する。
(3) Instruction cache 103 power < CPU 102 C
hL for rREQl 10, data cache 104 power (request signal TBR, EQ119i1 for outputting monitor bus 121 to the outside when there is a miss to CDREQ113 of CPU 102)
Data cache request signal DBREQI 17
The data cache 104 L outputs an address to the external address bus 122 in response to the request signal 117.

以上のように本実施例では 外部アドレスバス122が
HiZ状態時にモニタバス121の内容を出力すること
になるので、マイクロプロセッサの外部へのアクセス動
作の妨げにならず、かつ外部アドレスバス112を共有
して内部のPCレジスタの内容が逐次観察できることに
なム つまり、マイクロプロセッサのテスト時セレクタ
レジスタ108のE部108Bを′″ l″″とするこ
とにより、通常動作時HiZ状態であるタイミングで、
PCレジスタの内容を内部バスであるモニタバス121
を介して動的に観察できることになム この情報により
、CPUとキャッシュのアクセスにおいて外部には全く
つかめなったPCの変詠 すなわちプログラムの流れが
把握でき、テスト/デパックの効率化が図れる。さらに
外部アドレスバス122を観察時に共有して使用するの
で新たにテスト用のビンを付加する必要はな(ち また
 前記セレクトレジスタ1081−1.  命令により
書き換え可能であり、既存のテストプログラムに一命令
追加するだけですベ テスト時におけるテストプログラ
ムの修正時間はほとんどかからないと共に ソフトウェ
アでテストの対応が図れる。
As described above, in this embodiment, the contents of the monitor bus 121 are output when the external address bus 122 is in the HiZ state, so it does not interfere with the microprocessor's access operation to the outside, and the external address bus 112 is shared. In other words, by setting the E part 108B of the selector register 108 to ``l'''' during testing of the microprocessor, the contents of the internal PC register can be observed sequentially at the timing when it is in the HiZ state during normal operation.
The contents of the PC register are transferred to the monitor bus 121, which is an internal bus.
With this information, it is possible to understand the PC changes in CPU and cache accesses, that is, the program flow, which are completely invisible to the outside, and to improve the efficiency of testing/depacking. Furthermore, since the external address bus 122 is shared and used during observation, there is no need to add a new test bin. It takes almost no time to modify the test program at the time of testing, and the test can be handled by software.

(実施例2) 第2図は本発明の実施例2におけるマイクロプロセッサ
のテスト方法の構成図である。第2図において、第1図
と同一の機能を有するものには同一の番号を付して詳細
な説明を省略する。実施例2のマイクロプロセッサ20
1!!、  実施例1のマイクロプロセッサ101の有
すへ ある特定のレジスタの内容をモニタバスを介して
外部から観察できる機能に加え 複数のレジスタの内容
を順次ある期皿 モニタバスを介して外部から観察でき
る機能をも有す4 マイクロプロセッサ20 l i&  主にCPU (
中央処理装置)102、命令キャッシュ103、データ
キャッシュ104、バス制御装置105、セレクトレジ
スタ208、デコーダ209、カウンタ回路210で構
成されていも セレクトレジスタ20g?;As部208Aと0部20
8Bと8部208Cに分かれ 8部208Aのビットパ
ターンによりデコーダ209及びカウンタ回路210を
用いて観察対象レジスタ106.107の選択を行し\
 選択されたレジスタをセレクタ120を介してモニタ
バス121に接続すム まf;  C部208Bi表 
カウンタ回路210の設定部であり、さらにE部20g
C1;i  モニタイネーブルビットで、8部208C
のビットが1″のとき外部でモニタバス121を観察す
るモードとな4 リセット時(よ 8部208CはII
  O″になム ここで観察対象のレジスタ106,107iよ それぞ
れPC(プログラム・カウンタ)・命令コードをフェッ
チしているレジスタを表している場合を考えも 以下に
説明に使用する命令コードを定義すム 命令コード[2]: セレクトレジスタ208に2進法
で” 10100101’″をライトすも この場合S
部208Aに2進法で” 101”が対応し 0部20
8Bに” 0010”が対応LE部208Cにn  I
nが対応している。
(Embodiment 2) FIG. 2 is a block diagram of a microprocessor testing method according to Embodiment 2 of the present invention. In FIG. 2, parts having the same functions as those in FIG. 1 are given the same numbers and detailed explanations will be omitted. Microprocessor 20 of Example 2
1! ! The microprocessor 101 of Embodiment 1 has a function that allows the contents of a specific register to be observed from the outside via the monitor bus, as well as the ability to sequentially observe the contents of a plurality of registers from the outside via the monitor bus. 4 microprocessors 20 l i & mainly CPU (
The select register 20g? ;As part 208A and 0 part 20
It is divided into 8B and 8 part 208C, and the observation target register 106 and 107 is selected using the decoder 209 and counter circuit 210 according to the bit pattern of 8 part 208A.
Connect the selected register to the monitor bus 121 via the selector 120.
It is a setting section of the counter circuit 210, and also an E section 20g.
C1;i Monitor enable bit, 8 parts 208C
When the bit is 1'', it is a mode for observing the monitor bus 121 externally.
Let's consider the case where the registers 106 and 107i to be observed represent the PC (program counter) and the register that fetches the instruction code, respectively.The instruction codes used in the explanation below are defined. Program instruction code [2]: Write "10100101'" in binary to the select register 208. In this case, S
"101" corresponds to part 208A in binary notation, which is part 0 20.
"0010" corresponds to 8B, n I to LE section 208C
n corresponds.

第5図はマイクロプロセッサのテスト方法を示すタイミ
ングチャートであり、状態(1)〜(3)からなa 以
下テスト時の動作を第5図を参照しながら説明する。
FIG. 5 is a timing chart showing a microprocessor testing method, and includes states (1) to (3).A The operation during the test will be described below with reference to FIG.

状態(1): セレクタレジスタ208の8部208C
が0″のとき、通常モードであり外部アドレスバス12
2は 内部アドレスバス116.118を出力する場合
以外はHiZ状態になっている。その場合JiCPU1
02がアクセスするアドレスに対して命令/データキャ
ッシュがヒットレ 外部へアクセスがなかった時であム
命令キャッシュ103力tcPU102の命令キャッシ
ュに対するリクエスト信号CIREQ110に対してミ
スヒツトしたとき、命令キャッシュ103 i表  バ
ス制御装置105に対するリクエスト信号IBREQ1
15をバス制御装置105に出力し外部へアクセスすム 状態(2): 既存のテストプログラムへ 命令コード
[2]を挿入すム セレクトレジスタ208の8部20
8Aの3ビツトは CPU102のレジスタ106と命
令キャッシュ103のレジスタ107をそれぞれモニタ
バス121に接続するイネーブル信号になっているので
、前記命令コード[2]により、 レジスタ106,1
07をそれぞれモニタバス121に接続すム レジスタ
106,107をそれぞれモニタバス121に接続する
タイミングはセレクトレジスタ208の0部208Bの
カウンタ値で規定されも セレクトレジスタ208の0
部208Bのカウンタ値を用いカウンタ回路210で内
部クロックに対して−1ずつのカウントを行t、%  
前記カウントが#0″になったタイミングで前記セレク
トレジスタ208の8部208Aで指定されているレジ
スタを順次モニタバス121に接続す4 すなわち命令コード[2]が実行され セレクタレジス
タ208のE部208Cに″ l′″が書き込まれた時
点でセレクトレジスタ208の8部208Aで示される
CPUのレジスタ106がモニタバス121に接続され
 次に0部208Bで示されるカウンタ値よるカウント
が終了時点で次の観察レジスタである命令キャッシュの
レジスタ107がモニタバス121に接続されも モニ
タバス121に接続される観察対象のレジスタの順番は
 セレクトレジスタ208の8部208Aのビットパタ
ーンで″ 1′″に対応する観察対象のレジスタに対し
て、デコーダ209で決定される。カウンタ回路210
のカウントfL  E部がI+  111の間繰り返さ
れも このように順次セレクトレジスタ208の8部2
08Aで指定される複数の観察対象のレジスタに対して
、0部208Bで指定されるカウント幅で前記複数のレ
ジスタ106,107を順次モニタバス121に接続す
る。
State (1): Part 8 208C of selector register 208
When is 0'', it is the normal mode and the external address bus 12
2 is in HiZ state except when outputting the internal address bus 116.118. In that case JiCPU1
When there is no external access to the address accessed by tcPU 102 and there is a miss in response to the request signal CIREQ110 for the instruction cache of instruction cache 103 and tcPU102, Request signal IBREQ1 to device 105
15 is output to the bus control device 105 and accessed externally (2): Inserting instruction code [2] into the existing test program 8 part 20 of the select register 208
The 3 bits of 8A are enable signals that connect the register 106 of the CPU 102 and the register 107 of the instruction cache 103 to the monitor bus 121, so the instruction code [2] allows registers 106 and 1 to be connected to the monitor bus 121.
The timing at which registers 106 and 107 are connected to the monitor bus 121 is determined by the counter value in the 0 part 208B of the select register 208.
Using the counter value of the unit 208B, the counter circuit 210 counts the internal clock by -1 in rows t and %.
At the timing when the count reaches #0'', the registers designated by the 8 part 208A of the select register 208 are sequentially connected to the monitor bus 1214. That is, the instruction code [2] is executed, and the E part 208C of the select register 208 is executed. When "l'" is written to , the register 106 of the CPU indicated by the 8 part 208A of the select register 208 is connected to the monitor bus 121, and when the count based on the counter value indicated by the 0 part 208B ends, the next Even if the instruction cache register 107, which is an observation register, is connected to the monitor bus 121, the order of the observation target registers connected to the monitor bus 121 is the observation corresponding to "1" in the bit pattern of the 8 part 208A of the select register 208. Determined by the decoder 209 for the target register.Counter circuit 210
Even if the count fL E section is repeated for I+ 111, the 8 section 2 of the select register 208 is
For the plurality of observation target registers specified by 08A, the plurality of registers 106 and 107 are sequentially connected to the monitor bus 121 with a count width specified by the 0 section 208B.

命令キャッシュ103力<、CPU102のCIREQ
IIOに対してヒツトL  かつデータキャッシュ10
4k  CPUのデータキャッシュに対するリクエスト
信号CDREQI l 3に対してヒツトしたとき、前
記命令キャッシュ103のヒツト信号CBREQI O
9を使用し モニタバス121を外部へ出力するための
リクエスト信号TBREQI 19をバス制御装置10
5に与えも 前記リクエスト信号が与えられたバス制御
装置1051ム 状態(1)とは異なり外部へはアクセ
スせず、モニタバス121を外部アドレスバス122に
出力するに留まム よって外部で(よ アクセスが行わ
れていない期間のアドレスバスバス122のデータを観
察すれば良(− 状態(3): 命令キャッシュ103力<、CPU10
2のCIREQI 10に対してヒツトし データキャ
ッシュ104力丈 CPU102のCDREQ113に
対してミスヒツトしたとき、モニタバス121を外部へ
出力するためのリクエスト信号TBREQI 19より
、データキャッシュのリクエスト信号DBREQI 1
7の方を優先しバス制御装置105へ供与し 外部アド
レスバス122に内部アドレスバス118を出力し外部
へアクセスすも 以上のように本実施例で(よ 前記外部アドレスバス1
22がHiZ状態時にモニタバス1221のデータを出
力することになるので、マイクロプロセッサの外部への
アクセス動作に妨げにならず、かつ外部アドレス122
を共有して内部のPCレジスタの内容とキャッシュのア
ドレスの内容が順次観察できることになム つまり、セ
レクタレジスタ208のE部を” 1′とすることによ
り、通常動作時HiZ状態であると箇所で、PCレジス
タの内容とキャッシュのアドレスの内容をプログラムで
きるカウンタ間隔で順次内部バスであるモニタバス12
1を介して動的に観察できることになム この情報によ
り、CPUとキャッシュのアクセスにおいて外部には全
くつかめなったPCの変動とキャッシュにおけるアドレ
スが観察でき、プログラムの流れが直接把握できること
になり、テストの効率化が図れる。さらに外部アドレス
122を観察時に共有して使用するので新たにテスト用
のビンを付加する必要はなしも また 前記セレクトレ
ジスタ208は 命令により書き換え可能であり、既存
のテストプログラムに一命令追加するだけですみソフト
ウェアでの変更でテストが可能となも (実施例3) 第3図は本発明の実施例3におけるマイクロプロセッサ
のテスト方法の構成図であム 第3図において、マイクロプロセッサ301はセレクト
レジスタ304と、 CPU310と、デコーグ307
と、カウンタ回路306と、 FrF○カウンタ回路3
12と、 F’IF○レジスタ305を備え、マイクロ
プロセッサ301のCPU31Oに観察対象のレジスタ
302,303が存在すム 以下に説明に使用する命令コードを定義する。
Instruction cache 103 power <, CIREQ of CPU 102
Hit L for IIO and data cache 10
When the request signal CDREQI l 3 for the data cache of the 4k CPU is hit, the hit signal CBREQI O of the instruction cache 103 is hit.
9 is used to send the request signal TBREQI 19 for outputting the monitor bus 121 to the outside to the bus control device 10.
5, the bus control device 1051 to which the request signal is given does not access the outside, unlike state (1), but only outputs the monitor bus 121 to the external address bus 122. All you have to do is observe the data on the address bus 122 during a period when no access is being made (- State (3): Instruction cache 103 power <, CPU 10
When there is a hit to CIREQI 10 of the data cache 104 and a miss to CDREQ 113 of the CPU 102, the data cache request signal DBREQI 1 is output from the request signal TBREQI 19 for outputting the monitor bus 121 to the outside.
7 is prioritized and provided to the bus control device 105, and the internal address bus 118 is output to the external address bus 122 to access the outside.
22 outputs the data on the monitor bus 1221 when the external address 122 is in the HiZ state.
In other words, by setting the E part of the selector register 208 to ``1'', it is possible to see the contents of the internal PC register and cache address in sequence by sharing the contents of the internal PC register and the contents of the address of the cache. , a monitor bus 12, which is an internal bus, is used to sequentially program the contents of PC registers and cache addresses at counter intervals.
1. With this information, it is possible to observe PC fluctuations and cache addresses that are completely invisible to the outside in CPU and cache accesses, and it is possible to directly understand the program flow. Test efficiency can be improved. Furthermore, since the external address 122 is shared and used during observation, there is no need to add a new test bin.Also, the select register 208 can be rewritten by an instruction, so it is only necessary to add one instruction to an existing test program. Testing is possible by changing software (Third Embodiment) FIG. 3 is a block diagram of a microprocessor testing method according to a third embodiment of the present invention. In FIG. , CPU310, and decoding 307
, counter circuit 306, and FrF○ counter circuit 3
The CPU 31O of the microprocessor 301 has registers 302 and 303 to be observed.The instruction codes used in the explanation are defined below.

命令コード[3]; セレクトレジスタ304に2進数
で°″ 10000111″をライトする。前記ビット
パターンはセレクトレジスタ304の8部304Aに″
 10″”、0部304Bに′″ 00011”°、8
部304Cに”′ 1′″を表している。
Instruction code [3]: Write °″10000111″ in binary to the select register 304. The bit pattern is stored in the 8 part 304A of the select register 304.
10'''', 0 part 304B'''00011''°, 8
"'1'" is shown in the portion 304C.

命令コード[4]+  FIF○レジスタ305のデー
タをカウンタ回路312に従いアドレッシングされたF
IFOレジスタ305のアドレスから順次外部ヘスドア
する。
Instruction code [4] + FIF○ register 305 data addressed according to counter circuit 312
The data is sequentially accessed from the address of the IFO register 305 to the outside.

第6図はマイクロプロセッサのテスト方法を示すタイミ
ングチャートである。以下テスト時の動作を第6図を参
照しなから説明すも 既存のテストプログラムに 観察対象のレジスタを観察
したいタイミングに命令コード[3]と、外部へFIF
Oレジスタ306の内容をストアしたいタイミングに命
令コード[4]を挿入する。
FIG. 6 is a timing chart showing a microprocessor testing method. The operation during the test will be explained below with reference to Figure 6. In the existing test program, at the timing when you want to observe the register to be observed, input the instruction code [3] and send the FIF to the outside.
Insert instruction code [4] at the timing when you want to store the contents of the O register 306.

今、セレクトレジスタ304の8部304Aの上位ビッ
ト(よ レジスタ302を選択していも上記のテストプ
ログラムを付加してマイクロプロセッサを動作させも 
命令コード[3コが実行され セレクタレジスタ304
に16進で′″0x87″が書き込まれるとともに セ
レクトレジスタ304の8部304Cをカウント開始信
号としてカウンタ回路306においてセレクトレジスタ
304の0部304Bのカウント数のカウントダウンを
行う。
Now, even if the upper bits of the 8th part 304A of the select register 304 (Yo) are selected, the microprocessor cannot be operated by adding the above test program.
Instruction code [3 codes are executed selector register 304
``0x87'' is written in hexadecimal format, and the counter circuit 306 counts down the count in the 0 section 304B of the select register 304 using the 8 section 304C of the select register 304 as a count start signal.

そして、前記0部304Bのカウント数分のカウントが
終了後、カウンタ回路306 ft  カウントエンド
信号311を発生し カウンタ回路312(よ 前記カ
ウントエンド信号311によりFIF○レジスタ305
のアドレッシングを行し\ アドレッシングされたアド
レスをFIFOアドレス309を介してFIFOレジス
タ305に送り、FIFOレジスタ305 (友  前
記カウントエンド信号311をイネーブル信号としてレ
ジスタ302の内容をFIFOアドレス309で示され
るレジスタに格納すム このとき、カウンタ回路306
のカウント+;t、FIFOレジスタ305に内蔵され
たレジスタの数たけ繰り返される。また カウンタ回路
3061;A  内部クロックに同期してカウントをす
a すなわち命令コード[3]を実行した夕・rミンク
で、 レジスタ302の内容力(セレクトレジスタ30
4の0部304Bで指定されたの値である3クロツク毎
にFIFOレジスタの段数分レジスタ302の内容がF
IF○レジスタ305に格納されて行く。
After the count of the 0 section 304B is completed, the counter circuit 306 generates a count end signal 311, and the counter circuit 312 generates a count end signal 311.
The addressed address is sent to the FIFO register 305 via the FIFO address 309, and the content of the register 302 is transferred to the register indicated by the FIFO address 309 using the count end signal 311 as an enable signal. At this time, the counter circuit 306
The count +;t is repeated as many times as there are registers included in the FIFO register 305. In addition, the counter circuit 3061; A counts in synchronization with the internal clock. That is, when the instruction code [3] is executed, the contents of the register 302 (select register 30
Every 3 clocks, which is the value specified in the 0 part 304B of 4, the contents of the register 302 are changed to F for the number of stages of the FIFO register.
It is stored in the IF○ register 305.

そして、命令コード[4]によってFIFOレジスタ3
05に格納されている3クロツク毎のレジスタ302の
内容力丈 FIF○カウンタ回路312でアドレッシン
グが行われ順次出力される。
Then, by instruction code [4], FIFO register 3
The contents of the register 302 every three clocks stored in 05 are addressed by the FIF○ counter circuit 312 and sequentially output.

これにより、プログラム中に使用されているレジスタを
意識しないで、容易にテストプログラムを変更でき、内
部レジスタの内容をプログラミング可能な等間隔のタイ
ミングで一時格納して外部へ出力し観察対象のレジスタ
の時間に対する履歴が観察でき、さらにテスト時観察し
たいレジスタを命令コード[3]のみの変更で設定でき
ることか社 内部状態の観察向上か図られると共に マ
イクロプロセッサの内部動作の把握を容易にし テスト
/デバッグの一層の効率化が図れる。
This allows you to easily change the test program without being aware of the registers used in the program, and temporarily stores the contents of internal registers at programmable regular intervals and outputs them externally. The history over time can be observed, and the registers to be observed during testing can be set by changing only the instruction code [3]. This not only improves the observation of the internal state of the microprocessor, but also makes it easier to understand the internal operation of the microprocessor and improve testing/debugging. Further efficiency can be achieved.

な耘 外部信号を上記命令コード[3]の8部304C
の代わりに使用して、セレクタレジスタ304の8部で
指定されたレジスタをFIFOレジスタ305にライト
するタイミングをはかるのも同等の効果が実現できも 
この場合セレクトレジスタ304で指定されたレジスタ
の内容をFIF○レジスタ305に順次格納するタイミ
ングを外部信号により制御できる効果があ本 発明の効果 マイクロプロセッサにキャッシュを搭載している場合、
CPUとキャッシュとのアクセスが多くなるほど、外部
へのアクセスが減少すも テスト時、マイクロプロセッ
サの内部動作の推移の把握は 外部で観察される情報に
より行うので、前述のように外部へのアクセスが減少し
 それに伴い外部で観測される情報も減少することは 
マイクロプロセッサの内部動作の推移の観察を困難にし
テスト時間を増大させる力(以上の説明から明らかなよ
うに本発明により、セレクタレジスタにより多くの内部
状態を格納している内部レジスタを一命令で指定でき、
外部バスを共有して前記セレクタレジスタで指定された
内部レジスタの内容を出力することで前記内部レジスタ
の内容の推移を動的に観測でき、まr、:、FIFOレ
ジスタに前記セレクタレジスタで指定された内部レジス
タの内容を順次格納することで、テストプログラムに使
用しているレジスタを意識せず内部レジスタの内容を観
察するための命令を挿入することができ、さらに前記内
部レジスタの内容の推移を静的に観察することができる
ことか紋 高機能・高集積化されつつあるマイクロプロ
セッサのテスト/デバッグの容易化・高速化の一端を担
う。
Please send the external signal to part 8 of the instruction code [3] above, 304C.
The same effect can be achieved by using this instead of , and timing the writing of the register specified by part 8 of the selector register 304 to the FIFO register 305.
In this case, there is an effect that the timing of sequentially storing the contents of the register specified by the select register 304 in the FIF○ register 305 can be controlled by an external signal.The effect of the present invention is that when the microprocessor is equipped with a cache,
As the number of accesses between the CPU and cache increases, the number of external accesses decreases. However, during testing, the transition in the internal operation of a microprocessor is determined by information observed externally, so as mentioned above, external accesses are reduced. As a result, information observed externally will also decrease.
Forces that make it difficult to observe the transition of internal operations of a microprocessor and increase test time I can,
By sharing the external bus and outputting the contents of the internal register specified by the selector register, it is possible to dynamically observe the changes in the contents of the internal register. By sequentially storing the contents of the internal registers, it is possible to insert instructions to observe the contents of the internal registers without being aware of the registers being used in the test program. It is something that can be observed statically.It plays a role in making testing and debugging of microprocessors, which are becoming more sophisticated and highly integrated, easier and faster.

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

第1図は本発明の実施例1におけるマイクロプロセッサ
のテスト方法の構成図 第2図は本発明の実施例2にお
けるマイクロプロセッサのテスト方法の構成@ 第3図
は本発明の実施例3におけるマイクロプロセッサのテス
ト方法の構成図 第4図は実施例1におけるマイクロプ
ロセッサのテスト方法を示すタイミングチャート図 第
5図は実施例2におけるマイクロプロセッサのテスト方
法を示すタイミングチャート図  第6図は実施例3に
おけるマイクロプロセッサのテスト方法を示すタイミン
グチャート図であム 101.201,301・・・マイクロプロセッサ、1
02.310・・・CPU (中央処理装置)、 10
3・・・命令キャッジx104・・・データキャッシュ
、105・・・バス制御装置 106,107,302
,303・・・内部レジス久 108,208,304
・・・セレクタレジスタ 108A・・・セレクトフィ
ールド、108B・・・モニタイネーブルビット、 1
21・・・モニタバフ、、 122,3Cl・・・アド
レスバ/、  208A・・・セレクトフィールド、 
208B・・・カウンタフィールド、 208C・・・
モニタイネーブルビット、209.307・・・デコー
ダ、 210,306・・・カウンタ回廠 304A−
・・セレクトフィールドミ 304B・・・カウンタフ
ィールド、 304C・・・モニタイネーブルビット、
 305・・・FIFOレジス久 308・・・データ
バ人 代理人の氏名 弁理士 小鍜治 明 ほか2名第1図 第2図
Figure 1 is a configuration diagram of a microprocessor testing method according to a first embodiment of the present invention. Figure 2 is a configuration diagram of a microprocessor testing method according to a second embodiment of the present invention. A configuration diagram of a processor testing method. FIG. 4 is a timing chart showing a microprocessor testing method in the first embodiment. FIG. 5 is a timing chart showing a microprocessor testing method in the second embodiment. FIG. 6 is a timing chart showing a microprocessor testing method in the second embodiment. 101.201,301...Microprocessor, 1
02.310...CPU (central processing unit), 10
3... Instruction cache x104... Data cache, 105... Bus control device 106, 107, 302
,303...Internal Registry 108,208,304
...Selector register 108A...Select field, 108B...Monitor enable bit, 1
21...Monitor buff, 122,3Cl...Address bar/, 208A...Select field,
208B...Counter field, 208C...
Monitor enable bit, 209.307...Decoder, 210,306...Counter circulation 304A-
...Select field 304B...Counter field, 304C...Monitor enable bit,
305...FIFO Regis Hisashi 308...Name of the data server's agent Patent attorney Akira Okaji and 2 others Figure 1 Figure 2

Claims (3)

【特許請求の範囲】[Claims] (1)マイクロプロセッサにおいて、内部状態を保持す
る観察対象の複数のレジスタと、この複数の観察対象の
レジスタの中からレジスタの選択に用いられるセレクト
レジスタとを備え、 CPUのキャッシュに対するアドレスにおいてキャッシ
ュがヒットし、外部へのアクセスがない状態において、
前記キャッシュのヒット信号を前記選択された観察対象
のレジスタの外部へのアクセスリクエスト信号に使用し
、前記選択された観察対象のレジスタを内部バスを介し
て外部へ出力し、前記選択された観察対象のレジスタを
観察することを特徴としたマイクロプロセッサのテスト
方法。
(1) A microprocessor is equipped with a plurality of registers to be observed that hold internal states, and a select register used to select a register from among the registers to be observed, and the cache is In a state where there is a hit and there is no access to the outside,
The hit signal of the cache is used as an access request signal to the outside of the register of the selected observation target, the register of the selected observation target is output to the outside via an internal bus, and the register of the selected observation target is output to the outside via an internal bus. A microprocessor testing method characterized by observing the registers of a microprocessor.
(2)請求項1記載のマイクロプロセッサにおいて、複
数の観察対象の内部レジスタの中からのレジスタの選択
に用いられるセレクトレジスタにカウンタフィードを設
置し、前記セレクトレジスタで指定された複数の内部レ
ジスタを前記カウンタフィードの値を用い時系列に観察
することを特徴としたマイクロプロセッサのテスト方法
(2) In the microprocessor according to claim 1, a counter feed is installed in a select register used for selecting a register from among a plurality of internal registers to be observed, and a counter feed is installed in a select register used to select a register from among a plurality of internal registers to be observed; A method for testing a microprocessor, characterized in that the value of the counter feed is observed in time series.
(3)マイクロプロセッサにおいて、内部状態を保持す
る観察対象の複数の内部レジスタと、この察対象のレジ
スタの中からレジスタの選択に用いられるセレクトレジ
スタと、カウンタレジスタと、FIFOレジスタとを備
え、 前記カウンタレジスタのカウント値より前記FIFOレ
ジスタの段数分のタイミングを生成し、前記タイミング
において前記セレクトレジスタにより選択されたレジス
タの内容を前記FIFOレジスタに順次格納し、前記F
IFOレジスタに格納された内容を観察することを特徴
としたマイクロプロセッサのテスト方法。
(3) A microprocessor, comprising a plurality of internal registers to be observed that hold internal states, a select register used to select a register from among the registers to be observed, a counter register, and a FIFO register, and Generate timing for the number of stages of the FIFO register from the count value of the counter register, sequentially store the contents of the register selected by the select register at the timing in the FIFO register, and
A microprocessor testing method characterized by observing the contents stored in an IFO register.
JP2288703A 1990-10-26 1990-10-26 Microprocessor test method Pending JPH04162147A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2288703A JPH04162147A (en) 1990-10-26 1990-10-26 Microprocessor test method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2288703A JPH04162147A (en) 1990-10-26 1990-10-26 Microprocessor test method

Publications (1)

Publication Number Publication Date
JPH04162147A true JPH04162147A (en) 1992-06-05

Family

ID=17733597

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2288703A Pending JPH04162147A (en) 1990-10-26 1990-10-26 Microprocessor test method

Country Status (1)

Country Link
JP (1) JPH04162147A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH086918A (en) * 1994-06-15 1996-01-12 Nec Corp Microcomputer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH086918A (en) * 1994-06-15 1996-01-12 Nec Corp Microcomputer

Similar Documents

Publication Publication Date Title
US5812881A (en) Handshake minimizing serial to parallel bus interface in a data processing system
US4939637A (en) Circuitry for producing emulation mode in single chip microcomputer
KR100350568B1 (en) Data processing system and method for performing debug functions
JP4225851B2 (en) Trace element generation system for data processor
US5345580A (en) Microprocessor device and emulator device thereof
US20020194401A1 (en) DMA controller and semiconductor integrated circuit
US20030005255A1 (en) Method and system for fast data access using a memory array
US5862148A (en) Microcontroller with improved debug capability for internal memory
JPH02133834A (en) In-circuit emulator
US5903912A (en) Microcontroller configured to convey data corresponding to internal memory accesses externally
US5428770A (en) Single-chip microcontroller with efficient peripheral testability
US5900014A (en) External means of overriding and controlling cacheability attribute of selected CPU accesses to monitor instruction and data streams
US4667285A (en) Microcomputer unit
US4809167A (en) Circuitry for emulating single chip microcomputer without access to internal buses
JPH04162147A (en) Microprocessor test method
KR20010085997A (en) Thread-oriented debugging
US4618968A (en) Output compare system and method automatically controlilng multiple outputs in a data processor
US4888685A (en) Data conflict prevention for processor with input/output device
CN111625411A (en) Semiconductor device and debug system
US5704048A (en) Integrated microprocessor with internal bus and on-chip peripheral
US5396611A (en) Microprocessor use in in-circuit emulator having function of discriminating user&#39;s space and in-circuit emulator space
JP2001195281A (en) System monitoring device
JP5441219B2 (en) Semiconductor device and serial interface circuit
KR100542699B1 (en) Apparatus for supplying rom dump mode in microcontroller
JPS6237748A (en) Triagger signal generating system by firmware