JP2000137619A - Microcomputer - Google Patents
MicrocomputerInfo
- Publication number
- JP2000137619A JP2000137619A JP10311527A JP31152798A JP2000137619A JP 2000137619 A JP2000137619 A JP 2000137619A JP 10311527 A JP10311527 A JP 10311527A JP 31152798 A JP31152798 A JP 31152798A JP 2000137619 A JP2000137619 A JP 2000137619A
- Authority
- JP
- Japan
- Prior art keywords
- mode
- instruction
- circuit
- interrupt
- instruction decoding
- 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.)
- Withdrawn
Links
Landscapes
- Executing Machine-Instructions (AREA)
Abstract
(57)【要約】
【課題】 命令解読モードの切り換えを割り込みに連動
して行えるようにすることにある。
【解決手段】 取り込まれた割り込みの内容毎にそれに
対応する命令解読モードを判定する割り込み制御回路
(11)と、上記割り込み制御回路の判定結果に基づい
て、命令デコードに関与するデコーダの選択情報を上記
命令デコード部に出力するための対応モード指定回路
(12)とを設け、取り込まれた割り込みの内容毎にそ
れに対応する命令解読モードを判定し、この判定結果に
基づいて、命令デコードに関与するデコーダの選択情報
を命令デコード部に出力することで、割り込みに基づく
命令解読モードの切り換えを達成する。
(57) [Summary] [PROBLEMS] To enable switching of an instruction decoding mode in conjunction with an interrupt. SOLUTION: An interrupt control circuit (11) for judging an instruction decoding mode corresponding to the content of a fetched interrupt and selection information of a decoder involved in instruction decoding based on a judgment result of the interrupt control circuit. A corresponding mode designating circuit (12) for outputting the instruction to the instruction decoding unit; determining an instruction decoding mode corresponding to each of the contents of the fetched interrupt; and engaging in instruction decoding based on the determination result By outputting the selection information of the decoder to the instruction decoding unit, switching of the instruction decoding mode based on the interrupt is achieved.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、プログラムを構成
する一連の命令を実行することによって所定の演算処理
を行うマイクロコンピュータに関し、例えば1チップ型
のマイクロコンピュータ(シングルチップマイクロコン
ピュータ)に適用して有効な技術に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer for performing a predetermined arithmetic processing by executing a series of instructions constituting a program, and is applied to, for example, a one-chip microcomputer (single-chip microcomputer). Regarding effective technology.
【0002】[0002]
【従来の技術】マイクロコンピュータ(マイクロプロセ
ッサと称されることもある)は、CPU(中央処理装
置)を中心に所要の周辺回路が1個の半導体基板に含ま
れていて、その動作プログラムを保有するプログラムR
OM(リード・オンリー・メモリ)を内蔵する。2. Description of the Related Art A microcomputer (sometimes referred to as a microprocessor) includes necessary peripheral circuits centered on a CPU (central processing unit) on a single semiconductor substrate and holds an operation program for the peripheral circuits. Program R
Built-in OM (read only memory).
【0003】複数の命令解読モードをもつことで、命令
のコード長を増やさずに命令の種類を増やすことのでき
るマイクロコンピュータが提案されている。A microcomputer has been proposed which has a plurality of instruction decoding modes and can increase the types of instructions without increasing the code length of the instructions.
【0004】そのようなマイクロコンピュータについて
記載された文献の例としては、特開平9ー330219
号公報、特開平9ー160774号公報、特開平5ー1
43322号公報、特開平5ー120003号公報、及
び特開平2ー19927号公報等がある。An example of a document describing such a microcomputer is disclosed in Japanese Patent Application Laid-Open No. 9-330219.
JP, JP-A-9-160774, JP-A-5-1
JP-A-43322, JP-A-5-120003, and JP-A-2-19927.
【0005】[0005]
【発明が解決しようとする課題】上記した命令解読モー
ドの切り換えは、一般には所定の切り換え命令が実行さ
れることにより、あるいは命令の格納されている領域の
切り換えにより行われている。The switching of the instruction decoding mode is generally performed by executing a predetermined switching instruction or by switching an area where the instruction is stored.
【0006】しかし、切り換え命令を使用する場合、そ
のための処理ステップが必要であり、また全ての命令解
読モードにおいて、切り換え命令を準備する必要があ
り、これは同一の切り換え命令を複数もつことになり効
率が悪い。However, when a switching command is used, a processing step for that is required, and a switching command must be prepared in all command decoding modes, which means that a plurality of the same switching commands are provided. ineffective.
【0007】これに対し、命令が格納されている領域を
切り換える方法であれば、切り換え命令が不要となる
分、命令種類が増えるが、各命令解読モード毎にメモリ
領域が切り替わるということは、ある命令解読モードを
使用した処理が多い場合には、メモリの領域不足となっ
たり、逆にある命令解読モードを使用した処理が少ない
場合には、その命令解読モードに対応するメモリ領域が
余ってしまい、メモリの使用効率を下げることなる。ま
た、メモリ領域の自由度を高めようとすれば、メモリの
デコード回路の規模が必然的に大きくなる。On the other hand, if the method of switching the area where the instruction is stored is switched, the number of instruction types increases as the switching instruction becomes unnecessary, but the memory area may be switched for each instruction decoding mode. When there are many processes using the instruction decoding mode, the memory area becomes insufficient.On the contrary, when there are few processes using the instruction decoding mode, the memory area corresponding to the instruction decoding mode becomes excessive. As a result, the use efficiency of the memory is reduced. If the degree of freedom of the memory area is to be increased, the scale of the decoding circuit of the memory is inevitably increased.
【0008】本発明の目的は、命令の種類を効率良く増
やすことができ、また、メモリの使用効率を高く保った
ままで複数の命令解読モードの切り換えを行うことがで
きるマイクロコンピュータを提供することにある。An object of the present invention is to provide a microcomputer capable of efficiently increasing the number of instruction types and switching between a plurality of instruction decoding modes while maintaining high memory use efficiency. is there.
【0009】本発明の上記並びにその他の目的と新規な
特徴は本明細書の記述及び添付図面から明らかになるで
あろう。The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.
【0010】[0010]
【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を簡単に説明すれば下記
の通りである。The following is a brief description of an outline of a typical invention among the inventions disclosed in the present application.
【0011】すなわち、プログラムメモリから命令コー
ドをフェッチするための命令フェッチ手段(509)
と、割り込みに対応して予め定義された複数の命令解読
モードを備え、上記フェッチ手段によってフェッチされ
た命令を、指定された命令解読モードでデコード可能な
命令デコード部(510)と、取り込まれた割り込みに
対応する命令解読モードを判定して上記命令デコード部
に対してそのモードを指定するための割り込み制御部
(1)とを含んでマイクロコンピュータを構成する。That is, an instruction fetch means (509) for fetching an instruction code from a program memory.
And an instruction decoding unit (510) that has a plurality of instruction decoding modes defined in advance corresponding to the interrupt, and is capable of decoding an instruction fetched by the fetch means in the designated instruction decoding mode. The microcomputer includes an interrupt control unit (1) for determining an instruction decoding mode corresponding to an interrupt and designating the mode for the instruction decoding unit.
【0012】上記した手段によれば、割り込み制御部
は、取り込まれた割り込みの内容毎にそれに対応する命
令解読モードを判定し、対応モード指定回路は、この判
定結果に対応するデコードモードを上記命令デコード部
に出力する。このことが、割り込みに基づく命令解読モ
ードの切り換えを達成する。According to the above-described means, the interrupt control unit determines the instruction decoding mode corresponding to each of the contents of the fetched interrupt, and the corresponding mode designation circuit sets the decode mode corresponding to the determination result to the instruction mode. Output to the decoding unit. This achieves switching of instruction decoding mode based on interrupts.
【0013】また、プログラムメモリから命令コードを
フェッチするための命令フェッチ手段(509)と、複
数の複数の命令解読モードを備え、上記フェッチ手段に
よってフェッチされた命令を、指定された命令解読モー
ドでデコード可能な命令デコード部(510)と、取り
込まれた割り込みの内容毎にそれに対応する命令解読モ
ードを判定する割り込み制御回路(11)と、上記割り
込み制御回路の判定結果に基づいて、対応するデコード
モードを上記命令デコード部に出力するための対応モー
ド指定回路(12)とを含んでマイクロコンピュータを
構成することができる。An instruction fetch means (509) for fetching an instruction code from the program memory and a plurality of instruction decoding modes are provided, and the instructions fetched by the fetch means can be read in a designated instruction decoding mode. An instruction decoding unit (510) capable of decoding, an interrupt control circuit (11) for determining an instruction decoding mode corresponding to each content of the fetched interrupt, and a corresponding decode based on the determination result of the interrupt control circuit A microcomputer can be configured including a corresponding mode designating circuit (12) for outputting a mode to the instruction decoding unit.
【0014】このとき、上記命令デコード部は、複数の
デコーダ(21〜24)と、上記命令フェッチ回路によ
ってフェッチされた命令コードを上記複数のデコーダに
振り分けるための第1選択回路(26)と、上記複数の
デコーダの出力信号を選択的に後段回路に伝達するため
の第2選択回路(27)と、上記対応モード指定回路の
指定に基づいて上記第1選択回路及び上記第2選択回路
の動作を制御するための切り換え回路(25)とを含ん
で容易に構成することができる。At this time, the instruction decoding unit includes a plurality of decoders (21 to 24) and a first selection circuit (26) for distributing the instruction code fetched by the instruction fetch circuit to the plurality of decoders. A second selection circuit (27) for selectively transmitting output signals of the plurality of decoders to a subsequent circuit, and an operation of the first selection circuit and the second selection circuit based on designation of the corresponding mode designation circuit And a switching circuit (25) for controlling the control.
【0015】また、デコードモード変更前のモードへの
復帰の容易化を図るには、割り込みに基づいてモードを
判定するためのモード判定回路(13)と、上記モード
判定回路の判定結果に基づいて指示されたモードを保持
するためのモード保持手段(14)と、上記モード保持
手段に現在保持されているモードの直前のモードに復帰
させるための情報を待避するモード待避手段(15)と
を含んで対応モード指定回路を構成することができる。Further, in order to facilitate return to the mode before the decoding mode is changed, a mode determination circuit (13) for determining a mode based on an interrupt and a mode determination circuit based on the determination result of the mode determination circuit are provided. Mode holding means (14) for holding the designated mode, and mode saving means (15) for saving information for returning to the mode immediately before the mode currently held in the mode holding means. Can configure the corresponding mode designating circuit.
【0016】[0016]
【発明の実施の形態】図3には、本発明にかかるマイク
ロコンピュータが適用されるコンピュータシステムが示
される。FIG. 3 shows a computer system to which a microcomputer according to the present invention is applied.
【0017】このコンピュータシステムは、バスBUS
を介して、マイクロコンピュータ131、SDRAM
(シンクロナス・ダイナミック・ランダム・アクセス・
メモリ)132、SRAM(スタティック・ランダム・
アクセス・メモリ)133、ROM(リード・オンリ・
メモリ)134、周辺装置制御部135、表示制御系1
36などが、互いに信号のやり取り可能に結合され、予
め定められたプログラムに従って所定のデータ処理を行
う。上記マイクロコンピュータ131は本システムの論
理的中核とされる。SDRAM132、SRAM13
3、及びROM134は内部記憶装置として位置付けら
れている。そして、SDRAM132には、マイクロコ
ンピュータ131での計算や制御に必要なアプリケーシ
ョンプログラムやデータがロードされる。SRAM13
3は、キャッシュメモリとして利用される。周辺装置制
御部135によって、外部記憶装置138の動作制御
や、キーボード139などからの情報入力制御が行われ
る。また、上記表示制御系136の表示制御により、C
RTディスプレイ140への情報表示制御が行われる。This computer system has a bus BUS
, Microcomputer 131, SDRAM
(Synchronous dynamic random access
Memory) 132, SRAM (static random
Access memory 133, ROM (read only)
Memory) 134, peripheral device control unit 135, display control system 1
36 and the like are communicably connected to each other and perform predetermined data processing according to a predetermined program. The microcomputer 131 is a logical core of the present system. SDRAM 132, SRAM 13
3, and the ROM 134 are positioned as internal storage devices. The SDRAM 132 is loaded with application programs and data necessary for calculation and control by the microcomputer 131. SRAM 13
3 is used as a cache memory. The peripheral device control unit 135 controls the operation of the external storage device 138 and controls information input from the keyboard 139 and the like. The display control of the display control system 136 allows C
Information display control on the RT display 140 is performed.
【0018】図4にはマイクロコンピュータ131の構
成例が示される。FIG. 4 shows a configuration example of the microcomputer 131.
【0019】このマイクロコンピュータ1は、特に制限
されないが、公知の半導体集積回路製造技術によって単
結晶シリコン基板などの一つの半導体基板に形成されて
いる。Although not particularly limited, the microcomputer 1 is formed on a single semiconductor substrate such as a single crystal silicon substrate by a known semiconductor integrated circuit manufacturing technique.
【0020】マイクロコンピュータ131は、特に制限
されないが、CPU(中央処理装置)50、ROM(リ
ード・オンリ・メモリ)4、RAM(ランダム・アクセ
ス・メモリ)7、タイマ53、シリアルコミュニケーシ
ョンインタフェース(SCI)54、A/D(アナログ
/ディジタル)変換器55、割り込み制御部1、並びに
第1乃至第9ポート41〜49などの機能ブロックを含
み、それらは、内部アドレスバス5や内部データバス6
などによって互いに信号のやり取りが可能となるように
結合されている。The microcomputer 131 is not particularly limited, but includes a CPU (central processing unit) 50, a ROM (read only memory) 4, a RAM (random access memory) 7, a timer 53, and a serial communication interface (SCI). 54, an A / D (analog / digital) converter 55, an interrupt control unit 1, and functional blocks such as first to ninth ports 41 to 49.
For example, they are coupled so that signals can be exchanged with each other.
【0021】このマイクロコンピュータ131における
主記憶装置は上記RAM51とROM4であり、RAM
51はCPU50の作業領域又はデータの一時記憶領域
として利用される。ROM4は、特に制限されないが、
CPU50の動作プログラムを保有する。このROM4
は、特に制限されないが、EPROMライタによって情
報をマイクロコンピュータの外部から書込み可能なEP
ROM(エレクトリカリ・プログラマブル・リード・オ
ンリー・メモリ)とされる。The main storage devices of the microcomputer 131 are the above-mentioned RAM 51 and ROM 4.
Reference numeral 51 is used as a work area of the CPU 50 or a temporary storage area of data. The ROM 4 is not particularly limited,
It has an operation program for the CPU 50. This ROM4
Although not particularly limited, an EPROM writer can write information from outside the microcomputer by an EPROM writer.
A ROM (electrically programmable read only memory) is used.
【0022】また、上記半導体基板の周縁部には、電極
パッドとして例えば多数のボンディングパッドが配置さ
れる。例えば、第1乃至第9ポート41〜49の入出力
端子に結合されたボンディングパッドP10〜P17,
P20〜P24,P30〜P37、P40〜P47、P
50〜P57、P60〜P63、P70〜P77、P8
0〜P87、P90〜P97や、クロックジェネレータ
56の入力端子に結合されたボンディングパッドXTA
L,EXTALなどが配置される。ボンディングパッド
XTAL,EXTALには、図示しない振動子が接続さ
れ、あるいは外部クロックが供給される。On the peripheral edge of the semiconductor substrate, for example, a large number of bonding pads are arranged as electrode pads. For example, bonding pads P10 to P17 coupled to the input / output terminals of the first to ninth ports 41 to 49,
P20 to P24, P30 to P37, P40 to P47, P
50 to P57, P60 to P63, P70 to P77, P8
0 to P87, P90 to P97, and a bonding pad XTA coupled to an input terminal of the clock generator 56.
L, EXTAL, etc. are arranged. An oscillator (not shown) is connected to the bonding pads XTAL and EXTAL, or an external clock is supplied.
【0023】このようにして構成されたチップ若しくは
ペレットとしてのマイクロコンピュータ131は組み立
て工程において、パッケージのマウント部にダイボンデ
ィングされ、パッケージのリード端子にボンディングパ
ッドがワイヤボンディングされた後に封止される。In the assembling process, the microcomputer 131 as a chip or a pellet configured as described above is die-bonded to the mount portion of the package, and is sealed after the bonding pads are wire-bonded to the lead terminals of the package.
【0024】マイクロコンピュータ131は、各種ポー
トを介して外部とのインタフェースを行うようになって
いる。ポートの機能は動作モードの設定で指定すること
ができ、アドレス信号を外部に出力して外部メモリや周
辺デバイスをアクセスする動作モードもサポートする。The microcomputer 131 interfaces with the outside through various ports. The port function can be specified by setting the operation mode, and the operation mode that outputs an address signal to the outside to access an external memory or a peripheral device is also supported.
【0025】図5には上記CPU50の構成例が示され
る。FIG. 5 shows an example of the configuration of the CPU 50.
【0026】509は命令フェッチ回路であり、この命
令フェッチ回路509は、内部データバス6に結合され
ており、ROM4に記憶されている命令コードをフェッ
チする。この命令フェッチ回路109の後段には、フェ
ッチされた命令コードをデコードすることによって当該
命令を解読するための命令デコード部510が配置され
る。命令デコード部510での命令デコード結果は、後
段に配置された制御部511に入力される。この制御部
511は、CPU50の内部及び外部に対して適当な制
御信号を送出して、上記命令デコード部510でデコー
ドされた命令で指定される必要な動作を、いくつかのス
テップに分けて実行する。An instruction fetch circuit 509 is coupled to the internal data bus 6 and fetches an instruction code stored in the ROM 4. At the subsequent stage of the instruction fetch circuit 109, an instruction decoding unit 510 for decoding the fetched instruction code to decode the instruction is arranged. The result of the instruction decoding by the instruction decoding unit 510 is input to the control unit 511 arranged at the subsequent stage. The control unit 511 sends appropriate control signals to the inside and the outside of the CPU 50, and executes necessary operations designated by the instruction decoded by the instruction decoding unit 510 in several steps. I do.
【0027】算術論理演算ユニット(ALU)507
は、データに対して必要な数値演算、及び論理演算を行
うためのハードウェアユニットである。数値演算には加
算、減算、掛算、割算等があり、論理演算には論理和、
論理積の演算があり、2進法加算回路を基本として実行
される。そのようなALU507には、演算途中で生ず
る種々の状態を保持するためのフラグフリップフロップ
506が結合されている。また、ALU507での演算
のために一時的にデータを保持するための一時レジスタ
505や、各種レジスタ群116が内部バス103に結
合されている。Arithmetic Logic Unit (ALU) 507
Is a hardware unit for performing necessary numerical and logical operations on data. Numerical operations include addition, subtraction, multiplication, division, etc.
There is a logical product operation, which is executed based on a binary addition circuit. To such an ALU 507, a flag flip-flop 506 for holding various states generated during the operation is connected. Further, a temporary register 505 for temporarily holding data for the operation in the ALU 507 and various register groups 116 are connected to the internal bus 103.
【0028】上記各種レジスタ群116には、特に制限
されないが、CPU50が次に実行すべき命令のアドレ
スを格納するためのレジスタであるプログラムカウンタ
PC、命令実行結果のステータスを格納するためのステ
ータスレジスタSR、各種演算処理に適宜使用される汎
用レジスタR0〜Rnと、タスクスタック領域を指示す
るためのレジスタであるスタックポインタSPが含まれ
る。Although not particularly limited, the various register groups 116 are a program counter PC which is a register for storing an address of an instruction to be executed next by the CPU 50, and a status register for storing a status of an instruction execution result. SR, general-purpose registers R0 to Rn appropriately used for various arithmetic processes, and a stack pointer SP which is a register for designating a task stack area.
【0029】図1には割り込み制御部1及び命令デコー
ド部510の構成例が示される。FIG. 1 shows a configuration example of the interrupt control unit 1 and the instruction decoding unit 510.
【0030】割り込み制御部1は、特に制限されない
が、割り込み制御回路11と対応モード指定回路12に
より構成される。割り込み制御回路11は、割り込み要
求101を受け取ると、その要求内容を判定し、割り込
み信号111を命令フェッチ回路509に送り、割り込
み内容信号112を対応モード指定回路12に送る。対
応モード指定回路12は、割り込み制御回路11より送
られてくる割り込み内容信号112に対応するデコード
モードを指定するためのモード指定信号121をデコー
ダ2に送信する。The interrupt control unit 1 includes, but is not limited to, an interrupt control circuit 11 and a corresponding mode designating circuit 12. Upon receiving the interrupt request 101, the interrupt control circuit 11 determines the content of the request, sends an interrupt signal 111 to the instruction fetch circuit 509, and sends an interrupt content signal 112 to the corresponding mode designation circuit 12. The corresponding mode specifying circuit 12 transmits to the decoder 2 a mode specifying signal 121 for specifying a decode mode corresponding to the interrupt content signal 112 sent from the interrupt control circuit 11.
【0031】命令デコード部510は、特に制限されな
いが、複数のデコードモードを実現するために、それぞ
れ異なる命令のデコードを行う第1命令デコーダ21、
第2命令デコーダ21、第3命令デコーダ23、第4命
令デコーダ24と、上記4つのデコーダ21,22,2
3,24のうちのどのデコーダを用いるかを指定するモ
ード切り換え回路25と、上記モード切り換え回路25
から出力されるモード信号250に従い、命令コード3
01を上記4つのデコーダのうちのどのデコーダに送る
かを決定する第1選択回路26と、上記4つのデコーダ
21,22,23,24からそれぞれ出力されるデコー
ド結果271,272,273,274のうちからひと
つを選択することにより、制御部511へ伝達される制
御信号群201と、命令フェッチ回路509に対する割
り込み復帰信号202とを生成する第2選択回路27と
を含んで成る。The instruction decoding unit 510 is, although not particularly limited, a first instruction decoder 21 that decodes different instructions to realize a plurality of decoding modes.
A second instruction decoder 21, a third instruction decoder 23, a fourth instruction decoder 24, and the four decoders 21, 22, 2;
A mode switching circuit 25 for designating which of the decoders 3 and 24 is to be used;
Instruction code 3 according to the mode signal 250 output from
01 to which one of the four decoders is to be sent, and the decoding results 271, 272, 273, and 274 output from the four decoders 21, 22, 23, and 24, respectively. By selecting one of them, a control signal group 201 transmitted to the control unit 511 and a second selection circuit 27 that generates an interrupt return signal 202 to the instruction fetch circuit 509 are included.
【0032】図2には上記対応モード指定回路12の構
成例が示される。FIG. 2 shows a configuration example of the corresponding mode designating circuit 12.
【0033】対応モード指定回路12は、特に制限され
ないが、モード判定回路13とモード保持回路14及び
モード退避回路15を含んで成る。The corresponding mode designating circuit 12 includes, but is not limited to, a mode determining circuit 13, a mode holding circuit 14, and a mode saving circuit 15.
【0034】モード判定回路13は割り込み内容信号1
12によって指定されたモードを判定し、モード変更信
号130をモード保持回路14に出力する。The mode determination circuit 13 outputs the interrupt content signal 1
The mode designated by 12 is determined, and a mode change signal 130 is output to the mode holding circuit 14.
【0035】モード保持回路14は、現在のモードを保
持するためのレジスタを含んで構成される。モード待避
回路15は、上記モード保持回路14とデータのやり取
りが可能とされる。モード変更信号130に基づいて、
それまでモード保持回路14に保持されていたモードが
変更されるとき、変更前のモードは、モード待避回路1
5へ待避される。The mode holding circuit 14 includes a register for holding the current mode. The mode saving circuit 15 can exchange data with the mode holding circuit 14. Based on the mode change signal 130,
When the mode held in the mode holding circuit 14 is changed, the mode before the change is changed to the mode save circuit 1
Saved to 5.
【0036】モード保持回路14に新しいモードが保持
されると、モード指定信号121によって新しいモード
が出力される。更にモード保持回路14では、割り込み
復帰信号202を受け取ると、モード退避回路15より
割り込みに入る前のモードを読み出し、モード指定信号
121に出力する。ここでモード判定回路13は、メモ
リによって構成され、割り込み内容112がアドレスと
して取り込まれ、それに対応するデータとしてモード切
り換え信号130が出力される。ここでモード退避回路
15は、必要十分な書き換え可能なメモリにより構成さ
れ、複数のモードを保持できる。このため割り込み処理
の最中に他の割り込みを受けた場合でも、そのときのモ
ードを格納して次のモードに移行できる。また、モード
退避回路15からモードを読み出す順番は、格納したと
きとは逆の順番となる。When the new mode is held in the mode holding circuit 14, the new mode is output by the mode designation signal 121. Further, upon receiving the interrupt return signal 202, the mode holding circuit 14 reads the mode before entering the interrupt from the mode saving circuit 15 and outputs the read mode to the mode designation signal 121. Here, the mode determination circuit 13 is constituted by a memory, the interrupt content 112 is taken in as an address, and a mode switching signal 130 is output as data corresponding to the content. Here, the mode saving circuit 15 is constituted by a necessary and sufficient rewritable memory, and can hold a plurality of modes. Therefore, even if another interrupt is received during the interrupt processing, the mode at that time can be stored and the next mode can be entered. The order in which the modes are read from the mode saving circuit 15 is the reverse of the order in which the modes are stored.
【0037】次に、主要動作を説明する。Next, the main operation will be described.
【0038】命令デコード部510において第1デコー
ダ21を使用して命令のデコードを行っている(これを
モード1とする)ときに、割り込み要求101がアサー
トされ、この割り込み要求101が第2デコーダ22を
使用するモード(これをモード2とする)に対応してい
るとき、割り込み制御回路11は、割り込み信号111
をアサートすると共に、割り込み内容112を出力す
る。命令フェッチ回路509は、そのときの命令アドレ
スを退避した後、割り込み信号111に基づき所定の割
り込み処理が格納されているアドレスをアドレスバス5
に出力し、割り込み処理の命令をデータバス6を介して
ROM4より読み出す。When an instruction is decoded in the instruction decoding unit 510 using the first decoder 21 (this is referred to as mode 1), an interrupt request 101 is asserted, and the interrupt request 101 is transmitted to the second decoder 22. When the mode corresponds to the mode (mode 2), the interrupt control circuit 11
Is asserted, and the interrupt content 112 is output. The instruction fetch circuit 509 saves the instruction address at that time, and then stores the address where a predetermined interrupt process is stored based on the interrupt signal 111 on the address bus 5.
And an interrupt processing instruction is read out from the ROM 4 via the data bus 6.
【0039】対応モード指定回路12は、それまでのモ
ード1をモード退避回路15に格納し、モード指定信号
121により新たなモード2をモード切り換え回路25
に指示する。The corresponding mode designating circuit 12 stores the previous mode 1 in the mode saving circuit 15, and switches the new mode 2 to the mode switching circuit 25 according to the mode designating signal 121.
To instruct.
【0040】以後命令デコード部510は、第2デコー
ダ22を用いて命令のデコードを行う。割り込み処理が
終了すると、割り込み復帰信号202がアサートされ
る。これにより、対応モード指定回路12では、モード
退避回路15から、割り込みが来る前のモードが読み出
され、モード指定信号121がモード1に変更される。
つまり、割り込みの直前のデコードモードに復帰され
る。また命令フェッチ回路509では、上記割り込み復
帰信号202に従い、退避していたアドレスを読み出し
アドレスバス5へ出力し、割り込み要求が101が来る
前に行っていた処理へ復帰する。Thereafter, the instruction decoding section 510 decodes the instruction using the second decoder 22. When the interrupt processing ends, the interrupt return signal 202 is asserted. As a result, in the corresponding mode designating circuit 12, the mode before the interruption is read out from the mode saving circuit 15, and the mode designation signal 121 is changed to mode 1.
That is, the mode is returned to the decode mode immediately before the interruption. The instruction fetch circuit 509 outputs the saved address to the read address bus 5 in accordance with the interrupt return signal 202, and returns to the processing performed before the interrupt request 101 was received.
【0041】上記した例によれば、以下の作用効果を得
ることができる。According to the above example, the following effects can be obtained.
【0042】(1)割り込み制御部1において、取り込
まれた割り込みに対応する命令解読モードが判定され、
この判定結果に基づいて命令解読モードが変更されるよ
うになっているので、割り込みによって命令解読モード
の変更が可能とされる。処理の内容が大きく変わるのは
割り込みによる場合が最も多いと考えられるから、割り
込みにより命令解読モードの切り換えを行うことは効果
的である。(1) The interrupt control unit 1 determines the instruction decoding mode corresponding to the fetched interrupt,
Since the instruction decoding mode is changed based on the determination result, the instruction decoding mode can be changed by interruption. It is considered that the content of the processing is largely changed by an interrupt, and it is effective to switch the instruction decoding mode by the interrupt.
【0043】また、この命令解読モードの変更は、モー
ド切り換え命令によって命令解読モードを変更する方式
ではないので、切り換え命令のためのステップは不要で
あり、全ての命令解読モードにおいて切り換え命令を準
備する必要もない。さらに、命令が格納されている領域
を切り換える方式ではないので、ある命令解読モードを
使用した処理が多い場合にはメモリ容量不足になった
り、逆にある命令解読モードを使用した処理が少ない場
合にはその命令解読モードに対するメモリ容量が余って
しまってメモリの使用効率の低下を招くこともない。Further, since the instruction decoding mode is not changed by changing the instruction decoding mode by the mode switching instruction, a step for the switching instruction is unnecessary, and the switching instruction is prepared in all the instruction decoding modes. No need. Furthermore, since it is not a method of switching the area where instructions are stored, if there is a lot of processing using a certain instruction decoding mode, the memory capacity becomes insufficient, or conversely, if there is little processing using a certain instruction decoding mode. Does not reduce the memory usage efficiency due to excess memory capacity for the instruction decoding mode.
【0044】(2)割り込みに応じて予め定義された複
数の命令解読モードを備える命令デコード部510は、
複数のデコーダ21〜24と、命令フェッチ回路によっ
てフェッチされた命令コードを上記複数のデコーダに振
り分けるための第1選択回路26と、上記複数のデコー
ダの出力信号を選択的に後段回路に伝達するための第2
選択回路27と、上記対応モード指定回路の指定に基づ
いて上記第1選択回路及び上記第2選択回路の動作を制
御するための切り換え回路25とを含んで容易に構成す
ることができる。(2) The instruction decoding unit 510 having a plurality of instruction decoding modes defined in advance in response to an interrupt
A plurality of decoders 21 to 24; a first selection circuit 26 for distributing the instruction code fetched by the instruction fetch circuit to the plurality of decoders; and a circuit for selectively transmitting output signals of the plurality of decoders to a subsequent circuit. Second
It can be easily configured to include the selection circuit 27 and the switching circuit 25 for controlling the operations of the first selection circuit and the second selection circuit based on the specification of the corresponding mode specification circuit.
【0045】(3)割り込みに基づいてモードを判定す
るためのモード判定回路13と、上記モード判定回路の
判定結果に基づいて指示されたモードを保持するための
モード保持手段14と、上記モード保持手段に現在保持
されているモードの直前のモードに復帰させるための情
報を待避するモード待避手段15とを含んで対応モード
指定回路を構成することにより、デコードモード変更前
へのモード復帰の容易化を図ることができる。(3) A mode judging circuit 13 for judging a mode based on an interrupt, a mode holding means 14 for holding a mode instructed based on the judgment result of the mode judging circuit, and a mode holding circuit By configuring the corresponding mode designating circuit including the mode saving means 15 for saving information for returning to the mode immediately before the mode currently held by the means, the mode can be easily returned to before the decoding mode is changed. Can be achieved.
【0046】以上本発明者によってなされた発明を具体
的に説明したが、本発明はそれに限定されるものではな
く、その要旨を逸脱しない範囲において種々変更可能で
あることは言うまでもない。Although the invention made by the inventor has been specifically described above, the present invention is not limited to this, and it goes without saying that various modifications can be made without departing from the gist of the invention.
【0047】例えば、命令デコード部510を構成する
デコーダの数は任意に決定することができる。For example, the number of decoders constituting instruction decoding section 510 can be arbitrarily determined.
【0048】以上の説明では主として本発明者によって
なされた発明をその背景となった利用分野である汎用マ
イクロコンピュータに適用した場合について説明した
が、用途が限定されて専用化されたマイクロコンピュー
タにも本発明を適用することができる。In the above description, mainly the case where the invention made by the present inventor is applied to a general-purpose microcomputer, which is the background of the application, has been described. The present invention can be applied.
【0049】本発明は少なくともフェッチされた命令を
解読するための手段を含むことを条件に適用することが
できる。The present invention can be applied on the condition that it includes at least means for decoding a fetched instruction.
【0050】[0050]
【発明の効果】本願において開示される発明のうち代表
的なものによって得られる効果を簡単に説明すれば下記
の通りである。The effects obtained by typical ones of the inventions disclosed in the present application will be briefly described as follows.
【0051】すなわち、取り込まれた割り込みに対応す
る命令解読モードが判定され、この判定結果に基づいて
命令解読モードが変更されるようになっているので、割
り込みによって命令解読モードの変更が可能とされる。That is, the instruction decoding mode corresponding to the fetched interrupt is determined, and the instruction decoding mode is changed based on the determination result. Therefore, the instruction decoding mode can be changed by the interrupt. You.
【0052】また、モード切り換え命令によって命令解
読モードを変更する方式ではないので、切り換え命令の
ためのステップは不要であり、全ての命令解読モードに
おいて切り換え命令を準備する必要もない。Further, since the instruction decoding mode is not changed by the mode switching instruction, a step for the switching instruction is unnecessary, and it is not necessary to prepare the switching instruction in all the instruction decoding modes.
【0053】さらに、命令が格納されている領域を切り
換える方式ではないので、ある命令解読モードを使用し
た処理が多い場合にはメモリ容量不足になったり、逆に
ある命令解読モードを使用した処理が少ない場合にはそ
の命令解読モードに対するメモリ容量が余ってしまって
メモリの使用効率の低下を招くこともない。Further, since the method is not a method of switching the area in which the instruction is stored, if there are many processes using a certain instruction decoding mode, the memory capacity becomes insufficient. If the number is small, the memory capacity for the instruction decoding mode is not excessive, and the use efficiency of the memory is not reduced.
【図1】本発明にかかるマイクロコンピュータにおける
主要部の構成例ブロック図である。FIG. 1 is a block diagram illustrating a configuration example of a main part in a microcomputer according to the present invention.
【図2】上記マイクロコンピュータに含まれる対応モー
ド指定回路の構成例ブロック図である。FIG. 2 is a block diagram showing a configuration example of a corresponding mode designating circuit included in the microcomputer.
【図3】上記マイクロコンピュータを含むコンピュータ
システムの全体的な構成例ブロック図である。FIG. 3 is a block diagram illustrating an overall configuration example of a computer system including the microcomputer.
【図4】上記マイクロコンピュータの全体的な構成例ブ
ロック図である。FIG. 4 is a block diagram showing an overall configuration example of the microcomputer.
【図5】上記マイクロコンピュータに含まれるCPUの
構成例ブロック図である。FIG. 5 is a block diagram illustrating a configuration example of a CPU included in the microcomputer.
1 割り込み制御部 4 ROM 5 アドレスバス 6 データバス 11 割り込み制御回路 12 対応モード指定回路 13 モード判定回路 14 モード保持回路 15 モード退避回路 21 第1デコーダ 22 第1デコーダ 23 第2デコーダ 24 第4デコーダ 25 モード切り換え回路 26 第1選択回路 27 第2選択回路 101 割り込み要求信号 111 割り込み信号 112 割り込み内容 121 モード指定信号 131 モード変更信号 202 割り込み復帰回路 510 命令デコード部 509 命令フェッチ回路 DESCRIPTION OF SYMBOLS 1 Interrupt control part 4 ROM 5 Address bus 6 Data bus 11 Interrupt control circuit 12 Corresponding mode designating circuit 13 Mode determining circuit 14 Mode holding circuit 15 Mode saving circuit 21 First decoder 22 First decoder 23 Second decoder 24 Fourth decoder 25 Mode switching circuit 26 First selection circuit 27 Second selection circuit 101 Interrupt request signal 111 Interrupt signal 112 Interrupt contents 121 Mode designation signal 131 Mode change signal 202 Interrupt return circuit 510 Instruction decode unit 509 Instruction fetch circuit
Claims (4)
ッチするための命令フェッチ手段と、 割り込みに対応して予め定義された複数の命令解読モー
ドを備え、上記フェッチ手段によってフェッチされた命
令を、指定された命令解読モードでデコード可能な命令
デコード部と、 取り込まれた割り込みに対応する命令解読モードを判定
して上記命令デコード部に対してそのモードを指定する
ための割り込み制御部と、 を含むことを特徴とするマイクロコンピュータ。An instruction fetch unit for fetching an instruction code from a program memory, and a plurality of instruction decoding modes defined in advance corresponding to an interrupt, wherein an instruction fetched by the fetch unit is specified. An instruction decoding unit capable of decoding in an instruction decoding mode, and an interrupt control unit for determining an instruction decoding mode corresponding to the fetched interrupt and designating the instruction decoding unit to the mode. And a microcomputer.
ッチするための命令フェッチ手段と、 割り込みに対応して予め定義された複数の命令解読モー
ドを備え、上記フェッチ手段によってフェッチされた命
令を、指定された命令解読モードでデコード可能な命令
デコード部と、 取り込まれた割り込みに対応する命令解読モードを判定
する割り込み制御回路と、 上記割り込み制御回路の判定結果に基づいて、対応する
デコードモードを上記命令デコード部に対して指定する
ための対応モード指定回路と、 を含むことを特徴とするマイクロコンピュータ。An instruction fetch unit for fetching an instruction code from a program memory; and a plurality of instruction decoding modes defined in advance corresponding to an interrupt. An instruction decoding unit capable of decoding in an instruction decoding mode; an interrupt control circuit for determining an instruction decoding mode corresponding to the fetched interrupt; and a corresponding decoding mode based on a determination result of the interrupt control circuit. And a corresponding mode designating circuit for designating the microcomputer.
と、 上記命令フェッチ回路によってフェッチされた命令コー
ドを上記複数のデコーダに振り分けるための第1選択回
路と、 上記複数のデコーダの出力信号を選択的に後段回路に伝
達するための第2選択回路と、 上記命令解読モード指定手段の指定に基づいて上記第1
選択回路及び上記第2選択回路の動作を制御するための
切り換え回路とを含む請求項1又は2記載のマイクロコ
ンピュータ。3. The instruction decoding section selects a plurality of decoders, a first selection circuit for distributing an instruction code fetched by the instruction fetch circuit to the plurality of decoders, and an output signal of the plurality of decoders. A second selection circuit for transmitting the command to the subsequent circuit, and the first selection circuit based on the instruction decoding mode designating means.
3. The microcomputer according to claim 1, further comprising a selection circuit and a switching circuit for controlling an operation of the second selection circuit.
よって指定されたモードを判定するためのモード判定回
路と、 上記モード判定回路の判定結果に基づいて指示されたモ
ードを保持するためのモード保持手段と、 上記モード保持手段に現在保持されているモードの直前
のモードに復帰させるための情報を待避するモード待避
手段とを含む請求項2又は3記載のマイクロコンピュー
タ。4. A mode determination circuit for determining a mode specified by an interrupt, and a mode holding means for holding a mode specified based on a determination result of the mode determination circuit. 4. The microcomputer according to claim 2, further comprising: a mode saving unit for saving information for returning to a mode immediately before the mode currently held in the mode holding unit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10311527A JP2000137619A (en) | 1998-11-02 | 1998-11-02 | Microcomputer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10311527A JP2000137619A (en) | 1998-11-02 | 1998-11-02 | Microcomputer |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2000137619A true JP2000137619A (en) | 2000-05-16 |
Family
ID=18018318
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP10311527A Withdrawn JP2000137619A (en) | 1998-11-02 | 1998-11-02 | Microcomputer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2000137619A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7536534B2 (en) | 2003-02-27 | 2009-05-19 | Nec Electronics Corporation | Processor capable of being switched among a plurality of operating modes, and method of designing said processor |
| JP2011008760A (en) * | 2009-05-22 | 2011-01-13 | Renesas Electronics Corp | Microcomputer |
| JP2013045145A (en) * | 2011-08-22 | 2013-03-04 | Fujitsu Semiconductor Ltd | Processor |
-
1998
- 1998-11-02 JP JP10311527A patent/JP2000137619A/en not_active Withdrawn
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7536534B2 (en) | 2003-02-27 | 2009-05-19 | Nec Electronics Corporation | Processor capable of being switched among a plurality of operating modes, and method of designing said processor |
| JP2011008760A (en) * | 2009-05-22 | 2011-01-13 | Renesas Electronics Corp | Microcomputer |
| JP2013045145A (en) * | 2011-08-22 | 2013-03-04 | Fujitsu Semiconductor Ltd | Processor |
| US9411594B2 (en) | 2011-08-22 | 2016-08-09 | Cypress Semiconductor Corporation | Clock data recovery circuit and clock data recovery method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0169565B1 (en) | Microprocessor compatible with any software represented by different types of instruction formats | |
| JP2005115964A (en) | Data processing system | |
| JPS621031A (en) | data processing equipment | |
| JPS6218936B2 (en) | ||
| US20030023836A1 (en) | Shadow register array control instructions | |
| JP2007500394A (en) | Microcontroller with interrupt structure having programmable priority levels associated with different register sets for each priority level | |
| JP2000137619A (en) | Microcomputer | |
| US7020788B2 (en) | Reduced power option | |
| JP3723775B2 (en) | Data processing device | |
| KR100188374B1 (en) | Processing unit | |
| JPH06230985A (en) | Task control circuit and microprocessor | |
| JP4451010B2 (en) | Programmable controller | |
| JP2000029721A (en) | Microcomputer | |
| JPH04280334A (en) | One chip microcomputer | |
| JP2826309B2 (en) | Information processing device | |
| JPH04241032A (en) | System call execution device | |
| JPS59218569A (en) | micro computer | |
| JP3900660B2 (en) | Sequence controller | |
| JPS6043757A (en) | 1 chip microcomputer | |
| JPS6230452B2 (en) | ||
| JPH0969049A (en) | Information processing apparatus and control method therefor | |
| JPS6015970B2 (en) | Interrupt processing device in microprocessor | |
| JPS6354630A (en) | Data processor | |
| JPH04358227A (en) | Microprocessor | |
| JP2000039906A (en) | Programmable controller |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20060110 |