JPH05204706A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH05204706A
JPH05204706A JP4037254A JP3725492A JPH05204706A JP H05204706 A JPH05204706 A JP H05204706A JP 4037254 A JP4037254 A JP 4037254A JP 3725492 A JP3725492 A JP 3725492A JP H05204706 A JPH05204706 A JP H05204706A
Authority
JP
Japan
Prior art keywords
memory
register
program counter
program
microcomputer
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
JP4037254A
Other languages
Japanese (ja)
Inventor
Shinichiro Ohashi
伸一郎 大橋
Minoru Takeuchi
稔 竹内
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 JP4037254A priority Critical patent/JPH05204706A/en
Publication of JPH05204706A publication Critical patent/JPH05204706A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE:To enable real-time trace at high speed without executing register save, register recovery and the subtraction of a program counter by providing a memory reference means in an instruction executing means. CONSTITUTION:In respect to an instruction executing means 1 composed of a memory writing means 1a, memory reading means 1b and PC operating means 1c, a memory reference means 1d is provided as well to generate a memory read cycle without reloading all the contents of a register 2 equipped with the program counter. Therefore, the memory reference means 1d generates the memory read cycle without reloading all the contents of the register 2 provided with the program counter. Thus, in the case of executing real-time trace at a debugger using an ICE, the real-time trace can be executed at high speed by executing a trace processing according to one instruction without executing register save, register recovery and the subtraction of the program counter.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、マイクロコンピュー
タに関し、特に、高速にリアルタイムトレースを行うこ
とができるマイクロコンピュータに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer, and more particularly to a microcomputer capable of performing high-speed real-time trace.

【0002】[0002]

【従来の技術】図5は、従来のマイクロコンピュータの
構成を示すブロック図であり、図において、1はメモリ
書き込み手段1a,メモリ読み出し手段1b及びプログ
ラムカウンタ(以下、PCと称す。)操作手段1cとか
らなる命令実行手段、2は命令実行手段1に接続された
レジスタ、3は命令実行手段1及びレジスタ2に接続さ
れ、これらを制御する制御手段、4はプログラム,デー
タ等を格納するメモリである。
2. Description of the Related Art FIG. 5 is a block diagram showing the structure of a conventional microcomputer. In the figure, 1 is a memory writing means 1a, a memory reading means 1b and a program counter (hereinafter referred to as PC) operating means 1c. And instruction execution means 2 consisting of a register connected to the instruction execution means 1, 3 connected to the instruction execution means 1 and the register 2, and a control means for controlling these, 4 is a memory for storing programs, data, etc. is there.

【0003】次に動作について説明する。メモリ書き込
み手段1aを用いてレジスタ2に格納されたデータをメ
モリ4に転送し、メモリ読み出し手段1bを用いてメモ
リ4のデータをレジスタ2に転送する。また、PC操作
手段1cによってレジスタ2内のPCの値が書き換られ
る。
Next, the operation will be described. The data stored in the register 2 is transferred to the memory 4 using the memory writing unit 1a, and the data in the memory 4 is transferred to the register 2 using the memory reading unit 1b. Further, the PC value in the register 2 is rewritten by the PC operating means 1c.

【0004】一方、図3はマイクロコンピュータのプロ
グラム実行環境を示すブロック図であり、図3(a) はデ
バッカイン・サーキット・エミュレータ(以下、ICE
と称す。)を用いてデバッグを行う時の環境を示し、図
3(b) はデバッグを行わない時の環境を示している。図
において、5はマイクロコンピュータ、6はICE、7
はデバッグされるプログラム及びモニタプログラムを搭
載したプログラムメモリである。そして、図3(a) に示
すようなプログラム実行環境、即ち、デバッガに接続さ
れたマイクロコンピュータにおいてリアルタイムトレー
スを行う時は、通常、図4(a) に示す実行状況でユーザ
・プログラムが実行され、デバッガの機能を用いて特定
番地の内容を参照する時は、図4(b) に示す実行状況で
本来命令Dが存在する番地にJMP命令を入れ、モニタ
プログラムに制御を移した後、トレース処理によってメ
モリを参照し、その後、命令Dが存在する番地に戻って
ユーザ・プログラムの実行を再開する。
On the other hand, FIG. 3 is a block diagram showing a program execution environment of a microcomputer, and FIG. 3 (a) is a debugger-in-circuit emulator (hereinafter referred to as ICE).
Called. ) Is used to show the environment when debugging is performed, and FIG. 3B shows the environment when no debugging is performed. In the figure, 5 is a microcomputer, 6 is an ICE, and 7
Is a program memory equipped with a program to be debugged and a monitor program. When real-time trace is performed in the program execution environment shown in FIG. 3A, that is, in the microcomputer connected to the debugger, the user program is normally executed in the execution state shown in FIG. 4A. , When referring to the contents of a specific address using the function of the debugger, insert a JMP instruction at the address where the original instruction D exists in the execution status shown in Fig. 4 (b), transfer control to the monitor program, and then trace The processing refers to the memory, and then the instruction D is returned to the address where the execution of the user program is resumed.

【0005】図6は、図5に示した従来のマイクロコン
ピュータでトレース処理を行うプログラムのフローチャ
ートの一例である。JMP命令でステップ8に制御が移
り、トレース処理が開始される。特定番地のデータを参
照するには、その番地のデータをいったんレジスタ2に
読み込み、その時のデータバスをモニタすることで行わ
れる。そのため、ステップ9で使用するレジスタをスタ
ックに退避させ、ステップ10でメモリを読み込み、ス
テップ11でスタックに退避していたレジスタ値を復帰
させ、ステップ12でプログラムカウンタを減算し、ス
テップ13でユーザ・プログラムに復帰させている。
FIG. 6 is an example of a flowchart of a program for performing a trace process in the conventional microcomputer shown in FIG. The control is transferred to step 8 by the JMP instruction, and the trace processing is started. To refer to the data of a specific address, the data of that address is once read into the register 2 and the data bus at that time is monitored. Therefore, the registers used in step 9 are saved in the stack, the memory is read in step 10, the register values saved in the stack are restored in step 11, the program counter is subtracted in step 12, and the user Returning to the program.

【0006】[0006]

【発明が解決しようとする課題】従来のマイクロコンピ
ュータは以上のように構成されているので、図6に示す
ように、トレース処理時、レジスタ退避,レジスタ復帰
及びプログラムカウンタの減算を行わなければならず、
リアルタイムトレース中に行われるモニタプログラムの
ステップ数が増えるため、リアルタイムトレースの速度
が遅くなるという問題点があった。
Since the conventional microcomputer is configured as described above, as shown in FIG. 6, register saving, register restoring, and program counter subtraction must be performed during trace processing. No
There is a problem that the speed of the real-time trace becomes slow because the number of steps of the monitor program performed during the real-time trace increases.

【0007】この発明は上記のような問題点を解消する
ためになされたもので、レジスタ退避,レジスタ復帰及
びプログラムカウンタ減算を行うことなく、高速にリア
ルタイムトレースを行うことができるマイクロコンピュ
ータを得ることを目的とする。
The present invention has been made in order to solve the above problems, and provides a microcomputer capable of high-speed real-time trace without register saving, register restoring and program counter subtraction. With the goal.

【0008】[0008]

【課題を解決するための手段】この発明にかかるマイク
ロコンピュータは、命令実行手段内にプログラムカウン
タを含むレジスタの全ての内容を書き換えることなく、
メモリの内容を参照できるメモリ参照手段を設けたもの
である。
The microcomputer according to the present invention can rewrite all the contents of the register including the program counter in the instruction executing means without rewriting.
A memory reference means for referring to the contents of the memory is provided.

【0009】[0009]

【作用】この発明においては、レジスタの全ての内容を
書き換えることなく、メモリの内容を参照できるため、
リアルタイムトレース中に行われるモニタプログラムの
ステップ数を減少させることができる。
In the present invention, since the contents of the memory can be referred to without rewriting all the contents of the register,
The number of steps of the monitor program performed during the real-time trace can be reduced.

【0010】[0010]

【実施例】以下、この発明の一実施例を図について説明
する。図1は、この発明の一実施例によるマイクロコン
ピュータの構成を示すブロック図であり、図において、
図5と同一符号は同一または相当する部分を示し、1d
はメモリ4に接続されたメモリ参照手段であり、命令実
行手段1がメモリ書き込み手段1a,メモリ読み出し手
段1b及びPC操作手段1cとこのメモリ参照手段1d
とにより構成されている。ここで、メモリ参照手段1d
はプログラムカウンタを含むレジスタ2の全ての内容を
書き換えることなく、メモリ読み出しサイクルを発生す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a microcomputer according to an embodiment of the present invention.
The same reference numerals as those in FIG. 5 denote the same or corresponding portions, 1d.
Is a memory referencing means connected to the memory 4, and the instruction executing means 1 is a memory writing means 1a, a memory reading means 1b, a PC operating means 1c and the memory referencing means 1d.
It is composed of and. Here, the memory reference means 1d
Generates a memory read cycle without rewriting all the contents of register 2 including the program counter.

【0011】図2は、このマイクロコンピュータを用い
て図3(a) に示す実行環境、即ち、ICEを用いてデバ
ッグを行う際の実行環境でのリアルタイムトレース時の
モニタプログラムを示すフローチャートであり、このマ
イクロコンピュータでは、従来例と同様にして、JMP
命令でステップ8に制御が移ってトレース処理が開始さ
れると、メモリ参照手段によってステップ10で特定番
地のデータが参照され、次のステップ13でユーザ・プ
ログラムに復帰する。
FIG. 2 is a flow chart showing a monitor program at the time of real-time trace in the execution environment shown in FIG. 3 (a) using this microcomputer, that is, the execution environment when debugging is performed using ICE. In this microcomputer, as in the conventional example, the JMP
When the control is transferred to the step 8 by the instruction and the trace processing is started, the data of the specific address is referred to by the memory referencing means in the step 10 and the process returns to the user program in the next step 13.

【0012】このような本実施例のマイクロコンピュー
タでは、メモリ書き込み手段1a,メモリ読み出し手段
1b及びPC操作手段1cからなる命令実行手段1に対
して、更に、プロクラムカウンタを含むレジスタの全て
の内容を書き換えることなくメモリ読み出しサイクルを
発生するメモリ参照手段1dを設けたので、該メモリ参
照手段1dがプログラムカウンタを含むレジスタ2の全
ての内容を書き換えることなく、メモリ読み出しサイク
ルを発生し、ICEを用いたデバッガにてリアルタイム
トレースを行う際、レジスタ退避,レジスタ復帰及びプ
ログラムカウンタの減算を行うことなく、トレース処理
を1命令で行うことができ、高速にリアルタイムトレー
スを行うことができる。
In the microcomputer of this embodiment as described above, in addition to the instruction executing means 1 including the memory writing means 1a, the memory reading means 1b and the PC operating means 1c, all the contents of the registers including the program counter are stored. Since the memory reference unit 1d that generates the memory read cycle without rewriting is provided, the memory reference unit 1d generates the memory read cycle without rewriting all the contents of the register 2 including the program counter, and the ICE is used. When performing a real-time trace with a debugger, the trace process can be performed by one instruction without performing register saving, register restoring, and program counter subtraction, and high-speed real-time trace can be performed.

【0013】[0013]

【発明の効果】以上のように、この発明によれば、命令
実行手段内にメモリ参照手段を設けたので、レジスタ退
避,レジスタ復帰及びプログラムカウンタの減算を行う
ことなく、高速にリアルタイムトレースを行うことがで
きる効果がある。
As described above, according to the present invention, since the memory reference means is provided in the instruction execution means, the real-time trace can be performed at high speed without saving the register, restoring the register and decrementing the program counter. There is an effect that can be.

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

【図1】この発明の一実施例によるマイクロコンピュー
タの構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a microcomputer according to an embodiment of the present invention.

【図2】図1に示すマイクロコンピュータでトレース処
理を行う際のプログラムを示すフローチャート図であ
る。
FIG. 2 is a flowchart showing a program when a trace process is performed by the microcomputer shown in FIG.

【図3】マイクロコンピュータのプログラム実行環境を
示すブロック図である。
FIG. 3 is a block diagram showing a program execution environment of a microcomputer.

【図4】図3に示すプログラム実行環境におけるユーザ
プログラムとモニタプログラムの実行状況を示す概念図
である。
4 is a conceptual diagram showing execution states of a user program and a monitor program in the program execution environment shown in FIG.

【図5】従来のマイクロコンピュータの構成を示すブロ
ック図である。
FIG. 5 is a block diagram showing a configuration of a conventional microcomputer.

【図6】図5に示すマイクロコンピュータでトレース処
理を行う際のプログラムを示すフローチャート図であ
る。
6 is a flowchart showing a program when a trace process is performed by the microcomputer shown in FIG.

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

1 命令実行手段 1a メモリ書き込み手段 1b メモリ読み出し手段 1c プログラムカウンタ操作手段 1d メモリ参照手段 2 レジスタ 3 制御手段 4 メモリ 5 マイクロコンピュータ 6 イン・サーキット・エミュレータ 7 プログラムメモリ 8,9,10,11,12,13 フローチャートの各
ステップを示す符号
1 instruction execution means 1a memory writing means 1b memory reading means 1c program counter operating means 1d memory reference means 2 register 3 control means 4 memory 5 microcomputer 6 in-circuit emulator 7 program memory 8, 9, 10, 11, 12, 13 Codes indicating each step of the flowchart

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 データ及びプログラムを格納するメモリ
と、 上記メモリに接続され、上記メモリとの間でデータの転
送が行われるレジスタと、 上記レジスタに接続され、上記レジスタのデータを上記
メモリに転送させるメモリ書き込み手段,上記メモリの
データをレジスタに転送させるメモリ読み出し手段,及
び上記レジスタ内のプログラムカウンタの値を書き換え
るプログラムカウンタ操作手段を有する命令実行手段
と、 上記レジスタと上記命令実行手段に接続され、これらを
制御する制御手段とを備えたマイクロコンピュータであ
って、 上記プログラムカウンタを含むレジスタの全ての内容を
書き換えることなく、上記メモリの内容を参照できるメ
モリ参照手段を上記命令実行手段内に設けたことを特徴
とするマイクロコンピュータ。
1. A memory for storing data and a program; a register connected to the memory for transferring data between the memory; and a register connected to the register for transferring the data of the register to the memory. And an instruction executing means having a memory writing means for causing the memory to transfer data in the memory to a register, and a program counter operating means for rewriting the value of the program counter in the register, and the instruction executing means connected to the register and the instruction executing means. A microcomputer having control means for controlling these, wherein memory reference means for referencing the content of the memory without rewriting all the content of the register including the program counter is provided in the instruction executing means. A microcomputer characterized by that.
JP4037254A 1992-01-27 1992-01-27 Microcomputer Pending JPH05204706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4037254A JPH05204706A (en) 1992-01-27 1992-01-27 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4037254A JPH05204706A (en) 1992-01-27 1992-01-27 Microcomputer

Publications (1)

Publication Number Publication Date
JPH05204706A true JPH05204706A (en) 1993-08-13

Family

ID=12492514

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4037254A Pending JPH05204706A (en) 1992-01-27 1992-01-27 Microcomputer

Country Status (1)

Country Link
JP (1) JPH05204706A (en)

Similar Documents

Publication Publication Date Title
US5870607A (en) Method and apparatus for selective replay of computer programs
US4924382A (en) Debugging microprocessor capable of switching between emulation and monitor without accessing stack area
US4667285A (en) Microcomputer unit
JPH03175537A (en) Error controller for debugging microprocessor
JPH04190430A (en) Emulator for software development
JP2663895B2 (en) CPU simulator
JP2000029690A (en) Method and device for data processing
JPH1165884A (en) Microcomputer and debugging method therefor
KR20010106421A (en) A programmable controller
JPH05108404A (en) Debugger system
JP2619416B2 (en) emulator
JPH0213334B2 (en)
JP2000029508A (en) Programmable controller
JP2711159B2 (en) Processor operation state adjustment method
JPH05204710A (en) Event tracer
JPS62264338A (en) Single chip microcomputer for evaluation
JPS6212555B2 (en)
JPH08305564A (en) Microcomputer
JPS63159905A (en) Programmable controller input/output forced on/off method
JPH0283623A (en) Microprocessor
JPH0264828A (en) Address trace circuit
JPH07107669B2 (en) Processor
JPH04147339A (en) Information processor
JPS61134850A (en) Debugging method of subsequent processor
JPS63311568A (en) Vector calculation mask controlling system