JPH0477930A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH0477930A
JPH0477930A JP19172490A JP19172490A JPH0477930A JP H0477930 A JPH0477930 A JP H0477930A JP 19172490 A JP19172490 A JP 19172490A JP 19172490 A JP19172490 A JP 19172490A JP H0477930 A JPH0477930 A JP H0477930A
Authority
JP
Japan
Prior art keywords
register
mask
interruption
bank
register bank
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
JP19172490A
Other languages
Japanese (ja)
Inventor
Ikutaro Okuda
奥田 郁太郎
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 JP19172490A priority Critical patent/JPH0477930A/en
Publication of JPH0477930A publication Critical patent/JPH0477930A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the response time of interruption by automatically altering the mask state state of an interruption request independently of a user program before and after the switching of register banks whenever they are switched. CONSTITUTION:At the time of initialization, CPU 12 sets interruption mask information in respective mask state holding registers 10 and 11 in accordance with the content of a program memory 13. When a bus selector 2 switches the register bank being the object of access for the CPU bus 1 from the register bank 3 to the register bank 4 by an instruction or the occurrence of interruption, the content of the interruption request mask control register 5 is stored in the mask state holding register 10 corresponding to the register bank 3. Thus, the response time of interruption can be reduced since the control register 5 holding the mask state of respective interruption requests is automatically updated at the time of switching the register banks.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマイクロコンピュータに関し、特にレジスタ・
バンクと割り込みコントローラを有するマイクロコンピ
ュータに関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a microcomputer, and in particular to a register/microcomputer.
This invention relates to a microcomputer with a bank and an interrupt controller.

〔従来の技術〕[Conventional technology]

従来、この種のマイクロコンピュータは、用途に応じて
、レジスタの内容を退避する目的で行われるレジスタ・
バンクの切り替えを行う毎に、ユーザ・プログラム上で
個々の割り込み要求のマスク状態をマスク制御レジスタ
に設定する必要があった。
Conventionally, this type of microcomputer has been used to save register contents depending on the purpose.
Every time banks are switched, it is necessary to set the mask status of each interrupt request in the mask control register on the user program.

第2図は従来のマイクロコンピュータの一例を示すブロ
ック図である。命令あるいは割り込み発生により、バス
・セレクタ2がCPUバス1のアクセス対象となるレジ
スタ・バンクをレジスタ・バンク3からレジスタ・バン
ク4に切り替えるとする。レジスタ・バンク4をアクセ
スするプログラムを起動し、CPU12はレジスタ・バ
ンク4に対応する割り込みマスク情報をプログラム・メ
モリ13からロードして、これを割り込み要求マスク制
御レジスタ5にストアする。このため、バンク切り替え
以前に割り込み要求マスク制御レジスタらヘスドアして
いた、レジスタ・バンク3に対応する割り込みマスク情
報は失われる。
FIG. 2 is a block diagram showing an example of a conventional microcomputer. Assume that the bus selector 2 switches the register bank to be accessed by the CPU bus 1 from the register bank 3 to the register bank 4 in response to an instruction or the occurrence of an interrupt. A program that accesses register bank 4 is started, and CPU 12 loads interrupt mask information corresponding to register bank 4 from program memory 13 and stores it in interrupt request mask control register 5. Therefore, the interrupt mask information corresponding to register bank 3, which was stored in the interrupt request mask control register before bank switching, is lost.

本例では、割り込み要求マスク制御レジスタ5の上位か
ら1ビット目、3ビツト目はそれぞれ外部割り込み入力
信号線6,8がら割り込み要求信号線7.9への信号伝
達をマスクすることができる。
In this example, the first and third bits from the higher order of the interrupt request mask control register 5 can mask signal transmission from the external interrupt input signal lines 6 and 8 to the interrupt request signal line 7.9, respectively.

次に、再びレジスタ・バンク4がらレジスタ・バンク3
ヘアクセス対象を切り替える場合、前述のように、レジ
スタ・バンク3に対応する割り込みマスク情報は失われ
ているので、CPU12はこの情報をプログラム・メモ
リ13からロードし、これを割り込み要求マスク制御レ
ジスタ5にストアする。
Next, register bank 3 is changed from register bank 4 again.
When switching the access target to register bank 3, the interrupt mask information corresponding to register bank 3 is lost, so the CPU 12 loads this information from program memory 13 and transfers it to interrupt request mask control register 5. Store in.

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

この従来のマイクロコンピュータでは、各レジスタ・バ
ンクにマスク状態保持レジスタを有していないなめ、命
令あるいは割り込み発生によって切り替わる前のマスク
情報が失われてしまう欠点がある。更に、レジスタ・バ
ンク切り替えを行う時、個々の割り込み要求のマスク状
態を保持する制御レジスタを自動的に更新することがで
きないため、レジスタ・バンク切り替えの度に、ユーザ
・プログラム上で割り込み要求のマスク状態を新しいレ
ジスタ・バンクに合わせて設定する必要があり、ユーザ
・プログラムのコード・サイズや割り込みの応答時間が
大きくなるという欠点がある。
In this conventional microcomputer, each register bank does not have a mask state holding register, so there is a drawback that mask information before switching due to an instruction or an interrupt is lost. Furthermore, when switching register banks, the control registers that hold the mask status of individual interrupt requests cannot be automatically updated. The disadvantage is that the state must be set to match the new register bank, increasing the code size of the user program and the response time of interrupts.

本発明の目的は、コードサイズを短縮し、割り込みの応
答時間を小さくすることができるマイクロコンピュータ
を提供することにある。
An object of the present invention is to provide a microcomputer that can reduce code size and interrupt response time.

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

本発明のマイクロコンピュータは、複数のレジスタ・バ
ンクと、前記各レジスタ・バンクに対応して複数の割り
込み要求のマスク状態を保持するレジスタ群と、マスク
制御レジスタと、命令あるいは割り込み発生により前記
マスク制御レジスタの内容を既に選択されている前記レ
ジスタ・バンクに対応するマスク状態保持レジスタに格
納するとともに、レジスタ・バンクを切り替え新たに選
択されたレジスタ・バンクに対応するマスク状態保持レ
ジスタから前記マスク制御レジスタに内容を格納する手
段とを備えることを特徴とする。
A microcomputer according to the present invention includes a plurality of register banks, a group of registers corresponding to each of the register banks and holding mask states of a plurality of interrupt requests, a mask control register, and a register that controls the mask according to an instruction or the occurrence of an interrupt. The contents of the register are stored in the mask state holding register corresponding to the previously selected register bank, and the register bank is switched from the mask state holding register corresponding to the newly selected register bank to the mask control register. and means for storing the contents.

〔実施例〕〔Example〕

次に、本発明について、図面を参照して説明する。第1
図は本発明の一実施例のブロック図である。同図に示す
ように、レジスタ・バンク3,4にはそれぞれマスク状
態保持レジスタ10.11が設けられている。
Next, the present invention will be explained with reference to the drawings. 1st
The figure is a block diagram of one embodiment of the present invention. As shown in the figure, register banks 3 and 4 are each provided with mask state holding registers 10 and 11.

初期化時にCPtJ12は、プログラム・メモリ13の
内容に従って各マスク状態保持レジスタ10.11に割
り込みマスク情報が設定される。
At the time of initialization, the CPtJ 12 has interrupt mask information set in each mask state holding register 10.11 according to the contents of the program memory 13.

命令あるいは割り込み発生により、バス・セレクタ2が
CPUバス1のアクセス対象となるレジスタ・バンクを
レジスタ・バンク3からレジスタ・バンク4に切り替え
るとする。このとき、個々の割り込み要求のマスク状態
を保持する割り込み要求マスク制御レジスタ5の内容を
レジスタ・バンク3に対応するマスク状態保持レジスタ
10ヘスドアする。これにより、従来のように切り替え
る際にマスク情報が消えることがなくなる。マスク情報
がマスク情報保持レジスタ10にストアされると、レジ
スタ・バンク4に対応するマスク状態保持レジスタ11
の内容を割り込み要求マスク制御レジスタ5ヘロードす
る。従って、割り込み要求マスク制御レジスタ5はマス
ク状態に応じた外部割り込み入力信号線に対してマスク
することができる。
Assume that the bus selector 2 switches the register bank to be accessed by the CPU bus 1 from the register bank 3 to the register bank 4 in response to an instruction or the occurrence of an interrupt. At this time, the contents of the interrupt request mask control register 5, which holds the masked state of each interrupt request, are transferred to the masked state holding register 10 corresponding to the register bank 3. This prevents the mask information from disappearing when switching as in the conventional case. When the mask information is stored in the mask information holding register 10, the mask status holding register 11 corresponding to register bank 4 is stored.
The contents of are loaded into the interrupt request mask control register 5. Therefore, the interrupt request mask control register 5 can mask external interrupt input signal lines according to the mask state.

一方、レジスタ・バンクをレジスタ・バンク4からレジ
スタ・バンク3に切り替える際も、同様な動作により、
マスク状態をマスク状態保持レジスタ11にストアして
、割り込み要求マスク制御レジスタの内容を替えること
になる。
On the other hand, when switching the register bank from register bank 4 to register bank 3, a similar operation is performed.
The mask state is stored in the mask state holding register 11, and the contents of the interrupt request mask control register are changed.

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

以上説明したように本発明は、レジスタ・バンク切り替
えの度にその前後で割り込み要求のマスク状態をユーザ
・プログラムに依らず、自動的に変更することができ、
これにより、従来、ユーザ・プログラムで行っていた処
理を省くことができるため、割り込みの応答時間を小さ
くすることができる。また、割り込み要因数だけマスク
情報の設定ルーチンを用意する必要がなく、使用するレ
ジスタ・バンク数だけの設定をするイニシャライズ・ル
ーチンで割り込みマスクを実現できるため、プログラム
のコード・サイズを短縮できるという効果を有する。
As explained above, the present invention can automatically change the interrupt request masking state before and after register bank switching without depending on the user program.
This makes it possible to omit the processing conventionally performed by the user program, thereby reducing the interrupt response time. In addition, there is no need to prepare mask information setting routines for the number of interrupt sources, and interrupt masking can be achieved with an initialization routine that sets as many register banks as there are to be used, resulting in a reduction in program code size. has.

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

第1図は本発明の一実施例のブロック図、第2図は従来
のマイクロコンピュータのブロック図である。 1・・・CPUバス、2・・・バス・セレクタ、3゜4
・・・レジスタ・バンク、5・・・割り込み要求マスク
制御レジスタ、6.8・・・外部割り込み入力信号線、
7,9・・・割り込み要求信号線、10.11・・・マ
スク状態保持レジスタ、12・・・CPU、13・・・
プログラム・メモリ。
FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a block diagram of a conventional microcomputer. 1...CPU bus, 2...Bus selector, 3゜4
...Register bank, 5...Interrupt request mask control register, 6.8...External interrupt input signal line,
7, 9...Interrupt request signal line, 10.11...Mask status holding register, 12...CPU, 13...
program memory.

Claims (1)

【特許請求の範囲】[Claims] 複数のレジスタ・バンクと、前記各レジスタ・バンクに
対応して複数の割り込み要求のマスク状態を保持するレ
ジスタ群と、マスク制御レジスタと、命令あるいは割り
込み発生により前記マスク制御レジスタの内容を既に選
択されている前記レジスタ・バンクに対応するマスク状
態保持レジスタに格納するとともに、レジスタ・バンク
を切り替え新たに選択されたレジスタ・バンクに対応す
るマスク状態保持レジスタから前記マスク制御レジスタ
に内容を格納する手段とを備えることを特徴とするマイ
クロコンピュータ。
A plurality of register banks, a group of registers corresponding to each of the register banks and holding mask states of a plurality of interrupt requests, a mask control register, and a mask control register whose contents have already been selected by an instruction or an interrupt occurrence. means for storing contents in a mask state holding register corresponding to the newly selected register bank, and storing contents in the mask control register from the mask state holding register corresponding to the newly selected register bank by switching register banks; A microcomputer characterized by comprising:
JP19172490A 1990-07-19 1990-07-19 Microcomputer Pending JPH0477930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19172490A JPH0477930A (en) 1990-07-19 1990-07-19 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19172490A JPH0477930A (en) 1990-07-19 1990-07-19 Microcomputer

Publications (1)

Publication Number Publication Date
JPH0477930A true JPH0477930A (en) 1992-03-12

Family

ID=16279435

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19172490A Pending JPH0477930A (en) 1990-07-19 1990-07-19 Microcomputer

Country Status (1)

Country Link
JP (1) JPH0477930A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009223492A (en) * 2008-03-14 2009-10-01 Pasuko:Kk Drawing display device
JP2010267064A (en) * 2009-05-14 2010-11-25 Internatl Business Mach Corp <Ibm> Computer system and method of controlling the same

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009223492A (en) * 2008-03-14 2009-10-01 Pasuko:Kk Drawing display device
JP2010267064A (en) * 2009-05-14 2010-11-25 Internatl Business Mach Corp <Ibm> Computer system and method of controlling the same
US8909835B2 (en) 2009-05-14 2014-12-09 International Business Machines Corporation Computer system and method of controlling computer system

Similar Documents

Publication Publication Date Title
US6223279B1 (en) Single chip microcomputer having a dedicated address bus and dedicated data bus for transferring register bank data to and from an on-line RAM
US5557766A (en) High-speed processor for handling multiple interrupts utilizing an exclusive-use bus and current and previous bank pointers to specify a return bank
US4325116A (en) Parallel storage access by multiprocessors
US6081867A (en) Software configurable technique for prioritizing interrupts in a microprocessor-based system
US6438557B1 (en) System and method for performing context switching and rescheduling of a processor
US6088787A (en) Enhanced program counter stack for multi-tasking central processing unit
JP3970609B2 (en) Processor system
US5581771A (en) Microcomputer having interrupt control circuit to determine priority level
JPH0916409A (en) Microcomputer
JPH0477930A (en) Microcomputer
JP2553698B2 (en) Time-division multitasking execution device
EP0787326B1 (en) System and method for processing of memory data and communication system comprising such system
JPH0635800A (en) Microprocessor and data processing system using it
JPS59218569A (en) Microcomputer
JPH044630B2 (en)
JPH05165641A (en) Single chip microcomputer
JP2867148B2 (en) Memory access end condition judgment method
JPS6352240A (en) Data processor
CA2233435C (en) Enhanced program counter stack for multi-tasking central processing unit
JPH02173828A (en) Interruption process system
JPH0261749A (en) Data transfer device
JPH03188531A (en) Time-division multitask executing device
JPH0477945B2 (en)
JPS6222149A (en) Process changeover system
JPH0531170B2 (en)