JPH05189229A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH05189229A
JPH05189229A JP4002084A JP208492A JPH05189229A JP H05189229 A JPH05189229 A JP H05189229A JP 4002084 A JP4002084 A JP 4002084A JP 208492 A JP208492 A JP 208492A JP H05189229 A JPH05189229 A JP H05189229A
Authority
JP
Japan
Prior art keywords
instruction
microprocessor
address
internal information
execution
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
JP4002084A
Other languages
Japanese (ja)
Inventor
Norio Masui
規雄 桝井
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP4002084A priority Critical patent/JPH05189229A/en
Publication of JPH05189229A publication Critical patent/JPH05189229A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To take out internal information during the execution of a program to an external part without switching a monitor program and a context by providing a microprogram memory and storing a microprogram. CONSTITUTION:Codes designating registers transferring the address (xyz) of an instruction immediately before internal information is transferred to a transfer address register 15, and the head address of an internal information transfer destination to a register list register 17 are respectively written into a PC brake pointer 9 by the execution of the instruction. When a brake hit signal 12 is inputted, a micro instruction entry control block 2 sets the micro instruction entry code of an internal information transfer sequence 13 in a micro instruction entry pointer 4. Thus, the internal information transfer sequence 13 in The micro program memory 5 is started after the execution of the address (xyz) is completed, and an internal information transfer processing is executed. The execution of the original program after transfer terminates is continued.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、プログラム開発支援
機能を備えたマイクロプロセッサに関するものであり、
特にマイクロプログラムメモリを備えたマイクロプロセ
ッサに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor having a program development support function,
In particular, it relates to a microprocessor having a micro program memory.

【0002】[0002]

【従来の技術】マイクロプロセッサのプログラム開発に
おいて、プログラム実行中のマイクロプロセッサ内部の
情報を外部に取り出すことがある。ここで、マイクロプ
ロセッサ内部の情報とは、マイクロプロセッサ内の各種
レジスタの内容などのコンテキスト情報のことである。
2. Description of the Related Art In developing a program for a microprocessor, information inside the microprocessor during execution of the program may be taken out. Here, the information inside the microprocessor is context information such as contents of various registers inside the microprocessor.

【0003】図5は、従来のマイクロプロセッサにおい
て、プログラム実行中のマイクロプロセッサ内部の情報
を外部に取り出す動作を説明するためのブロック図であ
る。図中、1は図示しない命令デコーダより出力される
マイクロ命令エントリーコード、2はマイクロ命令エン
トリー制御ブロック、3は割込み処理のマイクロ命令エ
ントリーコードを保持している定数レジスタである。4
はマイクロ命令エントリーポインタ、5はマイクロプロ
グラムメモリ、6はマイクロプログラムメモリ5内に記
述された割込み処理シーケンスを表わす。7は命令実行
用の制御信号、8は命令実行ブロック、9はPCブレー
クポインタ、10はオペランドブレークポインタ、11
はブレークポイント検出ブロック、12はブレークヒッ
ト信号である。
FIG. 5 is a block diagram for explaining the operation of extracting information inside the microprocessor during program execution to the outside in a conventional microprocessor. In the figure, 1 is a microinstruction entry code output from an instruction decoder (not shown), 2 is a microinstruction entry control block, and 3 is a constant register holding a microinstruction entry code for interrupt processing. Four
Represents a micro instruction entry pointer, 5 represents a micro program memory, and 6 represents an interrupt processing sequence described in the micro program memory 5. 7 is a control signal for instruction execution, 8 is an instruction execution block, 9 is a PC break pointer, 10 is an operand break pointer, 11
Is a break point detection block, and 12 is a break hit signal.

【0004】図6は、従来のマイクロプロセッサにおい
て、プログラム実行中のマイクロプロセッサ内部情報を
外部に取り出す命令実行シーケンスの一例を示す模式図
である。図中、21、22はユーザプログラムの命令
(1)及び命令(2)、27、30はPCブレークポイ
ントを設定する命令、28は割込み処理、29はモニタ
プログラムである。
FIG. 6 is a schematic diagram showing an example of an instruction execution sequence for extracting the internal information of the microprocessor during program execution to the outside in the conventional microprocessor. In the figure, 21 and 22 are instructions (1) and (2) of the user program, 27 and 30 are instructions for setting a PC breakpoint, 28 is an interrupt process, and 29 is a monitor program.

【0005】次に動作を図5及び図6を用いて説明す
る。ここではマイクロプロセッサが(A+m+1)番地
の命令(1)21の実行完了直後のマイクロプロセッサ
の内部情報を外部に取り出すものとする。まず、アドレ
ス(A)番地の命令(a)27の実行によりPCブレー
クポインタ17に(A+m+1)を書き込む。ユーザプ
ログラムの実行が進み、マイクロプロセッサがアドレス
(A+m+1)番地の命令(1)21をフェッチする
と、PCブレークポインタ17の値とフェッチした命令
のアドレスが一致するため、命令(1)21の実行が開
始されるとブレークポイント検出ブロック11はブレー
クヒット信号12をマイクロ命令エントリー制御ブロッ
ク2に入力する。マイクロ命令エントリー制御ブロック
2は通常は図示しない命令デコーダから出力されるマイ
クロ命令エントリーコード1を先だって実行されている
命令の実行完了後マイクロ命令エントリーポインタ4に
セットする。しかし、ブレークヒット信号12が入力さ
れると、定数レジスタ3に記憶されている割込み処理シ
ーケンス6のマイクロ命令エントリーコードを先だって
実行されている命令の実行完了後マイクロ命令エントリ
ーポインタ4にセットする。したがって、(A+m+
1)番地の命令(1)21の実行完了後、割込み処理2
8が開始される。この割込み処理28により、現在実行
中のユーザプログラムは中断されてモニタプログラム2
9が起動される。モニタプログラム29によりマイクロ
プロセッサ内の各種レジスタの内容を図示しない外部メ
モリに取り出し、モニタプログラム29が終了すると割
込み処理28は終了してユーザプログラムに復帰し(A
+m+2)番地の命令(2)22のフェッチから再開さ
れる。
Next, the operation will be described with reference to FIGS. 5 and 6. Here, it is assumed that the microprocessor takes out the internal information of the microprocessor immediately after the execution of the instruction (1) 21 at the address (A + m + 1) is completed. First, by executing the instruction (a) 27 at the address (A), (A + m + 1) is written in the PC break pointer 17. When the execution of the user program progresses and the microprocessor fetches the instruction (1) 21 at the address (A + m + 1), the value of the PC break pointer 17 and the address of the fetched instruction match, so the execution of the instruction (1) 21 When started, the breakpoint detection block 11 inputs a break hit signal 12 to the microinstruction entry control block 2. The micro-instruction entry control block 2 normally sets the micro-instruction entry code 1 output from an instruction decoder (not shown) in the micro-instruction entry pointer 4 after the execution of the previously executed instruction is completed. However, when the break hit signal 12 is input, the microinstruction entry code of the interrupt processing sequence 6 stored in the constant register 3 is set in the microinstruction entry pointer 4 after the execution of the previously executed instruction is completed. Therefore, (A + m +
1) Interrupt processing 2 after execution of instruction (1) 21 at address is completed
8 is started. By this interrupt processing 28, the user program currently being executed is interrupted and the monitor program 2
9 is activated. The monitor program 29 fetches the contents of various registers in the microprocessor into an external memory (not shown), and when the monitor program 29 ends, the interrupt process 28 ends and the user program returns (A
The instruction (2) 22 at the address + m + 2) is resumed.

【0006】また、命令(2)22に引続き実行される
命令の実行完了後に、マイクロプロセッサの内部情報を
取り出すには、モニタプログラム29内にモニタ命令
(b)30を設けて、PCブレークポインタ9の値を書
き換える必要がある。
In order to retrieve the internal information of the microprocessor after the execution of the instruction to be executed subsequent to the instruction (2) 22 is completed, a monitor instruction (b) 30 is provided in the monitor program 29 and the PC break pointer 9 is provided. The value of must be rewritten.

【0007】上記の動作はプログラムカウンタの値によ
り、ブレークポイントを指定する場合について説明した
が、オペランドのアドレスによりブレークポイントを指
定する場合もある。この場合は、アドレス(A)番地に
命令(a)27の代わりにオペランドブレークポインタ
10にオペランドのアドレスを書き込む命令を実行す
る。ユーザプログラムの実行によりマイクロプロセッサ
がオペランドブレークポインタ10に記憶されているア
ドレスのオペランドをアクセスすると、ブレークポイン
ト検出ブロック11は、ブレークヒット信号12を該オ
ペランドアクセスを行った命令の実行中にマイクロ命令
エントリー制御ブロック2に入力する。したがって、オ
ペランドブレークポインタ10に記憶されているアドレ
スのオペランドをアクセスした命令の実行完了後割り込
みが発生し、その後はプログラムカウンタの値によりブ
レークポイントを指定する場合と同様の動作を行う。
The above operation has been described for the case where the breakpoint is specified by the value of the program counter, but the breakpoint may be specified by the address of the operand. In this case, an instruction to write the address of the operand to the operand break pointer 10 is executed instead of the instruction (a) 27 at the address (A). When the microprocessor accesses the operand at the address stored in the operand break pointer 10 by executing the user program, the breakpoint detection block 11 sends the break hit signal 12 to the micro instruction entry during the execution of the instruction that accessed the operand. Input to control block 2. Therefore, an interrupt is generated after the execution of the instruction that has accessed the operand of the address stored in the operand break pointer 10 is completed, and thereafter, the same operation as when the breakpoint is specified by the value of the program counter is performed.

【0008】[0008]

【発明が解決しようとする課題】以上のように、従来の
マイクロプロセッサでプログラム実行中の内部情報を取
り出すには、モニタプログラムが必要であるという問題
点があり、また割込みによるモニタプログラムへのコン
テキスト切り替えを伴うため時間がかかり、リアルタイ
ム性を損なうという課題があった。また、PCブレーク
ポインタ、オペランドブレークポインタ等の内容を命令
の実行により書き換える必要があり、例えば複数の命令
の各々の実行完了後にマイクロプロセッサ内部の情報を
取り出す場合、毎回PCブレークポインタを書き換える
必要があるという課題があった。
As described above, there is a problem that a monitor program is required to retrieve internal information during execution of a program by a conventional microprocessor, and a context to the monitor program by an interrupt occurs. There is a problem that it takes time because of the switching, and the real-time property is impaired. Further, it is necessary to rewrite the contents of the PC break pointer, the operand break pointer, etc. by executing the instruction. For example, when the information inside the microprocessor is taken out after the execution of each of the plurality of instructions is completed, it is necessary to rewrite the PC break pointer every time. There was a problem called.

【0009】この発明は、こうした課題を解決するため
になされたもので、モニタプログラム及びコンテキスト
スイッチング無しで、プログラム実行中の内部情報を外
部に取り出せ、また命令の実行によるブレークポイント
を指定するレジスタの書き換え無しに、外部信号によっ
てプログラム実行中の内部情報を外部に取り出せるマイ
クロプロセッサを得ることを目的とする。
The present invention has been made in order to solve such a problem, and it is possible to take out internal information during program execution to the outside without a monitor program and context switching, and to register a breakpoint for executing an instruction. An object of the present invention is to obtain a microprocessor which can take out internal information during program execution to the outside by an external signal without rewriting.

【0010】[0010]

【課題を解決するための手段】この発明に係わるマイク
ロプロセッサは、まずマイクロプログラムメモリを設け
てマイクロプログラムを納め、マイクロプロセッサが指
定のアドレスの命令を実行後、このマイクロプログラム
に従って、マイクロプロセッサが実行した状況を示す内
部情報を外部に転送し、この転送完了後、マイクロプロ
セッサが外部転送前に実行していたアドレスの命令列に
復帰する手段を備えた。また、請求項2の発明では、メ
モリにマイクロプログラムを納め、さらに内部情報出力
要求端子を設け、これに出力要求信号を受けると、マイ
クロプロセッサはその時実行していた命令を実行後、こ
のマイクロプログラムに従って、マイクロプロセッサが
実行していた状況を示す内部情報を外部に転送し、この
転送完了後、マイクロプロセッサが外部転送前に実行し
ていたアドレスの命令列に復帰する手段を設けた。
In a microprocessor according to the present invention, a microprogram memory is first provided to store the microprogram, the microprocessor executes an instruction at a specified address, and then the microprocessor executes in accordance with the microprogram. The internal information indicating the above situation is transferred to the outside, and after this transfer is completed, the microprocessor is provided with a means for returning to the instruction sequence of the address executed before the external transfer. Further, in the invention of claim 2, the microprogram is stored in the memory, and further an internal information output request terminal is provided, and when the output request signal is received by this, the microprocessor executes the instruction being executed at that time, and then the microprogram is executed. According to the above, there is provided means for transferring the internal information indicating the status being executed by the microprocessor to the outside, and after completing the transfer, returning to the instruction sequence of the address executed by the microprocessor before the external transfer.

【0011】[0011]

【作用】この発明におけるマイクロプロセッサは、所定
のアドレスまたはアドレスのオペランドの命令を実行
後、マイクロプログラムにより、内部情報を外部に転送
する。または内部情報出力要求信号を受けると、マイク
ロプロセッサがその時実行している命令実行後、マイク
ロプログラムにより、内部情報を外部に転送する。
The microprocessor according to the present invention transfers the internal information to the outside by the microprogram after executing the instruction of the predetermined address or the operand of the address. Alternatively, when the internal information output request signal is received, the internal information is transferred to the outside by the microprogram after the execution of the instruction currently being executed by the microprocessor.

【0012】[0012]

【実施例】【Example】

実施例1.図1はこの発明によるマイクロプロセッサの
一実施例において、プログラム実行中のマイクロプロセ
ッサ内部の情報を外部に取り出す動作を説明するための
ブロック図である。図中、1〜12は図5の従来例と同
一または相当部分を示している。13はマイクロプログ
ラムメモリ5内に記述されたマイクロプロセッサ内部情
報を図示しない外部メモリに転送するシーケンスであ
る。14はマイクロプロセッサ内部情報を図示しない外
部メモリに転送するシーケンス13のマイクロ命令エン
トリーコードを保持する定数レジスタ、15はマイクロ
プロセッサ内部情報の転送先アドレスを保持する転送先
アドレスレジスタである。16はデクリメンタ、17は
図示しない外部メモリに転送するマイクロプロセッサ内
部のレジスタを指定するレジスタリストレジスタであ
る。
Example 1. FIG. 1 is a block diagram for explaining an operation of extracting information inside the microprocessor during execution of a program to the outside in one embodiment of the microprocessor according to the present invention. In the figure, 1 to 12 indicate the same or corresponding parts as in the conventional example of FIG. Reference numeral 13 is a sequence for transferring the microprocessor internal information described in the micro program memory 5 to an external memory (not shown). Reference numeral 14 is a constant register for holding the micro instruction entry code of sequence 13 for transferring the microprocessor internal information to an external memory (not shown), and 15 is a transfer destination address register for holding the transfer destination address of the microprocessor internal information. Reference numeral 16 is a decrementer, and 17 is a register list register for designating registers inside the microprocessor to be transferred to an external memory (not shown).

【0013】図2は、図1に示したこの発明によるマイ
クロプロセッサの一実施例において、プログラム実行中
のマイクロプロセッサ内部情報を外部に取り出す命令実
行シーケンスの一例を示す模式図である。図中、21、
22は図6に示した従来例と同一または相当部分を示し
ている。26aはこの発明により備えられたマイクロプ
ロセッサ内部の情報を図示しない外部メモリに転送する
処理である。
FIG. 2 is a schematic diagram showing an example of an instruction execution sequence for extracting the internal information of the microprocessor during program execution to the outside in the embodiment of the microprocessor according to the present invention shown in FIG. In the figure, 21,
Reference numeral 22 denotes the same or corresponding portion as the conventional example shown in FIG. 26a is a process for transferring the information inside the microprocessor provided by the present invention to an external memory (not shown).

【0014】次に動作について図1及び図2を用いて説
明する。従来例と同様、ここではマイクロプロセッサが
従来例の(A+m+1)番地に相当する(xyz)番地
の命令(1)21、(A+m+1)番地に相当する(x
yz+1)番地の命令(2)22を順に実行するものと
し、(xyz)番地の命令(1)21の実行完了直後の
マイクロプロセッサの内部情報を外部に取り出すものと
する。まず、予め、図示しない命令の実行により、PC
ブレークポインタ9に(xyz)を、転送先アドレスレ
ジスタ15にマイクロプロセッサ内部情報の転送先の先
頭アドレスを、レジスタリストレジスタ17に図示しな
い外部メモリに転送するマイクロプロセッサ内部のレジ
スタを指定するコードを、それぞれ書き込んでおく。ブ
レークヒット信号12がマイクロ命令エントリー制御ブ
ロック2に入力されるまでの動作は従来例と同様の動作
を行う。まず、マイクロ命令エントリー制御ブロック2
は通常は図示しない命令デコーダより出力されるマイク
ロ命令エントリーコード1を先だって実行されている命
令の実行完了後マイクロ命令エントリーポインタ4にセ
ットする。そして、ブレークヒット信号12が入力され
ると、先だって実行されている命令を実行して後、次に
実行すべき命令のマイクロ命令エントリーコードを待機
させる。そしてマイクロプロセッサ内部情報を図示しな
い外部メモリに転送するシーケンス13のマイクロ命令
エントリーコードを、マイクロ命令エントリーポインタ
4にセットする。したがって、(xyz)番地の命令
(1)21の実行完了後、マイクロプロセッサ内部情報
を図示しない外部メモリに転送するシーケンス13が起
動され、マイクロプロセッサ内部の情報を図示しない外
部メモリに転送する処理26aが行われる。
Next, the operation will be described with reference to FIGS. 1 and 2. Similar to the conventional example, here, the microprocessor corresponds to the instruction (1) 21 and the address (A + m + 1) of the address (xyz) corresponding to the address (A + m + 1) of the conventional example (x).
It is assumed that the instruction (2) 22 at the address yz + 1 is sequentially executed and the internal information of the microprocessor immediately after the completion of the execution of the instruction (1) 21 at the address (xyz) is taken out to the outside. First, the PC is executed in advance by executing an instruction (not shown).
(Xyz) is set to the break pointer 9, the start address of the transfer destination of the microprocessor internal information is set to the transfer destination address register 15, and the code that specifies the register inside the microprocessor to be transferred to the external memory (not shown) is set to the register list register 17. Write in each. The operation until the break hit signal 12 is input to the micro instruction entry control block 2 is the same as that of the conventional example. First, the micro instruction entry control block 2
Normally sets the microinstruction entry code 1 output from an instruction decoder (not shown) in the microinstruction entry pointer 4 after the execution of the previously executed instruction is completed. When the break hit signal 12 is input, the previously executed instruction is executed and then the microinstruction entry code of the next instruction to be executed is waited. Then, the microinstruction entry code of sequence 13 for transferring the microprocessor internal information to an external memory (not shown) is set in the microinstruction entry pointer 4. Therefore, after the execution of the instruction (1) 21 at the address (xyz) is completed, the sequence 13 for transferring the microprocessor internal information to the external memory (not shown) is activated, and the processing 26a for transferring the information inside the microprocessor to the external memory (not shown). Is done.

【0015】ここで、マイクロプロセッサ内部情報を図
示しない外部メモリに転送するシーケンス13は、レジ
スタリストレジスタ17により指定されるマイクロプロ
セッサ内部のレジスタの内容を外部メモリに転送する。
転送アドレスは、転送先アドレスレジスタ15に保持さ
れている値を用いる。デクリメンタ16は、1ワードの
転送が終了する度に転送先アドレスレジスタ15の値を
デクリメントする。したがって、予め転送先アドレスレ
ジスタ15に書き込まれていたアドレスを先頭に低アド
レス側に向かって順に、レジスタリストレジスタ17に
より指定されるマイクロプロセッサ内部のレジスタの内
容が転送される。マイクロプロセッサ内部の情報を図示
しない外部メモリに転送する処理26aが終了すると、
マイクロ命令エントリー制御ブロック2は、待機させて
いた(xyz+1)番地の命令(2)のマイクロ命令エ
ントリーコードをマイクロ命令エントリーポインタ4に
セットし命令(2)22の実行が開始される。
Here, in the sequence 13 for transferring the microprocessor internal information to the external memory (not shown), the contents of the register inside the microprocessor specified by the register list register 17 are transferred to the external memory.
As the transfer address, the value held in the transfer destination address register 15 is used. The decrementer 16 decrements the value of the transfer destination address register 15 each time the transfer of one word is completed. Therefore, the contents of the registers inside the microprocessor designated by the register list register 17 are sequentially transferred from the address previously written in the transfer destination address register 15 toward the lower address side. When the processing 26a for transferring the information inside the microprocessor to an external memory (not shown) is completed,
The microinstruction entry control block 2 sets the microinstruction entry code of the instruction (2) at the waiting address (xyz + 1) in the microinstruction entry pointer 4, and the execution of the instruction (2) 22 is started.

【0016】上記の動作はプログラムカウンタの値によ
りブレークポイントを指定する場合について説明した
が、オペランドのアドレスによりブレークポイントを指
定する場合もある。この場合は、まず、予め図示しない
命令の実行によりオペランドブレークポインタ10にオ
ペランドのアドレスを書き込んでおくと、従来例と同様
の動作によりブレークポイント検出ブロック11はブレ
ークヒット信号12をマイクロ命令エントリー制御ブロ
ック2に入力する。したがって、オペランドブレークポ
インタ10に記憶されているアドレスのオペランドをア
クセスした命令の実行完了後割込みが発生し、その後は
プログラムカウンタの値によりブレークポイントを指定
する場合と同様の動作を行う。
The above operation has been described for the case where the breakpoint is specified by the value of the program counter, but there are cases where the breakpoint is specified by the address of the operand. In this case, first, when an operand address is written in the operand break pointer 10 by executing an instruction (not shown) in advance, the breakpoint detection block 11 sends a break hit signal 12 to the micro instruction entry control block by the same operation as in the conventional example. Enter in 2. Therefore, an interrupt is generated after the execution of the instruction that has accessed the operand of the address stored in the operand break pointer 10 is completed, and thereafter, the same operation as in the case where the breakpoint is specified by the value of the program counter is performed.

【0017】実施例2.図3は、請求項2の発明の実施
例によるマイクロプロセッサで、プログラム実行中のマ
イクロプロセッサ内部の情報を外部に取り出す動作を説
明するブロック図である。図中、1〜17は図1の実施
例1と同一または相当部分を示している。31は本実施
例で備えた内部情報出力要求信号、32はタイミングブ
ロックである。
Embodiment 2. FIG. 3 is a block diagram for explaining the operation of the microprocessor according to the second embodiment of the present invention to take out information inside the microprocessor during execution of a program to the outside. In the figure, 1 to 17 indicate the same or corresponding parts as in the first embodiment of FIG. Reference numeral 31 is an internal information output request signal provided in this embodiment, and 32 is a timing block.

【0018】図4は、図3に示したこの実施例によるマ
イクロプロセッサにおいて、プログラム実行中のマイク
ロプロセッサの内部情報を外部に取り出す命令実行シー
ケンスの一例を示す模式図である。図中、20〜25は
ユーザプログラムの命令、26a〜26cはこの発明に
より備えられたマイクロプロセッサ内部情報を図示しな
い外部メモリに転送する処理である。
FIG. 4 is a schematic diagram showing an example of an instruction execution sequence for extracting the internal information of the microprocessor executing the program to the outside in the microprocessor according to this embodiment shown in FIG. In the figure, 20 to 25 are instructions of a user program, and 26a to 26c are processes for transferring internal information of the microprocessor provided by the present invention to an external memory (not shown).

【0019】次に動作について図3及び図4を用いて説
明する。ここでは、アドレス(A+m+1)番地の命令
(1)21からアドレス(A+m+n)番地の命令
(n)23までの各命令毎の実行完了直後のマイクロプ
ロセッサの内部情報を外部に取り出すものとする。ま
ず、予め、図示しない命令の実行により、転送先アドレ
スレジスタ15にマイクロプロセッサ内部情報の転送先
アドレスを、レジスタリストレジスタ17に図示しない
外部メモリに転送すマイクロプロセッサ内部のレジスタ
を指定するコードを、それぞれ書き込んでおく。アドレ
ス(A+m)番地の命令(0)20の実行まではマイク
ロプロセッサの内部情報を外部に取り出さないので、外
部から内部情報出力要求信号11を入力しない。この場
合、マイクロ命令エントリー制御ブロック2は図示しな
いデコーダより出力されるマイクロ命令エントリーコー
ド1を先だって実行されている命令の実行完了後マイク
ロ命令エントリーポインタ4にセットする。したがっ
て、各命令はアドレス順に順次実行される。
Next, the operation will be described with reference to FIGS. 3 and 4. Here, it is assumed that the internal information of the microprocessor immediately after the completion of execution of each instruction from the instruction (1) 21 at the address (A + m + 1) to the instruction (n) 23 at the address (A + m + n) is taken out. First, by executing an instruction (not shown), a transfer destination address of the microprocessor internal information is transferred to the transfer destination address register 15, and a code that specifies a register inside the microprocessor to be transferred to an external memory (not shown) is transferred to the register list register 17. Write in each. Until the execution of the instruction (0) 20 at the address (A + m), the internal information of the microprocessor is not fetched to the outside, so the internal information output request signal 11 is not inputted from the outside. In this case, the microinstruction entry control block 2 sets the microinstruction entry code 1 output from the decoder (not shown) in the microinstruction entry pointer 4 after the execution of the previously executed instruction is completed. Therefore, each instruction is sequentially executed in the order of addresses.

【0020】アドレス(A+m+1)番地の命令(1)
21については、実行完了後にマイクロプロセッサの内
部情報を外部に取り出すので、アドレス(A+m+1)
番地の命令(1)21のフェッチ時に外部から内部情報
出力要求信号11を入力する。外部から入力された内部
情報出力要求信号11はタイミングブロック32に入力
され、タイミングブロック10はアドレス(A+m+
1)番地の命令(1)21の実行が開始されると、ブレ
ークヒット信号12をマイクロ命令エントリー制御ブロ
ック2に入力する。マイクロ命令エントリー制御ブロッ
ク2はブレークヒット信号12が入力されると、次に実
行すべき命令のマイクロ命令エントリーコードを待機さ
せる。そして先だって実行されている命令を実行後、定
数レジスタ14に記憶されている外部メモリに転送する
シーケンス12のマイクロ命令エントリーコードを、マ
イクロ命令エントリーポインタ4にセットする。したが
って、(A+m+1)番地の命令(1)21の実行完了
後マイクロプロセッサ内部情報を図示しない外部メモリ
に転送するシーケンス13が起動され、内部情報を外部
メモリに転送する処理26aが行われる。ここで、マイ
クロプロセッサ内部情報を外部メモリに転送するシーケ
ンス13は、レジスタリストレジスタ17により指定さ
れるマイクロプロセッサ内部のレジスタの内容を、外部
メモリに転送する。転送アドレスは、転送先アドレスレ
ジスタ15に保持されている値を用いる。デクリメンタ
16は、1ワードの転送が終了する度に転送先アドレス
レジスタ15の値をデクリメントする。したがって、予
め転送先アドレスレジスタ15に書き込まれていたアド
レスを先頭に低アドレス側に向かって順に、レジスタリ
ストレジスタ17により指定されるマイクロプロセッサ
内部のレジスタの内容が転送される。内部情報を外部メ
モリに転送する処理26aが終了すると、マイクロ命令
エントリー制御ブロック2は待機させていた(A+m+
2)番地の命令(2)22のマイクロ命令エントリーコ
ードをマイクロ命令エントリーポインタ4にセットし命
令(2)22の実行が開始される。
Instruction (1) at address (A + m + 1)
With regard to No. 21, since the internal information of the microprocessor is taken out after the execution is completed, the address (A + m + 1)
When fetching the instruction (1) 21 at the address, the internal information output request signal 11 is input from the outside. The internal information output request signal 11 input from the outside is input to the timing block 32, and the timing block 10 receives the address (A + m +
1) When the execution of the instruction (1) 21 at the address is started, the break hit signal 12 is input to the micro instruction entry control block 2. When the break hit signal 12 is input, the microinstruction entry control block 2 waits for the microinstruction entry code of the instruction to be executed next. Then, after executing the previously executed instruction, the microinstruction entry code of the sequence 12 to be transferred to the external memory stored in the constant register 14 is set in the microinstruction entry pointer 4. Therefore, after the execution of the instruction (1) 21 at the address (A + m + 1) is completed, the sequence 13 for transferring the microprocessor internal information to the external memory (not shown) is activated, and the processing 26a for transferring the internal information to the external memory is performed. Here, in the sequence 13 for transferring the microprocessor internal information to the external memory, the contents of the register inside the microprocessor specified by the register list register 17 are transferred to the external memory. As the transfer address, the value held in the transfer destination address register 15 is used. The decrementer 16 decrements the value of the transfer destination address register 15 each time the transfer of one word is completed. Therefore, the contents of the registers inside the microprocessor designated by the register list register 17 are sequentially transferred from the address previously written in the transfer destination address register 15 toward the lower address side. When the processing 26a for transferring the internal information to the external memory is completed, the microinstruction entry control block 2 has been waiting (A + m +).
2) The micro instruction entry code of the instruction (2) 22 at the address is set in the micro instruction entry pointer 4, and the execution of the instruction (2) 22 is started.

【0021】アドレス(A+m+1)番地の命令(1)
21からアドレス(A+m+n)番地の命令(n)23
までの各命令毎の実行完了直後のマイクロプロセッサの
内部情報を外部に取り出す場合は、各命令のフェッチ毎
に外部から内部情報出力要求信号11を入力すれば、各
命令の実行完了毎にマイクロプロセッサの内部情報が外
部メモリに転送されることになる。この転送において
も、レジスタリストレジスタ17により指定されるマイ
クロプロセッサ内部のレジスタの内容を外部メモリに転
送する。転送アドレスは、転送先アドレスレジスタ15
に保持されている値を用いる。デクリメンタ16は、1
ワードの転送が終了する度に転送先アドレスレジスタの
値をデクリメントする。したがって、予め転送先アドレ
スレジスタ15に書き込まれていたアドレスを先頭に低
アドレス側に向かって順に、レジスタリストレジスタ1
7により指定されるマイクロプロセッサ内部のレジスタ
の内容が転送される。アドレス(A+m+n+1)番地
の命令(n+1)24及びアドレス(A+m+n+2)
番地の命令(n+2)25の実行完了後にマイクロプロ
セッサの内部情報の外部メモリへの転送が不要であれ
ば、アドレス(A+m+n+1)番地の命令(n+1)
24及びアドレス(A+m+n+2)番地の命令(n+
2)25のフェッチ時に、外部から内部情報出力要求信
号11を入力しなければアドレス(A+m+n+1)番
地の命令(n+1)24及びアドレス(A+m+n+
2)番地の命令(n+2)25の実行完了後にマイクロ
プロセッサの内部情報の外部メモリへの転送は行われな
い。
Instruction (1) at address (A + m + 1)
21 to instruction (n) 23 at address (A + m + n)
When the internal information of the microprocessor immediately after the completion of execution of each instruction is fetched to the outside, if the internal information output request signal 11 is input from the outside every time the instruction is fetched, the microprocessor is executed each time the execution of each instruction is completed. Internal information of will be transferred to the external memory. Also in this transfer, the contents of the register inside the microprocessor designated by the register list register 17 are transferred to the external memory. The transfer address is the transfer destination address register 15
The value held in is used. Decrementer 16 is 1
The value of the transfer destination address register is decremented each time the word transfer is completed. Therefore, the addresses written in advance in the transfer destination address register 15 are headed toward the low address side in order of the register list register 1
The contents of the register inside the microprocessor designated by 7 are transferred. Instruction (n + 1) 24 at address (A + m + n + 1) and address (A + m + n + 2)
If it is unnecessary to transfer the internal information of the microprocessor to the external memory after the execution of the instruction (n + 2) 25 at the address is completed, the instruction (n + 1) at the address (A + m + n + 1)
24 and instruction (n +) at address (A + m + n + 2)
2) When fetching 25, if the internal information output request signal 11 is not input from the outside, the instruction (n + 1) 24 at the address (A + m + n + 1) and the address (A + m + n +)
2) After the execution of the instruction (n + 2) 25 at the address is completed, the internal information of the microprocessor is not transferred to the external memory.

【0022】上記実施例2においては、命令フェッチ時
に内部情報出力要求信号11を入力する場合を示した
が、オペランドアクセス時に内部情報出力要求を入力す
る場合もある。この場合は、内部情報出力要求信号31
がタイミングブロック32に入力されると、該オペラン
ドアクセスを行った命令実行中にブレークヒット信号1
2をマイクロ命令エントリー制御ブロック2に入力す
る。その後は、命令フェッチ時に内部情報出力要求信号
31を入力する場合と同様の動作を行う。
Although the internal information output request signal 11 is input at the time of instruction fetch in the second embodiment, the internal information output request may be input at the time of operand access. In this case, the internal information output request signal 31
Is input to the timing block 32, the break hit signal 1 is output during execution of the instruction that accessed the operand.
2 into microinstruction entry control block 2. After that, the same operation as in the case of inputting the internal information output request signal 31 at the time of instruction fetch is performed.

【0023】その他の実施例.デクリメンタ15はイン
クリメンタを用いても同様の効果を得ることができる。
Other Embodiments The decrementer 15 can also obtain the same effect by using an incrementer.

【0024】上記各実施例で、モニタプログラム無し、
割込み処理無しで内部情報を外部に転送できる利点を定
量的に評価してみる。下記を仮定する。外部に読み出す
内部レジスタの数が汎用レジスタ16本、これはSto
re Multiple命令で読み出し、制御レジスタ
23本で、これはStore from Contro
l Space命令で読み出すこととする。まず、従来
例ではバスアクセス回数は以下の計67回となる。 一方、本発明の場合に必要なバスアクセスの回数は以下
の計39回でよい。 なお、上記における従来例の命令フェッチの回数は最小
の場合であり、これより増える場合も有り得る。このよ
うにCPU内部の処理を無視してもこれだけの差がある
が、内部処理として割り込みの前処理や復帰処理、各命
令実行時の内部処理等を考慮すると実際には実行時間の
差はもっと広がると考えられる。また、パイプライン処
理を行うCPUでは、割込み処理時にパイプラインをフ
ラッシュするためさらに実行時間の差は広がる。
In each of the above embodiments, there is no monitor program,
Let's quantitatively evaluate the advantage of being able to transfer internal information to the outside without interrupt processing. Assume the following: The number of internal registers read out to the outside is 16 general-purpose registers.
It is read by the re Multiple instruction and has 23 control registers. This is the Store from Contro.
It is read by the l Space instruction. First, in the conventional example, the number of bus accesses is 67 times as follows. On the other hand, the number of times of bus access required in the case of the present invention may be 39 times in total. Note that the number of instruction fetches in the above-described conventional example is the minimum, and may increase more than this. Even if the internal processing of the CPU is ignored in this way, there is such a difference, but considering the internal processing such as interrupt preprocessing, return processing, and internal processing when each instruction is executed, the difference in execution time is It is thought to spread. Further, in a CPU that performs pipeline processing, the pipeline is flushed during interrupt processing, so the difference in execution time further widens.

【0025】[0025]

【発明の効果】以上のようにこの発明によれば、マイク
ロプログラムメモリにマイクロプログラムを納め、マイ
クロプロセッサが指定のアドレスの命令を実行後、この
マイクロプログラムに従って、マイクロプロセッサが実
行した状況を示す内部情報を外部に転送し、この転送
後、元の処理に戻るようにしたので、または内部情報出
力要求端子を設けて、これに出力要求信号が来ると、同
様動作をさせるようにしたので、モニタプログラムなし
で、また割込み処理なしでプログラム実行中の内部情報
を外部に取り出すことができ、処理時間を短縮できる効
果がある。
As described above, according to the present invention, the microprogram is stored in the microprogram memory, and after the microprocessor executes the instruction at the specified address, the internal state indicating the status executed by the microprocessor is displayed according to the microprogram. Since the information is transferred to the outside and the processing is returned to the original after this transfer, or the internal information output request terminal is provided and the same operation is performed when the output request signal comes in, the monitor It is possible to take out internal information during program execution to the outside without a program and without interrupt processing, which has the effect of shortening the processing time.

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

【図1】本発明の一実施例を示す構成ブロック図であ
る。
FIG. 1 is a configuration block diagram showing an embodiment of the present invention.

【図2】図1の実施例の動作を説明する実行シーケンス
図である。
FIG. 2 is an execution sequence diagram for explaining the operation of the embodiment of FIG.

【図3】本発明の他の実施例を示す構成ブロック図であ
る。
FIG. 3 is a configuration block diagram showing another embodiment of the present invention.

【図4】図3の実施例の動作を説明する実行シーケンス
図である。
FIG. 4 is an execution sequence diagram for explaining the operation of the embodiment of FIG.

【図5】従来のマイクロプロセッサの内部情報を外部に
転送する場合の構成図である。
FIG. 5 is a configuration diagram in the case of transferring internal information of a conventional microprocessor to the outside.

【図6】図5の動作を説明する実行シーケンス図であ
る。
FIG. 6 is an execution sequence diagram illustrating the operation of FIG.

【符号の説明】[Explanation of symbols]

1 マイクロ命令エントリーコード 2 マイクロ命令エントリー制御ブロック 3,14 定数レジスタ 4 マイクロ命令エントリーポインタ 5 マイクロプログラムメモリ 8 命令実行ブロック 9 PCブレークポインタ 10 オペランドブレークポインタ 11 ブレークポイント検出ブロック 12 ブレークヒット信号 13 内部情報転送シーケンス 15 転送先アドレスレジスタ 16 デクリメンタ 17 レジスタリストレジスタ 20〜25 ユーザプログラムの命令 26a〜26c 内部情報転送処理 31 内部情報出力要求信号 32 タイミングブロック 1 Microinstruction entry code 2 Microinstruction entry control block 3,14 Constant register 4 Microinstruction entry pointer 5 Microprogram memory 8 Instruction execution block 9 PC break pointer 10 Operand break pointer 11 Breakpoint detection block 12 Break hit signal 13 Internal information transfer Sequence 15 Transfer destination address register 16 Decrementer 17 Register list register 20-25 User program instruction 26a-26c Internal information transfer processing 31 Internal information output request signal 32 Timing block

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成4年4月15日[Submission date] April 15, 1992

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】特許請求の範囲[Name of item to be amended] Claims

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【特許請求の範囲】[Claims]

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0010[Correction target item name] 0010

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0010】[0010]

【課題を解決するための手段】この発明に係わるマイク
ロプロセッサは、まずマイクロプログラムメモリを設け
てマイクロプログラムを納め、マイクロプロセッサが指
定のアドレスの命令を実行後、このマイクロプログラム
に従って、マイクロプロセッサが実行した状況を示す内
部情報を外部に転送し、この転送完了後、マイクロプロ
セッサが外部転送前に実行していたアドレスの命令列に
復帰する手段を備えた。また、請求項2の発明では、メ
モリにマイクロプログラムを納め、さらに内部情報出力
要求端子を設け、命令フェッチ時またはオペランドアク
セス時に、内部情報出力要求端子に出力要求信号を受け
ると、マイクロプロセッサはその時フェッチしていた命
令またはオペランドアクセスを行っていた命令の実行
後、このマイクロプログラムに従って、マイクロプロセ
ッサが実行していた状況を示す内部情報を外部に転送
し、この転送完了後、マイクロプロセッサが外部転送前
に実行していたアドレスの命令列に復帰する手段を設け
た。
In a microprocessor according to the present invention, a microprogram memory is first provided to store the microprogram, the microprocessor executes an instruction at a specified address, and then the microprocessor executes in accordance with the microprogram. The internal information indicating the above situation is transferred to the outside, and after this transfer is completed, the microprocessor is provided with a means for returning to the instruction sequence of the address executed before the external transfer. According to the second aspect of the present invention, the microprogram is stored in the memory, and an internal information output request terminal is further provided so that the instruction fetch or the operand access is performed.
At the time of access, the internal information output request pin receives an output request signal.
Then, the microprocessor is
The instruction that was performing the instruction or operand access
After that, according to this microprogram , the internal information indicating the condition that the microprocessor was executing is transferred to the outside, and after this transfer is completed, the microprocessor returns to the instruction sequence of the address that was being executed before the external transfer. Provided.

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0011[Correction target item name] 0011

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0011】[0011]

【作用】この発明におけるマイクロプロセッサは、所定
のアドレスの命令または所定のアドレスのオペランドを
使用する命令の実行後、マイクロプログラムにより、内
部情報を外部に転送する。または、内部情報出力要求信
号を命令フェッチ時またはオペランドアクセス時に受け
ると、マイクロプロセッサはその時フェッチしていた命
令またはその時アクセスしていたオペランドを使用する
命令の実行完了後、マイクロプログラムにより、内部情
報を外部に転送する。
The microprocessor according to the present invention has a predetermined
The instruction at the address or the operand at the given address
After executing the instruction to be used, the microprogram transfers the internal information to the outside. Alternatively, the internal information output request signal
Received at instruction fetch or operand access
Then, the microprocessor is
Or use the operand accessed at that time
After the execution of the instruction is completed, the microprogram transfers the internal information to the outside.

【手続補正4】[Procedure amendment 4]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0014[Correction target item name] 0014

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0014】次に動作について図1及び図2を用いて説
明する。従来例と同様、ここではマイクロプロセッサが
従来例の(A+m+1)番地に相当する(xyz)番地
の命令(1)21、(A+m+1)番地に相当する(x
yz+1)番地の命令(2)22を順に実行するものと
し、(xyz)番地の命令(1)21の実行完了直後の
マイクロプロセッサの内部情報を外部に取り出すものと
する。まず、予め、図示しない命令の実行により、PC
ブレークポインタ9に(xyz)を、転送先アドレスレ
ジスタ15にマイクロプロセッサ内部情報の転送先の先
頭アドレスを、レジスタリストレジスタ17に図示しな
い外部メモリに転送するマイクロプロセッサ内部のレジ
スタを指定するコードを、それぞれ書き込んでおく。ブ
レークヒット信号12がマイクロ命令エントリー制御ブ
ロック2に入力されるまでの動作は従来例と同様の動作
を行う。まず、マイクロ命令エントリー制御ブロック2
は通常は図示しない命令デコーダより出力されるマイク
ロ命令エントリーコード1を先だって実行されている命
令の実行完了後マイクロ命令エントリーポインタ4にセ
ットする。そして、ブレークヒット信号12が入力され
ると、先だって実行されている命令を実行した後、次に
実行すべき命令のマイクロ命令エントリーコードを待機
させる。そしてマイクロプロセッサ内部情報を図示しな
い外部メモリに転送するシーケンス13のマイクロ命令
エントリーコードを、マイクロ命令エントリーポインタ
4にセットする。したがって、(xyz)番地の命令
(1)21の実行完了後、マイクロプロセッサ内部情報
を図示しない外部メモリに転送するシーケンス13が起
動され、マイクロプロセッサ内部の情報を図示しない外
部メモリに転送する処理26aが行われる。
Next, the operation will be described with reference to FIGS. 1 and 2. Similar to the conventional example, here, the microprocessor corresponds to the instruction (1) 21 and the address (A + m + 1) of the address (xyz) corresponding to the address (A + m + 1) of the conventional example (x).
It is assumed that the instruction (2) 22 at the address yz + 1 is sequentially executed and the internal information of the microprocessor immediately after the completion of the execution of the instruction (1) 21 at the address (xyz) is taken out to the outside. First, the PC is executed in advance by executing an instruction (not shown).
(Xyz) is set to the break pointer 9, the start address of the transfer destination of the microprocessor internal information is set to the transfer destination address register 15, and the code that specifies the register inside the microprocessor to be transferred to the external memory (not shown) is set to the register list register 17. Write in each. The operation until the break hit signal 12 is input to the micro instruction entry control block 2 is the same as that of the conventional example. First, the micro instruction entry control block 2
Normally sets the microinstruction entry code 1 output from an instruction decoder (not shown) in the microinstruction entry pointer 4 after the execution of the previously executed instruction is completed. When the break hit signal 12 is input, the previously executed instruction is executed and then the microinstruction entry code of the next instruction to be executed is waited. Then, the microinstruction entry code of sequence 13 for transferring the microprocessor internal information to an external memory (not shown) is set in the microinstruction entry pointer 4. Therefore, after the execution of the instruction (1) 21 at the address (xyz) is completed, the sequence 13 for transferring the microprocessor internal information to the external memory (not shown) is activated, and the processing 26a for transferring the information inside the microprocessor to the external memory (not shown). Is done.

【手続補正5】[Procedure Amendment 5]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0016[Correction target item name] 0016

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0016】上記の動作はプログラムカウンタの値によ
りブレークポイントを指定する場合について説明した
が、オペランドのアドレスによりブレークポイントを指
定する場合もある。この場合は、まず、予め図示しない
命令の実行によりオペランドブレークポインタ10にオ
ペランドのアドレスを書き込んでおくと、従来例と同様
の動作によりブレークポイント検出ブロック11はブレ
ークヒット信号12をマイクロ命令エントリー制御ブロ
ック2に入力する。したがって、オペランドブレークポ
インタ10に記憶されているアドレスのオペランドをア
クセスした命令の実行完了後プログラムカウンタの値に
よりブレークポイントを指定する場合と同様、マイクロ
プロセッサ内部情報を図示しない外部メモリに転送する
処理が行われる。その後は、上記オペランドアクセスを
行った命令の次に実行すべき命令から実行が開始され
る。
The above operation has been described for the case where the breakpoint is specified by the value of the program counter, but there are cases where the breakpoint is specified by the address of the operand. In this case, first, when an operand address is written in the operand break pointer 10 by executing an instruction (not shown) in advance, the breakpoint detection block 11 sends a break hit signal 12 to the micro instruction entry control block by the same operation as in the conventional example. Enter in 2. Therefore, after the execution of the instruction that accessed the operand of the address stored in the operand break pointer 10 is completed , the value of the program counter becomes
Similar to specifying more breakpoints, micro
Transfers processor internal information to external memory (not shown)
Processing is performed. After that, perform the above operand access
Execution starts from the instruction to be executed next to the executed instruction.
It

【手続補正6】[Procedure correction 6]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0020[Correction target item name] 0020

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0020】アドレス(A+m+1)番地の命令(1)
21については、実行完了後にマイクロプロセッサの内
部情報を外部に取り出すので、アドレス(A+m+1)
番地の命令(1)21のフェッチ時に外部から内部情報
出力要求信号11を入力する。外部から入力された内部
情報出力要求信号11はタイミングブロック32に入力
され、タイミングブロック32はアドレス(A+m+
1)番地の命令(1)21の実行が開始されると、ブレ
ークヒット信号12をマイクロ命令エントリー制御ブロ
ック2に入力する。マイクロ命令エントリー制御ブロッ
ク2はブレークヒット信号12が入力されると、次に実
行すべき命令のマイクロ命令エントリーコードを待機さ
せる。そして先だって実行されている命令を実行後、定
数レジスタ14に記憶されている外部メモリに転送する
シーケンス12のマイクロ命令エントリーコードを、マ
イクロ命令エントリーポインタ4にセットする。したが
って、(A+m+1)番地の命令(1)21の実行完了
後マイクロプロセッサ内部情報を図示しない外部メモリ
に転送するシーケンス13が起動され、内部情報を外部
メモリに転送する処理26aが行われる。ここで、マイ
クロプロセッサ内部情報を外部メモリに転送するシーケ
ンス13は、レジスタリストレジスタ17により指定さ
れるマイクロプロセッサ内部のレジスタの内容を、外部
メモリに転送する。転送アドレスは、転送先アドレスレ
ジスタ15に保持されている値を用いる。デクリメンタ
16は、1ワードの転送が終了する度に転送先アドレス
レジスタ15の値をデクリメントする。したがって、予
め転送先アドレスレジスタ15に書き込まれていたアド
レスを先頭に低アドレス側に向かって順に、レジスタリ
ストレジスタ17により指定されるマイクロプロセッサ
内部のレジスタの内容が転送される。内部情報を外部メ
モリに転送する処理26aが終了すると、マイクロ命令
エントリー制御ブロック2は待機させていた(A+m+
2)番地の命令(2)22のマイクロ命令エントリーコ
ードをマイクロ命令エントリーポインタ4にセットし命
令(2)22の実行が開始される。
Instruction (1) at address (A + m + 1)
With regard to No. 21, since the internal information of the microprocessor is taken out after the execution is completed, the address (A + m + 1)
When fetching the instruction (1) 21 at the address, the internal information output request signal 11 is input from the outside. The internal information output request signal 11 input from the outside is input to the timing block 32 , and the timing block 32 receives the address (A + m +
1) When the execution of the instruction (1) 21 at the address is started, the break hit signal 12 is input to the micro instruction entry control block 2. When the break hit signal 12 is input, the microinstruction entry control block 2 waits for the microinstruction entry code of the instruction to be executed next. Then, after executing the previously executed instruction, the microinstruction entry code of the sequence 12 to be transferred to the external memory stored in the constant register 14 is set in the microinstruction entry pointer 4. Therefore, after the execution of the instruction (1) 21 at the address (A + m + 1) is completed, the sequence 13 for transferring the microprocessor internal information to the external memory (not shown) is activated, and the processing 26a for transferring the internal information to the external memory is performed. Here, in the sequence 13 for transferring the microprocessor internal information to the external memory, the contents of the register inside the microprocessor specified by the register list register 17 are transferred to the external memory. As the transfer address, the value held in the transfer destination address register 15 is used. The decrementer 16 decrements the value of the transfer destination address register 15 each time the transfer of one word is completed. Therefore, the contents of the registers inside the microprocessor designated by the register list register 17 are sequentially transferred from the address previously written in the transfer destination address register 15 toward the lower address side. When the processing 26a for transferring the internal information to the external memory is completed, the microinstruction entry control block 2 has been waiting (A + m +).
2) The micro instruction entry code of the instruction (2) 22 at the address is set in the micro instruction entry pointer 4, and the execution of the instruction (2) 22 is started.

【手続補正7】[Procedure Amendment 7]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0024[Correction target item name] 0024

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0024】上記各実施例で、モニタプログラム無し、
割込み処理無しで内部情報を外部に転送できる利点を定
量的に評価してみる。下記を仮定する。外部に読み出す
内部レジスタの数が汎用レジスタ16本及び制御レジス
タ23本とする。汎用レジスタ16本は、一回の実行で
複数の汎用レジスタの内容を外部メモリに転送するSt
ore Multiple命令(以下STM命令とす
る)で読み出すこととし、制御レジスタ23本は、一回
の実行で一本の制御レジスタの内容を外部メモリに転送
するStore from Control Spac
e命令(以下STC命令とする)で読み出すこととす
る。まず、従来例ではバスアクセス回数は以下の計67
回となる。 一方、本発明の場合に必要なバスアクセスの回数は以下
の計39回でよい。 なお、上記における従来例の命令フェッチの回数は最小
の場合であり、これより増える場合も有り得る。このよ
うにCPU内部の処理を無視してもこれだけの差がある
が、内部処理として割り込みの前処理や復帰処理、各命
令実行時の内部処理等を考慮すると実際には実行時間の
差はもっと広がると考えられる。また、パイプライン処
理を行うCPUでは、割込み処理時にパイプラインをフ
ラッシュするためさらに実行時間の差は広がる。
In each of the above embodiments, there is no monitor program,
Let's quantitatively evaluate the advantage of being able to transfer internal information to the outside without interrupt processing. Assume the following: Read out
The number of internal registers is 16 general-purpose registers and control register
Twenty-three. 16 general-purpose registers can be executed once
St for transferring the contents of a plurality of general-purpose registers to an external memory
ore Multiple instruction (hereinafter referred to as STM instruction)
Read), and the 23 control registers are read once.
To transfer the contents of one control register to external memory
Store from Control Space
Read by e command (hereinafter referred to as STC command)
It First, in the conventional example, the bus access count is 67 in total.
Times. On the other hand, the number of bus accesses required in the case of the present invention may be 39 times in total as follows. Note that the number of instruction fetches in the above-described conventional example is the minimum case, and may increase more than this. Even if the internal processing of the CPU is ignored in this way, there is such a difference, but considering the internal processing such as interrupt preprocessing, return processing, internal processing when each instruction is executed, etc. It is thought to spread. Further, in a CPU that executes pipeline processing, the pipeline is flushed during interrupt processing, so the difference in execution time further widens.

【手続補正8】[Procedure Amendment 8]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図6[Name of item to be corrected] Figure 6

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図6】 [Figure 6]

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 マイクロプロセッサにおいてマイクロプ
ログラムメモリを備え、 上記マイクロプログラムメモリにマイクロプログラムを
記載し、指定されたアドレスまたはアドレスのオペラン
ドの命令を実行後、 引き続き上記マイクロプログラムにより、マイクロプロ
セッサ実行自体の内部情報を内部に転送し、 上記外部への転送完了後、上記アドレスの命令に続く命
令列に復帰して実行を続ける手段を備えたマイクロプロ
セッサ。
1. A microprocessor is provided with a microprogram memory, the microprogram is described in the microprogram memory, and after executing an instruction of a specified address or an operand of an address, the microprocessor executes the microprocessor itself itself. A microprocessor comprising means for transferring internal information to the inside, and after completing the transfer to the outside, returning to an instruction sequence following the instruction at the address and continuing execution.
【請求項2】 マイクロプロセッサにおいて、マイクロ
プログラムメモリを備え、上記マイクロプログラムメモ
リにマイクロプログラムを記載し、 内部情報出力要求端子を備え、 上記マイクロプロセッサが命令実行時に上記内部情報出
力要求端子に出力要求信号を受けると、上記命令を実行
後、 引き続き、上記マイクロプログラムにより、マイクロプ
ロセッサ実行自体の内部情報を外部に転送し、 上記外部への転送完了後、上記マイクロプロセッサが内
部情報出力前に実行していた命令に続く命令列に復帰し
て実行を続ける手段を備えたマイクロプロセッサ。
2. A microprocessor comprising a microprogram memory, a microprogram written in the microprogram memory, and an internal information output request terminal, wherein the microprocessor requests an output to the internal information output request terminal when executing an instruction. When the signal is received, after executing the above instruction, the microprogram continuously transfers the internal information of the microprocessor execution itself to the outside, and after the completion of the transfer to the outside, the microprocessor executes it before outputting the internal information. A microprocessor equipped with means for returning to the instruction sequence following the existing instruction and continuing execution.
JP4002084A 1992-01-09 1992-01-09 Microprocessor Pending JPH05189229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4002084A JPH05189229A (en) 1992-01-09 1992-01-09 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4002084A JPH05189229A (en) 1992-01-09 1992-01-09 Microprocessor

Publications (1)

Publication Number Publication Date
JPH05189229A true JPH05189229A (en) 1993-07-30

Family

ID=11519488

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4002084A Pending JPH05189229A (en) 1992-01-09 1992-01-09 Microprocessor

Country Status (1)

Country Link
JP (1) JPH05189229A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5617450A (en) * 1979-07-23 1981-02-19 Fujitsu Ltd Data collection system
JPS5789159A (en) * 1980-11-20 1982-06-03 Nec Corp Micro-program controlling device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5617450A (en) * 1979-07-23 1981-02-19 Fujitsu Ltd Data collection system
JPS5789159A (en) * 1980-11-20 1982-06-03 Nec Corp Micro-program controlling device

Similar Documents

Publication Publication Date Title
JP2746549B2 (en) Computer system and operation method thereof
JP2504830Y2 (en) Data processing device
JPH06236268A (en) Apparatus and method for judgment of length of instruction
JPS6125169B2 (en)
US6229543B1 (en) Microprocessor, and graphics processing apparatus and method using the same
JPS645330B2 (en)
JPH07120338B2 (en) Method for a data processor to coordinate the execution of instructions by a coprocessor and the data processor
JPH08320795A (en) Program control system
US6044455A (en) Central processing unit adapted for pipeline process
JPH031231A (en) Microprogram controller
JPH05189229A (en) Microprocessor
US6727903B1 (en) Microprocessor, and graphics processing apparatus and method using the same
JPH05241827A (en) Command buffer controller
JP2552738B2 (en) Data processing device
JPH06103109A (en) Data processor and debugging device using the same
JP2953451B2 (en) Interrupt handling method
JPH06324861A (en) System and method for controlling cpu
JP2902847B2 (en) Self-modifying code execution method
JPS6341092B2 (en)
JPS62245439A (en) Symbolic processing system and method
JPH05210500A (en) Data processor
JPH06324884A (en) Data processor
JPS6221131B2 (en)
JPH0795288B2 (en) Microcomputer
TW399176B (en) Microprocessor access control unit upon fetching address queue