JP3058524B2 - Program control unit - Google Patents

Program control unit

Info

Publication number
JP3058524B2
JP3058524B2 JP4262504A JP26250492A JP3058524B2 JP 3058524 B2 JP3058524 B2 JP 3058524B2 JP 4262504 A JP4262504 A JP 4262504A JP 26250492 A JP26250492 A JP 26250492A JP 3058524 B2 JP3058524 B2 JP 3058524B2
Authority
JP
Japan
Prior art keywords
program
interrupt
bank
register
address
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
JP4262504A
Other languages
Japanese (ja)
Other versions
JPH06110705A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co 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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP4262504A priority Critical patent/JP3058524B2/en
Publication of JPH06110705A publication Critical patent/JPH06110705A/en
Application granted granted Critical
Publication of JP3058524B2 publication Critical patent/JP3058524B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、割り込みおよび割り込
み復帰を処理するプログラム制御装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program controller for processing an interrupt and a return from an interrupt.

【0002】[0002]

【従来の技術】従来のプログラム処理装置は、内部構造
の小型化や処理の高速化を図るため、プログラムアドレ
スを2分割して上位側ビットと下位側ビットとに分けて
管理する、いわゆるバンク方式を採用したものが多かっ
た。例えばプログラムアドレスが24ビットの場合、プ
ログラムアドレスの上位側8ビットをコードバンクレジ
スタに、下位側16ビットをプログラムカウンタにそれ
ぞれ格納する。このようにすることで、同一バンク内の
サブルーチンコールでは下位側のプログラムアドレスを
退避するだけでよいので、実行の高速化や退避領域の縮
小化を図ることができる。
2. Description of the Related Art In a conventional program processing device, a so-called bank system is used in which a program address is divided into two and managed in upper bits and lower bits in order to reduce the internal structure and speed up processing. In many cases, was adopted. For example, when the program address is 24 bits, the upper 8 bits of the program address are stored in the code bank register and the lower 16 bits are stored in the program counter. By doing so, it is only necessary to save the lower program address in the subroutine call in the same bank, so that the speed of execution and the saving area can be reduced.

【0003】図4は従来のプログラム制御装置における
割り込み時のスタックの状態の説明図で、(a)は割り
込み発生前のスタックの状態、(b)は割り込み発生後
のスタックの状態をそれぞれ示している。割り込み発生
時には、戻り先アドレスの全ビット24ビット(retCBR
, retPC)と戻り先でのプログラム状態語16ビット
(retPSW)とがスタックに退避される。従って、従来の
プログラム制御装置では、割り込みが発生すると3ワー
ドの情報をスタックに退避することになる。
FIGS. 4A and 4B are explanatory diagrams of a state of a stack at the time of an interrupt in a conventional program controller. FIG. 4A shows a state of a stack before an interrupt occurs, and FIG. 4B shows a state of a stack after an interrupt occurs. I have. When an interrupt occurs, all 24 bits of the return address (retCBR
, retPC) and the 16-bit program status word (retPSW) at the return destination are saved on the stack. Therefore, in the conventional program control device, when an interrupt occurs, three words of information are saved on the stack.

【0004】また従来のプログラム処理装置は、割込み
時の分岐先を決める方式として、割り込みの種類に応じ
て割り込みプログラムの開始アドレスを切り換える、い
わゆる割り込みテーブル方式を採用したものが一般的で
あった。この割り込みテーブル方式では、割り込みの種
類に応じて割り込みプログラムを用意し、その開始アド
レスをテーブルに登録するだけで、割り込みの種類判定
をプログラムで行なう必要がないという利点がある。
A conventional program processing apparatus generally employs a so-called interrupt table system in which the start address of an interrupt program is switched according to the type of interrupt as a system for determining a branch destination at the time of an interrupt. This interrupt table method has the advantage that it is only necessary to prepare an interrupt program according to the type of interrupt and to register its start address in the table, and it is not necessary to determine the type of interrupt by the program.

【0005】図5は従来のプログラム制御装置における
割り込みテーブルの内容の説明図で、割り込みテーブル
は、割り込みの種類毎に、8ビットのコードバンク番号
と16ビットのバンク内アドレスとからなる24ビット
の割り込みプログラムの開始アドレスを格納している。
このような従来のプログラム制御装置では、割り込みプ
ログラムはどのバンクに配置してもよいし、バンク内の
どこに配置してもよいという自由度がある反面、割り込
みテーブルには割り込み毎に割り込み開始アドレスを用
意しておかなければならないため、割り込みの種類が増
えるとテーブルの規模が大きくなってしまう。
FIG. 5 is a diagram for explaining the contents of an interrupt table in a conventional program control device. The interrupt table is a 24-bit code bank number consisting of an 8-bit code bank number and a 16-bit in-bank address for each type of interrupt. Stores the start address of the interrupt program.
In such a conventional program control device, the interrupt program may be arranged in any bank and may be arranged anywhere in the bank, but the interrupt table contains an interrupt start address for each interrupt. Because the table must be prepared, the number of types of interrupts increases the size of the table.

【0006】[0006]

【発明が解決しようとする課題】しかしながら上記従来
のプログラム処理装置では、割り込みはプログラムがど
のバンクで実行されているかにかかわらず発生する可能
性があるため、元のプログラムに戻るためにはプログラ
ムアドレスの全ビットを退避させる必要があり、割り込
み時に退避させるデータ量が増加することから、バンク
方式によりプログラムアドレスを分割しているにもかか
わらず割り込み応答速度を高速化できないという問題点
があった。
However, in the above-mentioned conventional program processing apparatus, since an interrupt may occur regardless of which bank the program is executed in, the program address is required to return to the original program. All the bits must be saved, and the amount of data saved at the time of an interrupt increases. Therefore, there is a problem that the interrupt response speed cannot be increased even though the program address is divided by the bank method.

【0007】また上記従来のプログラム処理装置では、
割り込みプログラムをどのバンクにも配置可能にするた
めには、割り込みテーブルにプログラムアドレスの全ビ
ットを用意する必要があるため、割り込みの種類が増え
ると割り込みテーブルの規模が大きくなるという問題点
があった。また、実行中のプログラムと割り込みプログ
ラムとが同一バンクにあっても、バンクを指定し直すと
いう無駄があり、そのため実行速度が低下するという問
題点があった。
In the above-mentioned conventional program processing device,
In order to be able to place an interrupt program in any bank, it is necessary to prepare all bits of the program address in the interrupt table, so there was a problem that the scale of the interrupt table increased as the types of interrupts increased . Further, even if the program being executed and the interrupt program are in the same bank, there is a waste in redesignating the bank, and there is a problem that the execution speed is reduced.

【0008】すなわち上記従来のプログラム処理装置で
は、同一バンク内でのサブルーチンコールなどの処理に
関してはバンクがない場合と同様に処理できるが、割り
込み時にはプログラムアドレスの全ビットを退避および
復帰させる必要があるため、処理速度が低下したりプロ
グラムアドレスの退避領域が増大する。本発明はかかる
事情に鑑みて成されたものであり、割り込み処理および
割り込みからの復帰処理を高速化できるプログラム制御
装置を提供することを目的とする。
That is, in the above-described conventional program processing apparatus, processing such as a subroutine call in the same bank can be performed in the same manner as when there is no bank, but it is necessary to save and restore all bits of the program address at the time of interruption. Therefore, the processing speed is reduced and the area for saving the program address is increased. The present invention has been made in view of such circumstances, and has as its object to provide a program control device that can speed up interrupt processing and return processing from interrupts.

【0009】[0009]

【課題を解決するための手段】請求項1の発明は、メモ
リに上位ビットと下位ビットとからなるプログラムアド
レスを出力するプログラム制御装置であって、割込処理
を行う際のバンク番号を格納している第1バンクレジス
タと、通常処理を行う際のバンク番号を格納している第
2バンクレジスタと、通常処理時には、第2バンクレジ
スタに格納されているバンク番号を上位ビットとして出
力し、割込発生時には第1バンクレジスタに格納されて
いるバンク番号を上位ビットとして出力するセレクタ
と、プログラムアドレスの下位ビットを出力するプログ
ラムカウンタと、割込発生時に、戻りアドレスとしてプ
ログラムカウンタにより出力される下位ビットのみをス
タックに退避する退避手段とを備える構成とする。
Means for Solving the Problems The invention of claim 1 is a memorandum.
Program address consisting of upper and lower bits
A program controller that outputs an interrupt
Bank register that stores the bank number when performing
And the bank number for normal processing.
The two bank register and the second bank register during normal processing
The bank number stored in the
Is stored in the first bank register when an interrupt occurs.
Selector that outputs the bank number of the
And the program that outputs the lower bits of the program address
Program counter and a return address when an interrupt occurs.
Only the lower bits output by the program counter are scanned.
A retracting means for retracting to the tack .

【0010】請求項2の発明は、プログラム制御装置
は、割込状態を示す情報が登録される割込状態レジスタ
を有しており、前記メモリは、複数の割込プログラム
と、割込状態レジスタに登録されている値に基づいて、
複数の割込プログラムのうち、何れに分岐すべきかを決
定する割込処理プログラムとが配されており、第1バン
クレジスタは、割込処理プログラムが配されている前記
メモリ上のバンク番号を格納しており、前記プログラム
カウンタは、割込発生時において、プログラムカウンタ
により出力される下位ビットが退避手段により退避され
た後、割込処理プログラムの先頭領域を示すプログラム
アドレスの下位ビットが設定される構成とする。
According to a second aspect of the present invention, there is provided a program control device.
Is the interrupt status register in which information indicating the interrupt status is registered
And the memory has a plurality of interrupt programs.
And the value registered in the interrupt status register,
Decide which of the multiple interrupt programs to branch to
And an interrupt processing program for
Register is where the interrupt processing program is located.
Stores the bank number in the memory, the program
The counter is a program counter when an interrupt occurs.
The lower-order bit output by is saved by the saving means.
Program that indicates the start area of the interrupt processing program
The configuration is such that the lower bits of the address are set .

【0011】[0011]

【作用】請求項1の発明において、第1バンクレジスタ
は、割込処理を行う際のバンク番号を格納している。第
2バンクレジスタは、通常処理を行う際のバンク番号を
格納している。セレクタは、通常処理時には、第2バン
クレジスタに格納されているバンク番号を上位ビットと
して出力し、割込発生時には第1バンクレジスタに格納
されているバンク番号を上位ビットとして出力する。プ
ログラムカウンタは、プログラムアドレスの下位ビット
を出力する。退避手段は、割込発生時に、戻りアドレス
としてプログラムカウンタにより出力される下位ビット
のみをスタックに退避する。
According to the first aspect of the present invention, the first bank register is provided.
Stores the bank number when performing the interrupt processing. No.
The two-bank register indicates the bank number for normal processing.
Stored. The selector selects the second bank during normal processing.
The bank number stored in the
And outputs it, and stores it in the first bank register when an interrupt occurs
The output bank number is output as the upper bit. Step
The program counter uses the lower bits of the program address.
Is output. The evacuation means returns the return address when an interrupt occurs.
Lower bits output by the program counter as
Only save to the stack.

【0012】請求項2の発明においては、プログラム制
御装置は、割込状態を示す情報が登録される割込状態レ
ジスタを有しており、前記メモリは、複数の割込プログ
ラムと、割込状態レジスタに登録されている値に基づい
て、複数の割込プログラムのうち、何れに分岐すべきか
を決定する割込処理プログラムとが配されており、第1
バンクレジスタは、割込処理プログラムが配されている
前記メモリ上のバンク番号を格納しており、前記プログ
ラムカウンタは、割込発生時において、プログラムカウ
ンタにより出力される下位ビットが退避手段により退避
された後、割込処理プログラムの先頭領域を示すプログ
ラムアドレスの下位ビットが設定される。
According to the second aspect of the present invention, the program system
The control device has an interrupt status register in which information indicating the interrupt status is registered.
A plurality of interrupt programs.
RAM and the value registered in the interrupt status register.
To which of the multiple interrupt programs to branch
And an interrupt processing program for determining
Bank registers are provided with interrupt processing programs
The bank number on the memory is stored, and the program
When an interrupt occurs, the ram counter
The lower bits output by the counter are saved by the saving means.
Program that indicates the start area of the interrupt processing program
The lower bit of the RAM address is set.

【0013】[0013]

【実施例】以下、本発明の実施例を図面を用いて詳細に
説明する。図1は本発明の一実施例におけるプログラム
処理装置の構成図で、このプログラム処理装置は、第1
のコードバンクレジスタ1と、第2のコードバンクレジ
スタ2と、セレクタ3と、プログラムカウンタ4と、R
OM5と、汎用レジスタ6と、プログラム状態語7と、
演算器8と、オペランドアドレスレジスタ9と、RAM
10と、割り込み受理制御部11と、割り込み状態レジ
スタ12と、全体制御部13と、内部データバス14と
を備えている。第1のコードバンクレジスタ1は、プロ
グラムアドレス24ビットの上位8ビットを保持し、そ
の内容をセレクタ3の一方の入力端に常に供給すると共
に、全体制御部13からの制御信号に基づいて内部デー
タバス14を介してデータの読み出しおよび書き込みを
行なう。第2のコードバンクレジスタ2は、プログラム
アドレス24ビットの上位8ビットを保持し、その内容
をセレクタ3の他方の入力端に常に供給すると共に、全
体制御部13からの制御信号に基づいて内部データバス
14を介してデータの読み出しおよび書き込みを行な
う。セレクタ3は、全体制御部13からの制御信号に基
づいて、第1のコードバンクレジスタ1からのデータと
第2のコードバンクレジスタ2からのデータとのうちの
いずれか一方を選択してROM5に供給する。プログラ
ムカウンタ4は、プログラムアドレス24ビットの下位
16ビットを保持し、その内容をROM5に常に供給す
る。ROM5は、命令が格納されており、セレクタ3お
よびプログラムカウンタ4からの24ビットのプログラ
ムアドレスにより命令が読み出される。汎用レジスタ6
は、プログラムの実行に必要なデータおよびアドレスが
格納される。プログラム状態語7は、演算器8による演
算結果のフラグや割り込み許可フラグなどが格納され
る。オペランドアドレスレジスタ9は、アクセスするデ
ータのアドレスが格納される。RAM10は、データが
格納されており、オペランドアドレスレジスタ9の内容
に基づいてデータの読み出しおよび書き込みが行われ
る。割り込み受理制御部11は、発生した割り込みの受
付を行ない、割り込み状態レジスタ12に登録する。全
体制御部13は、プログラム制御装置全体を制御する。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a configuration diagram of a program processing device according to an embodiment of the present invention.
, A second code bank register 2, a selector 3, a program counter 4,
OM5, general-purpose register 6, program state word 7,
Arithmetic unit 8, operand address register 9, RAM
10, an interrupt acceptance control unit 11, an interrupt status register 12, an overall control unit 13, and an internal data bus 14. The first code bank register 1 holds the upper 8 bits of the program address 24 bits, constantly supplies the contents to one input terminal of the selector 3, and stores the internal data based on a control signal from the overall control unit 13. Reading and writing of data are performed via the bus 14. The second code bank register 2 holds the upper 8 bits of the program address 24 bits, constantly supplies the contents to the other input terminal of the selector 3, and stores the internal data based on a control signal from the overall control unit 13. Reading and writing of data are performed via the bus 14. The selector 3 selects one of the data from the first code bank register 1 and the data from the second code bank register 2 based on the control signal from the overall control unit 13 and stores the selected data in the ROM 5. Supply. The program counter 4 holds the lower 16 bits of the program address 24 bits and always supplies the contents to the ROM 5. The ROM 5 stores an instruction, and the instruction is read by a 24-bit program address from the selector 3 and the program counter 4. General purpose register 6
Stores data and addresses necessary for executing the program. The program status word 7 stores a flag of a calculation result by the calculator 8 and an interrupt permission flag. Operand address register 9 stores the address of the data to be accessed. The RAM 10 stores data, and reads and writes data based on the contents of the operand address register 9. The interrupt acceptance control unit 11 accepts the generated interrupt and registers it in the interrupt status register 12. The overall control unit 13 controls the entire program control device.

【0014】図2は割り込み時のスタックの状態の説明
図で、(a)は割り込み発生前のスタックの状態、
(b)は割り込み発生後のスタックの状態をそれぞれ示
している。割り込み発生時には、戻り先のプログラムア
ドレスの下位16ビット(retPC)と戻り先でのプログ
ラム状態語16ビット(retPSW)とがスタックに退避さ
れる。
FIG. 2 is an explanatory diagram of the state of the stack at the time of the interrupt. FIG.
(B) shows the state of the stack after the occurrence of the interrupt. When an interrupt occurs, the lower 16 bits (retPC) of the return destination program address and the 16-bit program status word (retPSW) at the return destination are saved on the stack.

【0015】図3は割り込み処理プログラムの配置の説
明図で、割り込み処理プログラムは、バンク内の固定番
地に配置される。割り込みが発生すると固定番地にある
割り込み処理プログラムに分岐するので、割り込みテー
ブルは不要である。この割り込み処理プログラムでは、
割り込み状態レジスタ12の内容を読み出してどの割り
込みが要求されているかを判断し、判断結果に応じて割
り込みプログラムA,B,C のいずれかに分岐する。
FIG. 3 is an explanatory view of the arrangement of the interrupt processing program. The interrupt processing program is arranged at a fixed address in the bank. When an interrupt occurs, the process branches to an interrupt processing program at a fixed address, so that an interrupt table is unnecessary. In this interrupt processing program,
The contents of the interrupt status register 12 are read to determine which interrupt is requested, and the process branches to one of the interrupt programs A, B, and C according to the determination result.

【0016】次に動作を説明する。いま、割り込みが発
生する前の状態であり、第1のコードバンクレジスタ1
がセレクタ3によって選ばれており、第2のコードバン
クレジスタ2がクリアされているとする。従って、24
ビットのプログラムアドレスは第1のコードバンクレジ
スタ1の上位側8ビットとプログラムカウンタ4の下位
側16ビットとによって作られる。また、スタックの状
態は図2(a)のようであり、プログラム状態語7の割
り込み許可フラグがセットされている。
Next, the operation will be described. Now, the state before the interrupt is generated, the first code bank register 1
Is selected by the selector 3, and the second code bank register 2 is cleared. Therefore, 24
The bit program address is formed by the upper 8 bits of the first code bank register 1 and the lower 16 bits of the program counter 4. The state of the stack is as shown in FIG. 2A, and the interrupt permission flag of the program state word 7 is set.

【0017】この状態で割り込みが発生すると、プログ
ラムカウンタ4の内容とプログラム状態語7の内容とが
それぞれスタックに退避される。そして、セレクタ3が
全体制御部13からの制御信号に基づいて第2のコード
バンクレジスタ2を選択すると共に、プログラムカウン
タ4にハードウェアで決まった固定アドレスが格納され
る。固定アドレスは特に制限はなく、ハードウェアが作
りやすい値を選ぶことが可能である。割り込みが発生す
ると、プログラムアドレスは、第2のコードバンクレジ
スタ2とプログラムカウンタ4とによって作られるよう
になる。割り込み前の第2のコードバンクレジスタ2の
内容はゼロなので、割り込みが発生するとバンク0の固
定アドレスに分岐することになる。分岐先には割り込み
処理プログラムがあり、割り込み処理プログラムでは割
り込み状態レジスタ12の内容を読み出して割り込みの
種類を判定し、割り込みの種類に応じたプログラムに分
岐する。また、割り込みが発生すると、プログラム状態
語7の割り込み許可フラグがクリアされ、プログラムに
よって許可フラグをセットするまでは、次の割り込みを
受け付けない状態になる。割り込みのプログラムを実行
中に他の割り込みを受け付ける多重割り込みは、割り込
み処理プログラムにおいてプログラム状態語7中の割り
込み許可フラグをセットすることにより可能となる。た
だし、再び割り込みが発生すると、セレクタ3が全体制
御部13からの制御信号により1回目の割り込みが発生
する前の状態に戻り、第1のコードバンクレジスタ1を
選択する。従って、多重割り込みを行なう前には、現在
使用中のコードバンクレジスタと反対側のコードバンク
レジスタの内容をプログラムにより退避させた後、割り
込み許可フラグをセットする。
When an interrupt occurs in this state, the contents of the program counter 4 and the contents of the program state word 7 are respectively saved on the stack. Then, the selector 3 selects the second code bank register 2 based on a control signal from the overall control unit 13, and a fixed address determined by hardware is stored in the program counter 4. The fixed address is not particularly limited, and a value that can be easily created by hardware can be selected. When an interrupt occurs, a program address is created by the second code bank register 2 and the program counter 4. Since the contents of the second code bank register 2 before the interruption are zero, when the interruption occurs, the operation branches to the fixed address of the bank 0. There is an interrupt processing program at the branch destination. The interrupt processing program reads the contents of the interrupt status register 12, determines the type of interrupt, and branches to a program corresponding to the type of interrupt. When an interrupt occurs, the interrupt enable flag of the program state word 7 is cleared, and the next interrupt is not accepted until the enable flag is set by the program. Multiple interrupts that accept other interrupts during execution of an interrupt program can be made by setting an interrupt enable flag in the program status word 7 in the interrupt processing program. However, when an interrupt occurs again, the selector 3 returns to the state before the first interrupt occurs according to the control signal from the overall control unit 13, and selects the first code bank register 1. Therefore, before performing the multiple interrupts, the contents of the code bank register opposite to the currently used code bank register are saved by a program, and then the interrupt enable flag is set.

【0018】割り込みからの復帰は、割り込み時と逆の
動作である。スタックに退避されたプログラム状態語7
の内容とプログラムカウンタ4の内容とをそれぞれのレ
ジスタに復帰させ、セレクタ3が全体制御部13からの
制御信号により元の第1のコードバンクレジスタ1を選
択する。なお上記実施例では、第2のコードバンクレジ
スタ2の初期値をゼロとしたが、この値は何でもよく、
割り込み処理プログラムを配置するバンクは任意に設定
可能である。
Returning from an interrupt is the reverse of the operation at the time of the interrupt. Program status word 7 saved on the stack
And the contents of the program counter 4 are returned to the respective registers, and the selector 3 selects the original first code bank register 1 according to the control signal from the overall control unit 13. In the above embodiment, the initial value of the second code bank register 2 is set to zero, but this value may be anything.
The bank in which the interrupt processing program is arranged can be set arbitrarily.

【0019】また上記実施例では、コードバンクレジス
タを2本としたが、本数は制限されるものではない。
In the above embodiment, the number of code bank registers is two, but the number is not limited.

【0020】[0020]

【発明の効果】以上説明したように本発明によれば、
込処理を行う際のバンク番号を格納している第1バンク
レジスタと、通常処理を行う際のバンク番号を格納して
いる第2バンクレジスタと、通常処理時には、第2バン
クレジスタに格納されているバンク番号を上位ビットと
して出力し、割込発生時には第1バンクレジスタに格納
されているバンク番号を上位ビットとして出力するセレ
クタと、プログラムアドレスの下位ビットを出力するプ
ログラムカウンタと、割込発生時に、戻りアドレスとし
てプログラムカウンタにより出力される下位ビットのみ
をスタックに退避する退避手段とを備える構成としたの
で、割り込みが発生した場合に退避させるデータがプロ
グラムカウンタの内容だけであり、しかも割り込み時の
分岐先が固定されていることから、退避資源が少なく、
割り込み処理および割り込みからの復帰処理を良好に高
速化できる。
According to the present invention as described above, according to the present invention, split
First bank that stores the bank number when performing the write process
Store the register and the bank number for normal processing
The second bank register and the second bank register during normal processing.
The bank number stored in the
And outputs it, and stores it in the first bank register when an interrupt occurs
Select the bank number that outputs the bank number
Output the lower bits of the program address.
Program counter and the return address when an interrupt occurs.
Only the lower bits output by the program counter
And a save means for saving the data on the stack. When an interrupt occurs, the only data to be saved is the contents of the program counter, and the branch destination at the time of the interrupt is fixed. Less,
The speed of the interrupt processing and the return processing from the interrupt can be favorably increased.

【0021】また、割り込み時に、第1バンクレジスタ
は、割込処理プログラムが配されている前記メモリ上の
バンク番号を格納しており、前記プログラムカウンタ
は、割込発生時において、プログラムカウンタにより出
力される下位ビットが退避手段により退避された後、割
込処理プログラムの先頭領域を示すプログラムアドレス
の下位ビットが設定されるようにすれば、割り込み発生
前にセットする値によって割り込み処理プログラムを配
置する位置を設定できるので、割り込みテーブル方式と
同等の効果を簡単なハードウェアにより得ることができ
る。
At the time of interruption, the first bank register
On the memory where the interrupt processing program is located
A bank number is stored in the program counter.
Is output by the program counter when an interrupt occurs.
After the lower bits to be input are saved by the saver,
Address indicating the start area of the embedded processing program
If the lower bits are set, the position where the interrupt processing program is arranged can be set by the value set before the occurrence of the interrupt, so that the same effect as that of the interrupt table method can be obtained by simple hardware.

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

【図1】本発明の一実施例におけるプログラム処理装置
の構成図である。
FIG. 1 is a configuration diagram of a program processing device according to an embodiment of the present invention.

【図2】割り込み時のスタックの状態の説明図である。FIG. 2 is an explanatory diagram of a state of a stack at the time of interruption.

【図3】割り込み処理プログラムの配置の説明図であ
る。
FIG. 3 is an explanatory diagram of an arrangement of an interrupt processing program.

【図4】従来のプログラム制御装置における割り込み時
のスタックの状態の説明図である。
FIG. 4 is an explanatory diagram of a state of a stack at the time of interruption in a conventional program control device.

【図5】従来のプログラム制御装置における割り込みテ
ーブルの内容の説明図である。
FIG. 5 is an explanatory diagram of the contents of an interrupt table in a conventional program control device.

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

1 第1のコードバンクレジスタ 2 第2のコードバンクレジスタ 3 セレクタ 4 プログラムカウンタ 1 first code bank register 2 second code bank register 3 selector 4 program counter

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平3−53337(JP,A) 特開 昭60−57440(JP,A) 特開 昭62−135937(JP,A) 特開 平4−195562(JP,A) 特開 平2−39239(JP,A) 特開 昭62−274434(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 9/46 G06F 13/24 G06F 9/40 G06F 9/42 G06F 9/36 G06F 12/06 G06F 12/02 ──────────────────────────────────────────────────続 き Continuation of front page (56) References JP-A-3-53337 (JP, A) JP-A-60-57440 (JP, A) JP-A-62-135937 (JP, A) JP-A-4- 195562 (JP, A) JP-A-2-39239 (JP, A) JP-A-62-274434 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 9/46 G06F 13 / 24 G06F 9/40 G06F 9/42 G06F 9/36 G06F 12/06 G06F 12/02

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 メモリに上位ビットと下位ビットとから
なるプログラムアドレスを出力するプログラム制御装置
であって、 割込処理を行う際のバンク番号を格納している第1バン
クレジスタと、 通常処理を行う際のバンク番号を格納している第2バン
クレジスタと、 通常処理時には、第2バンクレジスタに格納されている
バンク番号を上位ビットとして出力し、割込発生時には
第1バンクレジスタに格納されているバンク番号を上位
ビットとして出力するセレクタと、 プログラムアドレスの下位ビットを出力するプログラム
カウンタと、 割込発生時に、戻りアドレスとしてプログラムカウンタ
により出力される下位ビットのみをスタックに退避する
退避手段と を備えることを特徴とするプログラム制御装
置。
1. A memory comprising: an upper bit and a lower bit;
Control device that outputs different program addresses
And the first bank storing the bank number for performing the interrupt processing.
Register and a second bank storing a bank number for performing normal processing.
And during normal processing, stored in the second bank register.
Outputs the bank number as upper bits, and when an interrupt occurs,
Upper bank number stored in the first bank register
Selector that outputs as bits and program that outputs lower bits of program address
Counter and program counter as return address when an interrupt occurs
Saves only the lower bits output by
A program control device, comprising: a retreat unit .
【請求項2】 プログラム制御装置は、割込状態を示す
情報が登録される割込状態レジスタを有しており、 前記メモリは、複数の割込プログラムと、 割込状態レジスタに登録されている値に基づいて、複数
の割込プログラムのうち、何れに分岐すべきかを決定す
る割込処理プログラムとが配されており、 第1バンクレジスタは、 割込処理プログラムが配されている前記メモリ上のバン
ク番号を格納しており、 前記プログラムカウンタは、 割込発生時において、プログラムカウンタにより出力さ
れる下位ビットが退避手段により退避された後、割込処
理プログラムの先頭領域を示すプログラムアドレスの下
位ビットが設定される ことを特徴とする請求項1記載の
プログラム制御装置。
2. The program control device indicates an interrupt state.
The memory has an interrupt status register in which information is registered, and the memory stores a plurality of interrupt programs based on a plurality of interrupt programs and values registered in the interrupt status register.
Which interrupt program to branch to
And a first bank register is provided in the memory on which the interrupt processing program is arranged.
The program counter is output by the program counter when an interrupt occurs.
After the lower bits to be saved are saved by the saver,
Below the program address indicating the start area of the logical program
2. The program control device according to claim 1, wherein an order bit is set .
【請求項3】(3) 複数の割込プログラムと、複数の割込プMultiple interrupt programs and multiple interrupt programs
ログラムのうち、何れに分岐すべきかを決定する割込処Interrupt processing to determine which of the programs to branch to
理プログラムとが配されたメモリに上位ビットと下位ビUpper and lower bits in the memory where the
ットとからなるプログラムアドレスを出力するプログラProgram that outputs a program address consisting of
ム制御装置であって、System control device, 割込処理プログラムが配されている前記メモリ上のバンThe van on the memory where the interrupt processing program is located
ク番号を格納している第1バンクレジスタと、A first bank register that stores a bank number; 通常処理を行う際のバンク番号を格納している第2バンThe second bank storing the bank number for performing normal processing
クレジスタと、Register, 通常処理時には、第2バンクレジスタに格納されているDuring normal processing, it is stored in the second bank register.
バンク番号を上位ビットとして出力し、割込発生時にはOutputs the bank number as upper bits, and when an interrupt occurs,
第1バンクレジスタに格納されているバンク番号を上位Upper bank number stored in the first bank register
ビットとして出力するセレクタと、A selector for outputting as a bit, プログラムアドレスの下位ビットを出力しているプログThe program that outputs the lower bits of the program address
ラムカウンタと、A ram counter, 割込発生時に、戻りアドレスとしてプログラムカウンタWhen an interrupt occurs, the program counter is used as the return address.
により出力される下位ビットのみをスタックに退避するSaves only the lower bits output by
退避手段とを備え、With evacuation means, 前記プログラムカウンタは、The program counter is: 割込発生時において、プログラムカウンタにより出力さWhen an interrupt occurs, the
れる下位ビットが退避手段により退避された後、割込処After the lower bits to be saved are saved by the saver,
理プログラムの先頭領域を示すプログラムアドレスの下Below the program address indicating the start area of the logical program
位ビットが設定されるBit is set を備えることを特徴とするプログA program characterized by comprising
ラム制御装置。Ram control device.
JP4262504A 1992-09-30 1992-09-30 Program control unit Expired - Fee Related JP3058524B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4262504A JP3058524B2 (en) 1992-09-30 1992-09-30 Program control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4262504A JP3058524B2 (en) 1992-09-30 1992-09-30 Program control unit

Publications (2)

Publication Number Publication Date
JPH06110705A JPH06110705A (en) 1994-04-22
JP3058524B2 true JP3058524B2 (en) 2000-07-04

Family

ID=17376726

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4262504A Expired - Fee Related JP3058524B2 (en) 1992-09-30 1992-09-30 Program control unit

Country Status (1)

Country Link
JP (1) JP3058524B2 (en)

Also Published As

Publication number Publication date
JPH06110705A (en) 1994-04-22

Similar Documents

Publication Publication Date Title
EP1058185A1 (en) A multiply and accumulate apparatus and a method thereof
JPH0248931B2 (en)
JP2773471B2 (en) Information processing device
US4764896A (en) Microprocessor assisted memory to memory move apparatus
US5867696A (en) Saving a program counter value as the return address in an arbitrary general purpose register
JP3058524B2 (en) Program control unit
JP2553200B2 (en) Information processing device
JPS6343773B2 (en)
US6311266B1 (en) Instruction look-ahead system and hardware
JPS6120889B2 (en)
JPS6230455B2 (en)
EP0915416B1 (en) System for allowing a two word instruction to be executed in a single cycle and method therefor
JPH0821009B2 (en) CHANNEL CONTROLLER INITIALIZATION METHOD AND SYSTEM FOR THE INITIALIZATION
JPH07262010A (en) Device and method for arithmetic processing
JP3511529B2 (en) Complex arithmetic processing unit
JP2904362B2 (en) Data reading / writing method for programmable controller
JPH05334074A (en) Microprocessor
JP3168845B2 (en) Digital signal processor
EP0787326A1 (en) System and method for processing of memory data and communication system comprising such system
JPH0258648B2 (en)
JPH0385632A (en) Computer and arithmetic operation method for the same computer
JPH02214938A (en) Data processor
JPS59142791A (en) Access control system of stack memory
JP3088956B2 (en) Arithmetic unit
JPS60122442A (en) Memory processing unit

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080421

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090421

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100421

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees