JP3822885B2 - 1 chip data processor - Google Patents

1 chip data processor Download PDF

Info

Publication number
JP3822885B2
JP3822885B2 JP2004182149A JP2004182149A JP3822885B2 JP 3822885 B2 JP3822885 B2 JP 3822885B2 JP 2004182149 A JP2004182149 A JP 2004182149A JP 2004182149 A JP2004182149 A JP 2004182149A JP 3822885 B2 JP3822885 B2 JP 3822885B2
Authority
JP
Japan
Prior art keywords
exception
address
handler
register
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004182149A
Other languages
Japanese (ja)
Other versions
JP2004272939A (en
Inventor
真一 吉岡
郁也 川崎
重純 松井
進 成田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2004182149A priority Critical patent/JP3822885B2/en
Publication of JP2004272939A publication Critical patent/JP2004272939A/en
Application granted granted Critical
Publication of JP3822885B2 publication Critical patent/JP3822885B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、リセット、例外事象や割り込み事象などの例外発生時に、その例外に対処するため例外処理プログラムを実行するデータ処理装置に関し、特に、例外の発生時点からその例外に対処するための例外処理ハンドラへ遷移するまでの遷移時間を短縮する技術に関する。本発明は、例えば、シングルチップマイクロコンピュータあるいはメモリ管理ユニットを内蔵するマイクロプロセッサに適用して有効な技術に関する。   The present invention relates to a data processing apparatus that executes an exception processing program to deal with an exception when an exception such as a reset, an exception event or an interrupt event occurs, and in particular, an exception process for dealing with the exception from the point of occurrence of the exception. The present invention relates to a technique for shortening the transition time until transition to a handler. The present invention relates to a technique effective when applied to, for example, a single chip microcomputer or a microprocessor incorporating a memory management unit.

上記データ処理装置に含まれる中央処理装置を用いたデータ処理の途中において、そのデータ処理装置の命令セット内に定義されていない未定義命令のデコード、無効な演算の発生、仮想記憶における記憶保護違反、TLBミスなどの一般的な例外事象(一般例外事象とも言う:general exception events)が発生する場合や、データ処理装置の外部周辺回路におけるデータ入出力動作の終了を中央処理装置に通知するための終了通知やデータ処理装置内の通信モジュールからの受信要求などの割り込み要求(一般割り込み事象とも言う:general interrupt events)が発生する場合がある。   During data processing using the central processing unit included in the data processing device, decoding of undefined instructions not defined in the instruction set of the data processing device, generation of invalid operations, storage protection violation in virtual memory For notifying the central processing unit when a general exception event (general exception event) such as a TLB miss occurs, or when the data input / output operation in the external peripheral circuit of the data processing unit ends. An interrupt request (general interrupt event) such as an end notification or a reception request from a communication module in the data processing apparatus may occur.

上記のような一般例外事象や一般割り込み事象などの例外(例外事象)が発生すると、上記中央処理装置は、データ処理プログラムの命令の実行を抑止し、発生した例外に対処するための例外処理ハンドラに制御を移行し、上記例外処理ハンドラによって規定されるデータ処理を実行し、発生した例外に対処する。上記例外処理ハンドラを実行した後、中央処理装置は、上記実行を抑止した命令を再実行し、あるいは、上記実行を抑止した命令の次の命令アドレスに復帰し、中断していた所定のデータ処理プログラムを継続する。そのため、一般例外事象や一般割り込み事象が発生した時、中央処理装置はその内部のプログラムカウンタの値やステータスレジスタの内部状態を外部メモリのスタック領域へ退避させるような動作を実行する。中央処理装置の処理が例外処理ハンドラの処理から上記抑止されたデータ処理プログラムへ復帰する時、中央処理装置は上記退避させたプログラムカウンタの値やステータスレジスタの内部状態を上記外部メモリのスタック領域からプログラムカウンタやステータスレジスタへそれぞれ格納し、上記抑止されたデータ処理プログラムを継続する。   When an exception (exception event) such as the above general exception event or general interrupt event occurs, the central processing unit suppresses the execution of the instructions of the data processing program and handles the exception that has occurred. Control is transferred to, data processing specified by the exception handler is executed, and the generated exception is dealt with. After executing the exception handler, the central processing unit re-executes the instruction whose execution has been suppressed, or returns to the instruction address next to the instruction whose execution has been suppressed, and interrupted predetermined data processing. Continue the program. Therefore, when a general exception event or a general interrupt event occurs, the central processing unit executes an operation for saving the internal program counter value and the internal state of the status register to the stack area of the external memory. When the processing of the central processing unit returns from the processing of the exception processing handler to the inhibited data processing program, the central processing unit reads the value of the saved program counter and the internal state of the status register from the stack area of the external memory. The data processing program is stored in the program counter and the status register, and the suppressed data processing program is continued.

所定のデータ処理プログラムから所定の例外処理ハンドラの処理への分岐手法としては、ハードウェア(論理回路)によって各種の分岐先アドレス(各種の例外処理ハンドラの先頭メモリアドレス)を固定する手法や、中央処理装置から分岐先アドレスを指定可能にするベクタ方式が採用されている。ベクタ方式は、例えば、割り込み要求に応答するための各種例外処理ハンドラの先頭アドレスを格納したベクタテーブルを外部メモリ上に配置し、中央処理装置から上記ベクタテーブルのポインタ(割り込みベクタレジスタ)を指定し、指定されたベクタテーブルから対応する例外処理ハンドラの先頭アドレスをリードし、リードした先頭アドレスの位置から所要の例外処理ハンドラをリードして実行する。   As a branching method from the predetermined data processing program to the processing of the predetermined exception handler, various branch destination addresses (start memory addresses of various exception handlers) are fixed by hardware (logic circuit) A vector system is adopted that allows a branch destination address to be specified from a processing device. In the vector method, for example, a vector table storing the start addresses of various exception handlers for responding to interrupt requests is placed on the external memory, and the above-mentioned vector table pointer (interrupt vector register) is specified from the central processing unit. Read the start address of the corresponding exception handler from the specified vector table, and read and execute the required exception handler from the position of the read head address.

尚、割り込み要求などの例外について記載された文献の例としては、昭和62年12月25日に株式会社オーム社発行の「マイクロコンピュータハンドブック」第177頁及び第178頁がある。   Examples of documents describing exceptions such as an interrupt request include “Microcomputer Handbook” on pages 177 and 178 published on December 25, 1987.

「マイクロコンピュータハンドブック」、株式会社オーム社、昭和62年12月25日、p.177−178“Microcomputer Handbook”, Ohm Co., Ltd., December 25, 1987, p. 177-178

しかしながら、上述のベクタ方式では、例外事象が発生してそれに対処するまでに、ベクタテーブルから対応する例外処理ハンドラの先頭アドレスを取得するための外部メモリのリード動作が必要となる。したがって、その外部メモリのリード動作の分だけ、例外事象の発生から対応ハンドラへ分岐するまでの遷移時間が長くなることがわかった。また、対応する例外処理ハンドラに分岐する前に、プログラムカウンタやステータスレジスタ、さらには汎用レジスタのデータなどを外部メモリ上のスタック領域に退避する操作を行う場合には、そのための外部メモリの書き込み動作によっても例外事象に対する応答が遅れることがわかった。   However, the above-described vector method requires an external memory read operation for acquiring the start address of the corresponding exception handler from the vector table before an exception event occurs and is dealt with. Therefore, it was found that the transition time from the occurrence of an exception event to branching to the corresponding handler becomes longer by the amount of the read operation of the external memory. If the program counter, status register, and general-purpose register data is saved to the stack area on the external memory before branching to the corresponding exception handler, the external memory write operation It was also found that the response to exceptional events was delayed.

特に、中央処理装置の動作に同期して発生するTLBミスに関する例外に対して高速に応答することは、TLBミスの発生時点から上記抑止された命令の再実行までの時間を短縮できることを意味し、中央処理装置のデータ処理性能を向上させる上で究めて重要であることが本発明者によって見出された。なぜなら、TLBミスは、例外として分類されているものの、実際には、ユーザーの作成したデータ処理プログラムのプログラミングミスで発生するような本質的な例外と異なり、プログラミングミスの無いデータ処理プログラムの実行中において通常的に発生する事象である。したがって、TLBミスに高速に対処することが、中央処理装置のデータ処理性能を向上させる事になる。   In particular, a high-speed response to an exception related to a TLB miss that occurs in synchronization with the operation of the central processing unit means that the time from the occurrence of a TLB miss to the re-execution of the suppressed instruction can be shortened. The present inventors have found that it is extremely important in improving the data processing performance of the central processing unit. This is because TLB misses are classified as exceptions, but in reality, unlike data exceptions that occur due to programming mistakes in user-created data processing programs, data processing programs without programming errors are being executed. It is an event that usually occurs in Therefore, dealing with TLB misses at high speed improves the data processing performance of the central processing unit.

更に、各種分岐先アドレスをハードウェアによって完全に固定にする手法も考えられるが、この手法はユーザ記述に係る例外処理ハンドラのマッピングやそのプログラムサイズに対する融通性がなく、使い勝手が悪いことがわかった。また、分岐先アドレスを生成するためのハードウェア量も増大すると考えられる。   In addition, there is a method to fix various branch destination addresses completely by hardware. However, this method is inconvenient because it does not have the flexibility of mapping exception handling handlers related to user descriptions and the program size. . It is also considered that the amount of hardware for generating branch destination addresses will increase.

本発明の目的は、例外事象の発生時点からそれに対処するための例外処理ハンドラへ遷移あるいは分岐するまでの遷移時間を短縮できるデータ処理装置を提供することにある。   An object of the present invention is to provide a data processing apparatus capable of shortening the transition time from the occurrence of an exception event to the transition or branching to an exception handling handler for dealing with it.

本発明の別の目的は、例外事象に応答するための例外処理ハンドラの構成に自由度を持たせることができるデータ処理装置を提供することにある。   Another object of the present invention is to provide a data processing apparatus capable of giving a degree of freedom to the configuration of an exception handling handler for responding to an exception event.

本発明の更に別の目的は、データ処理の高速化に密接なTLBミス例外のような処理に対しては、その処理への遷移時間を短縮することが可能であり、かつ、例外処理への遷移時間の短縮がTLBミス例外ほどデータ処理速度の高速化に寄与しないと考えられる例外事象や割り込み事象に対しては、例外処理ハンドラのメモリ上でのマッピングや例外処理ハンドラのメモリサイズに対する高い融通性を持たせることが可能なデータ処理装置を提供することにある。   Still another object of the present invention is to reduce the transition time to processing such as TLB miss exception, which is closely related to high-speed data processing, and to the exception processing. For exception events and interrupt events that are considered not to contribute to speeding up the data processing speed as much as the TLB miss exception, the exception handler and the memory size of the exception handler are highly flexible. It is an object of the present invention to provide a data processing device capable of having the characteristics.

本発明のその他の目的は、例外処理の点において物理的な回路規模の縮小とデータ処理の高速化との双方を満足させ、低コストかつ高速なデータ処理装置を提供することにある。   Another object of the present invention is to provide a low-cost and high-speed data processing apparatus that satisfies both the physical circuit scale reduction and the high-speed data processing in terms of exception processing.

本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。   The following is a brief description of an outline of typical inventions disclosed in the present application.

データ処理装置は、図1に例示されるように、例外事象(例えばリセット、一般例外事象、一般割り込み要求)の発生に応答し、上記例外事象に予め割り当てられた例外コードが書き込まれる記憶回路(EXPEVT,INTEVT)と、プログラムカウンタ(PC)と、上記例外事象の発生に応答し、所定の命令アドレスを上記プログラムカウンタに書き込み、上記命令アドレスに割り当てられた第1例外処理ハンドラを実行可能にする制御手段(CTRL)とを含む中央処理装置(CPU)とを備える。   As illustrated in FIG. 1, the data processing apparatus responds to the occurrence of an exception event (for example, reset, general exception event, general interrupt request), and a memory circuit (in which an exception code assigned in advance to the exception event is written) (EXPEVT, INTEVT), program counter (PC), and in response to the occurrence of the exception event, a predetermined instruction address is written into the program counter, and the first exception handler assigned to the instruction address can be executed. A central processing unit (CPU) including control means (CTRL).

上記制御手段は、上記第1例外処理ハンドラ内に規定される処理にしたがって、上記第1例外処理ハンドラから第2例外処理ハンドラへ分岐させるための第2命令アドレスを、前記記憶回路に書き込まれた上記要因コードをアドレスオフセットとして利用して算出させ、得られた第2命令アドレスを上記プログラムカウンタへ設定する。   The control means writes a second instruction address for branching from the first exception handler to the second exception handler according to the processing defined in the first exception handler. The factor code is used as an address offset for calculation, and the obtained second instruction address is set in the program counter.

上記所定の命令アドレスへの分岐は、例えば、図2に例示されたハードウェアによるベクタポイントの操作とされる。上記所定の命令アドレス(分岐先のベクタポイント)に割り当てられる第1例外処理ハンドラは、例えば、図2に例示されるように、そのベクタポイントに固有の一つの一般例外事象であるTLBミス例外処理ハンドラ、或いはそのベクタポイントに固有の複数の例外事象(例えば、TLBミス例外以外の複数の一般例外事象)に共通の例外処理ハンドラ、又は複数の割り込みに共通の例外処理ハンドラとされる。上記共通の例外処理ハンドラにおいて、個々の例外に固有の別の例外処理ハンドラ(第2例外処理ハンドラ)へ分岐するためのアドレスオフセットとして、上記要因コードが利用される。上記要因コード(アドレスオフセット)に対するベースアドレスは、上記共通の例外処理ハンドラの記述によって決定される。ベースアドレスは、例えば、VBR(ベクタベースレジスタの値)+H'100(記号H'は16進数であることを意味する)であっても、また、分岐時におけるプログラムカウンタの値をベースアドレスとし、さらには適当に演算して算出された値をベースアドレスにすることも可能である。   The branching to the predetermined instruction address is, for example, a vector point operation by hardware illustrated in FIG. The first exception handler assigned to the predetermined instruction address (branch destination vector point) is, for example, as shown in FIG. 2, a TLB miss exception process which is one general exception event unique to the vector point. An exception handling handler common to a handler or a plurality of exception events specific to the vector point (for example, a plurality of general exception events other than a TLB miss exception), or an exception handling handler common to a plurality of interrupts. In the common exception handler, the cause code is used as an address offset for branching to another exception handler (second exception handler) unique to each exception. The base address for the cause code (address offset) is determined by the description of the common exception handler. The base address is, for example, VBR (value of the vector base register) + H′100 (the symbol H ′ means a hexadecimal number), or the value of the program counter at the time of branching is used as the base address, Furthermore, it is possible to use a value calculated by appropriate calculation as a base address.

上記手段を別の観点より把握すれば、データ処理装置は、例外事象の発生に応じて中央処理装置による命令実行順序を変更するために、ベクタベースアドレスに対する固定のオフセットであるベクタオフセットを、例外要因の数よりも少ない数だけ有する。   If the above means is grasped from another point of view, the data processing apparatus uses a vector offset, which is a fixed offset with respect to the vector base address, as an exception in order to change the instruction execution order by the central processing unit in response to the occurrence of an exception event. Have fewer than the number of factors.

本発明に従うデータ処理装置は、例外事象の発生時にステータスレジスタの内部状態が退避される第1退避レジスタ(SSR)と、プログラムカウンタ(PC)が保持していたところの例外処理から復帰した後に実行されるべき命令を示している復帰命令アドレスが退避される第2退避レジスタ(SPC)と含む。上記第1及び第2退避レジスタの採用によって、ステータスレジスタの内部状態や復帰命令アドレスの退避のための外部メモリのメモリアクセス回数を減らすことができる。   The data processing device according to the present invention is executed after returning from the exception processing held by the first save register (SSR) in which the internal state of the status register is saved when an exception event occurs and the program counter (PC). A return instruction address indicating an instruction to be executed is included in a second save register (SPC) in which the address is saved. By employing the first and second save registers, the number of memory accesses to the external memory for saving the internal state of the status register and the return instruction address can be reduced.

さらに、本発明に従うデータ処理装置の中央処理装置は、図2に例示したハードウェアによるベクタポイントの操作のため、算術論理演算回路(ALU)と、上記例外の発生に応答して所定の値(ベクタオフセット)を発生する定数発生部あるいは演算手段(CVG,SFT)と、外部メモリに記憶された複数の例外処理ハンドラのベースアドレスを格納するベースレジスタ(VBR)とを有する。上記算術論理演算回路は、上記制御回路の制御の下で、上記ベースアドレスと上記所定の値とを加算し、上記所定の命令アドレス(分岐先命令アドレス)とを発生する。例えば、図2に従えば、TLBミス例外を除く一般例外のベクタオフセットはH'100とされ、TLBミス例外のベクタオフセットはH'400とされる。上記定数発生部は、2ビットの定数を発生する定数発生回路(CVG)と、上記定数発生回路から出力された2ビットの定数を所定の量だけシフトするシフト回路(SFT)とから構成され、その回路構成が簡単化されている。   Further, the central processing unit of the data processing apparatus according to the present invention operates with an arithmetic logic circuit (ALU) and a predetermined value (in response to occurrence of the exception) for the vector point operation by hardware illustrated in FIG. A constant generation unit or calculation means (CVG, SFT) for generating a vector offset) and a base register (VBR) for storing base addresses of a plurality of exception handlers stored in an external memory. The arithmetic logic circuit adds the base address and the predetermined value under the control of the control circuit to generate the predetermined instruction address (branch destination instruction address). For example, according to FIG. 2, the vector offset of the general exception excluding the TLB miss exception is set to H′100, and the vector offset of the TLB miss exception is set to H′400. The constant generation unit includes a constant generation circuit (CVG) that generates a 2-bit constant, and a shift circuit (SFT) that shifts the 2-bit constant output from the constant generation circuit by a predetermined amount. The circuit configuration is simplified.

要因コードを記録する記憶回路としてのレジスタは、中央処理装置(CPU)の動作に同期して発生する第1の例外事象(例えば一般例外)に割り当てられた第1レジスタ(EXPEVT)と、中央処理装置の動作と非同期で発生する第2の例外事象(例えば割り込み)に割り当てられた第2レジスタ(INTEVT)とされる。なお、リセットは、第2の例外事象の範疇に含められる。   A register as a storage circuit for recording a cause code includes a first register (EXPEVT) assigned to a first exception event (for example, a general exception) that occurs in synchronization with the operation of the central processing unit (CPU), and a central processing unit. A second register (INTEVT) assigned to a second exceptional event (for example, an interrupt) that occurs asynchronously with the operation of the apparatus is used. The reset is included in the category of the second exceptional event.

上記ステータスレジスタ(SR)は、上記データ処理装置の動作状態が、ユーザプログラムが走行されているユーザ状態か、あるいはシステムプログラムが走行されている特権状態かを択一的に示すデータが格納される第1制御ビット(MD)と、上記例外事象の発生後に発生した他の例外事象を受け付けるか無視する(マスク)か否かを指示するデータが格納される第2制御ビット(BL)とを有する。   The status register (SR) stores data that selectively indicates whether the operation state of the data processing device is a user state where the user program is running or a privileged state where the system program is running. A first control bit (MD), and a second control bit (BL) in which data indicating whether to accept or ignore (mask) other exception events that occur after the occurrence of the exception event is stored .

上記制御手段は、前記内部状態と上記復帰命令アドレスとを上記第1退避レジスタ(SSR)と上記第2退避レジスタ(SPC)ヘそれぞれ退避した後、上記第1制御ビットに特権状態を示すデータを設定し、上記第2制御ビットに上記例外事象の発生後に発生した他の例外事象を無視する事を示すデータを設定し、上記所定の命令アドレスに割り付けられた第1例外処理ハンドラに分岐させる。上記第1及び第2制御ビットに対するアクセスは、所定の特権命令(例えばLDC,STC)にて可能にされる。即ち、図2に例示されように、ベクタポイントに割り当てられた上記第1例外処理ハンドラ上でのプロセッサモードは、特権状態及び例外の多重受け付け抑止の状態とされる。ここで、特権状態は、ユーザ状態ではアドレスエラーとされるアドレス空間をアクセス可能な状態であり、ユーザ状態では実行不可能な特権命令(例えばLDC,STC)を実行することができる、という点においてユーザ状態と相違される。   The control means saves the internal state and the return instruction address to the first save register (SSR) and the second save register (SPC), respectively, and then stores data indicating a privileged state in the first control bit. The second control bit is set with data indicating that other exception events generated after the occurrence of the exception event are ignored, and the process branches to the first exception handler assigned to the predetermined instruction address. Access to the first and second control bits is made possible by a predetermined privileged instruction (for example, LDC, STC). That is, as illustrated in FIG. 2, the processor mode on the first exception handler assigned to the vector point is set to a privileged state and a state where multiple exceptions are suppressed. Here, the privileged state is a state in which an address space that is regarded as an address error in the user state can be accessed, and a privileged instruction (for example, LDC, STC) that cannot be executed in the user state can be executed. Different from user status.

例外発生時における内部状態の退避と復帰アドレスの退避を第1及び第2退避レジスタにできるようにするため、ベクタポイントに割り当てられた上記第1例外処理ハンドラ上では、新たに発生する例外の多重受け付けを抑止するか否かを決定してその内容を上記制御ビットに反映し、多重に受け付けるときは上記第1及び第2の退避レジスタの内容をメモリに退避させる。   In order to allow the first and second save registers to save the internal state and save the return address when an exception occurs, on the first exception handling handler assigned to the vector point, multiple exceptions are generated. It is determined whether or not reception is to be suppressed and the contents are reflected in the control bit. When multiple receptions are received, the contents of the first and second save registers are saved in the memory.

例外発生時の汎用レジスタのメモリ退避を低減させ、或は、汎用レジスタに対する処理の自由度を向上させるため、複数のバンクを構成する第1及び第2汎用レジスタセットが設けられる。上記第1及び第2汎用レジスタセットの一方は、前記特権状態における汎用レジスタとして利用され、上記第1及び第2汎用レジスタセットの他方は、前記ユーザ状態における汎用レジスタとして利用される。汎用レジスタのレジスタバンクを前記特権状態においてのみソフトウェアで切り換え可能にするとよい。   In order to reduce the memory saving of the general-purpose registers when an exception occurs or to improve the degree of freedom of processing for the general-purpose registers, first and second general-purpose register sets constituting a plurality of banks are provided. One of the first and second general-purpose register sets is used as a general-purpose register in the privileged state, and the other of the first and second general-purpose register sets is used as a general-purpose register in the user state. It is preferable that the register bank of the general-purpose register can be switched by software only in the privilege state.

本発明に従うデータ処理装置は、さらに、命令ブレークコントローラ(UBC)を有する。命令ブレークコントローラ(UBC)は、ブレークポイントアドレスが設定される命令ブレークアドレスレジスタ(IBR)を含み、上記命令ブレークアドレスレジスタに設定された命令アドレスに対応する命令が中央処理装置によって実行された時、命令ブレーク例外を発生する。前記制御手段は、例外の多重受け付け抑止が指示された状態において前記命令ブレーク例外を検出したとき、前記第1及び第2退避レジスタへの内部状態及び復帰命令アドレスの退避を行わずに命令ブレーク例外ハンドラに分岐させる。、上記命令ブレーク例外ハンドラは、上記状態及び復帰アドレス退避用の退避レジスタの内容をメモリに退避した後、前記命令ブレークアドレスレジスタが保有するブレークポイントアドレスを利用して命令ブレーク例外ハンドラからの復帰命令アドレスを計算し、計算した復帰命令アドレスを前記第2退避レジスタに書き込む。これにより、前記例外の多重受け付けが抑止された状態の例外処理ハンドラで、前記命令ブレーク例外を処理可能とする。   The data processing apparatus according to the present invention further includes an instruction break controller (UBC). The instruction break controller (UBC) includes an instruction break address register (IBR) in which a breakpoint address is set. When an instruction corresponding to the instruction address set in the instruction break address register is executed by the central processing unit, An instruction break exception is generated. The control means detects the instruction break exception without saving the internal state and the return instruction address to the first and second save registers when the instruction break exception is detected in a state instructed to suppress multiple exceptions. Branch to the handler. The instruction break exception handler saves the contents of the save register for saving the state and the return address in a memory, and then uses the breakpoint address held by the instruction break address register to return from the instruction break exception handler. The address is calculated, and the calculated return instruction address is written to the second save register. As a result, the instruction break exception can be processed by an exception processing handler in a state where the multiple acceptance of the exception is suppressed.

上記において、前記制御手段は、更に、例外の多重受け付けを抑止した状態において、前記命令ブレーク例外以外の第1の例外を検出したときは、前記要因レジスタにその要因コードを記録した後にリセット例外のハンドラに分岐させ、また、第2の例外を検出したときは、例外の多重受け付け抑止の状態が解除されるまで第2の例外の受け付けを抑止する。   In the above, when the control means further detects a first exception other than the instruction break exception in a state in which multiple acceptance of exceptions is suppressed, the control means records a reset exception after recording the cause code in the cause register. When the branch is made to the handler and the second exception is detected, the second exception is inhibited from being accepted until the state where the exception multiple inhibition is canceled.

上記した手段によれば、ベクタポイント割り付けられたら第1例外処理ハンドラは、ある例外要因(例えばTLBミス例外)に対してはそれ固有の一つの例外ハンドラとされ、他の例外要因(例えばTLBミス例外以外の一般例外)に対しては夫々の要因に対応して設けられた別の例外処理ハンドラとされる第2例外処理ハンドラ(例えば、アドレスエラー例外、TLBプロテクト違反例外)へ分岐させるための記述を含む共通の例外処理ハンドラとされる。   According to the above-described means, when the vector point is allocated, the first exception handling handler is made an exception handler unique to a certain exception factor (for example, TLB miss exception), and another exception factor (for example, TLB miss). General exceptions other than exceptions) for branching to a second exception handling handler (for example, an address error exception or a TLB protection violation exception) which is a different exception handling handler provided for each factor. A common exception handler that includes a description.

前者においては、メモリアクセスを伴わずにハードウェアによる処理だけで特定の第1例外処理ハンドラに分岐できるので、所望の例外処理へ高速に移行することが可能になる。後者においては、さらに別のハンドラに分岐するためのアドレスオフセットとして記憶回路(要因レジスタ)の例外要因コードを利用するので、分岐先アドレスの取得にメモリ上のアドレステーブルをアクセスすることが必要とされない。従って、この場合にも、所望の例外処理ハンドラへの高速な移行が可能なる。   In the former, since it is possible to branch to a specific first exception handler only by hardware processing without memory access, it is possible to shift to desired exception processing at high speed. In the latter, the exception factor code of the storage circuit (factor register) is used as an address offset for branching to another handler, so it is not necessary to access the address table in the memory to obtain the branch destination address. . Therefore, also in this case, a high-speed transition to a desired exception handling handler is possible.

見方を変えれば、後者において要因レジスタに保持されている例外要因コードは、さらに別の例外処理ハンドラに分岐するためのアドレスオフセットとして利用できるようにコード割り当てが行われているということである。例えば、アドレス換算で32バイト分に相当するようなH'20の間隔を置いてコード割り当てが行われている。   In other words, the exception cause code held in the cause register in the latter is assigned code so that it can be used as an address offset for branching to another exception handler. For example, code allocation is performed with an interval of H′20 corresponding to 32 bytes in address conversion.

更に、後者において、例外要因コードは分岐のためのアドレスオフセットとして利用されるので、当該オフセットに対するベースアドレスはハードウェアによって決定されているベクタポイントに割り当てられた第1例外処理ハンドラの記述に従って自由に決定でき、実際の分岐先アドレスや分岐先の例外処理ハンドラのサイズ対して自由度を保証することができる。   Further, in the latter, the exception cause code is used as an address offset for branching, so the base address for the offset can be freely set according to the description of the first exception handler assigned to the vector point determined by the hardware. The degree of freedom can be guaranteed with respect to the actual branch destination address and the size of the exception handling handler at the branch destination.

内部状態及び復帰命令アドレスを退避するレジスタ(SSR,SPC)を採用することは、例外発生時の退避に際してメモリアクセスを減らす。   Employing the registers (SSR, SPC) for saving the internal state and the return instruction address reduces memory access when saving when an exception occurs.

中央処理装置の動作クロックの周波数が割り込み要求の発生元とされる周辺モジュールの動作クロックの周波数に対して複数倍のクロック周波数で動作される場合、前記中央処理装置の動作に同期して発生される第1の例外事象としての一般例外と非同期で発生される第2の例外事象としての割り込み要求との双方に対処するため、例外要因コードを格納するレジスタは上記第1例外事象と上記第2例外事象に対して別々に設ける。双方の例外発生に対して同じようなタイミングで例外要因コードを共通のレジスタに書き込むための煩雑な処理を避けられるようにする。   When the operation clock frequency of the central processing unit is operated at a clock frequency that is a multiple of the operation clock frequency of the peripheral module that is the source of the interrupt request, it is generated in synchronization with the operation of the central processing unit. In order to cope with both the general exception as the first exception event and the interrupt request as the second exception event generated asynchronously, the register storing the exception cause code includes the first exception event and the second exception event. Separately for exception events. It is possible to avoid complicated processing for writing an exception factor code to a common register at the same timing when both exceptions occur.

例外要因に応じてハードウェアで決定されている分岐先のハンドラ(第1例外処理ハンドラ)上での初期的なプロセッサモードを、例外事象の多重受け付け抑止状態及び特権状態によって一定にすることは、ユーザが当該ハンドラ上で規定できる例外処理の内容に高い自由度を保証できる。   Making the initial processor mode on the branch destination handler (first exception handler) determined by the hardware according to the exception factor constant according to the exception event multiple acceptance suppression state and the privilege state is, A high degree of freedom can be guaranteed for the contents of exception handling that can be defined by the user on the handler.

汎用レジスタのレジスタバンクを特権状態においてのみソフトウェアで切り換え可能にすることは、特権状態においてユーザ状態とは異なるバンクの汎用レジスタを利用できるようになり、例えば、例外処理においてユーザ状態から特権状態にプロセッサモードを切り換えるときに汎用レジスタの内容をメモリに退避しなくても済むようにでき、例外処理への移行を高速化できる。   Making the register bank of a general-purpose register switchable by software only in the privileged state makes it possible to use a general-purpose register in a bank different from the user state in the privileged state. For example, in the exception processing, the processor is changed from the user state to the privileged state. When switching modes, it is not necessary to save the contents of the general-purpose register to the memory, and the transition to exception processing can be speeded up.

例外を抑止した状態の例外ハンドラ中で命令ブレーク例外を処理可能にすることは、多重に発生する例外の受け付けが禁止されている状態のデバッグ対象プログラムに対しても任意の位置で命令ブレークをかけてシステム評価やプログラムデバッグを行うことを保証できる。   Enabling an instruction break exception in an exception handler with an exception suppressed means that an instruction break can be placed at an arbitrary position even for a debug target program that is prohibited from receiving multiple exceptions. Can guarantee system evaluation and program debugging.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.

すなわち、ハードウェアによって決定された第1のベクタポイントのハンドラへの分岐、更に当該ハンドラから要因コードをオフセットとする別のハンドラへの分岐の何れにおいても、分岐先アドレスを直接メモリのアクセスによって取得することを要しないため、例外発生からそれに対処するハンドラへの遷移するまでの遷移時間を短縮でき、これによって、マイクロコンピュータ等のデータ処理装置の全体的なデータ処理速度の高速化が実現できる。   In other words, the branch destination address is obtained by direct memory access in both the branch to the handler at the first vector point determined by the hardware and the branch from the handler to another handler with the cause code as an offset. Therefore, it is possible to shorten the transition time from the occurrence of an exception to the transition to the handler for dealing with it, thereby realizing an increase in the overall data processing speed of a data processing device such as a microcomputer.

データ処理の高速化に密接なTLBミス例外のような処理に対しては、固定オフセットとしてのベクタオフセットを利用して得られたアドレスに配置された例外ハンドラによって直接例外処理を行うようにする。したがって、TLBミス例外に対する処理への遷移時間を短縮できる。一方、例外処理への遷移時間の短縮がTLBミス例外程データ処理速度の高速化に寄与しないと考えられる割り込みなどに対しては、ハンドラのマッピングやハンドラのサイズに対する融通性という点で使い勝手の向上を優先させることができる。   For processing such as TLB miss exception, which is closely related to high-speed data processing, exception processing is directly performed by an exception handler arranged at an address obtained by using a vector offset as a fixed offset. Therefore, the transition time to the processing for the TLB miss exception can be shortened. On the other hand, for interrupts, etc., where shortening of the transition time to exception processing is thought not to contribute to speeding up the data processing speed as much as TLB miss exceptions, improved usability in terms of handler mapping and flexibility in handler size Can be prioritized.

ベクタベースレジスタの値とベクタオフセットとを加算して得られたアドレスに配置された例外ハンドラの内の一部の例外ハンドラ(TLBミス例外ハンドラ)だけが、対応する例外に対して直接的な例外処理を行なう。その他の例外に対しては、例外要因コードをアドレスオフセットに利用して、更に、分岐されて所定のハンドラにたどり着くようになっている。したがって、物理的な回路規模の縮小とデータ処理の高速化との双方を満足させることができる。   Only some exception handlers (TLB miss exception handlers) of the exception handlers located at the address obtained by adding the value of the vector base register and the vector offset are directly exceptions to the corresponding exception. Perform processing. For other exceptions, the exception cause code is used as an address offset, and further branched to reach a predetermined handler. Therefore, it is possible to satisfy both a reduction in physical circuit scale and an increase in data processing speed.

ハードウェアによって規定されるベクタポイントのハンドラ上では、新たに発生する例外の多重受け付けを抑止するか否かを決定し、多重に受け付けるときは退避レジスタの内容をメモリに退避させることにより、例外発生時における状態退避と復帰アドレス退避を必ず退避レジスタにでき、この点においても例外発生からそれに対処するためのハンドラへの遷移時間を短縮できる。   On the vector point handler defined by the hardware, it is decided whether or not to suppress the multiple exceptions that are newly generated, and when multiple exceptions are received, the contents of the save register are saved in the memory. State saving and return address saving at the time can always be saved registers, and also in this respect, the transition time from the occurrence of an exception to the handler for dealing with it can be shortened.

ハードウェアで決定されるベクタポイントのハンドラから更に別のハンドラに分岐する際に要因コードが分岐のためのアドレスオフセットとして利用されるようになっているので、当該オフセットに対するベースアドレスはハードウェアによって決定されているベクタポイントのハンドラの記述に従って自由に決定でき、実際の分岐先アドレスや分岐先のハンドラのサイズ対して自由度を保証することができる。   When branching from a vector point handler determined by hardware to another handler, the cause code is used as an address offset for branching, so the base address for the offset is determined by hardware. It can be freely determined according to the description of the vector point handler, and the degree of freedom can be guaranteed for the actual branch destination address and the size of the branch destination handler.

内部状態及び復帰命令アドレスを退避するレジスタを採用することにより例外発生時の退避に際してメモリアクセスを減らすことができる。   By adopting a register that saves the internal state and the return instruction address, memory access can be reduced when saving when an exception occurs.

中央処理装置の動作に対して同期して発生される第1の例外と非同期で発生される第2の例外との双方に対処するとき、中央処理装置が割り込み要求の発生元とされる周辺モジュールの動作クロック周波数に対して複数倍のクロック周波数で動作されるような場合に、例外要因コードを格納するレジスタを上記第1と第2の例外に対して格別に設けることにより、双方の例外発生に対して同じようなタイミングで要因コードを共通のレジスタに書き込むための煩雑な処理を避けられ、これによって、要因コードをレジスタにセットする処理を簡素化できる。   When dealing with both the first exception generated synchronously with the operation of the central processing unit and the second exception generated asynchronously, the peripheral module from which the central processing unit is the source of the interrupt request When operating at a clock frequency that is a multiple of the operating clock frequency, an exception factor code is provided for each of the first and second exceptions, thereby generating both exceptions. On the other hand, a complicated process for writing the factor code to the common register at the same timing can be avoided, and the process for setting the factor code in the register can be simplified.

例外要因に応じてハードウェアで決定されている分岐先のハンドラ上での初期的なプロセッサモードを、例外の多重受け付け抑止状態及び特権状態を以て一定にすることは、ユーザが当該ハンドラ上で規定できる例外処理の内容に高い自由度を保証できる。   It is possible for the user to specify that the initial processor mode on the branch destination handler determined by the hardware according to the cause of the exception is constant with the exception multiple-rejection suppression state and privileged state on the handler. A high degree of freedom can be guaranteed for the contents of exception handling.

汎用レジスタのレジスタバンクを特権状態においてのみソフトウェアで切り換え可能にすることにより、特権状態においてユーザ状態とは異なるバンクの汎用レジスタを利用できるようになり、例えば例外処理においてユーザ状態から特権状態にプロセッサモードを切り換えるときに汎用レジスタの内容をメモリに退避しなくても済むようにでき、この点においても例外発生からそれに対処する処理への遷移時間を短縮することができる。   By enabling the register bank of general-purpose registers to be switched by software only in the privileged state, it becomes possible to use a general-purpose register in a bank different from the user state in the privileged state. For example, processor mode from user state to privileged state in exception processing It is possible to avoid saving the contents of the general-purpose register to the memory when switching, and in this respect as well, the transition time from the occurrence of an exception to the processing for dealing with it can be shortened.

例外を抑止した状態の例外ハンドラ中で命令ブレーク例外を処理可能にすることにより、多重に発生する例外の受け付けが禁止されている状態のデバッグ対象プログラムに対しても任意の位置で命令ブレークをかけてシステム評価やプログラムデバッグを行うことを保証できる。   By enabling an instruction break exception to be processed in an exception handler with the exception suppressed, an instruction break can be set at an arbitrary position even for a debug target program that is prohibited from receiving multiple exceptions. Can guarantee system evaluation and program debugging.

《マイクロコンピュータの概要》 図1は、本発明の実施例に係るシングルチップマイクロコンピュータ(シングルチップマイクロプロセッサとも言う)のブロック図を示す。同図に示されるマイクロコンピュータMPUは、例えば、公知の半導体集積回路製造技術によって単結晶シリコンのような1個の半導体基板あるいは半導体チップに形成される。マイクロコンピュータMPUは、特に制限されないが、内部バスとしてシステムバスS−bus、キャッシュバスC−busおよびペリフェラルバスP−busを含む。すなわち、マイクロコンピュータMPUは、スリーバス構成を有する。内部バスS−bus、C−bus、P−busの各々は、データを転送するためのデータバス、アドレス信号を転送するためのアドレスバス及び制御信号を転送するための制御バスを備えている。   << Outline of Microcomputer >> FIG. 1 is a block diagram of a single chip microcomputer (also referred to as a single chip microprocessor) according to an embodiment of the present invention. The microcomputer MPU shown in the figure is formed on a single semiconductor substrate or semiconductor chip such as single crystal silicon by, for example, a known semiconductor integrated circuit manufacturing technique. The microcomputer MPU includes, but is not limited to, a system bus S-bus, a cache bus C-bus, and a peripheral bus P-bus as internal buses. That is, the microcomputer MPU has a three-bus configuration. Each of the internal buses S-bus, C-bus, and P-bus includes a data bus for transferring data, an address bus for transferring address signals, and a control bus for transferring control signals.

システムバスS−busには、中央処理装置(central processing unit)CPU、乗算器(multiplier)MLT、キャッシュメモリ(cache memory)CACHE、メモリマネージメントユニット(memory management unit)MMU、及び命令ブレークコントローラ(instruction break controller)UBCが結合される。キャッシュバスC−busには上記キャッシュメモリCACHE、メモリマネージメントユニットMMU、命令ブレークコントローラUBC、及びバスステートコントローラ(bus state controller)BSCが結合される。バスステートコントローラBSCに接続されるペリフェラルバスP−busには、タイマTMU、中央処理装置CPUへの動作クロックの供給が停止されても計時動作が可能にされるリアルタイムクロック回路(real time clock circuit)RTC、外部メモリMMRYに含まれるダイナミック型メモリのリフレッシュ動作を制御するリフレッシュコントローラ(refresh controller)REFC、及びマイクロコンピュータMPUの外部に設けられた外部周辺装置(external peripheral devices)との間のシリアル通信を実行するシリアルコミュニケーションインタフェース(serial communication interface)SCIなどの内蔵周辺モジュール(internal peripheral modules)が接続される。また、上記バスステートコントローラBSCは、入出力回路(input and output circuit)EXIFを介して、外部バスEX−busに接続可能にされる。上記外部バスEX−busには、外部メモリMMRYや補助記憶装置DISKなどが接続されることになる。上記バスステートコントローラBSCは、上記内蔵周辺モジュール及び外部に対するバスサイクルの起動とそれに伴う各種バス制御を行う。   The system bus S-bus includes a central processing unit CPU, a multiplier MLT, a cache memory CACHE, a memory management unit MMU, and an instruction break controller (instruction break). controller) UBC is coupled. The cache memory CACHE, the memory management unit MMU, the instruction break controller UBC, and the bus state controller BSC are coupled to the cache bus C-bus. The peripheral bus P-bus connected to the bus state controller BSC has a timer TMU and a real-time clock circuit that enables a clock operation even when the operation clock supply to the central processing unit CPU is stopped. Serial communication between the RTC, the refresh controller REFC that controls the refresh operation of the dynamic memory included in the external memory MMRY, and the external peripheral devices provided outside the microcomputer MPU An internal peripheral module such as a serial communication interface SCI to be executed is connected. The bus state controller BSC is connectable to an external bus EX-bus via an input and output circuit EXIF. An external memory MMRY, an auxiliary storage device DISK and the like are connected to the external bus EX-bus. The bus state controller BSC performs activation of a bus cycle for the built-in peripheral module and the outside and various bus controls associated therewith.

割り込みコントローラ(interrupt controller)INTCは、上記内蔵周辺モジュールから、及び複数ビットの外部割り込み端子(external interrupt terminals)IRL0〜IRL3から外部割り込み要求(external interrupt request)を受け、割り込み優先レベル(interrupt priority level)に従って割り込み要求の調停などを行う。割り込みコントローラINTCは、発生した割り込み要求の受け付けを許可する場合、上記中央処理装置CPUへ割り込み要求信号SIG1を供給する。また、上記割り込みコントローラINTCは、受け付けられた割り込み要求の割り込み要因を割り込み要因信号SIG2によってメモリマネージメントユニットMMUの制御回路(TLBC)へ通知する。上記割り込み要求信号SIG1を受けた中央処理装置CPUは、割り込み許可信号SIG3をメモリマネージメントユニットMMUの制御回路TLBCへ供給する。上記メモリマネージメントユニットMMUの制御回路TLBCは、割り込み許可信号SIG3に応答し、許可された割り込み要求に対応する例外要因コード(exception code)を後述する記憶回路としての割り込み要因レジスタINTEVTに書き込む。中央処理装置CPUの制御部CTRLは、上記割り込み要因レジスタINTEVTにセットされた例外要因コードを用いて、実行中のデータ処理プログラムの処理から所定の割り込み処理へその処理を分岐する。   The interrupt controller INTC receives external interrupt requests from the built-in peripheral modules and multi-bit external interrupt terminals IRL0 to IRL3, and interrupt priority level. Follow the instructions to arbitrate interrupt requests. When the interrupt controller INTC permits the acceptance of the generated interrupt request, the interrupt controller INTC supplies the interrupt request signal SIG1 to the central processing unit CPU. The interrupt controller INTC notifies the interrupt factor of the accepted interrupt request to the control circuit (TLBC) of the memory management unit MMU by the interrupt factor signal SIG2. The central processing unit CPU that has received the interrupt request signal SIG1 supplies the interrupt permission signal SIG3 to the control circuit TLBC of the memory management unit MMU. In response to the interrupt permission signal SIG3, the control circuit TLBC of the memory management unit MMU writes an exception factor code (exception code) corresponding to the permitted interrupt request into an interrupt factor register INTEVT as a storage circuit described later. The control unit CTRL of the central processing unit CPU branches the process from the process of the data processing program being executed to a predetermined interrupt process by using the exception factor code set in the interrupt factor register INTEVT.

本実施例のマイクロコンピュータMPUは、論理アドレス空間(logical address space)を論理ページ(logical page)と呼ばれる単位に分割し、そのページ単位に物理アドレス(physical address)へのアドレス変換(address translation)を行うための仮想記憶(virtual memory)をサポートする。上記メモリマネージメントユニットMMUのアドレス変換バッファ(address translation look-aside buffer)TLBは、論理ページ番号と物理ページ番号とに関する複数の変換対をTLBエントリとして格納する。上記メモリマネージメントユニットMMUの制御部TLBCは、中央処理装置CPUが出力する論理アドレスをアドレス変換バッファTLBを用いて物理アドレスに変換するための制御を行う。TLBミスの場合、すなわち、中央処理装置CPUが出力した論理アドレスに対応する変換対がTLBエントリとしてアドレス変換バッファTLB内に記憶されていなかった場合、制御部TLBCは、外部メモリMMRY上のページテーブルをアクセスしてその論理アドレスに対応する変換対を外部メモリMMRYから読み込むように動作する。その後、制御部TLBCは、読み出された変換対をTLBエントリとしてアドレス変換バッファTLBへ書き込むように動作する。   The microcomputer MPU of the present embodiment divides a logical address space into units called logical pages, and performs address translation (address translation) into physical addresses for each page. Supports virtual memory to do. The address translation look-aside buffer TLB of the memory management unit MMU stores a plurality of translation pairs related to logical page numbers and physical page numbers as TLB entries. The control unit TLBC of the memory management unit MMU performs control for converting the logical address output from the central processing unit CPU into a physical address using the address conversion buffer TLB. In the case of a TLB miss, that is, when the translation pair corresponding to the logical address output by the central processing unit CPU is not stored in the address translation buffer TLB as a TLB entry, the control unit TLBC executes the page table on the external memory MMRY. And the conversion pair corresponding to the logical address is read from the external memory MMRY. Thereafter, the control unit TLBC operates to write the read translation pair as a TLB entry in the address translation buffer TLB.

アドレス変換バッファTLBは、例えば、4ウェイ・セットアソシアティブ(4way-set-associative)方式のキャッシュメモリ(cache memory)によって構成される。TLBミスなどのアドレス変換に係る後述されるような各種例外事象が発生すると、制御部TLBCはその例外事象に対応する例外要因コードを後述する記憶回路としての例外要因レジスタEXPEVTにセットし、且つ、TLBミスなどのアドレス変換に係る例外事象の発生を通知するための通知信号SIG4を中央処理装置CPUの制御部CTRLへ供給する。中央処理装置CPUは、例外要因レジスタEXPEVTにセットされた例外要因コードを用いて、或いは、例外要因レジスタEXPEVTにセットされた例外要因コードを用いずにハードウェアで直接的に、実行中のデータ処理プログラムの処理から対応する例外処理へその処理を分岐する。   The address translation buffer TLB is configured by, for example, a 4-way-set-associative cache memory. When various exception events as described later relating to address translation such as a TLB miss occur, the control unit TLBC sets an exception factor code corresponding to the exception event in an exception factor register EXPEVT as a storage circuit described later, and A notification signal SIG4 for notifying the occurrence of an exceptional event related to address translation such as a TLB miss is supplied to the control unit CTRL of the central processing unit CPU. The central processing unit CPU uses the exception factor code set in the exception factor register EXPEVT, or directly executes the data processing in hardware without using the exception factor code set in the exception factor register EXPEVT. The process branches from the program process to the corresponding exception process.

中央処理装置CPUは、例えば、4ギガバイトの論理アドレス空間をサポートするために、32ビットのアドレス信号を利用する。図1に示されるように、中央処理装置CPUは、例えば、汎用レジスタ(general purpose registers)R0〜R15や算術論理演算器(arithmetic and logic operation unit)ALUを含む演算部(operation unit)100と、後述されるプログラムカウンタ(program counter)PCなどのシステム制御用レジスタセット(system control register set)110と、命令のフェッチ、命令の解読、命令の実行手順の制御および演算の制御を行う制御部CTRLを含む。これらの回路装置(R0〜R15、ALU、110、CTRL)は、システムバスS−busに結合される。中央処理装置CPUは、外部メモリMMRYから実行されるべき命令をフェッチし、その命令記述(instruction code)に応じたデータ処理を行う。図1において、制御信号SIG5は、中央処理装置CPUからメモリマネージメントユニットMMUへの各種制御信号及び中央処理装置CPUの内部状態を通知するための信号を総称するものである。   The central processing unit CPU uses, for example, a 32-bit address signal to support a 4-gigabyte logical address space. As shown in FIG. 1, the central processing unit CPU includes, for example, an operation unit 100 including general purpose registers R0 to R15 and an arithmetic and logic operation unit ALU, A system control register set 110 such as a program counter PC, which will be described later, and a control unit CTRL for fetching instructions, decoding instructions, controlling instruction execution procedures, and controlling operations Including. These circuit devices (R0 to R15, ALU, 110, CTRL) are coupled to the system bus S-bus. The central processing unit CPU fetches an instruction to be executed from the external memory MMRY, and performs data processing according to the instruction description (instruction code). In FIG. 1, a control signal SIG5 is a general term for various control signals from the central processing unit CPU to the memory management unit MMU and signals for notifying the internal state of the central processing unit CPU.

キャッシュメモリCACHEは、特に制限されないが、4ウェイ・セットアソシアティブ形式とされる。キャッシュメモリCACHEに対するインデックスは、中央処理装置CPUから出力された論理アドレスの一部を用いて行われ、キャッシュメモリCACHEのキャッシュエントリのタグ部には物理アドレスが保有される。インデックスされたタグ部から出力される論理アドレスはアドレス変換バッファTLBで変換された物理アドレスと比較され、その比較結果に応じてキャッシュミス/ヒットが判定される。キャッシュミスの場合、当該キャッシュミスに係るデータ又は命令は外部メモリから読み込まれ、読み込まれたデータ又は命令は新たなキャッシュエントリとしてキャッシュメモリCACHEに格納される。   The cache memory CACHE is not particularly limited, but has a 4-way set associative format. The index for the cache memory CACHE is performed using a part of the logical address output from the central processing unit CPU, and the physical address is held in the tag portion of the cache entry of the cache memory CACHE. The logical address output from the indexed tag portion is compared with the physical address converted by the address conversion buffer TLB, and a cache miss / hit is determined according to the comparison result. In the case of a cache miss, the data or instruction relating to the cache miss is read from the external memory, and the read data or instruction is stored in the cache memory CACHE as a new cache entry.

上記命令ブレークコントローラUBCは、デバッグ機能を強化するために設けられており、システムバスS−busの状態がブレーク条件に一致するかを監視する。システムバスS−busの状態がブレーク条件と一致する場合、中央処理装置CPUにブレーク割込みを発生させる。命令ブレークコントローラUBCに含まれるIBRは、ブレーク条件として命令アドレスなどが設定される命令ブレークアドレスレジスタである。中央処理装置CPUは、デバッグ若しくはエミュレーション開始前にそのためのサービスルーチンを実行し、命令ブレークアドレスレジスタIBRにブレークすべき命令の先頭アドレスやオペランドアドレスなどの所望の命令ブレーク条件をあらかじめ設定する。マイクロコンピュータMPUの内部状態が前記命令ブレーク条件に一致すると、後述の命令ブレーク例外が発生する。これによって、中央処理装置CPUは、デバッグのための命令ブレークハンドラを実行可能にされる。したがって、マイクロコンピュータMPUの内部でブレークポイント制御を行うことができる。   The instruction break controller UBC is provided to enhance the debugging function, and monitors whether the state of the system bus S-bus matches the break condition. When the state of the system bus S-bus matches the break condition, a break interrupt is generated in the central processing unit CPU. The IBR included in the instruction break controller UBC is an instruction break address register in which an instruction address or the like is set as a break condition. The central processing unit CPU executes a service routine for that purpose before starting debugging or emulation, and presets desired instruction break conditions such as the start address and operand address of the instruction to be broken in the instruction break address register IBR. When the internal state of the microcomputer MPU matches the instruction break condition, an instruction break exception described later occurs. As a result, the central processing unit CPU can execute an instruction break handler for debugging. Therefore, breakpoint control can be performed inside the microcomputer MPU.

《CPUのレジスタ構成》 次に、中央処理装置CPUにおけるレジスタ構成が説明される。汎用レジスタR0〜R15は、図3に示されるように、夫々32ビットの記憶ビットを有し、図示されないインターフェイス回路を介して、上記システムバスに結合される。汎用レジスタR0〜R7は、プロセッサモードによって切り換えられるバンクレジスタとされる。換言すれば、汎用レジスタR0〜R7はバンク0とバンク1の2セット備えられる。すなわち、第1汎用レジスタセットとしてのR0(BANK0)〜R7(BANK0)と第2汎用レジスタセットとしてのR0(BANK1)〜R7(BANK1)とされる。上記プロセッサモードは、ユーザのアプリケーションプログラムが走行される動作状態を意味するユーザモード(ユーザ状態)と、オペレーティングシステム(operating system)などのシステムプログラムが走行される動作状態を意味する特権モード(特権状態)とを含む。したがって、特権状態とユーザ状態の夫々は、固有の汎用レジスタR0〜R7を有することができる。即ち、図4に示されるユーザ状態においては、バンク0の汎用レジスタR0(BANK0)〜R7(BANK0)が利用可能にされる。特権状態においては、後述されるステータスレジスタSRのレジスタバンクビットRB(SR.RB)の設定状態によって汎用レジスタR0〜R7の利用形態が決定される。   << Register Configuration of CPU >> Next, a register configuration in the central processing unit CPU will be described. As shown in FIG. 3, the general-purpose registers R0 to R15 each have 32 storage bits and are coupled to the system bus via an interface circuit (not shown). The general purpose registers R0 to R7 are bank registers that are switched according to the processor mode. In other words, two sets of general-purpose registers R0 to R7, that is, bank 0 and bank 1, are provided. That is, R0 (BANK0) to R7 (BANK0) as the first general purpose register set and R0 (BANK1) to R7 (BANK1) as the second general purpose register set. The processor mode includes a user mode (user state) that means an operating state in which a user application program is run and a privileged mode (privileged state) that means an operating state in which a system program such as an operating system is run. ). Thus, each of the privileged state and the user state can have its own general purpose registers R0-R7. That is, in the user state shown in FIG. 4, the general-purpose registers R0 (BANK0) to R7 (BANK0) of the bank 0 are made available. In the privileged state, the usage form of the general-purpose registers R0 to R7 is determined by the setting state of a register bank bit RB (SR.RB) of the status register SR described later.

例えば、図5に示されるように、特権状態において、RB=0のときは、R0(BANK0)〜R7(BANK0)は汎用レジスタとして自由な利用が許容され、R0(BANK1)〜R7(BANK1)に対しては制御ロード命令(LDC)及び制御ストア命令(STC)によるアクセスのみが許容される。RB=1ときは、上記とは逆にR0(BANK1)〜R7(BANK1)が汎用レジスタとしての自由な利用が許容され、R0(BANK0)〜R7(BANK0)に対しては制御ロード命令(LDC)及び制御ストア命令(STC)によるアクセスのみが許容される。前記制御ロード命令(LDC)及び制御ストア命令(STC)は、特権状態において実行可能な特権命令若しくはシステム制御命令の一例である。   For example, as shown in FIG. 5, in the privileged state, when RB = 0, R0 (BANK0) to R7 (BANK0) are allowed free use as general-purpose registers, and R0 (BANK1) to R7 (BANK1) Are only allowed to be accessed by a control load instruction (LDC) and a control store instruction (STC). When RB = 1, contrary to the above, R0 (BANK1) to R7 (BANK1) can be freely used as general-purpose registers, and control load instructions (LDC) are applied to R0 (BANK0) to R7 (BANK0). ) And control store instruction (STC). The control load instruction (LDC) and the control store instruction (STC) are examples of privileged instructions or system control instructions that can be executed in a privileged state.

このように汎用レジスタをバンクレジスタ構成とし、特権状態においてユーザ状態とは異なるバンクの汎用レジスタを利用可能にすることは、例えば、例外処理においてユーザ状態から特権状態にプロセッサモードを切り換える時、ユーザ状態において汎用的に使用されていた汎用レジスタR0〜R7の内容を外部メモリMMRYのスタック領域へ退避しなくても済むようにできる。したがって、中央処理装置CPUの例外処理への移行が高速化できる。   In this way, the general-purpose register is configured as a bank register, and in the privileged state, the general-purpose register in a bank different from the user state can be used. For example, when switching the processor mode from the user state to the privileged state in exception processing, the user state The contents of the general-purpose registers R0 to R7 that have been used for general purpose can be saved in the stack area of the external memory MMRY. Therefore, the shift to the exception processing of the central processing unit CPU can be speeded up.

システムレジスタは、図3に示されるように、データレジスタハイMACH、データレジスタローMACL、復帰アドレスレジスタPR、及びプログラムカウンタPCとされる。データレジスタハイMACH及びデータレジスタローMACLは、乗算、積算や積和演算のためのデータを格納する。復帰アドレスレジスタPRは、サブルーチンからの戻りアドレスを格納する。プログラムカウンタPCは、現在の命令のスタート番地を指す。   As shown in FIG. 3, the system registers are a data register high MACH, a data register low MACL, a return address register PR, and a program counter PC. The data register high MACH and the data register low MACL store data for multiplication, integration, and product-sum operations. The return address register PR stores the return address from the subroutine. The program counter PC indicates the start address of the current instruction.

コントロールレジスタは、図6に示されるように、セーブステータスレジスタSSR、セーブプログラムカウンタSPC、グローバルベースレジスタGBR、ベクタベースレジスタVBR、及びステータスレジスタSRとされる。セーブステータスレジスタSSRは、例外事象の発生時などにおいて、現在のステータスレジスタSRの値を退避するレジスタである。セーブプログラムカウンタSPCは、例外事象が発生したときに、対応する例外処理から復帰した後に中央処理装置CPUが実行すべき命令の命令アドレスを保持するためのレジスタである。セーブプログラムカウンタSPCには、例外事象が発生したとき所定のタイミングでプログラムカウンタPCの値が退避される。グローバルベースレジスタGBRは、GBR−インダイレクトアドレスモードにおけるベースアドレスを格納するレジスタである。GBR−インダイレクトアドレスモードは、シリアルコミュニケーションインタフェースSCIなどの上記内蔵周辺モジュールのレジスタ領域にデータを転送する時、また、論理演算の時に利用される。ベクタベースレジスタVBRは、例外処理のためのベクタ領域のベースアドレス(ベクタテーブルベースアドレス)を保有する。ステータスレジスタSRは、演算においてキャリー、ボロー、オーバーフローを示すために利用されるTビット、メモリアクセス制御に利用されるSビット、割り込み要求に対するマスクレベルを4ビットで示す割り込みマスクビットIMASK、除算に利用されるM及びQビット、上述のレジスタバンクビットRB、ブロックビットBL、プロセッサオペレーションモードビットMD、及びゼロビットを含む。ブロックビットBLは例外をマスクするために利用され、BL=1は例外をマスクすることを指示し、BL=0は例外を許容することを指示する。モードビットMDはMD=1にて特権モードを、MD=0にてユーザモードを示す。上記M、Q、S、Tの各ビットは、ユーザモードにおいて、所定の専用命令を実行した中央処理装置CPUによってセットあるいはクリアすることが可能である。その他全てのビットは、特権モードにおいてだけ中央処理装置CPUによってリード・ライト可能にされる。上記コントロールレジスタに対する書き込みは制御ロード命令(LDC)を実行する中央処理装置CPUによって行われ、上記コントロールレジスタに対する読み出しは制御ストア命令(STC)を実行する中央処理装置CPUによって行われる。   As shown in FIG. 6, the control registers are a save status register SSR, a save program counter SPC, a global base register GBR, a vector base register VBR, and a status register SR. The save status register SSR is a register that saves the current value of the status register SR when an exception event occurs. The save program counter SPC is a register for holding the instruction address of an instruction to be executed by the central processing unit CPU after returning from the corresponding exception processing when an exception event occurs. In the save program counter SPC, the value of the program counter PC is saved at a predetermined timing when an exceptional event occurs. The global base register GBR is a register that stores a base address in the GBR-indirect address mode. The GBR-indirect address mode is used when data is transferred to the register area of the built-in peripheral module such as the serial communication interface SCI or when a logical operation is performed. The vector base register VBR holds the base address (vector table base address) of the vector area for exception handling. The status register SR is a T bit that is used to indicate carry, borrow, and overflow in an operation, an S bit that is used for memory access control, an interrupt mask bit IMASK that indicates a mask level for an interrupt request in 4 bits, and a division bit that is used for division. M and Q bits, register bank bit RB, block bit BL, processor operation mode bit MD, and zero bit as described above. Block bit BL is used to mask exceptions, BL = 1 indicates masking exceptions, and BL = 0 indicates that exceptions are allowed. The mode bit MD indicates the privilege mode when MD = 1, and the user mode when MD = 0. The M, Q, S, and T bits can be set or cleared by the central processing unit CPU that has executed a predetermined dedicated instruction in the user mode. All other bits are readable and writable by the central processing unit CPU only in privileged mode. Writing to the control register is performed by a central processing unit CPU that executes a control load instruction (LDC), and reading to the control register is performed by a central processing unit CPU that executes a control store instruction (STC).

《マイクロコンピュータのアドレス空間》 本実施例のマイクロコンピュータMPUは、4GB(ギガバイト)の論理アドレス空間をサポートするために32ビットのアドレスを利用する。該論理アドレスは、空間番号によって拡張可能にされる。図13は、特権モードのアドレス空間とユーザモードのアドレス空間とのアドレスマッピングを示している。同図において、”Mapped”と示される領域は、アドレス変換バッファTLBを利用したアドレス変換の対象とされる。   << Microcomputer Address Space >> The microcomputer MPU of the present embodiment uses a 32-bit address to support a 4 GB (gigabyte) logical address space. The logical address is made expandable by a space number. FIG. 13 shows address mapping between the privilege mode address space and the user mode address space. In the figure, an area indicated as “Mapped” is an address conversion target using the address conversion buffer TLB.

H'FFFFFFFF〜H'80000000の領域は、特権モードにおいて、アクセス可能な領域とされ、ユーザモードでのアクセスはアドレスエラーとされる。   The area from H′FFFFFFFF to H′80000000 is an accessible area in the privileged mode, and an access in the user mode is an address error.

アドレス領域P4はコントロールスペースであり、周辺モジュールなどのコントロールレジスタなどがマッピングされる。   The address area P4 is a control space to which control registers such as peripheral modules are mapped.

アドレス領域P1,P2は、固定された物理アドレスを有する領域であり、アドレス変換バッファTLBを利用したアドレス変換の対象にはされない。アドレス領域P1,P2の論理アドレスは、一定の定数の加算又は減算によって物理アドレスに変換される。したがって、特権状態において、アドレス領域P1,P2をアクセスするとき、TLBミスを初めとするアドレス変換に係る例外事象が発生することはない。一般割り込み事象や一般例外事象などの各種例外ハンドラの物理アドレスをアドレス領域P1又はP2に割り当てることにより、TLBミスを初めとするアドレス変換に係る例外事象が例外処理中に新たに発生することがなくなる。換言すれば、アドレス変換に係る例外事象が、多重に発生する事態を回避でき、これによってデータ処理の効率化に寄与することができる。   The address areas P1 and P2 are areas having fixed physical addresses, and are not subjected to address conversion using the address conversion buffer TLB. The logical addresses in the address areas P1 and P2 are converted into physical addresses by addition or subtraction of a certain constant. Therefore, when the address areas P1 and P2 are accessed in the privileged state, an exceptional event related to address translation such as a TLB miss does not occur. By assigning physical addresses of various exception handlers, such as general interrupt events and general exception events, to the address area P1 or P2, exception events related to address translation such as TLB miss do not newly occur during exception processing. . In other words, it is possible to avoid the occurrence of multiple exceptional events related to address translation, thereby contributing to the efficiency of data processing.

特に、アドレス領域P2はキャッシュメモリCACHEによるキャッシュの対象とはされず、一方、アドレス領域P1はキャッシュの対象とされる。例外処理ハンドラに関して言えば、複数存在する例外処理ハンドラの内どの例外処理ハンドラをアドレス領域P1又はP2へ割り当てるかは、その例外処理の性質に応じて決定される。例えば、TLBミス例外に対処するための例外処理ハンドラのように高速処理が要求される例外処理ハンドラは、アドレス領域P1に割り当てるのが得策である。一方、例外処理の高速性が要求されない例外処理ハンドラは、キャッシュメモリを別のデータに解放しておくために、アドレス領域P2に割り当てるのが得策である。   In particular, the address area P2 is not subject to caching by the cache memory CACHE, while the address area P1 is subject to caching. With regard to the exception handling handler, which exception handling handler among a plurality of exception handling handlers is assigned to the address area P1 or P2 is determined according to the nature of the exception handling. For example, an exception handling handler that requires high-speed processing, such as an exception handling handler for dealing with a TLB miss exception, is best allocated to the address area P1. On the other hand, an exception handler that does not require high speed exception handling is best allocated to the address area P2 in order to release the cache memory to other data.

《例外処理の概要》 例外処理は、特別なハンドリングが要求されるので、現在のプログラム実行を例外的に別の処理へ分岐させる処理であり、中央処理装置CPUは現在の命令(その実行は後述の割り込み要求に対しては完了まで継続することが許容される)実行を抑止し且つユーザ記述による例外ハンドラにその制御を移行することによってその例外処理の要求に応答する。例えば、例外処理は、現在実行中の命令との関係では、3つの処理に分類できる。第1の処理は、現在実行中の命令を無視して、例外ハンドラの処理へ分岐する処理である。第2の処理は、現在実行中の命令を、例外ハンドラの処理完了後に、再実行する処理である。第3の処理は、現在実行中の命令実行を完了した後に、例外ハンドラの処理へ分岐して分岐先での処理完了後に分岐前の状態に復帰する処理である。後者の二つについては、一般例外のような第1の例外事象と所謂割り込み要求のような第2の例外事象として区別することができる。割り込み要求のような第2の例外事象は、中央処理装置CPUの動作とは非同期で発生するので、実行中の命令が実行完了された段階で受け付けられ、割り込み処理に対応する例外処理ハンドラの処理が終了すると、当該実行完了された命令の次の命令に中央処理装置CPUの処理が復帰される。一般例外のような第1の例外事象は、中央処理装置CPUの動作に同期して発生するので、その要求の原因が取り除かれた後、当該例外処理の要求が発せられた時点に中央処理装置CPUの実行していた命令が中央処理装置CPUによって再実行される。ただし、全ての例外処理には双方の定義に合致しないものが存在することは言うまでもない。   << Outline of Exception Processing >> Exception processing is processing that exceptionally branches the current program execution to another processing because special handling is required, and the central processing unit CPU executes the current instruction (the execution will be described later). The interrupt request is allowed to continue until completion), and responds to the exception handling request by transferring control to an exception handler written by the user. For example, exception handling can be classified into three processes in relation to the currently executing instruction. The first process is a process of ignoring the currently executing instruction and branching to the exception handler process. The second process is a process of re-executing the instruction currently being executed after completion of the exception handler process. The third process is a process of branching to the exception handler process after completing the execution of the currently executing instruction and returning to the state before the branch after completing the process at the branch destination. The latter two can be distinguished from a first exception event such as a general exception and a second exception event such as a so-called interrupt request. Since the second exception event such as an interrupt request occurs asynchronously with the operation of the central processing unit CPU, it is accepted at the stage where the instruction being executed is completed, and the exception handler corresponding to the interrupt process is processed. Is completed, the processing of the central processing unit CPU is returned to the instruction next to the instruction whose execution has been completed. Since the first exception event such as a general exception occurs in synchronization with the operation of the central processing unit CPU, after the cause of the request is removed, the central processing unit is issued when the exception processing request is issued. The instruction executed by the CPU is re-executed by the central processing unit CPU. However, it goes without saying that all exception handling does not match both definitions.

図7は、ベクタとして割り付けられた例外事象を示している。例外処理は、図7に示されるように、リセット処理、中央処理装置CPUの動作に同期して発生する例外事象(一般例外)に対する処理、中央処理装置CPUの動作と非同期で発生する割り込み要求に対する処理に大別される。夫々の例外処理において、現在実行中の命令に対する処置は、同図に示されるように、無視(Aborted)、再実行(Retried)および完了(Completed)の3種類に大別される。   FIG. 7 shows an exceptional event assigned as a vector. As shown in FIG. 7, exception processing is performed for reset processing, processing for exception events (general exceptions) that occur in synchronization with the operation of the central processing unit CPU, and interrupt requests that occur asynchronously with the operation of the central processing unit CPU. Broadly divided into processing. In each exception processing, as shown in the figure, the actions for the currently executing instruction are roughly classified into three types: Aborted, Retried, and Completed.

1)リセット処理は、パワーオンリセット(Power-On)とマニュアルリセット(Manual Reset)を含む。例えば、パワーオンリセットは、電源投入によってリセット信号がアサートされることを条件に、中央処理装置CPUや内蔵周辺モジュールの初期化を行うリセット処理とされる。   1) The reset process includes a power-on reset (Power-On) and a manual reset (Manual Reset). For example, the power-on reset is a reset process that initializes the central processing unit CPU and the built-in peripheral module on condition that the reset signal is asserted when the power is turned on.

2)一般例外は、中央処理装置CPUの内部で発生する例外と、メモリマネージメントユニットMMUによるアドレス変換に際して発生される例外に大別される。   2) General exceptions are broadly classified into exceptions that occur inside the central processing unit CPU and exceptions that occur during address translation by the memory management unit MMU.

前者の例外事象として、予約命令例外(Reserved Instruction Exception)、スロット不当命令例外(Illegal Slot Instruction Exception)、トラップ命令例外(Unconditional Trap)、及び命令ブレーク例外(User Breakpoint Trap)がある。   As the former exception events, there are a reserved instruction exception, a slot illegal instruction exception (Illegal Slot Instruction Exception), a trap instruction exception (Unconditional Trap), and an instruction break exception (User Breakpoint Trap).

後者の例外事象として、命令アクセス時とデータアクセス時におけるアドレスエラー例外(Address Error)、命令アクセス時とデータアクセス時におけるTLBミス例外(TLB Miss)、命令アクセス時とデータアクセス時におけるTLBインバリッド例外(TLB Invalid)、命令アクセス時とデータアクセス時におけるTLBプロテクト違反例外(TLB Protection Violation)、TLBイニシャルページライト例外(Initial Page Write)がある。   The latter exception events include an address error exception (Address Error) during instruction access and data access, a TLB miss exception (TLB Miss) during instruction access and data access, and a TLB invalid exception during instruction access and data access ( TLB Invalid), TLB protection violation exception (TLB Protection Violation) at instruction access and data access, and TLB initial page write exception (Initial Page Write).

上記TLBミスは、アドレス変換バッファTLBのアドレス比較が不一致である場合に発生し、当該不一致に係る論理アドレスのページテーブルエントリを外部メモリMMRYからアドレス変換バッファTLBにロードする処理とされる。トラップ命令例外は、TRAP命令を実行することを条件に発生し、当該命令のイミディエイト値を用いた分岐先のハンドラによって規定される処理を行うものであり、ソフトウェア割り込みとして位置づけることができる。予約命令例外は、遅延分岐命令を利用するときに、遅延スロット以外にある未定義命令コードをデコードすることなどを条件に発生し、分岐先のハンドラで規定される処理を行う。命令ブレーク例外は、レジスタIBRに設定されたブレーク条件が一致したことを条件に発生し、分岐先のハンドラで規定される処理を行う。   The TLB miss occurs when the address comparison of the address translation buffer TLB does not match, and the page table entry of the logical address related to the mismatch is loaded from the external memory MMRY to the address translation buffer TLB. The trap instruction exception occurs on condition that the TRAP instruction is executed, and performs processing defined by the branch destination handler using the immediate value of the instruction, and can be positioned as a software interrupt. The reserved instruction exception is generated under the condition that an undefined instruction code other than the delay slot is decoded when the delayed branch instruction is used, and the process specified by the branch destination handler is performed. An instruction break exception occurs on condition that the break condition set in the register IBR matches, and performs processing specified by the branch destination handler.

3)割り込み要求は、マスク不可能な割り込み(Nonmaskable Interrupt)、外部割り込み(External Hardware Interrupt)、及び内蔵周辺モジュール割り込み(Peripheral Module Interrupt)を含む。   3) Interrupt requests include non-maskable interrupts, external hardware interrupts, and peripheral module interrupts.

例外処理の優先レベル(Priority Level)に関しては、特に制限されないが、図7に示されるように、以下のように定義される。すなわち、リセットは優先レベル1に割り当てられ、一般例外は優先レベル3に割り当てられ、マスク不可能な割り込み要求は優先度レベル2に割り当てられ、その他の割り込み要求は優先度レベル4に割り当てられる。この優先レベルは、高い順に1〜4とされ、最も高い優先レベルは1とされ、最も低い優先レベルは4とされる。   The priority level (Exception Level) of exception processing is not particularly limited, but is defined as follows as shown in FIG. That is, reset is assigned to priority level 1, general exceptions are assigned to priority level 3, non-maskable interrupt requests are assigned to priority level 2, and other interrupt requests are assigned to priority level 4. The priority levels are 1 to 4 in descending order, the highest priority level is 1, and the lowest priority level is 4.

上記一般例外は、命令の実行シーケンスに関係して発生するので、優先レベル3が割り当てられている。優先レベル3に割り当てられている各種一般例外には、発生する命令実行段階の早遅に従って、1〜12の実行優先度(Execution Order)が割り当てられる。命令がパイプライン的に実行される場合、ある命令の実行中に検出された優先レベル3のある一般例外は、その後の命令の実行中に検出された優先レベル3の他の一般例外に先行して受け付けられるように制御される。従って、実行優先度は、個々の命令の実行スパン内での優先度を規定しているとみなされる。特に、命令ブレーク例外(ユーザブレークトラップ例外)において、ブレークポイントとして指定されている命令の実行前にトラップを発生させる場合、命令ブレーク例外の実行優先度は1とされ、実行後にトラップを発生させる場合、命令ブレーク例外の実行優先度は12、オペランドブレークポイントが設定されている場合も命令ブレーク例外の実行優先度は12とされる。外部割り込みと内蔵周辺モジュール割り込みとの間での優先レベルはソフトウェアによって定義される。   Since the above general exception occurs in relation to the instruction execution sequence, priority level 3 is assigned. Various general exceptions assigned to priority level 3 are assigned execution priorities (Execution Order) of 1 to 12 in accordance with the early and late of the instruction execution stage. When an instruction is executed in a pipeline, certain general exceptions with priority level 3 detected during execution of an instruction precede other general exceptions with priority level 3 detected during execution of a subsequent instruction. To be accepted. Therefore, the execution priority is regarded as defining the priority within the execution span of each instruction. In particular, in the case of an instruction break exception (user break trap exception), when a trap is generated before execution of an instruction specified as a breakpoint, the execution priority of the instruction break exception is set to 1, and a trap is generated after execution The execution priority of the instruction break exception is 12, and the execution priority of the instruction break exception is 12 even when the operand breakpoint is set. The priority level between external interrupts and built-in peripheral module interrupts is defined by software.

尚、図7における一般例外内のある1部の一般例外は、命令アクセス(Instr. Access)時とデータアクセス(Data Access)時とで区別されるように図示されている。これは、図7のAddress ErrorからInitial Page Writeまでの一般例外の記載は、ある1つの命令をパイプライン的に実行するときの実行順序に従って例外要因を記載してあるためである。したがって、図7に示されるTLB Miss(Instr. Access)とTLB Miss(Data Access)は相互に同一の例外ハンドラで処理される。Address Error(Instr. Access)とAddress Error(Data Access)、TLB Invalid(Instr. Access)とTLB Invalid(Data Access)そしてTLB Protection Violation(Instr. Access)とTLB Protection Violation(Data Access)も同様である。また、図7においては、一般例外は優先レベル3に割り当てられ、マスク不可能な割り込み要求は優先度レベル2に割り当てられているが、一般例外に優先レベル2を割り当て、マスク不可能な割り込み要求に優先度レベル3を割り当てても良い。   Note that one general exception in the general exception in FIG. 7 is illustrated so as to be distinguished between instruction access (Instr. Access) and data access (Data Access). This is because the description of general exceptions from Address Error to Initial Page Write in FIG. 7 describes exception factors according to the execution order when a certain instruction is executed in a pipeline manner. Therefore, TLB Miss (Instr. Access) and TLB Miss (Data Access) shown in FIG. 7 are processed by the same exception handler. The same applies to Address Error (Instr. Access) and Address Error (Data Access), TLB Invalid (Instr. Access) and TLB Invalid (Data Access), and TLB Protection Violation (Instr. Access) and TLB Protection Violation (Data Access) . In FIG. 7, the general exception is assigned to priority level 3 and the non-maskable interrupt request is assigned to priority level 2. However, priority level 2 is assigned to the general exception and non-maskable interrupt request is assigned. May be assigned a priority level of 3.

《例外処理のためのベクタ配置》 夫々の例外処理の内容を規定する各種例外処理ハンドラ(例外ハンドラと総称する)は、ベクタ配置を利用して呼び出される。マイクロコンピュータMPUは、そのハードウェア構成によって4種類のベクタ配置をサポートする。固定された物理アドレスH'A0000000はリセットのためのベクタとして割り当てられる。他の例外処理に対しては、ソフトウェアによって上記ベクタベースレジスタVBRに設定されたベクタテーブルベースアドレスからの固定番地のオフセット(ベクタオフセット)が割り当てられている。それぞれのベクタオフセットは、図7に示されるように、H'00000100、H'00000400、H'00000600とされる。上記TLBミス例外のベクタオフセットにはH'00000400が割り当てられ、TLBミス例外以外の一般例外のベクタオフセットにはH'00000100が割り当てられ、割り込み要求のベクタオフセットにはH'00000600が割り当てられる。   << Vector Arrangement for Exception Handling >> Various exception handlers (collectively referred to as exception handlers) that define the contents of each exception handling are called using vector arrangement. The microcomputer MPU supports four types of vector arrangement depending on its hardware configuration. The fixed physical address H′A0000000 is assigned as a vector for reset. For other exception processing, a fixed address offset (vector offset) from the vector table base address set in the vector base register VBR by software is assigned. As shown in FIG. 7, the vector offsets are H'0000100, H'00000040, and H'00000600. H'00000400 is assigned to the vector offset of the TLB miss exception, H'00000100 is assigned to the vector offset of general exceptions other than the TLB miss exception, and H'00000600 is assigned to the vector offset of the interrupt request.

ベクタテーブルのベースアドレスは、ベクタベースレジスタVBRにソフトウェアを実行する中央処理装置CPUによってロードされる。例えば、タスク切換え若しくはプロセス切換えに際して、オペレーティングシステムのようなシステムプログラムを実行する中央処理装置CPUによってベクタベースレジスタVBRの設定が行われる。ベクタテーブルのベースアドレスは、所定の固定された物理アドレス空間に配置されることになる。即ち、ベクタテーブルのベースアドレスは前記アドレス領域P1,P2に配置される。上記レジスタVBRの値とベクタオフセットとによって決定されるベクタポイント(ベクタアドレス)は、ハードウェアによって規定される。即ち、ベクタポイントは、ユーザ記述によるプログラムによって規定される性質のものではない。   The base address of the vector table is loaded into the vector base register VBR by the central processing unit CPU that executes software. For example, at the time of task switching or process switching, the vector base register VBR is set by a central processing unit CPU that executes a system program such as an operating system. The base address of the vector table is arranged in a predetermined fixed physical address space. That is, the base address of the vector table is arranged in the address areas P1 and P2. The vector point (vector address) determined by the value of the register VBR and the vector offset is defined by hardware. That is, the vector point is not of a nature defined by a program written by the user.

図14は、前記固定オフセットとしてのベクタオフセットの値を生成するためのハードウェアの構成を示している。同図において、定数発生回路CVGとシフタSFTは、ベクタオフセットを生成するために設けられている定数発生部或は演算手段みなされる。ベクタオフセットの値とベクタベースレジスタVBRの値との加算は、算術論理演算器ALUによって行われ、加算して得られたベクタポイントは、プログラムカウンタPCに書き込まれる。その後、中央処理装置CPUは、プログラムカウンタPCに書き込まれたベクタポイントに割り当てられる例外処理ハンドラをアクセスするために、システムバスS−bus内のアドレスバスへ上記ベククポイント(論理アドレス)を発生する。メモリ管理ユニットMMUは、上記ベククポイントとされる論理アドレスを受け、その論理アドレスに関するアドレス変換対をエントリとして記憶している場合、上記論理アドレスを物理アドレスに変換し、キャッシュメモリCACHEへ供給する。キャッシュメモリCACHEに上記物理アドレスに対応する命令が存在しない場合、上記物理アドレスが、キャッシュバスC−busのアドレスバス、バスステートコントローラBSC、入出力回路EXIF及び外部バスEX−busのアドレスバスを介して、上記外部メモリMMRYに供給される。上記物理アドレスが外部バスEX−busのアドレスバスヘ出力されることに同期して、上記中央処理装置CPUから出力される図示されないリード制御信号がシステムバスS−bus内の制御バス、キャッシュバスC−busの制御バス、バスステートコントローラBSC、入出力回路EXIF及び外部バスEX−busの制御バスを介して上記外部メモリMMRYに供給される、上記外部メモリMMRYは、上記物理アドレスによってリードアクセスされ、その物理アドレスに格納されているデータ(第1例外ハンドラの先頭の命令データ)が、外部バスEX−busのデータバス、入出力回路EXIF、バスステートコントローラBSC、キャッシュバスC−busのデータバス及びシステムバスS−bus内のデータバスを介して中央処理装置CPUへ供給されて実行される。   FIG. 14 shows a hardware configuration for generating a vector offset value as the fixed offset. In the figure, the constant generation circuit CVG and the shifter SFT are regarded as a constant generation unit or a calculation means provided for generating a vector offset. The addition of the vector offset value and the vector base register VBR value is performed by the arithmetic logic unit ALU, and the vector point obtained by the addition is written to the program counter PC. Thereafter, the central processing unit CPU generates the vector point (logical address) to the address bus in the system bus S-bus in order to access the exception handling handler assigned to the vector point written in the program counter PC. . When the memory management unit MMU receives the logical address as the vector point and stores an address translation pair related to the logical address as an entry, the memory management unit MMU converts the logical address into a physical address and supplies it to the cache memory CACHE. . When there is no instruction corresponding to the physical address in the cache memory CACHE, the physical address passes through the address bus of the cache bus C-bus, the bus state controller BSC, the input / output circuit EXIF, and the address bus of the external bus EX-bus. And supplied to the external memory MMRY. In synchronization with the output of the physical address to the address bus of the external bus EX-bus, a read control signal (not shown) output from the central processing unit CPU is sent to the control bus and cache bus C in the system bus S-bus. The external memory MMRY supplied to the external memory MMRY via the bus control bus, bus state controller BSC, input / output circuit EXIF, and external bus EX-bus control bus is read-accessed by the physical address, The data stored at the physical address (the first instruction data of the first exception handler) includes the data bus of the external bus EX-bus, the input / output circuit EXIF, the bus state controller BSC, the data bus of the cache bus C-bus, and Via the data bus in the system bus S-bus Is supplied to the processing unit CPU is executed.

上記プログラムカウンタPCにセットされるベクタポイントを生成するための前記定数発生回路CVG、シフタSFT、及び算術論理演算器ALUは、中央処理装置CPUの演算部100に含まれる。   The constant generation circuit CVG, shifter SFT, and arithmetic logic unit ALU for generating vector points set in the program counter PC are included in the arithmetic unit 100 of the central processing unit CPU.

定数発生回路CVG及びシフタSFTには、割り込み通知信号SIG1、TLBミス例外の発生を示す通知信号SIG4a、及びTLBミス例外以外の一般例外の発生を示す通知信号SIG6が供給される。通知信号SIG4aは、メモリマネージメントユニットMMU内の制御部TLBCから出力される前記信号SIG4に含まれる一つの信号である。すなわち、前記信号SIG4は、複数ビットの信号を含んでおり、前述のように、メモリマネージメントユニットMMUにおけるアドレス変換に起因する例外の発生を中央処理装置CPUに通知する信号である。前記信号SIG4には、発生した例外事象がTLBミス例外であることを示す通知信号SIG4a、発生した例外事象がTLBミス例外以外の例外事象であることを示す通知信号SIG4bなどが含まれる。通知信号SIG6は、図示されるように、メモリマネージメントユニットMMUにおけるアドレス変換に際してTLBミス例外以外の例外事象が発生したとき活性化される前記信号SIG4bと、中央処理装置CPU内部において例外事象が発生したとき活性化される内部信号SIG6aとを受けるオア回路ORの出力信号とされる。   The constant generation circuit CVG and the shifter SFT are supplied with an interrupt notification signal SIG1, a notification signal SIG4a indicating the occurrence of a TLB miss exception, and a notification signal SIG6 indicating the occurrence of a general exception other than a TLB miss exception. The notification signal SIG4a is one signal included in the signal SIG4 output from the control unit TLBC in the memory management unit MMU. That is, the signal SIG4 includes a signal of a plurality of bits, and as described above, is a signal for notifying the central processing unit CPU of the occurrence of an exception due to address translation in the memory management unit MMU. The signal SIG4 includes a notification signal SIG4a indicating that the exception event that has occurred is a TLB miss exception, a notification signal SIG4b indicating that the exception event that has occurred is an exception event other than a TLB miss exception, and the like. As shown in the figure, the notification signal SIG6 includes the signal SIG4b which is activated when an exception event other than a TLB miss exception occurs during address conversion in the memory management unit MMU, and an exception event has occurred in the central processing unit CPU. The output signal of the OR circuit OR which receives the internal signal SIG6a activated at this time.

前記定数発生回路CVG及びシフタSFTにおいて、発生すべき定数とシフト量は、前記信号SIG1,SIG4a,SIG6の内のどの信号が活性化されたかに基づいて制御される。定数発生回路CVGは、例えば、バイナリコードで2ビットの定数H'1(01)又はH'3(11)を発生する。定数発生回路CVGは、通知信号SIG4a又は通知信号SIG6が活性化されると、定数H'1を発生する。定数発生回路CVGは、割り込み発生の通知信号SIG6が活性化されると、定数H'3を発生する。シフタSFTは、通知信号SIG6が活性化されると、定数H'1(01)に対して8ビット左シフトを行うことによってベクタオフセットH'100(1.0000.0000)を出力する。TLBミス例外の通知信号SIG4aが活性化されると、シフタSFTは定数H'1(01)に対して10ビット左シフトを行うことによってベクタオフセットH'400(100.0000.0000)を出力する。通知信号SIG1が活性化されると、シフタSFTは定数H'3(11)を9ビット左シフトを行うことによって、ベクタオフセットH'600(110.0000.0000)を出力する。特に、本実施例において、ベクタオフセットとしてH'100,H'400,H'600を割り当てたのは、ベクタオフセットにおいて論理値”1”とされるビットの数を極力少なくするため、換言すれば、定数発生回路CVGの論理規模を小さくするためである。   In the constant generation circuit CVG and the shifter SFT, the constant to be generated and the shift amount are controlled based on which of the signals SIG1, SIG4a, SIG6 is activated. The constant generation circuit CVG generates, for example, a 2-bit constant H′1 (01) or H′3 (11) in binary code. The constant generation circuit CVG generates a constant H′1 when the notification signal SIG4a or the notification signal SIG6 is activated. The constant generation circuit CVG generates a constant H′3 when the interrupt generation notification signal SIG6 is activated. When the notification signal SIG6 is activated, the shifter SFT outputs a vector offset H′100 (1.00000.0000) by shifting the constant H′1 (01) by 8 bits to the left. When the TLB miss exception notification signal SIG4a is activated, the shifter SFT outputs a vector offset H′400 (100.0000.0000) by performing a 10-bit left shift on the constant H′1 (01). . When the notification signal SIG1 is activated, the shifter SFT outputs a vector offset H′600 (110.0000000.0000) by shifting the constant H′3 (11) by 9 bits to the left. In particular, in the present embodiment, H′100, H′400, and H′600 are assigned as vector offsets in order to minimize the number of bits set to the logical value “1” in the vector offsets. This is because the logic scale of the constant generation circuit CVG is reduced.

図14から明らかなように、ハードウェア(回路)で生成すべきベクタオフセットは3種類であるから、そのハードウェア量は2ビットの定数発生回路CVGとシフタSFTだけで済む。シフタSFTはベクタオフセットの生成に専用化される必然性は全くなく、その他の演算に汎用的に利用可能にすることは容易である。   As apparent from FIG. 14, since there are three types of vector offsets to be generated by hardware (circuit), the amount of hardware is only a 2-bit constant generation circuit CVG and a shifter SFT. The shifter SFT is not necessarily dedicated to the generation of the vector offset, and can easily be used for other operations.

《例外処理を指標する例外要因コード》 例外要因コード(exception code)は、図8に示されるように、夫々の例外処理の要因を識別可能にするために、夫々の例外事象に対し異なる値の例外要因コードが割り当てられる。この例外要因コードは、デバッグなどにおいて、発生した例外の要因をソフトウェア的に判定するために利用されると共に、後述されるように例外ハンドラへの分岐のためのアドレスオフセット情報としても利用される。デバッグにおいて利用可能にするため、レジスタEXPEVT及びINTEVTは、キャッシュバスC−busに結合され、バスステートコントローラBSC、入出力回路EXIF及び外部バスEX−busを介して、マイクロコンピュータMPUの外部からアクセス可能にされる。すなわち、レジスタEXPEVT及びINTEVTに記憶された要因コードは、マイクロコンピュータMPUの外部に出力可能にされる。それによって、デバッガが、発生した例外の要因を要因コードから簡単に判別可能なる。   << Exception factor code indicating exception handling >> As shown in FIG. 8, the exception code has a different value for each exception event so that each exception handling factor can be identified. An exception cause code is assigned. This exception factor code is used for determining the cause of the exception that has occurred in software or the like in debugging, and is also used as address offset information for branching to an exception handler, as will be described later. Registers EXPEVT and INTEVT are coupled to the cache bus C-bus and are accessible from the outside of the microcomputer MPU via the bus state controller BSC, the input / output circuit EXIF and the external bus EX-bus for use in debugging. To be. That is, the factor codes stored in the registers EXPEVT and INTEVT can be output to the outside of the microcomputer MPU. As a result, the debugger can easily determine the cause of the exception that has occurred from the factor code.

図8に示される例外要因コードは、H'20毎に割り当てられる。これをアドレス換算すれば、32バイト毎のアドレスオフセットとしての意味を持つ。例えば、1命令が2バイトの固定長命令であれば、16命令の記述に相当するアドレス範囲とされる。また、図8において、一般例外のうち、アドレスエラー例外(Address Error)、TLBミス例外(TLB Miss)、TLBインバリッド例外(TLB Invalid)、TLBプロテクト違反例外(TLB Protection Violation)については、ロード命令実行時(load)とストア命令実行時(store)とで別の例外要因コードが割り当てられる。これは、デバッグの容易性を考慮して設定されている。尚、図8において、内蔵周辺モジュールの割り込み要求に関する例外要因コードについては、代表的に一つの要因コードH'400だけが示されている。しかし、実際には、内蔵周辺モジュールの数およびその機能に依存して多数存在すると理解されたい。   The exception cause code shown in FIG. 8 is assigned for each H′20. If this is converted into an address, it has a meaning as an address offset every 32 bytes. For example, if one instruction is a fixed-length instruction of 2 bytes, the address range corresponds to the description of 16 instructions. In FIG. 8, among general exceptions, load instruction execution is performed for an address error exception (Address Error), a TLB miss exception (TLB Miss), a TLB invalid exception (TLB Invalid), and a TLB protection violation exception (TLB Protection Violation). Different exception cause codes are assigned at the time of loading (load) and at the time of executing store instruction (store). This is set in consideration of ease of debugging. In FIG. 8, only one factor code H′400 is typically shown as the exception factor code related to the interrupt request of the built-in peripheral module. However, it should be understood that there are actually many depending on the number of built-in peripheral modules and their functions.

図9に示される例外要因レジスタEXPEVTは、上記例外要因コードのうちリセット及び一般例外事象に割り当てられた例外要因コードをビット11〜ビット0に格納する32ビットのレジスタである。一方、割り込み要因レジスタINTEVTは、上記例外要因コードのうち割り込み要求に割り当てられた例外要因コードをビット11〜ビット0に格納する32ビットのレジスタである。これらのレジスタEXPEVT,INTEVTは、図1にも示されるように、システムバスS−busとキャッシュバスC−busとに結合され、メモリマネージメントユニットMMUの制御部TLBC内に配置されている。その理由は、TLBミスなどの高速処理が要求される一般例外の発生を一番早く検出できるのがメモリマネージメントユニットMMUの制御部TLBCだからである。   The exception factor register EXPEVT shown in FIG. 9 is a 32-bit register that stores exception factor codes assigned to reset and general exception events in the above-mentioned exception factor codes in bits 11 to 0. On the other hand, the interrupt factor register INTEVT is a 32-bit register that stores the exception factor code assigned to the interrupt request among the exception factor codes in bits 11 to 0. As shown in FIG. 1, these registers EXPEVT and INTEVT are coupled to the system bus S-bus and the cache bus C-bus, and are arranged in the control unit TLBC of the memory management unit MMU. The reason is that it is the control unit TLBC of the memory management unit MMU that can detect the occurrence of a general exception requiring high-speed processing such as a TLB miss the earliest.

例外要因コードを格納するレジスタを一般例外と割り込み要求とで個別に設ける理由は、次の理由による。すなわち、一般例外は中央処理装置CPUの動作に同期して発生し、割り込み要求は中央処理装置CPUの動作とは非同期で発生する。また、中央処理装置CPUの動作クロック周波数は、割り込み要求の発生元とされる内蔵周辺モジュール及び外部回路の動作クロック周波数に対して複数倍、例えば、4倍のクロック周波数とされる。このように、割り込み要求と一般例外の発生タイミングの相違、および、割り込み要求発生元と例外発生元の動作速度の相違を考慮した場合、双方の例外要因コードを同じようなタイミングで同一のレジスタに書き込ませることは、レジスタに対する例外要因コードの書き込みタイミングの設定処理などを煩雑にする虞があるからである。   The reason why a register for storing an exception factor code is separately provided for a general exception and an interrupt request is as follows. That is, the general exception is generated in synchronization with the operation of the central processing unit CPU, and the interrupt request is generated asynchronously with the operation of the central processing unit CPU. Further, the operation clock frequency of the central processing unit CPU is set to a multiple of, for example, four times the operation clock frequency of the built-in peripheral modules and external circuits that are the generation sources of interrupt requests. In this way, when considering the difference between the generation timing of interrupt requests and general exceptions, and the difference in operating speed between the interrupt request generation source and the exception generation source, both exception cause codes are stored in the same register at the same timing. This is because the writing process of setting the exception factor code write timing to the register may be complicated.

図15は、上記例外要因コードを生成するための論理ブロックの構成を示している。同図に示される論理回路LOGは、メモリマネージメントユニットMMUの制御回路TLBCに含まれる。この論理回路LOGには、割り込み要因A、中央処理装置CPU内部での例外発生状況B、メモリマネージメントユニットMMU内部での例外発生状況C、リセット指示D、その他付帯情報Eが供給され、これらの入力情報の状態に応じて対応する例外要因コードを生成する。   FIG. 15 shows a configuration of a logical block for generating the exception cause code. The logic circuit LOG shown in the figure is included in the control circuit TLBC of the memory management unit MMU. The logic circuit LOG is supplied with an interrupt factor A, an exception occurrence situation B inside the central processing unit CPU, an exception occurrence situation C inside the memory management unit MMU, a reset instruction D, and other incidental information E. A corresponding exception cause code is generated according to the information status.

割り込み要因Aは、割り込みコントローラINTCから信号SIG2によって論理回路LOGへ供給される。その他の付帯情報Eには前記割り込み受け付けの通知信号SIG3が含まれる。論理回路LOGは、上記割り込み要因Aとその他付帯情報Eの活性化状態に応答して、割り込み要因を対応する例外要因コードを生成し、生成した例外要因コードを割り込み要因レジスタINTEVTにセットする。   The interrupt factor A is supplied from the interrupt controller INTC to the logic circuit LOG by the signal SIG2. The other incidental information E includes the interrupt acceptance notification signal SIG3. In response to the activation state of the interrupt factor A and other incidental information E, the logic circuit LOG generates an exception factor code corresponding to the interrupt factor, and sets the generated exception factor code in the interrupt factor register INTVT.

前記中央処理装置CPU内部での例外発生状況Bは、予約命令例外(Reserved Instruction Exception)、スロット不当命令例外(Illegal Slot Instruction Exception)、トラップ命令例外(Unconditional Trap)、及び命令ブレーク例外(User Breakpoint Trap)の発生状況を区別するための複数ビットの信号として、中央処理装置CPUから論理回路LOGに供給される。例外発生状況Bは、図1に示される制御信号SIG5に含まれるとみなされる。   Exception occurrence status B in the central processing unit CPU includes a reserved instruction exception, an illegal slot instruction exception, a trap instruction exception (Unconditional Trap), and an instruction break exception (User Breakpoint Trap). ) Is supplied from the central processing unit CPU to the logic circuit LOG as a multi-bit signal for distinguishing the occurrence status of The exception occurrence situation B is considered to be included in the control signal SIG5 shown in FIG.

メモリマネージメントユニットMMU内部での例外発生状況Cは、アドレスエラー例外(Address Error)、TLBミス例外(TLB Miss)、TLBインバリッド例外(TLB Invalid)、TLBプロテクト違反例外(TLB Protection Violation)、TLBイニシャルページライト例外(Initial Page Write)の発生状況を区別するための複数ビットの内部信号として、論理回路LOGに供給される。   Exception occurrence status C in the memory management unit MMU includes an address error exception (Address Error), a TLB miss exception (TLB Miss), a TLB invalid exception (TLB Invalid), a TLB protection violation exception (TLB Protection Violation), and a TLB initial page. It is supplied to the logic circuit LOG as a multi-bit internal signal for distinguishing the occurrence status of the write exception (Initial Page Write).

前記付帯情報Eは、アドレス変換に係る命令がロード命令かストア命令かを区別するための情報を含む。この情報は、中央処理装置CPU内で実行されるべき命令の解読結果によって得られ、中央処理装置CPUから論理回路LOGに供給される。   The accompanying information E includes information for distinguishing whether an instruction relating to address translation is a load instruction or a store instruction. This information is obtained from the result of decoding the instruction to be executed in the central processing unit CPU, and is supplied from the central processing unit CPU to the logic circuit LOG.

論理回路LOGは、前記中央処理装置CPU内部での例外発生状況B、メモリマネージメントユニットMMU内部での例外発生状況C及び前記付帯情報Eに基づいて、発生された一般例外に対応する例外要因コードを生成し、生成された例外要因コードを例外要因レジスタEXPEVTにセットする。   The logic circuit LOG generates an exception factor code corresponding to the generated general exception based on the exception occurrence situation B in the central processing unit CPU, the exception occurrence situation C in the memory management unit MMU, and the incidental information E. And the generated exception cause code is set in the exception cause register EXPEVT.

リセットに関する例外要因コードは、リセット信号によって形成されたリセット指示Dに論理回路LOGが応答し、論理回路LOGが生成する。生成されたリセットに関する例外要因コードは、論理回路LOGによって例外要因レジスタEXPEVTへセットされる。リセット指示Dは、図1に示される制御信号SIG5に含まれるとみなされる。   An exception factor code related to reset is generated by the logic circuit LOG in response to the reset instruction D formed by the reset signal. The generated exception cause code relating to the reset is set in the exception cause register EXPEVT by the logic circuit LOG. The reset instruction D is considered to be included in the control signal SIG5 shown in FIG.

《例外ハンドラの配置》 上記H'100,H'400,H'600で規定されるベクタオフセットは、ベクタベースレジスタVBRの値(ベクタテーブルのベースアドレス)からの固定されたオフセットを規定する。図2に示されるように、リセットに関する例外ハンドラは、H'A00000000の固定番地に配置される。TLBミス例外に関する例外ハンドラは、レジスタVBRの値+ベクタオフセット(H'400)のアドレスに直接配置される。その他の一般例外及び割り込み要求に関する例外ハンドラは、レジスタVBRの値にH'100又はH'600のベクタオフセットを加算して得られるアドレス位置に第1のハンドラ(図2に示される一般例外に共通のハンドラおよび割り込み要求に共通のハンドラ)が配置される。第1のハンドラから当該要因に固有の別の第2のハンドラへの分岐は、レジスタEXPEVTまたはINTEVTに記憶された例外要因コードをアドレスオフセットとして利用することによって行われる。   << Arrangement of Exception Handler >> The vector offset defined by H′100, H′400, and H′600 defines a fixed offset from the value of the vector base register VBR (base address of the vector table). As shown in FIG. 2, the exception handler relating to reset is arranged at a fixed address of H′A00000000. The exception handler related to the TLB miss exception is directly arranged at the address of the value of the register VBR + the vector offset (H′400). The exception handler for other general exceptions and interrupt requests is the first handler (common to the general exceptions shown in FIG. 2) at the address position obtained by adding the vector offset of H′100 or H′600 to the value of the register VBR. Handlers and handlers common to interrupt requests). Branching from the first handler to another second handler specific to the factor is performed by using the exception factor code stored in the register EXPEVT or INTEVT as an address offset.

アドレスオフセットとしてどのように例外要因コードを利用するかは、ベクタベースレジスタVBR+ベクタオフセットの位置に配置されたハンドラ(ユーザ記述による)の記述内容(ソフトウェアプログラム)によって決定される。例えば、VBR+ベクタオフセット+例外要因コードとして第2のハンドラへ分岐することを規定したり、或いは当該ハンドラ内部でセットしたベースアドレスに例外要因コードを加算して第2のハンドラへ分岐することを規定したり、又は例外要因コードを所定ビット数だけシフトして第2のハンドラへ分岐することを規定したりすることができる。要は、夫々の例外要因コードがH'20のような所定の間隔を空けて割り振られているので、ハンドラの記述量などに応じて当該例外要因コードを所望に利用すればよい。レジスタEXPEVTまたはINTEVTに記憶された例外要因コードをアドレスオフセットとして利用する場合、中央処理装置CPUは、システムバスS−busのアドレスバスにレジスタEXPEVTまたはINTEVTのアドレス信号を供給し、システムバスS−busの制御バスにリード制御信号を供給して、レジスタEXPEVT又はINTEVTをアクセスする。リードアクセスされたレジスタEXPEVT又はINTEVTは、その内部に記憶された要因コードをシステムバスのデータバスへ供給し、上記CPUが、その要因コードを、例えば、1つの汎用レジスタ(R0)に格納する。それによって、上記中央処理装置CPUは、要因コードを計算に使用可能になる。なお、実際の計算は、中央処理装置CPU内部の前記算術論理演算器ALUによって行われる。   How to use the exception factor code as the address offset is determined by the description contents (software program) of the handler (by user description) arranged at the position of the vector base register VBR + vector offset. For example, it is specified to branch to the second handler as VBR + vector offset + exception cause code, or to branch to the second handler by adding the exception cause code to the base address set in the handler. Or, it can be specified that the exception cause code is shifted by a predetermined number of bits and branched to the second handler. In short, since each exception factor code is allocated with a predetermined interval such as H′20, the exception factor code may be used as desired according to the description amount of the handler. When the exception cause code stored in the register EXPEVT or INTEVT is used as an address offset, the central processing unit CPU supplies the address signal of the register EXPEVT or INTEVT to the address bus of the system bus S-bus, and the system bus S-bus A read control signal is supplied to the control bus to access the register EXPEVT or INTEVT. The read-accessed register EXPEVT or INTEVT supplies the factor code stored therein to the data bus of the system bus, and the CPU stores the factor code in, for example, one general-purpose register (R0). Thereby, the central processing unit CPU can use the factor code for calculation. The actual calculation is performed by the arithmetic logic unit ALU in the central processing unit CPU.

例えば、図2に示されるように、TLBミス例外以外の一般例外のための例外ハンドラに関しては、当該一般例外に共通の第1のハンドラが、VBR+ベクタオフセット(H'100)のベクタポイントに配置される。当該第1のハンドラは、その例外要因に対応する例外要因コードをアドレスオフセットとしてさらに別のハンドラ(第2のハンドラ)へ分岐することを規定する記述を有する。したがって、ベクタポイントに例外要因コードを加算して得られるアドレスのそれぞれに例外要因に固有の第2のハンドラをそれぞれ配置しておくことによって、所望の第2のハンドラへ分岐することができる。この場合、例外要因コードはレジスタEXPEVTから取得される。   For example, as shown in FIG. 2, for an exception handler for a general exception other than a TLB miss exception, the first handler common to the general exception is placed at the vector point of VBR + vector offset (H′100). Is done. The first handler has a description that specifies that an exception factor code corresponding to the exception factor is branched to another handler (second handler) as an address offset. Therefore, it is possible to branch to a desired second handler by placing a second handler specific to the exception factor at each address obtained by adding the exception factor code to the vector point. In this case, the exception cause code is acquired from the register EXPEVT.

また、割り込み要求に関する例外ハンドラも上記同様であり、VBR+ベクタオフセット(H'600)のベクタポイントに、当該割り込み要求に共通の第1のハンドラが配置される。当該第1のハンドラは、その割り込み要因に対応する要因コードをアドレスオフセットとしてさらに別のハンドラ(第2のハンドラ)へ分岐することを規定する記述を有する。したがって、ベクタポイントに例外要因コードを加算して得られるアドレスのそれぞれに割り込み要因に固有の第2のハンドラをそれぞれ配置しておくことによって、所望の第2のハンドラへ分岐することができる。この場合、割り込み要求の例外要因コードは、レジスタINTEVTから取得される。   The exception handler related to the interrupt request is the same as described above, and the first handler common to the interrupt request is arranged at the vector point of VBR + vector offset (H′600). The first handler has a description that prescribes branching to another handler (second handler) using the cause code corresponding to the interrupt cause as an address offset. Therefore, it is possible to branch to a desired second handler by placing a second handler specific to the interrupt factor at each address obtained by adding the exception factor code to the vector point. In this case, the exception factor code of the interrupt request is acquired from the register INTEVT.

本実施例に従えば、各種例外ハンドラはTLBを利用したアドレス変換を要しない前記アドレス領域P1又はP2に割り当てられるので、アドレス変換に係る例外事象が多重に発生する事態を回避でき、これによって、データ処理の効率化に寄与することができる。   According to this embodiment, since various exception handlers are assigned to the address area P1 or P2 that does not require address translation using TLB, it is possible to avoid a situation in which multiple exception events related to address translation occur. This can contribute to efficient data processing.

上記の様な例外ハンドラの配置において、TLBミス例外、その他の一般例外、又は割り込み要求が発生した時、中央処理装置CPUの処理は、VBRレジスタに設定されているベクタテーブルのベースアドレスにベクタオフセットをオフセットアドレスとして加算したアドレス位置に分岐され、そのアドレス位置に配置されているハンドラを処理することになる。この分岐は、マイクロコンピュータMPUのハードウェアによって規定される。そのとき、どのベクタオフセットを用いるかは、図14で説明されたように、例外発生要因の種別によって一義的に決定される。発生した例外がTLBミス例外の場合、VBR+ベクタオフセット(H'400)で指定されるベクタポイントに割り付けられたハンドラはTLBミス例外ハンドラとされる。その他の一般例外又は割り込み要求の場合、VBR+ベクタオフセットで指定されるベクタポイントのハンドラは、その例外要因の要因コードをオフセットとして分岐する処理を含み、当該分岐先にその例外要因に固有のハンドラが配置されている。   In the exception handler arrangement as described above, when a TLB miss exception, other general exception, or an interrupt request occurs, the processing of the central processing unit CPU performs a vector offset to the base address of the vector table set in the VBR register. Branch to the address position added as an offset address, and the handler arranged at that address position is processed. This branch is defined by the hardware of the microcomputer MPU. At this time, which vector offset is used is uniquely determined by the type of the cause of the exception as described with reference to FIG. When the generated exception is a TLB miss exception, the handler assigned to the vector point specified by VBR + vector offset (H′400) is regarded as a TLB miss exception handler. In the case of other general exceptions or interrupt requests, the vector point handler specified by VBR + vector offset includes a process that branches using the cause code of the exception cause as an offset, and the branch destination has a handler specific to the exception cause. Has been placed.

トラップ命令を実行することによって発生するトラップ例外に関しては、そのトラップ命令が保有する8ビットのイミディエイト値が、図9に示されるトラップレジスタTRAに格納され、その値がVBRレジスタの下位のアドレスデータに加算され、加算されて得られた値によって対応する例外ハンドラがフェッチされるようになっている。トラップ命令例外は、例えば、ユーザープログラム内のタスクからオペレーティングシステムへのシステムコールに利用される。   For trap exceptions that occur when a trap instruction is executed, the 8-bit immediate value held by the trap instruction is stored in the trap register TRA shown in FIG. 9, and the value is stored in the lower address data of the VBR register. The corresponding exception handler is fetched according to the value obtained by the addition. The trap instruction exception is used, for example, for a system call from a task in the user program to the operating system.

《例外処理フロー》 図10は、上記ベクタオフセットによってベクタポイントまで分岐する処理のフローチャートが示される。ベクタポイントへの分岐は、図14で説明したように、マイクロコンピュータMPUのハードウェアによって規定され、特権状態への遷移として位置付けられる処理であり、以下のステップを含む。   << Exception Processing Flow >> FIG. 10 shows a flowchart of processing for branching to a vector point by the vector offset. As described in FIG. 14, the branch to the vector point is a process defined by the hardware of the microcomputer MPU and positioned as a transition to the privileged state, and includes the following steps.

〔例外/割り込みの検出〕 リセット、一般例外、又は割り込み要求が発生されると、それが制御部CTRLにて検出される(S1)。例えば、制御部CTRLは、マニュアルリセットであればリセットスイッチの操作によって発生するリセット信号、TLBミス例外であればメモリマネージメントユニットMMUの制御回路TLBCから出力されるTLBミスの検出信号など、割り込み要求であれば割り込みコントローラINTCから中央処理装置CPUに供給される割り込み信号SIG1に基づいて例外を検出する。中央処理装置CPU内部の例外は、その内部状態に基づいて検出される。   [Detection of Exception / Interrupt] When a reset, a general exception, or an interrupt request is generated, it is detected by the control unit CTRL (S1). For example, the control unit CTRL generates an interrupt request such as a reset signal generated by a reset switch operation in the case of a manual reset, and a TLB miss detection signal output from the control circuit TLBC of the memory management unit MMU in the case of a TLB miss exception. If there is, an exception is detected based on the interrupt signal SIG1 supplied from the interrupt controller INTC to the central processing unit CPU. An exception in the central processing unit CPU is detected based on its internal state.

〔PC、SRの退避〕 次に、中央処理装置CPUは、プログラムカウンタPCの値をセーブプログラムカウンタSPCに退避し、ステータスレジスタSRの値をセーブステータスレジスタSSRに退避する(S2)。退避のタイミングは、一般例外の場合、当該例外が発生した時点とされ、したがって、現在実行完了されていない命令のアドレスなどが退避され、復帰後はその命令が再実行されることになる。割り込み要求の場合の退避のタイミングは、その割り込み要求が発生された時点において、中央処理装置CPUがその時点に実行していた命令の実行完了を待って上記2つの値の退避が行われ、その結果として、その命令の次の命令のアドレスなどが退避されることになる。これにより、例外が発生したときプログラムカウンタPCの値やステータスレジスタSRの値をメモリ上のスタック領域に退避するためのメモリアクセスを要せず内蔵レジスタアクセスで済むため、本発明のマイクロコンピュータMPUの退避処理を高速に行うことができる。   [Saving PC and SR] Next, the central processing unit CPU saves the value of the program counter PC to the save program counter SPC, and saves the value of the status register SR to the save status register SSR (S2). In the case of a general exception, the save timing is the time when the exception occurs. Therefore, the address of an instruction that has not been executed is saved, and the instruction is re-executed after returning. The timing of saving in the case of an interrupt request is that when the interrupt request is generated, the above two values are saved after the central processing unit CPU waits for the execution of the instruction executed at that time. As a result, the address of the instruction next to the instruction is saved. As a result, when an exception occurs, it is not necessary to access the memory to save the value of the program counter PC or the value of the status register SR to the stack area on the memory, and only the internal register access is required. Evacuation processing can be performed at high speed.

〔プロセッサモードの切換え〕 中央処理装置CPUは、ステータスレジスタSRのモードビットMDを論理値1にしてマイクロコンピュータMPUの動作モードを特権モードに設定する(S3)。中央処理装置CPUは、更に、ステータスレジスタSRのブロックビットBLを論理値”1”にセットして、その他の例外及び割り込みをマスクする(S3)。中央処理装置CPUは、さらに、ステータスレジスタSRのレジスタバンクビットRBを論理値1にセットして、特権状態における汎用レジスタR0〜R7をユーザ状態とは別のレジスタバンクに切り換える(S3)。したがって、汎用レジスタR0〜R7のバンク切換えを行うから、ユーザ状態におけるレジスタバンクの汎用レジスタR0〜R7を退避する処理は不要になる。   [Switching of processor mode] The central processing unit CPU sets the mode bit MD of the status register SR to a logical value 1, and sets the operation mode of the microcomputer MPU to the privileged mode (S3). The central processing unit CPU further sets the block bit BL of the status register SR to the logical value “1” to mask other exceptions and interrupts (S3). The central processing unit CPU further sets the register bank bit RB of the status register SR to a logical value 1, and switches the general purpose registers R0 to R7 in the privileged state to a register bank different from the user state (S3). Therefore, since the bank switching of the general purpose registers R0 to R7 is performed, the processing for saving the general purpose registers R0 to R7 of the register bank in the user state is not necessary.

〔例外要因のセット〕 次に、そのときの例外や割り込み要求の要因に割り当てられている例外要因コードが、図15において説明されたように、レジスタEXPEVT又はINTEVTにセットされる(S4)。前者のレジスタEXPEVTには一般例外要因又はリセットの要因コードが、後者レジスタINTEVTには割り込み要求の要因コードが,MMU内の論理回路LOGによってセットされる。   [Set of Exception Factor] Next, the exception factor code assigned to the exception or interrupt request factor at that time is set in the register EXPEVT or INTEVT as described in FIG. 15 (S4). A general exception factor or reset factor code is set in the former register EXPEVT, and an interrupt request factor code is set in the latter register INTEVT by the logic circuit LOG in the MMU.

〔ベクタポイントに分岐〕 上述のように、中央処理装置CPUの制御は、所定のベクタポイントに分岐される(S5)。例外処理がリセットである場合、固定番地H'A00000000に分岐される。一般例外や割り込み要求の場合、レジスタVBRのベクタテーブルベースアドレスに所定のベクタオフセットが加算されたアドレスに、中央処理装置CPUの制御が分岐される。分岐されたベクタポイントには、図2に示されるように、所定のハンドラが置かれている。リセットの場合、リセットのための例外ハンドラが配置され、TLBミス例外の場合、TLBエントリ更新などのためのTLBミス例外ハンドラが置かれている(図2参照)。TLBミス例外以外の一般例外の場合、あるいは、割り込み要求の場合、例外要因に固有の別のハンドラに分岐するための処理を含むハンドラ(図2に示される一般例外に共通なハンドラ、割り込み要求に共通なハンドラ)が配置されている。   [Branch to Vector Point] As described above, the control of the central processing unit CPU branches to a predetermined vector point (S5). If the exception processing is reset, the process branches to a fixed address H′A00000000. In the case of a general exception or an interrupt request, the control of the central processing unit CPU branches to an address obtained by adding a predetermined vector offset to the vector table base address of the register VBR. As shown in FIG. 2, a predetermined handler is placed at the branched vector point. In the case of reset, an exception handler for reset is arranged, and in the case of TLB miss exception, a TLB miss exception handler for TLB entry update or the like is arranged (see FIG. 2). In the case of a general exception other than a TLB miss exception, or in the case of an interrupt request, a handler including processing for branching to another handler specific to the exception factor (a handler common to the general exception shown in FIG. Common handler) is placed.

命令実行中にTLBミス例外が発生したときには、TLBミスに係る論理ページアドレスに対応する物理ページアドレスを外部メモリMMRY上のページテーブルから読み出してアドレス変換バッファTLBを更新し、物理アドレスへの変換を行わなくてはならないため、そのTLBミス例外の発生からその対処への遷移時間は命令実行速度若しくは中央処理装置CPUによるデータ処理速度に大きな影響を与える。したがって、データ処理性能にもっとも大きな影響を与えると考えられるTLBミス例外ハンドラを上記ベクタポイントに直接配置することは、中央処理装置CPUの制御を例外ハンドラに引き渡すまでの処理時間を著しく短縮させる。それによって、マイクロコンピュータMPUのデータ処理速度の高速化が実現できる。   When a TLB miss exception occurs during instruction execution, the physical page address corresponding to the logical page address related to the TLB miss is read from the page table on the external memory MMRY, the address translation buffer TLB is updated, and the conversion to the physical address is performed. Since it must be performed, the transition time from the occurrence of the TLB miss exception to its handling greatly affects the instruction execution speed or the data processing speed by the central processing unit CPU. Therefore, placing the TLB miss exception handler, which is considered to have the greatest influence on the data processing performance, directly at the vector point significantly reduces the processing time until the control of the central processing unit CPU is transferred to the exception handler. Thereby, the data processing speed of the microcomputer MPU can be increased.

図11は、上記ベクタポイントに置かれた例外ハンドラ(リセットハンドラやTLBミス例外ハンドラを除く)の処理フローの一例を示している。この処理は、上述のように、専らソフトウェアによって規定され、以下の処理ステップを含む。   FIG. 11 shows an example of a processing flow of an exception handler (excluding a reset handler and a TLB miss exception handler) placed at the vector point. As described above, this process is defined exclusively by software and includes the following processing steps.

先ず、後から発生した別の例外や割り込み要求を多重に受け付けるか否かが決定される(S11)。その決定は、当該ハンドラの記述に従う。   First, it is determined whether or not another exception or interrupt request that occurs later is received in a multiple manner (S11). The decision follows the description of the handler.

多重に割り込み要求などを受け付けない場合、レジスタEXPEVT,INTEVTから例外要因コードをリードし(S12)、例外要因コードをアドレスオフセットとして利用して、対応する例外ハンドラに分岐するための処理が行われる(S13)。中央処理装置CPUが、VBR+ベクタオフセット+例外要因コードの計算を実行し、その計算されたアドレスに割付けられる例外ハンドラ、すなわち、分岐先の例外ハンドラへ処理が移行される。それによって中央処理装置CPUが、発生した例外に対処する。   If multiple interrupt requests are not accepted, an exception factor code is read from the registers EXPEVT and INTEVT (S12), and processing for branching to a corresponding exception handler is performed using the exception factor code as an address offset ( S13). The central processing unit CPU executes the calculation of VBR + vector offset + exception cause code, and the processing is shifted to the exception handler assigned to the calculated address, that is, the branch destination exception handler. Thereby, the central processing unit CPU handles the exception that has occurred.

多重に割り込み要求などを受け付ける場合、図10で説明した処理フローを保証するために、中央処理装置CPUは、セーブステータスレジスタSSR,セーブプログラムカウンタSPCなど、図10のハンドラで利用するレジスタのデータを外部メモリMMRYに退避する(S14)。中央処理装置CPUは、更に、ステータスレジスタSRのブロックビットBLを論理値”0”にセットして、その他の例外及び割り込みに対するマスクを解除する(S15)。その後、上記同様、中央処理装置CPUは、レジスタEXPEVT,INTEVTから例外要因コードをリードし(S16)、例外要因コードをアドレスオフセットとして対応する例外ハンドラに分岐される(S17)。すなわち、中央処理装置CPUが、VBR+ベクタオフセット+例外要因コードの計算を実行し、その計算されたアドレスに割付けられる例外ハンドラ、すなわち、分岐先の例外ハンドラへ処理が移行される。それによって中央処理装置CPUが、発生した例外に対処する。   When accepting multiple interrupt requests or the like, the central processing unit CPU uses the data of the registers used in the handler of FIG. 10 such as the save status register SSR and the save program counter SPC in order to guarantee the processing flow described in FIG. Save to the external memory MMRY (S14). The central processing unit CPU further sets the block bit BL of the status register SR to the logical value “0” and cancels the mask for other exceptions and interrupts (S15). Thereafter, as described above, the central processing unit CPU reads the exception factor code from the registers EXPEVT and INTEVT (S16), and branches to the corresponding exception handler using the exception factor code as an address offset (S17). That is, the central processing unit CPU executes the calculation of VBR + vector offset + exception cause code, and the processing is shifted to the exception handler assigned to the calculated address, that is, the branch destination exception handler. Thereby, the central processing unit CPU handles the exception that has occurred.

図10及び図11のフローチャートから明らかなように、TLBミス例外に対するように高速処理を最優先とするものに対しては、レジスタVBRの値を1回リードしてそれにベクタオフセット(H'400)を加算するだけでTLBミス例外ハンドラのベクタポイントを取得できる。また、別の例外要因に対しては、レジスタVBRの値にベクタオフセットを加算して得られるベクタポイントの取得に加えて、レジスタEXPEVT又はINTEVTの値を1回リードして得た例外要因コードをアドレスオフセットとする事により所要の例外ハンドラに分岐できる。この分岐においても、分岐先アドレスを直接メモリアクセスによって取得することなく高速に例外に応ずる処理に制御を移すことができる。   As is apparent from the flowcharts of FIGS. 10 and 11, for the case where high-speed processing is given the highest priority as in the case of the TLB miss exception, the value of the register VBR is read once and the vector offset (H′400) is read. The vector point of the TLB miss exception handler can be acquired simply by adding. For another exception factor, in addition to obtaining a vector point obtained by adding a vector offset to the value of the register VBR, an exception factor code obtained by reading the value of the register EXPEVT or INTEVT once. You can branch to the required exception handler by setting the address offset. Even in this branch, control can be transferred to processing that responds to an exception at high speed without acquiring the branch destination address directly by memory access.

図11からも明らかなように、多重に例外や割り込みを受け付けるか否かはハードウェアによって規定されたベクタポイントのアドレスに割り当てられたハンドラの記述によって決定される。例外の多重受け付けを許容する場合には、退避レジスタSSR,SPCに既に退避されている値を外部メモリMMRYへ退避する。TLBミス例外の様に高速処理が必要な場合、多重の例外や多重割り込みを禁止したまま、TLBミス例外ハンドラを実行するので、セーブステータスレジスタSSR,セーブプログラムカウンタSPCのメモリへの退避を一切要せず、この点において、TLBミス例外の発生からTLBミスハンドラへの遷移時間を最短にする事を保証している。   As is apparent from FIG. 11, whether or not to accept multiple exceptions and interrupts is determined by the description of the handler assigned to the vector point address defined by the hardware. When allowing multiple exceptions to be accepted, the values already saved in the save registers SSR and SPC are saved in the external memory MMRY. When high-speed processing is required, such as a TLB miss exception, the TLB miss exception handler is executed while prohibiting multiple exceptions and multiple interrupts, so it is absolutely necessary to save the save status register SSR and save program counter SPC to the memory. In this respect, it is guaranteed that the transition time from the occurrence of the TLB miss exception to the TLB miss handler is minimized.

図12は、一般例外や割り込み要求に対処するための例外処理へ分岐した後、分岐先において、例外や割り込みが新たに発生した場合の処理フローを示している。   FIG. 12 shows a processing flow when an exception or interrupt is newly generated at the branch destination after branching to exception processing for handling general exceptions or interrupt requests.

例外や割り込みが新たに発生したとき(S21)、ステータスレジスタSRのブロックビットBLが論理値”1”であるか否か(S22)、そして当該新たに発生した例外や割り込みが命令ブレーク例外であるか否か(S23)によって、当該新たに発生した例外や割り込みを受け付ける否かが決定される。SR.BL=0によって多重受け付けが許容されている場合には図10、図11のフローに従って処理される(S24)。   When an exception or interrupt is newly generated (S21), whether or not the block bit BL of the status register SR is a logical value “1” (S22), and the newly generated exception or interrupt is an instruction break exception. Whether or not to accept the newly generated exception or interrupt is determined depending on whether or not (S23). SR. If multiple acceptance is permitted due to BL = 0, processing is performed according to the flow of FIGS. 10 and 11 (S24).

上記SR.BL=1によって例外の多重受け付けが禁止されている場合(S22のYES)、そのときに発生した一般例外が命令ブレーク例外でなく(S23のNO)、且つ、それが割り込み要求の場合(S25のYES)、ソフトウェアがSR.BL=0にするまで(例えば、前記ステップS14の処理を終えてステップS15に進むまで)、当該割り込みの受け付けが抑止される(S26)。それが一般例外やリセットの場合(S25のNO)、例外要因コードをレジスタEXPEVTにセットした後、自動的にリセットハンドラに分岐される(S27)。   SR. When multiple acceptance of exceptions is prohibited due to BL = 1 (YES in S22), the general exception that occurred is not an instruction break exception (NO in S23), and it is an interrupt request (in S25) YES), the software is SR. Until BL = 0 is set (for example, until the process of step S14 is completed and the process proceeds to step S15), the acceptance of the interrupt is suppressed (S26). If it is a general exception or reset (NO in S25), the exception cause code is set in the register EXPEVT and then automatically branched to the reset handler (S27).

そのときの例外事象が命令ブレーク例外である場合、図10のハードウェア処理において、SPC,SSR,EXPEVTの各レジスタは更新されず、中央処理装置CPUの処理は命令ブレークハンドラに分岐し、当該ハンドラの処理によってレジスタSPC,SSRをメモリに退避する。そして、さらに、ブレークレジスタIBRのブレークポイントアドレスから復帰アドレスが計算され、当該復帰アドレスがセーブプログラムカウンタSPCにセットされる。そして、命令ブレーク例外に対処するための命令ブレーク例外ハンドラの処理が行われる。命令ブレーク例外ハンドラからの復帰は、レジスタSPCに退避された復帰アドレスが利用され、命令ブレークポイントの次からデバッグ対象プログラムを継続して実行することができる。このように、命令ブレーク例外に対しては、多重に発生する例外の受け付けが禁止されている状態のデバッグ対象プログラムに対しても任意の位置で命令ブレークをかけてシステム評価やプログラムデバッグを行うことができる。
上記実施例によれば以下の作用効果がある。〔1〕 TLBミス例外に対するように高速処理を最優先とするものに対しては、レジスタVBRの値を1回リードし、その値にベクタオフセット(H'400)を加算するだけでTLBミス例外ハンドラのベクタポイント(分岐先アドレス)を取得できる。また、別の例外要因に対しては、レジスタVBRの値にベクタオフセットを加算して得られたベクタポイントに、さらに、レジスタEXPEVT又はINTEVTの値を1回リードして得た例外要因コードをアドレスオフセットとして加算する事により、所要の例外ハンドラの先頭アドレス(分岐先アドレス)を取得できる。このように、分岐先アドレスを外部メモリのアクセスによって取得しないため、例外発生からその例外に対処するためのハンドラの処理へ遷移するまでの遷移時間が短縮される。これによって、マイクロコンピュータMPUの全体的なデータ処理速度の高速化が実現できる。換言すれば、データ処理の高速化に密接なTLBミス例外のような処理に対しては、その例外処理への遷移時間を短縮することが最優先とされ、例外処理への遷移時間の短縮がTLBミス例外程データ処理速度の高速化に寄与しないと考えられる割り込みなどに対しては、ハンドラのマッピングやハンドラのサイズに対して融通性を持たせ、ユーザの使い勝手の向上が計られる。
If the exception event at that time is an instruction break exception, the SPC, SSR, and EXPEVT registers are not updated in the hardware processing of FIG. 10, and the processing of the central processing unit CPU branches to the instruction break handler. Thus, the registers SPC and SSR are saved in the memory. Further, a return address is calculated from the breakpoint address of the break register IBR, and the return address is set in the save program counter SPC. Then, an instruction break exception handler process for dealing with an instruction break exception is performed. To return from the instruction break exception handler, the return address saved in the register SPC is used, and the program to be debugged can be continuously executed after the instruction breakpoint. In this way, for instruction break exceptions, system evaluation and program debugging can be performed by placing an instruction break at an arbitrary position even on a debug target program that is prohibited from receiving multiple exceptions. Can do.
According to the said Example, there exist the following effects. [1] For the case where high-speed processing has the highest priority, such as for the TLB miss exception, the value of the register VBR is read once, and the vector offset (H'400) is added to the value to obtain the TLB miss exception. The vector point (branch destination address) of the handler can be acquired. For another exception factor, the address of the exception factor code obtained by reading the value of the register EXPEVT or INTEVT once is added to the vector point obtained by adding the vector offset to the value of the register VBR. By adding as an offset, the start address (branch destination address) of the required exception handler can be acquired. Thus, since the branch destination address is not acquired by accessing the external memory, the transition time from the occurrence of the exception to the processing of the handler for dealing with the exception is shortened. As a result, the overall data processing speed of the microcomputer MPU can be increased. In other words, for processes such as TLB miss exceptions that are closely related to high-speed data processing, reducing the transition time to exception processing is the top priority, and reducing the transition time to exception processing is the top priority. For interrupts that are considered not to contribute to the speeding up of data processing speed as much as TLB miss exceptions, flexibility in handler mapping and handler size is provided, and user convenience is improved.

〔2〕ベクタベースレジスタの値とベクタオフセットとを加算して得られたアドレスに配置された例外ハンドラの内の一部の例外ハンドラ(TLBミス例外ハンドラ)だけが、対応する例外に対して直接的な例外処理を行なう。その他の例外に対しては、例外要因コードをアドレスオフセットに利用して、更に、分岐されて所定のハンドラにたどり着くようになっている。換言すれば、ベクタベースアドレスに対する固定のオフセットであるベクタオフセットの数は例外要因の数よりも遥かに少ない。全ての例外要因に対して固有の固定オフセット(ベクタオフセット)を利用する場合、例外要因が増えるほどベクタオフセットを生成するためのハードウェア量が増大する。それゆえ、マイクロコンピュータの形成される半導体チップの面積は増加し、マイクロコンピュータ自体のコストも、高くなってしまうと考えられる。しかしながら、本発明のような例外処理においては、物理的な回路規模の縮小とデータ処理の高速化との双方を満足させることができる。したがって、本発明のマイクロコンピュータMPUは、小面積の半導体チップに形成することができ、そのコストも低減される。   [2] Only a part of the exception handlers (TLB miss exception handlers) arranged at the address obtained by adding the value of the vector base register and the vector offset directly to the corresponding exception Exception handling. For other exceptions, the exception cause code is used as an address offset, and further branched to reach a predetermined handler. In other words, the number of vector offsets, which are fixed offsets with respect to the vector base address, is much smaller than the number of exception factors. When a unique fixed offset (vector offset) is used for all exception factors, the amount of hardware for generating a vector offset increases as the exception factors increase. Therefore, it is considered that the area of the semiconductor chip on which the microcomputer is formed increases, and the cost of the microcomputer itself increases. However, in the exception processing as in the present invention, it is possible to satisfy both the physical circuit scale reduction and the data processing speedup. Therefore, the microcomputer MPU of the present invention can be formed on a semiconductor chip with a small area, and its cost is also reduced.

〔3〕多重に例外や割り込みを受け付けるか否かは、ハードウェアによって規定されたベクタポイントのハンドラの記述によって決定される。多重な例外の受け付けを許容する場合、退避レジスタSSR,SPCに既に退避されている値が、さらに、外部メモリMMRYに退避される。TLBミス例外の様に高速処理が必要な場合、多重例外や多重割り込みを抑止した状態で、例外処理ハンドラが実行されるので、セーブステータスレジスタSSR,セーブプログラムカウンタSPCの外部メモリMMRYへの退避を一切必要としない。この点において、TLBミス例外の発生からTLBミスハンドラへの遷移時間を最短にする事が保証される。   [3] Whether or not to accept multiple exceptions and interrupts is determined by the description of the vector point handler defined by the hardware. When accepting multiple exceptions, values already saved in the save registers SSR and SPC are further saved in the external memory MMRY. When high-speed processing is required, such as a TLB miss exception, the exception handler is executed with multiple exceptions and multiple interrupts suppressed, so that the save status register SSR and save program counter SPC are saved to the external memory MMRY. Not required at all. In this respect, it is guaranteed that the transition time from the occurrence of the TLB miss exception to the TLB miss handler is minimized.

〔4〕ハードウェアで決定されるベクタポイントのハンドラから、更に、別のハンドラに分岐する際、例外要因コードが分岐のためのアドレスオフセットとして利用される。換言すれば、夫々の例外要因コードをアドレスオフセットとして利用できるように、例えば、アドレス換算で32バイト分に相当するようなH'20の間隔を置いて例外要因コードが割り当てられている。そのため、例外要因コード(アドレスオフセット)に対するベースアドレスは、ハードウェアによって決定されているベクタポイントに配置される例外処理ハンドラのプログラム記述に従って自由に決定できることになる。このことは、実際の分岐先アドレスや分岐先のハンドラのサイズ対してユーザの自由度を保証する。   [4] When branching from a vector point handler determined by hardware to another handler, the exception cause code is used as an address offset for branching. In other words, for example, the exception factor codes are assigned at intervals of H′20 corresponding to 32 bytes in terms of addresses so that each exception factor code can be used as an address offset. Therefore, the base address for the exception cause code (address offset) can be freely determined according to the program description of the exception handler disposed at the vector point determined by the hardware. This guarantees the user's degree of freedom with respect to the actual branch destination address and the size of the branch destination handler.

〔5〕内部状態及び復帰命令アドレスを退避するレジスタSSR,SPCを採用することにより、例外発生時の退避に際して外部メモリへアクセスを減らすことができる。   [5] By using the registers SSR and SPC for saving the internal state and the return instruction address, it is possible to reduce access to the external memory when saving when an exception occurs.

〔6〕中央処理装置CPUの動作に同期して発生する一般例外と非同期で発生する割り込み要求との双方に対処するため、一般例外に関する例外要因コードを格納するレジスタEXPEVTと割り込み要求に関する例外要因コードを格納するレジスタINTEVTとが設けられる。双方の例外発生に対して同じようなタイミングで要因コードを共通のレジスタに書き込むための煩雑な処理を避けられ、例外要因コードを各レジスタにセットする処理を簡素化できる。   [6] In order to deal with both general exceptions that occur in synchronization with the operation of the central processing unit CPU and interrupt requests that occur asynchronously, a register EXPEVT that stores exception cause codes related to general exceptions and an exception cause code related to interrupt requests Is stored in the register INTEVT. It is possible to avoid a complicated process for writing the cause code to the common register at the same timing when both exceptions occur, and to simplify the process of setting the exception cause code in each register.

〔7〕リセット例外ハンドラやTLBミス例外処理ハンドラ(例外要因に応じてハードウェアで決定されている分岐先のハンドラ)の処理において、初期的なプロセッサモードが、例外の多重受け付け抑止状態及び特権状態への移行によって一定にされる。したがって、ユーザの当該ハンドラ上で規定できる例外処理の内容は高い自由度を保証される。   [7] In the processing of a reset exception handler or TLB miss exception handler (branch destination handler determined by hardware according to the exception cause), the initial processor mode is the exception multiple-rejection suppression state and privilege state. Made constant by the transition to. Therefore, the content of exception handling that can be defined on the handler of the user is guaranteed a high degree of freedom.

〔8〕汎用レジスタR0〜R7のレジスタバンクを特権状態においてのみソフトウェアで切り換え可能にすることにより、中央処理装置CPUは、特権状態において、ユーザ状態とは異なるバンクの汎用レジスタR0〜R7を利用できる。このことは、例えば、例外処理においてユーザ状態から特権状態にプロセッサモードを切り換える時、汎用レジスタR0〜R7の内容の外部メモリMMRYへの退避を省略できることを意味する。この点においても、例外発生からそれに対処する処理へ遷移するまでの遷移時間が短縮される。   [8] By enabling the register banks of the general-purpose registers R0 to R7 to be switched by software only in the privileged state, the central processing unit CPU can use the general-purpose registers R0 to R7 in a bank different from the user state in the privileged state. . This means that, for example, when the processor mode is switched from the user state to the privileged state in exception processing, saving the contents of the general-purpose registers R0 to R7 to the external memory MMRY can be omitted. Also in this respect, the transition time from the occurrence of an exception to the processing for dealing with the exception is shortened.

〔9〕多重例外を抑止した状態の例外ハンドラの処理において、命令ブレーク例外を処理可能にすることにより、多重に発生する例外の受け付けが禁止されている状態のデバッグ対象プログラムに対しても任意の位置で命令ブレークをかけてシステム評価やプログラムデバッグを行うことができることを保証できる。   [9] In an exception handler process in which multiple exceptions are suppressed, an instruction break exception can be processed, so that any program to be debugged in a state where acceptance of multiple exceptions is prohibited can be arbitrarily set. It can be assured that system evaluation and program debugging can be performed with an instruction break at the position.

〔10〕アドレス領域P1,P2は、対応する物理アドレスが固定とされる領域であり、アドレス変換バッファTLBを利用したアドレス変換の対象とはされない。特権状態において、アドレス領域P1,P2をアクセスするときには、TLBミスを初めとするアドレス変換に係る例外を多重に生ずることはない。したがって、割り込みや一般例外などの各種例外ハンドラをアドレス領域P1又はP2に配置することにより、TLBミスを初めとするアドレス変換に係る例外が例外処理中に新たに生ずることがなくなる。換言すれば、アドレス変換に係る例外が多重に発生する事態を回避できので、中央処理装置CPUのデータ処理を効率化することができる。   [10] The address areas P1 and P2 are areas in which the corresponding physical addresses are fixed, and are not targeted for address translation using the address translation buffer TLB. When the address areas P1 and P2 are accessed in the privileged state, multiple exceptions related to address translation such as a TLB miss do not occur. Accordingly, by arranging various exception handlers such as interrupts and general exceptions in the address area P1 or P2, exceptions relating to address translation such as TLB misses do not newly occur during exception processing. In other words, it is possible to avoid a situation in which multiple exceptions relating to address translation occur, so that the data processing of the central processing unit CPU can be made more efficient.

以上本発明者によってなされた発明を実施例に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。   Although the invention made by the present inventor has been specifically described based on the embodiments, it is needless to say that the present invention is not limited thereto and can be variously modified without departing from the gist thereof.

例えば、ハードウェアで決定されるベクタオフセットはH'100,H'400,H'600に限定されず、また、アドレスオフセットを規定する要因コードやその割り当て間隔も上記実施例に限定されず、適宜変更可能である。また、例外は、上記実施例のリセット、一般例外、割り込み要求に大別する考え方に限定されない。さらに、ハードウェアによって決定された第1のベクタポイントに直接TLBミス例外ハンドラを配置したが、当該ベクタポイントに配置できる例外ハンドラは、それに限定されず、システム構成に応じて適宜変更できる。また、上記第1のベクタポイントから分岐される第2のポイントに配置した別の例外ハンドラにおいては、更に、別のハンドラに分岐できることは言うまでもない。その場合にも要因コードをアドレスオフセット情報として利用するが可能である。   For example, the vector offset determined by hardware is not limited to H′100, H′400, and H′600, and the factor code that defines the address offset and its allocation interval are not limited to the above embodiment, It can be changed. In addition, the exception is not limited to the concept roughly divided into the reset, the general exception, and the interrupt request in the above embodiment. Further, although the TLB miss exception handler is arranged directly at the first vector point determined by the hardware, the exception handler that can be arranged at the vector point is not limited to this, and can be appropriately changed according to the system configuration. Needless to say, another exception handler arranged at the second point branched from the first vector point can further branch to another handler. Even in this case, the factor code can be used as address offset information.

以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるマイクロコンピュータに適用した場合について説明したが、データプロセッサ、マイクロプロセッサ、ディジタルシグナルプロセッサなどその称呼の如何に関わらず例外処理をサポートする各種データ処理装置に広く適用することができる。   In the above description, the case where the invention made by the present inventor is applied to the microcomputer, which is the field of use behind it, has been described. However, the data processor, the microprocessor, the digital signal processor, etc. The present invention can be widely applied to various data processing devices that support exception handling.

本発明の一実施例に係るシングルチップマイクロコンピュータのブロック図である。1 is a block diagram of a single chip microcomputer according to an embodiment of the present invention. FIG. 例外発生時におけるハードウェアによるベクタポイントとポイントされたハンドラから更に別のハンドラに分岐する本実施例の手法を概念的に示した説明図である。It is explanatory drawing which showed notionally the method of the present Example which branches from the vector point by hardware at the time of exception generation, and the handler further pointed to another handler. バンク構成の汎用レジスタ及びシステムレジスタの説明図である。It is explanatory drawing of the general purpose register of a bank structure, and a system register. ユーザモードにおける図3の汎用レジスタ及びシステムレジスタの状態説明図である。It is state explanatory drawing of the general purpose register | resistor and system register | resistor of FIG. 3 in user mode. 特権モードにおける図3の汎用レジスタ及びシステムレジスタの状態説明図である。It is state explanatory drawing of the general purpose register | resistor and system register | resistor of FIG. 3 in privilege mode. コントロールレジスタの説明図である。It is explanatory drawing of a control register. 割り込み要因とベクタオフセットの割り当てなどを示す説明図である。It is explanatory drawing which shows the allocation of an interrupt factor, a vector offset, etc. 割り込み要因とそれに割り当てられた割り込み要因コードとの対応説明図である。FIG. 10 is a diagram for explaining correspondence between interrupt factors and interrupt factor codes assigned to the interrupt factors. 例外要因レジスタ及びトラップレジスタの説明図である。It is explanatory drawing of an exception factor register and a trap register. ハードウェアによって決定されたベクタポイント処理の一例フローチャートである。It is an example flowchart of the vector point process determined by hardware. ベクタポイントに置かれたハンドラの処理の一例フローチャートである。It is an example flowchart of the process of the handler placed at the vector point. 割り込み又は一般例外ハンドラによる処理において別の割り込み又は一般例外が発生した場合における処理の一例フローチャートである。10 is a flowchart illustrating an example of processing when another interrupt or general exception occurs in processing by an interrupt or general exception handler. 本実施例に係るマイクロコンピュータの一例アドレスマップである。It is an example address map of the microcomputer concerning a present Example. ベクタオフセットを生成するハードウェアの一例ブロック図である。It is an example block diagram of the hardware which produces | generates a vector offset. 例外要因コードを生成する論理の一例ブロック図である。It is an example block diagram of the logic which produces | generates an exception factor code.

符号の説明Explanation of symbols

MPU マイクロコンピュータ
CPU 中央処理装置
CTRL 制御部
PC プログラムカウンタ
SPC セーブプログラムカウンタ
SR ステータスレジスタ
MD モードビット
RB レジスタバンクビット
BL ブロックビット
SSR セーブステータスレジスタ
VBR ベクタベースレジスタ
R0〜R15 汎用レジスタ
UBC 命令ブレークコントローラ
IBR 命令ブレークアドレスレジスタ
MMU メモリマネージメントユニット
TLB アドレス変換バッファ
TLBC 制御部
EXPEVT 一般例外用の例外要因レジスタ
INTEVT 割り込み要求用の例外要因レジスタ
TRAP トラップレジスタ
CVG 定数発生回路
SFT シフタ
MPU microcomputer CPU central processing unit CTRL control unit PC program counter SPC save program counter SR status register MD mode bit RB register bank bit BL block bit SSR save status register VBR vector base register R0 to R15 general-purpose register UBC instruction break controller IBR instruction break Address register MMU Memory management unit TLB Address translation buffer TLBC control unit EXPEVT General cause exception factor register INTEVT Interrupt request exception factor register TRAP trap register CVG constant generation circuit SFT shifter

Claims (2)

中央処理装置と、複数の領域に分割された記憶回路と、ベクタテーブルと、アドレス変換バッファとを具備し、
前記ベクタテーブルは、複数の割込み/例外ハンドラの先頭アドレスを格納し、
前記アドレス変換バッファは、論理アドレスを物理アドレスに変換するために用いられ、
前記複数の領域のうちの1つである第1領域は、物理アドレスに固定されており、アドレス変換バッファでのアドレス変換の対象とされておらず、前記割込み/例外ハンドラは前記第1領域に配置されることを特徴とする1チップデータプロセッサ。
A central processing unit, a storage circuit divided into a plurality of areas, a vector table, and an address translation buffer;
The vector table stores start addresses of a plurality of interrupt / exception handlers,
The address translation buffer is used to translate a logical address into a physical address;
The first area, which is one of the plurality of areas, is fixed to a physical address, is not subject to address translation in the address translation buffer, and the interrupt / exception handler is located in the first area. A one-chip data processor which is arranged.
請求項2において、
前記1チップデータプロセッサは、キャッシュメモリを更に有し、
前記第1領域はキャッシュメモリでのキャッシュ対象とされず、
前記複数の領域のうちの他の1つである第2領域は物理アドレスに固定されており、アドレス変換バッファでのアドレス変換の対象とされておらず、さらにキャッシュメモリでのキャッシュ対象とされず、
前記割込み/例外ハンドラは、第1ブロックと第2ブロックを有し、前記第1ブロックは前記第1領域に配置され、前記第2ブロックは前記第2領域に配置されることを特徴とする1チップデータプロセッサ。
In claim 2,
The one-chip data processor further includes a cache memory,
The first area is not cached in the cache memory,
The second area, which is another one of the plurality of areas, is fixed to a physical address, is not subject to address translation in the address translation buffer, and is not subject to caching in the cache memory. ,
The interrupt / exception handler has a first block and a second block, wherein the first block is arranged in the first area, and the second block is arranged in the second area. Chip data processor.
JP2004182149A 1994-09-09 2004-06-21 1 chip data processor Expired - Fee Related JP3822885B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004182149A JP3822885B2 (en) 1994-09-09 2004-06-21 1 chip data processor

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP24199194 1994-09-09
JP8606795 1995-03-17
JP2004182149A JP3822885B2 (en) 1994-09-09 2004-06-21 1 chip data processor

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP24087295A Division JP3672634B2 (en) 1994-09-09 1995-08-25 Data processing device

Publications (2)

Publication Number Publication Date
JP2004272939A JP2004272939A (en) 2004-09-30
JP3822885B2 true JP3822885B2 (en) 2006-09-20

Family

ID=33135602

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004182149A Expired - Fee Related JP3822885B2 (en) 1994-09-09 2004-06-21 1 chip data processor

Country Status (1)

Country Link
JP (1) JP3822885B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011045931A1 (en) * 2009-10-14 2011-04-21 パナソニック株式会社 Information processing device

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7424563B2 (en) * 2006-02-24 2008-09-09 Qualcomm Incorporated Two-level interrupt service routine
JP5292706B2 (en) * 2007-02-28 2013-09-18 富士通セミコンダクター株式会社 Computer system
JP5414057B2 (en) * 2009-05-22 2014-02-12 ルネサスエレクトロニクス株式会社 Microcomputer
US9710270B2 (en) 2010-12-20 2017-07-18 International Business Machines Corporation Exception control method, system, and program
WO2012086288A1 (en) * 2010-12-20 2012-06-28 インターナショナル・ビジネス・マシーンズ・コーポレーション Exception control method, system, and program
US10740220B2 (en) 2018-06-27 2020-08-11 Microsoft Technology Licensing, Llc Cache-based trace replay breakpoints using reserved tag field bits

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011045931A1 (en) * 2009-10-14 2011-04-21 パナソニック株式会社 Information processing device

Also Published As

Publication number Publication date
JP2004272939A (en) 2004-09-30

Similar Documents

Publication Publication Date Title
JP3672634B2 (en) Data processing device
KR100403405B1 (en) Integrated circuit with multiple functions sharing multiple internal signal buses according to distributed bus access and control arbitration
US6205560B1 (en) Debug system allowing programmable selection of alternate debug mechanisms such as debug handler, SMI, or JTAG
US7827390B2 (en) Microprocessor with private microcode RAM
US4701844A (en) Dual cache for independent prefetch and execution units
US6052708A (en) Performance monitoring of thread switch events in a multithreaded processor
US5438670A (en) Method of prechecking the validity of a write access request
US5838897A (en) Debugging a processor using data output during idle bus cycles
US20030051122A1 (en) Trace information generation apparatus for generating branch trace information omitting at least part of branch source information and branch destination information on target processing
US6959367B2 (en) System having read-modify-write unit
KR100309615B1 (en) High Speed Programmable Logic Controllers (PLC)
JP2000231549A (en) Microprocessor
JP4226085B2 (en) Microprocessor and multiprocessor system
JPH0215369A (en) Method and apparatus for executing instruction of vector processing system
JP3226055B2 (en) Information processing device
JPH03158928A (en) Data processor
US6986028B2 (en) Repeat block with zero cycle overhead nesting
JP3822885B2 (en) 1 chip data processor
CN112182999B (en) Three-stage pipeline CPU design method based on MIPS32 instruction system
GB2200481A (en) Maintaining coherence between a microprocessor&#39;s integrated cache and external memory
US6820254B2 (en) Method and system for optimizing code using an optimizing coprocessor
GB2200482A (en) Monitoring control flow in a microprocessor
US20030196072A1 (en) Digital signal processor architecture for high computation speed
US20080010426A1 (en) Processor system and processing method for operating system program in processor system
CN111984317A (en) System and method for addressing data in a memory

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040624

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060620

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060623

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100630

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110630

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110630

Year of fee payment: 5

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20110630

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120630

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120630

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130630

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees