JPS61127043A - Data processor - Google Patents

Data processor

Info

Publication number
JPS61127043A
JPS61127043A JP59248107A JP24810784A JPS61127043A JP S61127043 A JPS61127043 A JP S61127043A JP 59248107 A JP59248107 A JP 59248107A JP 24810784 A JP24810784 A JP 24810784A JP S61127043 A JPS61127043 A JP S61127043A
Authority
JP
Japan
Prior art keywords
signal
microprocessor
output
data processing
control
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.)
Granted
Application number
JP59248107A
Other languages
Japanese (ja)
Other versions
JPH0750446B2 (en
Inventor
Yasushi Akao
赤尾 泰
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP59248107A priority Critical patent/JPH0750446B2/en
Publication of JPS61127043A publication Critical patent/JPS61127043A/en
Publication of JPH0750446B2 publication Critical patent/JPH0750446B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To attain the accurate interruption of execution of a program by comparing the prescribed setting conditions with the signal on an internal bus and producing the control signal corresponding to the setting conditions according to the output signal of said comparison. CONSTITUTION:The internal address, internal data and internal control buses 12-14 are connected to a microprocessor part 11 consisting of a control part and an executing unit. Then break condition setting data registers 16a-16c and a control register 17 are connected to the buses 12 and 13 respectively. The data of registers 16a-16c are applied to the reference input side terminals of comparators 18a-18c. While the signals of buses 12-14 are applied to the comparison input side terminals respectively. The output of comparators 18a-18c are supplied to gate circuits 19a-19c which are controlled by the output of the register 17. Then output signals of those comparators are also supplied to a signalproducing circuit 21 via an OR gate circuit 20. The produced interruption signal IQ is supplied to the processor part 11.

Description

【発明の詳細な説明】 [技術分野] この発明は、データ処理技術に関し、例えばマイクロプ
ロセッサのエミュレーションを行なうエミュレータもし
くはそのような機能を内蔵したシステム開発装置に利用
して有効な技術に関するものである。
[Detailed Description of the Invention] [Technical Field] The present invention relates to data processing technology, and relates to a technology that is effective when used, for example, in an emulator that emulates a microprocessor or a system development device that incorporates such a function. .

[背景技術] ユーザーが開発したマイクロコンピュータ・システムの
ソフトウェアの開発やデバッキングは、第2図に示すよ
うな装置を使用して行なわれることがある。すなわち、
マイクロコンピュータ・システム(ユーザー・システム
)1を構成するボードla上に設けられたマイクロプロ
セッサ(以下MPUと称する)用のICソケット2に、
コネクタ3を介してシステム1のMPUと同一のMPU
を内蔵したアダプティブ・システム・エミュレ−タ(以
下ASEと称する)4が接続される。このASE4は、
ケーブルCAを介してCRTディスプレイ装置5やフロ
ッピーディスク装置6a。
[Background Art] Software development and debugging of a microcomputer system developed by a user is sometimes performed using a device as shown in FIG. That is,
An IC socket 2 for a microprocessor (hereinafter referred to as MPU) provided on a board la constituting a microcomputer system (user system) 1,
The same MPU as the system 1 MPU via connector 3
An adaptive system emulator (hereinafter referred to as ASE) 4 having a built-in system is connected thereto. This ASE4 is
CRT display device 5 and floppy disk device 6a via cable CA.

6b等を備えたサポートツールと呼ばれるシステム開発
装置7に接続される。
6b, etc., is connected to a system development device 7 called a support tool.

上記システムにおいては、CRTディスプレイ装置5の
キーボードより入力されるアセンブラやコンパイラ等の
言語で書かれたソースプログラムは、先ずフロッピーデ
ィスク6aに書き込まれ、システム開発装置7内のMP
U (図示しない)によって機械語に翻訳されてオブジ
ェクトプログラムの形でフロッピーディスク6bに書き
込まれる。
In the above system, a source program written in a language such as an assembler or a compiler that is input from the keyboard of the CRT display device 5 is first written to a floppy disk 6a, and then written to an MP in the system development device 7.
The program is translated into machine language by U (not shown) and written to the floppy disk 6b in the form of an object program.

フロッピーディスク6bに書き込まれたプログラムは、
ASEA内のMPUによってユーザー・システム1内の
RAM (ランダム・アクセス・メモリ)8等に転送さ
れ、書き込まれる。
The program written on the floppy disk 6b is
The MPU in ASEA transfers the data to a RAM (random access memory) 8 or the like in the user system 1 and writes it.

RAM8等に書き込まれたユーザー・プログラムは、I
Cソケット2からコネクタ3を引き抜いて、代りにシス
テムのMPU9を差し込んでやると、このMPU9によ
って実行される。第2図のシステムでは、ASE4内の
MPU (MPU9と同一タイプ)によってエミュレー
ションを行ないながら、ユーザー・プログラムのデバッ
キングが行なわれ得るようになっている。
The user program written to RAM8 etc. is
When the connector 3 is pulled out from the C socket 2 and the MPU 9 of the system is inserted in its place, the process is executed by this MPU 9. In the system shown in FIG. 2, the user program can be debugged while being emulated by the MPU (same type as MPU 9) in ASE4.

この場合、CRTディスプレイ5やフロッピーディスク
装置6a、6b等をコントロールしたり。
In this case, the CRT display 5, floppy disk devices 6a, 6b, etc. are controlled.

アセンブラやコンパイラ言語を機械語へ翻訳したり、さ
らにASE4内のMPUによってユーザー・プログラム
を実行して得られたデータを編集してCRTディスプレ
イ5に表示させたりするホストMPUがシステム開発装
置7内に設けら九でいる。
There is a host MPU in the system development device 7 that translates assembler and compiler languages into machine language, and also edits data obtained by executing user programs using the MPU in the ASE4 and displays it on the CRT display 5. It's set in nine.

エミュレータには、エミュレーションの結果得られたデ
ータを上記システム開発装置7内のMPUが編集し易い
形に処理できるような機能を持たせることができる。上
記システムでは、ASEJ内のMPUがエミュレーショ
ンとデータ処理機能を兼用するようにされている。その
ため、ASEJ内のMPUをシステム開発装置E7内の
コントローラから出力される制御信号に基づいてエミュ
レーションモード時とシステムモード時とで空間分割し
て実行するようにしている。
The emulator can be provided with a function that allows the MPU in the system development device 7 to process data obtained as a result of emulation in a form that is easy to edit. In the above system, the MPU in ASEJ serves both emulation and data processing functions. Therefore, the MPU in ASEJ is spatially divided into emulation mode and system mode for execution based on control signals output from the controller in system development device E7.

上記エミュレータ・システムを用いてユーザー・プログ
ラムのデバッキングを行なう場合、一般にはプログラム
を細切れにしてエミュレーションを行なって行くが、そ
の際ブレークポイントと呼ばれる指定ポイント(プログ
ラム中のある位置)を通過したことを検出して、そこで
°プログラムの実行を中断することが行なわれる。
When debugging a user program using the above emulator system, the program is generally cut into pieces and emulated. is detected and the execution of the program is interrupted at that point.

上記ブレーク方式に従うと、例えばアドレスバス上の信
号等を監視してアドレス等が所定の条件に一致したとき
にプログラムをブレーク(中断)させるようにしておく
と、ブレーク条件成立と同時にプログラムの実行が停止
される。ブレーク直前までのシステム内の状態は、バス
上のデータをトレースメモリと呼ば九る記憶装置内にリ
アルタイムで取り込まれる。これにより、ブレーク後に
そのトレース・メモリの内容を解析することでプログラ
ムの暴走要因等を解明し、ユーザープログラムやシステ
ムのデバッキングを行なうことができるようになってい
る。
According to the above break method, for example, if the signals on the address bus are monitored and the program is broken (interrupted) when the address, etc. matches a predetermined condition, the program will be executed as soon as the break condition is met. will be stopped. The state of the system immediately before the break is captured in real time into a storage device that stores data on the bus called a trace memory. This makes it possible to analyze the contents of the trace memory after a break to determine the cause of the program's runaway, and to debug the user program or system.

上記のような構成のエミュレータ・システムについては
1例えば特願昭58−34565号等において開示され
ている。
An emulator system having the above configuration is disclosed in, for example, Japanese Patent Application No. 58-34565.

ところで、従来のマイクロプロセッサは、上記のような
エミュレーションのための補助機能を有するようにされ
ていない、従って、システム開発装置のようなエミュレ
ーション・システムを構成する際には、ブレーク条件を
設定するためのレジスタやブレークポイントを通過した
ことを検出するための比較回路あるいはブレークポイン
トを通過したときマイクロプロセッサを停止させる割込
み信号のような信号を発生する回路を外付は回路で構成
しなければならなかった。
By the way, conventional microprocessors are not designed to have auxiliary functions for emulation as described above. Therefore, when configuring an emulation system such as a system development device, it is necessary to set break conditions. External circuits must be configured with registers, a comparison circuit to detect when a breakpoint has been passed, or a circuit that generates a signal such as an interrupt signal that stops the microprocessor when a breakpoint is passed. Ta.

そのため、そのような外付は回路における遅延時間によ
って、ブレーク条件成立と同、時にプログラムを停止さ
せたつもりでも、マイクロプロセッサは次の命令サイク
ルに入ってしまうという不都合があることが分かった。
Therefore, it has been found that such an external device has the disadvantage that, due to the delay time in the circuit, the microprocessor starts the next instruction cycle as soon as the break condition is satisfied, even if the program is intended to be stopped.

さらに、最近のマイクロプロセッサは、しだい亀;高機
能化されて来ている。例えばバスの空いているサイクル
を利用して次に実行されるべき命令を幾つか前もって内
部のレジスタに取り込んでおくいわゆるブリフェッチ機
能を有するようにされたものがある。そのようなマイク
ロプロセッサにおいては、単に外部のアドレスバスやデ
ータバス上の信号を監視していただけでは、それらの信
号が現在実行中の命令に対応するものであるのか、プリ
フェッチされる命令に対応するものであるのか識別する
ことができない。その結果、所望のブレークポイントで
プログラムを停止させることがますます難しくなる。
Furthermore, recent microprocessors have become increasingly sophisticated. For example, some devices have a so-called briefetch function in which several instructions to be executed next are fetched into internal registers in advance using vacant bus cycles. In such a microprocessor, simply monitoring signals on the external address bus and data bus does not allow the user to check whether those signals correspond to the currently executing instruction or whether they correspond to the prefetched instruction. I can't identify what it is. As a result, it becomes increasingly difficult to stop the program at a desired breakpoint.

[発明の目的] この発明の目的は、マイクロプロセッサのエミュレーシ
ョンを行なう場合に、所望の条件で正確かつ速やかにプ
ログラムの実行を中断したり、外部の装置を起動するこ
とができるようなデータ処理技術を提供することにある
[Object of the Invention] The object of the invention is to provide a data processing technology that can accurately and quickly interrupt program execution or start an external device under desired conditions when emulating a microprocessor. Our goal is to provide the following.

この発明の前記ならびにそのほかの目的と新規な特徴に
ついては1本明細書の記述および添附図面から明かにな
るであろう。
The above and other objects and novel features of the present invention will become clear from the description of the present specification and the accompanying drawings.

[発明の概要] 本顆において開示される発明のうち代表的なものの概要
を説明すれば、下記のとおりである。
[Summary of the Invention] A summary of typical inventions disclosed in this article is as follows.

すなわち、マイクロプロセッサが形成される半導体チッ
プ上に、停止もしくは起動条件が設定されるレジスタと
、そのコントロールレジスタ、および設定された条件と
内部バス上の信号とを比較し、一致したときに例えばプ
ログラムの実行を中断させる割込み信号もしくは外部へ
の起動信号のような制御信号を発生させる回路とを設け
ることによって、何ら外付は回路を設けることなく、エ
ミュレーション時に所望の条件でプログラムの実行を中
断させたり外部の装置を起動させるための信号を発生さ
せることができるようにし、これによって、外付は回路
でそのような信号を発生させる場合に比べて遅延時間を
短くして速やかにプログラムを中断させたり、所望の装
置に起動をかけることができるようにする。
In other words, on the semiconductor chip on which the microprocessor is formed, a register in which a stop or start condition is set is compared with its control register, and the set condition is compared with a signal on an internal bus, and when they match, for example, a program is By providing a circuit that generates an interrupt signal that interrupts the execution of the program or a control signal such as a start signal to the outside, it is possible to interrupt the execution of the program under desired conditions during emulation without installing any external circuit. This allows the external device to quickly interrupt the program with shorter delay times than when such a signal is generated in the circuit. or activate a desired device.

また、マイクロプロセッサ内部の制御信号をデコードし
て、そのデコード信号によって割込み信号のような制御
信号を有効に発生させるか否かを決定してやるようにす
ることによって、マイクロプロセッサの高機能に伴なっ
て本来マイクロプロセッサが実行している命令とは異な
る命令やデータがバス上に表われてもそれによって割込
み信号等が発生されないようにして、常に正確なでプロ
グラムの実行を中断させたり、外部装置を起動させるこ
とができるようにするものである。
In addition, by decoding control signals inside a microprocessor and determining whether or not to effectively generate control signals such as interrupt signals based on the decoded signals, it is possible to improve the functionality of microprocessors as they become more sophisticated. Even if instructions or data different from those originally executed by the microprocessor appear on the bus, interrupt signals etc. will not be generated due to the instructions or data that are originally executed by the microprocessor. This allows it to be activated.

[実施例1] 第1図は、本発明をマイクロプロセッサに適用した場合
の一実施例を示す。図中鎖線Aで囲まれた各回路部分は
、単結晶シリコンからなるような一枚の半導体基板(チ
ップ)上において形成される。
[Embodiment 1] FIG. 1 shows an embodiment in which the present invention is applied to a microprocessor. Each circuit portion surrounded by a chain line A in the figure is formed on a single semiconductor substrate (chip) made of single crystal silicon.

同図において、11は例えば制御部と実行ユニットから
なるマイクロプロセッサ部で、このマイクロプロセッサ
部11内には、チップ外部もしくは内部の適当な回路か
ら供給される割込み制御信号に基づいて、マイクロプロ
セッサ部11によるプログラムの実行を中断させる割込
み制御回路11aが設けられている。
In the figure, reference numeral 11 denotes a microprocessor section consisting of, for example, a control section and an execution unit. An interrupt control circuit 11a for interrupting the execution of the program by 11 is provided.

上記マイクロプロセッサ部11には、内部アドレスバス
12と内部データバス13および内部コントロールバス
14が接続されている。
An internal address bus 12, an internal data bus 13, and an internal control bus 14 are connected to the microprocessor section 11.

そして、この実施例では、上記内部データバス13に接
続されたブレーク条件設定用のデータ・レジスタ16a
、16b、16cと、これらの使用状態を決定するため
のコントロール・レジスタ17とが設けられている。上
記各レジスタ16a。
In this embodiment, a break condition setting data register 16a connected to the internal data bus 13 is
, 16b, 16c, and a control register 17 for determining their usage status. Each of the above registers 16a.

16b、16cおよび17は、マイクロプロセッサ部1
1から内部アドレスバス12を介して供給される所定の
アドレス信号によって選択されて。
16b, 16c and 17 are the microprocessor unit 1;
1 by a predetermined address signal supplied via the internal address bus 12.

データの読み書きができるようにされている。Data can be read and written.

上記データ・レジスタ15a、15b、16cに設定さ
れたデータは、それぞれマルチビット構成のコンパレー
タ18a、18b、18cの基準入力側端子に供給され
る。一方、上記コンパレータL8a、18b、18cの
比較入力側端子には、上記内部バス13と内部コントロ
ールバス14および内部アドレスバス12上の各信号が
印加されている。
The data set in the data registers 15a, 15b, and 16c are supplied to reference input terminals of multi-bit comparators 18a, 18b, and 18c, respectively. On the other hand, each signal on the internal bus 13, internal control bus 14, and internal address bus 12 is applied to the comparison input side terminals of the comparators L8a, 18b, and 18c.

上記コンパレータ18a、18b、18cの出力信号は
、コントロール・レジスタ17の出力によってそれぞれ
制御されるゲート回路19a、19b、19cに供給さ
れる。さらにこれらのゲート回路19a〜19cを通過
したコンパレータの出力信号は、ORゲート回路20を
介して信号形成回路21へ供給される。
The output signals of the comparators 18a, 18b, 18c are supplied to gate circuits 19a, 19b, 19c controlled by the output of the control register 17, respectively. Further, the output signals of the comparators that have passed through these gate circuits 19a to 19c are supplied to a signal forming circuit 21 via an OR gate circuit 20.

上記各データ・レジスタ16 a、  16 b、  
l 6Cには、バス上のデータ信号、コントロール信号
およびアドレス信号のそれぞれに対応してブレーク条件
を設定することができる。コントロール・レジスタ17
には、各データ・レジスタ16a〜16cにセットされ
るブレーク条件を有効にするか否かを決定するビットが
それぞれ設けられている0例えばコントロール・レジス
タ17の各ビットが「1」にセットされると、その「1
」に対応されたデータ・レジスタのブレーク条件が有効
にされ、ビットが「0」にセットされると対応するデー
タ・レジスタのブレーク条件が無効にされる。
Each of the above data registers 16a, 16b,
Break conditions can be set in I6C corresponding to each of the data signal, control signal, and address signal on the bus. control register 17
For example, each bit of the control register 17 is set to "1". And that “1
'' is enabled, and when the bit is set to "0", the break condition of the corresponding data register is disabled.

つまり、コントロール・レジスタ17のデータ・レジス
タ16a〜16cに対応される3つのビットの状態によ
って、ゲート回路19a〜19cがそれぞれ開状態また
は閉状態にされる。ゲート回路19a〜19cが開状態
にされている場合、対応するコンパレータ18a〜18
cの出力信号がORゲート回路20を介して信号形成回
路21に供給され、閉状態にされている場合、コンパレ
ータの出力は、信号形成回路21に供給されない。
That is, depending on the states of three bits corresponding to data registers 16a to 16c of control register 17, gate circuits 19a to 19c are respectively opened or closed. When the gate circuits 19a to 19c are in the open state, the corresponding comparators 18a to 18
When the output signal of c is supplied to the signal forming circuit 21 via the OR gate circuit 20 and is in the closed state, the output of the comparator is not supplied to the signal forming circuit 21.

従って、この実施例では、データ・レジスタ16a〜1
6cおよびコントロール・レジスタ17の内容を適当に
設定することにより、内部バス12〜14に与えられる
信号のうちいずれか一つが所定の条件に一致したとき、
コンパレータ8a〜8cのいずれか一つから一致出力信
号が発生され。
Therefore, in this embodiment, data registers 16a-1
By appropriately setting the contents of control register 6c and control register 17, when any one of the signals applied to internal buses 12 to 14 matches a predetermined condition,
A match output signal is generated from any one of comparators 8a-8c.

これによって信号形成回路21を動作させることができ
る。
This allows the signal forming circuit 21 to operate.

信号形成回路21は、例えば第1図に示すよう゛ に一
対のANDゲート回路G 1 r G 2と、インバー
タG3およびORゲート回路G4とにより構成され、マ
イクロプロセッサ部■1に対する割込み信号のような制
御信号IQを形成し、それを制御回路11aに出力する
ようにされている。特に制限されないが、この実施例で
は、信号形成回路21で形成された制御信号IQが外部
端子22より外部へも出力されるようになっている。
The signal forming circuit 21 is, for example, as shown in FIG. A control signal IQ is formed and outputted to the control circuit 11a. Although not particularly limited, in this embodiment, the control signal IQ formed by the signal forming circuit 21 is also output to the outside from the external terminal 22.

さらに、この実施例では、前記ORゲート回路20を通
過したコンパレータ18a〜18c(7)−数比力信号
を計数するカウンタ23と、このカウンタ23のカウン
ト値を設定するためのカウント値設定用レジスタ24と
が設けられている。このカウンタ23に対応して上記コ
ントロール・レジスタ17内には、このカウンタ23の
出力を有効にするか無効にするかを示すビットが設けら
れている。
Furthermore, in this embodiment, a counter 23 for counting the comparator 18a to 18c(7)-number specific force signal that has passed through the OR gate circuit 20, and a count value setting register for setting the count value of this counter 23 are provided. 24 are provided. Corresponding to this counter 23, a bit is provided in the control register 17 to indicate whether the output of this counter 23 is enabled or disabled.

コントロール・レジスタ17内のカウンタ23と対応さ
れるビットが例えば「1」に設定されていると、そのビ
ットの出力によって上記信号形成回路21内のANDゲ
ート回路G1が開かれ、G2が閉ざされる。そのため、
コンパレータ18a。
When the bit corresponding to the counter 23 in the control register 17 is set to "1", for example, the output of that bit opens the AND gate circuit G1 in the signal forming circuit 21 and closes the AND gate circuit G2. Therefore,
Comparator 18a.

18b、18cの一致出力信号がそのままORゲート回
路G4を通して出力され、これが割込み信号IQとして
マイクロプロセッサ部11に供給される。
The coincidence output signals of 18b and 18c are output as they are through the OR gate circuit G4, and are supplied to the microprocessor section 11 as an interrupt signal IQ.

一方、コントロール・レジスタ17内のカウンタ23と
対応されるビットが「0」に設定されていると、信号形
成回路21内のANDゲート回路G1が閉ざされ、代わ
りに62が開かれる。そのため、コンパレータ18a〜
18cの一致出力信号は通過されず、カウンタ23の出
力がゲートG2を通過できるようになる。しかして、カ
ウンタ23はコンパレータ18a〜18cから出力され
る一致出力信号を計数するようにされているため、コン
パレータ18a〜18cの一致出力信号がレジスタ24
によって設定された所定の数だけ出力されたとき、カウ
ンタ23の出力が変化し、これによって信号形成回路2
1から割込み信号IQが出力されるようになる。
On the other hand, if the bit corresponding to counter 23 in control register 17 is set to "0", AND gate circuit G1 in signal forming circuit 21 is closed and gate circuit 62 is opened instead. Therefore, the comparators 18a~
The coincidence output signal of 18c is not passed, allowing the output of counter 23 to pass through gate G2. Since the counter 23 is configured to count the coincidence output signals output from the comparators 18a to 18c, the coincidence output signals of the comparators 18a to 18c are counted by the register 23.
When a predetermined number of signals are output, the output of the counter 23 changes and the signal forming circuit 2
1, the interrupt signal IQ is output.

次に、上記のごとく構成されたマイクロプロセッサを第
2図に示すようなシステム開発装置におけるエミユレー
ション用MPUl0として組み込んで、ユーザー・プロ
グラムのデバッキングを行なう場合の動作について説明
する。
Next, a description will be given of the operation when the microprocessor configured as described above is installed as the emulation MPU10 in a system development apparatus as shown in FIG. 2 and a user program is debugged.

デバッキングの際には、プログラムを分断してエミュレ
ーションを行なって行くようにされる。
When debugging, the program is divided and emulation is performed.

そのため、プログラムを中断させる条件(ブレークポイ
ント)を設定してやる必要がある。
Therefore, it is necessary to set conditions (breakpoints) to interrupt the program.

この実施例のマイクロプロセッサによるとブレークポイ
ントとして、マイクロプロセッサ部11から内部アドレ
スバス12上に出力される信号あるいは内部データバス
13上に出力される信号または内部コントロールバス1
4上に出力される信号を対象として設定することができ
る。
According to the microprocessor of this embodiment, a signal output from the microprocessor section 11 onto the internal address bus 12, a signal output onto the internal data bus 13, or a signal output from the internal control bus 1 is used as a breakpoint.
4 can be set as the target.

その場合、エミュレーションによりユーザー・プログラ
ムを実行する前に、システム開発装置7内のホストMP
Uからの指令によって、エミユレーション用のマイクロ
プロセッサ(1o)が、そのときキーボード等から与え
られたブレークポイントがマイクロプロセッサ10内の
データレジスタ16a〜16bに設定され、またいずれ
のレジスタを有効とするか示す情報がコントロール・レ
ジスタ17に設定される。
In that case, before executing the user program by emulation, the host MP in the system development device 7
In response to a command from U, the emulation microprocessor (1o) sets the breakpoint given from the keyboard or the like in the data registers 16a to 16b in the microprocessor 10, and also sets which register is valid. Information indicating whether to do so is set in the control register 17.

また、デバッキングをしようとするユーザー・プログラ
ムのあるループがバグを含んでいると。
Also, if a loop in the user program you are trying to debug contains a bug.

そのループを何十回あるいは何百回か通っているうちに
そのループから抜は出してプログラムが他のところへ跳
んでしまうことがある。そのようなバグを見つけたい場
合には、エミュレーション開始前にカウンタ値設定用レ
ジスタ24にも適当な計数値をマイクロプロセッサ部1
1によって設定する。
After going through the loop dozens or even hundreds of times, you may break out of the loop and the program jumps somewhere else. If you want to find such a bug, set an appropriate count value to the counter value setting register 24 in the microprocessor unit 1 before starting emulation.
Set by 1.

それから、ホストMPUからのコマンドによってマイク
ロプロセッサ(10)がエミュレーションを開始する。
The microprocessor (10) then starts emulation by commands from the host MPU.

このとき同時に、エミユレーション用マイクロプロセッ
サ(10)の外部バス上に表われる信号を、ブレークポ
イント(ブレーク条件)で停止されるまで1図示しない
トレース用メモリ内に次々と取り込み、停止後にホスト
MPUからのコマンドによって、トレース用メモリに取
り込まれたデータをCRT表示装置5の画面上に ゛表
示させることで、バグを容易に発見することができる。
At the same time, the signals appearing on the external bus of the emulation microprocessor (10) are captured one after another into a trace memory (not shown) until the emulation microprocessor (10) is stopped at a breakpoint (break condition), and then the host MPU Bugs can be easily discovered by displaying the data captured in the trace memory on the screen of the CRT display device 5 in response to a command from.

上記の場合、ブレーク条件が成立したとき、信号形成回
路21から出力される割込み信号でマイクロプロセッサ
部11の動作が停止され、エミユレーション用マイクロ
プロセッサ(10)によリユーザー・プログラムの実行
が停止される。この状態で、ホストMPU側との間でデ
ータのやりとりに移るには、例えば、割込み信号に基づ
いて所定の割込みルーチンヘジャンプさせたり、あるい
は、信号形成回路21から前記外部端子22へ出力され
る信号IQに基づいて、ユーザー・プログラムが格納さ
れたメモリとシステム開発装置側のプログラムが格納さ
れたメモリとの切換えを行ない、ユーザー・プログラム
が中断されたならば、次はシステム開発用プログラムに
従ってエミユレーション用マイクロプロセッサ(10)
を動作させるようにする。これによって、エミユレーシ
ョン用マイクロプロセッサは、エミュレーションモード
時とシステムモード時とで空間分割して動作されるよう
になる。
In the above case, when the break condition is met, the operation of the microprocessor unit 11 is stopped by the interrupt signal output from the signal forming circuit 21, and the emulation microprocessor (10) starts executing the reuser program. will be stopped. In this state, in order to exchange data with the host MPU side, for example, jump to a predetermined interrupt routine based on an interrupt signal, or output data from the signal forming circuit 21 to the external terminal 22. Based on the signal IQ, the memory in which the user program is stored and the memory in which the program on the system development device side is stored are switched, and when the user program is interrupted, the next step is to switch the memory in accordance with the system development program. Uration microprocessor (10)
make it work. As a result, the emulation microprocessor is operated in a spatially divided manner between the emulation mode and the system mode.

なお、上記実施例では、所定の条件が成立したときプロ
グラムの実行を中断する場合について説明したが、エミ
ュレーションに際しては、プログラム実行の途中からバ
ス上の信号の波形を観察したり、トレースを開始したい
ような場合もある。
Note that in the above embodiment, the case where program execution is interrupted when a predetermined condition is met was explained, but in emulation, it is possible to observe the waveform of a signal on the bus or start tracing from the middle of program execution. There are cases like this.

そのような機能もマイクロプロセッサに持たせたい場合
には、例えば上記実施例において、コントロール・レジ
スタ17にブレーク条件設定かトリガ条件設定かを示す
ビットを設け、トリガ条件設定にされたときは1例えば
そのビットの出力を信号形成回路21を供給して、コン
パレータ18a〜18cの一致出力信号が出力されたと
きに外部端子22へのみ条件成立を示す制御信号を出力
させるようにする。そして、外部端子22に出力された
制御信号によって、シンクロスコープを起動して波形の
観測を開始したり、トレース用メモリを起動してトレー
スを開始させるようにすればよい。
If you want the microprocessor to have such a function, for example, in the above embodiment, the control register 17 is provided with a bit indicating whether to set a break condition or a trigger condition. The output of the bit is supplied to the signal forming circuit 21, so that when the coincidence output signals of the comparators 18a to 18c are outputted, a control signal indicating that the condition is satisfied is outputted only to the external terminal 22. Then, a control signal outputted to the external terminal 22 may be used to start a synchroscope to start observing a waveform, or to start a tracing memory to start tracing.

その場合、データ・レジスタ16a〜16cは、ブレー
ク条件またはトリガ条件のいずれか一方を選択的に設定
できるように構成してもよいし、あるいはブレーク条件
を設定するレジスタおよびそのコンパレータと、トリガ
条件を設定するレジスタおよびそのコンパレータを別々
に設けるようにしてもよい。
In that case, the data registers 16a to 16c may be configured so that either a break condition or a trigger condition can be selectively set, or a register that sets a break condition and its comparator may be used to set a trigger condition. The register to be set and its comparator may be provided separately.

上記実施例によれば、エミュレーション時に所定の条件
が成立したか否かを検出する回路と1条件成立のとき、
プログラムを中断したり、所望の装置を起動させる信号
を形成する回路がマイクロプロセッサと同一のチップ上
に設けられているため、外付は回路でそのような回路を
構成した場合に比べて遅延時間が非常に短くなる。その
ため。
According to the above embodiment, a circuit detects whether a predetermined condition is satisfied during emulation, and when one condition is satisfied,
Since the circuits that form signals to interrupt programs or start desired devices are installed on the same chip as the microprocessor, external circuits require less delay time than if such circuits were constructed using circuits. becomes very short. Therefore.

条件成立後直ちにプログラムの実行を中断させたり、所
望の装置に起動をかけることができ、デバッキング作業
が迅速かつ正確に行なえるようになる。
Immediately after a condition is met, program execution can be interrupted or a desired device can be activated, allowing debugging work to be performed quickly and accurately.

また、最近のマイクロプロセッサは、前述のように高機
能化され、ブリフェッチ機能やパイプライン処理機能を
有するようにされているものでかある。そのため、外部
の信号を見ていただけでは、現在実行中の命令であるの
か否か区別することができない。ただし、そのような場
合でも、マイクロプロセッサ部11内の制御信号を見れ
ば区別することができるのであるが、そのような制御信
号は通常マイクロプロセッサの外部へ出力されないし、
また、出力させるには多数の外部端子(ピン)を必要と
する。
In addition, recent microprocessors are highly functional as described above, and have a briefetch function and a pipeline processing function. Therefore, it is not possible to distinguish whether an instruction is currently being executed or not just by looking at external signals. However, even in such a case, it is possible to distinguish by looking at the control signals within the microprocessor section 11, but such control signals are usually not output to the outside of the microprocessor.
Additionally, a large number of external terminals (pins) are required for output.

しかるに、この発明によれば1例えば上記実施例でマイ
クロプロセッサ部11内の制御部から出力される適当な
幾つかの制御信号をデコードするデコーダを設け、その
デコード信号によって信号形成回路21で形成される前
記割込み信号をマイクロプロセッサ部11に入れる否か
を制御することにより、現在実行中の命令であるか否か
を容易に区別して正確に中断させることができる。
However, according to the present invention, for example, in the above embodiment, a decoder is provided for decoding appropriate several control signals outputted from the control section in the microprocessor section 11, and the signal forming circuit 21 is formed by the decoded signals. By controlling whether or not to input the interrupt signal to the microprocessor section 11, it is possible to easily distinguish whether or not the instruction is currently being executed, and to accurately interrupt the instruction.

そこで1次に、マイクロプロセッサ部ll内の適当な制
御信号に基づいて正確なブレーク条件の成立を検出して
、マイクロプロセッサに割込みを発生させる回路の実施
例を説明する。
First, an embodiment of a circuit that detects the establishment of an accurate break condition based on an appropriate control signal in the microprocessor section 11 and generates an interrupt to the microprocessor will be described.

[実施例2コ 第3図は、第2実施例のブロック図である。[Example 2 FIG. 3 is a block diagram of the second embodiment.

同図において、29は、マイクロプロセッサ部11から
出力される制御信号をデコードするデコーダであり、3
0は、プリフェッチされたn個の命令とその命令に対応
するアドレスを格納するインストラクションキューであ
る。命令及びアドレスは、命令をフェッチする毎にこの
キューに取り込まれ、順次右にシフトされる。最も右側
の命令が現在実行されている命令である。この構成によ
りn個の命令の先読みができる。
In the figure, 29 is a decoder that decodes the control signal output from the microprocessor section 11;
0 is an instruction queue that stores n prefetched instructions and addresses corresponding to the instructions. Instructions and addresses are loaded into this queue each time an instruction is fetched and sequentially shifted to the right. The rightmost instruction is the instruction currently being executed. This configuration allows n instructions to be prefetched.

図示の構成に従うと、実行中の命令の1つ前のインスト
ラクションキューのデータがコンパレータ18aないし
18cの参照入力とされる。コンパレータ18aないし
18cの出力結果をイネイブルするか否かは、コントロ
ールレジスタの信号の他にデコーダ29から出力される
内部の制御信号によって決定される。この制御信号によ
り、ブレークをかけたアドレス、あるいはオペコードが
実際に実行される直前のタイミングを指定する。
According to the illustrated configuration, data in the instruction queue immediately before the instruction being executed is used as reference input to the comparators 18a to 18c. Whether or not to enable the output results of the comparators 18a to 18c is determined by an internal control signal output from the decoder 29 in addition to the control register signal. This control signal specifies the address at which the break is applied or the timing immediately before the opcode is actually executed.

これにより、プログラムを正確に中断することができる
This allows the program to be interrupted accurately.

なお、上記実施例では、本発明をマイクロプロセッサに
適用したものについて説明したが、シングルチップ・マ
イコンにも適用することができる。
In the above embodiment, the present invention is applied to a microprocessor, but it can also be applied to a single-chip microcomputer.

その場合には、上記実施例における内部バス12〜14
間にそれぞれROM (リード・オンリ・メモリ)およ
びRAM (ランダム・アクセス・メモリ)やI10ボ
ート等が接続された構成となる。
In that case, the internal buses 12 to 14 in the above embodiment
The configuration is such that a ROM (read only memory), a RAM (random access memory), an I10 board, etc. are connected between them.

[効果コ (1)マイクロプロセッサが形成されるチップ上に、停
止もしくは起動条件を設定するレジスタとその使用状態
を決定するコントロールレジスタおよび設定された条件
と内部バス上の信号とを比較し、一致したときに例えば
プログラムの実行を中断させる割込み信号もしくは起動
信号のような制御信号を発生させる回路を設けてなるの
で、何ら外付は回路を設けることなく、エミュレーショ
ン時に所望の条件でプログラムの実行を中断させたり外
部の装置を動作させるための信号を発生させることがで
きるという作用により、外付は回路でそのような信号を
発生させる場合に比べて遅延時間を短くして速やかにプ
ログラムを中断させたり、所望の装置に起動をかけるこ
とができるという効果がある。
[Effects (1) On the chip in which the microprocessor is formed, a register that sets the stop or start condition, a control register that determines its usage status, and a signal on the internal bus are compared with the set condition and the signal on the internal bus is matched. For example, a circuit is provided to generate a control signal such as an interrupt signal or a start signal that interrupts program execution when By being able to generate a signal to interrupt or operate an external device, external devices can quickly interrupt a program with shorter delay times than when such a signal is generated in the circuit. This has the effect that a desired device can be activated.

(2)マイクロプロセッサが形成されるチップ上に、停
止もしくは起動条件を設定するレジスタとその使用状態
を決定するコントロールレジスタお 。
(2) On the chip on which the microprocessor is formed, there are registers that set stop or start conditions and control registers that determine their usage status.

よび設定された条件と内部バス上の信号とを比較し、一
致したときに例えばプログラムの実行を中断させる割込
み信号のような制御信号を発生させる回路を設けるとと
もに、マイクロプロセッサ内部の制御信号をデコードし
て、そのデコード信号によって割込み信号のような制御
信号を有効に発生させるか否かを決定してやるようにし
たので、マイクロプロセッサの高機能に伴なって本来マ
イクロプロセッサが実行している命令とは異なる命令や
データがバス上に表われてもそれによって割込み信号が
発生されないようになるという作用により、常に正確な
位置でプログラムの実行を中断させたり、外部装置を起
動させるることができるという効果がある。
A circuit is provided that compares the set conditions and the signals on the internal bus, and when they match, generates a control signal such as an interrupt signal that interrupts program execution, and also decodes the control signals inside the microprocessor. The decoded signal then determines whether or not to effectively generate a control signal such as an interrupt signal, so as the microprocessor becomes more sophisticated, the instructions that the microprocessor originally executes are An effect that prevents interrupt signals from being generated even if different instructions or data appear on the bus, making it possible to always interrupt program execution or start an external device at a precise location. There is.

以上本発明者によってなされた発明を実施例に基づき具
体的に説明したが1本発明は上記実施例に限定されるも
のではなく、その要旨を逸脱しない範囲で種々変更可能
であることはいうまでもない。例えば、上記実施例では
、ブレーク条件としてアドレス信号、データ信号または
コントロール信号のいずれか一つが、設定された条件と
一致したときマイクロプロセッサ部に割込みをかけるよ
うなもτ成にされているが、それらの信号のうち少なく
とも2つ以上が一致しなければ割込み信号を発生させな
いような構成にすることもできる。
Although the invention made by the present inventor has been specifically explained above based on examples, it goes without saying that the present invention is not limited to the above-mentioned examples, and can be modified in various ways without departing from the gist thereof. Nor. For example, in the above embodiment, when one of the address signal, data signal, or control signal matches a set condition as a break condition, an interrupt is generated to the microprocessor section. It is also possible to adopt a configuration in which an interrupt signal is not generated unless at least two of these signals match.

また、上記実施例では、ブレーク条件が成立したときに
、適当な制御信号を外部端子22から外部へ出力させる
ようにしているが、外部への出力を省略したような構成
にしてもよい。
Further, in the above embodiment, when the break condition is met, an appropriate control signal is outputted from the external terminal 22 to the outside, but a configuration in which the output to the outside is omitted may also be used.

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

第1図は1本発明をマイクロプロセッサに適用した場合
の一実施例を示すブロック図、第2図は、本発明に係る
マイクロプロセッサが応用されるシステム開発装置の全
体の構成の一例を示すブロック図、 第3図は、他の実施例のブロック図である。 ■・・・・ユーザー・システム、2・・・・ICソケッ
ト、3・・・・コネクタ、4・・・・ASE (アダプ
ティブ・システム・エバリュエータ)、5・・・・CR
Tディスプレイ、6a、6b・・・・フロッピーディス
ク装置、7・・・・システム開発装置、8・・・・RA
M、9・・・・MPU(マイクロプロセッサ)、10・
・・・エミュレーション用MPU、ll・・・・マイク
ロプロセッサ部、12・・・・内部アドレスバス、13
・・・・内部データバス、14・・・・内部コントロー
ルバス、16a、16b、16c・・・・データ・レジ
スタ、17・・・・コントロール・レジスタ、18a、
18b、18c・・・・比較手段(コンパレータ)、1
9a、19b、19c・・・・ゲート回路、21・・・
・信号形成回路、23・・・・カウンタ、24・・・・
カウント値設定用レジスタ、25・・・・外部アドレス
端子、26・・・・外部データ端子、27・・・・外部
割込み入力端子。 28・°・・コントロール端子、30・・・・インスト
ラクションキュー。
FIG. 1 is a block diagram showing an example of the case where the present invention is applied to a microprocessor, and FIG. 2 is a block diagram showing an example of the overall configuration of a system development device to which the microprocessor according to the present invention is applied. FIG. 3 is a block diagram of another embodiment. ■...User system, 2...IC socket, 3...Connector, 4...ASE (Adaptive System Evaluator), 5...CR
T display, 6a, 6b...floppy disk device, 7...system development device, 8...RA
M, 9...MPU (microprocessor), 10.
...MPU for emulation, ll...Microprocessor section, 12...Internal address bus, 13
...Internal data bus, 14...Internal control bus, 16a, 16b, 16c...Data register, 17...Control register, 18a,
18b, 18c... Comparison means (comparator), 1
9a, 19b, 19c...gate circuit, 21...
・Signal forming circuit, 23...Counter, 24...
Count value setting register, 25... external address terminal, 26... external data terminal, 27... external interrupt input terminal. 28...Control terminal, 30...Instruction cue.

Claims (1)

【特許請求の範囲】 1、制御部と実行ユニットとからなるマイクロプロセッ
サ部と、所定条件が設定可能な設定手段と、該設定手段
に設定された条件と内部バス上の信号とを比較する比較
手段と、該比較手段から出力される信号に基づいて、上
記設定条件に対応した制御信号を形成する信号形成手段
とを備えてなることを特徴とするデータ処理装置。 2、上記設定手段は、マイクロプロセッサ部によるプロ
グラムの実行を中断させる停止条件が設定可能にされて
おり、上記信号形成手段からは、設定条件と内部バス上
の信号が一致したときに、マイクロプロセッサ部に対す
る割込み制御信号が形成されるようにされてなることを
特徴とする特許請求の範囲第1項記載のデータ処理装置
。 3、上記設定手段は、比較されるバス上の信号の種類に
対応して各々停止条件または/および起動条件が設定可
能な複数のレジスタと、それらのレジスタの使用状態を
決定するレジスタとからなることを特徴とする特許請求
の範囲第1項もしくは第2項記載のデータ処理装置。 4、上記比較手段は、上記設定手段に設定された条件と
内部バス上の信号とが一致した回数を計数する計数手段
を備え、その一致回数が所定数に達したとき上記信号形
成手段を動作させるようにされてなることを特徴とする
特許請求の範囲第1項、第2項もしくは第3項記載のデ
ータ処理装置。 5、上記マイクロプロセッサ部の内部の適当な制御信号
をデコードするデコーダを備え、該デコーダのデコード
信号により上記信号形成手段における信号の形成もしく
は出力を制御するようにされてなることを特徴とする特
許請求の範囲第1項、第2項、第3項もしくは第4項記
載のデータ処理装置。
[Claims] 1. A microprocessor section consisting of a control section and an execution unit, a setting means capable of setting a predetermined condition, and a comparison for comparing the conditions set in the setting means and a signal on an internal bus. 1. A data processing device comprising: a signal forming means for forming a control signal corresponding to the setting condition based on a signal output from the comparing means. 2. The setting means is capable of setting a stop condition for interrupting the execution of the program by the microprocessor section, and the signal forming means sends the signal to the microprocessor when the setting condition matches the signal on the internal bus. 2. The data processing apparatus according to claim 1, wherein an interrupt control signal is generated for the data processing section. 3. The setting means includes a plurality of registers in which stop conditions and/or start conditions can be set for each type of signal on the bus to be compared, and a register that determines the usage status of these registers. A data processing device according to claim 1 or 2, characterized in that: 4. The comparison means includes a counting means for counting the number of times the condition set in the setting means matches the signal on the internal bus, and operates the signal forming means when the number of matches reaches a predetermined number. 3. A data processing device according to claim 1, 2, or 3, characterized in that the data processing device is configured to perform the following operations. 5. A patent characterized in that the microprocessor section has a decoder that decodes an appropriate control signal inside the microprocessor section, and the decoded signal of the decoder controls the formation or output of the signal in the signal forming means. A data processing device according to claim 1, 2, 3, or 4.
JP59248107A 1984-11-26 1984-11-26 Data processing device Expired - Lifetime JPH0750446B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59248107A JPH0750446B2 (en) 1984-11-26 1984-11-26 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59248107A JPH0750446B2 (en) 1984-11-26 1984-11-26 Data processing device

Publications (2)

Publication Number Publication Date
JPS61127043A true JPS61127043A (en) 1986-06-14
JPH0750446B2 JPH0750446B2 (en) 1995-05-31

Family

ID=17173328

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59248107A Expired - Lifetime JPH0750446B2 (en) 1984-11-26 1984-11-26 Data processing device

Country Status (1)

Country Link
JP (1) JPH0750446B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5319738A (en) * 1976-08-06 1978-02-23 Fujitsu Ltd Processing unit stop control system
JPS5412533A (en) * 1977-06-29 1979-01-30 Yaskawa Denki Seisakusho Kk Scanning programmable controller
JPS57203161A (en) * 1981-06-08 1982-12-13 Toshiba Corp One-chip microcomputer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5319738A (en) * 1976-08-06 1978-02-23 Fujitsu Ltd Processing unit stop control system
JPS5412533A (en) * 1977-06-29 1979-01-30 Yaskawa Denki Seisakusho Kk Scanning programmable controller
JPS57203161A (en) * 1981-06-08 1982-12-13 Toshiba Corp One-chip microcomputer

Also Published As

Publication number Publication date
JPH0750446B2 (en) 1995-05-31

Similar Documents

Publication Publication Date Title
US6145123A (en) Trace on/off with breakpoint register
JP2752592B2 (en) Microprocessor, signal transmission method between microprocessor and debug tool, and tracing method
US6598178B1 (en) Peripheral breakpoint signaler
US20020144235A1 (en) Debugging embedded systems
JP2001154876A (en) Microcomputer debug architecture and method
JP2002202900A (en) Debug device
JP3260083B2 (en) Debug system and debugging method
US20060048011A1 (en) Performance profiling of microprocessor systems using debug hardware and performance monitor
JPS61127043A (en) Data processor
JPH08171504A (en) Emulation device
JPH0426138B2 (en)
JP2003281076A (en) Unauthorized access detection circuit of dma controller, unauthorized access detecting method and program thereof
JPS63313242A (en) Emulator
JPH02186448A (en) Integrated circuit with debugging environment
JPS59202548A (en) Debugging device
JP3449812B2 (en) Control electronics
JPS6123253A (en) Data processing system
JPH04314139A (en) Debugging device
JP3120841B2 (en) In-circuit emulator
JPH09319592A (en) Microcomputer
JP2001051873A (en) Debugging device
JPS6177933A (en) Data processing system
KR20050101839A (en) In-circuit emulator
JPH08185245A (en) Method for resetting microprocessor
JPH07160525A (en) Emulator

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term