JPH02181282A - Single chip microcomputer - Google Patents

Single chip microcomputer

Info

Publication number
JPH02181282A
JPH02181282A JP64000669A JP66989A JPH02181282A JP H02181282 A JPH02181282 A JP H02181282A JP 64000669 A JP64000669 A JP 64000669A JP 66989 A JP66989 A JP 66989A JP H02181282 A JPH02181282 A JP H02181282A
Authority
JP
Japan
Prior art keywords
cpu
interrupt processing
signal
operation mode
outputs
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP64000669A
Other languages
Japanese (ja)
Inventor
Wataru Okamoto
渉 岡本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP64000669A priority Critical patent/JPH02181282A/en
Publication of JPH02181282A publication Critical patent/JPH02181282A/en
Pending legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

PURPOSE:To directly use the software which is described with an instruction of an emulation CPU by designating the action mode of the CPU at an interruption process via an action mode designating circuit. CONSTITUTION:When an interruption process request is produced, an interruption control circuit 2 outputs an interruption process request signal 7 to a CPU 3. The CPU 3 accepts the process request in the final timing for execution of an instruction and outputs an interruption process acceptance signal 8 to the circuit 2 and an action mode designating circuit 12. In this case, the circuit 12 outputs a decoder switch signal 40 to the CPU 3 and at the same time outputs a CPU designating signal 14 to the CPU 3 based on an action mode designating signal 15 which is inputted in response to the level of an external terminal 11. The CPU 3 switches its action mode between the native and emulation modes based on both signals 40 and 14 and executes an interruption process.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、単一半導体基盤上にコンピュータ機能及び中
央処理装置(以下CPUと呼ぶ)のエミュレーション機
能を内蔵したシングルチップマイクロコンピュータにお
いて、割込み処理を行なうCPUを指定可能なシングル
チップマイクロコンピュータに係わる。
Detailed Description of the Invention [Field of Industrial Application] The present invention provides an interrupt processing system for a single-chip microcomputer that has a computer function and a central processing unit (hereinafter referred to as CPU) emulation function on a single semiconductor substrate. This invention relates to a single-chip microcomputer that can specify a CPU that performs the following steps.

〔従来の技術〕[Conventional technology]

近年はLSI製造技術の進歩により、シングルチップマ
イクロコンピュータの分野においても高集積化が進み、
単位機能当たりのコストの低下も著しくなってきている
。
In recent years, advances in LSI manufacturing technology have led to higher integration in the field of single-chip microcomputers.
The cost per unit function is also decreasing significantly.

ツレに伴い、シングルチップマイクロコンピュータの利
用分野も拡大し、膨大なソフトウェアが蓄積されてきて
いる。
Along with this trend, the fields of use of single-chip microcomputers have expanded, and a huge amount of software has been accumulated.

上述したソフトウェア資産を有効に活用するためには、
アーテキテクチャにおいて互換性のあるCPUを使用す
る必要があるが、性能向上、低コストの要求などの様々
な条件のため命令コードレベルで互換性のあるCPUを
使用することが不可能なことがある。
In order to effectively utilize the software assets mentioned above,
Although it is necessary to use a CPU that is compatible in the architecture, it may be impossible to use a CPU that is compatible at the instruction code level due to various conditions such as demands for improved performance and low cost. .

このような場合、従来命令機能をエミュレートする機能
を内蔵し、過去のCPU用に作成したプログラムをその
まま使用可能とすることにより解決してきた。
Such cases have conventionally been solved by incorporating a built-in function to emulate command functions and allowing programs created for past CPUs to be used as they are.

つまり、ネイティブモードのCPUがCPUIで、エミ
ュレーションモードのCPUがCPU2であるとすると
、ネイティブモードからエミュレーションモードに切り
換えてCPU2の命令コードを実行する。他の場合には
CPU1のモード(ネイティブモード)にて実行する。
That is, assuming that the CPU in native mode is CPUI and the CPU in emulation mode is CPU2, the CPU 2 switches from native mode to emulation mode and executes the instruction code of CPU2. In other cases, execution is performed in the CPU1 mode (native mode).

このようにして、CPU2に対して作成した過去のソフ
トウェア資産を有効に活用し、ソフトウェア新規作成の
工数を削減してきた。
In this way, the past software assets created for the CPU 2 are effectively utilized, and the man-hours for creating new software are reduced.

この際、割込み処理をどちらのモードで行なうかという
問題が存在するが、従来のシングルチップマイコンにお
いては、ネイティブモードにて実行する構成であったた
め、CPU2の命令で書いた割込み処理プログラムが使
用できず、CPUIの命令を使用して新たに書き直す必
要があるためソフトウェア作成の工数が余分に必要であ
るという欠点があった。以下、従来のシングルチップマ
イクロコンピュータの例について第5図のマイクロコン
ピュータのブロック図を用いて説明する。
At this time, there is a problem in which mode the interrupt processing should be performed, but since conventional single-chip microcontrollers were configured to execute in native mode, interrupt processing programs written using CPU2 instructions cannot be used. First, it has the disadvantage that additional man-hours are required to create the software because it needs to be rewritten using CPU commands. An example of a conventional single-chip microcomputer will be described below with reference to the block diagram of the microcomputer shown in FIG.

まず構成要素の説明を行なう。First, the constituent elements will be explained.

第5図においてCPU3は中央処理装置である。In FIG. 5, CPU3 is a central processing unit.

メモリ部9は、読み出し専用メモ!J ROM(Rea
dOnly Memory)及び読み出し書込み共に可
能なメモリRAM(Random  Access  
Memory)から構成し、ユーザプログラム格納及び
データ処理の際にワーキングエリアとして用いる。
Memory section 9 is a read-only memo! J ROM(Rea
dOnly Memory) and memory RAM (Random Access) that can be read and written.
Memory) and is used as a working area when storing user programs and processing data.

内部バス6はアドレス及びデータを時分割に転送するバ
スである。
The internal bus 6 is a bus that transfers addresses and data in a time-division manner.

メインデコーダ4はネイティブモードの際に使用する命
令デコーダである。サブデコーダ5は、エミュレーショ
ンモードの際に使用する命令デコーダである。
Main decoder 4 is an instruction decoder used in native mode. Sub-decoder 5 is an instruction decoder used in emulation mode.

CPU3は、メモリ部9に格納した命令を内部バス6を
介してフェッチし、ネイティブモードの時は命令デコー
ダ4にてデコードし、エミュレーションモードの際には
、サブデコーダ5にてデコードすることにより、命令を
実行する。
The CPU 3 fetches the instructions stored in the memory section 9 via the internal bus 6, decodes them with the instruction decoder 4 when in native mode, and decodes them with the sub-decoder 5 when in emulation mode. Execute commands.

周辺部10は、チップ外部とのデータ通信を行なうため
の入出力ボートで、内部バス6のデータをチップ外部に
出力し、チップ外部からの入力データを内部バス6に出
力する機能を持つ。
The peripheral section 10 is an input/output port for data communication with the outside of the chip, and has the function of outputting data on the internal bus 6 to the outside of the chip and outputting input data from outside the chip to the internal bus 6.

割込み制御回路2はチップ外部から入力される外部割込
み要求信号35に従って、CPUに割込み処理を実行さ
せる。すなわち、割込み制御回路2はチップ外部から割
込み要求信号35を入力すると、割込み処理要求信号7
をCPU3に出力する。この時CPU3は、割込み処理
受は付は信号8を出力し、割込み処理を実行する。
The interrupt control circuit 2 causes the CPU to execute interrupt processing in accordance with an external interrupt request signal 35 input from outside the chip. That is, when the interrupt control circuit 2 receives the interrupt request signal 35 from outside the chip, it outputs the interrupt processing request signal 7.
is output to CPU3. At this time, the CPU 3 outputs a signal 8 to accept the interrupt process, and executes the interrupt process.

上記構成要素を用いて動作説明を行なう。The operation will be explained using the above components.

CPU3は、命令コードをメモリ部9がら読み出し、内
部バス6を介してフェッチする。フェッチした命令コー
ドは、ネイティブモードの時はメインデコーダ4でデコ
ードし、エミュレーションモードの時は、サブデコーダ
5でデコード後実行する。命令実行が終了すると、メモ
リ部9から次の命令をフェッチし、上述した処理を継続
実行する。
The CPU 3 reads the instruction code from the memory section 9 and fetches it via the internal bus 6. The fetched instruction code is decoded by the main decoder 4 in the native mode, and is executed after being decoded by the sub-decoder 5 in the emulation mode. When the instruction execution is completed, the next instruction is fetched from the memory unit 9 and the above-described processing is continued.

命令デコーダの切り換えは、CPUの特殊命令によって
行なう。
Switching of the instruction decoder is performed by a special instruction of the CPU.

すなわち、CPUの特殊命令の実行により、命令デコー
ダをサブデコーダ5に切換えて、エミュレーションモー
ドにてプログラムを実行する。エミュレーションモード
におけるプログラムの実行終了時には、さらに特殊命令
によりメインデコーダ4に切換えて、ネイティブモード
にてプログラムを実行する。
That is, by executing a special instruction of the CPU, the instruction decoder is switched to the sub-decoder 5, and the program is executed in emulation mode. When the execution of the program in the emulation mode is finished, the main decoder 4 is switched to the main decoder 4 by a special instruction, and the program is executed in the native mode.

命令によるCPUの動作モード切換えに関しては、日本
電気(株)半導体マーケティング本部発行のデータブッ
ク“Vシリーズマイクロプロセッサ/周辺1988”の
P114−pH6に詳しく述べである。
The switching of the CPU operation mode by commands is described in detail in page 114-pH6 of the data book "V Series Microprocessors/Peripherals 1988" published by the Semiconductor Marketing Headquarters of NEC Corporation.

次に、割込み処理時の動作を説明する。Next, the operation during interrupt processing will be explained.

チップ外部から割込み要求が生じると、割込み制御回路
2はCPU3に対して、割込み処理要求信号7を出力す
る。CPU3は、命令実行処理の最終タイミングで割込
み処理要求を受は付け、割込み処理受は付は信号8を出
力する。このときCPUの動作モードがなんであろうと
、CPU3は命令デコーダをメインデコーダ4に設定し
、ネイティブモードにて割込み処理を実行する。割込み
処理からの復帰時(例えば、RETI命令実行時)には
、再び割込み処理前の動作モードに戻る。
When an interrupt request is generated from outside the chip, the interrupt control circuit 2 outputs an interrupt processing request signal 7 to the CPU 3. The CPU 3 accepts the interrupt processing request at the final timing of the instruction execution process, and outputs a signal 8 when the interrupt processing is accepted. At this time, regardless of the operating mode of the CPU, the CPU 3 sets the instruction decoder to the main decoder 4 and executes interrupt processing in the native mode. When returning from interrupt processing (for example, when executing a RETI instruction), the operation mode returns to the one before the interrupt processing.

上記シングルチップマイクロコンピュータにおいては、
割込み処理に際して、必ずネイティブモードにて処理を
行なうので、エミュレーションモードCPUの命令にて
作成したプログラムがそのまま使用できる場合でも、ネ
イティブモードCPUの命令を用いて新規に割込み制御
プログラムを作成する必要がある。さらに検査も行なわ
なければならず、ソフトウェアの新規作成に伴う工数が
膨大になる。これは、エミュレーションモードを内蔵し
た効果を弱める結果となる。
In the single-chip microcomputer mentioned above,
Interrupt processing is always performed in native mode, so even if a program created using emulation mode CPU instructions can be used as is, it is necessary to create a new interrupt control program using native mode CPU instructions. . In addition, inspection must be performed, which increases the number of man-hours involved in creating new software. This results in weakening the effect of having a built-in emulation mode.

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

上述したように、従来のシングルチッソマイクロコンピ
ュータにおいては、割込み処理実行時に必ずネイティブ
モードとなるため、エミュレーションCPUの命令で記
述したプログラムをネイティブモードのCPUの命令を
用いて作成しなおす必要があり、フログラムのデパック
及び検査作業も考慮に入れると、膨大な工数が必要にな
るという欠点があった。
As mentioned above, in conventional single Chisso microcomputers, the native mode is always used when executing interrupt processing, so it is necessary to rewrite programs written using emulation CPU instructions using native mode CPU instructions. Taking into consideration the depacking and inspection work of the program, there was a drawback that a huge number of man-hours were required.

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

本発明に係わるシングルチップマイクロコンピュータは
、単一半導体基盤上にコンピュータ機能を集積し、中央
処理装置のエミュレーション機能を内蔵したシングルチ
ッソマイクロコンピュタにおいて、割込み処理中にオン
する1ビットフラグを備え外部端子からの入力信号に応
じて前記中央処理装置の動作モードを指定する動作モー
ド指定回路を内蔵し、前記動作モード指定回路によって
割込み処理時の前記中央処理装置の動作モードを指定す
ることを特徴とする。または単一半導体基盤上にコンピ
ュータ機能を集積し、中央処理装置のエミュレーション
機能を内蔵したシンクルーF−ツブマイクロコンピュー
タにおいて、割込み処理中にオンする1ビットフラグ及
び前記中央処理装置の命令により操作する動作モード指
定用フラグから構成する動作モード指定回、路を内蔵し
、前記動作モード指定回路により割込み処理時の動作モ
ードを指定することを特徴とする。
The single-chip microcomputer according to the present invention is a single-chip microcomputer that integrates computer functions on a single semiconductor substrate and has a built-in central processing unit emulation function, and is equipped with a 1-bit flag that turns on during interrupt processing and has an external terminal. The CPU includes an operation mode designation circuit that designates an operation mode of the central processing unit according to an input signal from the central processing unit, and the operation mode designation circuit designates the operation mode of the central processing unit during interrupt processing. . Or, in a synchronized F-Tub microcomputer that integrates computer functions on a single semiconductor substrate and has a built-in central processing unit emulation function, an operation that is operated by a 1-bit flag that is turned on during interrupt processing and a command from the central processing unit. The present invention is characterized in that it has a built-in operation mode designation circuit consisting of a mode designation flag, and the operation mode designation circuit designates the operation mode during interrupt processing.

かくして、本発明に係わるシングルチップマイクロコン
ピュータにおいては、割込み処理時のCPUの動作モー
ドを指定可能な機能を内蔵しており、必要に応じて割込
み処理を行なうCPUをエミュレーションCPUに指定
することにより、エミュレーションCPUの命令で記述
したソフトウェアをそのまま使用可能であり、ソフトウ
ェア作成の工数も大幅に削減することができる。
Thus, the single-chip microcomputer according to the present invention has a built-in function that can specify the operating mode of the CPU during interrupt processing, and by specifying the CPU that performs interrupt processing as the emulation CPU as necessary, Software written using emulation CPU instructions can be used as is, and the number of steps required to create software can be significantly reduced.

〔実施例〕〔Example〕

第1図は本発明に係わる第1の実施例のシングルチッソ
マイクロコンピュータのブロック図である。
FIG. 1 is a block diagram of a single Nisso microcomputer according to a first embodiment of the present invention.

本発明に係わる第1の実施例のシングルチッソマイクロ
コンピュータにおいては、動作モード指定回路を付加し
、割込み処理時のCPUの動作モードを指定する機能を
付加した以外は、第3図に示す従来例と相違がない。よ
って、以下動作モード指定回路を中心に第1図を用いて
説明する。
The single Chisso microcomputer according to the first embodiment of the present invention is similar to the conventional example shown in FIG. There is no difference. Therefore, the operation mode designation circuit will be mainly explained below with reference to FIG.

本実施例においては、エミュレーションCPUを1個と
して説明を行なう。
In this embodiment, the explanation will be given assuming that there is one emulation CPU.

第1図に示す第1の実施例のシングルチップマイクロコ
ンピュータは、割込み処理時のCPUの動作モードを指
定する機能を従来のシングルチップマイコンに付加した
構成である。
The single-chip microcomputer of the first embodiment shown in FIG. 1 has a configuration in which a function for specifying the operating mode of the CPU during interrupt processing is added to a conventional single-chip microcomputer.

外部端子11は、割込み処理のCPUの動作モードをチ
ップ外部から指定する除用いる端子であり、動作モード
指定信号15を動作モード指定回路12に出力する。
The external terminal 11 is a terminal used to specify the CPU operation mode for interrupt processing from outside the chip, and outputs an operation mode designation signal 15 to the operation mode designation circuit 12.

CPU3は、割込み処理からの復帰命令(例えば、R,
ETI命令)実行終了時にクリア信号13を動作モード
指定回路12に出力する。
The CPU 3 issues a return command (for example, R,
When the execution of the ETI command is completed, a clear signal 13 is output to the operation mode designation circuit 12.

動作モード指定回路12は、割込み処理時にデコーダ切
り換え信号40をCPU3に出力すると共に、動作モー
ド指定信号15に従って、CPU指定信号14をCPU
3に出力し、割込み処理時の動作モードを指定する。
The operation mode designation circuit 12 outputs a decoder switching signal 40 to the CPU 3 during interrupt processing, and also outputs a CPU designation signal 14 to the CPU 3 according to the operation mode designation signal 15.
3 to specify the operation mode during interrupt processing.

以下、動作を説明する。The operation will be explained below.

割込み処理要求が発生すると、割込み制御回路2は割込
み処理要求信号7をCPU3に出力する。
When an interrupt processing request occurs, the interrupt control circuit 2 outputs an interrupt processing request signal 7 to the CPU 3.

CPU3は、命令実行の最終タイミングで割込み処理要
求を受は付け、割込み処理受は付は信号8を割込み制御
回路2及び動作モード指定回路12に出力する。
The CPU 3 accepts the interrupt processing request at the final timing of instruction execution, and outputs a signal 8 to the interrupt control circuit 2 and the operation mode designation circuit 12 in response to the interrupt processing request.

この時、動作モード指定回路12は、デコーダ切り換え
信号40をCPU3に出力すると共に、外部端子11の
レベルに応じて入力する動作モード指定信号15に従っ
て、CPU指定信号14をCPU3に出力する。CPU
3は、デコーダ切り換え信号40及びCPU指定信号1
4に従って、CPUの動作モードをネイティブモードま
たはエミュレーションモードに切り換え、割込み処理を
実行する。
At this time, the operation mode designation circuit 12 outputs the decoder switching signal 40 to the CPU 3, and also outputs the CPU designation signal 14 to the CPU 3 in accordance with the operation mode designation signal 15 input according to the level of the external terminal 11. CPU
3 is a decoder switching signal 40 and a CPU designation signal 1
4, the operating mode of the CPU is switched to native mode or emulation mode, and interrupt processing is executed.

CPU3は、割込み処理からの復帰命令実行時に、割込
み処理実行前の動作モードに復帰し、命令処理を続行す
る。
When executing a return instruction from interrupt processing, the CPU 3 returns to the operating mode before execution of the interrupt processing and continues the instruction processing.

CPU3は、デコーダ切り換え信号40が出力されてい
る間のみ、CPU指定信号14にしたがって、命令デコ
ーダを切り換えるものとする。
It is assumed that the CPU 3 switches the instruction decoder according to the CPU designation signal 14 only while the decoder switching signal 40 is being output.

すなわち、デコーダ切換え信号40=1.CPU指定信
号14=1の時、サブデコーダ5にて処理を行ない、デ
コーダ切換え信号40=1.CPU指定信号14=0の
時は、メインデコーダ4にて処理を行なう。
That is, decoder switching signal 40=1. When the CPU designation signal 14=1, processing is performed in the sub-decoder 5, and the decoder switching signal 40=1. When the CPU designation signal 14=0, the main decoder 4 performs processing.

次に、動作モード指定回路12について第2図を使用し
て説明する。
Next, the operation mode designation circuit 12 will be explained using FIG. 2.

まず、構成要素を説明する。First, the constituent elements will be explained.

バッファ18は、シュミットタイプのバッファであり、
動作モード指定信号15を増幅後、ANDゲート16に
出力する。1ビツトのフラグ17は、割込み処理受は付
は信号8でセットし、割込み処理終了信号13でリセッ
トするフラグであり、ANDゲート16に格納値を出力
するとともに、デコーダ切り換え信号40をCPU3に
出力する。
The buffer 18 is a Schmidt type buffer,
After amplifying the operation mode designation signal 15, it is output to an AND gate 16. The 1-bit flag 17 is a flag that is set by the signal 8 when interrupt processing is accepted and reset by the interrupt processing end signal 13, and outputs the stored value to the AND gate 16 and outputs the decoder switching signal 40 to the CPU 3. do.

ANDゲート16は、フラグ17及びバッファ18の出
力を入力とする2人力ANDゲートであり、CPU指定
信号14を出力する。
The AND gate 16 is a two-man power AND gate that receives the flag 17 and the output of the buffer 18, and outputs the CPU designation signal 14.

上記構成要素を用いて、以下に割込み処理動作を説明す
る。
The interrupt processing operation will be explained below using the above components.

CPU3が、割込み処理受は付は信号8を出力するとフ
ラグ17がセットされるとともに、デコーダ切り換え信
号40をCPU3に出力する。
When the CPU 3 outputs the interrupt processing acceptance signal 8, the flag 17 is set and the decoder switching signal 40 is output to the CPU 3.

この時、動作モード指定信号15は、バッファ18によ
り増幅後、ANDゲート16に出力される。
At this time, the operation mode designation signal 15 is amplified by the buffer 18 and then output to the AND gate 16.

ANDゲート16はフラグ17の出力が1のため、バッ
ファ18の出力をそのままCPU指定信号14としてC
PU3に出力する。
Since the output of the flag 17 is 1, the AND gate 16 directly uses the output of the buffer 18 as the CPU designation signal 14.
Output to PU3.

従って、CPU3はデコーダ切り換え信号40が出力さ
れているため、外部端子11の入力レベルに従って、エ
ミュレーションモードもしくはネイティブモードにて割
込み処理を実行する。
Therefore, since the decoder switching signal 40 is output to the CPU 3, the CPU 3 executes interrupt processing in emulation mode or native mode according to the input level of the external terminal 11.

すなわち、外部端子11=oの時動作モード指定信号1
5=0となるためネイティブモードにて実行し、外部端
子11=1の時動作モード指定信号15=1となるため
エミュレーションモードにて実行する。
That is, when external terminal 11=o, operation mode designation signal 1
Since 5=0, execution is performed in native mode, and when external terminal 11=1, operation mode designation signal 15=1, execution is performed in emulation mode.

CPU3は、割込み処理からの復帰命令実行時に、割込
み処理終了信号13を動作モード指定回路12に出力し
、フラグ17をリセットすることによりデコーダ切り換
え信号40=Oとした後、割込み要求処理実行前の動作
モードに復帰し、命令処理を続行することとなる。
When executing the return instruction from interrupt processing, the CPU 3 outputs the interrupt processing end signal 13 to the operation mode designation circuit 12, resets the flag 17 to set the decoder switching signal 40 to O, and then outputs the interrupt processing end signal 13 to the operation mode designation circuit 12, and then sets the decoder switching signal 40 to O by resetting the flag 17. It will return to the operating mode and continue processing instructions.

上述したように、第1の実施例に係わるシングルチップ
マイクロコンピュータにおいては、簡単な構成から成る
動作モード指定回路を付加することにより、割込み処理
を行なうCPUを指定可能であり、外部端子をハイにす
ることにより、エミュレーションCPUの命令で記述し
た割込み処環プログラムをそのまま使用可能である。
As described above, in the single-chip microcomputer according to the first embodiment, by adding an operation mode designation circuit consisting of a simple configuration, it is possible to designate the CPU that performs interrupt processing, and by setting the external terminal to high. By doing so, it is possible to use an interrupt processing program written using emulation CPU instructions as is.

従って、蓄積したソフトウェアをそのまま使用できるた
め、エミュレーションモード内蔵の効果が向上する。
Therefore, the accumulated software can be used as is, which improves the effectiveness of the built-in emulation mode.

また、割込み処理にネイティブCPUのプログラムを用
いたい場合でも、外部端子をロウとすることによりネイ
ティブモードのCPUで処理することが可能であり、フ
レキシブルな構成が実現できる。
Further, even if it is desired to use a native CPU program for interrupt processing, by setting the external terminal to low, the processing can be performed by the native mode CPU, and a flexible configuration can be realized.

上記第1の実施例においては、エミュレーション可能な
CPUを1個として説明したが、複数の場合も同様に考
えることが可能である。
Although the first embodiment has been described assuming that there is one CPU that can be emulated, it is also possible to consider a case where there is a plurality of CPUs.

次に本発明に係わるシングルチップマイクロコンピュー
タの第2の実施例について、第3図を用いて説明する。
Next, a second embodiment of the single-chip microcomputer according to the present invention will be described with reference to FIG.

第3図は本発明における第2の実施例のシングルチップ
マイクロコンピュータのブロック図である。
FIG. 3 is a block diagram of a single-chip microcomputer according to a second embodiment of the present invention.

本発明に係わる第2の実施例のシングルチップマイクロ
コンピュータにおいては、割込み処理を行なうCPUの
指定を外部端子の入力レベルではなく、ネイティブモー
ドのCPUの命令によって行なう点で、第1の実施例に
係わるシングルチップマイコンと異なる。以下、第3図
を用いて説明する。本実施例においては、エミュレーシ
ョン可能なCPUは1個として説明する。
The single-chip microcomputer according to the second embodiment of the present invention differs from the first embodiment in that the CPU that performs interrupt processing is specified not by the input level of the external terminal but by the instructions of the CPU in native mode. This is different from the single-chip microcontroller involved. This will be explained below using FIG. In this embodiment, the number of CPUs that can be emulated is one.

第3図に示す第2の実施例のシングルチップマイクロコ
ンピュータは、割込み処理時のCPUの動作モードを指
定する機能を従来のシングルチップマイコンに付加した
構成である。
The single-chip microcomputer of the second embodiment shown in FIG. 3 has a configuration in which a function for specifying the operating mode of the CPU during interrupt processing is added to a conventional single-chip microcomputer.

CPU3は、セット命令実行時にセット信号20を動作
モード指定回路32に出力し、リセット命令実行時にリ
セット信号21を動作モード指定回路32に出力する。
The CPU 3 outputs a set signal 20 to the operation mode designation circuit 32 when executing a set command, and outputs a reset signal 21 to the operation mode designation circuit 32 when executing a reset command.

CPU3は、割込み処理からの復帰命令(例えば、RE
TI命令)実行終了時にクリア信号13を、動作モード
指定回路32に出力する。
The CPU 3 issues a return instruction (for example, RE
When the execution of the TI instruction is completed, a clear signal 13 is output to the operation mode designation circuit 32.

動作モード指定回路32は、割込み処理時にデコーダ切
り換え信号40を出力すると共にCPU指定信号14を
CPU3に出力し、割込み処理時のCPUの動作モード
を指定する。
The operation mode designation circuit 32 outputs a decoder switching signal 40 during interrupt processing and also outputs a CPU designation signal 14 to the CPU 3 to designate the operating mode of the CPU during interrupt processing.

以下、割込み処理動作を説明する。The interrupt processing operation will be explained below.

割込み処理要求が発生すると、割込み制御回路2は割込
み処理要求信号7をCPU3に出力する。
When an interrupt processing request occurs, the interrupt control circuit 2 outputs an interrupt processing request signal 7 to the CPU 3.

CPU3は、命令実行の最終タイミングで割込み処理要
求を受は付け、割込み処理受は付は信号8を割込み制御
回路2及び動作モード指定回路32に出力する。
The CPU 3 accepts the interrupt processing request at the final timing of instruction execution, and outputs a signal 8 to the interrupt control circuit 2 and the operation mode designation circuit 32 in response to the interrupt processing request.

動作モード指定回路32は、デコーダ切り換え信号40
及びCPU指定信号14をCPU3に出力する。CPU
3は、デコーダ切換え信号40及びCPU指定信号14
に従って、デコーダ切換え信号40=1.CPU指定信
号14=0の時ネイティブモードにて、またデコーダ切
換え信号40=1.CPU指定信号14=1の時エミュ
レーションモードにて割込み処理を実行する。
The operation mode designation circuit 32 receives a decoder switching signal 40
and outputs a CPU designation signal 14 to the CPU 3. CPU
3 is a decoder switching signal 40 and a CPU designation signal 14
Accordingly, decoder switching signal 40=1. In native mode when CPU designation signal 14 = 0, and when decoder switching signal 40 = 1. When CPU designation signal 14=1, interrupt processing is executed in emulation mode.

CPU3は、割込み処理からの復帰命令(例えばRET
I命令)実行時に割込み処理終了信号13を動作モード
指定回路32に出力後、割込み処理実行前の動作モード
に復帰し、命令処理を続行する。
The CPU 3 issues a return command (for example, RET) from interrupt processing.
After outputting the interrupt processing end signal 13 to the operation mode specifying circuit 32 when executing the I instruction, the operation mode returns to the operation mode before execution of the interrupt processing and continues the instruction processing.

CPU3は、デコーダ切り換え信号4ρが出力されてい
る間のみCPU指定信号14にしたがって、命令デコー
ダを切り換えるものとする。
It is assumed that the CPU 3 switches the instruction decoder according to the CPU designation signal 14 only while the decoder switching signal 4ρ is being output.

次に、動作モード指定回路32について第4図を使用し
て説明する。
Next, the operation mode designation circuit 32 will be explained using FIG. 4.

まず、構成要素を説明する。First, the constituent elements will be explained.

フラグ22は、セット信号20によりセット、リセット
信号21によりリセットする1ビットフラグであり、格
納値をANDゲー)16に出力する。1ビツトのフラグ
17は、割込み処理受は付は信号8でセット、割込み処
理終了信号でリセットするフラグであり、ANDゲート
16に格納値を出力するとともに、デコーダ切り換え信
号40としてCPU3に格納値を出力する。
The flag 22 is a 1-bit flag that is set by the set signal 20 and reset by the reset signal 21, and outputs the stored value to the AND game 16. The 1-bit flag 17 is a flag that is set by the signal 8 when interrupt processing is accepted and reset by the interrupt processing completion signal, and outputs the stored value to the AND gate 16 and also outputs the stored value to the CPU 3 as the decoder switching signal 40. Output.

ANDゲート16は、フラグ17及びフラグ22の出力
を入力とする2人力ANDゲートであり、CPU指定信
号14を出力する。
The AND gate 16 is a two-man power AND gate that receives the outputs of the flag 17 and the flag 22, and outputs the CPU designation signal 14.

上記構成要素を用いて、以下に割込み処理動作を説明す
る。
The interrupt processing operation will be explained below using the above components.

CPU3が、割込み処理受は付は信号8を出力するとフ
ラグ17がセットされるとともに、CPU3に対しデコ
ーダ切り換え信号40を出力する。
When the CPU 3 outputs the interrupt processing acceptance signal 8, a flag 17 is set and a decoder switching signal 40 is output to the CPU 3.

この時、フラグ22の格納値はAND’y’ −ト16
に出力される。ANDゲート16はフラグ17の出力が
1のため、フラグ22の出力をそのままCPU指定信号
14としてCPU3に出力する。
At this time, the stored value of flag 22 is AND'y'-to16
is output to. Since the output of the flag 17 is 1, the AND gate 16 outputs the output of the flag 22 as it is to the CPU 3 as the CPU designation signal 14.

従って、CPU3はデコーダ切り換え信号40が出力さ
れているため、フラグ22の格納値に従って動作CPU
を切り換える。
Therefore, since the decoder switching signal 40 is output to the CPU 3, the CPU 3 operates according to the stored value of the flag 22.
Switch.

例えば、前もってネイティブモードにおいてセット命令
の実行によりフラグ22がセットされているとエミュレ
ーションモードで動作し、リセット命令の実行によりフ
ラグ22がリセットされているとネイティブモードで動
作する。
For example, if the flag 22 has been previously set by executing a set instruction in native mode, it will operate in emulation mode, and if the flag 22 has been reset by executing a reset instruction, it will operate in native mode.

つまり、割込み処理をどちらのCPU動作モードにて実
行するか前記特殊命令の実行により簡単に設定できる。
In other words, it is possible to easily set in which CPU operation mode interrupt processing is to be executed by executing the special instruction.

従って、割込み処理プログラムとしてエミュレーション
CPU用に作成済みのプログラムを使用したい場合は、
前もってネイティブモードにてセット命令を実行してお
くだけで簡単に設定できる。
Therefore, if you want to use a program already created for the emulation CPU as an interrupt processing program,
Settings can be easily made by simply executing a set command in native mode in advance.

また、割込み処理プログラムとしてネイティブCPU用
に新規作成したプログラムを用いる場合も、前もってネ
イティブモードにてリセット命令を実行しておけば良い
。
Furthermore, when using a newly created program for a native CPU as an interrupt processing program, it is sufficient to execute a reset instruction in the native mode in advance.

CPU3は、割込み処理からの復帰命令実行時に割込み
処理終了信号13を動作モード指定回路32に出力し、
フラグ17をリセットしてデコーダ切り換え信号40を
オフした後、割込み処理実行前の動作モードに復帰し、
命令処理を続行する。
The CPU 3 outputs the interrupt processing end signal 13 to the operation mode designation circuit 32 when executing the return instruction from the interrupt processing,
After resetting the flag 17 and turning off the decoder switching signal 40, the operation mode returns to the one before execution of the interrupt processing,
Continue instruction processing.

上述したように、第2の実施例に係わるシングルチップ
マイクロコンピュータにおいては、簡単な構成から成る
動作モード指定回路を付加することにより、CPUの動
作モード指定用に外部端子を用いることなく、ネイティ
ブCPUの命令により割込み処理を行なうCPUモード
を指定可能であり、エミュレーションCPUの命令で記
述した割込み処理プログラムをそのまま使用可能である
。
As described above, in the single-chip microcomputer according to the second embodiment, by adding an operation mode designation circuit having a simple configuration, the native CPU can be used without using external terminals for designating the CPU operation mode. The CPU mode in which interrupt processing is to be performed can be specified by the instruction, and an interrupt processing program written using emulation CPU instructions can be used as is.

従って、蓄積したソフトウェアをそのまま使用できるた
め、エミュレーションモード内蔵の効果が向上する。
Therefore, the accumulated software can be used as is, which improves the effectiveness of the built-in emulation mode.

また、割込み処理をネイティブモードのCPUで行なう
ことも可能であり、フレキシブルな構成が実現できる。
Furthermore, interrupt processing can be performed by a native mode CPU, and a flexible configuration can be realized.

上記第2の実施例においては、エミュレーション可能な
CPUを1個として説明したが、複数の場合も上記動作
モード指定回路の構成を拡張することにより簡単に対応
可能である。
Although the second embodiment has been described assuming that there is one CPU that can be emulated, a plurality of CPUs can be easily supported by expanding the configuration of the operation mode designation circuit.

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

以上説明したように本発明においては、簡単な構成から
成る動作モード指定回路を内蔵することにより、割込み
処理を行なうCPUを指定可能であり、従来ネイティブ
モードに固定されていたために使用できなかったエミュ
レーションCPUに対し作成済みの割込み処理プログラ
ムをそのまま使用可能であり、ネイティブモードCPU
の命令を用いて新たに割込み処理プログラムを作成する
工数を削減可能である。さらに、プログラムの検査も行
なう必要がなくなるため、効果は非常に大きい。
As explained above, in the present invention, by incorporating an operation mode designation circuit with a simple configuration, it is possible to designate the CPU that performs interrupt processing, and emulation that could not be used because the CPU was conventionally fixed to native mode. Interrupt processing programs that have already been created for the CPU can be used as is, and native mode CPUs
It is possible to reduce the number of man-hours required to create a new interrupt processing program using these instructions. Furthermore, there is no need to check the program, which is very effective.

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

第1図は本発明の第1の実施例におけるシングルチップ
マイクロコンピュータのブロック図、第2図は第1の実
施例における動作モード指定回路のブロック図、第3図
は第2の実施例におけるシングルチップマイクロコンピ
ュータのブロック図、第4図は第2の実施例における動
作モード指定回路のブロック図、第5図は従来のシング
ルチップマイクロコンピュータのブロック図であるケト
・・・・・シングルチップマイコン、2・・・・・・割
込み制御回路、3・・・・・・CPU、4・・・・・・
メインデコーダ、5・・・・・・サブデコーダ、6・・
・・・・内部バス、7・・・・・・割込み処理要求信号
、8・・・・・・割込み処理受は付は信号、9・・・・
・・メモリ部、10・・・・・・周辺部、11・・・・
・・外部端子、12.32・・・・・・動作モード指定
回路、13・・・・・・割込み処理終了信号、14・・
・・・・CPU指定信号、15・・・・・・動作モード
指定信号、20・・・・・・セット信号、 1・・・・・・クリア信号、 0・・・・・・デ コーダ切り換え信号。
FIG. 1 is a block diagram of a single-chip microcomputer in the first embodiment of the present invention, FIG. 2 is a block diagram of an operation mode designation circuit in the first embodiment, and FIG. 3 is a block diagram of a single-chip microcomputer in the second embodiment. A block diagram of a chip microcomputer, FIG. 4 is a block diagram of an operation mode designation circuit in the second embodiment, and FIG. 5 is a block diagram of a conventional single-chip microcomputer. 2...Interrupt control circuit, 3...CPU, 4...
Main decoder, 5...Sub decoder, 6...
...Internal bus, 7...Interrupt processing request signal, 8...Interrupt processing acceptance signal, 9...
...Memory section, 10...Peripheral section, 11...
...External terminal, 12.32...Operating mode designation circuit, 13...Interrupt processing end signal, 14...
...CPU designation signal, 15 ...Operating mode designation signal, 20 ...Set signal, 1 ...Clear signal, 0 ...Decoder switching signal .

Claims (2)

【特許請求の範囲】[Claims] (1)単一半導体基盤上にコンピュータ機能を集積し、
中央処理装置のエミュレーション機能を内蔵したシング
ルチップマイクロコンピュータにおいて、割込み処理中
にオンする1ビットフラグを内蔵し外部端子からの入力
信号に応じて前記中央処理装置の動作モードを指定する
動作モード指定回路を内蔵し、前記動作モード指定回路
によって割込み処理時の前記中央処理装置の動作モード
を指定することを特徴とするシングルチップマイクロコ
ンピュータ。
(1) Integrating computer functions on a single semiconductor substrate,
In a single-chip microcomputer with a built-in central processing unit emulation function, an operation mode designation circuit includes a 1-bit flag that is turned on during interrupt processing and designates the operation mode of the central processing unit according to an input signal from an external terminal. 1. A single-chip microcomputer, characterized in that the operation mode designation circuit specifies an operation mode of the central processing unit during interrupt processing.
(2)単一半導体基盤上にコンピュータ機能を集積し、
中央処理装置のエミュレーション機能を内蔵したシング
ルチップマイクロコンピュータにおいて、割込み処理中
にオンする1ビットフラグと前記中央処理装置の命令に
よって操作する前記中央処理装置の動作モード指定用フ
ラグから構成する動作モード指定回路を内蔵し、前記動
作モード指定回路により割込み処理時の前記中央処理装
置の動作モードを指定することを特徴とするシングルチ
ップマイクロコンピュータ。
(2) Integrating computer functions on a single semiconductor substrate,
In a single-chip microcomputer with a built-in emulation function for a central processing unit, an operation mode designation consisting of a 1-bit flag that is turned on during interrupt processing and a flag for specifying the operation mode of the central processing unit that is operated by instructions from the central processing unit. 1. A single-chip microcomputer comprising a built-in circuit, the operation mode designation circuit designating an operation mode of the central processing unit during interrupt processing.
JP64000669A 1989-01-04 1989-01-04 Single chip microcomputer Pending JPH02181282A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP64000669A JPH02181282A (en) 1989-01-04 1989-01-04 Single chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP64000669A JPH02181282A (en) 1989-01-04 1989-01-04 Single chip microcomputer

Publications (1)

Publication Number Publication Date
JPH02181282A true JPH02181282A (en) 1990-07-16

Family

ID=11480152

Family Applications (1)

Application Number Title Priority Date Filing Date
JP64000669A Pending JPH02181282A (en) 1989-01-04 1989-01-04 Single chip microcomputer

Country Status (1)

Country Link
JP (1) JPH02181282A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6785886B1 (en) 1998-05-15 2004-08-31 Vmware, Inc. Deferred shadowing of segment descriptors in a virtual machine monitor for a segmented computer architecture
US7516453B1 (en) 1998-10-26 2009-04-07 Vmware, Inc. Binary translator with precise exception synchronization mechanism
US8631066B2 (en) 1998-09-10 2014-01-14 Vmware, Inc. Mechanism for providing virtual machines for use by multiple users

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6785886B1 (en) 1998-05-15 2004-08-31 Vmware, Inc. Deferred shadowing of segment descriptors in a virtual machine monitor for a segmented computer architecture
US8631066B2 (en) 1998-09-10 2014-01-14 Vmware, Inc. Mechanism for providing virtual machines for use by multiple users
US9323550B2 (en) 1998-09-10 2016-04-26 Vmware, Inc. Mechanism for providing virtual machines for use by multiple users
US7516453B1 (en) 1998-10-26 2009-04-07 Vmware, Inc. Binary translator with precise exception synchronization mechanism

Similar Documents

Publication Publication Date Title
US4924382A (en) Debugging microprocessor capable of switching between emulation and monitor without accessing stack area
US6728856B2 (en) Modified Harvard architecture processor having program memory space mapped to data memory space
KR100272937B1 (en) Microprocessor and multiprocessor system
KR20010043826A (en) Microcontroller instruction set
KR20010080349A (en) Processing arrangements
US7996651B2 (en) Enhanced microprocessor or microcontroller
US4095268A (en) System for stopping and restarting the operation of a data processor
JP2974577B2 (en) Computer system
US7966480B2 (en) Register pointer trap to prevent errors due to an invalid pointer value in a register
US7398383B2 (en) Method and system for using internal FIFO RAM to improve system boot times
JPH0232659B2 (en)
US7243372B2 (en) Modified Harvard architecture processor having data memory space mapped to program memory space with erroneous execution protection
JPH03171231A (en) Micro computer system
US7020788B2 (en) Reduced power option
EP0575171A2 (en) Enhanced system management method and apparatus
JP3027984B2 (en) Single chip microcomputer
JP2826309B2 (en) Information processing device
JP3215344B2 (en) Processor and its bug avoidance method
US20020004877A1 (en) Method and system for updating user memory in emulator systems
JP2003162411A (en) Data processor
JPS5965356A (en) Single-chip microcomputer
JPS6272033A (en) Instruction decoding circuit
JP2002063030A (en) Microcontroller
JPS6230452B2 (en)
CN110858254A (en) a security chip