JPH02299029A - Processor - Google Patents

Processor

Info

Publication number
JPH02299029A
JPH02299029A JP1118789A JP11878989A JPH02299029A JP H02299029 A JPH02299029 A JP H02299029A JP 1118789 A JP1118789 A JP 1118789A JP 11878989 A JP11878989 A JP 11878989A JP H02299029 A JPH02299029 A JP H02299029A
Authority
JP
Japan
Prior art keywords
interrupt
debugging
interruption
debug
program
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
JP1118789A
Other languages
Japanese (ja)
Inventor
Seiji Hayashida
林田 聖司
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP1118789A priority Critical patent/JPH02299029A/en
Publication of JPH02299029A publication Critical patent/JPH02299029A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To securely make a debugging interruption request by performing interruption processing for the debugging interruption request by a processor which has a debugging function and interruption processing for other interruption requests other than the debugging interruption request by different methods respectively. CONSTITUTION:When a debugging interruption is initiated during the debugging of a program to be debugged, an interruption control circuit 12 supplies an instruction for the output of the contents of a vector register 13 to an internal data bus 7 to a vector register 13. Consequently, the head address of a debugging interruption handler stored previously in the vector register 13 is outputted to the bus 7. The head address which is outputted to the bus 7 is fetched by a program counter 14 and stored and held. Then the debugging interruption handler is started with the head address stored in the program counter 14 and a debugging program moves to the interruption routine corresponding to the interruption request.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) この発明は、デバッグ機能を有するプロセッサに関し、
特にデバッグ時の割込み処理を改善したプロセッサに関
する。
[Detailed Description of the Invention] [Object of the Invention] (Field of Industrial Application) The present invention relates to a processor having a debug function,
In particular, it relates to a processor with improved interrupt processing during debugging.

(従来の技術) 近年、開発、評価の効率化を図る目的で、内部にデバッ
グ機能を備えたプロセッサが開発されている。
(Prior Art) In recent years, processors with internal debugging functions have been developed for the purpose of increasing the efficiency of development and evaluation.

このようなプロセッサとしては、例えば第3図に示すよ
うに構成されたものがある。第3図は、プロセッサにお
ける割込み処理を実行するための概略構成を示す図であ
る。
An example of such a processor is one configured as shown in FIG. 3, for example. FIG. 3 is a diagram showing a schematic configuration for executing interrupt processing in a processor.

プロセッサ1において、被デバツグプログラムをデバッ
グしている際に、デバッグ割込み(デバッグ時の割込み
、 E I T、 E xceptionI nter
rupt  T rapを特にデバッグ割込みと呼び、
通常のプログラムの実行時に発生する割込みと区別する
)が発生すると、第4図に示すようにすべての割込みが
有している割込みベクタ番号によって割込みベクタテー
ブル(EITVT)内のベクタテ−プルエントリ(EI
TVTE)が指定される。
In processor 1, when debugging a program to be debugged, a debug interrupt (interrupt during debugging, EIT, ExceptionInterrupt)
rupt trap is especially called debug interrupt.
When an interrupt (distinguished from an interrupt that occurs during normal program execution) occurs, a vector table entry (EI
TVTE) is specified.

割込みへフタテーブルは、プロセッサ1の外部に設けら
れてメモリ制御回路2の制御の下に外部アドレスバス3
から与えられるアドレスにしたがって外部データバス4
とデータの入出力がなされる外部メモリ5に設けられて
いる。割込みベクタテーブルは、第4図に示すように複
数のベクタテーブルエントリ(Er−rVTE)から構
成されている。ベクタテーブルエントリは、割込み処理
ルーチンを実行させるための要素からなり、その1つが
vPCデータである。割込みへフタテーブルは、外部メ
モリ5に対して論理空間上に割り付けられており、その
先頭論理アドレスがプロセッサ1内に設けられたEIT
ベクタテーブルベースレジスタ(EITVB)6に格納
保持されている。
The interrupt header table is provided outside the processor 1 and is connected to the external address bus 3 under the control of the memory control circuit 2.
External data bus 4 according to the address given from
and an external memory 5 through which data is input and output. The interrupt vector table is composed of a plurality of vector table entries (Er-rVTE) as shown in FIG. The vector table entry consists of elements for executing an interrupt processing routine, one of which is vPC data. The interrupt header table is allocated on the logical space with respect to the external memory 5, and its first logical address is the EIT provided in the processor 1.
It is stored and held in the vector table base register (EITVB) 6.

したがって、例えばそれぞれのベクタテーブルエントリ
が8バイト長で構成されている場合に、ベクタテーブル
エントリの論理アドレスは、割込みベクタ番号を8倍し
た値にベクタテーブルレジメタの値を加えたものとなる
Therefore, for example, when each vector table entry has a length of 8 bytes, the logical address of the vector table entry is the sum of the interrupt vector number multiplied by 8 and the value of the vector table register.

すなわち、発生した割込みの割込みベクタ番号は内部デ
ータバス7を介して割込み制御回路8に与えられ、ベク
タテーブルの先頭論理アドレスはペースレジスタ6から
内部データバス7を介して割込み制御回路8に与えられ
、発生した割込み要求に対応したベクタテーブルエント
リのアドレスが上述したようにしてυj込み制御回路8
によって決定される。割込み制御回路8で決定されたア
ドレスは、内部データバス7を介して外部バス制御回路
9に与えられ、外部バス制御回路9から外部アドレスバ
ス3及びメモリ制御回路2を介して外部メモリ5に与え
られる。これにより、外部メtす5から割込み制御回路
8で決定されたアドレスに対応したベクタテーブルエン
トリが読出される。
That is, the interrupt vector number of the generated interrupt is given to the interrupt control circuit 8 via the internal data bus 7, and the starting logical address of the vector table is given from the pace register 6 to the interrupt control circuit 8 via the internal data bus 7. , the address of the vector table entry corresponding to the generated interrupt request is determined by the υj interrupt control circuit 8 as described above.
determined by The address determined by the interrupt control circuit 8 is given to the external bus control circuit 9 via the internal data bus 7, and from the external bus control circuit 9 to the external memory 5 via the external address bus 3 and the memory control circuit 2. It will be done. As a result, the vector table entry corresponding to the address determined by the interrupt control circuit 8 is read from the external memory 5.

読出されたベクタテーブルエントリは、外部データバス
4を介してプロセッサ1の外部バス制御回路9に与えら
れ、この外部バス制御回路9から内部データバス7に与
えられる。内部データバス7に与えられたベクタテーブ
ルエントリのうちVPCデータは、プログラムカウンタ
(PC)10に格納保持される。これにより、プログラ
ムカウンタ10は、その内容が更新される。
The read vector table entry is applied to the external bus control circuit 9 of the processor 1 via the external data bus 4, and from this external bus control circuit 9 to the internal data bus 7. Among the vector table entries given to the internal data bus 7, VPC data is stored and held in a program counter (PC) 10. As a result, the contents of the program counter 10 are updated.

プログラムカウンタ10に格納されたvPCデータは、
デバッグ割込み要求を実行処理するためのデバッグ割込
みハンドラの先頭アドレスを示している。したがって、
プログラムカウンタ10にvPCデータが格納されると
、このVPCデータで示される先頭アドレスで指定され
るデバッグ割込みハンドラが起動されて、デバッグ割込
み処理が開始される。なお、割込みへフタテーブル及び
ベクタテーブルレジスタ6の内容は、外部からプログラ
ムによって容易に変更することが可能となっている。
The vPC data stored in the program counter 10 is
Indicates the start address of the debug interrupt handler for executing debug interrupt requests. therefore,
When the vPC data is stored in the program counter 10, the debug interrupt handler specified by the start address indicated by the VPC data is activated and debug interrupt processing is started. Note that the contents of the interrupt cover table and vector table register 6 can be easily changed by an external program.

このようにして、プログラムのデバッグ中に発生するデ
バッグ割込み要求が処理されるわけであるが、このデバ
ッグ割込み処理は、デバッグ割込み以外の他の割込みの
割込み処理と同様にして行われている。
In this way, debug interrupt requests that occur during program debugging are processed, and this debug interrupt processing is performed in the same way as the interrupt processing for other interrupts other than debug interrupts.

(発明が解決しようとする課題) このように、デバッグ機能を備えた従来のプロセッサに
あっては、デバッグ割込み処理は他の割込み処理と同様
にして行われていた。すなわち、発生した割込み要求に
対応したベクタテーブルエントリを外部メモリから読出
して、このベクタテーブルエントリの■PCデータをプ
ログラムカウンタに格納し、このVPCデータによって
デバッグ割込みハンドラを起動させるようにしていた。
(Problems to be Solved by the Invention) As described above, in conventional processors equipped with a debug function, debug interrupt processing is performed in the same manner as other interrupt processing. That is, the vector table entry corresponding to the generated interrupt request is read from the external memory, the PC data of this vector table entry is stored in the program counter, and the debug interrupt handler is activated by this VPC data.

一方、EITベクタテーブルベースレジスタ(EITV
B)やベクタテーブルエントリの内容は、ユーザプログ
ラムによって書換えが可能になっている。このため、E
ITVBの内容を書換えて、EITベクタテーブルの領
域を変更した場合には、デバッグ割込みが使用するベク
タテーブルエントリの内容を新たに変更した領域に移さ
なかったりすることがある。また、デバッグ割込みが使
用するベクタテーブルの内容をIIえてしまうことがあ
る。このような場合には、デバッグ中にデバッグ割込み
が発生しても、デバッグを行っているデバッグプログラ
ムに制御を戻すことが困難となり、デバッグ作業を続行
することが不可能となるような不具合が生じることにな
る。
On the other hand, the EIT vector table base register (EITV
B) and the contents of the vector table entry can be rewritten by a user program. For this reason, E
When the contents of ITVB are rewritten to change the area of the EIT vector table, the contents of the vector table entry used by debug interrupts may not be moved to the newly changed area. Also, the contents of the vector table used by the debug interrupt may be read. In such a case, even if a debug interrupt occurs during debugging, it will be difficult to return control to the debug program that is being debugged, resulting in a problem that will make it impossible to continue debugging. It turns out.

そこで、この発明は、上記に鑑みてなされたものであり
、その目的とするところは、割込みの状態が変化した場
合であっても、確実にデバッグ作業時のデバッグ割込み
要求を処理することができるデバッグ機能を有するプロ
セッサを提供することにある。
Therefore, the present invention has been made in view of the above, and its purpose is to be able to reliably process debug interrupt requests during debugging even if the interrupt status changes. An object of the present invention is to provide a processor having a debug function.

[発明の構成] (課題を解決するための手段) 上記目的を達成するために、この発明は、割込み要求に
対応した割込み処理ルーチンを指定する指定情報を格納
保持する第1の保持手段を備え、割込み要求発生時にこ
の第1の保持手段に保持された指定情報によって指定さ
れる割込み処理ルーチンを実行させるデバッグ機能を有
するプロセッサにあって、プログラムのデバッグ時に発
生するデバッグ割込み処理ルーチンを指定する指定情報
を格納保持する第2の保持手段と、デバッグ割込み要求
発生時に前記第2の保持手段によって保持された指定情
報を前記第1の保持手段に転送保持させる制御手段とか
ら構成される。
[Structure of the Invention] (Means for Solving the Problem) In order to achieve the above object, the present invention includes a first holding means for storing and holding specification information specifying an interrupt processing routine corresponding to an interrupt request. , in a processor having a debug function that executes an interrupt processing routine specified by the specification information held in the first holding means when an interrupt request occurs, a specification for specifying a debug interrupt processing routine that occurs when debugging a program. It is comprised of a second holding means for storing and holding information, and a control means for causing the first holding means to transfer and hold the designation information held by the second holding means when a debug interrupt request is generated.

(作用) 上記構成においで、この発明は、デバッグ割込み要求が
発生すると、デバッグ割込み処理ルーチンを指定するた
めの専用の保持手段に保持された指定情報によりデバッ
グ割込み処理ルーチンを指定して、発生した割込み要求
を処理づるようにしている。
(Operation) In the above configuration, when a debug interrupt request occurs, the present invention specifies the debug interrupt processing routine using the specification information held in the dedicated holding means for specifying the debug interrupt processing routine, and It handles interrupt requests.

(実施例) 以下、図面を用いてこの発明の詳細な説明りる。(Example) The present invention will be described in detail below with reference to the drawings.

第1図はこの発明の一実施例を承り図であり、同図に示
すプロセッサ11はデバッグ機能を備えており、外部メ
モリ5を接続している。なお、第1図において、第3図
と同符号のものは同一機能を有するものであり、その説
明は省略する。
FIG. 1 is a diagram showing an embodiment of the present invention, and a processor 11 shown in the figure is equipped with a debug function and is connected to an external memory 5. Note that in FIG. 1, the same reference numerals as in FIG. 3 have the same functions, and the explanation thereof will be omitted.

第1図において、プロセッサ11は、割込み制御回路1
2、デバッグ割込みベクタレジスタ(DBV)13及び
プログラムカウンタ(PC)14を中心として構成され
ている。
In FIG. 1, a processor 11 includes an interrupt control circuit 1
2. It is mainly composed of a debug interrupt vector register (DBV) 13 and a program counter (PC) 14.

割込み制御回路12は、デバッグ時以外に発生する割込
み要求に対しては、第3図に示した割込み!II i1
1回路8と同様に、発生した割込みのベクタ番号とペー
スレジスタ6の内容とから割込みベクタテーブルのベク
タテーブルエントリのアドレスを決定する。一方、割込
み制御回路12は、デバッグ割込みが発生すると、ベク
タレジスタ13にその格納内容を内部データバス7に出
力させ、プログラムカウンタ14に内部データバス7に
出力されたベクタレジスタ13の内容を取り込む旨の指
令を与える。
The interrupt control circuit 12 responds to interrupt requests that occur outside of debugging using the interrupt! shown in FIG. II i1
1 circuit 8, the address of the vector table entry of the interrupt vector table is determined from the vector number of the generated interrupt and the contents of the pace register 6. On the other hand, when a debug interrupt occurs, the interrupt control circuit 12 causes the vector register 13 to output the stored contents to the internal data bus 7, and causes the program counter 14 to take in the contents of the vector register 13 output to the internal data bus 7. give instructions.

K1込み制御回路12は、上記した動作をマイクロプロ
グラムで制御するような構成のものであっても、回路で
構成されるものであってもよい。
The K1-inclusive control circuit 12 may be configured to control the above operations using a microprogram, or may be configured as a circuit.

ベクタレジスタ13は、デバッグ割込みを実行処理づる
ためのデバッグ割込みハンドラの先頭アドレス値を格納
保持するものである。このアドレス値は割込み処理が開
始される前に予めベクタレジスタ13にセットされ、セ
ットされたアドレスは割込み制御回路12の指令によっ
て内部データバス7に出力される。
The vector register 13 stores and holds the start address value of a debug interrupt handler for executing a debug interrupt. This address value is set in the vector register 13 in advance before interrupt processing is started, and the set address is output to the internal data bus 7 by a command from the interrupt control circuit 12.

プログラムカウンタ(PC>14は、デバッグ時以外に
割込み要求が発生すると、第3図に示したPC3と同様
に外部メモリ5から読出されたベクタエントリのVPC
データが格納保持される。
When an interrupt request occurs other than during debugging, the program counter (PC>14) is the VPC of the vector entry read from the external memory 5, similar to PC3 shown in FIG.
Data is stored and retained.

一方、デバッグ割込み要求が発生した場合には、プログ
ラムカウンタ14は、ベクタレジスタ13から内部デー
タバス7に与えられたアドレスを、割込み制御回路12
の制御の下に取り込み格納保持する。
On the other hand, when a debug interrupt request occurs, the program counter 14 transfers the address given from the vector register 13 to the internal data bus 7 to the interrupt control circuit 12.
Capture and store and hold under the control of.

以上説明したように、この発明の一実施例は構成されて
おり、次にこの実施例の作用を第2図を参照して説明す
る。
As explained above, one embodiment of the present invention is constructed, and the operation of this embodiment will now be explained with reference to FIG. 2.

被デバツグプログラムのデバッグ時にデバッグ割込みが
発生すると、ベクタレジスタ13の内容を内部データバ
ス7に出力する旨の指令が、割込み制御回路12からベ
クタレジスタ13に与えられる。これにより、ベクタレ
ジスタ13に予め格納されていたデバッグ割込みハンド
ラの先頭アドレスが内部データバス7に出力される。
When a debug interrupt occurs during debugging of a program to be debugged, a command to output the contents of the vector register 13 to the internal data bus 7 is given to the vector register 13 from the interrupt control circuit 12. As a result, the start address of the debug interrupt handler previously stored in the vector register 13 is output to the internal data bus 7.

内部データバス7に出力された先頭アドレスは、訓込み
制御回路12によって制御されたプログラムカウンタ1
4に取り込まれて格納保持される。
The start address output to the internal data bus 7 is the program counter 1 controlled by the training control circuit 12.
4 and stored and held.

そして、プログラムカウンタ14に格納された先頭アド
レスによってデバッグ割込みハンドラが起動されて、デ
バッグプログラムは割込み要求に対応した割込み処理ル
ーチンに移行する。
Then, the debug interrupt handler is activated by the start address stored in the program counter 14, and the debug program shifts to an interrupt processing routine corresponding to the interrupt request.

このように、この実施例にあっては、デバッグ割込み処
理を他の割込み処理とは別に、ベクタレジスタ13の内
容にしたがってデバッグ割込みハンドラを指定するよう
にしているので、ペースレジスタ6やベクタテーブルエ
ントリのVPCデータが変化した場合であっても、デバ
ッグ割込み処理に何ら影響を与えることはなくなる。こ
のため、デバッグ割込みが発生しても、それまでのデバ
ッグ作業を続けて実行することが可能となる。
In this way, in this embodiment, the debug interrupt handler is specified separately from other interrupt processes, and the debug interrupt handler is specified according to the contents of the vector register 13. Even if the VPC data of VPC changes, it will not affect the debug interrupt processing in any way. Therefore, even if a debugging interrupt occurs, it is possible to continue executing the debugging work up to that point.

したがって、デバッグ割込みを除く他の割込みをユーザ
に解/+5[ツることが可能となり、ユーザはデバッグ
作業を確実かつ円滑に行うことができるようになる。
Therefore, it becomes possible for the user to handle interrupts other than debugging interrupts, and the user can perform debugging operations reliably and smoothly.

また、デバッグ割込みハンドラの先頭アドレスをレジス
タに格納された値によって指定することにより、デバッ
グプログラムを任意のアドレスに配置することが可能と
なり、システム全体としての汎用性が高められる。
Furthermore, by specifying the start address of the debug interrupt handler using the value stored in the register, it becomes possible to place the debug program at an arbitrary address, increasing the versatility of the system as a whole.

なお、この発明は上記実施例に限定されるものではなく
、例えばデバッグ割込みハンドラの先頭アドレスを、プ
ロセッサ11外に設けられたレジスタ等に格納保持して
もよい。また、外部メモリの所定のアドレスに格納する
ようにしてもよい。
Note that the present invention is not limited to the above-described embodiment, and for example, the start address of the debug interrupt handler may be stored and held in a register provided outside the processor 11. Alternatively, the information may be stored at a predetermined address in an external memory.

[発明の効果] 以上説明したように、この発明によれば、デバッグ機能
を有するプロセッサにおけるデバッグ割込み要求の割込
み処理と、デバッグ割込み要求以外の他の割込み要求の
割込み処理をそれぞれ別々の方法によって行なうように
したので、割込みの状態が変更された場合であっても、
デバッグプログラムを変更することなく、デバッグ作業
時に発生ずるデバッグ割込み要求を確実かつ容易に実行
することができるようになる。
[Effects of the Invention] As explained above, according to the present invention, the interrupt processing of a debug interrupt request in a processor having a debug function and the interrupt processing of other interrupt requests other than the debug interrupt request are performed by separate methods. So even if the state of the interrupt changes,
It becomes possible to reliably and easily execute a debug interrupt request that occurs during debug work without changing the debug program.

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

第1図はこの発明の一実施例を示す構成ブロック図、第
2図は第1図に示す構成の作用説明図、第3図は従来の
デバッグ機能を有するプロセッサを含む構成ブロック図
、第4図は第3図に示す構成の作用説明図である。 2・・・メモリ制御回路 5・・・外部メモリ 6・・・EITへフタテーブルベースレジスタ9・・・
外部バス制御回路 11・・・プロセッサ 12・・・割込み制御回路 13・・・デバッグ割込みベクタレジスタ14・・・プ
ログラムカウンタ
FIG. 1 is a configuration block diagram showing an embodiment of the present invention, FIG. 2 is an explanatory diagram of the operation of the configuration shown in FIG. 1, FIG. 3 is a configuration block diagram including a conventional processor having a debug function, and FIG. The figure is an explanatory diagram of the operation of the configuration shown in FIG. 3. 2... Memory control circuit 5... External memory 6... Lid to EIT Table base register 9...
External bus control circuit 11...Processor 12...Interrupt control circuit 13...Debug interrupt vector register 14...Program counter

Claims (1)

【特許請求の範囲】 割込み要求に対応した割込み処理ルーチンを指定する指
定情報を格納保持する第1の保持手段を備え、割込み要
求発生時にこの第1の保持手段に保持された指定情報に
よつて指定される割込み処理ルーチンを実行させるデバ
ッグ機能を有するプロセッサにあって、 プログラムのデバッグ時に発生するデバッグ割込み処理
ルーチンを指定する指定情報を格納保持する第2の保持
手段と、 デバッグ割込み要求発生時に前記第2の保持手段によつ
て保持された指定情報を前記第1の保持手段に転送保持
させる制御手段と を有することを特徴とするプロセッサ。
[Scope of Claims] The first holding means stores and holds specification information specifying an interrupt processing routine corresponding to an interrupt request, and when an interrupt request occurs, the specification information held in the first holding means A processor having a debug function that executes a specified interrupt processing routine, the second storage means storing and holding specification information specifying a debug interrupt processing routine that occurs when debugging a program; A processor comprising: control means for transferring and holding specification information held by the second holding means to the first holding means.
JP1118789A 1989-05-15 1989-05-15 Processor Pending JPH02299029A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1118789A JPH02299029A (en) 1989-05-15 1989-05-15 Processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1118789A JPH02299029A (en) 1989-05-15 1989-05-15 Processor

Publications (1)

Publication Number Publication Date
JPH02299029A true JPH02299029A (en) 1990-12-11

Family

ID=14745134

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1118789A Pending JPH02299029A (en) 1989-05-15 1989-05-15 Processor

Country Status (1)

Country Link
JP (1) JPH02299029A (en)

Similar Documents

Publication Publication Date Title
JPH07120338B2 (en) Method for a data processor to coordinate the execution of instructions by a coprocessor and the data processor
JPH02299029A (en) Processor
JPS59218569A (en) Microcomputer
JP2744152B2 (en) Data driven data processor
JPH0193838A (en) Microprocessor for debug
JP3139310B2 (en) Digital signal processor
JPS6020275A (en) Simple programming system of multiprocessor
JPS59144955A (en) Information processor
JPH0259829A (en) Microcomputer
JPH02242349A (en) Command processor
JPH03103924A (en) Data processor
JPH0473167B2 (en)
JPH02135545A (en) Execution control processing system for debugger
JP3127737B2 (en) Digital signal processor
JPH0399338A (en) Microprocessor
JPS6146531A (en) Microprocessor
JPS59165143A (en) Data processor
JPH0340075A (en) Microcomputer
JPH02109128A (en) Computer system
JPS605982B2 (en) Program counter setting method for 1-chip microprocessor
JPS6349942A (en) Arithmetic processing unit
JPS6029846A (en) Execution state control system of information processor
JPS6349941A (en) Arithmetic processing unit
JPS6111856A (en) Operating method of digital control device
JPH01156823A (en) Microprocessor unit