JPS63118947A - Single chip microcomputer - Google Patents

Single chip microcomputer

Info

Publication number
JPS63118947A
JPS63118947A JP61265858A JP26585886A JPS63118947A JP S63118947 A JPS63118947 A JP S63118947A JP 61265858 A JP61265858 A JP 61265858A JP 26585886 A JP26585886 A JP 26585886A JP S63118947 A JPS63118947 A JP S63118947A
Authority
JP
Japan
Prior art keywords
processing
interrupt
request
flag
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP61265858A
Other languages
Japanese (ja)
Inventor
Tsuyoshi Katayose
片寄 強
Yukio Maehashi
幸男 前橋
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 JP61265858A priority Critical patent/JPS63118947A/en
Priority to EP87116519A priority patent/EP0266800B1/en
Priority to US07/118,671 priority patent/US4930068A/en
Priority to DE3751164T priority patent/DE3751164T2/en
Publication of JPS63118947A publication Critical patent/JPS63118947A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE:To perform an interruption processing with superior responsiveness, by setting the interruption requesting level of a macro service executed without performing the saving of a register, etc., higher than another interruption requesting level. CONSTITUTION:When a processing request 8 is generated from a processing request generating source, and a request flag group 103 is set, an interruption request control part sets a flag 103 based on the content of a processing type designating flag when it requests a macro service processing executed without performing the saving of a register group, and sets an interruption processing type signal line 104 at a high level, and when a general interruption processing is performed, it sets the signal line at a low level. An execution part 2 interrupts a program in executing currently when the signal line 14 is set at the high level, and executes the macro service processing by obtaining the address information and the content of data processing of a macro service channel register 303. The flag 103 is reset by a signal 10 by which a processing is completed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は単一半導体チップ上にコンピュータ機能!を有
するシングルチップマイクロコンピュータに関し、特に
各種周辺装置からの処理要求を処理する機能を内蔵した
シングルチップマイクロコンピュータに関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention provides computer functions on a single semiconductor chip! The present invention relates to a single-chip microcomputer having a built-in function, and particularly relates to a single-chip microcomputer having a built-in function of processing processing requests from various peripheral devices.

〔従来の技術〕[Conventional technology]

近年、集積回路製造技術の進歩にともない、単一半導体
チップ上にコンピュータ機能を実現したシングルチップ
マイクロコンピュータ(以下SMCと記す)においてさ
らに高度集積化が進められている。また、例えばタイマ
カウンタ、A/D変換回路、シリアル送受信回路等の周
辺装置においても多種類の装置が複数チャネル設けられ
より高機能化が進められている。このため、中央処理装
置・(以下CPUという)が単に命令によるデータ処理
を高速に実行するだけでなく、周辺装置等の処理要求に
対しても効率的かつ高速にデータ処理を実行する必要が
生じている。
2. Description of the Related Art In recent years, as integrated circuit manufacturing technology has progressed, a higher degree of integration has been promoted in single-chip microcomputers (hereinafter referred to as SMCs) that realize computer functions on a single semiconductor chip. Additionally, peripheral devices such as timer counters, A/D converter circuits, serial transmitter/receiver circuits, etc. are also becoming more sophisticated by providing multiple channels of various types of devices. For this reason, the central processing unit (hereinafter referred to as CPU) not only needs to execute data processing based on instructions at high speed, but also needs to execute data processing efficiently and at high speed in response to processing requests from peripheral devices, etc. ing.

従来、CPUが周辺装置等からの処理要求に応じて高速
データ処理を実行制御するための手段として割込みとい
う手法が広く用いられている。割込みにおいては、CP
Uが周辺装置等割込み要求発生源からの割込み要求を検
知すると、現在実行中のプログラム処理を中断し、割込
み要求に対応したデータ処理を行なう割込み処理プログ
ラムのルーチンに制御を移す。一般にCPUが現在実行
中のプログラムとは無関係に周辺装置とのリアルタイム
データ処理等特定処理を他の処理よシ優先的に行うこと
が必要な場合がある。非同期に発生される処理要求に対
して、CPUはハードウェアで各命令の実行シーケンス
の区切シ毎に割込み処理要求発生のチェックを行ってお
シ、もし周辺装置等から処理要求が発生している時には
、CPUは現在実行中のプログラム処理を中断し、割込
み処理に移る。割込み処理を行う時は、元のグログ2ム
処理を正常に再開出来る様に、レジスタやプログラム・
カウンタ(以下PCという)やプログラムステータスワ
ードレジスタ(以下PSWという)等の内容をスタック
と呼ばれるメモリ部に退避しておく必要がある。割込み
の処理が終了するとスタックに退避しておいたPC,P
SW、レジスタ値等の情報を元の場所に回復させること
によシ中断中のプログラム実行に復帰する。また複数の
処理要求を実行制御する必要のある応用システムでは、
通常以下に述べるペクタ割込みという手法が用いられて
いる。
Conventionally, a method called an interrupt has been widely used as a means for a CPU to execute and control high-speed data processing in response to a processing request from a peripheral device or the like. For interrupts, CP
When U detects an interrupt request from an interrupt request source such as a peripheral device, it interrupts the program processing currently being executed and transfers control to a routine of an interrupt processing program that performs data processing corresponding to the interrupt request. In general, there are cases where it is necessary to perform specific processing such as real-time data processing with peripheral devices with priority over other processing, regardless of the program currently being executed by the CPU. For processing requests that are generated asynchronously, the CPU uses hardware to check for the occurrence of an interrupt processing request at each break in the execution sequence of each instruction.If a processing request is generated from a peripheral device, etc. Sometimes, the CPU interrupts the currently executing program and moves to interrupt processing. When processing interrupts, registers, programs, etc. are
It is necessary to save the contents of a counter (hereinafter referred to as PC), a program status word register (hereinafter referred to as PSW), etc. to a memory section called a stack. When the interrupt processing is completed, the PC and P saved in the stack
By restoring information such as SW and register values to their original locations, execution of the interrupted program is resumed. In addition, in application systems that require execution control of multiple processing requests,
Usually, a technique called pectoral interrupt, which will be described below, is used.

これは複数の割込み処理プログラム中から処理要求発生
源に対応したプログラムを選択するために周辺機器ある
いは割込み要求制御部からその選択用データ(ベクタ)
を送って対応づけるものである。ベクタはプログラムメ
モリ中の割込み処理プログラムの位置をコード化したも
ので、CPUはベクタの値によって割込み処理ルーチン
の先頭アドレスを得ることができる。つまシ割込み処理
要求に続いてCPUに送られてくるベクタ値によシ、分
岐先のテーブル・アドレスを決定し、テーブルアドレス
内のデータ値によシ処理ルーチンへ分岐するというもの
である。
This is selection data (vector) from a peripheral device or interrupt request control unit to select a program corresponding to the processing request source from among multiple interrupt processing programs.
is sent and matched. The vector encodes the position of the interrupt processing program in the program memory, and the CPU can obtain the start address of the interrupt processing routine based on the value of the vector. A branch destination table address is determined based on the vector value sent to the CPU following the interrupt processing request, and a branch is made to the processing routine based on the data value within the table address.

一方、応用プログラムの内容によっては、割込み処理の
受付けを禁止したい場合がある。例えば他の割込みの処
理ルーチンを既に実行中で、これ以上スタックが深くな
る事を避けたい場合や、スタックの内容を直接命令で操
作している場合である。このため、割込み処理システム
を備えたSMCでは割込み要求処理の受付を制御する割
込み許可フラグ(以下、EIエフラグ記す)を設け、E
エフラグの内容によって割込み受付の禁止/許可制御を
行っている。EI72グは割込み処理受付けが必要な場
合にセットしておき、割込み処理プログラムの実行時等
、割込み処理の受付けを禁止したい場合にはリセットす
るといった方法で使用される。′!た、割込み処理の起
動時、EIエフラグハードウェア的に自動的にリセット
されるので、割込み処理からの復帰処理で再びセット(
割込み許可)状態に戻す必要がある。
On the other hand, depending on the content of the application program, it may be desirable to prohibit acceptance of interrupt processing. For example, when another interrupt handling routine is already being executed and you want to avoid the stack from becoming any deeper, or when you are directly manipulating the contents of the stack with instructions. For this reason, an SMC equipped with an interrupt processing system is equipped with an interrupt enable flag (hereinafter referred to as EI flag) that controls the acceptance of interrupt request processing.
Interrupt acceptance is inhibited/enabled depending on the contents of the efrag. The EI72 flag is set when it is necessary to accept interrupt processing, and is reset when it is desired to prohibit acceptance of interrupt processing, such as when executing an interrupt processing program. ′! In addition, since the EI Effrag is automatically reset in terms of hardware when interrupt processing is started, it can be set again (
interrupts enabled) state.

次に具体例を用いて従来のSMCにおける割込み処理シ
ステムについて説明する。第5図は従来のSMCにおけ
る割込み処理システムの要部ブロック図で以下の構成要
素からなる。
Next, a conventional interrupt processing system in an SMC will be explained using a specific example. FIG. 5 is a block diagram of a main part of an interrupt processing system in a conventional SMC, which consists of the following components.

割込み要求制御部1は各種周辺装置からの処理要求の発
生を記憶する割込み要求フラグIP(以下IPと記す)
IF103d、IF103eと、各処理要求に対応した
ベクタ情報を含むベクタコード定数部101と、IPお
よびEI7ラグ信号6の内容から割込み要求受付は条件
判定優先順位制御を行なう優先順位制御と、割込み要求
受付は判定回路部102と、実行部2に対し割込み処理
要求INTRQ(以下INTRQと記す)5を発生し割
込み処理の起動要求を伝えるとともに実行部2からのベ
クタコード出力要求0BVC(以下0EVCと記す)7
に応じて所定のベクタコードをバス9に出力する制御ロ
ジックと実行部2からのIPクリア信信号LRIFIO
によって処理要求に対応したIPのリセットを行なう各
種制御ロジックとを含む。
The interrupt request control unit 1 has an interrupt request flag IP (hereinafter referred to as IP) that stores the occurrence of processing requests from various peripheral devices.
IF103d, IF103e, vector code constant part 101 containing vector information corresponding to each processing request, and the contents of IP and EI7 lag signals 6. Interrupt request reception is performed by priority control that performs condition judgment priority control and interrupt request reception. generates an interrupt processing request INTRQ (hereinafter referred to as INTRQ) 5 to the determination circuit unit 102 and the execution unit 2, transmits a request to start interrupt processing, and also requests a vector code output request 0BVC (hereinafter referred to as 0EVC) from the execution unit 2. 7
A control logic that outputs a predetermined vector code to the bus 9 according to the IP clear signal LRIFIO from the execution unit 2
This includes various control logics for resetting the IP in response to processing requests.

実行部2は内部にペクタ割込みの禁止、許可を行なうE
I7=7グ201.PC,PSW、ALU、命令レジス
タ、プログラムメモリ、種々レジスタ類、命令実行およ
び割込み処理実行のためのマイクロプログラムが格納さ
れたメモリを含み、割込み処理要求制御部1から発生す
るINTRQ5に基づき割込み処理を行ない、割込み要
求制御部1を制御する機能を有している。
Execution unit 2 internally disables and enables pecter interrupts.
I7=7g201. It includes a PC, PSW, ALU, instruction register, program memory, various registers, and memory in which microprograms for executing instructions and interrupt processing are stored, and handles interrupt processing based on INTRQ5 generated from the interrupt processing request control unit 1. It has the function of controlling the interrupt request control section 1.

メモリ部3はタイマ、A/Dコンバータ、シリアル送受
信回路等の周辺装置に関係する処理データ及び実行部2
による命令実行結果のデータ格納領域301と、割込み
処理起動の際pc 、 psw、レジスタ類の退避に使
用されるスタック領域(以下スタックという)302と
を含み、実行部2の制御によシパス9を介してデータの
入出力を行なう。
The memory unit 3 stores processing data related to peripheral devices such as timers, A/D converters, and serial transmitter/receiver circuits, and the execution unit 2
It includes a data storage area 301 for the instruction execution results obtained by the CPU, and a stack area (hereinafter referred to as stack) 302 used to save PC, psw, and registers when starting an interrupt process. Data is input and output via the

さらに、タイマ、A/Dコンバータ、シリアル送受信回
路といった処理要求発生機能を持つ周辺装置群、すなわ
ち処理要求発生源をもつ。第5図では単一半導体チップ
上にある処理要求発生源4dと基盤外部の処理要求発生
源4eとから各々処理要求8d、13eが発生され、こ
れらは割込み要求制御部1に伝えられ対応する割込み要
求フラグエF’1oaa、IF103eがセットされる
Furthermore, it has a group of peripheral devices such as a timer, an A/D converter, and a serial transmitter/receiver circuit that have a processing request generation function, that is, a processing request generation source. In FIG. 5, processing requests 8d and 13e are generated from a processing request generation source 4d on a single semiconductor chip and a processing request generation source 4e external to the board, respectively, and these are transmitted to the interrupt request control unit 1 and the corresponding interrupts are generated. Request flag F'1oaa and IF103e are set.

さらに処理要求発生源4d、4eの動作指定およびデー
タ入出力用バッファとして使用される特殊レジスタ部(
以下8F几と記す)401が設けられ、処理要求発生源
4d、4eに対応し7’c8FR401中のレジスタは
実行部2よシバス9を介してアクセスされる。
Furthermore, a special register section (
A register (hereinafter referred to as 8F) 401 is provided, and the registers in the 7'c8FR 401 corresponding to the processing request generation sources 4d and 4e are accessed by the execution unit 2 via the server 9.

次に第5図のSMCにおける割込み処理動作を説明する
Next, the interrupt processing operation in the SMC shown in FIG. 5 will be explained.

まず実行部2において命令によfiEIフラグをセット
してお@、INTRQ5の発生をチェックしながら、所
定のプログラムを実行している場合について述べる。本
例では処理要求発生源が単一半導体基盤上にある内部処
理要求発生源4eと基盤外部に存在する外部処理要求発
生源4eの2種類の場合について以下説明する。
First, a case will be described in which the fiEI flag is set by an instruction in the execution unit 2 and a predetermined program is executed while checking the occurrence of INTRQ5. In this example, two types of processing request sources will be described below: an internal processing request source 4e located on a single semiconductor board and an external processing request source 4e located outside the board.

各処理要求発生源においてカウンタのオーバフロー動作
、またはシリアルデータの受信動作等によシ割込み要因
が発生すると、各処理要求発生源は各々処理要求gd、
8eを発生し割込み要求制御部1内の割込み要求フラグ
IF103d、IF103eをセットする。割込み要求
制御部1は各IF103d。
When an interrupt factor occurs in each processing request source, such as a counter overflow operation or a serial data reception operation, each processing request source generates a processing request gd,
8e and sets the interrupt request flags IF103d and IF103e in the interrupt request control unit 1. The interrupt request control unit 1 includes each IF 103d.

IF103eの内容とEIフラグ信号線6を介して得た
EIフラグ201の内容を基に、割込み受付は条件の判
定と、優先順位制御を行う。ここでEI7ラグ201は
あらかじめセットされておシ、割込み受付は許可状態で
あるから割込み要求制御部1は、INTRQ5をアクテ
ィブにして割込み処理要求の発生を実行部2に伝える。
Based on the contents of the IF 103e and the contents of the EI flag 201 obtained via the EI flag signal line 6, the interrupt reception conditions are determined and priority control is performed. Here, since the EI7 lag 201 has been set in advance and interrupt acceptance is enabled, the interrupt request control section 1 activates INTRQ5 to notify the execution section 2 of the occurrence of an interrupt processing request.

実行部2はINTRQ5がアクティブになった事を検知
すると、実行中のプログラム処理を中断し、pc、ps
w、レジスタ類の内容をバス9を介してメモリ部3のス
タック302に退避し、割込み要求制御部1に対して割
込み処理プログラムの位置情報を出力させるため0EV
C信号7をアクティブにする。割込み要求制御部1は0
EVC信号7がアクティブになるとベクタコード定数1
01から処理要求発生源に対応した所定のベクタコード
を選択しバス9を介して実行部2に伝える。実行部2は
送られたベクタコードを基に割込み処理プログラムへ分
岐し、またEIフラグ201をリセットし割込み受付は
禁止状態にすると同時にIFフラグのクリア信号(以下
CLRIFという)10をアクティブにして選択された
処理要求発生源に対応するIFフックをクリアする。こ
こで複数の処理要求発生源から処理要求が発生し、複数
のIPフラグがセットされている場合には最も優先順位
の高い処理がただ1つ選択され、他はIPフラグがセッ
トされたまま保留される。従って第5図において処理要
求発生源4d、4eの優先順位を4 d>4 eとし、
同時に処理要求gd、geが発生した場合には処理要求
発生源4dが選択され上記の0EVC7によるベクタコ
ードの出力は処理要求発生源4dに対応したコードが出
力され、またCL几IF信号10によってクリアされる
割込み要求フラグはIF103dとなる。割込み処理プ
ログラムでは処理要求発生源に対応した処理を実行する
。例えばA/D変換によるサンプリング値を引き取シ、
メモリ部3内のデータ格納領域301へ転送する処理や
、周辺装置のモード設定変更処理等が行なわれる。これ
らは処理要求発生源に対応した8FR401中のレジス
タを実行部2がバス9を介してアクセスしデータ処理を
行なうことによシ行なわれる。上記割込み処理プログラ
ムが終了するとスタック301に退避したPC,PSW
、レジスタ類の内容を回復するとともに、EIフラグ2
01を再びセット状態すなわち割込みの受付けを許可状
態に戻して、実行を中断した元のプログラムに復帰する
。ここで行なう、EIフラグ201のセットはEI命令
のような、命令処理で行なうSMCもあるが、割込み処
理起動の際ハードウェア的に退避されるPSWや、レジ
スタ中にEIフラグ201を設定しておきPSW、レジ
スタ類の復帰処理実行時に同時に以前の状態(EIフラ
グ201のセット状態)に復帰させる方式の方がEI命
令の実行処理が不要となり効率的であるため広く用いら
れている。
When the execution unit 2 detects that INTRQ5 has become active, it interrupts the program processing that is being executed, and
w, 0EV to save the contents of registers to the stack 302 of the memory unit 3 via the bus 9 and output the position information of the interrupt processing program to the interrupt request control unit 1;
Activate C signal 7. Interrupt request control unit 1 is 0
When EVC signal 7 becomes active, vector code constant 1
A predetermined vector code corresponding to the processing request generation source is selected from 01 and transmitted to the execution unit 2 via the bus 9. The execution unit 2 branches to the interrupt processing program based on the transmitted vector code, and also resets the EI flag 201 to disable interrupt reception, and at the same time activates the IF flag clear signal (hereinafter referred to as CLRIF) 10 to select the interrupt processing program. Clears the IF hook corresponding to the processing request origin. If processing requests are generated from multiple processing request sources and multiple IP flags are set, only one process with the highest priority is selected, and the others are put on hold with their IP flags set. be done. Therefore, in FIG. 5, the priority order of the processing request generation sources 4d and 4e is set as 4d>4e,
If processing requests gd and ge are generated at the same time, the processing request source 4d is selected, and the vector code output by 0EVC7 described above is output as a code corresponding to the processing request source 4d, and is cleared by the CL IF signal 10. The interrupt request flag to be sent is IF103d. The interrupt processing program executes processing corresponding to the processing request source. For example, when receiving sampling values by A/D conversion,
Processing of transferring the data to the data storage area 301 in the memory unit 3, processing of changing mode settings of peripheral devices, etc. are performed. These operations are performed by the execution unit 2 accessing the register in the 8FR 401 corresponding to the processing request source via the bus 9 and performing data processing. When the above interrupt processing program ends, the PC and PSW are saved to the stack 301.
, restores the contents of registers, and sets the EI flag 2.
01 is set again, that is, interrupt acceptance is enabled, and the original program whose execution was interrupted is returned to. In some SMCs, setting the EI flag 201 here is done by instruction processing such as the EI instruction, but it is also possible to set the EI flag 201 in a PSW that is saved by hardware when starting an interrupt process or in a register. A method of simultaneously returning to the previous state (the set state of the EI flag 201) when executing the process of restoring the PSW and registers is widely used because it eliminates the need to execute the EI instruction and is more efficient.

次にEIフラグ201がリセットされておシ、処理要求
源4d、4eから処理要求gd、8eが発生しても、実
行部2に対して割込み要求制御部1からのINTRQ5
信号がアク信号ブとならない場合について述べる。この
場合、実行部2はINTRQ5をチェックしても処理要
求発生を検出するととが出来ないため、実行部2で処理
されるプログラムで処理要求発生源に対応した8FR4
01中のレジスタ内容をリードして動作状態を監視する
か、割込み要求制御部1のIF103d、103eの内
容をポーリングすることで処理要求8d、8eの発生を
知シ現在実行中のプログラムよシ緊急度の高い場合には
、所定の割込み処理プログラムへ分岐する等の処理を行
なう。
Next, even if the EI flag 201 is reset and processing requests gd and 8e are generated from the processing request sources 4d and 4e, the interrupt request controller 1 sends an INTRQ5 to the execution unit 2.
A case in which the signal does not become an active signal will be described. In this case, the execution unit 2 cannot detect the occurrence of a processing request even if it checks INTRQ5, so in the program processed by the execution unit 2, the 8FR4
The occurrence of processing requests 8d and 8e can be detected by monitoring the operating status by reading the contents of the register 01, or by polling the contents of IF103d and 103e of the interrupt request control unit 1. If the interrupt processing rate is high, processing such as branching to a predetermined interrupt processing program is performed.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述した従来のベクタ割込みによる割込み処理システム
を内蔵したシングルチップマイクロコンピュータではベ
クタ割込み処理の起動時に元のプログラムに正常に復帰
するため、PC,PSW、レジスタ類の退避処理とEI
フラグのリセット処理及び割込み処理プログラムへの分
岐処理が必要で、さらに割込み処理プログラムからの復
帰時に、退避したPC,PSW、  レジスタ類、およ
びEIニアyグ内容の回復といったオーバーヘッドが、
本来の割込み処理プログラムの実行処理以外に常に必要
であった。また、ベクタ割込みの処理プログラム実行中
に、スタック領域の制限から周辺装置とメモリ間のデー
タ転送の様な極めて単純な処理要求が新たに発生しても
処理できないといった問題があシ、複数の処理要求発生
源から短時間に多数の処理要求が発生する様な応用シス
テムにおいては割込み処理システムを内蔵した目的とは
裏腹に効率的かつ高速なデータ処理が実現できないとい
った欠点がある。
In a single-chip microcomputer with a built-in interrupt processing system based on the conventional vectored interrupt described above, in order to normally return to the original program when vectored interrupt processing is started, it is necessary to save the PC, PSW, registers, etc.
Flag reset processing and branch processing to the interrupt processing program are required, and when returning from the interrupt processing program, the overhead of restoring the saved PC, PSW, registers, and EI near-yg contents is required.
It has always been necessary in addition to the original interrupt processing program execution processing. Additionally, during the execution of a vectored interrupt processing program, due to stack area limitations, even if an extremely simple processing request such as a data transfer between a peripheral device and memory occurs, it cannot be processed. In application systems where a large number of processing requests are generated from a request source in a short period of time, there is a drawback that, contrary to the purpose of having a built-in interrupt processing system, efficient and high-speed data processing cannot be realized.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のSMCは単一半導体チップ上にコンピュータ機
能を集積したSMCにおいて、各糧周辺装置からの処理
要求を受けて割込み処理要求を発生する割込み処理要求
制御部と、前記割込み処理要求をユーザプログラムで処
理する第1の処理形態とプログラム実行Kかかわる内部
状態を保持したままマイクロプログラムで処理する第2
の処理形態とを有する実行部と、前記第1の処理形態に
よる割込み処理の実行のみを選択的に禁止する制御手段
とを備え、前記実行部が実行する第2の処理形態による
割込み処理において前記各種周辺装置の動作制御及びデ
ータバッファ用特殊レジスタ部を前記割込み要求制御部
よシ指定させる事により高速な前記割込み処理を実行す
るようにしたものである。
The SMC of the present invention is an SMC in which computer functions are integrated on a single semiconductor chip, and includes an interrupt processing request control unit that generates an interrupt processing request in response to processing requests from various peripheral devices, and a user program that generates the interrupt processing request. The first processing mode is processed by a microprogram, and the second processing is processed by a microprogram while retaining the internal state related to program execution.
and a control means for selectively prohibiting only the execution of the interrupt processing according to the first processing method, and the control means selectively inhibits execution of the interrupt processing according to the second processing method executed by the execution section. The interrupt processing is executed at high speed by having the interrupt request control section designate the operation control of various peripheral devices and the special register section for data buffer.

本発明では、周辺機器あるいは内部回路等の同一半導体
チップの内外に存する処理要求発生源からの処理要求を
プログラムによる指定によシ2種類の処理形態で処理す
ることを特徴とする。第1の処理形態は従来の割込み処
理であり、プログラム処理によって割込み要求を処理す
る(以下、第1の処理形態をベクタ割込みという)。第
2の処理形態は周辺機器、内部回路等処理要求発生源に
対し動作指定及びデータバッファとして使用するSFR
と処理データを記憶するリード、ライト可能なメモリに
対してデータの転送、交換、内容の更新(インクリメン
ト、デクリメント、反転)等一連のデータ処理をユーザ
プログラムの介入なしにマイクロプログラム処理で実施
するものである(以下、上記第2の処理形態をマクロサ
ービスと称する)。マクロサービスでは割込み処理要求
が発生すると実行中のプログラムを中断させて、CPU
の通常のプログラム実行動作を停止し、CPUの種々の
内部ステータス及び汎用レジスタ等のデータを保持した
まま、処理要求発生源に対応したデータ処理を実行する
。マクロサービスはCPU自身の既存のハードウェアを
活用して実現されるもので、FIFO,DMA回路とい
った特別なハードウェアを付加する必要は無い。CPU
はマクロサービスが終了すると保持していたステータス
及びデータによシ中断させていたプログラムを再開する
。従ってソフトウェアからはプログラムの中断はみえず
に、あたかも命令がプログラム処理中に自動的に挿入さ
れたように映る。マクロサービスは内部ステータス情報
のスタック退避、復帰といった操作が必要となるベクタ
割込みの発生頻度を極力少なくシ、ソフトウェア処理負
担を軽減する。
The present invention is characterized in that processing requests from processing request generation sources existing inside and outside of the same semiconductor chip, such as peripheral devices or internal circuits, are processed in two types of processing formats as specified by a program. The first processing type is conventional interrupt processing, in which an interrupt request is processed by program processing (hereinafter, the first processing type is referred to as a vector interrupt). The second processing form is SFR, which is used as an operation specification and data buffer for processing request sources such as peripheral devices and internal circuits.
A series of data processing such as read and write data transfer, data exchange, and content update (increment, decrement, and inversion) to a writable memory is performed by microprogram processing without user program intervention. (Hereinafter, the second processing form will be referred to as a macro service). In the macro service, when an interrupt processing request occurs, the running program is interrupted and the CPU is
The normal program execution operation of the CPU is stopped, and data processing corresponding to the processing request source is executed while various internal statuses of the CPU and data of general-purpose registers and the like are held. Macro services are realized by utilizing the existing hardware of the CPU itself, and there is no need to add special hardware such as FIFO or DMA circuits. CPU
When the macro service ends, the suspended program is restarted using the status and data that it held. Therefore, the interruption of the program is not visible to the software, and it appears as if the instruction was automatically inserted during program processing. The macro service minimizes the frequency of vectored interrupts that require operations such as saving and restoring internal status information from the stack, thereby reducing the software processing load.

たとえばシリアルインタフェース回路の受信データをメ
モリに引き取る場合や、A/Dコンバー /装置におけ
る変換値の読み出しといった従来ペクタ割込み処理で対
応していた周辺装置のSPRとメモリのバッファ領域間
の簡単なデータ処理はこのマクロサービス処理によって
大変高速かつ効率的に実施する事ができる。
For example, simple data processing between the SPR of a peripheral device and the buffer area of the memory, which was previously handled by Pector interrupt processing, such as when receiving data from a serial interface circuit is transferred to memory, or when reading converted values from an A/D converter/device. can be executed very quickly and efficiently using this macro service processing.

〔実施例〕〔Example〕

次に本発明の第一の実施例を図面を参照して説明する。 Next, a first embodiment of the present invention will be described with reference to the drawings.

第1図はその構成要素を示すブロック図であシ、周辺装
置など処理要求発生源4からの処理要求8の制御と制御
に必要なフラグおよび割込み処理に必要な定数部を含ん
だ割込み要求制御部1、割込み要求制御部1から発生す
る割込み処理要求に応じた動作を含め8MC全体の実行
動作制御を行う実行部2、ベクタ割込み処理実行時に使
用されるスタック302、データの格納領域301、及
びマクロサービスで使用するレジスタを含むメモリ部3
、周辺装置等処理要求発生源4と処理要求発生源4の動
作指定、データ授受に使用する特殊レジスタを含む8F
R401,実行部2に対して割込み要求制御部1が割込
み処理要求を伝える信号線INTRQ5 、割込みの処
理形態をベクタ割込み処理で行なうか、マクロサービス
処理で行なうかを指定する割込み処理形態指定信号線M
8/lNT14(以下M8/lNT14と記す)、割込
み要求制御部1.実行部2.)モI)部3.5FR40
1ty)間でデータ授受を行なうための信号線バス9、
各処理要求発生源からの処理要求によってセットされ、
処理要求の発生を記憶する各IFよシなる。
FIG. 1 is a block diagram showing its components. Interrupt request control includes flags necessary for controlling and controlling processing requests 8 from processing request generation sources 4 such as peripheral devices, and constant parts necessary for interrupt processing. unit 1, an execution unit 2 that controls execution operations of the entire 8MC including operations in response to interrupt processing requests generated from the interrupt request control unit 1, a stack 302 used when executing vector interrupt processing, a data storage area 301, and Memory section 3 containing registers used in macro services
, 8F including special registers used for specifying the operation of the processing request generation source 4 such as peripheral devices and the processing request generation source 4, and for exchanging data.
R401, signal line INTRQ5 through which the interrupt request control unit 1 transmits an interrupt processing request to the execution unit 2, an interrupt processing type designation signal line that specifies whether the interrupt processing type is to be performed by vector interrupt processing or macro service processing. M
8/lNT14 (hereinafter referred to as M8/lNT14), interrupt request control unit 1. Execution unit 2. )Mo I) Part 3.5FR40
a signal line bus 9 for exchanging data between 1ty);
Set by processing requests from each processing request source,
Each IF stores the occurrence of a processing request.

割込み要求フラグ群IF103、各処理要求発生源の処
理要求を割込みで処理する際の処理実行形態を記憶する
各処理形態指定フラグ(以下MSFと記す)よシなる処
理形態指定フラグ群MSF104、ベクタ割込み処理実
行時に実行部2からの定数出力要求12に応じて出力す
るベクタコード情報を記憶するペクタコード定数部10
1、マクロサービスの実行に際し、マクロサービスの処
理内容及び使用するメモリアドレス情報を記憶するマク
ロサービス・チャネルレジスタMSC(以下MSCと記
す)303、及びマクロサービス起動待処理要求発生源
4に対応したMSC303のアドレス情報を記憶し、実
行部2からの定数出力要求12に応じて出力するMSC
アドレス定数部1o5、マクロサービスでアクセスする
各処理要求発生源に対応した8FR401のアドレス情
報を記憶し、実行部2からのSPRアドレス定数出力要
求13に応じて出力する8FBアドレス定数部106と
SPRアドレス指定線15、実行部2よシ割込み処理の
終了を指示し、Ir2O3中の各処理要求発生源に対応
したIPのクリアを行なうCLRIF信号10、実行部
2よシマクロ丈−ビスの処理終了時にM8F104中の
各処理要求発生源に対応し九MSFのリセットを行なう
処理形態指定フラグクリア信号CLRM8 (以下CL
RMSと記す)11、およびEIフラグ201の内容を
割込み要求制御部IK伝える信号線6とを有する。
Interrupt request flag group IF 103, processing mode specification flag group MSF 104, which is a processing mode specification flag (hereinafter referred to as MSF) that stores the processing execution mode when processing the processing request of each processing request source by interrupt, and vector interrupt. A vector code constant unit 10 that stores vector code information to be output in response to a constant output request 12 from the execution unit 2 during processing execution.
1. A macroservice channel register MSC (hereinafter referred to as MSC) 303 that stores the processing contents of the macroservice and memory address information to be used when executing the macroservice, and an MSC 303 that corresponds to the macroservice startup processing request source 4. MSC that stores the address information of and outputs it in response to the constant output request 12 from the execution unit 2.
Address constant part 1o5, 8FB address constant part 106 and SPR address which store address information of 8FR401 corresponding to each processing request source accessed by macro service and output in response to SPR address constant output request 13 from execution part 2 Specified line 15, CLRIF signal 10, which instructs the execution unit 2 to terminate interrupt processing and clears the IP corresponding to each processing request source in Ir2O3; A processing mode designation flag clear signal CLRM8 (hereinafter CL
RMS) 11, and a signal line 6 for transmitting the contents of the EI flag 201 to the interrupt request control unit IK.

次に第1図を用いて本実施例の動作を説明する。Next, the operation of this embodiment will be explained using FIG.

処理要求発生源4よシ処理要求8が発生し処理要求発生
源に対応した、Ir2O3がセットされると割込み要求
制御部1は、EIフラグ201と処理要求発生源に対応
したMSF104の内容を基に優先順位および割込み受
付は条件の判定を行なって工NTRQ5.MS/lNT
14を通じて割込み要求の発生を実行部2に伝える。こ
こで割込み要求制御部1の実行する割込みの受付は条件
の判定と、INTRQ5.MS/lNT14の信号レベ
ルはEIフ2グ201と割込み要求に対応するMSF1
04の内容に従って以下3つの状態に分けられる。
When a processing request 8 is generated from the processing request generation source 4 and Ir2O3 corresponding to the processing request generation source is set, the interrupt request control unit 1 uses the EI flag 201 and the contents of the MSF 104 corresponding to the processing request generation source. The priority order and interrupt acceptance are determined by determining the conditions and processing NTRQ5. MS/lNT
14, the execution unit 2 is informed of the occurrence of the interrupt request. Here, the interrupt request control unit 1 executes interrupt acceptance by determining conditions and INTRQ5. The signal level of MS/1NT14 is the EI flag 201 and MSF1 corresponding to the interrupt request.
It is divided into the following three states according to the contents of 04.

第一は、EI7.F/201.MSF104がともにリ
セットされている場合で、この時に[INTRQ5、M
S/lNT14はともにノンアクティブレベルとなシ割
込み要求はIr2O3がセットされ良状態で保留される
The first is EI7. F/201. When both MSF104 are reset, at this time [INTRQ5, M
Both S/1NT14 are at non-active level, and Ir2O3 is set and the interrupt request is held in good condition.

第二は、EI7ラグ201がセットされておシ。The second one is set with EI7 lug 201.

M8F104がリセットされている場合で、この時には
INTRQ5がアクティブレベル、MS/lNT14が
ノンアクティブレベルとなる。実行部2はINTRQ5
がアクティブレベルとなった事を検知すると実行中のプ
ログラムを一時中断して割込み要求の処理動作に移る。
This is a case where the M8F104 is reset, and at this time, INTRQ5 is at an active level and MS/1NT14 is at a non-active level. Execution unit 2 is INTRQ5
When it detects that the current level has reached the active level, the program being executed is temporarily suspended and processing of the interrupt request begins.

さらに実行部2dM8/lNT14信号のレベルによっ
てペクタ割込み処理で割込み処理を受付けるか、マクロ
サービス処理で受付けるかを選択して処理をおこな9゜
第二の場合にはMS/lNT14信号がノンアクティブ
レベルなので従来の割込み処理と同様にしてペクタ割込
み処理で割込み要求の処理を行なり。第三は、MSF1
04がセットされている場合で、この時にはEI7?グ
201の内容とは無関係KINTRQ5、MS/lNT
14をともにアクティブレベルにする。
Furthermore, depending on the level of the execution unit 2dM8/lNT14 signal, it is selected whether the interrupt processing is accepted by pecter interrupt processing or macro service processing, and the processing is performed. Therefore, interrupt requests are processed using Pector interrupt processing in the same way as conventional interrupt processing. The third is MSF1
If 04 is set, at this time EI7? KINTRQ5, MS/lNT
14 to the active level.

実行部2はINTRQsのアクティブレベルを検知し、
MS/lNT14がアクティブレベルとなっている事を
知ると、割込み要求をマクロサービスで処理する事を選
択し、現在実行中のプログ2ムを一時中断して、マクロ
サービスのマイクロプログラム処理動作に移る。すなわ
ち実行部2は定数出力要求12をアクティブにして割込
み要求制御部10M8Cアドレス定数部105よ)処理
要求発生源に対応したMSC303のアドレス情報をバ
ス9を介して出力させる。
The execution unit 2 detects the active level of INTRQs,
When it learns that the MS/lNT14 is at the active level, it selects to process the interrupt request with the macro service, suspends the currently running program, and moves to the micro program processing operation of the macro service. . That is, the execution unit 2 activates the constant output request 12 and causes the interrupt request control unit 10M8C address constant unit 105 to output address information of the MSC 303 corresponding to the processing request generation source via the bus 9.

さらにこのM8Cアドレス情報を基にメモリ部3内にあ
るMSC303を読み出してマクロサービスで使用する
メモリ部3内のデータ格納領域303のアドレス情報、
データ処理内容といった情報を得てマクロサービス処理
を開始する。この時、M80303の内容で指定される
マクロサービス処理が、例えば処理要求発生源4に対応
した8FR401に対してモード設定用のデータをセッ
トする動作であった場合には、実行部2は続いてSFR
定数出力要求13を出力し、割込み要求制御部1のSF
Rアドレス定数部106から処理要求発生源に対応した
SFRアドレス情報を出力させ、SFRアドレス指定線
15を介して5FR401を指定し、同時にMSC3Q
3の内容で指定されたメモリ部3内のデータ格納領域3
01からバス9を介してデータを出力させ、5FR40
1に転送する。前述の内容と逆に、マクロサービスの処
理内容が、処理要求発生源4に対応した8FR401の
内容をデータ格納領域302へ転送する場合にも同じく
実行部2が割込み要求制御部1に対してSFRアドレス
定数部106からSPR,定数を出力させ、SFR。
Furthermore, based on this M8C address information, the MSC 303 in the memory unit 3 is read out, and the address information of the data storage area 303 in the memory unit 3 used in the macro service,
After obtaining information such as data processing contents, macro service processing is started. At this time, if the macro service processing specified by the contents of M80303 is, for example, an operation to set data for mode setting in the 8FR401 corresponding to the processing request source 4, the execution unit 2 SFR
Outputs the constant output request 13 and interrupts the SF of the interrupt request control unit 1.
The SFR address information corresponding to the processing request generation source is output from the R address constant section 106, and 5FR401 is specified via the SFR address designation line 15, and at the same time, the MSC3Q
Data storage area 3 in memory unit 3 specified by the contents of 3
Data is output from 01 via bus 9, and 5FR40
Transfer to 1. Contrary to the above-mentioned content, when the processing content of the macro service is to transfer the content of the 8FR 401 corresponding to the processing request generation source 4 to the data storage area 302, the execution unit 2 also sends the SFR to the interrupt request control unit 1. The address constant section 106 outputs SPR and constant, and SFR.

アドレス指定線15を介して指定した8FR401よシ
データをバス9に読み出し、M80303の内容で指定
されるメモリ部3のデータ格納領域302へ転送するこ
とで行なう。
This is done by reading the specified 8FR401 data via the address designation line 15 onto the bus 9 and transferring it to the data storage area 302 of the memory section 3 specified by the contents of M80303.

マクロブービスが終了した場合にはCLRIF信号10
をアクティブにしてIr2O3をリセットし、INTR
Q5をノンアクティブレベルに戻して割込み処理を終了
中断した元のプログラムを再開する。
CLRIF signal 10 when macroboobis ends
Activate to reset Ir2O3 and INTR
Q5 is returned to the non-active level, the interrupt processing is terminated, and the interrupted original program is resumed.

またこれらのマクロサービスによるデータ転送処理の実
行回数をカウントし所定回数のデータ転送処理が終了し
た場合には続いてペクタ割込み処理を起動し、割込み処
理プログラムでデータの平均化、演算処理を行なわせる
ことも容易に実現できる。これには例えば、データ格納
領域302内に転送データのバッファエリアと、転送バ
ッファエリアのアドレスを示すポインタ用メモリ(以下
MPという)及び転送回数をカウントするカウンタ用メ
モリ(以下TCという)を割シ付ける。MPとTCのア
ドレス情報はM80303の内容で指定されるものとし
、TCにセットする転送回数はあらかじめプログラムに
よって設定しておく。マクロサービスが起動されるシー
ケンスは先の例に示したものと同一であるが、転送処理
の際に使用される転送データのバッファエリアは今度は
MPの内容によって指定する。MPの内容で指定された
メモリとSPRとの間で転送処理が終了したならば、実
行部2は続いてMPの内容を1加算し、TCの内容を1
減算して再び各々MP 、TCに格納して次にTCの内
容がO#か否かをチェックする。ここでTC−irOで
あった場合にはCLRIFIO信号をアクティブにし、
処理要求発生源に対応したIr2O3をリセットし、I
NTRQ5をノンアクティブレベルに戻してマクロサー
ビスを終了する。
In addition, the number of executions of data transfer processing by these macro services is counted, and when a predetermined number of data transfer processing is completed, Pector interrupt processing is subsequently started, and data averaging and calculation processing are performed by the interrupt processing program. This can also be easily achieved. For example, in the data storage area 302, a buffer area for transfer data, a pointer memory (hereinafter referred to as MP) indicating the address of the transfer buffer area, and a counter memory (hereinafter referred to as TC) for counting the number of transfers are allocated. wear. It is assumed that the address information of MP and TC is specified by the contents of M80303, and the number of transfers set in TC is set in advance by a program. The sequence in which the macro service is activated is the same as that shown in the previous example, but the buffer area for transfer data used during transfer processing is now specified by the contents of MP. When the transfer process between the memory specified by the contents of MP and the SPR is completed, the execution unit 2 next adds 1 to the contents of MP and sets the contents of TC to 1.
After subtraction, the values are stored in MP and TC respectively, and then it is checked whether the contents of TC are O# or not. If it is TC-irO here, activate the CLRIFIO signal,
Reset Ir2O3 corresponding to the processing request source, and
Return NTRQ5 to the non-active level and end the macro service.

TC〜0であった場合にはCLRM811信号をアクテ
ィブにして処理要求発生源に対応したM8F104をリ
セットし、Ir2O3はその゛ままの状態でセットして
おき、マクロサービス処理を終了する。これにより、E
I7ラグ201がセットされている場合にはINTRQ
5はアクティブレベル、M8/lNT14のみがノンア
クティブレベルとなるので、実行部2は続いてペクタ割
込みの処理を起動古iることが出来る。またEI7ラグ
201がリセットされておシ、スタックを深くシ九<な
いような応用プログラムを実行中であった場合には、I
NTRQ5はノンアクティブレベルになシ、Ir2O3
がセット状態のまま、っまシベクタ割込みが保留された
状態でマクロサービスを終了することが出来る。
If it is TC~0, the CLRM811 signal is activated to reset the M8F104 corresponding to the processing request generation source, Ir2O3 is left set as it is, and the macro service processing is terminated. As a result, E
INTRQ if I7 lug 201 is set
5 is at the active level, and only M8/1NT14 is at the non-active level, so that the execution unit 2 can subsequently start processing of the vector interrupt. Also, if the EI7 lag 201 has been reset and an application program that does not have a deep stack is being executed, the I
NTRQ5 should be at non-active level, Ir2O3
It is possible to end the macro service while the vector interrupt is still set and the vector interrupt is pending.

マクロサービス処理ではバス9を経由し、実行部2の制
御の基に行なわれるが、ステータス及びPC,レジスタ
類の内容は全て保持されておシ。
Macro service processing is carried out via the bus 9 under the control of the execution unit 2, but the status and contents of the PC and registers are all retained.

ベクタ割込み処理で必要とされたpc、psw、レジス
タ類の退避、復帰操作、およびEIフラグのセット、リ
セットの操作が不要となる。さらにマクロサービスで使
用されるメモリはM3C303の内容で指定されたもの
のみが使用されること、及び複数のマクロサービス処理
は互いに排他的でネスティングされることが無いため、
ベクタ割込みのようにスタックの容量の制限といった問
題でマクロサービスの処理起動を制限する必要はない。
It becomes unnecessary to save and restore the PC, psw, and registers, and to set and reset the EI flag, which are required in vector interrupt processing. Furthermore, the memory used by the macro service is only that specified by the contents of M3C303, and multiple macro service processes are mutually exclusive and are not nested.
Unlike vectored interrupts, there is no need to limit the startup of macro service processing due to stack capacity limitations.

またマクロサービスによる割込み処理をも禁止したい場
合には、各処理要求発生源に対応したMSF104をプ
ログラムによってリセットしておけば良く、ペクタ割込
みの禁止、許可を制御するEI7ラグ201以外にマク
ロサービス処理の禁止、許可を制御する専用ハードウェ
アを特別に設ける必要はない。
If you also want to prohibit interrupt processing by macro services, you can reset the MSF 104 corresponding to each processing request source by program. There is no need to provide special hardware to control the prohibition and permission of

次に第1図における割込み要求制御部1に含まれる優先
順位制御、割込み要求受付は判定回路102と、Ir2
O3,MSF104のやや詳細なブロック図を第2図に
示しその動作を説明する。ここでは処理要求発生源がa
、b、cの3種として説明する。
Next, the priority control and interrupt request reception included in the interrupt request control unit 1 in FIG.
A somewhat detailed block diagram of O3 and MSF 104 is shown in FIG. 2, and its operation will be explained. Here, the processing request source is a
, b, and c.

第2図は、処理要求発生源a、b、cからの処理要求8
a、8b、 8cと、前記処理要求によってセットされ
るIF103a、103b、103c、処理要求毎の割
込み処理形態を指定するMSF104a、104b。
FIG. 2 shows processing requests 8 from processing request sources a, b, and c.
a, 8b, 8c, IFs 103a, 103b, 103c that are set by the processing request, and MSFs 104a, 104b that specify the interrupt processing form for each processing request.

104Cと、IF、MSFおよびEIエフラグ信号6内
容から各処理要求の受付は条件判定を行なうAND−O
RCIシック501a、501b、501cと、優先順
位制御を行なう優先順位制御回路部109と、ベクタコ
ード定数、M8Cアドレス定数、81几アドレス定数の
指定及び実行部からのCLRIF信号10 、 CLR
MS信号11によってリセットすべきIB’、MSFを
指定する割込み要求選択信号線505a 、 505b
 、 505cと、実行部に対する割込み処理要求IN
TRQ5.処理形態指定線M8/lNT14、EIフラ
グの内容を伝えるEIエフラグ信号6シなる。
104C, IF, MSF, and EI Effrag signal 6. Acceptance of each processing request is an AND-O that performs condition judgment.
RCI chics 501a, 501b, and 501c, a priority control circuit unit 109 that performs priority control, vector code constants, M8C address constants, and CLRIF signals 10 and CLR from the 81 address constant designation and execution unit.
Interrupt request selection signal lines 505a and 505b specifying IB' and MSF to be reset by the MS signal 11
, 505c and an interrupt processing request IN to the execution unit.
TRQ5. Processing mode designation line M8/1NT14 and EI flag signal 6 which conveys the contents of the EI flag.

まず第一にIF、MSFがともにリセット状態にあp、
EI7エフラグ信号6イレベルとなっている時に処理要
求8aが発生した場合について説明する。処理要求8a
の発生によシエ上’103aがセットされる、IF10
3aの出力はAND−ORゲート501aに伝えられ、
MSF104aの出力か、Eエフラグ信号6のレベルが
ハイレベルであれば、AND−ORゲート501の出力
もハイレベルとなって、優先順位制御回路部109に伝
えられる。
First of all, both IF and MSF are in reset state,
The case where the processing request 8a is generated when the EI7 eff flag signal 6 is at the high level will be explained. Processing request 8a
103a is set due to the occurrence of IF10.
The output of 3a is transmitted to AND-OR gate 501a,
If the output of the MSF 104a or the E-effrag signal 6 is at a high level, the output of the AND-OR gate 501 also becomes a high level and is transmitted to the priority control circuit section 109.

ここではM8F104aのレベルはロウであるが、Eエ
フラグ信号6の出力がハイレベルであるから、AND−
0几ゲート501aの出力はハイレベルとなる。優先順
位制御回路部109はAND−0几ゲートの出力がハイ
レベルになると、ハイレベルとなったAND−ORゲー
トの出カ中最も優先順位の高いものを選択して対応する
割込み要求選択信号線をハイレベルにする。ここではハ
イレベルとなったAND−ORゲートは、AND−OR
ゲート5o1aのみであるから、割込み要求選択信号5
05aが選択されてハイレベルとなる。また優先順位制
御回路109は割込み要求選択信号発生と同時にINT
RQ5をアクティブにし、割込み処理要求の発生を実行
部に伝えるとともに、選択した割込み要求選択信号に対
応するMSFの内容をMS/lNT14上に出力して割
込みの処理形態指定を行なう。ここではM8F104a
が選択され、MS/lNT14に伝えられる。すなわち
MS/lNT14はロウレベルとなっている。実行部は
INT几Q5がハイレベルになるとMS/lNT14の
レベルに応じた割込み処理を起動する、ここではMS/
I NT 14がロウレベルであるからペクタ割込み処
理が起動される。ペクタ割込み処理起動時、実行部よシ
送られる定数出力要求に応じて割込み要求制御部が出力
するペクタコード定数の内容は、割込み要求選択信号と
MS/lNT14のレベルで決定される。また実行部か
らのCLRIF信号10によって割込み要求選択信号線
で選択されるI F、、ここではIF103aがリセッ
トされることでAND−ORゲート501aの出力がロ
ウレベル、割込み要求選択信号線505a。
Here, the level of the M8F104a is low, but the output of the Efrag signal 6 is high level, so the AND-
The output of the zero gate 501a becomes high level. When the output of the AND-0 gate becomes high level, the priority control circuit section 109 selects the one with the highest priority among the outputs of the AND-OR gates that have become high level, and outputs the corresponding interrupt request selection signal line. to a high level. Here, the AND-OR gate that has become high level is AND-OR
Since there is only gate 5o1a, interrupt request selection signal 5
05a is selected and becomes high level. Furthermore, the priority control circuit 109 receives the INT signal at the same time as the interrupt request selection signal is generated.
It activates RQ5 to notify the execution unit of the occurrence of an interrupt processing request, and outputs the contents of MSF corresponding to the selected interrupt request selection signal to MS/lNT 14 to designate the interrupt processing mode. Here M8F104a
is selected and communicated to the MS/lNT 14. That is, MS/1NT14 is at a low level. When the INTQ5 goes high, the execution unit starts interrupt processing according to the level of the MS/1NT14.
Since I NT 14 is at a low level, Pector interrupt processing is activated. When pecta interrupt processing is started, the contents of the pecta code constant output by the interrupt request control section in response to a constant output request sent from the execution section are determined by the interrupt request selection signal and the level of the MS/1NT 14. Further, the IF selected by the interrupt request selection signal line 505a by the CLRIF signal 10 from the execution section is reset, so that the output of the AND-OR gate 501a is at a low level, and the IF 103a is reset.

INTRQsが全てロウレベルとなら、ペクタ割込み処
理起動が終了する。
When all INTRQs are at low level, the startup of the vector interrupt process ends.

第二にM8F104aがセット状態となっている時に処
理要求8aが発生する場合について述べる。
Second, a case will be described in which the processing request 8a occurs when the M8F 104a is in the set state.

処理要求8aが発生しIF103aがセットされると、
EI7ラグ信号6のレベルに係わらずAND−ORグー
)501aの出力はハイレベルとなシ優先順位制御回路
10aに伝えられる。優先順位制御回路10aはハイレ
ベルを出力しているAND−ORゲートの内最も優先順
位の高いものを選択し対応する割込み要求選択信号をハ
イレベルにする。ここでは、AND−ORゲート501
aのみがハイレベルであるから、割込み要求選択信号5
05aがハイレベルとなる。さらに優先順位制御回路1
0aはINTRQ5をハイレベルにし、実行部に割込み
処理要求を伝えるとともに、割込み要求選択信号505
aに対応したM8F104aの内容をM8/lNT14
上に出力する。ここでは、MSF104aはセットされ
ているのでMS/lNT14はハイレベルとなる。実行
部はINTRQ5=ハイ・レベル、M8/lNT14=
ハイレベルであることを検知しマクロブービス処理を実
行する。マクロサービスの実行時、実行部からの定数出
力要求及び8FRアドレス定数出力要求に応じて割込み
要求制御部は割込み要求選択信号線505aとMS/l
NT14によって選択されるMSCアドレス定数及びS
FRアドレス定数を出力する。またマクロサービス処理
終了時実行部よ#)CLRIF信号10が出力されると
IP I O3a 、 AND−ORゲート501a、
割込み要求選択信号線505a、INTRQ5が全てロ
ウレベルとなシ、マクロサービス処理が終了する。しか
しここで、実行部よjl)CLRIF信号10が出力さ
れずにCLRM8信号11が出力されると、割込み要求
選択信号505aで選択されているMSF104aがリ
セットされるのみでIF103aの内容は変化しない。
When the processing request 8a occurs and the IF 103a is set,
Regardless of the level of the EI7 lag signal 6, the output of the AND-OR signal 501a is at a high level and is transmitted to the priority control circuit 10a. The priority control circuit 10a selects the one with the highest priority among the AND-OR gates outputting a high level, and sets the corresponding interrupt request selection signal to a high level. Here, AND-OR gate 501
Since only a is at high level, interrupt request selection signal 5
05a becomes high level. Furthermore, priority control circuit 1
0a sets INTRQ5 to high level, transmits an interrupt processing request to the execution unit, and also outputs the interrupt request selection signal 505.
M8/lNT14 the contents of M8F104a corresponding to a.
Output on top. Here, MSF104a is set, so MS/1NT14 becomes high level. In the execution part, INTRQ5=high level, M8/lNT14=
Detects that the level is high and executes macroboobice processing. When a macro service is executed, the interrupt request control unit selects the interrupt request selection signal line 505a and MS/l in response to a constant output request and an 8FR address constant output request from the execution unit.
MSC address constant and S selected by NT14
Outputs FR address constant. Also, when the macro service processing completion execution unit #) CLRIF signal 10 is output, the IP I O3a, AND-OR gate 501a,
When the interrupt request selection signal line 505a and INTRQ5 are all set to low level, the macro service process ends. However, if the execution unit 1) CLRIF signal 10 is not output and the CLRM8 signal 11 is output, only the MSF 104a selected by the interrupt request selection signal 505a is reset, and the contents of the IF 103a do not change.

従ってEIフラグ信号6がハイレベルであれば、AND
−ORグー)501aの出力はハイレベルのまま保持さ
れ、割込み要求選択信号505a、INTRQ5はハイ
レベルのままで、MS/lNT14のレベルのみがハイ
レベルからロウレベルに変化する。これによシ実行部は
INTRQ5=ハイレベルM8/lNT14=ロウレベ
ルを検知しマクロサービス処理終了後、続いてペクタ割
込み処理に移ることが可能となる。また、EIフラグ信
号6がロウレベルであれば、実行部からのCLRMS信
号11により、M8F104aがリセットされると、A
ND−ORケート501aの出力レベルはロウレベルと
なり、割込み要求選択信号線505a、INTRQ5も
ロウレベルとなって、IF103aがセットされたまま
マクロサービス処理が終了する。
Therefore, if the EI flag signal 6 is at a high level, the AND
-OR) 501a remains at high level, interrupt request selection signal 505a and INTRQ5 remain at high level, and only the level of MS/1NT14 changes from high level to low level. As a result, the execution unit detects INTRQ5=high level and M8/1NT14=low level, and after the macro service processing is completed, it is possible to proceed to the vector interrupt processing. Furthermore, if the EI flag signal 6 is at a low level, when the M8F 104a is reset by the CLRMS signal 11 from the execution section, the A
The output level of the ND-OR gate 501a becomes a low level, the interrupt request selection signal line 505a and INTRQ5 also become a low level, and the macro service processing ends with the IF 103a set.

第三に、M8F104aがリセット状態、EI7ラグ信
号6がロウレベルの時に処理要求8aが発生した場合に
ついて述べる。この時には、処理要求8aによってIF
103aがセットされても、AND−O)Iゲート50
1aの出力はロウレベルのままであるから、処理要求の
発生が優先順位制御回路10aに伝わらず、割込み処理
要求は保留される。
Third, a case will be described in which the processing request 8a occurs when the M8F 104a is in the reset state and the EI7 lag signal 6 is at a low level. At this time, the IF
Even if 103a is set, AND-O) I gate 50
Since the output of 1a remains at a low level, the occurrence of a processing request is not transmitted to the priority control circuit 10a, and the interrupt processing request is suspended.

これは第二のマクロサービス処理の説明中でEI72グ
信号6がロウレベルの時に、実行部がマクロサービス処
理をCLRM8信号11を出力して終了した時の状態と
同一である。
This is the same state as when the execution section outputs the CLRM8 signal 11 and ends the macro service process when the EI72 signal 6 is at a low level in the explanation of the second macro service process.

上記、第一、第二、第三の説明は処理要求発生源aに対
応した動作を説明したが、処理要求発生源す、cに対応
した動作もIF103b、103c、MSF104b、
104c、AND−ORゲー)501b、501c割込
み要求選択信号線505b 、 505cを用いて全く
同一のシーケンスで行なわれる。以上説明した様に本実
施例ではペクタ割込み処理はEIフラグ内容により、禁
止・許可制御を行なうが、pc。
In the first, second, and third explanations above, the operations corresponding to the processing request generation source a have been explained, but the operations corresponding to the processing request generation sources G, C, as well as the IFs 103b, 103c, MSF 104b,
104c, AND-OR game) 501b and 501c are performed in exactly the same sequence using interrupt request selection signal lines 505b and 505c. As explained above, in this embodiment, the PC interrupt processing is prohibited/permitted depending on the contents of the EI flag.

psw、等の操作が不要であるマクロサービス処理はE
Iフ2グ内容に係わらず、常に処理要求を受付け、処理
する事が可能となる。またマクロサービス処理に続いて
ペクタ割込み処理を実行する事も容易に実現でき、この
時のベクタ割込み処理の禁止・許可制御は、EIフラグ
内容による通常のベクタ割込み処理の受付は制御と全く
同様に行われる。
Macro service processing that does not require operations such as psw is E.
Regardless of the contents of the I flag, it is possible to always accept and process processing requests. It is also easy to execute vector interrupt processing following macro service processing, and the prohibition/enablement control of vector interrupt processing at this time is exactly the same as the control of acceptance of normal vector interrupt processing based on the contents of the EI flag. It will be done.

以上説明した本発明による8MCでは、処理要求をマク
ロサービスによって処理することによシ、内部ステータ
ス情報のスタック退避、復帰といった操作が不要になり
、ベクタ割込み処理のみで処理要求を処理する場合に比
ベプログラムの実行効率をよシ高める効果がある。また
時にマクロサービス処理中、割込み要求制御部よシ処理
要求発生源に対応した8FRを直接指定する事ができる
ため、A/D変換器のサンプリンゲータをA/D変換器
の8FRよシ内部メモリに引き取る処理や、シリアル送
受信回路のデータバック78FRと内部メモリとのデー
タ転送処理といった処理は大変高速に実行することがで
きる。これは仮にメモリ部等に8FBアドレス情報が設
定されている場合を考えると、実行部が割込み要求制御
部おるいはM2Oの内容から、必要な8FBアドレス情
報を設定したメモリのアドレス情報を取シ出し、これを
基にメモリをアクセスし8FRアドレス情報を得た後、
処理要求発生源に対応したSFRをアクセスしてデータ
処理を実行するといったシーケンスを取る事になるが、
以上の様な方式と本実施例の様に割込み要求制御部よシ
直接8FRアドレスを指定し、直ちにデータ転送を行な
う方式とを比較してみれば明らかである。さらに、マク
ロサービス処理は通常の命令をデコードして実行するの
と同様なマイクロプログラム処理で実行されるため、互
いに排他的に実行処理される事およびペクタ割込み処理
の様にスタック領域への内部ステータス情報の退避を行
なう必要がないため内部スタック領域の容量によるネス
ティングの制限といった問題は全く発生しない。従って
、ペクタ割込み処理の様にEI7ラグ等を用いて割込み
処理要求の受付けを禁止・許可する必要が無く、ユーザ
ーの意図に反して、高速データ処理が必要な処理要求発
生源からの処理要求を保留するといった無駄時間を最小
に押さえる事が可能となる。
In the 8MC according to the present invention described above, by processing processing requests using macro services, operations such as saving and restoring internal status information from the stack are unnecessary, compared to the case where processing requests are processed only by vector interrupt processing. This has the effect of greatly increasing the execution efficiency of the program. Also, during macro service processing, the interrupt request controller can directly specify the 8FR corresponding to the processing request source. Processing such as data transfer processing between the data back 78FR of the serial transmitting/receiving circuit and internal memory can be executed at very high speed. This means that if we consider a case where 8FB address information is set in the memory section, etc., the execution section will extract the address information of the memory in which the necessary 8FB address information is set from the interrupt request control section or the contents of M2O. After accessing the memory and obtaining 8FR address information based on this,
The sequence is to access the SFR corresponding to the processing request source and execute data processing.
This becomes clear when comparing the above method with the method of this embodiment in which the interrupt request control section directly specifies the 8FR address and immediately performs data transfer. Furthermore, since macro service processing is executed by microprogram processing similar to decoding and executing normal instructions, the execution processing is mutually exclusive, and like pectoral interrupt processing, the internal status is stored in the stack area. Since there is no need to save information, problems such as limitations on nesting due to the capacity of the internal stack area do not occur at all. Therefore, there is no need to use the EI7 lag to prohibit or allow acceptance of interrupt processing requests as in Pectoral interrupt processing, and processing requests from processing request sources that require high-speed data processing are not accepted, contrary to the user's intention. This makes it possible to minimize wasted time such as being put on hold.

第3図は本発明の第2の実施例の要部を示すブロック図
でおる。第3図は、各処理要求発生源から発生する処理
要求によってセットされるIFI03、各処理要求に基
づく割込み処理の形態を指定するMSF104、各側込
み要求の受付けの禁止許可の制御を行なう割込みマスク
フラグMK(以下MKという)よりなる割込みマスクフ
ラグ群MK510.ペクタ割込みの処理実行で使用する
ペクタコード情報を含むベクタコード定数部101、M
SCアドレスの情報を含む、MSCアドレス定数部10
5、処理要求発生源に対応した8F几アドレス情報を含
む、SFRアドレス定数部106、各処理要求の受付は
条件の判定と、優先順位制御を行なう優先順位制御、割
込み要求受付は判定回路102以上を含んだ割込み要求
制御部1と、割込み要求制御部1の発生するINTRQ
5.MS/lNT14をもとに割込み処理要求の受付制
御を行ない、CL几IFto、CL几MSII、定数出
力要求信号12゜SFRアドレス定数出力要求信号13
、ベクタ割込みの受付けの禁止/許可制御を行なうEI
フラグ201およびEIフラグの内容を伝える信号線6
によシ割込み要求制御部1の動作制御を行ない、さらK
SMC全体の実行制御を行なう。実行部2と、実行部2
よシバス9を介してアクセスされ、ペクタ割込みで使用
されるスタック302、マクロサービスで使用するMS
C303,及び各種データの格納領域301を含むメモ
リ部3と、A/D変換回路、タイマ、カウンタ等の処理
要求を発生する機能を持つ周辺装置でおって、実行部2
よシバス9を介してまえ割込み要求制御部1よjDsF
Bアドレス指定線15を介してアクセス可能な5FR4
01を含み、割込み要求制御部1に対して処理要求8を
伝える処理要求発生源4とを有する。
FIG. 3 is a block diagram showing the main parts of a second embodiment of the present invention. FIG. 3 shows an IFI 03 that is set by a processing request generated from each processing request source, an MSF 104 that specifies the form of interrupt processing based on each processing request, and an interrupt mask that controls permission to prohibit acceptance of each side request. An interrupt mask flag group MK510 consisting of flags MK (hereinafter referred to as MK). A vector code constant section 101 containing pecta code information used in the execution of pecta interrupt processing, M
MSC address constant section 10 containing SC address information
5. SFR address constant section 106 that includes 8F address information corresponding to the processing request generation source; reception of each processing request is performed by condition determination and priority control; interrupt request reception is performed by the judgment circuit 102 or above; and the INTRQ generated by the interrupt request control unit 1.
5. Controls acceptance of interrupt processing requests based on MS/1NT14, and outputs CLIFto, CLMSII, constant output request signal 12゜SFR address constant output request signal 13
, an EI that controls the prohibition/enablement of acceptance of vectored interrupts.
Signal line 6 that conveys the contents of the flag 201 and the EI flag
It also controls the operation of the interrupt request control unit 1, and
Performs execution control of the entire SMC. Execution unit 2 and execution unit 2
A stack 302 that is accessed via the Yoshibus 9 and used for pecter interrupts, an MS used for macro services
C303 and a memory unit 3 including a storage area 301 for various data, and a peripheral device having a function of generating processing requests such as an A/D conversion circuit, a timer, and a counter.
Interrupt request control unit 1 via Yoshibus 9
5FR4 accessible via B addressing line 15
01, and a processing request generation source 4 that transmits a processing request 8 to the interrupt request control unit 1.

第2の実施例では第4図から明らかな様に第1の実施例
の割込み要求制御部1内に新たにMK510を設けたも
のである。
In the second embodiment, as is clear from FIG. 4, an MK510 is newly provided in the interrupt request control section 1 of the first embodiment.

MK510はIF103.Mf9F104と同様に各処
理要求発生源毎に設けられておシ各側込み要求について
個別の禁止、許可制御を行なう。すなわちMK510が
セット状態にある処理要求発生源4から処理要求8が発
生しても、対応したIF103がセットされるのみで、
MSF104.EIフ2グ201の内容に係らずINT
RQ5はアクティブとならず、割込み処理は起動しない
、また個別の各MKの内容は他の処理要求の受付は制御
論理には全く影響を与えない。従って第1の実施例では
各ペクタ割込み処理の禁止、許可制御をEI7ラグ20
1にて一括して制御することしかできなかったが、第2
の実施例ではマクロサービス、ペクタ割込み処理のいづ
れも、個別にMKで制御することが可能となシ、複数の
処理要求発生源を持つシステムにおいて、必要とする任
意の処理要求のみ割込み処理で実行制御することが可能
となる。
MK510 is IF103. Similar to the Mf9F104, it is provided for each processing request generation source and performs individual prohibition and permission control for each side request. In other words, even if a processing request 8 is generated from the processing request source 4 in which the MK 510 is set, the corresponding IF 103 is only set.
MSF104. INT regardless of the contents of EI 201
RQ5 is not activated, interrupt processing is not activated, and the contents of each individual MK have no effect on the control logic when accepting other processing requests. Therefore, in the first embodiment, the prohibition and permission control of each vector interrupt processing is performed with an EI7 lag of 20
1 could only be controlled all at once, but the 2nd
In this example, both the macro service and the vector interrupt processing can be individually controlled by the MK, and in a system with multiple processing request sources, only the required processing request can be executed by the interrupt processing. It becomes possible to control.

次に第4図に第3図における割込み要求制御部1の割込
み受付は優先順位制御回路部102.IF103、MS
F104.MK510のブロック図を示し制御論理と動
作を説明する。本第5図は第1の実施例第2図に対応し
ておシ、ここでは処理要求発生源をa、b、cの3種と
する。第4図は、処理要求8a、8b、8cによってセ
ットされるIF103a。
Next, in FIG. 4, the interrupt request controller 1 in FIG. IF103, MS
F104. A block diagram of the MK510 is shown to explain the control logic and operation. This FIG. 5 corresponds to FIG. 2 of the first embodiment, and here there are three types of processing request generation sources, a, b, and c. FIG. 4 shows IF 103a set by processing requests 8a, 8b, and 8c.

103b、103c、割込みの処理形態を指定するMS
F104a、104b、104c、個にの処理要求受付
ffe禁止、許可するMK510g、510b、510
c、受付は制御を行なうAND−ORゲート502a、
502b。
103b, 103c, MS that specifies interrupt processing type
F104a, 104b, 104c, individual processing request reception ffe prohibited, allowed MK510g, 510b, 510
c. AND-OR gate 502a for reception control;
502b.

502c、優先順位制御回路部109と実行部からの制
御信号CLRIF信号10.CLRM8信号11゜およ
び実行部への割込み処理要求INTRQ5割込み処理形
態指定線M8/lNT14とEIフ2グ信号6、割込み
要求選択信号線505a、505b、50Cよシなる。
502c, a control signal CLRIF signal 10. from the priority control circuit section 109 and the execution section. The CLRM8 signal 11°, the interrupt processing request INTRQ5 to the execution section, the interrupt processing mode designation line M8/1NT14, the EI flag signal 6, and the interrupt request selection signal lines 505a, 505b, and 50C.

ここでは処理要求発生源aK対応した動作を説明するが
、処理要求発生源す、cK対応した場合についても第一
の実施例と同様同一シーケンスで行なわれる。ま九複数
の処理要求が同時発生した時には、優先順位制御回路部
10aにハードウェア的、ソフトウェア的に設定されて
いる優先順位に基づき、最高の優先順位にある処理要求
発生源に対応した割込み要求選択信号線がハイレベルと
なシ処理要求の受付は処理が行なわれることも第一の実
施例と同様である。
Here, the operation corresponding to the processing request generation source aK will be explained, but the same sequence as in the first embodiment is performed also when the processing request generation source AK corresponds to the processing request generation source cK. When multiple processing requests occur simultaneously, an interrupt request corresponding to the processing request source with the highest priority is issued based on the priorities set in hardware and software in the priority control circuit section 10a. Similarly to the first embodiment, a processing request is accepted and processed when the selection signal line is at a high level.

第一の動作としてMK510 aがあらかじめリセット
されている時に処理要求8aが発生した場合について説
明する。処理要求8aによ、9 IF103aがセット
されると、第1の実施例第2図の動作と同様に、EIフ
2グ信号6またはMSF104aがセットされている場
合にのみAND−ORゲート−502aの出力がハイレ
ベルとなシ優先順位制御回路部109に伝えられる。優
先順位制御回路部10aはIN’l’几Q5をハイレベ
ルにするとともに、MSF104aの内容をMS/lN
T14上に読み出シテ実行部に伝え、また割込み要求選
択信号線505aをハイレベルにする。実行部はINT
RQ5がノ1イレペルになった事を検知すると、MS/
lNT14のレベルに基づいた処理形態で割込み処理を
実行する。以下M8F104aの内容ツマリM8/lN
T14上のレベルに応じて、ペクタ割込み処理、あるい
はマクロサービス処理が実行されるが、これらの動作は
第1の実施例と完全に同一であるため説明を省略する。
As a first operation, a case will be described in which a processing request 8a occurs when the MK 510a has been reset in advance. When the 9 IF 103a is set by the processing request 8a, the AND-OR gate 502a is activated only when the EI flag signal 6 or the MSF 104a is set, similar to the operation shown in FIG. 2 of the first embodiment. The high level output is transmitted to the priority control circuit section 109. The priority control circuit unit 10a sets IN'l'Q5 to high level and changes the contents of MSF104a to MS/lN.
The interrupt request selection signal line 505a is transmitted to the read execution unit on T14, and the interrupt request selection signal line 505a is set to high level. The execution part is INT
When it detects that RQ5 has become No. 1 Repel, MS/
Interrupt processing is executed in a processing format based on the level of the 1NT14. Below is a summary of the contents of M8F104a M8/lN
Depending on the level on T14, vector interrupt processing or macro service processing is executed, but since these operations are completely the same as in the first embodiment, their explanation will be omitted.

第二の動作として、MK510aがあらかじめセットさ
れている時に処理要求8aが発生した場合について説明
する。この時には処理要求8aによシエF103aがセ
ットされても、Eエフラグ6、およびM8F104aの
内容に係わらずAND−ORゲー) 502aは出力ロ
ウレベルのままである。従って処理要求8aの発生が優
先順位制御回路部109を経て、実行部に伝わることな
く、割込み処理は起動しない。従って、処理要求8aは
IF103a内に発生が記憶されたまま保留される。
As a second operation, a case where the processing request 8a occurs when the MK 510a is set in advance will be described. At this time, even if the output F103a is set by the processing request 8a, the output of the AND-OR gate 502a remains at the low level regardless of the contents of the EEF flag 6 and M8F104a. Therefore, the occurrence of the processing request 8a is not transmitted to the execution section via the priority control circuit section 109, and the interrupt processing is not activated. Therefore, the processing request 8a is held pending with its occurrence being stored in the IF 103a.

以上、第一の動作説明、第二の動作説明によって述べた
様に、MK510a用いて処理要求8aの受付けを禁止
、許可することができる。
As described above in the first and second operation descriptions, the MK 510a can be used to prohibit or permit acceptance of the processing request 8a.

第2の実施例におけるSMCは処理要求発生源に対応し
たMKフラグを設けるだけで第1の実施例の特長を全て
備え、かつ、複数の処理要求発生源主持つ応用システム
において例えばMSFの内容を保持したまま個々の処理
要求受付けの禁止。
The SMC in the second embodiment has all the features of the first embodiment by simply providing an MK flag corresponding to the processing request generation source, and also allows the contents of the MSF to be used in an application system having multiple processing request generation sources, for example. Prohibition of accepting individual processing requests while retaining the information.

許可制御を行う等の応用が可能なよシ汎用性に富んだ割
込み処理システムを備えている。
It has a highly versatile interrupt processing system that can be used for applications such as permission control.

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

以上説明したように本発明によるシングルチップマイク
ロコンピュータにおいては、処理要求発生源からの処理
要求をEIフラグ内容によって受付は制御を行なうベク
タ割込みにより割込み処理プログラムで処理する処理形
態と、EIフラグ内容に係らず受付けられ割込み要求制
御部よシ出力する処理要求発生源に対応したSFRアド
レス情報を用いることで高速かつリアルタイム処理が可
能なマクロサービスによシ処理する処理形態とを備えた
、効率的かつ汎用性に富んだ割込み処理システムを内蔵
することによシ、複数の処理要求発生源からの処理要求
が短時間に頻発する応用システムについても、応答性に
優れ、ハードウェア効率の高い、高速データ処理を実現
することができる効果がある。
As explained above, in the single-chip microcomputer according to the present invention, there are two processing modes in which processing requests from a processing request source are processed by an interrupt processing program using vectored interrupts that are controlled depending on the contents of the EI flag, and one processing mode in which processing requests are processed by an interrupt processing program based on the contents of the EI flag. This system is efficient and has a processing mode in which processing is performed by a macro service that can perform high-speed and real-time processing by using SFR address information corresponding to the processing request source that is accepted regardless of the interrupt request control unit and output from the interrupt request control unit. By incorporating a versatile interrupt processing system, the system provides high-speed data processing with excellent responsiveness and high hardware efficiency, even for application systems where processing requests from multiple processing request sources occur frequently in a short period of time. There is an effect that processing can be realized.

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

第1図は本発明の第一の実施例の構成を示すブロック図
、第2図は第1図の優先順位制御・割込み要求受付判定
回路102とIr2O3,M8F104のブロック図、
第3図は本発明の第二の実施例の構成を示すブロック図
、第4図は第3図の優先順位制御・割込み要求受付判定
回路102とIr2O3゜MSF104のブロック図、
第5図は従来のSMCの構成を示すブロック図である。 1・・・割込み要求制御部、2・・・実行部、3・・・
メモリ部s  4a+4b、4c・・・処理要求発生源
、4d・・・内部処理要求発生源、4e・・・外部処理
要求発生源、5・・・INTRQ信号、6・・・EI7
ラグ信号線、7・・・0EVC信号、8,8a、8b、
8C−処理要求、8 d ・・・内部処理要求発生源か
らの処理要求、8e・・・外部・処理要求発生源からの
処理要求、9・・・バス、10・・・CLRIF信号、
11・・・CLRMS信号、12・・・定数出力要求信
号、13・・・SFRアドレス出力要求信号、14・・
・M8/lNT115・・・SFR,アドレス指定線、
101・・・ベクタコード定数部、1o2・・・優先順
位制御・割込み要求受付は判定回路、103・・・割込
み要求フラグ群、103a、103b、103c、10
3d、103e・・・割込み要求フラグ、104・・・
処理形態指定フラグ群、104a、104b、 104
c・−・処理形態指定フラグ、105・・・MSCブト
レス定数部、1o6° SFRアドレス定数部、201
・・・EIフラグ、301・・・データ格納領域、30
2・・・スタック領域(スタック)、303・・・マク
ロサービス・チャネルレジスタMBC,401−・・特
殊レジスタ部8FR,501a。 5ρlb、501c・・・AND−ORゲート、502
a、502b 、 502 c ・・・AND−ORゲ
ート、 505a 、505b。 505c・・・割込み要求選択信号線、510・・・割
込みマスク・フラグ群、510a、510b、510c
・・−割込みマスクフラグ。
FIG. 1 is a block diagram showing the configuration of the first embodiment of the present invention, FIG. 2 is a block diagram of the priority control/interrupt request acceptance determination circuit 102, Ir2O3, and M8F 104 in FIG.
FIG. 3 is a block diagram showing the configuration of the second embodiment of the present invention, FIG. 4 is a block diagram of the priority control/interrupt request acceptance determination circuit 102 and Ir2O3°MSF 104 of FIG.
FIG. 5 is a block diagram showing the configuration of a conventional SMC. 1... Interrupt request control unit, 2... Execution unit, 3...
Memory section s 4a+4b, 4c...processing request source, 4d...internal processing request source, 4e...external processing request source, 5...INTRQ signal, 6...EI7
Lag signal line, 7...0EVC signal, 8, 8a, 8b,
8C-Processing request, 8d... Processing request from internal processing request source, 8e... Processing request from external/processing request source, 9... Bus, 10... CLRIF signal,
11... CLRMS signal, 12... Constant output request signal, 13... SFR address output request signal, 14...
・M8/lNT115...SFR, address designation line,
101...Vector code constant part, 1o2...Determination circuit for priority control/interrupt request reception, 103...Interrupt request flag group, 103a, 103b, 103c, 10
3d, 103e... Interrupt request flag, 104...
Processing mode designation flag group, 104a, 104b, 104
c.--Processing mode specification flag, 105...MSC buttress constant section, 1o6° SFR address constant section, 201
...EI flag, 301...Data storage area, 30
2...Stack area (stack), 303...Macro service channel register MBC, 401--Special register section 8FR, 501a. 5ρlb, 501c...AND-OR gate, 502
a, 502b, 502c...AND-OR gate, 505a, 505b. 505c...Interrupt request selection signal line, 510...Interrupt mask flag group, 510a, 510b, 510c
...-Interrupt mask flag.

Claims (1)

【特許請求の範囲】[Claims] 単一半導体チップ上にコンピュータ機能を集積したシン
グルチップマイクロコンピュータにおいて、周辺装置か
らの処理要求に応答して割込み要求を発生する割込み要
求発生部と前記割込み要求に基づき割込み処理を行なう
実行部とを備え、前記実行部は前記割込み要求をユーザ
ープログラムで処理する第1の処理形態と、実行中のプ
ログラムに関する内部状態を保持したまま割込処理を行
なう第2の処理形態とを選択的に実行し、前記第1の処
理形態による割込み処理の実行のみを選択的に禁止する
ことを特徴とするシングルチップマイクロコンピュータ
A single-chip microcomputer in which computer functions are integrated on a single semiconductor chip includes an interrupt request generation section that generates an interrupt request in response to a processing request from a peripheral device, and an execution section that performs interrupt processing based on the interrupt request. In preparation, the execution unit selectively executes a first processing mode in which the interrupt request is processed by a user program, and a second processing mode in which the interrupt processing is performed while maintaining an internal state regarding the program being executed. A single-chip microcomputer, characterized in that only execution of interrupt processing according to the first processing mode is selectively prohibited.
JP61265858A 1986-11-07 1986-11-07 Single chip microcomputer Pending JPS63118947A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP61265858A JPS63118947A (en) 1986-11-07 1986-11-07 Single chip microcomputer
EP87116519A EP0266800B1 (en) 1986-11-07 1987-11-09 Data processor having different interrupt processing modes
US07/118,671 US4930068A (en) 1986-11-07 1987-11-09 Data processor having different interrupt processing modes
DE3751164T DE3751164T2 (en) 1986-11-07 1987-11-09 Data processor with various types of interrupt processing.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61265858A JPS63118947A (en) 1986-11-07 1986-11-07 Single chip microcomputer

Publications (1)

Publication Number Publication Date
JPS63118947A true JPS63118947A (en) 1988-05-23

Family

ID=17423062

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61265858A Pending JPS63118947A (en) 1986-11-07 1986-11-07 Single chip microcomputer

Country Status (1)

Country Link
JP (1) JPS63118947A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0540642A (en) * 1991-08-02 1993-02-19 Nec Corp Microcomputer
US5687380A (en) * 1994-09-29 1997-11-11 Nec Corporation Macro service processing of interrupt requests in a processing system where a single interrupt is generated for a plurality of completed transactions
US6735713B1 (en) 1999-03-09 2004-05-11 International Business Machines Corporation System for suspending current bus cycle of microprocessor upon receiving external bus retry signal for executing other process and re-staring the suspended bus cycle thereafter

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5332644A (en) * 1976-09-08 1978-03-28 Hitachi Ltd High speed interrupt system
JPS60183662A (en) * 1984-03-02 1985-09-19 Nec Corp Information processing unit
JPS60183661A (en) * 1984-03-02 1985-09-19 Nec Corp Information processing unit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5332644A (en) * 1976-09-08 1978-03-28 Hitachi Ltd High speed interrupt system
JPS60183662A (en) * 1984-03-02 1985-09-19 Nec Corp Information processing unit
JPS60183661A (en) * 1984-03-02 1985-09-19 Nec Corp Information processing unit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0540642A (en) * 1991-08-02 1993-02-19 Nec Corp Microcomputer
US5687380A (en) * 1994-09-29 1997-11-11 Nec Corporation Macro service processing of interrupt requests in a processing system where a single interrupt is generated for a plurality of completed transactions
US6735713B1 (en) 1999-03-09 2004-05-11 International Business Machines Corporation System for suspending current bus cycle of microprocessor upon receiving external bus retry signal for executing other process and re-staring the suspended bus cycle thereafter

Similar Documents

Publication Publication Date Title
US4930068A (en) Data processor having different interrupt processing modes
KR100766732B1 (en) Device and method for performing high-speed low overhead context switch
JP2564805B2 (en) Information processing device
US4318174A (en) Multi-processor system employing job-swapping between different priority processors
EP0511674A2 (en) Single chip microcomputer
US20060015876A1 (en) Light weight context switching technique
US6931643B2 (en) Interrupt throttling for inter-processor communications
US7689991B2 (en) Bus management techniques
JPH023876A (en) Single-chip microcomputer
JPS63118947A (en) Single chip microcomputer
CN110221861B (en) CPU register system structure and interrupt processing method thereof
JP2643931B2 (en) Information processing device
JPH0414376B2 (en)
US7320044B1 (en) System, method, and computer program product for interrupt scheduling in processing communication
Mauroner et al. Remote instruction call: An RPC approach on instructions for embedded multi-core systems
JPH01305461A (en) Right of using bus control system
JPS63118969A (en) Information processor
JPH09218859A (en) Multiprocessor control system
JPH023877A (en) Single-chip microcomputer
JPS63231668A (en) Interruption queue control system
JPH0340169A (en) Multiple processor system and method of controlling plurality of processor
JPH0795276B2 (en) Information processing equipment
JPH04260961A (en) Microcomputer
JPS63282871A (en) Multi-processor system
EP1249757A1 (en) Interrupt throttling for inter-processor communications