JP2002157115A - Data processor - Google Patents

Data processor

Info

Publication number
JP2002157115A
JP2002157115A JP2000357619A JP2000357619A JP2002157115A JP 2002157115 A JP2002157115 A JP 2002157115A JP 2000357619 A JP2000357619 A JP 2000357619A JP 2000357619 A JP2000357619 A JP 2000357619A JP 2002157115 A JP2002157115 A JP 2002157115A
Authority
JP
Japan
Prior art keywords
instruction
register
general
read
return
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.)
Granted
Application number
JP2000357619A
Other languages
Japanese (ja)
Other versions
JP3786575B2 (en
JP2002157115A5 (en
Inventor
Naomiki Mitsuishi
直幹 三ツ石
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2000357619A priority Critical patent/JP3786575B2/en
Publication of JP2002157115A publication Critical patent/JP2002157115A/en
Publication of JP2002157115A5 publication Critical patent/JP2002157115A5/ja
Application granted granted Critical
Publication of JP3786575B2 publication Critical patent/JP3786575B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a means of improving the usability of a data processor such as a microcomputer, reducing program capacity, and cutting down the number of execution states, while minimizing an increase in its logical scale. SOLUTION: In this data processor, a return command from a sub-routine, or from exception handling, has a command code including information for assigning a plurality of general-purpose registers. When the command code is executed, the assigned registers are returned in addition to the resetting of a program counter. Further, the combination of assigned registers is made to be serial. An evacuation command allowing similar assignment is enabled for the registers.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、データ処理装置に
関し、特に、半導体集積回路装置によって構成されるマ
イクロコンピュータにかかり、これらの中央処理装置
(CPU)など、及びこれらを用いたデータ処理システ
ム、更に、この開発装置に利用して有効な技術に関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing apparatus, and more particularly to a microcomputer including a semiconductor integrated circuit device, a central processing unit (CPU), and a data processing system using the same. Further, the present invention relates to a technology effective for use in the development device.

【0002】[0002]

【従来の技術】半導体集積回路装置の製造技術の高度化
に伴って、半導体単結晶からなるシングルチップに、中
央演算処理装置(Central Processin
g Unit;以下、単にCPUと称する)、プログラ
ムを格納するROM(ReadOnly Memor
y)、書き替え可能に各種データを格納するRAM(R
andom Access Memory)等を含む構
成素子を集積して製造した、マイクロコンピュータが広
範囲に普及してきており、種々の目的のデータ処理装置
として使用されてきている。このマイクロコンピュータ
は、CPUが同時に処理し得る情報の量によって性能が
異なり、例えば4ビット、8ビット、16ビット、32
ビット等のマイクロコンピュータとして区分されてい
る。
2. Description of the Related Art With the advancement of manufacturing technology of semiconductor integrated circuit devices, a central processing unit (Central Processing Unit) is mounted on a single chip made of a semiconductor single crystal.
g Unit; hereinafter, simply referred to as CPU), ROM (Read Only Memory) for storing programs
y), a RAM (R
2. Description of the Related Art Microcomputers, which are manufactured by integrating constituent elements including an Random Access Memory, etc., have become widespread and have been used as data processing apparatuses for various purposes. The performance of this microcomputer varies depending on the amount of information that can be simultaneously processed by the CPU.
Bits are classified as microcomputers.

【0003】このようなマイクロコンピュータは、アド
レス空間の拡張や、命令セットの拡大、高速化等が図ら
れてきている。また、CPUは、ソフトウェアによって
その性能が定義されているから、前記のようにアドレス
空間の拡張や、命令セットの拡大、高速化等を図ったマ
イクロコンピュータにおいても、既存のマイクロコンピ
ュータのソフトウェア資産を有効に利用できることが望
ましい。
In such a microcomputer, an address space is expanded, an instruction set is expanded, a speed is increased, and the like. Further, since the performance of the CPU is defined by software, even in a microcomputer in which the address space is expanded, the instruction set is expanded, and the speed is increased as described above, the software resources of the existing microcomputer are used. It is desirable that it can be used effectively.

【0004】このため、オブジェクトレベルで互換性を
保ちつつ、アドレス空間の拡張や、命令セットの拡大、
高速化等を実現した例として、例えば本発明者が先に提
案した特開平6−51981号公報がある。これは16
ビット単位の可変長命令で、いわゆる汎用レジスタ型、
或いはロードストア型アーキテクチャを採用することが
示されている。
For this reason, while maintaining compatibility at the object level, expansion of the address space, expansion of the instruction set,
For example, Japanese Patent Application Laid-Open No. 6-51981 previously proposed by the inventor of the present invention has realized an example in which the speed is increased. This is 16
A variable-length instruction in bit units, a so-called general-purpose register type.
Alternatively, it is shown that a load store type architecture is adopted.

【0005】プログラム用のメモリであるROMを内蔵
した、シングルチップ型のものにあっては、内蔵ROM
の容量が、外部にメモリを接続するのに比較して、少な
いから、プログラム容量を削減することが望ましい。
In the case of a single-chip type having a built-in ROM serving as a program memory, a built-in ROM
Is smaller than when a memory is connected externally, it is desirable to reduce the program capacity.

【0006】16ビット単位の可変長命令を採用した場
合、オペレーションコードのみを持ち、実効アドレスの
指定を行わず、かつ有意味な命令として、復帰(RTS
/RTE)命令がある。かかる復帰命令を16ビット単
位の命令に割当てる場合、16ビットの命令コードの全
てのビットが利用されていない場合が多い。
When a 16-bit variable length instruction is employed, the return (RTS) is used as a meaningful instruction that has only an operation code and does not specify an effective address.
/ RTE) instruction. When such a return instruction is assigned to a 16-bit instruction, all bits of the 16-bit instruction code are often not used.

【0007】例えば、命令コードH’5470がサブル
ーチンからの復帰命令であって、H’5471、H’5
472、H’5473が未定義(他の命令として定義さ
れていない)とされているような場合、ビット0、ビッ
ト1は利用されていない。
For example, an instruction code H'5470 is a return instruction from a subroutine, and H'5471, H'5
In the case where 472 and H'5473 are undefined (not defined as another instruction), bit 0 and bit 1 are not used.

【0008】一方、本発明者らが先に提案した特開平8
−263290号公報に記載のCPUは、命令を実行す
る実行手段を制御する制御手段に指定可能な複数の汎用
レジスタの組合せを固定にし、複数の汎用レジスタのス
タックに対する退避/復帰命令を有し、複数の汎用レジ
スタを順次待避/復帰するようにしている。汎用レジス
タの組合せを固定にすることによって、汎用レジスタの
指定に要するビット数を節約できる。
On the other hand, Japanese Patent Laid-Open No.
The CPU described in JP-263290A fixes a combination of a plurality of general-purpose registers that can be specified to a control unit that controls an execution unit that executes an instruction, and has a save / restore instruction for a stack of a plurality of general-purpose registers. A plurality of general-purpose registers are sequentially saved / restored. By fixing the combination of general-purpose registers, the number of bits required for specifying the general-purpose registers can be saved.

【0009】かかる退避/復帰命令は、サブルーチンや
例外処理などの、処理の切れ目で、それ以前の処理の状
態を保存する目的に用いられ、アドレッシングモード
は、スタックポインタのプリデクリメント(待避)/ポ
ストインクリメント(復帰)にが使用できる。
The save / restore instruction is used for the purpose of preserving the state of previous processing at a break in processing such as a subroutine or exception processing, and the addressing mode is used for pre-decrement (save) / post of the stack pointer. Can be used for increment (return).

【0010】つまり、かかる汎用レジスタの復帰命令
は、前記サブルーチンまたは例外処理からの復帰命令
(RTS/RTE)の前に置かれることが多い。
That is, the return instruction of the general-purpose register is often placed before the return instruction (RTS / RTE) from the subroutine or the exception processing.

【0011】いわゆるアキュムレータ型アーキテクチャ
のCPUにおいては、サブルーチンへの分岐/サブルー
チンからの復帰時に、PCに加えて、アキュムレータの
退避/復帰を行う場合がある。これは、データの処理が
少数のアキュムレータ上で行われ、サブルーチンのよう
に処理が変わるときには、アキュムレータを空ける必要
があるためである。換言すれば、アキュムレータを自動
的に退避/復帰を行っても、無駄にならないからであ
る。
In a CPU having a so-called accumulator type architecture, when branching to a subroutine or returning from a subroutine, the accumulator may be saved / restored in addition to the PC. This is because data processing is performed on a small number of accumulators, and when processing changes as in a subroutine, the accumulator must be opened. In other words, automatically saving / restoring the accumulator will not be wasted.

【0012】これに対して、汎用レジスタ型アーキテク
チャのCPUにおいては、汎用レジスタのいずれにデー
タを置くかについて、自由度が高く、また、サブルーチ
ンへの分岐/サブルーチンからの復帰時の引数が、汎用
レジスタに割当てられる場合もある。このため、所定の
(全部または一部の)汎用レジスタの退避/復帰を自動
的に行うと、無駄になりやすい。不所望の汎用レジスタ
の退避/復帰によって、実行ステート数や、スタックの
使用量が増加してしまうからである。
On the other hand, a general-purpose register-type architecture CPU has a high degree of freedom as to which of the general-purpose registers data is to be stored, and the argument at the time of branching to the subroutine / returning from the subroutine is general-purpose. It may be assigned to a register. For this reason, if saving / restoring of a predetermined (all or a part) general-purpose register is automatically performed, it tends to be useless. This is because the number of execution states and the amount of stack usage increase due to the undesired saving / restoring of general-purpose registers.

【0013】マイクロコンピュータのプログラムはC言
語で記述されることが多くなっている。C言語で多く用
いられる関数は、サブルーチンとして実現される。
Microcomputer programs are often described in C language. Functions frequently used in the C language are implemented as subroutines.

【0014】[0014]

【発明が解決しようとする課題】本発明が解決しようと
する問題点は、マイクロコンピュータなどのデータ処理
装置、その論理的規模の増加を最小限にしつつ、使い勝
手を向上し、プログラム容量を縮小したり、実行ステー
ト数を短縮したりする手段を提供することにある。
The problem to be solved by the present invention is to improve the usability and reduce the program capacity while minimizing the increase in the logical scale of a data processing device such as a microcomputer. And means for reducing the number of execution states.

【0015】特に、C言語などを使用したプログラムに
おいて、関数を多用した場合のプログラム容量の縮小、
実行ステート数の短縮を図ることである。
Particularly, in a program using the C language or the like, the program capacity can be reduced when many functions are used.
The purpose is to reduce the number of execution states.

【0016】また、既存のソフトウェア資産を有効に利
用可能にし、使用者の開発効率を向上するとともに、開
発装置を共通に利用可能にし、開発装置の開発効率を向
上するとともに、いち速く開発環境を提供可能にするこ
とである。
In addition, the existing software resources can be effectively used, the development efficiency of the user can be improved, and the development equipment can be commonly used to improve the development efficiency of the development equipment. It is possible to provide.

【0017】本発明の前記ならびにそのほかの目的と新
規な特長は、本発明書の記述及び添付図面から明らかに
なるであろう。
The above and other objects and novel features of the present invention will become apparent from the description of the present invention and the accompanying drawings.

【0018】[0018]

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

【0019】本発明のデータ処理装置は、サブルーチン
から、または例外処理からの復帰命令において、当該命
令コードに複数の汎用レジスタを指定する情報を含み、
当該命令コードの実行時に、プログラムカウンタの復帰
に加えて、前記指定した汎用レジスタの復帰を行うよう
にする。
According to the data processing device of the present invention, in a return instruction from a subroutine or from exception processing, the instruction code includes information designating a plurality of general-purpose registers,
When the instruction code is executed, the designated general-purpose register is restored in addition to the program counter.

【0020】更に、指定する汎用レジスタの組合せを連
続したものにする。
Further, the combination of designated general-purpose registers is made continuous.

【0021】同様の指定を可能にした、汎用レジスタの
退避命令を実行可能にする。
It is possible to execute a general-purpose register save instruction which enables the same designation.

【0022】上記した手段によれば、サブルーチンか
ら、または例外処理からの復帰命令と、汎用レジスタの
復帰命令を同一の命令(例えば16ビット)とすること
により、使い勝手を向上し、プログラム容量を短縮でき
る。
According to the above-described means, the return instruction from the subroutine or from the exception processing and the return instruction of the general-purpose register are the same instruction (for example, 16 bits), so that the usability is improved and the program capacity is reduced. it can.

【0023】16ビット単位の可変長の命令コード体系
を採る場合にも、命令プリフェッチや命令デコードを簡
易にしつつ、命令コードを有効に利用して、全体的なプ
ログラム効率を向上できる。
Even in the case of using a variable-length instruction code system in 16-bit units, the overall program efficiency can be improved by effectively using instruction codes while simplifying instruction prefetching and instruction decoding.

【0024】同様の指定を可能にした、汎用レジスタの
退避命令を持ち、これをサブルーチン乃至例外処理ルー
チンの先頭で実行し、最後に、本発明の復帰命令を実行
することによって、より一層の使い勝手を向上できる。
A general-purpose register save instruction enabling the same designation is executed at the beginning of a subroutine or an exception handling routine, and finally, the return instruction of the present invention is executed, thereby further improving usability. Can be improved.

【0025】指定する汎用レジスタの組合せを固定にす
ることによって、汎用レジスタを指定する情報を短くで
き、限られた命令コード(例えば16ビット)であって
も、指定可能にできる。
By fixing the combination of designated general-purpose registers, information for designating general-purpose registers can be shortened, and even a limited instruction code (for example, 16 bits) can be designated.

【0026】汎用レジスタの復帰と、プログラムカウン
タなどの復帰を連続的に行うことによって、内部の動作
を容易にし、高速化できる。
The continuous operation of the general-purpose registers and the return of the program counter and the like facilitates the internal operation and speeds up the operation.

【0027】[0027]

【発明の実施の形態】図1に、本発明の適用されたマイ
クロコンピュータのブロック図を示す。
FIG. 1 is a block diagram of a microcomputer to which the present invention is applied.

【0028】マイクロコンピュータは、シングルチップ
型であり、全体の制御を司るCPU、割込コントローラ
(INT)、CPUの処理プログラムなどを格納するメ
モリであるROM、CPUの作業領域ならびにデータの
一時記憶用及びスタック用のメモリとすることができる
RAM、タイマ、シリアルコミュニケーションインタフ
ェース(SCI)、A/D変換器、第1乃至第9入出力
ポート(IOP1〜IOP9)、クロック発振器(CP
G)の機能ブロック乃至はモジュールから構成され、公
知の半導体製造技術により1つの半導体基板上に形成さ
れる。
The microcomputer is a single-chip microcomputer, a CPU for controlling the entire system, an interrupt controller (INT), a ROM for storing a processing program of the CPU, a work area of the CPU, and a memory for temporarily storing data. And a RAM that can be used as a stack memory, a timer, a serial communication interface (SCI), an A / D converter, first to ninth input / output ports (IOP1 to IOP9), and a clock oscillator (CP).
G) is composed of functional blocks or modules, and is formed on one semiconductor substrate by a known semiconductor manufacturing technique.

【0029】かかるマイクロコンピュータは、電源端子
として、グランドレベル(Vss)、電源電圧レベル
(Vcc)、アナロググランドレベル(AVss)、ア
ナログ電源電圧レベル(AVcc)、アナログ基準電圧
(Vref)、の他専用制御端子として、リセット(R
ES)、スタンバイ(STBY)、モード制御(MD
0、MD1)、クロック入力(EXTAL、XTAL)
端子を有する。
Such a microcomputer has power supply terminals such as a ground level (Vss), a power supply voltage level (Vcc), an analog ground level (AVss), an analog power supply voltage level (AVcc), an analog reference voltage (Vref), and others. Reset (R
ES), standby (STBY), mode control (MD
0, MD1), clock input (EXTAL, XTAL)
Has terminals.

【0030】CPGの端子EXTAL、XTALに接続
される水晶発振子またはEXTAL端子に入力れる外部
クロックに基づいて生成される基準クロック(システム
クロック)に同期して、マイクロコンピュータは動作を
行う。この基準クロック1周期をステートと呼ぶ。
The microcomputer operates in synchronization with a crystal oscillator connected to the terminals EXTAL and XTAL of the CPG or a reference clock (system clock) generated based on an external clock input to the EXTAL terminal. One cycle of this reference clock is called a state.

【0031】マイクロコンピュータの機能ブロックは、
内部バスによって相互に接続さる。バスの制御を行う、
図示はされないバスコントローラを内蔵している。内部
バスはアドレスバス・データバスのほか、リード信号・
ライト信号・バスサイズ信号を含み、これらはバスコマ
ンドとしてコード化される。
The functional blocks of the microcomputer are as follows:
Interconnected by internal bus. Control the bus,
A bus controller (not shown) is incorporated. Internal buses include address buses, data buses, read signals,
Includes a write signal and a bus size signal, which are coded as bus commands.

【0032】かかる機能ブロックやモジュールは内部バ
スを介して、CPUによってリード/ライトされる。内
部バスのデータバス幅は32ビットとする。内蔵RO
M、RAMリード/ライトを1ステートでリード/ライ
ト可能とする。
These functional blocks and modules are read / written by the CPU via the internal bus. The data bus width of the internal bus is 32 bits. Built-in RO
M, RAM read / write is enabled in one state.

【0033】タイマ、SCI、A/D変換器、IOP1
〜IOP9、SYSC、INT、CPGなどが有する制
御レジスタを総称して、内部I/Oレジスタと呼ぶ。
Timer, SCI, A / D converter, IOP1
The control registers included in .about.IOP9, SYSC, INT, CPG and the like are collectively referred to as internal I / O registers.

【0034】各入出力ポートは、アドレスバス、データ
バス、バス制御信号或いはタイマ、SCI、A/D変換
器の入出力端子と兼用されている。即ち、タイマ、SC
I、A/D変換器は、それぞれ入出力信号を有し、入出
力ポートと兼用にされた端子介して、外部と入出力され
るものである。例えばIOP5、6は、タイマの入出力
端子と兼用、IOP7はSCIの入出力端子と兼用にさ
れている。アナログデータの入出力(AIN0〜AIN
7)端子は、IOP8と兼用にされている。
Each input / output port is also used as an input / output terminal of an address bus, a data bus, a bus control signal or a timer, an SCI, and an A / D converter. That is, timer, SC
The I and A / D converters have input / output signals, respectively, and are input / output to / from the outside via terminals shared with input / output ports. For example, IOPs 5 and 6 are also used as input / output terminals of the timer, and IOP 7 is also used as an input / output terminal of the SCI. Analog data input / output (AIN0-AIN
7) The terminal is also used as IOP8.

【0035】外部割込み入力は、IOP9と兼用にされ
ている。
The external interrupt input is also used for IOP9.

【0036】かかるマイクロコンピュータにリセット信
号RESが与えられると、CPUを始めとし、マイクロ
コンピュータはリセット状態になる。このリセットが解
除されると、モード制御で指定された動作モード(シン
グルチップ、外部バス拡張、内蔵ROM有効など)とさ
れ、CPUは所定のアドレス(ベクタアドレス)からス
タートアドレスをリードして、このスタートアドレスか
ら命令のリードを開始するリセット例外処理を行う。こ
の後、CPUは逐次、ROMなどから命令をリードし、
解読して、その解読内容に基づいて、フラグやビットの
判定や操作を含む、データの処理或いはRAM、タイ
マ、SCI、A/D変換器、入出力ポートなどとのデー
タ転送を行う。即ち、CPUは、タイマ、SCI、A/
D変換器、入出力ポートなどから入力されるデータ或い
は機器の状態や指示(スイッチ、ボリュームなど)を参
照しつつ、ROMなどに記憶されている命令に基づいて
処理を行い、その結果に基づいて、入出力ポート、タイ
マなどを使用しつつ、外部に信号を出力し、機器の制御
を行うものである。
When a reset signal RES is supplied to the microcomputer, the microcomputer including the CPU is reset. When this reset is released, the operation mode is set to the operation mode specified by the mode control (single chip, external bus expansion, built-in ROM enabled, etc.), and the CPU reads the start address from a predetermined address (vector address). Performs reset exception processing to start reading instructions from the start address. Thereafter, the CPU sequentially reads instructions from the ROM or the like,
Based on the decrypted contents, it performs data processing including determination and manipulation of flags and bits, or data transfer with RAM, timer, SCI, A / D converter, input / output port, and the like. That is, the CPU has a timer, SCI, A /
While referring to data input from a D converter, an input / output port, or the state or instruction (switch, volume, etc.) of the device, processing is performed based on an instruction stored in a ROM or the like, and processing is performed based on the result. , Input / output ports, timers, etc., and output signals to the outside to control devices.

【0037】割込みコントローラ(INT)は、タイ
マ、SCI、A/D変換器、外部入力の各割込み信号を
入力して、割込み要求信号をCPUに出力する。
The interrupt controller (INT) receives each interrupt signal of a timer, an SCI, an A / D converter, and an external input, and outputs an interrupt request signal to the CPU.

【0038】CPUに割込要求信号が与えられると、C
PUは実行中の処理を中断して、割込み例外処理状態を
経て、所定の処理ルーチンに分岐し、所望の処理を行
い、割込要因をクリアしたりする。所定の処理ルーチン
の最後には、通常復帰命令がおかれ、この命令を実行す
ることによって前記中断した処理を再開する。
When an interrupt request signal is given to the CPU, C
The PU interrupts the processing being executed, branches to a predetermined processing routine via an interrupt exception processing state, performs desired processing, and clears an interrupt factor. At the end of the predetermined processing routine, a normal return instruction is placed, and the interrupted processing is resumed by executing this instruction.

【0039】割込み例外処理の実行時には、後述のプロ
グラムカウンタ(PC)やコンディションコードレジス
タ(CCR)などがRAMなどに退避され、復帰命令実
行時に上記プログラムカウンタ(PC)やコンディショ
ンコードレジスタ(CCR)などが復帰される。
At the time of executing the interrupt exception processing, a program counter (PC) and a condition code register (CCR), which will be described later, are saved in a RAM or the like. When the return instruction is executed, the program counter (PC), the condition code register (CCR), etc. Is restored.

【0040】更に、割込み処理ルーチンでは所要の処理
を行うため、汎用レジスタを使用する必要がある。割込
み発生直前の状態を保存するため、割込み処理ルーチン
の先頭で、所要の汎用レジスタをスタックに退避する。
これは、例えば、 STM ER0−ER3,@−SP と記述される。割込み処理ルーチンの最後に、退避した
汎用レジスタを復帰してから、復帰命令(RTE)を実
行して、割込み発生直前のプログラムを継続する。これ
は、従来技術では、例えば、 LDM @SP+,ER0−ER3 RTE と記述される。
Furthermore, in order to perform required processing in the interrupt processing routine, it is necessary to use general-purpose registers. At the beginning of the interrupt processing routine, necessary general-purpose registers are saved on the stack in order to save the state immediately before the occurrence of the interrupt.
This is described, for example, as STM ER0-ER3, @ -SP. At the end of the interrupt processing routine, after restoring the saved general-purpose register, a return instruction (RTE) is executed to continue the program immediately before the interrupt occurred. This is described in the related art as, for example, LDM @ SP +, ER0-ER3 RTE.

【0041】本発明によれば、上記LDMとRTE命令
を1命令で実行して、 RTE/4 ER0−ER3 と記述すればよいようにする。
According to the present invention, the above LDM and RTE instructions are executed by one instruction, and may be described as RTE / 4 ER0-ER3.

【0042】同様に、サブルーチンにおいても同様に、
所要の処理を行うため、汎用レジスタを使用する。例え
ば、サブルーチンの先頭で、 STM ER0−ER1,@−SP と記述し、最後に、 LDM @SP+,ER0−ER1 RTS と記述される。
Similarly, in the subroutine,
Use general purpose registers to perform the required processing. For example, at the beginning of the subroutine, STM ER0-ER1, @ -SP is described, and finally, LDM @ SP +, ER0-ER1 RTS is described.

【0043】本発明によれば、上記LDMとRTE命令
を1命令で実行して、 RTS/2 ER0−ER1 と記述すればよいようにする。
According to the present invention, the LDM and RTE instructions are executed by one instruction, and can be described as RTS / 2 ER0-ER1.

【0044】図2に、CPUに内蔵されている汎用レジ
スタ及び制御レジスタの構成例(プログラミングモデ
ル)を示す。
FIG. 2 shows a configuration example (programming model) of general-purpose registers and control registers built in the CPU.

【0045】CPUは、32ビット長の汎用レジスタを
8本持っている。汎用レジスタは、すべて同機能を持っ
ており、アドレスレジスタとしてもデータレジスタとし
ても使用することができる。
The CPU has eight 32-bit general-purpose registers. All general-purpose registers have the same function, and can be used as both an address register and a data register.

【0046】データレジスタとしては32ビット、16
ビット及び8ビットレジスタとして使用きる。アドレス
レジスタ及び32ビットレジスタとしては、一括して汎
用レジスタER(ER0〜ER7)として使用する。1
6ビットレジスタとしては、汎用レジスタERを分割し
て汎用レジスタE(E0〜E7)、汎用レジスタR(R
0〜R7)として使用する。これらは同等の機能を持っ
ており、16ビットジスタを最大16本まで使用するこ
とができる。なお、汎用レジスタE(E0〜E7)を、
特に拡張レジスタと呼ぶ場合がある。8ビットレジスタ
としては、汎用レジスタRを分割して汎用レジスタRH
(R0H〜R7H)、汎用レジスタRL(R0L〜R7
L)として使用する。これらは同等の機能を持ってお
り、8ビットレジスタを最大16本まで使用することが
できる。各レジスタ独立に使用方法を選択することがで
きる。
As a data register, 32 bits, 16 bits
Can be used as bit and 8-bit registers. The address register and the 32-bit register are collectively used as general-purpose registers ER (ER0 to ER7). 1
As the 6-bit register, the general-purpose register ER is divided into general-purpose registers E (E0 to E7) and a general-purpose register R (R
0 to R7). These have the same function, and up to 16 16-bit registers can be used. Note that the general-purpose registers E (E0 to E7) are
Particularly, it may be called an extension register. As an 8-bit register, the general-purpose register R is divided into general-purpose registers RH.
(R0H to R7H), general-purpose register RL (R0L to R7)
L). These have equivalent functions and can use up to 16 8-bit registers. The method of use can be selected independently for each register.

【0047】汎用レジスタER7には、汎用レジスタと
しての機能に加えて、スタックポインタ(SP)として
の機能が割当てられており、例外処理やサブルーチン分
岐などで暗黙的に使用される。例外処理は前記割込み処
理を含む。
The general-purpose register ER7 is assigned a function as a stack pointer (SP) in addition to the function as the general-purpose register, and is used implicitly in exception processing and subroutine branching. The exception processing includes the interrupt processing.

【0048】PCは24ビットのカウンタで、CPUが
次に実行する命令のアドレスを示す。特に制限されない
もののCPUの命令は、すべて2バイト(ワード)を単
位としているため、最下位ビットは無効であり、命令リ
ード時には最下位ビットは0とみなされる。
PC is a 24-bit counter, which indicates the address of an instruction to be executed next by the CPU. Although not particularly limited, all instructions of the CPU are in units of 2 bytes (words), so the least significant bit is invalid, and the least significant bit is regarded as 0 when reading the instruction.

【0049】CCRは8ビットのレジスタで、割込みマ
スクビット(I)とハーフキャリ(H)、ネガティブ
(N)、ゼロ(Z)、オーバフロー(V)、キャリ
(C)の各フラグを含む。ハーフキャリ(H)、ネガテ
ィブ(N)、ゼロ(Z)、オーバフロー(V)、キャリ
(C)の各フラグは転送命令や演算命令実行時に、デー
タを検査して、その状態を反映する。ハーフキャリ
(H)は10進補正用にのみ用いられる。
The CCR is an 8-bit register and includes an interrupt mask bit (I), a half carry (H), a negative (N), a zero (Z), an overflow (V), and a carry (C) flag. Each flag of half carry (H), negative (N), zero (Z), overflow (V), and carry (C) inspects data at the time of executing a transfer instruction or an operation instruction and reflects the state. Half carry (H) is used only for decimal correction.

【0050】図3に、CPUの構成例を示す。FIG. 3 shows a configuration example of the CPU.

【0051】CPUは、制御部と、前記汎用レジスタE
R0〜ER31、プログラムカウンタPC、コンディシ
ョンコードレジスタCCRを含む実行部から構成され
る。
The CPU comprises: a control unit;
It comprises an execution unit including R0 to ER31, a program counter PC, and a condition code register CCR.

【0052】制御部は、命令レジスタIR1、命令デコ
ーダDEC、レジスタセレクタRDEC、割込受け付け
回路INTを含む。命令デコーダDECは、例えば、マ
イクロROM或PLA(Programmable L
ogic Array)または布線論理で構成される。
命令デコーダDECの出力の一部が命令デコーダDEC
にフィードバックされている。これは各命令コード内の
遷移に用いるステージコード(TMG)と、命令コード
間に用いる制御信号(MOD)を含む。即ち、前記ST
M命令の第1ワードは汎用レジスタの本数を指定する制
御信号を発生し、割込みマスク信号を出力して、割込み
の受付けを禁止する。
The control section includes an instruction register IR1, an instruction decoder DEC, a register selector RDEC, and an interrupt receiving circuit INT. The instruction decoder DEC is, for example, a micro ROM or a PLA (Programmable L
Logic or wired logic.
Part of the output of the instruction decoder DEC is the instruction decoder DEC.
Feedback. This includes a stage code (TMG) used for transition within each instruction code, and a control signal (MOD) used between instruction codes. That is, the ST
The first word of the M instruction generates a control signal designating the number of general-purpose registers, outputs an interrupt mask signal, and inhibits acceptance of an interrupt.

【0053】割込み制御部INTは、後述の図1の割込
みコントローラの出力する割込み要求信号を受け付け
る。また、命令デコーダの出力する割込みマスク信号を
参照して、割込みがマスクされていなければ、命令変更
部CHGに割込みを指示し、割込み例外処理用の命令コ
ードの実行を行わせる。
The interrupt controller INT receives an interrupt request signal output from an interrupt controller shown in FIG. 1 described later. Also, referring to the interrupt mask signal output by the instruction decoder, if the interrupt is not masked, the instruction change unit CHG is instructed to execute an interrupt, and the instruction code for interrupt exception processing is executed.

【0054】実行部には、更に、テンポラリレジスタT
R、算術論理演算器ALU、インクリメンタINC、リ
ードデータバッファDBR、ライトデータバッファDB
W、アドレスバッファABを含む。これらのブロックは
GBバス、DBバス、WBバスによって相互に接続され
ている。
The execution unit further includes a temporary register T
R, arithmetic logic unit ALU, incrementer INC, read data buffer DBR, write data buffer DB
W, including an address buffer AB. These blocks are interconnected by a GB bus, a DB bus, and a WB bus.

【0055】算術論理演算器ALUは、命令によって指
定される各種の演算や実効アドレスの計算など用いる。
The arithmetic and logic unit ALU uses various operations specified by instructions and calculation of effective addresses.

【0056】インクリメンタINCは、主にPCの加算
やアドレス計算に用いられる。
The incrementer INC is mainly used for adding PCs and calculating addresses.

【0057】DBRは、ROM、RAM、内部I/Oレ
ジスタ、或いは図示はされない外部メモリから、リード
した命令コードやデータを一時的に格納する。DBWは
ROM、RAM、内部I/Oレジスタ、或いは外部メモ
リへのライトデータを一時的に格納する。DBR、DB
WによってCPU内部動作と、CPU外部のリード/ラ
イト動作のタイミングを調整している。
The DBR temporarily stores instruction codes and data read from a ROM, a RAM, an internal I / O register, or an external memory (not shown). The DBW temporarily stores write data to a ROM, a RAM, an internal I / O register, or an external memory. DBR, DB
The timing of the internal operation of the CPU and the read / write operation outside the CPU is adjusted by W.

【0058】アドレスバッファABは、CPUがリード
/ライトするアドレスを一時的に格納する。
The address buffer AB temporarily stores an address to be read / written by the CPU.

【0059】図4に、レジスタセレクタRDECの一部
の詳細なブロック図を示す。
FIG. 4 is a detailed block diagram of a part of the register selector RDEC.

【0060】レジスタデコーダRDECは、レジスタフ
ィールドを保持するIR1から出力されるレジスタフィ
ールド情報と、命令デコーダDECの制御信号出力を入
力して、各汎用レジスタに対応するレジスタ選択信号を
発生する。
The register decoder RDEC receives the register field information output from the IR 1 holding the register field and the control signal output of the instruction decoder DEC, and generates a register selection signal corresponding to each general-purpose register.

【0061】レジスタ指定フィールドは2つある(r
1、r2)。
There are two register designation fields (r
1, r2).

【0062】第2のレジスタ指定フィールド(r2)
は、IR1のビット3〜0と、命令デコーダの制御信号
出力(inc、dec)から生成される。
Second register specification field (r2)
Is generated from bits 3 to 0 of IR1 and the control signal output (inc, dec) of the instruction decoder.

【0063】上記を入力したインクリメンタ(RIN
C)の出力が、システムクロックの反転φ#でラッチさ
れ、第2のレジスタ指定フィールド(r2)となる。
The incrementer (RIN
The output of C) is latched at the inverted φ # of the system clock, and becomes the second register designation field (r2).

【0064】例えば、 STM ER0−ER3,@−SP の場合、r2の初期値として、0が与えられる。その
後、後述の所定のタイミングで、インクリメント信号
(inc)によって、r2は0→1→2→3とされる。
For example, in the case of STM ER0-ER3, @ -SP, 0 is given as an initial value of r2. Thereafter, at a predetermined timing described later, r2 is changed from 0 → 1 → 2 → 3 by the increment signal (inc).

【0065】また、 LDM @SP+,ER0−ER1 または、 RTS/2 ER0−ER1 の場合、r2の初期値として、1が与えられる。その
後、後述の所定のタイミングで、インクリメント信号
(dec=rd――)によって、r2は1→0とされ
る。
In the case of LDM , SP +, ER0-ER1 or RTS / 2 ER0-ER1, 1 is given as an initial value of r2. Thereafter, at a predetermined timing described later, r2 is changed from 1 to 0 by an increment signal (dec = rd--).

【0066】これによって、レジスタ選択回路自体をそ
のほかの命令と共通化することが、論理的規模の増加を
抑止できる。
As a result, sharing the register selection circuit itself with other instructions can suppress an increase in logical scale.

【0067】r2のビット3は、これらの命令では使用
しないため、インクリメンタ(RINC)は3ビットで
よい。インクリメンタ(RINC)を持つことにより、
さほど論理規模を大きくすることなく、連続した任意の
汎用レジスタの組合せを指定可能にできる。
Since bit 3 of r2 is not used in these instructions, the incrementer (RINC) may be 3 bits. By having an incrementer (RINC)
It is possible to specify any combination of consecutive general-purpose registers without increasing the logical scale.

【0068】なお、その他のRDECの詳細については
省略する。
The details of the other RDEC are omitted.

【0069】図5に、複数汎用レジスタの復帰を含む第
1の復帰命令(RTS/n)、第2の復帰命令(RTE
/n)の命令フォーマットを示す。
FIG. 5 shows a first return instruction (RTS / n) including a return of a plurality of general-purpose registers and a second return instruction (RTE / RTE).
/ N).

【0070】第1の復帰命令(RTS/n)は、サブル
ーチンからの復帰命令であり、第1の復帰命令(RTE
/n)は、例外処理ルーチンからの復帰命令である。
The first return instruction (RTS / n) is a return instruction from a subroutine, and the first return instruction (RTE / RTS)
/ N) is a return instruction from the exception handling routine.

【0071】ビット15〜7はオペレーションフィール
ドであり、復帰命令を指定する。
Bits 15 to 7 are an operation field for designating a return instruction.

【0072】ビット6が0のとき、ビット5、4によっ
て、汎用レジスタの本数を指定する。01のときは2
本、10のときは3本、11のときは4本とする。汎用
レジスタの選択は、連続した2、3、4本の選択が可能
である。例えば、4本の場合には、ER0−3、ER1
−4、ER2−5、ER3−6、が指定可能である。E
R7は、スタックポインタと兼用であり、対象としな
い。
When bit 6 is 0, bits 5 and 4 specify the number of general purpose registers. 2 when 01
In the case of 10, the number is set to 3 and in the case of 11, the number is set to 4. For selection of general-purpose registers, continuous selection of 2, 3, and 4 registers is possible. For example, in the case of four, ER0-3, ER1
-4, ER2-5, and ER3-6 can be specified. E
R7 is also used as a stack pointer and is not targeted.

【0073】ビット6が1のときは、汎用レジスタの復
帰を伴わない。即ち、従来技術の復帰命令と同一であ
り、共通の命令コード(H’5470)とする。
When the bit 6 is 1, the general-purpose register is not restored. That is, it is the same as the return instruction of the prior art, and has a common instruction code (H'5470).

【0074】ビット3〜0で最初に使用する汎用レジス
タを指定する。ビット3は予約されているものとし、0
とする。
Bits 3 to 0 specify a general-purpose register to be used first. Bit 3 shall be reserved and 0
And

【0075】例えば、RTS/4 ER0−3のとき
は、ER3から復帰されるので、H’5433の命令コ
ードとなる。
For example, in the case of RTS / 4 ER0-3, since it returns from ER3, the instruction code is H'5433.

【0076】第2の復帰命令(RTE/n)も、オペレ
ーションフィールドが異なるのみであり、前記同様であ
る。
The second return instruction (RTE / n) is similar to the above except that the operation field is different.

【0077】STM命令の命令フォーマットは、2ワー
ド命令であり、第2ワードのビット3〜0で最初に使用
する汎用レジスタを指定する。これは上記復帰命令と共
通化されている。
The instruction format of the STM instruction is a two-word instruction, and the bits 3 to 0 of the second word specify the general-purpose register to be used first. This is shared with the return instruction.

【0078】LDM命令の命令フォーマットも同様であ
る。
The same applies to the instruction format of the LDM instruction.

【0079】図6に、複数汎用レジスタの復帰を含む第
1の復帰命令(RTS/n)、第2の復帰命令(RTE
/n)のスタックの構成の例を示す。
FIG. 6 shows a first return instruction (RTS / n) including a return of a plurality of general-purpose registers and a second return instruction (RTE / RTE).
/ N) shows an example of a stack configuration.

【0080】スタックはスタックポインタ(SP:ER
7)によって、スタックされた最後のアドレスが指示さ
れている。
The stack is a stack pointer (SP: ER
7) indicates the last address of the stack.

【0081】サブルーチン分岐命令(例えば、BSR命
令)によって、プログラムカウンタがスタックに退避さ
れる。その後、サブルーチンの先頭で、所要の汎用レジ
スタが退避される(例えば、STM ER0−ER1,
@−SP)。
The program counter is saved on the stack by a subroutine branch instruction (for example, a BSR instruction). Thereafter, at the beginning of the subroutine, required general-purpose registers are saved (for example, STM ER0-ER1,
@ -SP).

【0082】これに対応して、第1の復帰命令(例え
ば、RTS/2 ER0−ER1)は、まず、指定した
汎用レジスタの復帰として、スタックからのリードを行
い、指定した汎用レジスタ(ER1、ER0)に順次格
納する。引続き、プログラムカウンタの復帰として、ス
タックからのリードを行い、プログラムカウンタに格納
し、この内容に従って、命令のリードを行う。
In response to this, the first return instruction (for example, RTS / 2 ER0-ER1) first reads from the stack to return the specified general-purpose register, and returns to the specified general-purpose register (ER1, ER0). Subsequently, as the return of the program counter, the read from the stack is performed, the result is stored in the program counter, and the instruction is read according to the contents.

【0083】同様に、例外処理によって、プログラムカ
ウンタとコンディションコードレジスタがスタックに退
避される。プログラムカウンタが24ビットであり、コ
ンディションコードレジスタと組合せて、スタックに退
避される。その後、サブルーチンの先頭で、所要の汎用
レジスタが退避される(例えば、STM ER0−ER
3,@−SP)。
Similarly, the program counter and the condition code register are saved on the stack by the exception processing. The program counter is 24 bits and is saved on the stack in combination with the condition code register. Then, at the beginning of the subroutine, the required general purpose registers are saved (for example, STM ER0-ER
3, @ -SP).

【0084】これに対応して、第2の復帰命令(例え
ば、RTE/4 ER0−ER3)は、まず、指定した
汎用レジスタの復帰として、スタックからのリードを行
い、指定した汎用レジスタ(ER3、ER2、ER1、
ER0)に順次格納する。引続き、プログラムカウンタ
とコンディションコードレジスタの復帰として、スタッ
クからのリードを行い、プログラムカウンタとコンディ
ションコードレジスタに所定の内容を格納するととも
に、命令のリードを行う。
In response to this, the second return instruction (for example, RTE / 4 ER0-ER3) first reads from the stack to return the specified general-purpose register, and returns to the specified general-purpose register (ER3, ER3, ER3). ER2, ER1,
ER0). Subsequently, as the return of the program counter and the condition code register, reading from the stack is performed, predetermined contents are stored in the program counter and the condition code register, and an instruction is read.

【0085】図7に、第1の復帰命令(RTS/n)の
動作フローを示す。
FIG. 7 shows an operation flow of the first return instruction (RTS / n).

【0086】ステップ1で、制御信号Aで、スタックポ
インタ(SP)の内容がアドレスバス(IAB)に出力
され、ロングワードのリードが指示される。また、SP
の内容のインクリメント(+4)が指示される。制御信
号Cで、リードしたデータのDBRへの格納が指示され
る。
In step 1, the contents of the stack pointer (SP) are output to the address bus (IAB) by the control signal A, and a long word read is instructed. Also, SP
Is incremented (+4). The control signal C instructs storage of the read data in the DBR.

【0087】ステップ2〜5で、制御信号Bで、前のス
テップでリードした内容の汎用レジスタへの書込みが指
示される。具体的には、一旦、内部バスGBに出力し、
ALUを経由して、内部バスWBに出力し、指定された
汎用レジスタに書込まれる。レジスタデコーダRDEC
に対してレジスタフィールドのデクリメント(−1)が
指示される。前記同様に、制御信号Aで、スタックポイ
ンタ(SP)の内容のアドレスバス(IAB)への出力
と、ロングワードのリードが指示され、SPの内容のイ
ンクリメント(+4)が指示される。制御信号Cで、リ
ードしたデータのDBRへの格納が指示される。ステッ
プ2〜4は、指定した汎用レジスタの本数(n)に従っ
て、所定回数が実行される。
In steps 2 to 5, the control signal B instructs the general-purpose register to write the contents read in the previous step. Specifically, output to the internal bus GB once,
The signal is output to the internal bus WB via the ALU and written to the designated general-purpose register. Register decoder RDEC
Is decremented (-1) in the register field. Similarly to the above, the control signal A instructs the output of the contents of the stack pointer (SP) to the address bus (IAB), the reading of the long word, and the increment (+4) of the contents of the SP. The control signal C instructs storage of the read data in the DBR. Steps 2 to 4 are executed a predetermined number of times according to the specified number (n) of general-purpose registers.

【0088】ステップ6で、制御信号Bで、前のステッ
プでリードした内容のプログラムカウンタ(PC)への
書込みが指示される。
In step 6, the control signal B instructs the program counter (PC) to write the contents read in the previous step.

【0089】ステップ7で、制御信号Aで、命令リード
として、プログラムカウンタ(PC)の内容がアドレス
バス(IAB)に出力され、メモリワードリードが指示
される。また、PCの内容のインクリメント(+2)が
指示される。制御信号Cで、リードされた命令をIRに
格納する。
At step 7, the contents of the program counter (PC) are output to the address bus (IAB) as an instruction read by the control signal A, and a memory word read is instructed. In addition, an increment (+2) of the content of the PC is instructed. With the control signal C, the read instruction is stored in the IR.

【0090】ステップ8で、同様に、制御信号Aで、プ
ログラムカウンタ(PC)の内容のアドレスバス(IA
B)への出力と、メモリワードリードが指示され、PC
の内容のインクリメント(+2)が指示される。制御信
号Bで、前のステップでリードした命令(IR)の命令
デコーダへの入力が指示される。次の命令の実行が開始
される。
In step 8, similarly, the control signal A is used to control the address bus (IA) of the contents of the program counter (PC).
B) and an instruction to read a memory word are issued.
Is incremented (+2). Control signal B instructs the input of the instruction (IR) read in the previous step to the instruction decoder. Execution of the next instruction is started.

【0091】PCの復帰時、スタックからリードした内
容を、一旦、PCに格納するものとしたが、これを行わ
ず、ステップ7で、PCの代わりに、DBRから読み出
すようにしてもよい。
When returning the PC, the contents read from the stack are temporarily stored in the PC. However, this may not be performed, and the contents may be read from the DBR instead of the PC in step 7.

【0092】汎用レジスタの復帰を行わない復帰命令の
場合は、ステップ2〜5をスキップすればよい。換言す
れば、従来技術の復帰命令に、ステップ2〜5を追加す
ればよい。
In the case of a return instruction that does not return the general-purpose register, steps 2 to 5 may be skipped. In other words, steps 2 to 5 may be added to the conventional return instruction.

【0093】かかる動作フローに従って、ハードウェア
記述言語(HDL)を記述し、命令デコーダDECを生
成することができる。第1の復帰命令(RTS/n)に
関する部分は、以下の通りである。
According to the operation flow, a hardware description language (HDL) can be described, and an instruction decoder DEC can be generated. The part related to the first return instruction (RTS / n) is as follows.

【0094】 casex(opcode) (1) 16’b01010100_0001????: begin (2) case(tmg) (3) 4’b0001: begin (4) nexttmg = 4’b0100; (5) bcmd = long_read; (6) ... end (7) 4’b0100: begin (8) nexttmg = 4’b0101; (9) bcmd = long_read; (10) ... end (11) ... end (12) 16’b01010100_0010????: begin (13) case(tmg) (14) 4’b0001: begin (15) nexttmg = 4’b0010; (16) ... 4’b0010: begin (17) nexttmg = 4’b0100; (18) ... 本記述は、IEEE1364として標準化されているH
DL記述言語に従っている。かかるHDL記述言語自体
については、1996年7月CQ出版株式会社発行の
『入門Verilog−HDL記述』などに記載されて
いる。
Casex (opcode) (1) 16′b01010100 — 0001? ? ? ? : Begin (2) case (tmg) (3) 4'b0001: begin (4) nextmg = 4'b0100; (5) bcmd = long_read; (6). . . end (7) 4′b0100: begin (8) nextmg = 4′b0101; (9) bcmd = long_read; (10). . . end (11). . . end (12) 16'b01010100_0010? ? ? ? : Begin (13) case (tmg) (14) 4′b0001: begin (15) nextmg = 4′b0010; (16). . . 4′b0010: begin (17) nextmg = 4′b0100; (18). . . This description is based on H standardized as IEEE1364.
It follows the DL description language. The HDL description language itself is described in “Introduction to Verilog-HDL Description” issued by CQ Publishing Co., Ltd. in July 1996.

【0095】casex及びcaseは、それに続
く()内の変数(opcode、tmg)に応じて、後
続の値(16’b01010100_0001???
?:、4’b0001:など)に一致した動作を実行す
る。begin〜endで1つの動作が記述される。
The caseex and the case follow the subsequent values (16'b01010100_0001 ???) according to the following variables (opcode, tmg) in parentheses.
? :, 4'b0001: etc.). One operation is described by begin to end.

【0096】(1)で、命令デコーダの入力(opco
de)による条件を指示する。当該条件で、(2)〜
(12)でRTS/2に相当する命令コードの動作が記
述される。更に、各命令コード毎に、ステップに相当す
る命令デコーダの入力(tmg)による条件を指示す
る。RTS/2の第1ステップの動作は、(4)〜
(7)に記述される。(5)で、次のステップ(nex
ttmg)が第4ステップであることが指定される。n
exttmgは1ステート後に、tmgとして命令デコ
ーダに入力される。(6)で、バスコマンドがロングワ
ードリードとされる。long_readはパラメータ
として、所定のコードが割当てられるようにしておく。
この後に、そのほかの制御信号が記述される。同様に、
第4ステップの動作は、(8)〜(11)に記述され
る。第5〜第8ステップの動作は、これ以降(12)ま
でに記述される。
In (1), the input of the instruction decoder (opco
de). Under these conditions, (2)-
In (12), the operation of the instruction code corresponding to RTS / 2 is described. Further, for each instruction code, a condition based on the input (tmg) of the instruction decoder corresponding to the step is indicated. The operation of the first step of RTS / 2 is (4) to
It is described in (7). In (5), the next step (nex)
ttmg) is specified as the fourth step. n
extmg is input to the instruction decoder as tmg after one state. At (6), the bus command is read long word. The long_read is set so that a predetermined code is assigned as a parameter.
After this, other control signals are described. Similarly,
The operation of the fourth step is described in (8) to (11). The operations of the fifth to eighth steps will be described hereafter (12).

【0097】同様に、命令デコーダの入力(opcod
e)による条件で、(13)以降でRTS/3に相当す
る命令コードの動作が記述される。第1ステップの動作
記述において、(15)で、次のステップ(nextt
mg)が第2ステップであることが指定される。また、
第2ステップの動作は、(17)以降に記述される。更
に、第4〜第8ステップの動作も記述される。
Similarly, the input (opcode) of the instruction decoder
The condition of e) describes the operation of the instruction code corresponding to RTS / 3 after (13). In the operation description of the first step, in (15), the next step (next
mg) is the second step. Also,
The operation of the second step will be described after (17). Furthermore, the operations of the fourth to eighth steps are described.

【0098】更に、その後、RTS/4に相当する命令
コードの動作が記述され、第2の復帰命令(RTE/
n)、複数レジスタの退避命令(STM)や、その他の
命令コードも記述される。
Further, after that, the operation of the instruction code corresponding to RTS / 4 is described, and the second return instruction (RTE /
n), a multiple register save instruction (STM), and other instruction codes are also described.

【0099】図8に、第1の復帰命令(RTS/n)の
実行タイミングを示す。
FIG. 8 shows the execution timing of the first return instruction (RTS / n).

【0100】n=2の場合の例である。This is an example when n = 2.

【0101】特に制限はされないものの、内蔵ROM、
RAMのリード/ライトを1ステートでリード/ライト
可能とし、内蔵ROM上にプログラム、内蔵RAM上に
スタックを配置した場合のタイミングを示す。
Although not particularly limited, the built-in ROM,
This figure shows the timing when the read / write of the RAM can be performed in one state and the program is stored in the internal ROM and the stack is disposed in the internal RAM.

【0102】T0のφ#(#は反転論理を示す)で、C
PUのアドレスバッファ(MAB)かアドレスがIAB
に出力される。また、命令デコーダから、命令フェッチ
(if)を示す、バスコマンド(BCMD)が出力され
る。
When φ # of T0 (# indicates inverted logic), C
PU address buffer (MAB) or address is IAB
Is output to Further, a bus command (BCMD) indicating an instruction fetch (if) is output from the instruction decoder.

【0103】T1のφで、IABの内容がPABに出力
され、バスコマンドに基づき、リードサイクルが開始さ
れ、PDBにデータが出力される。φ#でPDBのリー
ドデータが内部データバスIDBに得られ、これをT2
のφでIRにラッチする。以上の動作は以前の命令の実
行の制御によって行われる(プリフェッチ)。ここで、
内蔵ROM、RAMは、PAB及びPDBに接続されて
いないが、PAB、PDB相当の動作をモジュール内で
行い、本タイミング図には、このモジュール内の動作を
示している。
At φ of T1, the contents of IAB are output to PAB, a read cycle is started based on a bus command, and data is output to PDB. At φ #, PDB read data is obtained on the internal data bus IDB,
Is latched in the IR at φ. The above operation is performed by controlling the execution of the previous instruction (prefetch). here,
Although the built-in ROM and RAM are not connected to the PAB and PDB, operations equivalent to PAB and PDB are performed in the module, and the timing chart shows the operation in the module.

【0104】直前の命令の実行が終了すると、最も早く
命令の実行が開始される場合には、T2のφで命令コー
ドがDECに入力されて、命令の内容が解読される。解
読結果に従って、制御信号を出力して、各部の制御を行
う。命令の一部(レジスタ指定フィード:r)がレジス
タセレクトに与えられる。
When the execution of the immediately preceding instruction is completed and the execution of the instruction is started earliest, the instruction code is input to DEC at φ of T2, and the contents of the instruction are decoded. According to the decoding result, a control signal is output to control each unit. Part of the instruction (register designation feed: r) is given to the register select.

【0105】前記のステップ1として、T2のφ#で、
SPの内容を内部バスGBに読み出して、ABとINC
に入力する。ABからアドレスIABが出力される。ロ
ングワードのリードのバスコマンドが出力される。
In step 1 described above, by φ # of T2,
The contents of SP are read out to the internal bus GB, and AB and INC are read.
To enter. The address IAB is output from AB. A longword read bus command is output.

【0106】T3のφで、INCでインクリメント(+
4)された結果が、内部バスWBを経由してSPにライ
トされる。T3のφ#から、スタックからリードしたデ
ータがIDBに出力され、T4のφで、DBRに格納さ
れる。
At φ of T3, increment by INC (+
4) The result is written to the SP via the internal bus WB. From φ # at T3, data read from the stack is output to the IDB, and at φ at T4, stored in the DBR.

【0107】ステップ4として、T4のφ及びφ#で、
DBRの内容が内部バスGB、ALU、内部バスWBを
介して、指定(r)した汎用レジスタに書込まれる。レ
ジスタ指定フィールドがデクリメントされる。前記同様
に、T3のφ#で、SPの内容を内部バスGBに読み出
して、ABとINCに入力する。ABからアドレスIA
Bが出力される。ロングワードのリードのバスコマンド
が出力される。T4のφで、INCでインクリメント
(+4)された結果が、内部バスWBを経由してSPに
ライトされる。T4のφ#から、スタックからリードし
たデータがIDBに出力され、T5のφで、DBRに格
納される。
As step 4, by φ and φ # of T4,
The contents of the DBR are written to the designated general register via the internal buses GB, ALU, and internal bus WB. The register specification field is decremented. Similarly to the above, at φ # of T3, the contents of SP are read out to the internal bus GB and input to AB and INC. AB to address IA
B is output. A longword read bus command is output. At φ of T4, the result incremented (+4) by INC is written to SP via the internal bus WB. From φ # at T4, data read from the stack is output to the IDB, and at φ at T5, stored in the DBR.

【0108】ステップ5として、T5のφ及びφ#で、
DBRの内容が内部バスGB、ALU、内部バスWBを
介して、指定(r)した汎用レジスタに書込まれる。レ
ジスタ指定フィールドがデクリメントされる。前記同様
に、T4のφ#で、SPの内容を内部バスGBに読み出
して、ABとINCに入力する。ABからアドレスIA
Bが出力される。ロングワードのリードのバスコマンド
が出力される。T5のφで、INCでインクリメント
(+4)された結果が、内部バスWBを経由してSPに
ライトされる。T5のφ#から、スタックからリードし
たデータがIDBに出力され、T6のφで、DBRに格
納される。
As step 5, by using φ and φ # of T5,
The contents of the DBR are written to the designated general register via the internal buses GB, ALU, and internal bus WB. The register specification field is decremented. Similarly to the above, at φ # of T4, the contents of SP are read out to the internal bus GB and input to AB and INC. AB to address IA
B is output. A longword read bus command is output. At φ of T5, the result incremented (+4) by INC is written to SP via the internal bus WB. From φ # at T5, data read from the stack is output to the IDB, and at φ at T6, stored in the DBR.

【0109】ステップ6として、T6のφ及びφ#で、
DBRの内容が内部バスGB、ALU、内部バスWBを
介して、PCに書込まれる。
As step 6, by φ and φ # of T6,
The contents of the DBR are written to the PC via the internal buses GB, ALU, and internal bus WB.

【0110】ステップ7として、T6のφ#で、PCの
内容を内部バスGBに読み出して、ABとINCに入力
する。ABからアドレスIABが出力される。T7のφ
で、INCでインクリメント(+2)された結果が、内
部バスWBを経由してPCにライトされる。
In step 7, the contents of the PC are read out to the internal bus GB at φ # of T6 and input to AB and INC. The address IAB is output from AB. Φ of T7
Then, the result incremented (+2) by INC is written to the PC via the internal bus WB.

【0111】ステップ8として、T7のφ#で、PCの
内容を内部バスGBに読み出して、ABとINCに入力
する。ABからアドレスIABが出力される。T8のφ
で、INCでインクリメント(+2)された結果が、内
部バスWBを経由してPCにライトされる。T8のφで
リードした命令コードが、IRを経由して、DECに入
力されて、次の命令が実行される。
In step 8, the contents of the PC are read out to the internal bus GB at φ # of T7 and input to AB and INC. The address IAB is output from AB. Φ of T8
Then, the result incremented (+2) by INC is written to the PC via the internal bus WB. The instruction code read at φ of T8 is input to the DEC via the IR, and the next instruction is executed.

【0112】図9に、第2の復帰命令(RTE/n)の
動作フローを示す。
FIG. 9 shows an operation flow of the second return instruction (RTE / n).

【0113】第1の復帰命令(RTS/n)に対して、
ステップ6で、PCとともに、CCRへの書込みが行わ
れるようにされる。そのほかの動作は同様にできる。
In response to the first return instruction (RTS / n),
In step 6, writing to the CCR is performed together with the PC. Other operations can be similarly performed.

【0114】図10に、第2の復帰命令(RTE/n)
の実行タイミングを示す。
FIG. 10 shows a second return instruction (RTE / n).
This shows the execution timing.

【0115】n=4の場合の例である。This is an example when n = 4.

【0116】前記同様に、T2のφで命令コードがDE
Cに入力されて、命令の内容が解読される。解読結果に
従って、制御信号を出力して、各部の制御を行う。命令
の一部(レジスタ指定フィード:r)がレジスタセレク
トに与えられる。
In the same manner as described above, the instruction code is
Input to C, the contents of the instruction are decoded. According to the decoding result, a control signal is output to control each unit. Part of the instruction (register designation feed: r) is given to the register select.

【0117】前記のステップ1として、T2のφ#で、
SPの内容を内部バスGBに読み出して、ABとINC
に入力する。ABからアドレスIABが出力される。ロ
ングワードのリードのバスコマンドが出力される。
In step 1 described above, by φ # of T2,
The contents of SP are read out to the internal bus GB, and AB and INC are read out.
To enter. The address IAB is output from AB. A longword read bus command is output.

【0118】T3のφで、INCでインクリメント(+
4)された結果が、内部バスWBを経由してSPにライ
トされる。T3のφ#から、スタックからリードしたデ
ータがIDBに出力され、T4のφで、DBRに格納さ
れる。
At φ of T3, increment by INC (+
4) The result is written to the SP via the internal bus WB. From φ # at T3, data read from the stack is output to the IDB, and at φ at T4, stored in the DBR.

【0119】ステップ2として、T4のφ及びφ#で、
DBRの内容が内部バスGB、ALU、内部バスWBを
介して、指定(r)した汎用レジスタに書込まれる。レ
ジスタ指定フィールドがデクリメントされる。前記同様
に、T3のφ#で、SPの内容を内部バスGBに読み出
して、ABとINCに入力する。ABからアドレスIA
Bが出力される。ロングワードのリードのバスコマンド
が出力される。T4のφで、INCでインクリメント
(+4)された結果が、内部バスWBを経由してSPに
ライトされる。T4のφ#から、スタックからリードし
たデータがIDBに出力され、T5のφで、DBRに格
納される。
As step 2, by using φ and φ # of T4,
The contents of the DBR are written to the designated general register via the internal buses GB, ALU, and internal bus WB. The register specification field is decremented. Similarly to the above, at φ # of T3, the contents of SP are read out to the internal bus GB and input to AB and INC. AB to address IA
B is output. A longword read bus command is output. At φ of T4, the result incremented (+4) by INC is written to SP via the internal bus WB. From φ # at T4, data read from the stack is output to the IDB, and at φ at T5, stored in the DBR.

【0120】ステップ3として、T5のφ及びφ#で、
DBRの内容が内部バスGB、ALU、内部バスWBを
介して、指定(r)した汎用レジスタに書込まれる。レ
ジスタ指定フィールドがデクリメントされる。前記同様
に、T4のφ#で、SPの内容を内部バスGBに読み出
して、ABとINCに入力する。ABからアドレスIA
Bが出力される。ロングワードのリードのバスコマンド
が出力される。T5のφで、INCでインクリメント
(+4)された結果が、内部バスWBを経由してSPに
ライトされる。T5のφ#から、スタックからリードし
たデータがIDBに出力され、T6のφで、DBRに格
納される。
As step 3, by φ and φ # of T5,
The contents of the DBR are written to the designated general register via the internal buses GB, ALU, and internal bus WB. The register specification field is decremented. Similarly to the above, at φ # of T4, the contents of SP are read out to the internal bus GB and input to AB and INC. AB to address IA
B is output. A longword read bus command is output. At φ of T5, the result incremented (+4) by INC is written to SP via the internal bus WB. From φ # at T5, data read from the stack is output to the IDB, and at φ at T6, stored in the DBR.

【0121】ステップ4として、T6のφ及びφ#で、
DBRの内容が内部バスGB、ALU、内部バスWBを
介して、指定(r)した汎用レジスタに書込まれる。レ
ジスタ指定フィールドがデクリメントされる。前記同様
に、T5のφ#で、SPの内容を内部バスGBに読み出
して、ABとINCに入力する。ABからアドレスIA
Bが出力される。ロングワードのリードのバスコマンド
が出力される。T6のφで、INCでインクリメント
(+4)された結果が、内部バスWBを経由してSPに
ライトされる。T6のφ#から、スタックからリードし
たデータがIDBに出力され、T7のφで、DBRに格
納される。
As step 4, by φ and φ # of T6,
The contents of the DBR are written to the designated general register via the internal buses GB, ALU, and internal bus WB. The register specification field is decremented. Similarly to the above, at φ # of T5, the contents of SP are read out to the internal bus GB and input to AB and INC. AB to address IA
B is output. A longword read bus command is output. At φ of T6, the result incremented (+4) by INC is written to SP via the internal bus WB. From φ # at T6, data read from the stack is output to the IDB, and at φ at T7, stored in the DBR.

【0122】ステップ5として、T7のφ及びφ#で、
DBRの内容が内部バスGB、ALU、内部バスWBを
介して、指定(r)した汎用レジスタに書込まれる。レ
ジスタ指定フィールドがデクリメントされる。前記同様
に、T6のφ#で、SPの内容を内部バスGBに読み出
して、ABとINCに入力する。ABからアドレスIA
Bが出力される。ロングワードのリードのバスコマンド
が出力される。T7のφで、INCでインクリメント
(+4)された結果が、内部バスWBを経由してSPに
ライトされる。T7のφ#から、スタックからリードし
たデータがIDBに出力され、T6のφで、DBRに格
納される。
As step 5, with φ and φ # of T7,
The contents of the DBR are written to the designated general register via the internal buses GB, ALU, and internal bus WB. The register specification field is decremented. In the same manner as described above, the content of SP is read out to the internal bus GB at φ # of T6, and is input to AB and INC. AB to address IA
B is output. A longword read bus command is output. At φ of T7, the result incremented (+4) by INC is written to SP via the internal bus WB. From φ # at T7, data read from the stack is output to the IDB, and at φ at T6, stored in the DBR.

【0123】ステップ6として、T6のφ及びφ#で、
DBRの内容が内部バスGB、ALU、内部バスWBを
介して、CCRとPCに書込まれる。DBRのビット3
1〜24がCCRに、ビット23〜0がPCに書込まれ
る。
As step 6, by φ and φ # of T6,
The contents of the DBR are written to the CCR and the PC via the internal buses GB, ALU, and internal bus WB. DBR bit 3
Bits 1 to 24 are written to the CCR and bits 23 to 0 are written to the PC.

【0124】ステップ7として、T8のφ#で、PCの
内容を内部バスGBに読み出して、ABとINCに入力
する。ABからアドレスIABが出力される。T9のφ
で、INCでインクリメント(+2)された結果が、内
部バスWBを経由してPCにライトされる。
In step 7, the contents of the PC are read out to the internal bus GB at φ # of T8 and input to AB and INC. The address IAB is output from AB. Φ of T9
Then, the result incremented (+2) by INC is written to the PC via the internal bus WB.

【0125】ステップ8として、T9のφ#で、PCの
内容を内部バスGBに読み出して、ABとINCに入力
する。ABからアドレスIABが出力される。T10の
φで、INCでインクリメント(+2)された結果が、
内部バスWBを経由してPCにライトされる。T10の
φでリードした命令コードが、IRを経由して、DEC
に入力されて、次の命令が実行される。
In step 8, the contents of the PC are read out to the internal bus GB at φ # of T9 and input to AB and INC. The address IAB is output from AB. At φ of T10, the result incremented (+2) by INC is:
The data is written to the PC via the internal bus WB. The instruction code read at φ of T10 is DEC via IR
And the next instruction is executed.

【0126】図11に、複数汎用レジスタの退避命令
(STM)の動作フローを示す。
FIG. 11 shows an operation flow of a save instruction (STM) for a plurality of general purpose registers.

【0127】ステップ0は、命令コードの第1ワードで
制御される。制御信号Aで、プログラムカウンタ(P
C)の内容のアドレスバス(IAB)への出力と、メモ
リワードリードが指示され、PCの内容のインクリメン
ト(+2)が指示される。制御信号Bで、命令コードの
第2ワードの命令デコーダへの入力と、第1ワードで指
定される汎用レジスタ本数の情報(MOD)が指示され
る。
Step 0 is controlled by the first word of the instruction code. With the control signal A, the program counter (P
Output of the contents of C) to the address bus (IAB) and read of the memory word are instructed, and increment (+2) of the contents of the PC is instructed. The control signal B indicates the input of the second word of the instruction code to the instruction decoder and the information (MOD) of the number of general-purpose registers specified by the first word.

【0128】ステップ1で、制御信号Aで、スタックポ
インタ(SP)の内容のデクリメント(−4)が指示さ
れる。ステップ2〜5で、制御信号Aで、スタックポイ
ンタ(SP)の内容のアドレスバス(IAB)への出力
と、ロングワードのライトが指示される。制御信号B
で、汎用レジスタの内容のDBWへの格納が指示され
る。制御信号Cで、DBWの内容のIDBへの出力が指
示される。レジスタデコーダRDECに対してレジスタ
フィールドのインクリメント(−1)が指示される。ス
テップ2〜4は、SPの内容のデクリメント(−4)が
指示される。ステップ2〜5は、指定した汎用レジスタ
の本数(n)に従って、所定回数が実行される。
In step 1, decrement (-4) of the contents of the stack pointer (SP) is indicated by the control signal A. In steps 2 to 5, the control signal A instructs output of the contents of the stack pointer (SP) to the address bus (IAB) and writing of a long word. Control signal B
Indicates that the contents of the general-purpose register are to be stored in the DBW. Control signal C instructs output of the contents of DBW to IDB. The register decoder RDEC is instructed to increment the register field (-1). In steps 2 to 4, decrement (-4) of the SP contents is instructed. Steps 2 to 5 are executed a predetermined number of times according to the designated number (n) of general-purpose registers.

【0129】ステップ6で、制御信号Aで、プログラム
カウンタ(PC)の内容のアドレスバス(IAB)への
出力と、メモリワードリードが指示され、PCの内容の
インクリメント(+2)が指示される。制御信号Bで、
前のステップでリードした命令(IR)の命令デコーダ
への入力が指示される。次の命令の実行が開始される。
At step 6, the control signal A instructs the output of the contents of the program counter (PC) to the address bus (IAB), the reading of the memory word, and the increment (+2) of the contents of the PC. With control signal B,
Input of the instruction (IR) read in the previous step to the instruction decoder is designated. Execution of the next instruction is started.

【0130】ステップ2〜5において、汎用レジスタの
内容を、DBWに転送後、当該汎用レジスタの内容を0
にクリアするようにするとよい。汎用レジスタを退避し
た後、0にクリアし、その内容を確定することで、その
後の処理を簡略化することができる。
In steps 2 to 5, the contents of the general-purpose register are transferred to DBW, and then the contents of the general-purpose register are set to 0.
It is better to clear it. After saving the general-purpose register, it is cleared to 0 and its contents are determined, so that the subsequent processing can be simplified.

【0131】例えば、その後、汎用レジスタに0を代入
する場合、MOV命令を省略できる。また、1などを代
入する場合は、 MOV.L #1,ERn を使用する代わりに、 MOV.B #1,RnL を使用することができる。イミディエイトデータは、そ
のデータサイズに対応した領域を命令コードに持つか
ら、MOV.Lの命令コード長(例えば3ワード)より
も、MOV.Bの命令コード長(例えば1ワード)の方
が短い。これによって、プログラム容量の短縮に寄与で
きる。
For example, when 0 is subsequently substituted into the general-purpose register, the MOV instruction can be omitted. When substituting 1 or the like, use MOV. L # 1, ERn instead of using MOV. B # 1, RnL can be used. Since the immediate data has an area corresponding to the data size in the instruction code, the MOV. L than the instruction code length (for example, 3 words) of MOV. The instruction code length of B (for example, one word) is shorter. This can contribute to a reduction in program capacity.

【0132】なお、プログラム中に使用する定数値は、
0や1などの比較的小さい値が多いことが一般的であ
る。
The constant values used in the program are:
Generally, there are many relatively small values such as 0 and 1.

【0133】図12に、複数汎用レジスタの退避命令
(STM)の実行タイミングを示す。
FIG. 12 shows the execution timing of the save instruction (STM) for a plurality of general purpose registers.

【0134】n=2の場合の例である。This is an example when n = 2.

【0135】T2のφで命令コードの第1ワード(st
m−1)がDECに入力されて、命令の内容が解読され
る。解読結果に従って、制御信号を出力して、各部の制
御を行う。命令の一部(レジスタ指定フィード:r)が
レジスタセレクトに与えられる。
At φ of T2, the first word of the instruction code (st
m-1) is input to the DEC, and the contents of the command are decoded. According to the decoding result, a control signal is output to control each unit. Part of the instruction (register designation feed: r) is given to the register select.

【0136】ステップ0として、T2のφ#で、PCの
内容を内部バスGBに読み出して、ABとINCに入力
する。ABからアドレスIABが出力される。T2のφ
で、INCでインクリメント(+2)された結果が、内
部バスWBを経由してPCにライトされる。T3のφで
リードした命令コードが、IRを経由して、DECに入
力されて、次の命令が実行される。
In step 0, the contents of the PC are read out to the internal bus GB at φ # of T2 and input to AB and INC. The address IAB is output from AB. Φ of T2
Then, the result incremented (+2) by INC is written to the PC via the internal bus WB. The instruction code read at φ of T3 is input to the DEC via the IR, and the next instruction is executed.

【0137】T3のφで命令コードの第2ワード(st
m−2)がDECに入力されて、命令の内容が解読され
る。解読結果に従って、制御信号を出力して、各部の制
御を行う。命令の一部(レジスタ指定フィード:r)が
レジスタセレクトに与えられる。
At φ of T3, the second word of the instruction code (st
m-2) is input to the DEC, and the contents of the instruction are decoded. According to the decoding result, a control signal is output to control each unit. Part of the instruction (register designation feed: r) is given to the register select.

【0138】前記のステップ1として、T3のφ#で、
SPの内容を内部バスGBに読み出して、INCに入力
する。T3のφで、INCでデクリメント(−4)され
た結果が、内部バスWBを経由してSPにライトされ
る。
In step 1 described above, at φ # of T3,
The contents of the SP are read out to the internal bus GB and input to the INC. At φ of T3, the result decremented (-4) by INC is written to SP via the internal bus WB.

【0139】ステップ2として、T4のφ#で、SPの
内容を内部バスGBに読み出して、ABとINCに入力
する。ABからアドレスIABが出力される。ロングワ
ードのライトのバスコマンドが出力される。T5のφ
で、INCでデクリメント(−4)された結果が、内部
バスWBを経由してSPにライトされる。また、指定
(r)した汎用レジスタの内容が内部バスDBを介して
DBWに書込まれる。レジスタ指定フィールドがインク
リメントされる。T5のφ#から、DBWの内容がID
Bに出力される。
In step 2, the contents of SP are read out to the internal bus GB at φ # of T4 and input to AB and INC. The address IAB is output from AB. A long word write bus command is output. Φ of T5
Then, the result decremented (-4) by INC is written to SP via the internal bus WB. Further, the contents of the designated general register are written into the DBW via the internal bus DB. The register specification field is incremented. From φ # of T5, the content of DBW is ID
B.

【0140】ステップ5として、T5のφ#で、SPの
内容を内部バスGBに読み出して、ABを介してアドレ
スIABが出力される。ロングワードのライトのバスコ
マンドが出力される。T5のφで、指定(r)した汎用
レジスタの内容が内部バスDBを介してDBWに書込ま
れる。レジスタ指定フィールドがインクリメントされ
る。T5のφ#から、DBWの内容がIDBに出力され
る。
In step 5, the contents of SP are read out to the internal bus GB at φ # of T5, and the address IAB is output via AB. A long word write bus command is output. At φ of T5, the contents of the designated general-purpose register (r) are written to DBW via the internal bus DB. The register specification field is incremented. From φ # at T5, the contents of DBW are output to IDB.

【0141】ステップ6として、T6のφ#で、PCの
内容を内部バスGBに読み出して、ABとINCに入力
する。ABからアドレスIABが出力される。T7のφ
で、INCでインクリメント(+2)された結果が、内
部バスWBを経由してPCにライトされる。プリフェッ
チした命令コード(next)が、IRを経由して、D
ECに入力されて、次の命令が実行される。
In step 6, the contents of the PC are read out to the internal bus GB at φ # of T6 and input to AB and INC. The address IAB is output from AB. Φ of T7
Then, the result incremented (+2) by INC is written to the PC via the internal bus WB. The prefetched instruction code (next) is transmitted to the D via the IR.
The next command is input to the EC and executed.

【0142】前記の通り、ステップ2〜5において、T
5、T6のφ#で、汎用レジスタの内容を0にクリアす
る。これは、当該タイミングの内部バスWBを0とし、
これを汎用レジスタに書込むようにするとよい。
As described above, in steps 2 to 5, T
5. The contents of the general-purpose register are cleared to 0 at φ # of T6. This means that the internal bus WB at the timing is set to 0,
This should be written to a general-purpose register.

【0143】図13に、本発明のCPUの開発環境の概
略を示す。
FIG. 13 shows an outline of a development environment of the CPU of the present invention.

【0144】使用者は、各種エディタなどを用いて、C
言語乃至アセンブリ言語でプログラムを作成する。これ
は通常、複数のモジュールに分割して作成される。
The user can use various editors to edit C
Create a program in language or assembly language. This is usually created by dividing into a plurality of modules.

【0145】Cコンパイラは、使用者の作成したそれぞ
れのC言語ソースプログラムを入力し、アセンブリ言語
ソースプログラム乃至オブジェクトモジュールを出力す
る。
The C compiler inputs each C language source program created by the user and outputs an assembly language source program or an object module.

【0146】例えば、C言語でプログラムを作成する場
合、 と記述された関数seq0は、本発明のCPUに対して
は、以下のようにコンパイルされる。
For example, when creating a program in C language, Is written as follows for the CPU of the present invention.

【0147】 関数内で使用する汎用レジスタER3、ER4をSTM
命令でスタックに退避し、0にクリアされる。復帰命令
時にスタックから回復される。
[0147] General-purpose registers ER3 and ER4 used in the function are STM
It is saved on the stack by an instruction and cleared to 0. It is recovered from the stack when a return instruction is issued.

【0148】また、メインプログラムで上記関数seq
0を呼び出す場合は、 seq0(); と記述され、 JSR @_seq0 とサブルーチン分岐命令にコンパイルされる。
In the main program, the function seq
When calling 0, it is described as seq0 (); and is compiled into JSR $ _seq0 and a subroutine branch instruction.

【0149】アセンブラは、アセンブリ言語ソースプロ
グラムを入力し、オブジェクトモジュールを出力する。
The assembler inputs an assembly language source program and outputs an object module.

【0150】リンケージエディタは、上記Cコンパイラ
やアセンブラの生成した、複数のオブジェクトモジュー
ルを入力して、各モジュールの外部参照や相対アドレス
などの解決を行い、1つのプログラムに結合して、ロー
ドモジュールを出力する。
The linkage editor inputs a plurality of object modules generated by the C compiler or assembler, resolves external references and relative addresses of each module, combines them into one program, and loads the load module. Output.

【0151】ロードモジュールは、シミュレータ/デバ
ッガに入力して、パーソナルコンピュータなどのシステ
ム開発装置上で、CPUの動作をシミュレーションし、
実行結果を表示し、プログラムの解析や評価を行うこと
ができる。また、エミュレータに入力して、実際の応用
システム上などで動作する、いわゆるインサーキットエ
ミュレーションを行ない、マイクロコンピュータ全体と
しての、実動作の解析や評価を行うことができる。
The load module is input to a simulator / debugger to simulate the operation of the CPU on a system development device such as a personal computer.
The execution results can be displayed, and the program can be analyzed and evaluated. Also, by inputting to an emulator, so-called in-circuit emulation that operates on an actual application system or the like is performed, analysis and evaluation of the actual operation of the entire microcomputer can be performed.

【0152】更に、ロードモジュールをPROMライタ
などのROM書込み装置に入力して、マイクロコンピュ
ータの内蔵ROMがフラッシュメモリなどの場合や、外
部のフラッシュメモリなどに、作成したプログラムをロ
ードすることができる。或いはマイクロコンピュータの
製造工程で、内蔵ROMに書込むことも可能である。必
要に応じて、オブジェクトコンバータなどによって、所
望のフォーマットに変換する。
Further, by inputting the load module into a ROM writing device such as a PROM writer, the created program can be loaded into the case where the built-in ROM of the microcomputer is a flash memory or an external flash memory. Alternatively, it is also possible to write the data in the built-in ROM in the microcomputer manufacturing process. If necessary, the data is converted into a desired format by an object converter or the like.

【0153】このほかに、ライブラリアンとして、汎用
的なサブルーチンなどを提供することもできる。
In addition, a general-purpose subroutine can be provided as a librarian.

【0154】CPU定義情報ファイルは、コンパイル対
象のCPUを指定し、本発明の復帰命令を持たない(既
存の)CPUと、本発明のCPUとを共通の開発環境を
利用可能にする。
The CPU definition information file designates a CPU to be compiled, and makes it possible to use a common development environment between a CPU (existing) having no return instruction according to the present invention and a CPU according to the present invention.

【0155】例えば、CPU定義情報ファイルに、 SET CPU= CPU1; と記述することによって、本発明のCPUを選択するよ
うにする。
For example, by describing SET CPU = CPU1; in the CPU definition information file, the CPU of the present invention is selected.

【0156】コンパイル時に、かかるCPU定義情報フ
ァイルを参照し、本発明の復帰命令を持たないCPUが
選択されていれば、前記関数は、 となる。MOV.Lは、当該関数の処理内容に従って、
変更になる場合もある。
At the time of compiling, by referring to the CPU definition information file and selecting a CPU having no return instruction according to the present invention, the function becomes: Becomes MOV. L is determined according to the processing contents of the function.
May change.

【0157】Cコンパイラ自体には、C言語によるプロ
グラムを、CPUの命令に変換する機能のほか、C++
言語によるプログラムのコンパイルや、モジュール間最
適化などといった、CPUの命令セットとは直接関係の
ない機能の向上が図られているが、CPU毎の個別のコ
ンパイラでは、これらの機能向上を全ての個別のコンパ
イラに適用しなければならない。本発明のように、共通
のCコンパイラとしておけば、前記、CPUの命令セッ
トとは直接関係のない機能向上を図ることが容易にな
り、また、開発効率などを向上することができる。
The C compiler itself has a function of converting a program in C language into a command of the CPU, and a function of C ++.
Improvements in functions that are not directly related to the instruction set of the CPU, such as compiling a program in a language and optimizing between modules, are being made. Must be applied to the compiler. If a common C compiler is used as in the present invention, it is easy to improve functions not directly related to the instruction set of the CPU, and it is possible to improve development efficiency and the like.

【0158】上記実施例によれば、以下の作用効果を得
るものである。
According to the above embodiment, the following operation and effect can be obtained.

【0159】単一の命令で、複数の汎用レジスタと復帰
動作と、サブルーチンまたは例外処理ルーチンからの復
帰動作を行うことによって、相対的に、命令コード長を
短縮(例えば、2ワード短縮)し、命令のリード回数を
低減して、高速化することができる。
By performing a return operation from a plurality of general-purpose registers and a subroutine or an exception handling routine with a single instruction, the instruction code length can be relatively shortened (for example, two words can be shortened). It is possible to reduce the number of times instructions are read and to increase the speed.

【0160】例えば、C言語などで多用される関数はサ
ブルーチンとされるから、この数に対応する数のサブル
ーチンからの復帰命令が使用されることになる。関数毎
に必要なデータが汎用レジスタに割当てられるから、そ
れ以前の汎用レジスタの内容の退避/復帰を伴う。従っ
て、かかる復帰命令による命令コード長の短縮効果も大
きくなる。
For example, since a function frequently used in the C language or the like is a subroutine, a return instruction from the subroutine corresponding to this number is used. Since necessary data is allocated to the general-purpose register for each function, the previous contents of the general-purpose register are saved / restored. Therefore, the effect of shortening the instruction code length by such a return instruction also increases.

【0161】また、関数毎に、退避/復帰する汎用レジ
スタ本数も異なるから、レジスタの本数の異なる命令を
複数命令サポートすることによって、或いは、汎用レジ
スタの復帰を伴わない復帰命令もサポートして、プログ
ラムの作成を容易にし、使い勝手を向上することができ
る。
Further, since the number of general-purpose registers to be saved / restored differs for each function, a plurality of instructions having different numbers of registers are supported, or a return instruction without the restoration of general-purpose registers is also supported. This makes it easy to create programs and improves usability.

【0162】CPUの有する汎用レジスタ本数が多い場
合にも、復帰する汎用レジスタを指定可能にしているか
ら、汎用レジスタの使用方法の自由度を損なうことが少
ない。また、不所望の汎用レジスタの退避/復帰を行っ
たりするこがない。
Even when the number of general-purpose registers of the CPU is large, the general-purpose register to be returned can be specified, so that the degree of freedom in the use of the general-purpose registers is hardly impaired. Further, there is no need to save / restore an undesired general-purpose register.

【0163】複数の汎用レジスタを指定する固定の組合
わせにすることによって、命令コード長を短縮でき、更
に、各命令の実行ステート数を固定にすることにより、
内部の条件分岐を行うことを少なくし(命令デコーダの
入力opcodeに応じて、デコーダを記述すればよ
い)、内部論理を簡潔にし、論理規模を縮小できる。マ
イクロプログラムによらず、ワイアードロジックなどで
も容易に実現できる。マイクロプログラムによらず、ワ
イアードロジックなどとすることにより、論理回路の高
速化に寄与することができる。レジスタデコーダにイン
クリメンタを持つことによって、論理的規模の増加を最
小限にして、連続した任意の組合せを指定可能にでき
る。
By using a fixed combination designating a plurality of general-purpose registers, the instruction code length can be shortened. Further, by fixing the number of execution states of each instruction,
The number of internal conditional branches is reduced (the decoder may be described according to the input opcode of the instruction decoder), the internal logic is simplified, and the logic scale can be reduced. It can be easily realized by wired logic or the like without using a microprogram. By using wired logic or the like regardless of the microprogram, it is possible to contribute to speeding up of a logic circuit. By providing the register decoder with an incrementer, an increase in logical scale can be minimized, and a continuous arbitrary combination can be designated.

【0164】同様の指定を可能にした、汎用レジスタの
退避命令(STM)を持ち、これをサブルーチン乃至例
外処理ルーチンの先頭で実行し、最後に、本発明の復帰
命令を実行することによって、より一層の使い勝手を向
上できる。汎用レジスタの退避命令実行時に、退避後に
汎用レジスタをクリアすることにより、更に、命令コー
ド長を短縮し、実行ステート数を短縮できる。
A general-purpose register save instruction (STM), which enables the same designation, is executed at the beginning of a subroutine or an exception handling routine, and finally, the return instruction of the present invention is executed. Further usability can be improved. By clearing the general-purpose register after saving when executing the general-purpose register save instruction, the instruction code length can be further reduced, and the number of execution states can be reduced.

【0165】また、データのリード/ライトを連続して
行うことによって、メモリに対するバースト動作などや
バス幅を拡張する場合にも、これらを有効に利用しやす
い。
In addition, by performing data read / write continuously, it is easy to effectively use them even when a burst operation to a memory or the like is required or when the bus width is expanded.

【0166】ソースプログラムレベルまたはオブジェク
トプログラムレベルで、既存のCPUの命令セットを包
含した上で、上記命令を追加することによって、ソフト
ウェア資産を有効に利用することができ、使用者のソフ
トウェア開発効率を向上することができる。ソースプロ
グラムレベルまたはオブジェクトプログラムレベルで互
換性を保つことによる利点と前記転送命令を追加するこ
との利点の双方を享受することができる。
At the source program level or the object program level, by including the existing CPU instruction set and adding the above instructions, software resources can be effectively used, and the software development efficiency of the user can be improved. Can be improved. It is possible to enjoy both the advantage of maintaining compatibility at the source program level or the object program level and the advantage of adding the transfer instruction.

【0167】以上本発明者等によってなされた発明を実
施例に限定されるものではなく、その要旨を逸脱しない
範囲において種々変更可能である。
The invention made by the present inventors is not limited to the embodiments, but can be variously modified without departing from the gist of the invention.

【0168】命令コードは一例であり、種々変更が可能
である。既存の命令セットに追加するほか、新規の命令
セットを開発する場合に適用することが可能であること
は言うまでもない。
The instruction code is an example, and various changes can be made. It goes without saying that the present invention can be applied to a case where a new instruction set is developed in addition to an existing instruction set.

【0169】例外処理におけるスタックの構造は、CC
RとPCを組合せて32ビットとしたが、これらは、1
6ビットと32ビットに分割したり、そのほかのコント
ロールレジスタを追加したりすることもできる。PCも
32ビットとしてもよい。
The structure of the stack in exception processing is CC
Although R and PC are combined to form 32 bits,
It can be divided into 6 bits and 32 bits, and other control registers can be added. The PC may also be 32-bit.

【0170】汎用レジスタの構成や本数など、或いは復
帰命令で復帰する汎用レジスタの本数などは任意に変更
できる。復帰する汎用レジスタの本数は1本でもよい。
スタックに格納される順序なども任意に変更できる。汎
用レジスタを復帰する場合、PC(及びCCR)と連続
してリードする方が都合がよい。
The configuration and number of general-purpose registers and the number of general-purpose registers to be restored by a return instruction can be arbitrarily changed. The number of general-purpose registers to be restored may be one.
The order in which they are stored in the stack can be arbitrarily changed. When restoring a general-purpose register, it is more convenient to read continuously from the PC (and CCR).

【0171】インクリメンタ(RINC)も、インクリ
メント/デクリメントを行うほか、命令デコーダの出力
との加算/減算を行うようにしてもよい。本発明の復帰
命令の場合、命令コードのレジスタ指定フィールドに対
して、1/2/3を順次減算するようにしてもよい。命
令コード中に含まれるレジスタ指定フィールドも、最初
に指定する汎用レジスタに対応している必要は必ずしも
ない。前記加算/減算と組合せて、所望の汎用レジスタ
を指定できればよい。
The incrementer (RINC) may perform the addition / subtraction with the output of the instruction decoder in addition to the increment / decrement. In the case of the return instruction of the present invention, 1/2/3 may be sequentially subtracted from the register designation field of the instruction code. The register specification field included in the instruction code does not necessarily need to correspond to the general-purpose register specified first. It suffices if a desired general-purpose register can be specified in combination with the addition / subtraction.

【0172】復帰する汎用レジスタとして、スタックポ
インタであるER7が指定された場合は、ER7への書
込みを禁止するとよい。スタックポインタの退避/復帰
は意味がなく、所定のポイント動作を行えばよいからで
ある。
When the stack pointer ER7 is specified as the general register to be returned, writing to ER7 may be prohibited. This is because saving / restoring the stack pointer is meaningless and a predetermined point operation may be performed.

【0173】汎用レジスタの退避命令実行時に、退避後
に汎用レジスタをクリアする命令と、保持する命令の両
方を持ってもよい。当該命令コードの第1ワードの所定
のビットでこれを指定して、制御信号(MOD)を発生
して、第2ワードの動作を変更するようにすればよい。
At the time of execution of the general-purpose register save instruction, both the instruction to clear the general-purpose register after the save and the instruction to hold the general-purpose register may be provided. This may be specified by a predetermined bit of the first word of the instruction code, a control signal (MOD) may be generated, and the operation of the second word may be changed.

【0174】汎用レジスタのクリアの内容は0に限定さ
れず、他の値にしてもよい。クリアする内容を指定する
手段を別に設けてもよい。
The content of the clear of the general-purpose register is not limited to 0, but may be another value. A means for designating the content to be cleared may be provided separately.

【0175】命令の基本単位も16ビットに限定されな
い。8ビット単位、32ビット単位でも、本発明の復帰
命令は適用可能である。
The basic unit of an instruction is not limited to 16 bits. The return instruction of the present invention can be applied to an 8-bit unit or a 32-bit unit.

【0176】簡単のために、バス幅を32ビットとし、
命令リードを16ビット単位としたが、命令リードを3
2ビット単位にして高速化することができる。このよう
な例は、特願平11−167812に記載されている。
また、バス幅を16ビットとして、ロングワードのリー
ド/ライトを、ワード単位の2回のリード/ライトで実
行するようにしてもよい。このような例は、特願平11
−320518に記載されている。
For simplicity, the bus width is set to 32 bits.
Instruction read is in 16-bit units, but instruction read is 3 bits.
The speed can be increased in units of 2 bits. Such an example is described in Japanese Patent Application No. 11-167812.
Alternatively, the read / write of a long word may be executed by two read / write operations in word units with a bus width of 16 bits. Such an example is disclosed in Japanese Patent Application No.
-320518.

【0177】マイクロコンピュータのその他の機能ブロ
ックについても何等制約されない。
The other functional blocks of the microcomputer are not restricted at all.

【0178】以上の説明では主として本発明者によって
なされた発明をその背景となった利用分野であるマイク
ロコンピュータに適用した場合について説明したが、そ
れに限定されるものではなく、その他のデータ処理装置
にも適用可能であり、本発明は少なくとも、複数のレジ
スタ手段を有するデータ処理装置に適用することができ
る。
In the above description, the case where the invention made by the present inventor is mainly applied to a microcomputer which is the background of the application has been described. However, the present invention is not limited to this, and it is applicable to other data processing devices. The present invention can be applied to at least a data processing device having a plurality of register means.

【0179】[0179]

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

【0180】サブルーチンから、または例外処理からの
復帰命令において、当該命令コードに複数の汎用レジス
タを指定する情報を含み、当該命令コードの実行時に、
プログラムカウンタの復帰に加えて、前記指定した汎用
レジスタの復帰を行うようにすることにより、使い勝手
を向上し、プログラム容量と実行ステート数を短縮でき
る。
In a return instruction from a subroutine or from exception processing, the instruction code includes information for specifying a plurality of general-purpose registers, and when the instruction code is executed,
By restoring the designated general-purpose register in addition to restoring the program counter, usability is improved, and the program capacity and the number of execution states can be reduced.

【0181】更に、指定する汎用レジスタの組合せを連
続したものにすることにより、命令コード長を短縮で
き、更に、各命令の実行ステート数を固定にすることに
より、内部の条件分岐を行うことを少なくし、内部論理
を簡潔にし、論理規模を縮小できる。16ビット単位の
可変長の命令コード体系を採る場合にも、命令プリフェ
ッチや命令デコードを簡易にしつつ、命令コードを有効
に利用して、全体的なプログラム効率を向上できる。
Furthermore, the instruction code length can be shortened by making the combination of designated general registers continuous, and the internal conditional branch can be made by fixing the number of execution states of each instruction. It can reduce the number, simplify the internal logic, and reduce the logic scale. Even when a 16-bit variable length instruction code system is adopted, the overall program efficiency can be improved by effectively using instruction codes while simplifying instruction prefetching and instruction decoding.

【0182】同様の指定を可能にした、汎用レジスタの
退避命令を持ち、これをサブルーチン乃至例外処理ルー
チンの先頭で実行し、最後に、本発明の復帰命令を実行
することによって、より一層の使い勝手を向上できる。
[0187] A general-purpose register save instruction enabling the same designation is executed at the head of a subroutine or an exception handling routine, and finally, the return instruction of the present invention is executed, thereby further improving usability. Can be improved.

【0183】汎用レジスタの復帰と、プログラムカウン
タなどの復帰を連続的に行うことによって、内部の動作
を容易にし、高速化できる。
By continuously performing the return of the general-purpose register and the return of the program counter and the like, the internal operation can be facilitated and the speed can be increased.

【0184】レジスタの本数の異なる復帰命令を複数サ
ポートすることによって、また、連続した汎用レジスタ
の指定を可能にして、更に、プログラムの作成を容易に
し、使い勝手を向上することができる。
By supporting a plurality of return instructions having different numbers of registers, continuous general-purpose registers can be specified, and further, the creation of a program can be facilitated and the usability can be improved.

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

【図1】本発明の適用されたマイクロコンピュータのブ
ロック図。
FIG. 1 is a block diagram of a microcomputer to which the present invention is applied.

【図2】CPUに内蔵されている汎用レジスタ及び制御
レジスタの構成例の図。
FIG. 2 is a diagram showing a configuration example of a general-purpose register and a control register built in a CPU.

【図3】CPUの構成例の図。FIG. 3 illustrates a configuration example of a CPU.

【図4】レジスタセレクタRDECの一部の詳細ブロッ
ク図。
FIG. 4 is a detailed block diagram of a part of a register selector RDEC.

【図5】複数汎用レジスタの復帰を含む第1の復帰命令
(RTS/n)、第2の復帰命令(RTE/n)の命令
フォーマット図。
FIG. 5 is an instruction format diagram of a first return instruction (RTS / n) and a second return instruction (RTE / n) including the return of a plurality of general-purpose registers.

【図6】複数汎用レジスタの復帰を含む第1の復帰命令
(RTS/n)、第2の復帰命令(RTE/n)のスタ
ックの構成例の図。
FIG. 6 is a diagram illustrating a configuration example of a stack of a first return instruction (RTS / n) and a second return instruction (RTE / n) including the return of a plurality of general-purpose registers.

【図7】第1の復帰命令(RTS/n)の動作フローの
図。
FIG. 7 is a diagram illustrating an operation flow of a first return instruction (RTS / n);

【図8】第1の復帰命令(RTS/n)の実行タイミン
グの図。
FIG. 8 is a diagram illustrating execution timing of a first return instruction (RTS / n).

【図9】第2の復帰命令(RTE/n)の動作フローの
図。
FIG. 9 is a diagram showing an operation flow of a second return instruction (RTE / n).

【図10】第2の復帰命令(RTE/n)の実行タイミ
ングの図。
FIG. 10 is a diagram illustrating execution timing of a second return instruction (RTE / n).

【図11】複数汎用レジスタの退避命令(STM)の動
作フローの図。
FIG. 11 is a diagram showing an operation flow of a save instruction (STM) for a plurality of general-purpose registers.

【図12】複数汎用レジスタの退避命令(STM)の実
行タイミングの図。
FIG. 12 is a diagram of execution timing of a save instruction (STM) for a plurality of general-purpose registers.

【図13】本発明のCPUの開発環境の概略図。FIG. 13 is a schematic diagram of a development environment of a CPU of the present invention.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】所定の命令を順次実行するデータ処理装置
であって、複数のレジスタ手段を有し、スタックからリ
ードした内容に基づく命令のリード動作(PCの復帰)
と、命令コード中に指定された情報に従って、スタック
からリードした別の内容を、前記レジスタ手段の内、少
なくとも1つに書込む動作とを行う復帰命令(RTS/
2、RTE/2)の命令実行手段を有することを特徴と
するデータ処理装置。
1. A data processing device for sequentially executing a predetermined instruction, comprising a plurality of register means, and an instruction read operation (PC return) based on the contents read from a stack.
And a return instruction (RTS / RTS) for writing another content read from the stack into at least one of the register means in accordance with the information specified in the instruction code.
(2, RTE / 2) instruction processing means.
【請求項2】請求項1記載のデータ処理装置であって、
レジスタ指定手段と算術演算手段(RINC)を含み、
前記復帰命令は、スタックからリードした別の複数の内
容を、前記レジスタ手段の内、命令コード中に指定され
た情報と、算術演算手段とによって指示される複数に書
込む動作とを行うことを特徴とするデータ処理装置。
2. The data processing device according to claim 1, wherein:
A register designating means and an arithmetic operation means (RINC),
The return instruction performs an operation of writing another plurality of contents read from the stack to the information specified in the instruction code and the plurality of contents specified by the arithmetic operation means in the register means. Characteristic data processing device.
【請求項3】請求項1乃至2記載のデータ処理装置であ
って、書込むレジスタ手段の数の異なる複数の復帰命令
の命令実行手段を有することを特徴とするデータ処理装
置。
3. A data processing apparatus according to claim 1, further comprising instruction execution means for a plurality of return instructions having different numbers of register means for writing.
【請求項4】請求項1乃至3記載のデータ処理装置であ
って、スタックからリードした内容に基づく命令のリー
ド動作(PCの復帰)を行う別の復帰命令の命令実行手
段を有することを特徴とするデータ処理装置。
4. A data processing apparatus according to claim 1, further comprising an instruction execution unit for another return instruction for performing an instruction read operation (PC return) based on the contents read from the stack. Data processing device.
【請求項5】請求項2乃至4記載のデータ処理装置であ
って、命令コード中に指定された情報と、算術演算手段
とによって指示される複数のレジスタ手段のスタックへ
のライトを行う転送命令(STM)の命令実行手段を有
することを特徴とするデータ処理システム。
5. A data processing apparatus according to claim 2, wherein said instruction specified in said instruction code and a plurality of register means specified by said arithmetic operation means write to said stack. A data processing system comprising (STM) instruction execution means.
JP2000357619A 2000-11-20 2000-11-20 Data processing device Expired - Fee Related JP3786575B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000357619A JP3786575B2 (en) 2000-11-20 2000-11-20 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000357619A JP3786575B2 (en) 2000-11-20 2000-11-20 Data processing device

Publications (3)

Publication Number Publication Date
JP2002157115A true JP2002157115A (en) 2002-05-31
JP2002157115A5 JP2002157115A5 (en) 2005-06-30
JP3786575B2 JP3786575B2 (en) 2006-06-14

Family

ID=18829646

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000357619A Expired - Fee Related JP3786575B2 (en) 2000-11-20 2000-11-20 Data processing device

Country Status (1)

Country Link
JP (1) JP3786575B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015510189A (en) * 2012-02-08 2015-04-02 エイアールエム リミテッド Keeping secure data isolated from non-secure access when switching between domains
JP2016179071A (en) * 2015-03-24 2016-10-13 京楽産業.株式会社 Game machine
JP2017205646A (en) * 2017-09-01 2017-11-24 京楽産業.株式会社 Game machine
JP2017205644A (en) * 2017-09-01 2017-11-24 京楽産業.株式会社 Game machine
US10025923B2 (en) 2012-02-08 2018-07-17 Arm Limited Data processing apparatus and method for protecting secure data and program code from non-secure access when switching between secure and less secure domains
US10083040B2 (en) 2012-02-08 2018-09-25 Arm Limited Exception handling in a data processing apparatus having a secure domain and a less secure domain

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015510189A (en) * 2012-02-08 2015-04-02 エイアールエム リミテッド Keeping secure data isolated from non-secure access when switching between domains
US10025923B2 (en) 2012-02-08 2018-07-17 Arm Limited Data processing apparatus and method for protecting secure data and program code from non-secure access when switching between secure and less secure domains
US10083040B2 (en) 2012-02-08 2018-09-25 Arm Limited Exception handling in a data processing apparatus having a secure domain and a less secure domain
US10169573B2 (en) 2012-02-08 2019-01-01 Arm Limited Maintaining secure data isolated from non-secure access when switching between domains
JP2016179071A (en) * 2015-03-24 2016-10-13 京楽産業.株式会社 Game machine
JP2017205646A (en) * 2017-09-01 2017-11-24 京楽産業.株式会社 Game machine
JP2017205644A (en) * 2017-09-01 2017-11-24 京楽産業.株式会社 Game machine

Also Published As

Publication number Publication date
JP3786575B2 (en) 2006-06-14

Similar Documents

Publication Publication Date Title
JP2834837B2 (en) Programmable controller
JP3546980B2 (en) Data processing device
US20080201564A1 (en) Data processor
US6567910B2 (en) Digital signal processing unit with emulation circuitry and debug interrupt enable register indicating serviceable time-critical interrupts during real-time emulation mode
JP4004915B2 (en) Data processing device
KR20010007031A (en) Data processing apparatus
JP2006313561A (en) Data processor
US6986028B2 (en) Repeat block with zero cycle overhead nesting
JPH07120338B2 (en) Method for a data processor to coordinate the execution of instructions by a coprocessor and the data processor
JP3786575B2 (en) Data processing device
JP3839835B2 (en) Data processing apparatus and microcomputer
JPH10124312A (en) Central processor
JP3760093B2 (en) Microcomputer
JP4545777B2 (en) Data processing device
JP3740321B2 (en) Data processing device
JPS6273333A (en) Emulation control system
JP4498338B2 (en) Data processing device
JP2003162411A (en) Data processor
JP2002132499A (en) Data processing apparatus and recording medium
JP3097602B2 (en) Data processing device
JP4029016B2 (en) Data processing device
JP4382076B2 (en) Data processing device
JP2001337821A (en) Data processing device
JPH0667896A (en) Single chip microcomputer
JPH08234982A (en) Parallel processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040326

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040329

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041008

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20041008

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050906

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051107

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051213

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060213

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: 20060306

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060320

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: 20090331

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100331

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110331

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110331

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: 20110331

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: 20110331

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120331

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130331

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130331

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140331

Year of fee payment: 8

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees