[go: up one dir, main page]

JPH04169937A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH04169937A
JPH04169937A JP2297413A JP29741390A JPH04169937A JP H04169937 A JPH04169937 A JP H04169937A JP 2297413 A JP2297413 A JP 2297413A JP 29741390 A JP29741390 A JP 29741390A JP H04169937 A JPH04169937 A JP H04169937A
Authority
JP
Japan
Prior art keywords
interrupt
address
instruction
multiplexer
memory
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
JP2297413A
Other languages
Japanese (ja)
Inventor
Hiroyasu Otomo
博康 大友
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 JP2297413A priority Critical patent/JPH04169937A/en
Publication of JPH04169937A publication Critical patent/JPH04169937A/en
Pending legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

PURPOSE:To improve the efficiency of a program memory and to shorten the interrupt handling time by providing an interrupt control circuit with a multiplexer which inputs the output of a means, which sets an interrupt address to an area other than an instruction memory with respect to each interrupt factor, to a program counter. CONSTITUTION:This processor is provided with a program counter 1, a stack 2, an instruction ROM 3, an instruction decoder 4, an interrupt detecting circuit 5, an interrupt control register 6, a stack pointer 7, an address setting circuit 8, and a multiplexer 9. The address setting circuit 8 consists of a read only memory including addresses ADD.1, ADD.2,...ADD.K, and ADD.n and sets an interrupt address for each interrupt factor. The multiplexer 9 uses the interrupt factor detected by the interrupt detecting circuit 5 as a select signal to input the output of the address setting circuit 8 to the program counter 1. Thus, the efficiency of the program memory is improved and the interrupt handling time is shortened.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマイクロ・プロセッサに間し、特に、割込み要
因の発生を検出して、割込み処理の実行を制御する機能
を有するマイクロ・プロセッサに関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to microprocessors, and particularly to a microprocessor having a function of detecting the occurrence of an interrupt factor and controlling execution of interrupt processing.

〔従来の技術〕[Conventional technology]

従来のマイクロ・プロセッサにおいては、割込み入力端
子による外部要因割込み、およびタイマーなどによる内
部要因割込みの何れの場合においても、割込み処理の開
始は、割込み要因ごとに特定された番地のメモリに格納
された命令から実行されるのが一般である。
In conventional microprocessors, the start of interrupt processing is determined by a process stored in memory at an address specified for each interrupt factor, whether it is an externally caused interrupt caused by an interrupt input terminal or an internally caused interrupt caused by a timer, etc. Generally, it is executed from an instruction.

マイクロ・プロセッサ内の割込み検出回路において、割
込み要因が発生したことが検出されると、当該要因によ
る割込みが許可状態にある場合においては、多重割込み
の禁止、戻り番地のスタックへの格納、およびスタック
ポインタの更新などが実行され、割込みアドレスへ分岐
される0分岐先となる割込みアドレスは、割込み要因ご
とにハードウェアにより決定されているマイクロ・プロ
セッサ固有の値である。
When the interrupt detection circuit in the microprocessor detects that an interrupt factor has occurred, if the interrupt caused by the factor is enabled, multiple interrupts are disabled, the return address is stored in the stack, and the stack The interrupt address, which is the 0 branch destination after updating the pointer and branching to the interrupt address, is a value unique to the microprocessor that is determined by hardware for each interrupt factor.

割込みアドレスを狭い空間に集中させたマイクロ・プロ
セッサの場合には、割込みアドレスでは割込み処理のプ
ログラムへ分岐する命令が実行され、割込み処理のプロ
グラムは広い空間に展開されるのが一般的である。代表
的なマイクロ・プロセッサのメモリ・マツプを第6図に
示す。また、割込みアドレスを分散させたマイクロ・プ
ロセッサの場合には、割込み処理のプログラムを割込み
アドレスから展開することができる場合もある。
In the case of a microprocessor in which interrupt addresses are concentrated in a narrow space, an instruction to branch to an interrupt processing program is executed at the interrupt address, and the interrupt processing program is generally expanded over a wide space. A memory map of a typical microprocessor is shown in FIG. Furthermore, in the case of a microprocessor in which interrupt addresses are distributed, it may be possible to develop an interrupt processing program from the interrupt address.

その代表的なマイクロ−プロセッサなメモリ・マツプを
第7図に示す。
A typical microprocessor memory map is shown in FIG.

割込み処理からの復帰は、割込みリターン命令により、
スタック・ポインタの更新、スタックからの戻り番地へ
の復帰などが行われ、戻り番地へ分岐される。
To return from interrupt processing, use the interrupt return instruction.
The stack pointer is updated, the stack returns to the return address, etc., and a branch is made to the return address.

一方、割込み以外の分岐においては、分岐先を直接指定
する以外に、多重分岐を可能とする目的で、特定のレジ
スタに設定されている値を、分岐先とすることができる
機能を持ったマイクロ・プロセッサも実在している。
On the other hand, for non-interrupt branches, in addition to directly specifying the branch destination, a microcontroller with the function of specifying the value set in a specific register as the branch destination is used to enable multiple branches.・The processor also exists.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来のマイクロ・プロセッサにおいては、分岐
命令の実行のためにプログラム・メモリを消費し、割込
み処理の時間が長くなるという欠点があり、また、割込
みアドレス間の空間が固定されているため、割込みアド
レスの前のプログラム−メモリを有効に使用することが
困難であり、無効空間になり易いという欠点がある。
The above-mentioned conventional microprocessors have the disadvantage that program memory is consumed to execute branch instructions, which increases the time required for interrupt processing.Also, since the space between interrupt addresses is fixed, It is difficult to effectively use the program memory before the interrupt address, and the problem is that it is likely to become invalid space.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のマイクロ・プロセッサは、割込み要因が発生し
たことを検出する割込み検出回路と、割込み処理を制御
する割込み制御レジスタとを有する割込み制御回路を備
えるマイクロ・プロセッサにおいて、命令メモリ以外の
領域に対して、割込み要因ごとに割込みアドレスを設定
するアドレス設定手段と、前記割込み検出回路において
検出された割込み要因を選択信号として、前記アドレス
設定手段の出力をプログラム・カウンタに入力するマル
チプレクサと、を備えて構成される。
The microprocessor of the present invention includes an interrupt detection circuit that detects the occurrence of an interrupt factor, and an interrupt control register that controls interrupt processing. the address setting means for setting an interrupt address for each interrupt cause; and a multiplexer for inputting the output of the address setting means to a program counter using the interrupt cause detected by the interrupt detection circuit as a selection signal. configured.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。第1図
は、本発明の一実施例のブロック図である。第1図に示
されるように、本実施例は、プログラム・カウンタ1と
、スタック2と、インストラクションROM3と、イン
ストラクション・デコーダ4と、割込み検出回路5と、
割込み制御レジスタ6と、スタック・ポインタ7と、ア
ドレス設定回路8と、マルチプレクサ9とを備えて構成
される。
Next, the present invention will be explained with reference to the drawings. FIG. 1 is a block diagram of one embodiment of the present invention. As shown in FIG. 1, this embodiment includes a program counter 1, a stack 2, an instruction ROM 3, an instruction decoder 4, an interrupt detection circuit 5,
It is comprised of an interrupt control register 6, a stack pointer 7, an address setting circuit 8, and a multiplexer 9.

第1図において、プログラム・カウンタ1は、インスト
ラクションROM3のアドレスを示すレジスタであり、
インクリメント動作と、命令による書換えならびにスタ
ック2に対するデータの待避と、スタック2からのデー
タの復帰等の機能を有している。インストラクションR
OM3は、マイクロ・プログラムを格納するメモリで、
プログラム・カウンタ1により指定されたアドレスの内
容を、インストラクション・デコーダ4に出力する作用
を行う。
In FIG. 1, program counter 1 is a register indicating the address of instruction ROM 3,
It has functions such as increment operation, rewriting by instructions, saving data to the stack 2, and restoring data from the stack 2. Instruction R
OM3 is a memory that stores micro programs.
It functions to output the contents of the address specified by the program counter 1 to the instruction decoder 4.

インストラクション・デコーダ4においては、インスト
ラクションROM3から入力されるマイクロ・プログラ
ムが解読され、マイクロ・プロセッサ内の各ユニットに
対する制御信号が出力される。割込み検出回路5は、割
込み要因が発生したことを検出する回路であり、割込み
制御レジスタ6は、割込みの禁止/許可等の状態を保持
するレジスタである。スタック・ポインタ7は、スタッ
ク2におけるレベルを指すインクリメント/デクリメン
トの可能なカウンタである。アドレス設定回路8は、A
DD、l、ADD、2.−・、ADD、に、 −= 、
ADD、nを含む読出し専用メモリにより構成されてお
り、インストラクションROM3とともに、マスクによ
りデータが書込まれる。マルチプレクサ9は、アドレス
設定回路8のデータの内から、割込み要因に対応して書
込可れているデータを選択し、このデータをプログラム
・カウンタ1に設定する。
The instruction decoder 4 decodes the microprogram input from the instruction ROM 3 and outputs control signals for each unit within the microprocessor. The interrupt detection circuit 5 is a circuit that detects the occurrence of an interrupt factor, and the interrupt control register 6 is a register that holds the state of interrupt prohibition/permission. Stack pointer 7 is an increment/decrementable counter that points to a level in stack 2. The address setting circuit 8 is
DD, l, ADD, 2. −・, ADD, −= ,
It is composed of a read-only memory including ADD, n, and data is written therein together with the instruction ROM 3 using a mask. The multiplexer 9 selects writable data corresponding to the interrupt factor from among the data in the address setting circuit 8, and sets this data in the program counter 1.

割込み検出回路5においては、第1図に示されるように
、INT、にの割込み要因が発生した場合、その要因の
発生を検出し、割込み制御レジスタ6において当該割込
みが許可状態にある場合には、多重割込みを禁止するた
めに割込み制御レジスタ6の内容が変更されるとともに
、プログラム・カウンタ1の値がスタック2に退避され
、スタック・ポインタ7が更新される。アドレス設定回
路8においては、ADD、kがマルチプレクサ9におい
て選択され、プログラム・カウンタ1に設定されて割込
み処理が開始される0本実施例に対応する、代表的なマ
イクロ・プロセッサのメモリ・マツプを第3図に示す。
As shown in FIG. 1, the interrupt detection circuit 5 detects the occurrence of an interrupt factor at INT, and if the interrupt is enabled in the interrupt control register 6, , the contents of interrupt control register 6 are changed to prohibit multiple interrupts, the value of program counter 1 is saved to stack 2, and stack pointer 7 is updated. In the address setting circuit 8, ADD,k is selected by the multiplexer 9, set in the program counter 1, and interrupt processing is started.0 A typical microprocessor memory map corresponding to this embodiment is shown. It is shown in Figure 3.

次に、本発明の第2の実施例について説明する。第2図
は本発明の第2の実施例のブロック図である。第2図に
示されるように、本実施例は、プログラム・カウンタl
Oと、スタック11と、インストラクションRA M 
12と、インストラクション・デコーダ13と、割込み
検出回路14と、割込み制御レジスタ15と、スタック
・ポインタ16と、アドレス設定回路17と、マルチプ
レクサ18とを備えて構成される。
Next, a second embodiment of the present invention will be described. FIG. 2 is a block diagram of a second embodiment of the invention. As shown in FIG.
O, stack 11, instruction RAM
12, an instruction decoder 13, an interrupt detection circuit 14, an interrupt control register 15, a stack pointer 16, an address setting circuit 17, and a multiplexer 18.

第2図において、本実施例の主要動作については、前述
の第1の実施例の場合と同様であるが、本実施例の第1
の実施例と異なる点は、第1の実施例におけるインスト
ラクションROM3の代すに、本実施例においてはイン
ストラクションRAM12が設けられていることである
。そして、本実施例の特徴として、インストラクション
RA M 12とアドレス設定回路17は、書換え可能
な構成がとられている。このような構成をとることによ
り、インストラクションRAM12を書換えたことによ
り、割込み処理のアドレスが変更になった場合において
も、アドレス設定回路17のデータを、プログラムによ
りデータ・ハス101を介して書換えるだけの処理によ
り対応することが可能となる。また、更に、この実施例
の場合には、サイクリックな処理を割込み処理により実
行する場合に、カウンタとデコーダが不要となり、処理
時間が短縮されるという利点がある。本実施例の代表的
なマイクロ・プロセッサのメモリ・マツプを第4図およ
び第5図に示す。
In FIG. 2, the main operations of this embodiment are the same as those of the first embodiment described above.
The difference from the second embodiment is that an instruction RAM 12 is provided in this embodiment instead of the instruction ROM 3 in the first embodiment. A feature of this embodiment is that the instruction RAM 12 and address setting circuit 17 are configured to be rewritable. With this configuration, even if the interrupt processing address is changed by rewriting the instruction RAM 12, the data in the address setting circuit 17 can be simply rewritten by the program via the data hash 101. It is possible to deal with this by processing the following. Further, in the case of this embodiment, when cyclic processing is executed by interrupt processing, there is an advantage that a counter and a decoder are not required, and processing time is shortened. The memory map of a typical microprocessor of this embodiment is shown in FIGS. 4 and 5.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明は、割込み制御回路に、命
令メモリ以外の領域に割込み要因ごとに割込みアドレス
を設定するアドレス設定手段と。
As described above, the present invention includes an address setting means for setting an interrupt address for each interrupt cause in an area other than the instruction memory in an interrupt control circuit.

割込み検出回路により検出された要因を選択信号として
、アドレス設定手段の出力をプ°ログラム・カウンタに
入力するマルチプレクサを設けることにより、分岐命令
に要するプログラム・メモリの消費を抑制し、またプロ
グラム・メモリの無効空間を削除して、プログラム・メ
モリの効率化を図り、且つ割込み処理時間を短縮するこ
とができるという効果がある。
By providing a multiplexer that uses the factor detected by the interrupt detection circuit as a selection signal and inputs the output of the address setting means to the program counter, consumption of program memory required for branch instructions can be suppressed, and program memory This has the effect of increasing the efficiency of program memory and shortening interrupt processing time by deleting invalid space.

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

第1図および第2図は、それぞれ本発明の第1および第
2の実施例のブロック図、第3図は第1の実施例のプロ
グラムのメモリーマツプ、第4図および第5図は、第2
の実施例のプログラムのメモリ・マツプ、第6図および
第7図、従来のマイクロ−プロセッサのプログラムのメ
モリ・マツプである。 図において、1,10・・・・・・プログラム・カウン
タ、2,11−・・・・・スタック、3・・−・・・イ
ンストラクションROM、4.13・・・・・・インス
トラクション・デコーダ、5,14・・・・・・割込み
検出回路、6,15・・・・・・・・・割込み制御レジ
スタ、7.16・・・・・・スタック・ポインタ、8,
17・・・−・・アドレス設定回路、9,18・・・・
・・マルチプレクサ。
1 and 2 are block diagrams of the first and second embodiments of the present invention, respectively, FIG. 3 is a memory map of the program of the first embodiment, and FIGS. 4 and 5 are block diagrams of the first and second embodiments of the present invention. 2
FIGS. 6 and 7 are memory maps of a conventional microprocessor program. In the figure, 1, 10...program counter, 2, 11-...stack, 3...instruction ROM, 4.13...instruction decoder, 5, 14... Interrupt detection circuit, 6, 15... Interrupt control register, 7.16... Stack pointer, 8,
17...--Address setting circuit, 9, 18...
...Multiplexer.

Claims (1)

【特許請求の範囲】 割込み要因が発生したことを検出する割込み検出回路と
、割込み処理を制御する割込み制御レジスタとを有する
割込み制御回路を備えるマイクロ・プロセッサにおいて
、 命令メモリ以外の領域に対して、割込み要因ごとに割込
みアドレスを設定するアドレス設定手段と、 前記割込み検出回路において検出された割込み要因を選
択信号として、前記アドレス設定手段の出力をプログラ
ム・カウンタに入力するマルチプレクサと、 を備えることを特徴とするマイクロ・プロセッサ。
[Scope of Claims] In a microprocessor equipped with an interrupt control circuit having an interrupt detection circuit that detects the occurrence of an interrupt factor and an interrupt control register that controls interrupt processing, for an area other than the instruction memory, The present invention is characterized by comprising: address setting means for setting an interrupt address for each interrupt cause; and a multiplexer for inputting the output of the address setting means to a program counter using the interrupt cause detected by the interrupt detection circuit as a selection signal. microprocessor.
JP2297413A 1990-11-02 1990-11-02 Microprocessor Pending JPH04169937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2297413A JPH04169937A (en) 1990-11-02 1990-11-02 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2297413A JPH04169937A (en) 1990-11-02 1990-11-02 Microprocessor

Publications (1)

Publication Number Publication Date
JPH04169937A true JPH04169937A (en) 1992-06-17

Family

ID=17846188

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2297413A Pending JPH04169937A (en) 1990-11-02 1990-11-02 Microprocessor

Country Status (1)

Country Link
JP (1) JPH04169937A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5748970A (en) * 1995-05-11 1998-05-05 Matsushita Electric Industrial Co., Ltd. Interrupt control device for processing interrupt request signals that are greater than interrupt level signals
DE10017934A1 (en) * 2000-04-11 2001-08-09 Fujitsu Siemens Computers Gmbh Method for handling interrupts for a computer system with a CPU and a system bus in which a multiplexor is used to redirect address to an interrupt base address register to optimize system speed for soft or hard boot-ups
US9710270B2 (en) 2010-12-20 2017-07-18 International Business Machines Corporation Exception control method, system, and program
JP2019017926A (en) * 2017-07-21 2019-02-07 株式会社三洋物産 Game machine
JP2019017928A (en) * 2017-07-21 2019-02-07 株式会社三洋物産 Game machine

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5748970A (en) * 1995-05-11 1998-05-05 Matsushita Electric Industrial Co., Ltd. Interrupt control device for processing interrupt request signals that are greater than interrupt level signals
DE10017934A1 (en) * 2000-04-11 2001-08-09 Fujitsu Siemens Computers Gmbh Method for handling interrupts for a computer system with a CPU and a system bus in which a multiplexor is used to redirect address to an interrupt base address register to optimize system speed for soft or hard boot-ups
US9710270B2 (en) 2010-12-20 2017-07-18 International Business Machines Corporation Exception control method, system, and program
JP2019017926A (en) * 2017-07-21 2019-02-07 株式会社三洋物産 Game machine
JP2019017928A (en) * 2017-07-21 2019-02-07 株式会社三洋物産 Game machine

Similar Documents

Publication Publication Date Title
US4924382A (en) Debugging microprocessor capable of switching between emulation and monitor without accessing stack area
JPS645330B2 (en)
JPH04169937A (en) Microprocessor
JPS6212529B2 (en)
JPH03149621A (en) microprocessor
JPS61267858A (en) Microcomputer
JPS5617441A (en) Program interruption system
JP2504191B2 (en) Microprocessor
JP2562838B2 (en) Processor and store buffer control method
JP3190945B2 (en) Micro program control circuit
JP4116752B2 (en) Computer and its control method
JPH04107630A (en) Central processing unit
JPS623345A (en) Interruption system
JP2731618B2 (en) emulator
JPS6341092B2 (en)
JP2903601B2 (en) Microcomputer with built-in ROM
JPH04332045A (en) Arithmetic processor
JPS6120139A (en) Interruption control system
JPH05150980A (en) Microcomputer
JPS60193046A (en) Instruction exception detection method
JPS6027032A (en) How to start the program
JPH09101898A (en) Information processor
JPH01201730A (en) Information processor
JPH08106307A (en) Programmable controller
JPH04128961A (en) Multi-processor control system