JPH0795277B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JPH0795277B2
JPH0795277B2 JP63298517A JP29851788A JPH0795277B2 JP H0795277 B2 JPH0795277 B2 JP H0795277B2 JP 63298517 A JP63298517 A JP 63298517A JP 29851788 A JP29851788 A JP 29851788A JP H0795277 B2 JPH0795277 B2 JP H0795277B2
Authority
JP
Japan
Prior art keywords
interrupt
register
program
register bank
processing
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.)
Expired - Fee Related
Application number
JP63298517A
Other languages
Japanese (ja)
Other versions
JPH02144630A (en
Inventor
裕子 三平
一郎 香園
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP63298517A priority Critical patent/JPH0795277B2/en
Priority to US07/441,146 priority patent/US5155853A/en
Publication of JPH02144630A publication Critical patent/JPH02144630A/en
Publication of JPH0795277B2 publication Critical patent/JPH0795277B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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)
  • Bus Control (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、処理に使用する複数の汎用レジスタセットと
(以下、レジスタバンクという)を備え、割込み要求信
号に対応した割込み受付け信号に連動して所定の汎用レ
ジスタバンクを指定し、割込み処理プログラムを実行す
るデータ処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial application] The present invention includes a plurality of general-purpose register sets used for processing and (hereinafter referred to as register banks), and is linked to an interrupt acceptance signal corresponding to an interrupt request signal. To a predetermined general-purpose register bank to execute an interrupt processing program.

〔従来の技術〕[Conventional technology]

一般に、マイクロコンピュータシステムにおいては、主
プログラムを実行中に周辺装置が割込み要求信号を発生
した場合に、中央処理装置(以下、CPUという)が、主
プログラムの実行を中断して周辺装置の割込み要求信号
に対する割込み処理プログラムを実行するための、割込
み制御部を備えている。また、周辺装置の数が多いと、
複数の割込み要求信号が同時に発生する場合、もしくは
ある周辺装置の割込み要求信号に対する割込み処理プロ
グラムを実行中に他の周辺装置が割込み要求信号を発生
する場合がある。このような複数の割込み要求信号の競
合に対処するために、各割込み要求信号に優先順位を設
定し、優先順位の高い割込み要求信号に対する処理プロ
グラムの実行を優先して行なうという優先順位制御も必
要となる。
Generally, in a microcomputer system, when a peripheral device generates an interrupt request signal during execution of a main program, a central processing unit (hereinafter referred to as CPU) interrupts execution of the main program and interrupts the peripheral device. An interrupt control unit for executing an interrupt processing program for signals is provided. Also, if the number of peripheral devices is large,
A plurality of interrupt request signals may be generated at the same time, or another peripheral device may generate an interrupt request signal during execution of an interrupt processing program for an interrupt request signal of a peripheral device. In order to deal with such conflicts among multiple interrupt request signals, priority control is also required, in which a priority is set for each interrupt request signal and the processing program for the interrupt request signal with a high priority is given priority. Becomes

一般に、マイクロコンピュータシステムにおける割込み
処理方式として、実行中の主プログラムのアドレスを指
定するプログラムカウンタの内容、主プログラム実行中
の状態を記憶しているプログラムステータスワード、お
よび汎用レジスタの内容とをスタック上に退避し、割込
み要求信号に対応した処理プログラムの開始番地(以
下、ベクタ番地という)をプログラムカウンタに設定
し、割込み処理プログラムを実行するところのベクタ割
込み処理方式と、汎用レジスタバンクを複数設け、割込
み受付け信号に連動して汎用レジスタバンクを選択的に
切替え、分岐するところのレジスタバンク切替え方式と
の2方式が知られている。この受付け形態について、第
5図を用いて説明する。
Generally, as an interrupt processing method in a microcomputer system, the contents of a program counter that specifies the address of the main program being executed, the program status word that stores the state during execution of the main program, and the contents of general-purpose registers are stored on the stack. Set the start address of the processing program corresponding to the interrupt request signal (hereinafter referred to as the vector address) in the program counter, execute the interrupt processing program, and provide a vector interrupt processing method and multiple general-purpose register banks. Two methods are known, a register bank switching method in which a general-purpose register bank is selectively switched and branched in conjunction with an interrupt acceptance signal. This acceptance form will be described with reference to FIG.

割込み要求信号140−1,140−2,140−3の少なくとも1
つが発生すると、割込み制御部は優先順位制御により処
理優先度の最も高い割込み要求信号を選択し、受付け可
能であると判断した場合、CPU120に対し、割込み受付け
信号141を発信する。レジスタバンク選択制御回路112
は、割込み処理で使用するレジスタバンクを選択するた
めのレジスタバンク指定コードを発生する。また、割込
みコード発生回路111は、割込み要求信号毎に個別に設
けられた定数(以下、割込みコードという)を発生す
る。CPU120割込み受付け信号を受信すると、実行中の主
プログラムの実行を中断し、割込み処理プログラムを実
行する。
At least one of interrupt request signals 140-1, 140-2, 140-3
If one occurs, the interrupt control unit selects the interrupt request signal with the highest processing priority by priority control, and if it determines that the interrupt request signal can be accepted, issues an interrupt acceptance signal 141 to the CPU 120. Register bank selection control circuit 112
Generates a register bank designation code for selecting a register bank used in interrupt processing. Further, the interrupt code generation circuit 111 generates a constant (hereinafter referred to as an interrupt code) individually provided for each interrupt request signal. When the CPU 120 interrupt acceptance signal is received, the execution of the main program being executed is interrupted and the interrupt processing program is executed.

ここで、割込み受付け形態が、ベクタ割込み処理である
場合には、スタックポインタ125が指定するメモリ(以
下、スタックメモリという)の番地に実行中の主プログ
ラムのアドレスを指定するプログラムカウンタ(以下、
PCという)121の内容および主プロゲラムの実行状態を
記憶しているプログラムステータスワード(以下、PSW
という)122とを退避し、割込みコード発生回路111によ
り出力されている割込みコードを基にして、発生してい
る割込み要求信号に対応した処理プログラムの開始番地
を生成してPC121に設定し、割込み処理プログラムを開
始する。ベクタ割込み処理では、割込み要求毎に割込み
コードが定まっているので、割込み処理プログラムの開
始番地も割込み要求毎に定まり、各割込み要求に対応し
割込み処理プログラムを開始することができる。さら
に、CPU120は、割込み処理プログラム内で、汎用レジス
タの内容をPC、PSWと同様にスタックメモリに退避す
る。
Here, when the interrupt acceptance mode is vector interrupt processing, a program counter (hereinafter, referred to as a program counter for specifying the address of the main program being executed at the address of the memory (hereinafter, referred to as a stack memory) specified by the stack pointer 125)
Program status word (hereinafter, PSW) that stores the contents of 121 and the execution status of the main program
122) is saved, based on the interrupt code output by the interrupt code generation circuit 111, the start address of the processing program corresponding to the interrupt request signal being generated is generated and set in the PC 121, and the interrupt is generated. Start the processing program. In the vector interrupt processing, since the interrupt code is determined for each interrupt request, the start address of the interrupt processing program is also determined for each interrupt request, and the interrupt processing program can be started corresponding to each interrupt request. Further, the CPU 120 saves the contents of the general-purpose register in the stack memory in the same way as the PC and PSW in the interrupt processing program.

割込み受付け形態が、レジスタバンク切替え割込みであ
る場合には、CPUは、割込み処理制御部110に読み出し信
号143を発信して、レジスタバンク指定コードを読み出
し、レジスタバンク指定レジスタ(以下、RBという)12
3に格納し、データメモリ内の所定のレジスタバンクを
指定することにより、割込み要求信号に対応したレジス
タバンク124に切替える。個々のレジスタバンクは第2
図に示すように、汎用レジスタ、PCの退避領域、PSWの
退避領域、および割込み処理プログラムの処理開始番地
(以下、PC′という)とから構成されている。CPU120
は、PC121とPSW122を切替え先のレジスタバンクの退避
領域に退避するとともに、切替え先レジスタバンクに格
納されているPC′をPC121に設定して割込み処理プログ
ラムを開始する。
When the interrupt acceptance mode is the register bank switching interrupt, the CPU issues a read signal 143 to the interrupt processing control unit 110 to read the register bank specifying code, and the register bank specifying register (hereinafter referred to as RB) 12
By storing in 3 and designating a predetermined register bank in the data memory, it is switched to the register bank 124 corresponding to the interrupt request signal. Each register bank is second
As shown in the figure, it comprises a general-purpose register, a PC save area, a PSW save area, and a processing start address of the interrupt processing program (hereinafter referred to as PC '). CPU120
Saves the PC 121 and PSW 122 in the save area of the register bank of the switching destination, sets PC ′ stored in the register bank of the switching destination to PC 121, and starts the interrupt processing program.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

以上、一般的に知られている2方式の割込み処理方式に
ついて延べたが、ベクタ割込み方式では、割込み処理プ
ログラムにおける汎用レジスタの退避、あるいは復帰の
ための処理に多大な時間がかかるため、割込み処理の動
作効率が悪くなるという欠点がある。これに対してレジ
スタバンク切替え割込みでは、汎用レジスタの退避、復
帰処理を行なう必要がなくベクタ割込み処理方式により
動作効率が非常に優れている。しかし、マイクロコンピ
ュータシステムの高機能化に伴い、周辺装置が増加する
傾向にあるため、周辺装置から発生される割込み要求の
数が多くなってきている。こうした多数の割込み要求に
対し、個別にレジスタバンクを備えることは内臓するメ
モリ容量が膨大となり、物理的に不可能である。レジス
タバンク割込みを指定できる割込みの数がレジスタバン
クの数に制限されることを回避するために、割込み要求
をグループ化し、グループ毎にレジスタバンクを備える
等の工夫がされている。しかしながら、グループ毎にレ
ジスタバンクを共通に使用して割込み処理を行なう場
合、割込み処理プログラム開始番地も同一となるため、
グループ内のどの割込み要因によって割込みが起動され
ているかを割込み処理の中で判断することができない。
そのため、結果的には、割込みグループのうち、1つの
割込み要求だけはレジスタバンク切替え割込みにより処
理することができるが、他の割込みは、ベクタ割込みに
より処理せざるを得ないという欠点を有していた。
As described above, the two generally known interrupt processing methods have been described. In the vector interrupt method, it takes a lot of time to save or restore the general-purpose registers in the interrupt processing program. However, there is a drawback in that the operating efficiency of is deteriorated. On the other hand, in the register bank switching interrupt, it is not necessary to save and restore the general-purpose register, and the operation efficiency is very excellent due to the vector interrupt processing method. However, the number of interrupt requests generated from the peripheral devices is increasing because the number of peripheral devices tends to increase as the performance of microcomputer systems increases. It is physically impossible to individually provide a register bank for such a large number of interrupt requests, because the built-in memory capacity becomes huge. In order to avoid that the number of interrupts that can specify register bank interrupts is limited to the number of register banks, the interrupt requests are grouped and a register bank is provided for each group. However, when the interrupt processing is performed by using the register bank in common for each group, the start address of the interrupt processing program is also the same.
It is not possible to determine in the interrupt processing which interrupt factor in the group has triggered the interrupt.
Therefore, as a result, only one interrupt request in the interrupt group can be processed by the register bank switching interrupt, but the other interrupts must be processed by the vector interrupt. It was

従って、本発明の目的は、複数の割込み要求に対して、
レジスタバンクを共通に使用して割込み処理を行なう場
合にも、割込み処理プログラムの中で、起動されている
割込み要因を判別することができるデータ処理装置を提
供することにある。
Therefore, it is an object of the present invention to handle multiple interrupt requests.
An object of the present invention is to provide a data processing device capable of discriminating an activated interrupt factor in an interrupt processing program even when interrupt processing is performed by commonly using a register bank.

〔課題を解決するための手段〕[Means for Solving the Problems]

本発明のデータ処理装置は、中央処理装置が処理に使用
する複数の汎用レジスタセットと、割り込み要求信号に
対応した割り込み受け付け信号に連動して所定の汎用レ
ジスタセットに切り替え割り込み処理プログラムを起動
する割り込み制御手段と、前記割り込み要求信号に対応
した割り込みコードを発生する手段と、前記割り込みコ
ードを保持する記憶手段と、前記割り込み処理プログラ
ムにより前記記憶手段から前記割り込みコードを読み出
して割り込み要求を識別し、当該識別した割り込み要求
に応答した処理プログラムに分岐する手段とを有するこ
とを特徴とする。このように、本発明では、割込み要因
を示す割込みコードを格納しておく割込みソースレジス
タを設けており、前記レジスタの内容をCPUの命令操作
により読み出すことにより、起動されたレジスタバンク
切替え割込み処理の中で割込み要因を識別できる。
The data processing device of the present invention includes a plurality of general-purpose register sets used by the central processing unit for processing, and an interrupt for switching to a predetermined general-purpose register set in synchronization with an interrupt acceptance signal corresponding to an interrupt request signal to start an interrupt processing program. Control means, means for generating an interrupt code corresponding to the interrupt request signal, storage means for holding the interrupt code, and the interrupt processing program reads the interrupt code from the storage means to identify an interrupt request, Means for branching to a processing program responding to the identified interrupt request. As described above, in the present invention, the interrupt source register for storing the interrupt code indicating the interrupt factor is provided, and by reading the contents of the register by the instruction operation of the CPU, the activated register bank switching interrupt processing is performed. The interrupt factor can be identified in.

〔実施例〕〔Example〕

本発明の実施例について、図面を参照して説明する。 Embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例のデータ処理装置を示すブロ
ック図である。本実施例のデータ処理装置は、INT1,INT
2,INT3,INTnを含むnの割込み要求信号を備えたマイク
ロコンピュータで、CPU20,プログラムメモリ30,3組の汎
用レジスタセット(以下、レジスタバンクという)と割
込み処理プログラム以外の主プログラムで使用する汎用
レジスタバンク0を含むデータメモリ24、アドレスバス
50、データバス51、データメモリ24のアドレスをデコー
ドするアドレスデコーダ26,27、割込み要求信号14−1,1
4−2,14−3,…14−nが供給されたときに割込み優先順
位、割込み受付け状態を判定する割込み優先順位制御回
路10(以下、INTCという)、各割込み要求信号に対応し
た定数(以下、割込みコードという)を発生する割込み
コード発生回路11、各割込み要求処理で使用するレジス
タバンクを指定する情報をあらかじめ格納しておき割込
み要求に応じてレジスタバンク指定コードを発生するレ
ジスタバンク選択制御回路12、割込みソースレジスタ1
4、ならびにその他の周辺回路からなる。
FIG. 1 is a block diagram showing a data processing device according to an embodiment of the present invention. The data processing device of this embodiment has INT1, INT
A microcomputer equipped with n interrupt request signals including 2, INT3, INTn, general purpose register set of CPU20, program memory 30,3 sets (hereinafter referred to as register bank) and main program other than interrupt processing program Data memory 24 including register bank 0, address bus
50, data bus 51, address decoders 26 and 27 for decoding addresses of the data memory 24, interrupt request signals 14-1 and 1
Interrupt priority control circuit 10 (hereinafter referred to as INTC) that determines interrupt priority and interrupt acceptance status when 4-2, 14-3, ... 14-n are supplied, constants corresponding to each interrupt request signal ( Hereinafter, an interrupt code generation circuit 11 for generating an interrupt code), information for specifying a register bank used in each interrupt request process is stored in advance, and a register bank selection control for generating a register bank specification code in response to an interrupt request Circuit 12, interrupt source register 1
4 and other peripheral circuits.

まず、演算処理機能について説明する。CPU20は、プロ
グラムメモリ30のアドレスを指定するプログラムカウン
タ21、プログラムの状態を示すプログラムステータスワ
ード(以下、PSWという)22、割込み受付け信号41の発
信時にプログラムカウンタ21、PSW22の内容を退避する
ためのデータメモリ24のアドレスを指定するスタックポ
インタ25を含んでいる。データメモリ24は、CPU20がア
ドレスバス50に出力したアドレスがアドレスデコーダ27
でデコードされ、対応する番地が選択される。また、デ
ータメモリ24には、レジスタバンクが配置されており、
レジスタバンク指定レジスタ(以下、RBという)23の値
と、CPU20からアドレスバス50に出力したレジスタアド
レスとが、アドレスデコーダ26でデコードされ、RBによ
り複数のレジスタバンクの中から1つを選択し、レジス
タアドレスによりレジスタバンク内の各汎用レジスタを
選択する。
First, the arithmetic processing function will be described. The CPU 20 stores a program counter 21 for designating an address of the program memory 30, a program status word (hereinafter, referred to as PSW) 22 indicating a state of a program, and a program counter 21 for saving the contents of the program counter 21 and PSW 22 when an interrupt acceptance signal 41 is transmitted. It includes a stack pointer 25 which specifies the address of the data memory 24. In the data memory 24, the address output by the CPU 20 to the address bus 50 is the address decoder 27.
Is decoded and the corresponding address is selected. Further, in the data memory 24, a register bank is arranged,
The value of the register bank designation register (hereinafter referred to as RB) 23 and the register address output from the CPU 20 to the address bus 50 are decoded by the address decoder 26, and one of a plurality of register banks is selected by RB, Each general register in the register bank is selected by the register address.

次に、割込み処理機能について説明する。本実施例では
前述したようにn本の割込み要求信号が受付け可能な構
成になっており、それぞれの割込み要求処理は以下のよ
うに制御される。ここでは割込み要求信号INT2を例にと
って説明する。割込み要求信号INT2が発生するとINT2に
応じた割込み処理要求フラグが“1"にセットされ、割込
み制御信号17−1,17−2,…,17−nの内の17−2のみが
活性化する。割込み要求信号17−2は、割込みコード発
生回路11、レジスタバンク選択制御回路12に供給され
る。割込みコード発生回路11では、割込み制御信号17−
2により、割込みコード15−2が選ばれ、INT2に対応し
た割込みコードを発生し、CPUに供給する。また、レジ
スタバンク選択制御回路12では、バンク指定レジスタ16
−2が選ばれ、INT2のレジスタバンク指定コードを発生
する。INT10は、INT2が入力されると、割込み許可状
態、および、INT2の割込み優先順位を判定し、割込み許
可状態であり、かつ、現在実行中の処理より優先順位が
高いと判定した場合、CPU20に対して、割込み受付け信
号41を活性化する。また、割込み受付け信号41の付勢に
よって、レジスタバンク指定レジスタ16−2のレジスタ
バンク指定コードがRB23へ、割込みコード15−2が割込
みソースレジスタ14にそれぞれラッチされる。割込みソ
ースレジスタ14は、次の割込み要求が受付けられるま
で、処理中の割込みの割込みコードを保持する。
Next, the interrupt processing function will be described. In this embodiment, as described above, the n interrupt request signals are received, and the respective interrupt request processes are controlled as follows. Here, the interrupt request signal INT2 will be described as an example. When the interrupt request signal INT2 is generated, the interrupt processing request flag corresponding to INT2 is set to "1", and only 17-2 of the interrupt control signals 17-1, 17-2, ..., 17-n is activated. . The interrupt request signal 17-2 is supplied to the interrupt code generation circuit 11 and the register bank selection control circuit 12. In the interrupt code generation circuit 11, the interrupt control signal 17-
The interrupt code 15-2 is selected by 2 and an interrupt code corresponding to INT2 is generated and supplied to the CPU. In the register bank selection control circuit 12, the bank designation register 16
-2 is selected and an INT2 register bank specifying code is generated. When INT2 is input, INT10 determines the interrupt enable state and the interrupt priority level of INT2, and if it is determined that it is in the interrupt enable state and the priority is higher than the currently executing process, INT10 On the other hand, the interrupt acceptance signal 41 is activated. Further, by the activation of the interrupt acceptance signal 41, the register bank designation code of the register bank designation register 16-2 is latched to RB23 and the interrupt code 15-2 is latched to the interrupt source register 14. The interrupt source register 14 holds the interrupt code of the interrupt being processed until the next interrupt request is accepted.

次に、割込み受付け信号41が入力されたときのCPU20の
動作について説明する。まず、割込み受付け形態が、ベ
クタ割込み形態である場合、CPUは、割込みコード15−
2に基づいて割込み処理プログラムの開始番地を生成し
た後、INTC10に対して割込み応答信号44を発信し、割込
み要求フラグを“0"にリセットして、割込み処理を開始
する。割込み要求フラグのリセットにより他の割込み要
求信号は受付け可能となるが、割込み受付け信号41は割
込み禁止状態であるため付勢されない。プログラムによ
り割込み許可状態にすると、他の割込み要求信号の状態
により活性化される。
Next, the operation of the CPU 20 when the interrupt acceptance signal 41 is input will be described. First, when the interrupt acceptance form is the vector interrupt form, the CPU executes the interrupt code 15-
After generating the start address of the interrupt processing program based on 2, the interrupt response signal 44 is transmitted to the INTC 10, the interrupt request flag is reset to "0", and the interrupt processing is started. Other interrupt request signals can be accepted by resetting the interrupt request flag, but the interrupt acceptance signal 41 is not activated because it is in the interrupt disabled state. When the interrupt enable state is set by the program, it is activated by the state of another interrupt request signal.

レジスタバンク切替え割込み形態である場合、割込み受
付け信号41により、RB23に起動された割込み要求のバン
ク指定コードが格納され、所定のレジスタバンクに切替
えられているので、CPU20は切替えられたレジスタバン
クの退避領域にPC21、PSW22を退避すると共に、切替え
られたレジスタバンクにあらかじめ設定されている割込
みプログラム開始番地をPC21に設定した後、INTC10に対
して割込み応答信号44を発信し、割込み要求フラグを
“0"にリセットして割込み処理を開始する。バクタ割込
みと同様、割込み要求フラグのリセットにより他の割込
み要求信号は受付け可能となるが、割込み受付け信号41
は割込み禁止状態であるため付勢されない。プログラム
により割込み許可状態にすると、他の割込み要求信号の
状態により活性化される。割込みプログラム開始番地と
してあらかじめ指定されている番地は、各レジスタバン
クあたり1つしか設定できないので複数の割込みが同一
のレジスタバンクを使用する場合には、割込み処理プロ
グラムの中で割込みソースレジスタを判別して、各割込
み処理へ分岐する。例えば、第3図のフローチャートに
示すように、まず、割込みソースレジスタ14の値を汎用
レジスタに読み出す命令を実行する。この命令を実行す
ると、読み出し信号42が発生して、割込みソースレジス
タ14の値がデータバス51に出力され、データバス51の内
容が汎用レジスタに格納される。割込みソースレジスタ
14には割込み処理プログラムを実行している割込み要求
に対応したコードが必ず格納されているので汎用レジス
タの値を判断して実行中の割込み処理の割込み要求を識
別する。その後、割込み要求に応じた処理の開始アドレ
スへ分岐すれば、各割込み要求毎に、処理を開始するこ
とができる。
In the register bank switching interrupt mode, the interrupt acceptance signal 41 stores the bank designation code of the interrupt request activated in the RB23 and switches to a predetermined register bank, so the CPU 20 saves the switched register bank. Save PC21 and PSW22 in the area, set the interrupt program start address preset in the switched register bank to PC21, then send the interrupt response signal 44 to INTC10 and set the interrupt request flag to "0". Reset to "to start interrupt processing. As with the bacter interrupt, other interrupt request signals can be accepted by resetting the interrupt request flag, but the interrupt acceptance signal 41
Is not activated because it is in the interrupt disabled state. When the interrupt enable state is set by the program, it is activated by the state of another interrupt request signal. Since only one address can be set per register bank in advance as the interrupt program start address, if multiple interrupts use the same register bank, the interrupt source register must be identified in the interrupt processing program. And branch to each interrupt process. For example, as shown in the flowchart of FIG. 3, first, an instruction to read the value of the interrupt source register 14 into a general-purpose register is executed. When this instruction is executed, the read signal 42 is generated, the value of the interrupt source register 14 is output to the data bus 51, and the content of the data bus 51 is stored in the general-purpose register. Interrupt source register
Since the code corresponding to the interrupt request executing the interrupt processing program is always stored in 14, the value of the general register is judged to identify the interrupt request of the interrupt processing being executed. After that, by branching to the start address of the process according to the interrupt request, the process can be started for each interrupt request.

次に、本発明の他の実施例について説明する。システム
構成は第1図と同じである。割込受付け信号41により、
レジスタバンク切替え割込みが起動されると、レジスタ
バンク指定コードがレジスタバンク選択制御回路12によ
り生成され、RB23に格納される。これにより、レジスタ
バンク24の中から割込み処理で使用するレジスタバンク
が選択される。選択されたレジスタバンクにはあらかじ
め割込みプログラム開始番地が設定されているが、この
設定値は、割込みソースレジスタ14に格納されている割
込み要求信号に対応した割込みコードと加算され、PC21
に設定される。例えば、割込みコード1,2,3とし、第4
図に示すように、プログラムメモリ30のメモリアドレス
PC′+1,PC′+2,PC′+3に、それぞれ、[割込プログ
ラム処理1開始アドレスへの分岐命令],[割込プログ
ラム処理2開始アドレスへの分岐命令],[割込プログ
ラム処理3開始アドレスへの分岐命令]を格納しておく
ことにより、各割込み要求に応じた処理を開始すること
ができる。
Next, another embodiment of the present invention will be described. The system configuration is the same as in FIG. By the interrupt acceptance signal 41,
When the register bank switching interrupt is activated, a register bank designation code is generated by the register bank selection control circuit 12 and stored in RB23. As a result, the register bank used in interrupt processing is selected from the register banks 24. The interrupt program start address is set in advance in the selected register bank. This set value is added to the interrupt code corresponding to the interrupt request signal stored in the interrupt source register 14, and PC21
Is set to. For example, interrupt codes 1, 2, and 3
Memory address of program memory 30 as shown
[Branch instruction to interrupt program processing 1 start address], [Branch instruction to interrupt program processing 2 start address], [interrupt program processing 3 start] to PC '+ 1, PC' + 2, PC '+ 3, respectively. [Branch instruction to address] is stored, processing corresponding to each interrupt request can be started.

したがって、割込み処理プログラムにおいて、割込みコ
ードを判別して各割込み要求に応じた処理に分岐する処
理を行なう必要がない。
Therefore, it is not necessary for the interrupt processing program to perform a process of discriminating an interrupt code and branching to a process corresponding to each interrupt request.

〔発明の効果〕〔The invention's effect〕

以上説明したように、本発明は、起動された割込み処理
の割込みソースを示す割込みコードを格納し、CPUから
の命令操作により読み出し可能な割込みソースレジスタ
を設け、割込み処理プログラム内で割込みソースレジス
タを読み出すことによって割込み要求を識別できるよう
にしたもので、これにより、レジスタバンクの物理的な
制約のために複数の割込み要求を同一のレジスタバンク
に割当てた場合にも、ベクタ割込み処理方式により動作
効率の非常に優れているレジスタバンク割込みを複数の
割込み要求に対して適用することができる。
As described above, the present invention stores the interrupt code indicating the interrupt source of the activated interrupt processing, provides the interrupt source register that can be read by the instruction operation from the CPU, and sets the interrupt source register in the interrupt processing program. The interrupt request can be identified by reading it. This allows the operation efficiency to be improved by the vector interrupt processing method even when multiple interrupt requests are assigned to the same register bank due to physical register bank restrictions. The very good register bank interrupts of can be applied to multiple interrupt requests.

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

第1図は本発明の一実施例のデータ処理装置のブロック
構成図、第2図はレジスタバンクの詳細図、第3図は本
実施例の割込み処理プログラムのフローチャート、第4
図は他の実施例のプログラムメモリ内のデータ格納図、
第5図は従来のデータ処理装置のブロック構成図であ
る。 10……優先順位制御回路(INTC)、11……割込みコード
発生回路、12……レジスタバンク選択制御回路、14……
割込みソースレジスタ、15−1,15−2,15−3,15−n……
割込みコード、16−1,16−2,16−3,16−n……バンク指
定レジスタ、17−1,17−2,17−3,17−n……割込み制御
信号、20……中央処理実行部(CPU)、21……プログラ
ムカウンタ(PC)、22……プログラム状態レジスタ(PS
W)、23……レジスタバンク指定レジスタ(RB)、24…
…データメモリ、25……スタックポインタ、26……アド
レスデコーダ、27……アドレスデコーダ、30……プログ
ラムメモリ、40−1,40−2,40−3,40−n……割込み要求
信号、41……割込み受付け信号、42……読み出し信号、
44……割込み応答信号、45……書込み信号、50……アド
レスバス、51……データバス、110……割込み制御部、1
11……割込みコード発生回路、112……レジスタバンク
選択制御回路、120……中央処理実行部CPU)、121……
プログラムカウンタ(PC)、122……プログラム状態レ
ジスタ(PSW)、123……レジスタバンク指定レジスタ
(RB)、124……データメモリ、125……スタックポイン
タ、130……プログラムメモリ、140−1,140−2,140−3
……割込み要求信号、141……割込み受付け信号、142,1
43……読み出し信号。
FIG. 1 is a block diagram of a data processing device according to an embodiment of the present invention, FIG. 2 is a detailed view of a register bank, FIG. 3 is a flow chart of an interrupt processing program of the present embodiment, and FIG.
The figure is a data storage diagram in the program memory of another embodiment,
FIG. 5 is a block diagram of a conventional data processing device. 10 …… Priority control circuit (INTC), 11 …… Interrupt code generation circuit, 12 …… Register bank selection control circuit, 14 ……
Interrupt source register, 15-1, 15-2, 15-3, 15-n ...
Interrupt code, 16-1, 16-2, 16-3, 16-n ... Bank designation register, 17-1, 17-2, 17-3, 17-n ... Interrupt control signal, 20 ... Central processing Execution unit (CPU), 21 …… Program counter (PC), 22 …… Program status register (PS
W), 23 ... Register bank designation register (RB), 24 ...
... Data memory, 25 ... Stack pointer, 26 ... Address decoder, 27 ... Address decoder, 30 ... Program memory, 40-1,40-2,40-3,40-n ... Interrupt request signal, 41 ...... Interrupt acceptance signal, 42 …… Read signal,
44 ... Interrupt response signal, 45 ... Write signal, 50 ... Address bus, 51 ... Data bus, 110 ... Interrupt control unit, 1
11 ... Interrupt code generation circuit, 112 ... Register bank selection control circuit, 120 ... Central processing unit CPU), 121 ...
Program counter (PC), 122 ... Program status register (PSW), 123 ... Register bank designation register (RB), 124 ... Data memory, 125 ... Stack pointer, 130 ... Program memory, 140-1,140-2,140 -3
...... Interrupt request signal, 141 …… Interrupt acceptance signal, 142,1
43 …… Readout signal.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】中央処理装置が処理に使用する複数の汎用
レジスタセットと、割り込み要求信号に対応した割り込
み受け付け信号に連動して所定の汎用レジスタセットに
切り替え割り込み処理プログラムを起動する割り込み制
御手段と、前記割り込み要求信号に対応した割り込みコ
ードを発生する手段と、前記割り込みコードを保持する
記憶手段と、前記割り込み処理プログラムにより前記記
憶手段から前記割り込みコードを読み出して割り込み要
求を識別し、当該識別した割り込み要求に応答した処理
プログラムに分岐する手段とを有することを特徴とする
データ処理装置。
1. A plurality of general-purpose register sets used by a central processing unit for processing, and interrupt control means for switching to a predetermined general-purpose register set in synchronization with an interrupt acceptance signal corresponding to an interrupt request signal and activating an interrupt processing program. , Means for generating an interrupt code corresponding to the interrupt request signal, storage means for holding the interrupt code, and the interrupt processing program to read the interrupt code from the storage means to identify the interrupt request and identify the interrupt request. And a means for branching to a processing program responding to an interrupt request.
JP63298517A 1988-11-25 1988-11-25 Data processing device Expired - Fee Related JPH0795277B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP63298517A JPH0795277B2 (en) 1988-11-25 1988-11-25 Data processing device
US07/441,146 US5155853A (en) 1988-11-25 1989-11-27 Data processor operating in a vector interrupt mode and register bank switching mode with selected bank for interrupt processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63298517A JPH0795277B2 (en) 1988-11-25 1988-11-25 Data processing device

Publications (2)

Publication Number Publication Date
JPH02144630A JPH02144630A (en) 1990-06-04
JPH0795277B2 true JPH0795277B2 (en) 1995-10-11

Family

ID=17860746

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63298517A Expired - Fee Related JPH0795277B2 (en) 1988-11-25 1988-11-25 Data processing device

Country Status (2)

Country Link
US (1) US5155853A (en)
JP (1) JPH0795277B2 (en)

Families Citing this family (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3372948B2 (en) * 1990-01-05 2003-02-04 サン・マイクロシステムズ・インコーポレーテッド High-speed active bus
US5613128A (en) * 1990-12-21 1997-03-18 Intel Corporation Programmable multi-processor interrupt controller system with a processor integrated local interrupt controller
JPH04242433A (en) * 1991-01-17 1992-08-31 Nec Corp Microprocessor
FR2680591B1 (en) * 1991-08-22 1996-01-26 Telemecanique PROGRAMMABLE INTERRUPTION CONTROLLER, INTERRUPTIVE SYSTEM, AND INTERRUPTION CONTROL METHOD.
US5557766A (en) * 1991-10-21 1996-09-17 Kabushiki Kaisha Toshiba High-speed processor for handling multiple interrupts utilizing an exclusive-use bus and current and previous bank pointers to specify a return bank
US5404457A (en) * 1992-02-14 1995-04-04 Advanced Micro Devices, Inc. Apparatus for managing system interrupt operations in a computing system
US5640582A (en) * 1992-05-21 1997-06-17 Intel Corporation Register stacking in a computer system
US5596755A (en) * 1992-11-03 1997-01-21 Microsoft Corporation Mechanism for using common code to handle hardware interrupts in multiple processor modes
US5530875A (en) * 1993-04-29 1996-06-25 Fujitsu Limited Grouping of interrupt sources for efficiency on the fly
US5535397A (en) * 1993-06-30 1996-07-09 Intel Corporation Method and apparatus for providing a context switch in response to an interrupt in a computer process
GB2286265B (en) * 1994-01-26 1998-02-18 Advanced Risc Mach Ltd selectable processing registers
JP2734992B2 (en) * 1994-07-25 1998-04-02 日本電気株式会社 Information processing device
JPH0877021A (en) * 1994-09-01 1996-03-22 Fujitsu Ltd Interrupt processing apparatus and method
JP3672634B2 (en) * 1994-09-09 2005-07-20 株式会社ルネサステクノロジ Data processing device
JPH08305585A (en) * 1995-05-11 1996-11-22 Matsushita Electric Ind Co Ltd Interrupt control device
US5701493A (en) * 1995-08-03 1997-12-23 Advanced Risc Machines Limited Exception handling method and apparatus in data processing systems
US5606703A (en) * 1995-12-06 1997-02-25 International Business Machines Corporation Interrupt protocol system and method using priority-arranged queues of interrupt status block control data structures
US5734910A (en) * 1995-12-22 1998-03-31 International Business Machines Corporation Integrating multi-modal synchronous interrupt handlers for computer system
JPH10171665A (en) * 1996-12-09 1998-06-26 Toshiba Corp Jump code generator, interrupt program selection device, interrupt program selection method, and computer
US6078545A (en) * 1996-12-26 2000-06-20 Oki Electric Industry Co., Ltd. Data transfer circuit
US5901309A (en) * 1997-10-07 1999-05-04 Telefonaktiebolaget Lm Ericsson (Publ) Method for improved interrupt handling within a microprocessor
US5987495A (en) * 1997-11-07 1999-11-16 International Business Machines Corporation Method and apparatus for fully restoring a program context following an interrupt
US6339808B1 (en) * 1999-01-04 2002-01-15 Advanced Micro Devices, Inc. Address space conversion to retain software compatibility in new architectures
US6449675B1 (en) * 1999-06-29 2002-09-10 Motorola, Inc. Multifield register having a selection field for selecting a source of an information field
EP1124185A1 (en) * 2000-02-09 2001-08-16 Siemens Aktiengesellschaft Interface system and method for processing interrupts to a processor
US6601122B1 (en) * 2000-04-17 2003-07-29 International Business Machines Corporation Exceptions and interrupts with dynamic priority and vector routing
US7552261B2 (en) * 2001-10-12 2009-06-23 Mips Technologies, Inc. Configurable prioritization of core generated interrupts
US7487339B2 (en) * 2001-10-12 2009-02-03 Mips Technologies, Inc. Method and apparatus for binding shadow registers to vectored interrupts
US20030135720A1 (en) * 2002-01-14 2003-07-17 International Business Machines Corporation Method and system using hardware assistance for instruction tracing with secondary set of interruption resources
US7117284B2 (en) * 2002-11-18 2006-10-03 Arm Limited Vectored interrupt control within a system having a secure domain and a non-secure domain
TW200511111A (en) * 2003-07-30 2005-03-16 Koninkl Philips Electronics Nv Microcontroller with an interrupt structure having programmable priority levels with each priority level associated with a different register set
US8825926B2 (en) * 2009-04-13 2014-09-02 Microchip Technology Incorporated Processor with assignable general purpose register set
US10802754B2 (en) * 2018-03-12 2020-10-13 Micron Technology, Inc. Hardware-based power management integrated circuit register file write protection

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS53121439A (en) * 1977-03-31 1978-10-23 Toshiba Corp Interrupt processor
JPS5935451B2 (en) * 1977-12-23 1984-08-29 富士通株式会社 General purpose register access method
JPS5592950A (en) * 1978-12-30 1980-07-14 Ricoh Co Ltd Interruption control system
US4631363A (en) * 1981-06-01 1986-12-23 At&T Bell Laboratories Method and apparatus for incremental load simulation
US4769768A (en) * 1983-09-22 1988-09-06 Digital Equipment Corporation Method and apparatus for requesting service of interrupts by selected number of processors
US4949333A (en) * 1987-04-02 1990-08-14 Advanced Micro Devices, Inc. Enhanced universal asynchronous receiver-transmitter

Also Published As

Publication number Publication date
US5155853A (en) 1992-10-13
JPH02144630A (en) 1990-06-04

Similar Documents

Publication Publication Date Title
JPH0795277B2 (en) Data processing device
KR20130016246A (en) Mapping between registers used by multiple instruction sets
JP2008047145A (en) Dual thread processor
WO2006082989A2 (en) System and method of interrupt handling
JP3970609B2 (en) Processor system
JP4985452B2 (en) Vector processing equipment
JP3980901B2 (en) Digital signal processor
JPH056281A (en) Information processor
JP3644892B2 (en) Data processing apparatus for executing a plurality of instruction sets
JP2826309B2 (en) Information processing device
JP2876629B2 (en) Data processing device
JPH09128248A (en) Microprocessor
JP3057732B2 (en) Information processing device
JP3139310B2 (en) Digital signal processor
JPH0756633B2 (en) Task switching method
JPH03149621A (en) Microprocessor
JPS636637A (en) Memory switching device
JP2985244B2 (en) Information processing device
JP3651099B2 (en) Programmable controller
JPH02183342A (en) Interruption controller
JPS61133440A (en) Data processing unit
JPS63104144A (en) High-speed context switching device
JPH04256027A (en) Microcomputer
JPS61115137A (en) Emulator
JPH02189632A (en) Information processor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees