[go: up one dir, main page]

JPH04123235A - Microprogram debugging method and method - Google Patents

Microprogram debugging method and method

Info

Publication number
JPH04123235A
JPH04123235A JP2244700A JP24470090A JPH04123235A JP H04123235 A JPH04123235 A JP H04123235A JP 2244700 A JP2244700 A JP 2244700A JP 24470090 A JP24470090 A JP 24470090A JP H04123235 A JPH04123235 A JP H04123235A
Authority
JP
Japan
Prior art keywords
memory
microprogram
tester
mpu
microprocessor
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
JP2244700A
Other languages
Japanese (ja)
Inventor
Yoshiaki Ochi
芳明 越智
Yasuhiko Hanaoka
花岡 安彦
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2244700A priority Critical patent/JPH04123235A/en
Publication of JPH04123235A publication Critical patent/JPH04123235A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術(第7,8図) 発明が解決しようとする課題(第7,8図)課題を解決
するための手段(第1,2図)作用(第1,2図) 実施例(第3.4,5.6図) 発明の効果 (概要) マイクロプログラムを格納するメモリと、マイクロプロ
グラムにしたがって動作を行うマイクロプロセッサとを
有するシステムで、マイクロプログラムの誤りを発見し
て訂正するために行うマイクロプログラムのデバッグ方
式及び方法に関し、処理速度が早く、作業性及び安全性
の高いマイクロプログラムのデバッグ方式及び方法を提
供することを目的とし、 操作者の指示により、前記マイクロプロセッサを休止状
態にする指示を行った後に前記メモリに対しアクセス可
能となるテスタと、前記テスタからの指示により、前記
マイクロプロセッサを休止状態にしで、当該マイクロプ
ロセッサと前記メモリとの接続を遮断し、当該メモリと
前記テスタとの間の接続に切り換える切換え回路と、を
設けた構成である。
[Detailed description of the invention] [Table of contents] Overview Industrial field of application Prior art (Figs. 7 and 8) Problems to be solved by the invention (Figs. 7 and 8) Means for solving the problems (Fig. 1) , 2) Effects (Figs. 1 and 2) Embodiments (Figs. 3.4 and 5.6) Effects of the invention (Summary) A memory that stores a microprogram and a microprocessor that operates according to the microprogram. The purpose of the present invention is to provide a microprogram debugging method and method that has high processing speed, high workability, and high safety, regarding a microprogram debugging method and method for discovering and correcting errors in a microprogram in a system that has a microprogram. A tester that can access the memory after instructing to put the microprocessor into a hibernation state according to instructions from an operator; This configuration includes a switching circuit that cuts off the connection between the microprocessor and the memory and switches the connection between the memory and the tester.

(産業上の利用分野) 本発明はマイクロプログラムのデバッグ方式及び方法に
係り、特に、マイクロプログラムを格納するメモリと、
当該マイクロプログラムにしたがって動作を行うマイク
ロプロセッサとを有するシステムで、前記マイクロプロ
グラムの誤りを発見して訂正するマイクロプログラムの
デバッグ方式及び方法に関する。
(Industrial Application Field) The present invention relates to a microprogram debugging system and method, and particularly relates to a memory for storing a microprogram,
The present invention relates to a microprogram debugging system and method for discovering and correcting errors in the microprogram in a system having a microprocessor that operates according to the microprogram.

〔従来の技術〕[Conventional technology]

従来、マイクロプログラムの障害が発生した場合、マイ
クロプログラムのデバッグ(の調査)を行う第一の従来
例に係るマイクロプログラムのデバッグ方式があった。
Conventionally, there has been a microprogram debugging method according to a first conventional example in which the microprogram is debugged (investigated) when a failure occurs in the microprogram.

本方式は第7図に示すように、デバッグ処理の対象とな
るマイクロプログラム及びデバッグ用プログラムを格納
するメモリ54と、当該マイクロプログラムにしたがっ
て動作を行うマイクロプロセッサ(MPU)51と、マ
イクロプログラムに障害があった場合に、操作者により
装着されで、デバッグ処理の指示を行うテスタ52と、
MPU51及び前記テスタ52からのアクセスが可能な
制御レジスタ群(アドレスレジスタ、データレジスタ、
及びR/Wレジスタ等)53とを有するものである。
As shown in FIG. 7, this system includes a memory 54 that stores a microprogram to be debugged and a debugging program, a microprocessor (MPU) 51 that operates according to the microprogram, and a tester 52 which is worn by an operator and instructs debugging when a debugging process occurs;
A group of control registers (address register, data register,
and R/W register, etc.) 53.

ここでいう、「デバッグ」とはプログラム中の誤りを検
出し、追跡し取除くことをいう。
"Debugging" as used herein means detecting, tracking, and removing errors in a program.

本例に係るマイクロプログラムのデバッグ方式は次のよ
うに動作する。
The microprogram debugging method according to this example operates as follows.

MPU51が実行しているメモリ54のI10領域に格
納されている前記マイクロプログラムに障害があると、
操作者により前記テスタ52が装着され、操作者により
、当該テスタ52に指示があると、当該テスタ52は前
記MPU51の外部割込み端子に割込み信号を出力する
If there is a failure in the microprogram stored in the I10 area of the memory 54 that is being executed by the MPU 51,
When the tester 52 is attached by the operator and the operator gives an instruction to the tester 52, the tester 52 outputs an interrupt signal to the external interrupt terminal of the MPU 51.

割込みがあると、MPU51は前記メモリ54のうちデ
バッグ処理用プログラムが格納されている領域を読み出
し、当該プログラムに従っで、割り込み処理を実行する
ことになる。
When an interrupt occurs, the MPU 51 reads an area of the memory 54 in which a debug processing program is stored, and executes the interrupt processing according to the program.

ここでいう、デバッグ処理は、操作者の指示により、M
PU51により実行されるものであっで、MPU51は
停止することなく、操作者が指示した必要なデータをデ
バッグ用プログラムに従って読み出し、読み出されたデ
ータを表示させるものである。
Here, the debugging process is performed by M
This is executed by the PU 51, and the MPU 51 reads necessary data instructed by the operator according to a debugging program without stopping, and displays the read data.

操作者は表示されたデータをマイクロプログラムが正し
く動作している場合に期待される期待値と比較しで、一
致または不一致を見で、当該マイクロプログラムの誤り
を発見したり、さらに、別のデータの読出しを指示した
りしてデバッグ処理が行われることになる。
The operator compares the displayed data with the expected value that would be expected if the microprogram is operating correctly, and by looking for matches or discrepancies, he can discover errors in the microprogram, or even check other data. Debugging processing is performed by instructing the reading of .

一方、第二の従来例としてエミュレータを利用してマイ
クロプログラムのデバッグを行う方式があった。
On the other hand, as a second conventional example, there is a method of debugging a microprogram using an emulator.

ここで、「エミュレータ」とは模倣システムが被模倣シ
ステムと同様に同一データを受は入れ、同一の計算機プ
ログラムを実行し、同一の結果を得るように、あるシス
テムが他のシステムを模倣する装置をいう。
Here, an "emulator" is a device by which one system imitates another system, so that the imitating system accepts the same data, executes the same computer program, and obtains the same results as the imitated system. means.

本方式では第8図に示すように、基板81上に設けられ
、障害が生じたマイクロプログラムに従って動作するM
PU82を当該基板81から物理的に外しで、当該MP
U82に置き替えてエミュレータ83を当該基板81に
装着した状態で使用するものであっで、抜き取られた当
該MPU82の各端子と接続されていた各端子をエミュ
レータ83の該当する各端子とを接続しで、抜き取られ
たMPU82の働きを当該エミュレータ83により代行
させで、メモリに格納されているマイクロプログラムに
ついてデバッグ処理を行うものである。
In this method, as shown in FIG. 8, M
By physically removing the PU 82 from the board 81, the MP
It is used with an emulator 83 attached to the board 81 in place of U82, and each terminal connected to each terminal of the removed MPU 82 is connected to each corresponding terminal of the emulator 83. The emulator 83 performs the function of the extracted MPU 82, and debugs the microprogram stored in the memory.

(発明が解決しようとする課題) ところで、以上説明したように第一の従来例にあっては
、マイクロプログラムのデバッグ処理は割込みによっで
、前記MPU51がデバッグ用プログラムに従って動作
することにより行うものであり、テスタは当該MPUに
対し必要なデータの読出しや表示の指示や命令を行って
間接的にデバッグ処理を行うにすぎず、当該指示に従っ
て動作を行うのはMPU51である。そのため、MPU
51が動作をしているために使用されているレジスタや
メモリ内を読み出すことは不可能であり、読出しの範囲
が限られるだけでなく、テスタからの命令や指示を行う
ための制御レジスタ53が設けられることになり、テス
タ52が直接デバッグ処理を行う場合に比較して応答に
時間がかかり、処理が遅いという問題点を有していた。
(Problem to be Solved by the Invention) By the way, as explained above, in the first conventional example, the debugging process of the microprogram is performed by the MPU 51 operating according to the debugging program using an interrupt. The tester only indirectly performs debugging by instructing the MPU to read and display necessary data, and it is the MPU 51 that operates according to the instructions. Therefore, MPU
51 is operating, it is impossible to read out the contents of the registers and memory used, and not only is the range of reading limited, but the control register 53 for issuing commands and instructions from the tester is However, compared to the case where the tester 52 directly performs debugging processing, the problem is that the response time is longer and the processing is slower.

また、第二の従来例に係るマイクロプログラムのデバッ
グ方式にあっては、当該マイクロプログラムにしたがっ
て動作するMPU82を当該MPU82の代行をするエ
ミュレータ83で置き換えて使用するものであり、作業
性、安全性があまり良いとはいえないという問題点を有
していた。
In addition, in the microprogram debugging method according to the second conventional example, the MPU 82 that operates according to the microprogram is replaced with an emulator 83 that acts on behalf of the MPU 82, which improves workability and safety. The problem was that it could not be said to be very good.

そこで、高速にデバッグ処理を行うとともに、MPUの
置換え等の作業のない、簡単な構造で、高速で、安全で
、作業性の良いマイクロプログラムのデバッグ方式を提
供することを目的としてなされたものである。
Therefore, the purpose of this project was to provide a method for debugging microprograms that performs high-speed debugging processing, has a simple structure, is fast, safe, and has good workability, without requiring work such as replacing the MPU. be.

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

以上の技術的課題を解決するため第一の発明は第1図に
示すように、マイクロプログラムを格納するメモリ4と
、マイクロプログラムにしたがって動作を行うマイクロ
プロセッサ1とを有するシステムで、マイクロプログラ
ムの誤りを発見して訂正するために行うマイクロプログ
ラムのデバッグ方式においで、操作者の指示により、前
記マイクロプロセッサ1を休止状態にする指示を行った
後に前記メモリ4に対しアクセス可能となるテスタ2と
、前記テスタ2からの指示により、前記マイクロプロセ
ッサ1を休止状態にしで、当該マイクロプロセッサ1と
前記メモリ4との接続を遮断し、当該メモリ4と前記テ
スタ2との間の接続に切り換える切換え回路3と、を設
けたものである。
In order to solve the above technical problems, the first invention is a system having a memory 4 for storing a microprogram and a microprocessor 1 for operating according to the microprogram, as shown in FIG. In a microprogram debugging method for discovering and correcting errors, the tester 2 becomes accessible to the memory 4 after instructing the microprocessor 1 to go into a hibernation state according to an operator's instructions. , a switching circuit that puts the microprocessor 1 into a hibernation state, cuts off the connection between the microprocessor 1 and the memory 4, and switches the connection between the memory 4 and the tester 2 according to an instruction from the tester 2; 3.

一方、第二の発明は第2図に示すように、操作者の指示
があった場合(S1)には、デバッグ処理の対象とする
マイクロプログラムにしたがって動作をするマイクロプ
ロセッサを休止状態にし(S2)、マイクロプログラム
が格納されているメモリとマイクロプロセッサとの間の
接続を遮断し、メモリとテスタとの間の接続に切り換え
(S3)、メモリとテスタとの間の接続に切り換えられ
た後にテスタにより、当該メモリに対しアクセスを行う
(S4)ものである。
On the other hand, as shown in FIG. 2, the second invention puts the microprocessor that operates according to the microprogram targeted for debugging into a hibernation state (S2) when there is an instruction from the operator (S1). ), the connection between the memory in which the microprogram is stored and the microprocessor is cut off, and the connection is switched between the memory and the tester (S3), and after the connection between the memory and the tester is switched, the connection between the memory and the tester is switched off. Accordingly, the memory is accessed (S4).

〔作用〕[Effect]

続いて本発明の係る方式及び方法の動作を説明する。 Next, the operation of the system and method according to the present invention will be explained.

第1図に示すように、マイクロプロセッサ(MPU)1
が前記メモリ4に格納されたマイクロプログラムにした
がっで、動作している際に、マイクロプログラムに障害
が生じた場合には操作者によりデバッグ処理を行うこと
になる。
As shown in Figure 1, a microprocessor (MPU) 1
If a failure occurs in the microprogram while it is operating according to the microprogram stored in the memory 4, the operator will perform debugging processing.

ステップS1で操作者によるデバッグに必要なデータの
読出しの指示があると、テスタ2はステップS2で前記
切換え回路3に指示を与え、当該切換え回路3は当該M
PU (マイクロプロセッサ)1を休止状態にする。
When the operator instructs the reading of data necessary for debugging in step S1, the tester 2 instructs the switching circuit 3 in step S2, and the switching circuit 3
Put the PU (microprocessor) 1 into hibernation mode.

MPUIが休止状態となると、ステップS3てテスタ2
は障害が生じたマイクロプログラムが格納されているメ
モリ4とMPUIとの間のバス線等の接続を遮断し、メ
モリ4とテスタ2との間の接に、魁こ切り換えることに
なる。
When MPUI is in hibernation state, tester 2 is activated in step S3.
In this case, the connection such as the bus line between the memory 4 in which the faulty microprogram is stored and the MPUI is cut off, and the connection between the memory 4 and the tester 2 is switched.

これによっで、ステップS4で、テスタ2は前記メモリ
4に対しアクセス可能となる。したがっで、例えば、操
作者は、当該テスタ2に対し、アクセスの指示を行っで
、マイクロプログラムのデバッグに必要と思われるデー
タをメモリ4から読み出して表示させたりすることにな
る。
This allows the tester 2 to access the memory 4 in step S4. Therefore, for example, the operator instructs the tester 2 to access and read data deemed necessary for debugging the microprogram from the memory 4 and display it.

その場合、当該操作者は例えば、表示されたデータをマ
イクロプログラムが正しい場合にとると期待される期待
値と比較され、当該比較結果の一致不一致にしたがっで
、誤りを発見したり、さらに別のデータの読出しの指示
を行ったりする。
In that case, the operator can, for example, compare the displayed data with the expected value that the microprogram would be expected to take if it is correct, and according to the agreement or discrepancy of the results of the comparison, discover errors or further Instructs to read data.

尚、請求項2.4に示すようにデパック処置を行う前に
マイクロプロセッサ1に対し割込みを行うことにより、
例えば各レジスタ内に保持された内部状態を予め退避さ
せておくことにより元の処理に復帰するにはスムーズに
行うことができることになる。
Furthermore, as shown in claim 2.4, by interrupting the microprocessor 1 before performing the depacking process,
For example, by saving the internal state held in each register in advance, it is possible to smoothly return to the original process.

尚、本発明に係るテスタ2は第一の従来例に係るテスタ
52と異なり、MPU1を完全に停止してデバッグ処理
を行うものである。
Note that the tester 2 according to the present invention is different from the tester 52 according to the first conventional example in that it completely stops the MPU 1 and performs debug processing.

〔実施例〕〔Example〕

続いで、本発明の実施例に係るマイクロプログラムのデ
バッグ方式について説明する。
Next, a microprogram debugging method according to an embodiment of the present invention will be described.

第3図に本実施例に係るシステムを示す。FIG. 3 shows a system according to this embodiment.

本システムでは、同図に示すように、マイクロプログラ
ムに従って動作を行うマイクロプロセッサ(MPU)1
1と、当該MPUIIに対する割込み処理を行うととも
に、当該マイクロプログラムのデバッグ処理を行うため
、操作者の指示にしたがって動作するテスタ12と、前
記マイクロプログラムを格納するメモリ領域及びI10
領域を有するメモリ14と、前記割込み処理により出力
された信号及び前記テスタ12からの指示により、MP
UIIに対し休止命令を行うとともに、メモリ14と前
記MPUIIとの間のバス線等の接続を遮断し、メモリ
14とテスタ12との間のバス線等の接続に切り換える
切換え回路13と、操作者によりデバッグに必要なデー
タの読出し等のメモリ14に対するアクセス処理の指示
及び表示の指示を行う操作卓20を有するものである。
In this system, as shown in the figure, a microprocessor (MPU) 1 operates according to a microprogram.
1, a tester 12 that operates according to instructions from an operator in order to perform interrupt processing for the MPUII and debug processing of the microprogram, a memory area for storing the microprogram, and an I10.
The MP
A switching circuit 13 that issues a halt command to the UII, cuts off the connection of the bus line etc. between the memory 14 and the MPU II, and switches to the connection of the bus line etc. between the memory 14 and the tester 12, and an operator; The apparatus includes an operator console 20 for instructing access processing to the memory 14, such as reading data necessary for debugging, and instructions for display.

また、前記テスタ12は同図に示すように当該テスタ1
2の動作の制御を行うMPU12a、当Mt<M P 
U 12 aが動作を行うためにしたがうテスタ用プロ
グラム格納部12b、及びコネクタ12cを有するもの
である。
Further, the tester 12 is connected to the tester 1 as shown in the figure.
MPU 12a, which controls the operation of step 2, Mt<MP
It has a tester program storage section 12b, which is used by the U12a to operate, and a connector 12c.

尚、本実施例に係る当該テスタ12の前記テスタブロク
ラムには、従来例に係るテスタと異なり、ブレイク・ポ
イント機能(Break Po1nst ;B。
Note that the tester block of the tester 12 according to the present embodiment has a break point function (Break Point function), unlike the tester according to the conventional example.

P)及びシングル・ステップ機能(Sigle 5te
p)を有する。
P) and single step function (Sigle 5te
p).

ここで、B−2機能とは、先のMPUIIが休止しで、
前記テスタ側にメモリ14へのアクセス権が移行してい
る時に、当該テスタ側からプログラム実行を停止(ブレ
イク)したいアドレス(ポイント)を自由に設定するこ
とができる機能である。
Here, the B-2 function means that the previous MPUII is suspended and
This is a function that allows the tester to freely set an address (point) at which to stop (break) program execution when the access right to the memory 14 is transferred to the tester.

テスタ12側から、メモリ14のプログラム領域をアク
セスしで、あるプログラム番地のプログラム・コードの
代りに、ソフト割込みコードを書き込んで、再びMPU
J 11を走らせる。(元のプログラム・コードはある
メモリ番地に格納しておく)MPUIIが実行し始めで
、B−Pの設定アドレス)を実行した時、ソフト割込み
が発生してMPU DEBUG処理に突入する。
The program area of the memory 14 is accessed from the tester 12 side, a soft interrupt code is written in place of the program code at a certain program address, and the MPU
Run J11. (The original program code is stored at a certain memory address.) When the MPU II starts executing and executes the set address of B-P, a soft interrupt occurs and the MPU DEBUG process starts.

後は、先に説明した通りにMPU DEBIJG回路1
5が作動しで、MPUIIをHOLD状態にする。
After that, install MPU DEBIJG circuit 1 as explained earlier.
5 is activated and puts the MPU II in the HOLD state.

B、Pを解除する場合は、元のプログラム・コードをB
−Pの設定アドレスに再び復帰させてB・P解除となる
To cancel B and P, change the original program code to B.
-P is returned to the set address again and B/P is released.

一方、シングル・ステップ機能は上述したB・2機能と
同様に、ソフト割込みによるMPUDEBUG処理の1
つである。
On the other hand, the single step function is similar to the B.2 function mentioned above, and the single step function is similar to the above-mentioned B.2 function.
It is one.

B−2機能と大きく違うのは、B−P@能はプログラム
・コート領域を使用するがシングル・ステップ機能はM
PUの各制御フラグレジスタを使用することである。M
PUの各制御フラグレジスタとは、MPU自身が動作す
るために必要な制御フラグの集合レジスタであり、当該
制御フラグレジスタ内にシングルステップビットか存在
している。
The major difference from the B-2 function is that B-P@Noh uses the program code area, but the single step function uses the M
The method is to use each control flag register of the PU. M
Each control flag register of the PU is a set of control flags necessary for the MPU itself to operate, and a single step bit exists in the control flag register.

当該シングル・ステップビットはMPUがプログラムを
1ステップ実行する度にソフト割込みが発生する機能を
有する。
The single step bit has a function of generating a soft interrupt every time the MPU executes one step of the program.

つまり、テスタ12側から、MPU DEBUG処理に
よっである特殊メモリ番地に格納された制御フラグレジ
スタをアクセスし、当該シングル・ステップビットを操
作する。そしで、再びMPUを走らせると、1ステツプ
プログラムを実行したところで、ソフト割込みが発生す
る。後はMPU DEBUG処理を実行しで、MPUが
休止状態に入ることになる。
That is, from the tester 12 side, the control flag register stored in a special memory address by MPU DEBUG processing is accessed, and the single step bit is manipulated. Then, when the MPU is run again, a soft interrupt occurs when the 1-step program is executed. After that, the MPU DEBUG process is executed and the MPU enters the hibernation state.

これらの機能が使用できるのは、従来と異なり、MPU
が完全に休止状態となるからである。
Unlike before, these functions can only be used with the MPU.
This is because it becomes completely dormant.

さらに、当該切換え回路13は同図に示すように、M 
P U DEBUG回路15とマルチプレクサ16とを
有するものであり、当該M P U DEBUG回路1
5を第4図に詳細に示す。
Furthermore, as shown in the figure, the switching circuit 13 has M
It has a P U DEBUG circuit 15 and a multiplexer 16, and the M P U DEBUG circuit 1
5 is shown in detail in FIG.

第4図に示すように、当該回路15はAND素子15□
、 153 、154 、156.157 。
As shown in FIG. 4, the circuit 15 includes an AND element 15□
, 153 , 154 , 156.157.

15□2、FF 152 、 15to、Dv(ドライ
バ)15、、OR素子15!、、159 、及びNOT
素子15□、を有する。
15□2, FF 152, 15to, Dv (driver) 15, OR element 15! , , 159 , and NOT
It has an element 15□.

続いで、本実施例に係るマイクロプログラムのデバッグ
方式及び方法の動作について第4.5.6図に基づいて
説明する。
Next, the operation of the microprogram debugging method and method according to this embodiment will be explained based on FIG. 4.5.6.

ステップSJIで、マイクロプログラムにしたがって動
作するMPUIIが異常動作をしで、マイクロプログラ
ムに障害があると判断される場合には、操作者は前記操
作卓20を用いで、テスタ12に対し読出し及び表示の
指示を行う。
In step SJI, if the MPU II operating according to the microprogram malfunctions and it is determined that there is a fault in the microprogram, the operator uses the operation console 20 to read and display information on the tester 12. give instructions.

すると、当該テスタ12は$4図及び第5図■に示すよ
うに、前記MPUIIに対しSTP信号を送出して割込
みを行う。当該STP信号は第4図及び第5図■に示す
ように、MPUIIの外部割込みINT端子に入力する
。同時に当該STP信号は当該MPUIIをHDLD状
態にさせるために前記M P U DEBUG回路15
にも送出される。
Then, the tester 12 sends an STP signal to the MPU II to interrupt, as shown in Figures 4 and 5. The STP signal is input to the external interrupt INT terminal of the MPU II, as shown in FIGS. 4 and 5. At the same time, the STP signal is sent to the MPU DEBUG circuit 15 in order to bring the MPU II into the HDLD state.
It is also sent to

STP信号があると、第3(8■に示すように、ステッ
プSJ2てMPUIIは当該信号かもつ割込みレベルに
応じたM P U DEBt]G処理を起動させで、割
込み処理を実行することになる。
When there is an STP signal, as shown in step SJ2, the MPU II activates the MPU DEBt]G process corresponding to the interrupt level of the signal and executes the interrupt process. .

当該割込み処理では、割り込みが発生したプログラム・
アドレス、MPU各内部レジスタ、MPU各制御フラグ
レジスタ等を特殊なメモリ番地に退避格納する。
In the interrupt processing, the program where the interrupt occurred
Addresses, MPU internal registers, MPU control flag registers, etc. are saved and stored in special memory addresses.

ここで、「内部レジスタ」にはアドレスレジスタ、デー
タレジスタ、R/Wレジスタ及びB。
Here, the "internal registers" include address registers, data registers, R/W registers, and B.

P 、 (break poit)ポイントレジスタ等
がある。退避を行うのは割込み処理が終了した後に元の
処理に復帰した際に元の処理を続行するためである。
There are P, (break point) point registers, etc. The purpose of saving is to continue the original processing when returning to the original processing after the interrupt processing is completed.

第6図に示すステップSJ3で、当該退避等の処理が終
了した場合には、第3図に示すように、I10レジスタ
を経由して当該MPUII自身を休止状態(HOLD)
させるためHOLD信号■を○N状態とする。
In step SJ3 shown in FIG. 6, when the processing such as saving is completed, the MPU II itself is put into a hibernation state (HOLD) via the I10 register, as shown in FIG.
In order to do this, the HOLD signal (■) is set to the N state.

当該HOLD信号は前記MPU DEBUG回路15に
入力することになる。
The HOLD signal is input to the MPU DEBUG circuit 15.

こうしで、ステップSJ4て当該回路15にSTP信号
及びHOLD信号が入力すると、当該両信号のAND条
件により、前記MPUIIに対し、MP U f(OL
D SEQ[,1ENCEを実行する。MPUI(OL
DSEQUEN(1:HにはMPUIIに対してREQ
LIEST信号■を発生し、MPUIIは当該REQU
EST信号■を受は取ることにより突入する。
In this way, when the STP signal and the HOLD signal are input to the circuit 15 in step SJ4, the MPU f(OL
Execute D SEQ[, 1ENCE. MPUI(OL)
DSEQUEN (1:H has REQ to MPUII
The LIEST signal ■ is generated, and the MPU II receives the corresponding REQU.
The device enters by receiving the EST signal ■.

MPUIIはMPUII自身がHOLD状態となると、
前記REQtJEST信号■の応答としで、GRANT
信号■を前記MPU DEBUG回路15に返信する。
When the MPUII itself enters the HOLD state,
In response to the REQtJEST signal ■, GRANT
The signal ■ is sent back to the MPU DEBUG circuit 15.

当該MPU DEBUG回路15は、前記MPUIIか
らGRANT信号を受は取ると、MPUIIがHOLD
状態に入ったことを認識して前記TESTERUSE信
号■をイネーブル状態にしてMPUIIを前記メモリ1
4と遮断状態とし、前記メモリ14に対するADDRE
SS/DASTA BusはMPUIIからテスタ12
側に切り換えられる。
When the MPU DEBUG circuit 15 receives the GRANT signal from the MPU II, the MPU DEBUG circuit 15 sets the MPU II to HOLD.
Recognizing that the state has been entered, the TESTERUSE signal (2) is enabled and the MPU II is activated to the memory 1.
4 and the cutoff state, and ADDRE to the memory 14.
SS/DASTA Bus is from MPU II to tester 12
can be switched to the side.

こうしで、テスタ12側から前記メモリ14に対し、自
由にアクセスすることができるようになる。
In this way, the memory 14 can be freely accessed from the tester 12 side.

ステップSJ4て当該テスタ12は操作者の前記指示に
したがっで、例えは、前記メモリ14に対し必要なデー
タの読出しを行うことになる。
In step SJ4, the tester 12 reads necessary data from the memory 14 in accordance with the operator's instructions.

読み出されたデータはステップSJ5で表示され、ステ
ップSJ6て当該データと当該マイクロプログラムが正
常に動作する場合にとるであろう期待値と比較され、操
作者は当該比較結果を見で、次にとるべき処理の判断を
行うことになる。
The read data is displayed in step SJ5, and in step SJ6, the data is compared with the expected value that would be taken if the microprogram operates normally.The operator looks at the comparison result, and then A decision will be made as to what action should be taken.

次にとるべき処理としては、第6図に示すように、再び
ステップSJIに戻っで、他の番地の読出しの指示を行
うか、ステップSJ7に進んで前述したブレイク・ポイ
ント等の機能を用いで、アドレスの設定を行うか、直ち
にステップSJ8に進む場合が考えられる。
As shown in FIG. 6, the next process to take is to return to step SJI and instruct reading of another address, or to proceed to step SJ7 and use the break point function described above. , the address may be set, or the process may immediately proceed to step SJ8.

ステップSJ8に進んだ場合の処理を以下に説明する。The processing when proceeding to step SJ8 will be described below.

ステップSJ8に進むと、前記テスタ12側からMPU
RUN信号を前記MPU DEBUG回路15に送信す
る。
Proceeding to step SJ8, the MPU
A RUN signal is sent to the MPU DEBUG circuit 15.

MPU DEBUG回路15はテスタ12側よりMPU
RUN信号を受は取ると、MPX16の*Te5ter
 Use信号なディス・イネーブル状態にしで、前記メ
モリ14のAc1dress/Data Busを再び
MPUII側にスイッチする。
The MPU DEBUG circuit 15 is connected to the MPU from the tester 12 side.
When the RUN signal is received, *Te5ter of MPX16
By disabling the Use signal, the Ac1dress/Data Bus of the memory 14 is switched to the MPUII side again.

そしで、MPU DEBtJG回路15は休止している
MPUIIを起動するために、RES (RELESE
)信号■を送出する。MPUIIは当該RES信号■を
受けとると、HOLD信号がオフ状態となる。
Then, the MPU DEBtJG circuit 15 sends RES (RELESE) in order to start up the inactive MPU II.
) send out a signal ■. When the MPU II receives the RES signal ■, the HOLD signal is turned off.

当該MPUIIはHOLD信号がオフ状態となると、当
該MPUIIはステップSJ4で前記メモリ14に退避
した前記内部レジスタをステップSJ9で復帰させると
ともに、MPUIIは休止(HOLD) L/た時のプ
ログラム・アドレス(プログラムカウンタ)を読み込む
When the HOLD signal is turned off, the MPU II restores the internal register saved in the memory 14 in step SJ4 in step SJ9, and the MPU II restores the program address (program address at the time of HOLD). counter).

ステップ5J10で当該番地から再び MPUIIは正常走行に移ることになる。In step 5J10, start again from the address. The MPUII will now resume normal operation.

次に、前記M P U DEBUG)[回路15の動作
を第5図等に基づいて説明する。
Next, the operation of the MPU DEBUG circuit 15 will be explained based on FIG. 5 and the like.

前述したように、ステップSJ3では前記STP信号及
びHOLD信号が当該M P U DEBLIGH回路
15に入力すると、第4図の回路図に示すように、AN
D素子151を通り第5図■に示す信号が出力されるこ
とになる。
As mentioned above, in step SJ3, when the STP signal and the HOLD signal are input to the MPU DEBLIGH circuit 15, as shown in the circuit diagram of FIG.
The signal shown in FIG. 5 is output through the D element 151.

当該信号により前記FF15゜が動作し、同図■に示す
信号が出力し、当該信号により同図■に示す信号が出力
されることになる。
This signal causes the FF 15° to operate, outputting the signal shown in (2) in the same figure, and the signal shown in (2) in the same figure being output by this signal.

したがっで、前記AND素子153の出力信号は同図■
に示す信号となる。
Therefore, the output signal of the AND element 153 is as shown in the figure.
The signal will be as shown in .

当該信号は前記OR素子155を通って■信号を出力し
前記ドライバ158に入力し駆動されて同図■に示す信
号が出力され、これにより同図■に示すように、前記M
PUIIに対しREQ信号及び当該回路15の前記否定
素子15□1に対し同図[相]に示す信号が出力される
ことになる。
The signal passes through the OR element 155 and outputs the signal (2), which is input to the driver 158 and is driven to output the signal shown in (3) in the figure.
The REQ signal is output to PUII, and the signal shown in [phase] in the figure is output to the negative element 15□1 of the circuit 15.

当該MPUIIは当該REQ信号を受けとると、MPU
II自身をHOLD状態にし、当該REQ信号に応答し
て同図■に示すように、CRT信号を1クロック分発生
させることになる。
When the MPU II receives the REQ signal, the MPU II
II itself is put in the HOLD state, and in response to the REQ signal, a CRT signal for one clock is generated as shown in FIG.

これによって当該MPUIIはHOLD状態となり動作
しないことになる。
As a result, the MPU II becomes in a HOLD state and does not operate.

また、CRT信号が当該M P U DEBtlGf(
回路15に受領されOR素子159へ入力すると、全て
の条件かそろい(STP信号、HOLD信号、CRT信
号)、初めて前記FF15.o、及びAND素子15□
2により当該回路15から第4図及び第5図■に示すよ
うにマルチプレクサ16に対しSEL (Teste 
Use)信号が送出され、MPUインタフェースがテス
タインタフェースのバスに切り換えられることになる。
In addition, the CRT signal is
When received by the circuit 15 and input to the OR element 159, when all the conditions are met (STP signal, HOLD signal, CRT signal), the FF 15. o, and AND element 15□
2, from the circuit 15 to the multiplexer 16 as shown in FIGS.
Use) signal is sent, and the MPU interface is switched to the tester interface bus.

尚、再びMPUIIを起動させるには、前記テスタ12
より第4図及び第5図に示すようにRUN信号■を発生
させ、M P U DEBUGH回路15に入力させ、
 M P U DEBUGH回路15が動作し、前記O
R素子159からMPUIIへRES信号■を送ること
になり、MPU11はRES信号■を受けとると再び起
動し、第6図のステップSJ9に進むことになる。
In addition, in order to start MPUII again, the tester 12
As shown in FIGS. 4 and 5, the RUN signal ■ is generated and inputted to the MPU DEBUGH circuit 15,
The MPU DEBUGH circuit 15 operates, and the O
The RES signal ■ will be sent from the R element 159 to the MPU II, and upon receiving the RES signal ■, the MPU 11 will be activated again and proceed to step SJ9 in FIG.

以上説明したように、本実施例では、前記テスタ12は
ブレイク・ポイント機能またはシングル・ステップ機能
を有するため、操作者は希望する番地でMPUを休止さ
せることができるので、マイクロプログラムの誤りの調
査をきめ細かく行うことができで、誤りの調査を確実及
び迅速に実行することができることになる。
As explained above, in this embodiment, since the tester 12 has a break point function or a single step function, the operator can pause the MPU at a desired address, so that it is possible to investigate errors in the microprogram. This means that errors can be investigated reliably and quickly.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明に係るマイクロプログラム
のデバッグ方式にあっては、切換え回路を設けで、MP
Uのインタフェースとテスタのインタフェースとを切り
換えるとともに、MPUを休止状態にしで、テスタによ
り直接的にデバッグ方式を行うようにしている。
As explained above, in the microprogram debugging method according to the present invention, by providing a switching circuit, MP
In addition to switching between the U interface and the tester interface, the MPU is put into a hibernation state so that the tester can directly perform debugging.

したがっで、従来のデバッグ方式に比較して処理速度が
早く、かつ、エミュレータを用いる際にMPUを置き換
えたりする作業が不必要なため、作業性及び安全性の高
いマイクロプログラムのデバッグ方式を提供することが
できることになる。
Therefore, the present invention provides a microprogram debugging method that is faster in processing speed than conventional debugging methods, and has high workability and safety since it is not necessary to replace the MPU when using an emulator. You will be able to do that.

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

第1図は第一の発明の原理ブロック図、第2図は第二の
発明に係る原理流れ図、第3図は実施例に係るブロック
図、第4図は実施例に係るM P U HOLDバス切
換え回路を示す図、第5図は実施例に係るMPU DE
BUG回路のタイミングチャート、第6図は実施例に係
る処理流れ図、第7図は第一の従来例に係るブロック図
、及び第8図は第二の従来例に係るブロック図である。 1.11・・・マイクロプロセッサ(MPU)2.12
・・・テスタ 3.13・・・切換え回路 4、工4・・・メモリ 特許出願人      富士通株式会社e5′−1− 第−ハ)78月ハフ原王甲フ゛ロ、フa第 図 第二の発明t>141里流れ図 @ 2 図 實施劉に係クブロツ2図 第3図 9!施f!1ノに侃うへ理流れ図 第 図
FIG. 1 is a principle block diagram of the first invention, FIG. 2 is a principle flowchart of the second invention, FIG. 3 is a block diagram of the embodiment, and FIG. 4 is the MPU HOLD bus according to the embodiment. A diagram showing a switching circuit, FIG. 5 is an MPU DE according to an embodiment.
FIG. 6 is a timing chart of the BUG circuit, FIG. 6 is a processing flowchart according to the embodiment, FIG. 7 is a block diagram according to the first conventional example, and FIG. 8 is a block diagram according to the second conventional example. 1.11... Microprocessor (MPU) 2.12
...Tester 3.13...Switching circuit 4, Engineering 4...Memory patent applicant Fujitsu Ltd. Invention t > 141 ri flowchart @ 2 Kubrotsu 2 Figure 3 Figure 9 related to Zujishi Liu! Give it! Flowchart diagram for reaching 1.

Claims (1)

【特許請求の範囲】 (1)マイクロプログラムを格納するメモリ(4)と、
マイクロプログラムにしたがって動作を行うマイクロプ
ロセッサ(1)とを有するシステムで、マイクロプログ
ラムの誤りを発見して訂正するために行うマイクロプロ
グラムのデバッグ方式において、 操作者の指示により、前記マイクロプロセッサ(1)を
休止状態にする指示を行った後に前記メモリ(4)に対
しアクセス可能となるテスタ(2)と、 前記テスタ(2)からの指示により、前記マイクロプロ
セッサ(1)を休止状態にして、当該マイクロプロセッ
サ(1)と前記メモリ(4)との接続を遮断し、当該メ
モリ(4)と前記テスタ(2)との間の接続に切り換え
る切換え回路(3)と、を設けたことを特徴とするマイ
クロプログラムのデバッグ方式。 (2)マイクロプログラムを格納するメモリ(4)と、
マイクロプログラムにしたがって動作を行うマイクロプ
ロセッサ(1)とを有するシステムで、マイクロプログ
ラムの誤りを発見して訂正するために行うマイクロプロ
グラムのデバッグ方式において、 操作者の指示により、マイクロプロセッサ (1)に対し割込みを行うとともに、前記メモリ(4)
に対しアクセス可能となるテスタ(12)と、 当該テスタ(12)からの指示により、マイクロプロセ
ッサ(1)を休止状態にして、マイクロプロセッサ(1
)とメモリ(4)との間の接続を遮断し、メモリ(4)
とテスタ(12)との間の接続に切り換える切換え回路
(3)と、を設けたことを特徴とするマイクロプログラ
ムのデバッグ方式。 (3)操作者の指示があった場合(S1)には、デバッ
グ処理の対象とするマイクロプログラムにしたがって動
作をするマイクロプロセッサを休止状態にし(S2)、 マイクロプログラムが格納されているメモリとマイクロ
プロセッサとの間の接続を遮断し、メモリとテスタとの
間の接続に切り換え(S3)、メモリとテスタとの間の
接続に切り換えられた後にテスタにより、当該メモリに
対しアクセスを行う(S4)ことを特徴とするマイクロ
プログラムのデバッグ方法。 (4)操作者の指示があった場合には(S1)、デバッ
グ処理の対象とするマイクロプログラムにしたがって動
作を行うマイクロプロセッサに対し割込みを行い(S1
0)、 当該割込み処理が終了した後、指示により前記マイクロ
プロセッサを休止状態にし(S2)、マイクロプログラ
ムが格納されているメモリとマイクロプロセッサとの間
の接続を遮断し、メモリとテスタとの間の接続に切換え
(S3)、メモリとテスタとの間の接続に切り換えられ
た後にテスタにより、当該メモリに対しアクセス可能と
なる(S4)ことを特徴とするマイクロプログラムのデ
バッグ方法。
[Claims] (1) A memory (4) for storing a microprogram;
In a system having a microprocessor (1) that operates according to a microprogram, in a microprogram debugging method performed to discover and correct errors in the microprogram, the microprocessor (1) a tester (2) that becomes able to access the memory (4) after issuing an instruction to put the microprocessor (1) into a hibernation state; A switching circuit (3) is provided that cuts off the connection between the microprocessor (1) and the memory (4) and switches the connection between the memory (4) and the tester (2). A method for debugging microprograms. (2) a memory (4) for storing a microprogram;
In a system having a microprocessor (1) that operates according to a microprogram, in a microprogram debugging method performed to discover and correct errors in the microprogram, the microprocessor (1) is The memory (4)
a tester (12) that can access the microprocessor (12);
) and memory (4), and memory (4)
A switching circuit (3) for switching the connection between the terminal and the tester (12). (3) When the operator instructs (S1), the microprocessor that operates according to the microprogram targeted for debugging is put into a hibernation state (S2), and the memory in which the microprogram is stored and the microprocessor are The connection with the processor is cut off, the connection is switched between the memory and the tester (S3), and after the connection is switched between the memory and the tester, the tester accesses the memory (S4). A method for debugging microprograms characterized by the following. (4) If there is an instruction from the operator (S1), an interrupt is made to the microprocessor that operates according to the microprogram targeted for debugging (S1).
0), after the interrupt processing is completed, the microprocessor is put into a hibernation state according to an instruction (S2), the connection between the memory in which the microprogram is stored and the microprocessor is cut off, and the connection between the memory and the tester is cut off. A method for debugging a microprogram, characterized in that the connection is switched to a connection between the memory and the tester (S3), and after the connection is switched to a connection between the memory and the tester, the tester becomes able to access the memory (S4).
JP2244700A 1990-09-14 1990-09-14 Microprogram debugging method and method Pending JPH04123235A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2244700A JPH04123235A (en) 1990-09-14 1990-09-14 Microprogram debugging method and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2244700A JPH04123235A (en) 1990-09-14 1990-09-14 Microprogram debugging method and method

Publications (1)

Publication Number Publication Date
JPH04123235A true JPH04123235A (en) 1992-04-23

Family

ID=17122631

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2244700A Pending JPH04123235A (en) 1990-09-14 1990-09-14 Microprogram debugging method and method

Country Status (1)

Country Link
JP (1) JPH04123235A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017010432A (en) * 2015-06-25 2017-01-12 京セラドキュメントソリューションズ株式会社 IC chip
JP2020149214A (en) * 2019-03-12 2020-09-17 ローム株式会社 Semiconductor device and debugging system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017010432A (en) * 2015-06-25 2017-01-12 京セラドキュメントソリューションズ株式会社 IC chip
JP2020149214A (en) * 2019-03-12 2020-09-17 ローム株式会社 Semiconductor device and debugging system

Similar Documents

Publication Publication Date Title
JP2651916B2 (en) In-circuit emulator
JP2752592B2 (en) Microprocessor, signal transmission method between microprocessor and debug tool, and tracing method
JPH011039A (en) In-circuit emulator
JPH02171934A (en) virtual computer system
JPS63111545A (en) Microprocessor for debug
JPH07219809A (en) Apparatus and method for data processing
JP2513417B2 (en) Information processing device
JP2003015906A (en) Remote debugging method and device
JP3260083B2 (en) Debug system and debugging method
JPH04123235A (en) Microprogram debugging method and method
JPH0477833A (en) Integrated circuit provided with debugging environment
JPH02186448A (en) Integrated circuit with debug environment
JPH08171504A (en) Emulation device
JPH08272770A (en) Microcontroller development system
JPS59202550A (en) Debugging device
JPS59202546A (en) Debugging device
JPH04314139A (en) Debugging device
JP3209191B2 (en) Emulating apparatus and method
Goldberg et al. The PRIM System: An alternative architecture for emulator development and use
JPH07121396A (en) emulator
JP2878037B2 (en) Processor stop method
JPH0682323B2 (en) Debug microprocessor
JPS59202548A (en) Debugging device
JPH0282323A (en) Digital signal processor debugging method
JPH05189267A (en) Operation control system for microprocessor and emulator