Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3786575B2 - Data processing device - Google Patents
[go: Go Back, main page]

JP3786575B2 - Data processing device - Google Patents

Data processing device Download PDF

Info

Publication number
JP3786575B2
JP3786575B2 JP2000357619A JP2000357619A JP3786575B2 JP 3786575 B2 JP3786575 B2 JP 3786575B2 JP 2000357619 A JP2000357619 A JP 2000357619A JP 2000357619 A JP2000357619 A JP 2000357619A JP 3786575 B2 JP3786575 B2 JP 3786575B2
Authority
JP
Japan
Prior art keywords
instruction
register
general
stack
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2000357619A
Other languages
Japanese (ja)
Other versions
JP2002157115A5 (en
JP2002157115A (en
Inventor
直幹 三ツ石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Technology Corp
Original Assignee
Renesas Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to 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

Images

Landscapes

  • Executing Machine-Instructions (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、データ処理装置に関し、特に、半導体集積回路装置によって構成されるマイクロコンピュータにかかり、これらの中央処理装置(CPU)など、及びこれらを用いたデータ処理システム、更に、この開発装置に利用して有効な技術に関するものである。
【0002】
【従来の技術】
半導体集積回路装置の製造技術の高度化に伴って、半導体単結晶からなるシングルチップに、中央演算処理装置(Central Processing Unit;以下、単にCPUと称する)、プログラムを格納するROM(ReadOnly Memory)、書き替え可能に各種データを格納するRAM(Random Access Memory)等を含む構成素子を集積して製造した、マイクロコンピュータが広範囲に普及してきており、種々の目的のデータ処理装置として使用されてきている。このマイクロコンピュータは、CPUが同時に処理し得る情報の量によって性能が異なり、例えば4ビット、8ビット、16ビット、32ビット等のマイクロコンピュータとして区分されている。
【0003】
このようなマイクロコンピュータは、アドレス空間の拡張や、命令セットの拡大、高速化等が図られてきている。また、CPUは、ソフトウェアによってその性能が定義されているから、前記のようにアドレス空間の拡張や、命令セットの拡大、高速化等を図ったマイクロコンピュータにおいても、既存のマイクロコンピュータのソフトウェア資産を有効に利用できることが望ましい。
【0004】
このため、オブジェクトレベルで互換性を保ちつつ、アドレス空間の拡張や、命令セットの拡大、高速化等を実現した例として、例えば本発明者が先に提案した特開平6−51981号公報がある。これは16ビット単位の可変長命令で、いわゆる汎用レジスタ型、或いはロードストア型アーキテクチャを採用することが示されている。
【0005】
プログラム用のメモリであるROMを内蔵した、シングルチップ型のものにあっては、内蔵ROMの容量が、外部にメモリを接続するのに比較して、少ないから、プログラム容量を削減することが望ましい。
【0006】
16ビット単位の可変長命令を採用した場合、オペレーションコードのみを持ち、実効アドレスの指定を行わず、かつ有意味な命令として、復帰(RTS/RTE)命令がある。かかる復帰命令を16ビット単位の命令に割当てる場合、16ビットの命令コードの全てのビットが利用されていない場合が多い。
【0007】
例えば、命令コードH’5470がサブルーチンからの復帰命令であって、H’5471、H’5472、H’5473が未定義(他の命令として定義されていない)とされているような場合、ビット0、ビット1は利用されていない。
【0008】
一方、本発明者らが先に提案した特開平8−263290号公報に記載のCPUは、命令を実行する実行手段を制御する制御手段に指定可能な複数の汎用レジスタの組合せを固定にし、複数の汎用レジスタのスタックに対する退避/復帰命令を有し、複数の汎用レジスタを順次待避/復帰するようにしている。汎用レジスタの組合せを固定にすることによって、汎用レジスタの指定に要するビット数を節約できる。
【0009】
かかる退避/復帰命令は、サブルーチンや例外処理などの、処理の切れ目で、それ以前の処理の状態を保存する目的に用いられ、アドレッシングモードは、スタックポインタのプリデクリメント(待避)/ポストインクリメント(復帰)にが使用できる。
【0010】
つまり、かかる汎用レジスタの復帰命令は、前記サブルーチンまたは例外処理からの復帰命令(RTS/RTE)の前に置かれることが多い。
【0011】
いわゆるアキュムレータ型アーキテクチャのCPUにおいては、サブルーチンへの分岐/サブルーチンからの復帰時に、PCに加えて、アキュムレータの退避/復帰を行う場合がある。これは、データの処理が少数のアキュムレータ上で行われ、サブルーチンのように処理が変わるときには、アキュムレータを空ける必要があるためである。換言すれば、アキュムレータを自動的に退避/復帰を行っても、無駄にならないからである。
【0012】
これに対して、汎用レジスタ型アーキテクチャのCPUにおいては、汎用レジスタのいずれにデータを置くかについて、自由度が高く、また、サブルーチンへの分岐/サブルーチンからの復帰時の引数が、汎用レジスタに割当てられる場合もある。このため、所定の(全部または一部の)汎用レジスタの退避/復帰を自動的に行うと、無駄になりやすい。不所望の汎用レジスタの退避/復帰によって、実行ステート数や、スタックの使用量が増加してしまうからである。
【0013】
マイクロコンピュータのプログラムはC言語で記述されることが多くなっている。C言語で多く用いられる関数は、サブルーチンとして実現される。
【0014】
【発明が解決しようとする課題】
本発明が解決しようとする問題点は、
マイクロコンピュータなどのデータ処理装置、その論理的規模の増加を最小限にしつつ、使い勝手を向上し、プログラム容量を縮小したり、実行ステート数を短縮したりする手段を提供することにある。
【0015】
特に、C言語などを使用したプログラムにおいて、関数を多用した場合のプログラム容量の縮小、実行ステート数の短縮を図ることである。
【0016】
また、既存のソフトウェア資産を有効に利用可能にし、使用者の開発効率を向上するとともに、開発装置を共通に利用可能にし、開発装置の開発効率を向上するとともに、いち速く開発環境を提供可能にすることである。
【0017】
本発明の前記ならびにそのほかの目的と新規な特長は、本発明書の記述及び添付図面から明らかになるであろう。
【0018】
【課題を解決するための手段】
本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。
【0019】
本発明のデータ処理装置は、サブルーチンから、または例外処理からの復帰命令において、当該命令コードに複数の汎用レジスタを指定する情報を含み、当該命令コードの実行時に、プログラムカウンタの復帰に加えて、前記指定した汎用レジスタの復帰を行うようにする。
【0020】
更に、指定する汎用レジスタの組合せを連続したものにする。
【0021】
同様の指定を可能にした、汎用レジスタの退避命令を実行可能にする。
【0022】
上記した手段によれば、
サブルーチンから、または例外処理からの復帰命令と、汎用レジスタの復帰命令を同一の命令(例えば16ビット)とすることにより、使い勝手を向上し、プログラム容量を短縮できる。
【0023】
16ビット単位の可変長の命令コード体系を採る場合にも、命令プリフェッチや命令デコードを簡易にしつつ、命令コードを有効に利用して、全体的なプログラム効率を向上できる。
【0024】
同様の指定を可能にした、汎用レジスタの退避命令を持ち、これをサブルーチン乃至例外処理ルーチンの先頭で実行し、最後に、本発明の復帰命令を実行することによって、より一層の使い勝手を向上できる。
【0025】
指定する汎用レジスタの組合せを固定にすることによって、汎用レジスタを指定する情報を短くでき、限られた命令コード(例えば16ビット)であっても、指定可能にできる。
【0026】
汎用レジスタの復帰と、プログラムカウンタなどの復帰を連続的に行うことによって、内部の動作を容易にし、高速化できる。
【0027】
【発明の実施の形態】
図1に、本発明の適用されたマイクロコンピュータのブロック図を示す。
【0028】
マイクロコンピュータは、シングルチップ型であり、全体の制御を司るCPU、割込コントローラ(INT)、CPUの処理プログラムなどを格納するメモリであるROM、CPUの作業領域ならびにデータの一時記憶用及びスタック用のメモリとすることができるRAM、タイマ、シリアルコミュニケーションインタフェース(SCI)、A/D変換器、第1乃至第9入出力ポート(IOP1〜IOP9)、クロック発振器(CPG)の機能ブロック乃至はモジュールから構成され、公知の半導体製造技術により1つの半導体基板上に形成される。
【0029】
かかるマイクロコンピュータは、電源端子として、グランドレベル(Vss)、電源電圧レベル(Vcc)、アナロググランドレベル(AVss)、アナログ電源電圧レベル(AVcc)、アナログ基準電圧(Vref)、の他専用制御端子として、リセット(RES)、スタンバイ(STBY)、モード制御(MD0、MD1)、クロック入力(EXTAL、XTAL)端子を有する。
【0030】
CPGの端子EXTAL、XTALに接続される水晶発振子またはEXTAL端子に入力れる外部クロックに基づいて生成される基準クロック(システムクロック)に同期して、マイクロコンピュータは動作を行う。この基準クロック1周期をステートと呼ぶ。
【0031】
マイクロコンピュータの機能ブロックは、内部バスによって相互に接続さる。バスの制御を行う、図示はされないバスコントローラを内蔵している。内部バスはアドレスバス・データバスのほか、リード信号・ライト信号・バスサイズ信号を含み、これらはバスコマンドとしてコード化される。
【0032】
かかる機能ブロックやモジュールは内部バスを介して、CPUによってリード/ライトされる。内部バスのデータバス幅は32ビットとする。内蔵ROM、RAMリード/ライトを1ステートでリード/ライト可能とする。
【0033】
タイマ、SCI、A/D変換器、IOP1〜IOP9、SYSC、INT、CPGなどが有する制御レジスタを総称して、内部I/Oレジスタと呼ぶ。
【0034】
各入出力ポートは、アドレスバス、データバス、バス制御信号或いはタイマ、SCI、A/D変換器の入出力端子と兼用されている。即ち、タイマ、SCI、A/D変換器は、それぞれ入出力信号を有し、入出力ポートと兼用にされた端子介して、外部と入出力されるものである。例えばIOP5、6は、タイマの入出力端子と兼用、IOP7はSCIの入出力端子と兼用にされている。アナログデータの入出力(AIN0〜AIN7)端子は、IOP8と兼用にされている。
【0035】
外部割込み入力は、IOP9と兼用にされている。
【0036】
かかるマイクロコンピュータにリセット信号RESが与えられると、CPUを始めとし、マイクロコンピュータはリセット状態になる。このリセットが解除されると、モード制御で指定された動作モード(シングルチップ、外部バス拡張、内蔵ROM有効など)とされ、CPUは所定のアドレス(ベクタアドレス)からスタートアドレスをリードして、このスタートアドレスから命令のリードを開始するリセット例外処理を行う。この後、CPUは逐次、ROMなどから命令をリードし、解読して、その解読内容に基づいて、フラグやビットの判定や操作を含む、データの処理或いはRAM、タイマ、SCI、A/D変換器、入出力ポートなどとのデータ転送を行う。即ち、CPUは、タイマ、SCI、A/D変換器、入出力ポートなどから入力されるデータ或いは機器の状態や指示(スイッチ、ボリュームなど)を参照しつつ、ROMなどに記憶されている命令に基づいて処理を行い、その結果に基づいて、入出力ポート、タイマなどを使用しつつ、外部に信号を出力し、機器の制御を行うものである。
【0037】
割込みコントローラ(INT)は、タイマ、SCI、A/D変換器、外部入力の各割込み信号を入力して、割込み要求信号をCPUに出力する。
【0038】
CPUに割込要求信号が与えられると、CPUは実行中の処理を中断して、割込み例外処理状態を経て、所定の処理ルーチンに分岐し、所望の処理を行い、割込要因をクリアしたりする。所定の処理ルーチンの最後には、通常復帰命令がおかれ、この命令を実行することによって前記中断した処理を再開する。
【0039】
割込み例外処理の実行時には、後述のプログラムカウンタ(PC)やコンディションコードレジスタ(CCR)などがRAMなどに退避され、復帰命令実行時に上記プログラムカウンタ(PC)やコンディションコードレジスタ(CCR)などが復帰される。
【0040】
更に、割込み処理ルーチンでは所要の処理を行うため、汎用レジスタを使用する必要がある。割込み発生直前の状態を保存するため、割込み処理ルーチンの先頭で、所要の汎用レジスタをスタックに退避する。これは、例えば、
STM ER0−ER3,@−SP
と記述される。割込み処理ルーチンの最後に、退避した汎用レジスタを復帰してから、復帰命令(RTE)を実行して、割込み発生直前のプログラムを継続する。これは、従来技術では、例えば、
LDM @SP+,ER0−ER3
RTE
と記述される。
【0041】
本発明によれば、上記LDMとRTE命令を1命令で実行して、
RTE/4 ER0−ER3
と記述すればよいようにする。
【0042】
同様に、サブルーチンにおいても同様に、所要の処理を行うため、汎用レジスタを使用する。例えば、サブルーチンの先頭で、
STM ER0−ER1,@−SP
と記述し、最後に、
LDM @SP+,ER0−ER1
RTS
と記述される。
【0043】
本発明によれば、上記LDMとRTE命令を1命令で実行して、
RTS/2 ER0−ER1
と記述すればよいようにする。
【0044】
図2に、CPUに内蔵されている汎用レジスタ及び制御レジスタの構成例(プログラミングモデル)を示す。
【0045】
CPUは、32ビット長の汎用レジスタを8本持っている。汎用レジスタは、すべて同機能を持っており、アドレスレジスタとしてもデータレジスタとしても使用することができる。
【0046】
データレジスタとしては32ビット、16ビット及び8ビットレジスタとして使用きる。アドレスレジスタ及び32ビットレジスタとしては、一括して汎用レジスタER(ER0〜ER7)として使用する。16ビットレジスタとしては、汎用レジスタERを分割して汎用レジスタE(E0〜E7)、汎用レジスタR(R0〜R7)として使用する。これらは同等の機能を持っており、16ビットジスタを最大16本まで使用することができる。なお、汎用レジスタE(E0〜E7)を、特に拡張レジスタと呼ぶ場合がある。8ビットレジスタとしては、汎用レジスタRを分割して汎用レジスタRH(R0H〜R7H)、汎用レジスタRL(R0L〜R7L)として使用する。これらは同等の機能を持っており、8ビットレジスタを最大16本まで使用することができる。各レジスタ独立に使用方法を選択することができる。
【0047】
汎用レジスタER7には、汎用レジスタとしての機能に加えて、スタックポインタ(SP)としての機能が割当てられており、例外処理やサブルーチン分岐などで暗黙的に使用される。例外処理は前記割込み処理を含む。
【0048】
PCは24ビットのカウンタで、CPUが次に実行する命令のアドレスを示す。特に制限されないもののCPUの命令は、すべて2バイト(ワード)を単位としているため、最下位ビットは無効であり、命令リード時には最下位ビットは0とみなされる。
【0049】
CCRは8ビットのレジスタで、割込みマスクビット(I)とハーフキャリ(H)、ネガティブ(N)、ゼロ(Z)、オーバフロー(V)、キャリ(C)の各フラグを含む。ハーフキャリ(H)、ネガティブ(N)、ゼロ(Z)、オーバフロー(V)、キャリ(C)の各フラグは転送命令や演算命令実行時に、データを検査して、その状態を反映する。ハーフキャリ(H)は10進補正用にのみ用いられる。
【0050】
図3に、CPUの構成例を示す。
【0051】
CPUは、制御部と、前記汎用レジスタER0〜ER31、プログラムカウンタPC、コンディションコードレジスタCCRを含む実行部から構成される。
【0052】
制御部は、命令レジスタIR、命令デコーダDEC、レジスタセレクタRESL、割込受け付け回路INTを含む。命令デコーダDECは、例えば、マイクロROM或PLA(Programmable Logic Array)または布線論理で構成される。命令デコーダDECの出力の一部が命令デコーダDECにフィードバックされている。これは各命令コード内の遷移に用いるステージコード(TMG)と、命令コード間に用いる制御信号(MOD)を含む。即ち、前記STM命令の第1ワードは汎用レジスタの本数を指定する制御信号を発生し、割込みマスク信号を出力して、割込みの受付けを禁止する。
【0053】
割込み制御部INTは、後述の図1の割込みコントローラの出力する割込み要求信号を受け付ける。また、命令デコーダの出力する割込みマスク信号を参照して、割込みがマスクされていなければ、命令変更部CHGに割込みを指示し、割込み例外処理用の命令コードの実行を行わせる。
【0054】
実行部には、更に、テンポラリレジスタTR、算術論理演算器ALU、インクリメンタINC、リードデータバッファDBR、ライトデータバッファDBW、アドレスバッファABを含む。これらのブロックはGBバス、DBバス、WBバスによって相互に接続されている。
【0055】
算術論理演算器ALUは、命令によって指定される各種の演算や実効アドレスの計算など用いる。
【0056】
インクリメンタINCは、主にPCの加算やアドレス計算に用いられる。
【0057】
DBRは、ROM、RAM、内部I/Oレジスタ、或いは図示はされない外部メモリから、リードした命令コードやデータを一時的に格納する。DBWはROM、RAM、内部I/Oレジスタ、或いは外部メモリへのライトデータを一時的に格納する。DBR、DBWによってCPU内部動作と、CPU外部のリード/ライト動作のタイミングを調整している。
【0058】
アドレスバッファABは、CPUがリード/ライトするアドレスを一時的に格納する。
【0059】
図4に、レジスタセレクタRESLの一部の詳細なブロック図を示す。
【0060】
レジスタセレクタRESLは、レジスタフィールドを保持するIRから出力されるレジスタフィールド情報と、命令デコーダDECの制御信号出力を入力して、各汎用レジスタに対応するレジスタ選択信号を発生する。
【0061】
レジスタ指定フィールドは2つある(r1、r2)。
【0062】
第2のレジスタ指定フィールド(r2)は、IRのビット3〜0と、命令デコーダの制御信号出力(inc、dec)から生成される。
【0063】
上記を入力したインクリメンタ(RINC)の出力が、システムクロックの反転φ#でラッチされ、第2のレジスタ指定フィールド(r2)となる。
【0064】
例えば、
STM ER0−ER3,@−SP
の場合、r2の初期値として、0が与えられる。その後、後述の所定のタイミングで、インクリメント信号(inc)によって、r2は0→1→2→3とされる。
【0065】
また、
LDM @SP+,ER0−ER1
または、
RTS/2 ER0−ER1
の場合、r2の初期値として、1が与えられる。その後、後述の所定のタイミングで、インクリメント信号(dec=rd――)によって、r2は1→0とされる。
【0066】
これによって、レジスタ選択回路自体をそのほかの命令と共通化することが、論理的規模の増加を抑止できる。
【0067】
r2のビット3は、これらの命令では使用しないため、インクリメンタ(RINC)は3ビットでよい。インクリメンタ(RINC)を持つことにより、さほど論理規模を大きくすることなく、連続した任意の汎用レジスタの組合せを指定可能にできる。
【0068】
なお、その他のRESLの詳細については省略する。
【0069】
図5に、複数汎用レジスタの復帰を含む第1の復帰命令(RTS/n)、第2の復帰命令(RTE/n)の命令フォーマットを示す。
【0070】
第1の復帰命令(RTS/n)は、サブルーチンからの復帰命令であり、第2の復帰命令(RTE/n)は、例外処理ルーチンからの復帰命令である。
【0071】
ビット15〜7はオペレーションフィールドであり、復帰命令を指定する。
【0072】
ビット6が0のとき、ビット5、4によって、汎用レジスタの本数を指定する。01のときは2本、10のときは3本、11のときは4本とする。汎用レジスタの選択は、連続した2、3、4本の選択が可能である。例えば、4本の場合には、ER0−3、ER1−4、ER2−5、ER3−6、が指定可能である。ER7は、スタックポインタと兼用であり、対象としない。
【0073】
ビット6が1のときは、汎用レジスタの復帰を伴わない。即ち、従来技術の復帰命令と同一であり、共通の命令コード(H’5470)とする。
【0074】
ビット3〜0で最初に使用する汎用レジスタを指定する。ビット3は予約されているものとし、0とする。
【0075】
例えば、RTS/4 ER0−3のときは、ER3から復帰されるので、H’5433の命令コードとなる。
【0076】
第2の復帰命令(RTE/n)も、オペレーションフィールドが異なるのみであり、前記同様である。
【0077】
STM命令の命令フォーマットは、2ワード命令であり、第2ワードのビット3〜0で最初に使用する汎用レジスタを指定する。これは上記復帰命令と共通化されている。
【0078】
LDM命令の命令フォーマットも同様である。
【0079】
図6に、複数汎用レジスタの復帰を含む第1の復帰命令(RTS/n)、第2の復帰命令(RTE/n)のスタックの構成の例を示す。
【0080】
スタックはスタックポインタ(SP:ER7)によって、スタックされた最後のアドレスが指示されている。
【0081】
サブルーチン分岐命令(例えば、BSR命令)によって、プログラムカウンタがスタックに退避される。その後、サブルーチンの先頭で、所要の汎用レジスタが退避される(例えば、STM ER0−ER1,@−SP)。
【0082】
これに対応して、第1の復帰命令(例えば、RTS/2 ER0−ER1)は、まず、指定した汎用レジスタの復帰として、スタックからのリードを行い、指定した汎用レジスタ(ER1、ER0)に順次格納する。引続き、プログラムカウンタの復帰として、スタックからのリードを行い、プログラムカウンタに格納し、この内容に従って、命令のリードを行う。
【0083】
同様に、例外処理によって、プログラムカウンタとコンディションコードレジスタがスタックに退避される。プログラムカウンタが24ビットであり、コンディションコードレジスタと組合せて、スタックに退避される。その後、サブルーチンの先頭で、所要の汎用レジスタが退避される(例えば、STM ER0−ER3,@−SP)。
【0084】
これに対応して、第2の復帰命令(例えば、RTE/4 ER0−ER3)は、まず、指定した汎用レジスタの復帰として、スタックからのリードを行い、指定した汎用レジスタ(ER3、ER2、ER1、ER0)に順次格納する。引続き、プログラムカウンタとコンディションコードレジスタの復帰として、スタックからのリードを行い、プログラムカウンタとコンディションコードレジスタに所定の内容を格納するとともに、命令のリードを行う。
【0085】
図7に、第1の復帰命令(RTS/n)の動作フローを示す。
【0086】
ステップ1で、制御信号Aで、スタックポインタ(SP)の内容がアドレスバス(IAB)に出力され、ロングワードのリードが指示される。また、SPの内容のインクリメント(+4)が指示される。制御信号Cで、リードしたデータのDBRへの格納が指示される。
【0087】
ステップ2〜5で、制御信号Bで、前のステップでリードした内容の汎用レジスタへの書込みが指示される。具体的には、一旦、内部バスGBに出力し、ALUを経由して、内部バスWBに出力し、指定された汎用レジスタに書込まれる。レジスタセレクタRESLに対してレジスタフィールドのデクリメント(−1)が指示される。前記同様に、制御信号Aで、スタックポインタ(SP)の内容のアドレスバス(IAB)への出力と、ロングワードのリードが指示され、SPの内容のインクリメント(+4)が指示される。制御信号Cで、リードしたデータのDBRへの格納が指示される。ステップ2〜4は、指定した汎用レジスタの本数(n)に従って、所定回数が実行される。
【0088】
ステップ6で、制御信号Bで、前のステップでリードした内容のプログラムカウンタ(PC)への書込みが指示される。
【0089】
ステップ7で、制御信号Aで、命令リードとして、プログラムカウンタ(PC)の内容がアドレスバス(IAB)に出力され、メモリワードリードが指示される。また、PCの内容のインクリメント(+2)が指示される。制御信号Cで、リードされた命令をIRに格納する。
【0090】
ステップ8で、同様に、制御信号Aで、プログラムカウンタ(PC)の内容のアドレスバス(IAB)への出力と、メモリワードリードが指示され、PCの内容のインクリメント(+2)が指示される。制御信号Bで、前のステップでリードした命令(IR)の命令デコーダへの入力が指示される。次の命令の実行が開始される。
【0091】
PCの復帰時、スタックからリードした内容を、一旦、PCに格納するものとしたが、これを行わず、ステップ7で、PCの代わりに、DBRから読み出すようにしてもよい。
【0092】
汎用レジスタの復帰を行わない復帰命令の場合は、ステップ2〜5をスキップすればよい。換言すれば、従来技術の復帰命令に、ステップ2〜5を追加すればよい。
【0093】
かかる動作フローに従って、ハードウェア記述言語(HDL)を記述し、命令デコーダDECを生成することができる。第1の復帰命令(RTS/n)に関する部分は、以下の通りである。
【0094】

Figure 0003786575
本記述は、IEEE1364として標準化されているHDL記述言語に従っている。かかるHDL記述言語自体については、1996年7月CQ出版株式会社発行の『入門Verilog−HDL記述』などに記載されている。
【0095】
casex及びcaseは、それに続く()内の変数(opcode、tmg)に応じて、後続の値(16’b01010100_0001????:、4’b0001:など)に一致した動作を実行する。begin〜endで1つの動作が記述される。
【0096】
(1)で、命令デコーダの入力(opcode)による条件を指示する。当該条件で、(2)〜(12)でRTS/2に相当する命令コードの動作が記述される。更に、各命令コード毎に、ステップに相当する命令デコーダの入力(tmg)による条件を指示する。RTS/2の第1ステップの動作は、(4)〜(7)に記述される。(5)で、次のステップ(nexttmg)が第4ステップであることが指定される。nexttmgは1ステート後に、tmgとして命令デコーダに入力される。(6)で、バスコマンドがロングワードリードとされる。long_readはパラメータとして、所定のコードが割当てられるようにしておく。この後に、そのほかの制御信号が記述される。同様に、第4ステップの動作は、(8)〜(11)に記述される。第5〜第8ステップの動作は、これ以降(12)までに記述される。
【0097】
同様に、命令デコーダの入力(opcode)による条件で、(13)以降でRTS/3に相当する命令コードの動作が記述される。第1ステップの動作記述において、(15)で、次のステップ(nexttmg)が第2ステップであることが指定される。また、第2ステップの動作は、(17)以降に記述される。更に、第4〜第8ステップの動作も記述される。
【0098】
更に、その後、RTS/4に相当する命令コードの動作が記述され、第2の復帰命令(RTE/n)、複数レジスタの退避命令(STM)や、その他の命令コードも記述される。
【0099】
図8に、第1の復帰命令(RTS/n)の実行タイミングを示す。
【0100】
n=2の場合の例である。
【0101】
特に制限はされないものの、内蔵ROM、RAMのリード/ライトを1ステートでリード/ライト可能とし、内蔵ROM上にプログラム、内蔵RAM上にスタックを配置した場合のタイミングを示す。
【0102】
T0のφ#(#は反転論理を示す)で、CPUのアドレスバッファ(MAB)かアドレスがIABに出力される。また、命令デコーダから、命令フェッチ(if)を示す、バスコマンド(BCMD)が出力される。
【0103】
T1のφで、IABの内容がPABに出力され、バスコマンドに基づき、リードサイクルが開始され、PDBにデータが出力される。φ#でPDBのリードデータが内部データバスIDBに得られ、これをT2のφでIRにラッチする。以上の動作は以前の命令の実行の制御によって行われる(プリフェッチ)。ここで、内蔵ROM、RAMは、PAB及びPDBに接続されていないが、PAB、PDB相当の動作をモジュール内で行い、本タイミング図には、このモジュール内の動作を示している。
【0104】
直前の命令の実行が終了すると、最も早く命令の実行が開始される場合には、T2のφで命令コードがDECに入力されて、命令の内容が解読される。解読結果に従って、制御信号を出力して、各部の制御を行う。命令の一部(レジスタ指定フィード:r)がレジスタセレクトに与えられる。
【0105】
前記のステップ1として、T2のφ#で、SPの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。ロングワードのリードのバスコマンドが出力される。
【0106】
T3のφで、INCでインクリメント(+4)された結果が、内部バスWBを経由してSPにライトされる。T3のφ#から、スタックからリードしたデータがIDBに出力され、T4のφで、DBRに格納される。
【0107】
ステップ4として、T4のφ及びφ#で、DBRの内容が内部バスGB、ALU、内部バスWBを介して、指定(r)した汎用レジスタに書込まれる。レジスタ指定フィールドがデクリメントされる。前記同様に、T3のφ#で、SPの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。ロングワードのリードのバスコマンドが出力される。T4のφで、INCでインクリメント(+4)された結果が、内部バスWBを経由してSPにライトされる。T4のφ#から、スタックからリードしたデータがIDBに出力され、T5のφで、DBRに格納される。
【0108】
ステップ5として、T5のφ及びφ#で、DBRの内容が内部バスGB、ALU、内部バスWBを介して、指定(r)した汎用レジスタに書込まれる。レジスタ指定フィールドがデクリメントされる。前記同様に、T4のφ#で、SPの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。ロングワードのリードのバスコマンドが出力される。T5のφで、INCでインクリメント(+4)された結果が、内部バスWBを経由してSPにライトされる。T5のφ#から、スタックからリードしたデータがIDBに出力され、T6のφで、DBRに格納される。
【0109】
ステップ6として、T6のφ及びφ#で、DBRの内容が内部バスGB、ALU、内部バスWBを介して、PCに書込まれる。
【0110】
ステップ7として、T6のφ#で、PCの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。T7のφで、INCでインクリメント(+2)された結果が、内部バスWBを経由してPCにライトされる。
【0111】
ステップ8として、T7のφ#で、PCの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。T8のφで、INCでインクリメント(+2)された結果が、内部バスWBを経由してPCにライトされる。T8のφでリードした命令コードが、IRを経由して、DECに入力されて、次の命令が実行される。
【0112】
図9に、第2の復帰命令(RTE/n)の動作フローを示す。
【0113】
第1の復帰命令(RTS/n)に対して、ステップ6で、PCとともに、CCRへの書込みが行われるようにされる。そのほかの動作は同様にできる。
【0114】
図10に、第2の復帰命令(RTE/n)の実行タイミングを示す。
【0115】
n=4の場合の例である。
【0116】
前記同様に、T2のφで命令コードがDECに入力されて、命令の内容が解読される。解読結果に従って、制御信号を出力して、各部の制御を行う。命令の一部(レジスタ指定フィード:r)がレジスタセレクトに与えられる。
【0117】
前記のステップ1として、T2のφ#で、SPの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。ロングワードのリードのバスコマンドが出力される。
【0118】
T3のφで、INCでインクリメント(+4)された結果が、内部バスWBを経由してSPにライトされる。T3のφ#から、スタックからリードしたデータがIDBに出力され、T4のφで、DBRに格納される。
【0119】
ステップ2として、T4のφ及びφ#で、DBRの内容が内部バスGB、ALU、内部バスWBを介して、指定(r)した汎用レジスタに書込まれる。レジスタ指定フィールドがデクリメントされる。前記同様に、T3のφ#で、SPの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。ロングワードのリードのバスコマンドが出力される。T4のφで、INCでインクリメント(+4)された結果が、内部バスWBを経由してSPにライトされる。T4のφ#から、スタックからリードしたデータがIDBに出力され、T5のφで、DBRに格納される。
【0120】
ステップ3として、T5のφ及びφ#で、DBRの内容が内部バスGB、ALU、内部バスWBを介して、指定(r)した汎用レジスタに書込まれる。レジスタ指定フィールドがデクリメントされる。前記同様に、T4のφ#で、SPの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。ロングワードのリードのバスコマンドが出力される。T5のφで、INCでインクリメント(+4)された結果が、内部バスWBを経由してSPにライトされる。T5のφ#から、スタックからリードしたデータがIDBに出力され、T6のφで、DBRに格納される。
【0121】
ステップ4として、T6のφ及びφ#で、DBRの内容が内部バスGB、ALU、内部バスWBを介して、指定(r)した汎用レジスタに書込まれる。レジスタ指定フィールドがデクリメントされる。前記同様に、T5のφ#で、SPの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。ロングワードのリードのバスコマンドが出力される。T6のφで、INCでインクリメント(+4)された結果が、内部バスWBを経由してSPにライトされる。T6のφ#から、スタックからリードしたデータがIDBに出力され、T7のφで、DBRに格納される。
【0122】
ステップ5として、T7のφ及びφ#で、DBRの内容が内部バスGB、ALU、内部バスWBを介して、指定(r)した汎用レジスタに書込まれる。レジスタ指定フィールドがデクリメントされる。前記同様に、T6のφ#で、SPの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。ロングワードのリードのバスコマンドが出力される。T7のφで、INCでインクリメント(+4)された結果が、内部バスWBを経由してSPにライトされる。T7のφ#から、スタックからリードしたデータがIDBに出力され、T6のφで、DBRに格納される。
【0123】
ステップ6として、T6のφ及びφ#で、DBRの内容が内部バスGB、ALU、内部バスWBを介して、CCRとPCに書込まれる。DBRのビット31〜24がCCRに、ビット23〜0がPCに書込まれる。
【0124】
ステップ7として、T8のφ#で、PCの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。T9のφで、INCでインクリメント(+2)された結果が、内部バスWBを経由してPCにライトされる。
【0125】
ステップ8として、T9のφ#で、PCの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。T10のφで、INCでインクリメント(+2)された結果が、内部バスWBを経由してPCにライトされる。T10のφでリードした命令コードが、IRを経由して、DECに入力されて、次の命令が実行される。
【0126】
図11に、複数汎用レジスタの退避命令(STM)の動作フローを示す。
【0127】
ステップ0は、命令コードの第1ワードで制御される。制御信号Aで、プログラムカウンタ(PC)の内容のアドレスバス(IAB)への出力と、メモリワードリードが指示され、PCの内容のインクリメント(+2)が指示される。制御信号Bで、命令コードの第2ワードの命令デコーダへの入力と、第1ワードで指定される汎用レジスタ本数の情報(MOD)が指示される。
【0128】
ステップ1で、制御信号Aで、スタックポインタ(SP)の内容のデクリメント(−4)が指示される。ステップ2〜5で、制御信号Aで、スタックポインタ(SP)の内容のアドレスバス(IAB)への出力と、ロングワードのライトが指示される。制御信号Bで、汎用レジスタの内容のDBWへの格納が指示される。制御信号Cで、DBWの内容のIDBへの出力が指示される。レジスタセレクタRESLに対してレジスタフィールドのインクリメント(−1)が指示される。ステップ2〜4は、SPの内容のデクリメント(−4)が指示される。ステップ2〜5は、指定した汎用レジスタの本数(n)に従って、所定回数が実行される。
【0129】
ステップ6で、制御信号Aで、プログラムカウンタ(PC)の内容のアドレスバス(IAB)への出力と、メモリワードリードが指示され、PCの内容のインクリメント(+2)が指示される。制御信号Bで、前のステップでリードした命令(IR)の命令デコーダへの入力が指示される。次の命令の実行が開始される。
【0130】
ステップ2〜5において、汎用レジスタの内容を、DBWに転送後、当該汎用レジスタの内容を0にクリアするようにするとよい。汎用レジスタを退避した後、0にクリアし、その内容を確定することで、その後の処理を簡略化することができる。
【0131】
例えば、その後、汎用レジスタに0を代入する場合、MOV命令を省略できる。また、1などを代入する場合は、
MOV.L #1,ERn
を使用する代わりに、
MOV.B #1,RnL
を使用することができる。イミディエイトデータは、そのデータサイズに対応した領域を命令コードに持つから、MOV.Lの命令コード長(例えば3ワード)よりも、MOV.Bの命令コード長(例えば1ワード)の方が短い。これによって、プログラム容量の短縮に寄与できる。
【0132】
なお、プログラム中に使用する定数値は、0や1などの比較的小さい値が多いことが一般的である。
【0133】
図12に、複数汎用レジスタの退避命令(STM)の実行タイミングを示す。
【0134】
n=2の場合の例である。
【0135】
T2のφで命令コードの第1ワード(stm−1)がDECに入力されて、命令の内容が解読される。解読結果に従って、制御信号を出力して、各部の制御を行う。命令の一部(レジスタ指定フィード:r)がレジスタセレクトに与えられる。
【0136】
ステップ0として、T2のφ#で、PCの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。T2のφで、INCでインクリメント(+2)された結果が、内部バスWBを経由してPCにライトされる。T3のφでリードした命令コードが、IRを経由して、DECに入力されて、次の命令が実行される。
【0137】
T3のφで命令コードの第2ワード(stm−2)がDECに入力されて、命令の内容が解読される。解読結果に従って、制御信号を出力して、各部の制御を行う。命令の一部(レジスタ指定フィード:r)がレジスタセレクトに与えられる。
【0138】
前記のステップ1として、T3のφ#で、SPの内容を内部バスGBに読み出して、INCに入力する。T3のφで、INCでデクリメント(−4)された結果が、内部バスWBを経由してSPにライトされる。
【0139】
ステップ2として、T4のφ#で、SPの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。ロングワードのライトのバスコマンドが出力される。T5のφで、INCでデクリメント(−4)された結果が、内部バスWBを経由してSPにライトされる。また、指定(r)した汎用レジスタの内容が内部バスDBを介してDBWに書込まれる。レジスタ指定フィールドがインクリメントされる。T5のφ#から、DBWの内容がIDBに出力される。
【0140】
ステップ5として、T5のφ#で、SPの内容を内部バスGBに読み出して、ABを介してアドレスIABが出力される。ロングワードのライトのバスコマンドが出力される。T5のφで、指定(r)した汎用レジスタの内容が内部バスDBを介してDBWに書込まれる。レジスタ指定フィールドがインクリメントされる。T5のφ#から、DBWの内容がIDBに出力される。
【0141】
ステップ6として、T6のφ#で、PCの内容を内部バスGBに読み出して、ABとINCに入力する。ABからアドレスIABが出力される。T7のφで、INCでインクリメント(+2)された結果が、内部バスWBを経由してPCにライトされる。プリフェッチした命令コード(next)が、IRを経由して、DECに入力されて、次の命令が実行される。
【0142】
前記の通り、ステップ2〜5において、T5、T6のφ#で、汎用レジスタの内容を0にクリアする。これは、当該タイミングの内部バスWBを0とし、これを汎用レジスタに書込むようにするとよい。
【0143】
図13に、本発明のCPUの開発環境の概略を示す。
【0144】
使用者は、各種エディタなどを用いて、C言語乃至アセンブリ言語でプログラムを作成する。これは通常、複数のモジュールに分割して作成される。
【0145】
Cコンパイラは、使用者の作成したそれぞれのC言語ソースプログラムを入力し、アセンブリ言語ソースプログラム乃至オブジェクトモジュールを出力する。
【0146】
例えば、C言語でプログラムを作成する場合、
Figure 0003786575
と記述された関数seq0は、本発明のCPUに対しては、以下のようにコンパイルされる。
【0147】
Figure 0003786575
関数内で使用する汎用レジスタER3、ER4をSTM命令でスタックに退避し、0にクリアされる。復帰命令時にスタックから回復される。
【0148】
また、メインプログラムで上記関数seq0を呼び出す場合は、
seq0();
と記述され、
JSR @_seq0
とサブルーチン分岐命令にコンパイルされる。
【0149】
アセンブラは、アセンブリ言語ソースプログラムを入力し、オブジェクトモジュールを出力する。
【0150】
リンケージエディタは、上記Cコンパイラやアセンブラの生成した、複数のオブジェクトモジュールを入力して、各モジュールの外部参照や相対アドレスなどの解決を行い、1つのプログラムに結合して、ロードモジュールを出力する。
【0151】
ロードモジュールは、シミュレータ/デバッガに入力して、パーソナルコンピュータなどのシステム開発装置上で、CPUの動作をシミュレーションし、実行結果を表示し、プログラムの解析や評価を行うことができる。また、エミュレータに入力して、実際の応用システム上などで動作する、いわゆるインサーキットエミュレーションを行ない、マイクロコンピュータ全体としての、実動作の解析や評価を行うことができる。
【0152】
更に、ロードモジュールをPROMライタなどのROM書込み装置に入力して、マイクロコンピュータの内蔵ROMがフラッシュメモリなどの場合や、外部のフラッシュメモリなどに、作成したプログラムをロードすることができる。或いはマイクロコンピュータの製造工程で、内蔵ROMに書込むことも可能である。必要に応じて、オブジェクトコンバータなどによって、所望のフォーマットに変換する。
【0153】
このほかに、ライブラリアンとして、汎用的なサブルーチンなどを提供することもできる。
【0154】
CPU定義情報ファイルは、コンパイル対象のCPUを指定し、本発明の復帰命令を持たない(既存の)CPUと、本発明のCPUとを共通の開発環境を利用可能にする。
【0155】
例えば、CPU定義情報ファイルに、
SET CPU= CPU1;
と記述することによって、本発明のCPUを選択するようにする。
【0156】
コンパイル時に、かかるCPU定義情報ファイルを参照し、本発明の復帰命令を持たないCPUが選択されていれば、前記関数は、
Figure 0003786575
となる。MOV.Lは、当該関数の処理内容に従って、変更になる場合もある。
【0157】
Cコンパイラ自体には、C言語によるプログラムを、CPUの命令に変換する機能のほか、C++言語によるプログラムのコンパイルや、モジュール間最適化などといった、CPUの命令セットとは直接関係のない機能の向上が図られているが、CPU毎の個別のコンパイラでは、これらの機能向上を全ての個別のコンパイラに適用しなければならない。本発明のように、共通のCコンパイラとしておけば、前記、CPUの命令セットとは直接関係のない機能向上を図ることが容易になり、また、開発効率などを向上することができる。
【0158】
上記実施例によれば、以下の作用効果を得るものである。
【0159】
単一の命令で、複数の汎用レジスタと復帰動作と、サブルーチンまたは例外処理ルーチンからの復帰動作を行うことによって、相対的に、命令コード長を短縮(例えば、2ワード短縮)し、命令のリード回数を低減して、高速化することができる。
【0160】
例えば、C言語などで多用される関数はサブルーチンとされるから、この数に対応する数のサブルーチンからの復帰命令が使用されることになる。関数毎に必要なデータが汎用レジスタに割当てられるから、それ以前の汎用レジスタの内容の退避/復帰を伴う。従って、かかる復帰命令による命令コード長の短縮効果も大きくなる。
【0161】
また、関数毎に、退避/復帰する汎用レジスタ本数も異なるから、レジスタの本数の異なる命令を複数命令サポートすることによって、或いは、汎用レジスタの復帰を伴わない復帰命令もサポートして、プログラムの作成を容易にし、使い勝手を向上することができる。
【0162】
CPUの有する汎用レジスタ本数が多い場合にも、復帰する汎用レジスタを指定可能にしているから、汎用レジスタの使用方法の自由度を損なうことが少ない。また、不所望の汎用レジスタの退避/復帰を行ったりするこがない。
【0163】
複数の汎用レジスタを指定する固定の組合わせにすることによって、命令コード長を短縮でき、更に、各命令の実行ステート数を固定にすることにより、内部の条件分岐を行うことを少なくし(命令デコーダの入力opcodeに応じて、デコーダを記述すればよい)、内部論理を簡潔にし、論理規模を縮小できる。マイクロプログラムによらず、ワイアードロジックなどでも容易に実現できる。マイクロプログラムによらず、ワイアードロジックなどとすることにより、論理回路の高速化に寄与することができる。レジスタセレクタにインクリメンタを持つことによって、論理的規模の増加を最小限にして、連続した任意の組合せを指定可能にできる。
【0164】
同様の指定を可能にした、汎用レジスタの退避命令(STM)を持ち、これをサブルーチン乃至例外処理ルーチンの先頭で実行し、最後に、本発明の復帰命令を実行することによって、より一層の使い勝手を向上できる。汎用レジスタの退避命令実行時に、退避後に汎用レジスタをクリアすることにより、更に、命令コード長を短縮し、実行ステート数を短縮できる。
【0165】
また、データのリード/ライトを連続して行うことによって、メモリに対するバースト動作などやバス幅を拡張する場合にも、これらを有効に利用しやすい。
【0166】
ソースプログラムレベルまたはオブジェクトプログラムレベルで、既存のCPUの命令セットを包含した上で、上記命令を追加することによって、ソフトウェア資産を有効に利用することができ、使用者のソフトウェア開発効率を向上することができる。ソースプログラムレベルまたはオブジェクトプログラムレベルで互換性を保つことによる利点と前記転送命令を追加することの利点の双方を享受することができる。
【0167】
以上本発明者等によってなされた発明を実施例に限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能である。
【0168】
命令コードは一例であり、種々変更が可能である。既存の命令セットに追加するほか、新規の命令セットを開発する場合に適用することが可能であることは言うまでもない。
【0169】
例外処理におけるスタックの構造は、CCRとPCを組合せて32ビットとしたが、これらは、16ビットと32ビットに分割したり、そのほかのコントロールレジスタを追加したりすることもできる。PCも32ビットとしてもよい。
【0170】
汎用レジスタの構成や本数など、或いは復帰命令で復帰する汎用レジスタの本数などは任意に変更できる。復帰する汎用レジスタの本数は1本でもよい。スタックに格納される順序なども任意に変更できる。汎用レジスタを復帰する場合、PC(及びCCR)と連続してリードする方が都合がよい。
【0171】
インクリメンタ(RINC)も、インクリメント/デクリメントを行うほか、命令デコーダの出力との加算/減算を行うようにしてもよい。本発明の復帰命令の場合、命令コードのレジスタ指定フィールドに対して、1/2/3を順次減算するようにしてもよい。命令コード中に含まれるレジスタ指定フィールドも、最初に指定する汎用レジスタに対応している必要は必ずしもない。前記加算/減算と組合せて、所望の汎用レジスタを指定できればよい。
【0172】
復帰する汎用レジスタとして、スタックポインタであるER7が指定された場合は、ER7への書込みを禁止するとよい。スタックポインタの退避/復帰は意味がなく、所定のポイント動作を行えばよいからである。
【0173】
汎用レジスタの退避命令実行時に、退避後に汎用レジスタをクリアする命令と、保持する命令の両方を持ってもよい。当該命令コードの第1ワードの所定のビットでこれを指定して、制御信号(MOD)を発生して、第2ワードの動作を変更するようにすればよい。
【0174】
汎用レジスタのクリアの内容は0に限定されず、他の値にしてもよい。クリアする内容を指定する手段を別に設けてもよい。
【0175】
命令の基本単位も16ビットに限定されない。8ビット単位、32ビット単位でも、本発明の復帰命令は適用可能である。
【0176】
簡単のために、バス幅を32ビットとし、命令リードを16ビット単位としたが、命令リードを32ビット単位にして高速化することができる。このような例は、特願平11−167812に記載されている。また、バス幅を16ビットとして、ロングワードのリード/ライトを、ワード単位の2回のリード/ライトで実行するようにしてもよい。このような例は、特願平11−320518に記載されている。
【0177】
マイクロコンピュータのその他の機能ブロックについても何等制約されない。
【0178】
以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるマイクロコンピュータに適用した場合について説明したが、それに限定されるものではなく、その他のデータ処理装置にも適用可能であり、本発明は少なくとも、複数のレジスタ手段を有するデータ処理装置に適用することができる。
【0179】
【発明の効果】
本題において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。
【0180】
サブルーチンから、または例外処理からの復帰命令において、当該命令コードに複数の汎用レジスタを指定する情報を含み、当該命令コードの実行時に、プログラムカウンタの復帰に加えて、前記指定した汎用レジスタの復帰を行うようにすることにより、使い勝手を向上し、プログラム容量と実行ステート数を短縮できる。
【0181】
更に、指定する汎用レジスタの組合せを連続したものにすることにより、命令コード長を短縮でき、更に、各命令の実行ステート数を固定にすることにより、内部の条件分岐を行うことを少なくし、内部論理を簡潔にし、論理規模を縮小できる。16ビット単位の可変長の命令コード体系を採る場合にも、命令プリフェッチや命令デコードを簡易にしつつ、命令コードを有効に利用して、全体的なプログラム効率を向上できる。
【0182】
同様の指定を可能にした、汎用レジスタの退避命令を持ち、これをサブルーチン乃至例外処理ルーチンの先頭で実行し、最後に、本発明の復帰命令を実行することによって、より一層の使い勝手を向上できる。
【0183】
汎用レジスタの復帰と、プログラムカウンタなどの復帰を連続的に行うことによって、内部の動作を容易にし、高速化できる。
【0184】
レジスタの本数の異なる復帰命令を複数サポートすることによって、また、連続した汎用レジスタの指定を可能にして、更に、プログラムの作成を容易にし、使い勝手を向上することができる。
【図面の簡単な説明】
【図1】本発明の適用されたマイクロコンピュータのブロック図。
【図2】CPUに内蔵されている汎用レジスタ及び制御レジスタの構成例の図。
【図3】CPUの構成例の図。
【図4】レジスタセレクタRESLの一部の詳細ブロック図。
【図5】複数汎用レジスタの復帰を含む第1の復帰命令(RTS/n)、第2の復帰命令(RTE/n)の命令フォーマット図。
【図6】複数汎用レジスタの復帰を含む第1の復帰命令(RTS/n)、第2の復帰命令(RTE/n)のスタックの構成例の図。
【図7】第1の復帰命令(RTS/n)の動作フローの図。
【図8】第1の復帰命令(RTS/n)の実行タイミングの図。
【図9】第2の復帰命令(RTE/n)の動作フローの図。
【図10】第2の復帰命令(RTE/n)の実行タイミングの図。
【図11】複数汎用レジスタの退避命令(STM)の動作フローの図。
【図12】複数汎用レジスタの退避命令(STM)の実行タイミングの図。
【図13】本発明のCPUの開発環境の概略図。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data processing apparatus, and more particularly to a microcomputer constituted by a semiconductor integrated circuit device. It is related to effective technology.
[0002]
[Prior art]
With the advancement of manufacturing technology of semiconductor integrated circuit devices, a central processing unit (hereinafter simply referred to as CPU), a ROM (Read Only Memory) for storing a program on a single chip made of a semiconductor single crystal, Microcomputers manufactured by integrating components including RAM (Random Access Memory) that stores various data in a rewritable manner have been widely used, 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 processed simultaneously by the CPU, and is classified as, for example, a microcomputer of 4 bits, 8 bits, 16 bits, 32 bits, or the like.
[0003]
Such microcomputers have been expanded in address space, instruction set, and speed. In addition, since the performance of the CPU is defined by software, even in a microcomputer that has expanded the address space, expanded the instruction set, and increased the speed as described above, the software assets of the existing microcomputer are reduced. It is desirable that it can be used effectively.
[0004]
For this reason, as an example of realizing address space expansion, instruction set expansion, high speed, etc. while maintaining compatibility at the object level, there is, for example, JP-A-6-51981 previously proposed by the present inventor. . This is a variable-length instruction in 16-bit units, and it is shown that a so-called general-purpose register type or load / store type architecture is adopted.
[0005]
In the case of a single-chip type having a built-in ROM as a program memory, the capacity of the built-in ROM is small compared to connecting an external memory, so it is desirable to reduce the program capacity. .
[0006]
When a variable length instruction in 16-bit units is adopted, there is a return (RTS / RTE) instruction that has only an operation code, does not specify an effective address, and is meaningful. When such a return instruction is assigned to a 16-bit instruction, all the bits of the 16-bit instruction code are often not used.
[0007]
For example, if the instruction code H′5470 is a return instruction from a subroutine and H′5471, H′5472 and H′5473 are undefined (not defined as other instructions), the bit 0 and bit 1 are not used.
[0008]
On the other hand, the CPU described in Japanese Patent Application Laid-Open No. 8-263290 previously proposed by the present inventors fixes a combination of a plurality of general-purpose registers that can be designated as control means for controlling execution means for executing instructions. The general-purpose register stack has a save / return instruction, and a plurality of general-purpose registers are sequentially saved / restored. By fixing the combination of general-purpose registers, the number of bits required to specify the general-purpose registers can be saved.
[0009]
Such a save / return instruction is used for the purpose of saving the state of the previous process at the break of processing such as a subroutine or exception processing, and the addressing mode is pre-decrement / retraction of the stack pointer ) Can be used.
[0010]
That is, such a general register return instruction is often placed before a return instruction (RTS / RTE) from the subroutine or exception processing.
[0011]
In a CPU of a so-called accumulator type architecture, there is a case where the accumulator is saved / restored in addition to the PC when branching to the subroutine / returning from the subroutine. This is because data processing is performed on a small number of accumulators, and when the processing changes like a subroutine, it is necessary to free up the accumulator. In other words, it is not wasted even if the accumulator is automatically retracted / returned.
[0012]
In contrast, general-purpose register architecture CPUs have a high degree of freedom in which data is placed in general-purpose registers, and arguments for branching / returning from subroutines are assigned to general-purpose registers. Sometimes. For this reason, automatically saving / restoring predetermined (all or a part) of general-purpose registers tends to be useless. This is because the number of execution states and the usage amount of the stack increase due to undesired saving / restoring of general-purpose registers.
[0013]
Microcomputer programs are often written in C language. Functions often used in the C language are realized as subroutines.
[0014]
[Problems to be solved by the invention]
The problems to be solved by the present invention are as follows:
It is an object of the present invention to provide a data processing apparatus such as a microcomputer and a means for improving usability, reducing the program capacity, and reducing the number of execution states while minimizing an increase in the logical scale.
[0015]
In particular, in a program using C language or the like, it is intended to reduce the program capacity and the number of execution states when many functions are used.
[0016]
In addition, the existing software assets can be used effectively to improve the development efficiency of users, the development equipment can be used in common, the development efficiency of the development equipment can be improved, and the development environment can be provided quickly. It is to be.
[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]
[Means for Solving the Problems]
The following is a brief description of an outline of typical inventions disclosed in the present application.
[0019]
The data processing apparatus of the present invention includes information specifying a plurality of general-purpose registers in the instruction code in a return instruction from a subroutine or exception processing, and in addition to the return of the program counter when the instruction code is executed, The designated general-purpose register is restored.
[0020]
Furthermore, the combination of general-purpose registers to be specified is made continuous.
[0021]
Enables a general-purpose register save instruction that allows the same specification.
[0022]
According to the above means,
By making the return instruction from the subroutine or exception processing and the return instruction of the general-purpose register the same instruction (for example, 16 bits), usability can be improved and the program capacity can be reduced.
[0023]
Even in the case of adopting a 16-bit variable instruction code system, it is possible to improve the overall program efficiency by effectively using instruction codes while simplifying instruction prefetching and instruction decoding.
[0024]
It has a general register save instruction that enables the same specification, and this is executed at the beginning of a subroutine or exception processing routine. Finally, the return instruction of the present invention is executed, so that the usability can be further improved. .
[0025]
By fixing the combination of general-purpose registers to be specified, information specifying the general-purpose registers can be shortened, and even a limited instruction code (for example, 16 bits) can be specified.
[0026]
By continuously returning the general-purpose register and the program counter, the internal operation can be facilitated and speeded up.
[0027]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram of a microcomputer to which the present invention is applied.
[0028]
The microcomputer is a single chip type, a CPU that controls the whole, an interrupt controller (INT), a ROM that is a memory for storing a processing program of the CPU, a work area of the CPU, a temporary storage of data and a stack RAM, timer, serial communication interface (SCI), A / D converter, first to ninth input / output ports (IOP1 to IOP9), clock oscillator (CPG) functional blocks or modules And is formed on a single semiconductor substrate by a known semiconductor manufacturing technique.
[0029]
Such a microcomputer has, as power supply terminals, 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 other dedicated control terminals. , Reset (RES), standby (STBY), mode control (MD0, MD1), and clock input (EXTAL, XTAL) terminals.
[0030]
The microcomputer operates in synchronization with a crystal oscillator connected to the terminals EXTAL and CTAL 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 connected to each other by an internal bus. A bus controller (not shown) that controls the bus is incorporated. In addition to the address bus and data bus, the internal bus includes a read signal, a write signal, and a bus size signal, which are coded as a bus command.
[0032]
Such 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. The built-in ROM and RAM can be read / written in one state.
[0033]
Control registers included in the timer, the SCI, the A / D converter, the IOP1 to the IOP9, the SYSC, the INT, and the CPG are collectively referred to as an internal I / O register.
[0034]
Each input / output port is also used as an input / output terminal of an address bus, data bus, bus control signal or timer, SCI, and A / D converter. That is, the timer, the SCI, and the A / D converter each have an input / output signal and are input / output from / to the outside through a terminal also used as an input / output port. For example, IOPs 5 and 6 are also used as timer input / output terminals, and IOP7 is also used as an SCI input / output terminal. Analog data input / output (AIN0 to AIN7) terminals are also used as IOP8.
[0035]
The external interrupt input is shared with IOP9.
[0036]
When a reset signal RES is given to such a microcomputer, the microcomputer including the CPU is reset. When this reset is released, the operation mode specified by the mode control (single chip, external bus expansion, internal ROM enabled, etc.) is set, and the CPU reads the start address from a predetermined address (vector address). Performs reset exception handling that starts reading an instruction from the start address. Thereafter, the CPU sequentially reads and decodes the instruction from the ROM or the like, and based on the decoded content, processing of data including determination and operation of flags and bits, or RAM, timer, SCI, A / D conversion Data transfer to and from input / output ports. That is, the CPU refers to data input from a timer, SCI, A / D converter, input / output port, etc., or an instruction stored in a ROM or the like while referring to device status or instructions (switch, volume, etc.). Processing is performed based on the result, and a signal is output to the outside using an input / output port, a timer, and the like to control the device.
[0037]
The interrupt controller (INT) inputs the timer, SCI, A / D converter, and external input interrupt signals, and outputs an interrupt request signal to the CPU.
[0038]
When an interrupt request signal is given to the CPU, the CPU interrupts the processing being executed, branches to the predetermined processing routine through the interrupt exception processing state, performs the desired processing, and clears the interrupt factor. To do. At the end of the predetermined processing routine, a normal return instruction is given, and the interrupted process is resumed by executing this instruction.
[0039]
When executing an interrupt exception process, a program counter (PC) and a condition code register (CCR), which will be described later, are saved in a RAM or the like, and when executing a return instruction, the program counter (PC) and the condition code register (CCR) are restored. The
[0040]
Further, in the interrupt processing routine, it is necessary to use a general-purpose register in order to perform necessary processing. In order to save the state immediately before the occurrence of the interrupt, the required general-purpose register is saved on the stack at the beginning of the interrupt processing routine. This is, for example,
STM ER0-ER3, @ -SP
Is described. At the end of the interrupt processing routine, the saved general-purpose register is restored, and then the return instruction (RTE) is executed to continue the program immediately before the occurrence of the interrupt. In the prior art, for example,
LDM @ SP +, ER0-ER3
RTE
Is described.
[0041]
According to the present invention, the LDM and RTE instructions are executed in one instruction,
RTE / 4 ER0-ER3
To be described.
[0042]
Similarly, in the subroutine, a general-purpose register is used to perform necessary processing. For example, at the beginning of a subroutine,
STM ER0-ER1, @-SP
And finally,
LDM @ SP +, ER0-ER1
RTS
Is described.
[0043]
According to the present invention, the LDM and RTE instructions are executed in one instruction,
RTS / 2 ER0-ER1
To be described.
[0044]
FIG. 2 shows a configuration example (programming model) of general-purpose registers and control registers built in the CPU.
[0045]
The CPU has eight general-purpose registers having a 32-bit length. All general purpose registers have the same function and can be used as both address registers and data registers.
[0046]
The data register can be used as a 32-bit, 16-bit, and 8-bit register. The address register and 32-bit register are used as general registers ER (ER0 to ER7) at once. As 16-bit registers, general-purpose registers ER are divided and used as general-purpose registers E (E0 to E7) and general-purpose registers R (R0 to R7). These have equivalent functions, and up to 16 16-bit registers can be used. Note that the general-purpose registers E (E0 to E7) may be particularly referred to as extension registers. As an 8-bit register, the general-purpose register R is divided and used as general-purpose registers RH (R0H to R7H) and general-purpose registers RL (R0L to R7L). These have equivalent functions, and up to 16 8-bit registers can be used. The usage method can be selected independently for each register.
[0047]
The general-purpose register ER7 is assigned a function as a stack pointer (SP) in addition to a function as a general-purpose register, and is used implicitly in exception handling, subroutine branching, and the like. Exception handling includes the interrupt handling.
[0048]
PC is a 24-bit counter indicating the address of the next instruction to be executed by the CPU. Although not particularly limited, since all CPU instructions are in units of 2 bytes (words), the least significant bit is invalid, and the least significant bit is regarded as 0 when the instruction is read.
[0049]
The CCR is an 8-bit register and includes an interrupt mask bit (I) and half carry (H), negative (N), zero (Z), overflow (V), and carry (C) flags. The half carry (H), negative (N), zero (Z), overflow (V), and carry (C) flags check the data and reflect the state when executing a transfer instruction or an arithmetic instruction. Half carry (H) is used only for decimal correction.
[0050]
FIG. 3 shows a configuration example of the CPU.
[0051]
The CPU includes a control unit and an execution unit including the general-purpose registers ER0 to ER31, a program counter PC, and a condition code register CCR.
[0052]
The control unit is an instruction register IR , Instruction decoder DEC, register selector RESL , Including an interrupt acceptance circuit INT. The instruction decoder DEC is configured by, for example, a micro ROM, PLA (Programmable Logic Array), or a wiring logic. Part of the output of the instruction decoder DEC is fed back to the instruction decoder DEC. This includes a stage code (TMG) used for transition in each instruction code and a control signal (MOD) used between instruction codes. That is, the first word of the STM instruction generates a control signal that specifies the number of general-purpose registers, outputs an interrupt mask signal, and inhibits acceptance of interrupts.
[0053]
The interrupt control unit INT receives an interrupt request signal output from an interrupt controller shown in FIG. Further, referring to the interrupt mask signal output from the instruction decoder, if the interrupt is not masked, the instruction change unit CHG is instructed to execute an interrupt exception processing instruction code.
[0054]
The execution unit further includes a temporary register TR, an arithmetic logic unit ALU, an incrementer INC, a read data buffer DBR, a write data buffer DBW, and an address buffer AB. These blocks are connected to each other by a GB bus, a DB bus, and a WB bus.
[0055]
The arithmetic logic unit ALU uses various operations specified by instructions and calculation of effective addresses.
[0056]
The incrementer INC is mainly used for PC addition and address calculation.
[0057]
The DBR temporarily stores instruction codes and data read from the ROM, RAM, internal I / O register, or external memory (not shown). The DBW temporarily stores write data to the ROM, RAM, internal I / O register, or external memory. The timings of the CPU internal operation and the read / write operation outside the CPU are adjusted by DBR and DBW.
[0058]
The address buffer AB temporarily stores an address read / written by the CPU.
[0059]
Figure 4 shows the register selector RESL FIG. 2 shows a detailed block diagram of a part of
[0060]
register Selector RESL Holds the register field IR The register field information output from the control signal output from the instruction decoder DEC and the control signal output of the instruction decoder DEC are input to generate a register selection signal corresponding to each general purpose register.
[0061]
There are two register designation fields (r1, r2).
[0062]
The second register designation field (r2) is IR Bits 3 to 0 and the control signal output (inc, dec) of the instruction decoder.
[0063]
The output of the incrementer (RINC) to which the above is input is latched at the inversion φ # of the system clock and becomes the second register designation field (r2).
[0064]
For example,
STM ER0-ER3, @ -SP
In this case, 0 is given as the initial value of r2. Thereafter, r2 is changed from 0 → 1 → 2 → 3 by an increment signal (inc) at a predetermined timing described later.
[0065]
Also,
LDM @ SP +, ER0-ER1
Or
RTS / 2 ER0-ER1
In this case, 1 is given as the initial value of r2. Thereafter, r2 is changed from 1 to 0 by an increment signal (dec = rd−) at a predetermined timing described later.
[0066]
As a result, sharing the register selection circuit itself with other instructions can suppress an increase in logical scale.
[0067]
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 designate any combination of general-purpose registers in succession without significantly increasing the logical scale.
[0068]
In addition, other RESL The details of are omitted.
[0069]
FIG. 5 shows the instruction formats of the first return instruction (RTS / n) and the second return instruction (RTE / n) including return of a plurality of general purpose registers.
[0070]
The first return instruction (RTS / n) is a return instruction from the subroutine, Second The return instruction (RTE / n) is a return instruction from the exception handling routine.
[0071]
Bits 15 to 7 are an operation field for designating a return instruction.
[0072]
When bit 6 is 0, the number of general-purpose registers is specified by bits 5 and 4. In the case of 01, 2 lines are used. The general-purpose register can be selected from 2, 3, 4 in succession. For example, in the case of four, ER0-3, ER1-4, ER2-5, ER3-6 can be specified. ER7 is also used as a stack pointer and is not targeted.
[0073]
When 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 a common instruction code (H′5470) is used.
[0074]
Bits 3 to 0 specify the general register to be used first. Bit 3 is reserved and is 0.
[0075]
For example, in the case of RTS / 4 ER0-3, since it is restored from ER3, the instruction code is H'5433.
[0076]
The second return instruction (RTE / n) is the same as that described above except that the operation field is different.
[0077]
The instruction format of the STM instruction is a two-word instruction, and a general-purpose register to be used first is designated by bits 3 to 0 of the second word. This is shared with the return instruction.
[0078]
The instruction format of the LDM instruction is the same.
[0079]
FIG. 6 shows an example of a stack configuration of a first return instruction (RTS / n) including a return of a plurality of general purpose registers and a second return instruction (RTE / n).
[0080]
The last address of the stack is indicated by the stack pointer (SP: ER7).
[0081]
A program counter is saved to the stack by a subroutine branch instruction (for example, a BSR instruction). Thereafter, a required general-purpose register is saved at the beginning of the subroutine (for example, STM ER0-ER1, @ -SP).
[0082]
Correspondingly, the first return instruction (for example, RTS / 2 ER0-ER1) first reads from the stack as the return of the specified general-purpose register, and then reads the specified general-purpose register (ER1, ER0). Store sequentially. Subsequently, as the return of the program counter, the stack is read and stored in the program counter, and the instruction is read according to the contents.
[0083]
Similarly, the program counter and the condition code register are saved in the stack by exception processing. The program counter has 24 bits and is saved in the stack in combination with the condition code register. Thereafter, a required general-purpose register is saved at the beginning of the subroutine (for example, STM ER0-ER3, @ -SP).
[0084]
Correspondingly, the second return instruction (for example, RTE / 4 ER0-ER3) first reads from the stack as the return of the specified general register, and specifies the specified general registers (ER3, ER2, ER1). , ER0). Subsequently, as a 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]
FIG. 7 shows an operation flow of the first return instruction (RTS / n).
[0086]
In step 1, the content of the stack pointer (SP) is output to the address bus (IAB) by the control signal A, and a long word read is instructed. In addition, an increment (+4) of the contents of SP is instructed. The control signal C instructs storage of the read data in the DBR.
[0087]
In steps 2 to 5, the control signal B instructs to write the contents read in the previous step to the general-purpose register. Specifically, the data is once output to the internal bus GB, output to the internal bus WB via the ALU, and written to the designated general-purpose register. register Selector RESL 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 designated number (n) of general-purpose registers.
[0088]
In step 6, the control signal B instructs to write the contents read in the previous step to the program counter (PC).
[0089]
In 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 contents of the PC is instructed. The read instruction is stored in the IR by the control signal C.
[0090]
Similarly, in step 8, the control signal A instructs the output of the contents of the program counter (PC) to the address bus (IAB), the memory word read, and the increment (+2) of the contents of the PC. 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]
The contents read from the stack are temporarily stored in the PC when the PC is restored. However, this may not be performed, but may be read from the DBR instead of the PC in step 7.
[0092]
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 return instruction of the prior art.
[0093]
According to such an operation flow, a hardware description language (HDL) can be described and an instruction decoder DEC can be generated. The part relating to the first return instruction (RTS / n) is as follows.
[0094]
Figure 0003786575
This description follows the HDL description language standardized as IEEE 1364. The HDL description language itself is described in “Introductory Verilog-HDL Description” issued by CQ Publishing Co., Ltd. in July 1996.
[0095]
Cases and cases execute operations corresponding to subsequent values (16′b01010100_0001 ???, 4′b0001 :, etc.) according to variables (opcode, tmg) in parentheses () that follow. One operation is described from begin to end.
[0096]
In (1), the condition by the instruction decoder input (opcode) is designated. Under this condition, the operation of the instruction code corresponding to RTS / 2 is described in (2) to (12). Further, for each instruction code, a condition by an instruction decoder input (tmg) corresponding to a step is instructed. The operation of the first step of RTS / 2 is described in (4) to (7). (5) specifies that the next step (nextmg) is the fourth step. Nexttmg is input to the instruction decoder as tmg after one state. In (6), the bus command is a long word read. As long_read, 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 up to (12).
[0097]
Similarly, the operation of the instruction code corresponding to RTS / 3 is described from (13) onward under the condition of the instruction decoder input (opcode). In the behavior description of the first step, (15) specifies that the next step (nextmg) is the second step. The operation of the second step is described after (17). Furthermore, the operations of the fourth to eighth steps are also described.
[0098]
Thereafter, the operation of an instruction code corresponding to RTS / 4 is described, and a second return instruction (RTE / n), a multiple register save instruction (STM), and other instruction codes are also described.
[0099]
FIG. 8 shows the execution timing of the first return instruction (RTS / n).
[0100]
This is an example in the case of n = 2.
[0101]
Although not particularly limited, the timing when the read / write of the built-in ROM and RAM can be read / written in one state and the program is placed on the built-in ROM and the stack is placed on the built-in RAM is shown.
[0102]
At φ # of T0 (# indicates inverted logic), the CPU address buffer (MAB) or address is output to the IAB. Also, a bus command (BCMD) indicating instruction fetch (if) is output from the instruction decoder.
[0103]
At φ of T1, the contents of IAB are output to PAB, a read cycle is started based on the bus command, and data is output to PDB. The read data of the PDB is obtained on the internal data bus IDB at φ #, and this is latched at IR by φ at T2. The above operation is performed by controlling the execution of the previous instruction (prefetch). Here, the built-in ROM and RAM are not connected to the PAB and PDB, but operations corresponding to the PAB and PDB are performed in the module, and this timing diagram shows the operation in the module.
[0104]
When the execution of the immediately preceding instruction is completed, when the execution of the instruction is started earliest, the instruction code is input to the DEC at φ of T2, and the content of the instruction is decoded. According to the result of decoding, a control signal is output to control each part. Part of the instruction (register specified feed: r) is given to the register select.
[0105]
As step 1, the content of SP is read to the internal bus GB at φ # of T2 and input to AB and INC. The address IAB is output from AB. A long word read bus command is output.
[0106]
The result incremented (+4) by INC at φ of T3 is written to the SP via the internal bus WB. Data read from the stack is output to the IDB from φ # of T3, and stored in the DBR with φ of T4.
[0107]
As step 4, at φ4 and φ # of T4, the contents of the DBR are written to the designated general-purpose register (r) 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 to the internal bus GB and input to AB and INC. The address IAB is output from AB. A long word read bus command is output. The result incremented (+4) by INC at φ of T4 is written to the SP via the internal bus WB. Data read from the stack is output to the IDB from φ # of T4, and stored in the DBR at φ of T5.
[0108]
As step 5, at φ5 and φ # of T5, the contents of the DBR are written to the designated general-purpose register (r) via the internal buses GB, ALU, and the internal bus WB. The register specification field is decremented. Similarly to the above, at φ4 of T4, the contents of SP are read out to the internal bus GB and input to AB and INC. The address IAB is output from AB. A long word read bus command is output. The result incremented (+4) by INC at φ of T5 is written to the SP via the internal bus WB. Data read from the stack is output to the IDB from φ # of T5, and stored in the DBR at φ of T6.
[0109]
In step 6, the contents of DBR are written to the PC through internal buses GB, ALU, and internal bus WB at φ and φ # of T6.
[0110]
In step 7, at φ6 of T6, the contents of the PC are read to the internal bus GB and input to AB and INC. The address IAB is output from AB. The result incremented (+2) by INC at φ of T7 is written to the PC via the internal bus WB.
[0111]
In step 8, the contents of the PC are read to the internal bus GB at φ # of T7 and input to AB and INC. The address IAB is output from AB. The result incremented (+2) by INC at φ of T8 is written to the PC via the internal bus WB. The instruction code read by φ at T8 is input to the DEC via the IR, and the next instruction is executed.
[0112]
FIG. 9 shows an operation flow of the second return instruction (RTE / n).
[0113]
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 performed similarly.
[0114]
FIG. 10 shows the execution timing of the second return instruction (RTE / n).
[0115]
This is an example in the case of n = 4.
[0116]
In the same manner as described above, the instruction code is input to DEC at φ of T2, and the contents of the instruction are decoded. According to the result of decoding, a control signal is output to control each part. Part of the instruction (register specified feed: r) is given to the register select.
[0117]
As step 1, the content of SP is read to the internal bus GB at φ # of T2 and input to AB and INC. The address IAB is output from AB. A long word read bus command is output.
[0118]
The result incremented (+4) by INC at φ of T3 is written to the SP via the internal bus WB. Data read from the stack is output to the IDB from φ # of T3, and stored in the DBR with φ of T4.
[0119]
As step 2, at φ4 and φ # of T4, the contents of the DBR are written to the designated general-purpose register (r) 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 to the internal bus GB and input to AB and INC. The address IAB is output from AB. A long word read bus command is output. The result incremented (+4) by INC at φ of T4 is written to the SP via the internal bus WB. Data read from the stack is output to the IDB from φ # of T4, and stored in the DBR at φ of T5.
[0120]
In step 3, the contents of DBR are written to the designated general-purpose register (r) via internal buses GB, ALU, and internal bus WB at φ and φ # of T5. The register specification field is decremented. Similarly to the above, at φ4 of T4, the contents of SP are read out to the internal bus GB and input to AB and INC. The address IAB is output from AB. A long word read bus command is output. The result incremented (+4) by INC at φ of T5 is written to the SP via the internal bus WB. Data read from the stack is output to the IDB from φ # of T5, and stored in the DBR at φ of T6.
[0121]
As step 4, at φ6 and φ # of T6, the contents of DBR are written to the designated general-purpose register (r) via internal buses GB, ALU, and internal bus WB. The register specification field is decremented. Similarly to the above, at φ5 of T5, the contents of SP are read to the internal bus GB and input to AB and INC. The address IAB is output from AB. A long word read bus command is output. The result incremented (+4) by INC at φ of T6 is written to the SP via the internal bus WB. The data read from the stack is output to the IDB from φ # of T6, and stored in the DBR at φ of T7.
[0122]
In step 5, the contents of DBR are written to the designated general-purpose register (r) via internal buses GB, ALU, and internal bus WB at φ and φ # of T7. The register specification field is decremented. Similarly to the above, at φ # of T6, the contents of SP are read to the internal bus GB and input to AB and INC. The address IAB is output from AB. A long word read bus command is output. The result incremented (+4) by INC at φ of T7 is written to the SP via the internal bus WB. Data read from the stack is output to the IDB from φ # of T7, and stored in the DBR at φ of T6.
[0123]
In step 6, the contents of DBR are written to CCR and PC via internal buses GB, ALU, and internal bus WB at φ and φ # of T6. Bits 31-24 of the DBR are written to the CCR and bits 23-0 are written to the PC.
[0124]
In step 7, the contents of the PC are read to the internal bus GB at φ8 of T8 and input to AB and INC. The address IAB is output from AB. The result incremented (+2) by INC at φ of T9 is written to the PC via the internal bus WB.
[0125]
In step 8, the content of the PC is read to the internal bus GB at φ # of T9 and input to AB and INC. The address IAB is output from AB. The result incremented (+2) by INC at φ of T10 is written to the PC via the internal bus WB. The instruction code read by φ at T10 is input to the DEC via the IR, and the next instruction is executed.
[0126]
FIG. 11 shows an operation flow of a save instruction (STM) for a plurality of general-purpose registers.
[0127]
Step 0 is controlled by the first word of the instruction code. The control signal A instructs the output of the program counter (PC) contents to the address bus (IAB), the memory word read, and the PC contents increment (+2). The control signal B instructs the input of the second word of the instruction code to the instruction decoder and the information (MOD) on the number of general-purpose registers specified by the first word.
[0128]
In step 1, the control signal A indicates the decrement (-4) of the contents of the stack pointer (SP). In steps 2 to 5, the control signal A instructs to output the contents of the stack pointer (SP) to the address bus (IAB) and to write a long word. Control signal B instructs the contents of the general-purpose register to be stored in DBW. Control signal C instructs the output of the contents of DBW to IDB. register Selector RESL Is instructed to increment the register field (-1). In steps 2 to 4, the SP content is decremented (-4). Steps 2 to 5 are executed a predetermined number of times according to the designated number (n) of general-purpose registers.
[0129]
In step 6, the control signal A instructs the output of the program counter (PC) contents to the address bus (IAB), the memory word read, and the PC contents increment (+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.
[0130]
In steps 2 to 5, after the contents of the general-purpose register are transferred to the DBW, the contents of the general-purpose register may be cleared to zero. After saving the general-purpose register, clearing it to 0 and confirming its contents can simplify the subsequent processing.
[0131]
For example, the MOV instruction can be omitted when 0 is assigned to the general-purpose register. When substituting 1 etc.,
MOV. L # 1, ERn
Instead of using
MOV. B # 1, RnL
Can be used. Immediate data has an area corresponding to the data size in the instruction code. Than the instruction code length of L (for example, 3 words). The instruction code length of B (for example, 1 word) is shorter. This can contribute to shortening the program capacity.
[0132]
In general, constant values used in a program often have relatively small values such as 0 and 1.
[0133]
FIG. 12 shows the execution timing of a save instruction (STM) for a plurality of general purpose registers.
[0134]
This is an example in the case of n = 2.
[0135]
The first word (stm-1) of the instruction code is input to DEC at φ of T2, and the contents of the instruction are decoded. According to the result of decoding, a control signal is output to control each part. Part of the instruction (register specified feed: r) is given to the register select.
[0136]
As step 0, the contents of the PC are read to the internal bus GB at φ # of T2 and input to AB and INC. The address IAB is output from AB. The result incremented (+2) by INC at φ of T2 is written to the PC via the internal bus WB. The instruction code read by φ at T3 is input to DEC via IR, and the next instruction is executed.
[0137]
The second word (stm-2) of the instruction code is input to the DEC at φ of T3, and the contents of the instruction are decoded. According to the result of decoding, a control signal is output to control each part. Part of the instruction (register specified feed: r) is given to the register select.
[0138]
As step 1, the content of SP is read to the internal bus GB at φ # of T3 and input to INC. The result of decrementing (−4) by INC at φ of T3 is written to the SP via the internal bus WB.
[0139]
As Step 2, at φ4 of T4, the contents of SP are read to the internal bus GB and input to AB and INC. The address IAB is output from AB. A longword write bus command is output. The result of decrement (−4) by INC at φ of T5 is written to the SP via the internal bus WB. In addition, the contents of the designated general-purpose register (r) are written to the DBW via the internal bus DB. The register specification field is incremented. The contents of DBW are output to IDB from φ # of T5.
[0140]
In step 5, the content of SP is read to the internal bus GB at φ # of T5, and the address IAB is output via AB. A longword write bus command is output. The contents of the general-purpose register designated (r) are written to DBW via the internal bus DB at φ of T5. The register specification field is incremented. The contents of DBW are output to IDB from φ # of T5.
[0141]
As step 6, at φ6 of T6, the contents of the PC are read to the internal bus GB and input to AB and INC. The address IAB is output from AB. The result incremented (+2) by INC at φ of T7 is written to the PC via the internal bus WB. The prefetched instruction code (next) is input to the DEC via the IR, and the next instruction is executed.
[0142]
As described above, in Steps 2 to 5, the contents of the general-purpose register are cleared to 0 with φ # of T5 and T6. This is preferably done by setting the internal bus WB at that timing to 0 and writing it to the general-purpose register.
[0143]
FIG. 13 shows an outline of the development environment of the CPU of the present invention.
[0144]
The user creates a program in C language or assembly language using various editors. This is usually created by dividing it into a plurality of modules.
[0145]
The C compiler inputs each C language source program created by the user and outputs an assembly language source program or object module.
[0146]
For example, when creating a program in C language,
Figure 0003786575
The function seq0 described as follows is compiled as follows for the CPU of the present invention.
[0147]
Figure 0003786575
The general purpose registers ER3 and ER4 used in the function are saved to the stack by the STM instruction and cleared to 0. Restored from stack on return instruction.
[0148]
When calling the function seq0 in the main program,
seq0 ();
And
JSR @ _seq0
And compiled into a subroutine branch instruction.
[0149]
The assembler inputs an assembly language source program and outputs an object module.
[0150]
The linkage editor inputs a plurality of object modules generated by the C compiler and assembler, resolves external references and relative addresses of each module, combines them into one program, and outputs a load module.
[0151]
The load module can be input to a simulator / debugger, simulate a CPU operation on a system development apparatus such as a personal computer, display an execution result, and analyze and evaluate a program. In addition, by inputting into an emulator and performing on-circuit emulation that operates on an actual application system or the like, it is possible to analyze and evaluate the actual operation of the entire microcomputer.
[0152]
Furthermore, the load module can be input to a ROM writing device such as a PROM writer, and the created program can be loaded into the external flash memory or the like when the built-in ROM of the microcomputer is a flash memory or the like. Alternatively, it can be written in the built-in ROM in the manufacturing process of the microcomputer. If necessary, it is converted into a desired format by an object converter or the like.
[0153]
In addition, a general subroutine can be provided as a librarian.
[0154]
The CPU definition information file designates a CPU to be compiled, and makes it possible to use a common development environment for the (existing) CPU having no return instruction of the present invention and the CPU of the present invention.
[0155]
For example, in the CPU definition information file,
SET CPU = CPU1;
To select the CPU of the present invention.
[0156]
If a CPU that does not have a return instruction of the present invention is selected with reference to the CPU definition information file at the time of compilation, the function is
Figure 0003786575
It becomes. MOV. L may be changed according to the processing content of the function.
[0157]
In addition to the function to convert C language programs into CPU instructions, the C compiler itself has improved functions not directly related to the CPU instruction set, such as C ++ language program compilation and inter-module optimization. However, in an individual compiler for each CPU, these functional improvements must be applied to all the individual compilers. If a common C compiler is used as in the present invention, it is easy to improve the functions not directly related to the CPU instruction set, and to improve development efficiency.
[0158]
According to the said Example, the following effects are obtained.
[0159]
A single instruction performs multiple general register and return operations, and a return operation from a subroutine or exception handling routine, thereby relatively shortening the instruction code length (for example, shortening by 2 words) and reading the instruction The number of times can be reduced and the speed can be increased.
[0160]
For example, since a function frequently used in the C language or the like is a subroutine, the number of return instructions from the subroutine corresponding to this number is used. Since necessary data for each function is allocated to the general-purpose register, the contents of the previous general-purpose register are saved / restored. Therefore, the effect of shortening the instruction code length by such a return instruction is also increased.
[0161]
In addition, since the number of general-purpose registers to be saved / restored is different for each function, a program can be created by supporting multiple instructions with different numbers of registers or by supporting return instructions that do not involve general-purpose register restoration. Can be improved and the usability can be improved.
[0162]
Even when the CPU has a large number of general-purpose registers, it is possible to specify the general-purpose registers to be restored, so that the degree of freedom in using the general-purpose registers is hardly lost. Further, undesired general purpose registers are not saved / restored.
[0163]
The instruction code length can be shortened by using a fixed combination that designates multiple general-purpose registers, and the number of execution states of each instruction is fixed to reduce internal conditional branching (instruction The decoder can be described according to the input opcode of the decoder), and the internal logic can be simplified and the logic scale can be reduced. It can be easily realized with a wired logic or the like without using a microprogram. Regardless of the microprogram, a wired logic or the like can contribute to speeding up the logic circuit. register selector By having an incrementer at the same time, it is possible to specify an arbitrary continuous combination while minimizing an increase in logical scale.
[0164]
A general-purpose register save instruction (STM) that enables the same designation is executed at the beginning of a subroutine or exception handling routine, and finally, the return instruction of the present invention is executed. Can be improved. When the general-purpose register save instruction is executed, the general-purpose register is cleared after the save, thereby further reducing the instruction code length and the number of execution states.
[0165]
Further, by continuously reading / writing data, it is easy to use these effectively when burst operation for the memory or the bus width is expanded.
[0166]
By including the instruction set of the existing CPU at the source program level or the object program level and adding the above instructions, the software assets can be used effectively and the software development efficiency of the user is improved. Can do. Both of the advantages of maintaining compatibility at the source program level or the object program level and the advantages of adding the transfer instruction can be enjoyed.
[0167]
The invention made by the inventors as described above is not limited to the embodiments, and various modifications can be made without departing from the scope of the invention.
[0168]
The instruction code is an example and can be variously changed. Needless to say, the present invention can be applied when developing a new instruction set in addition to adding to an existing instruction set.
[0169]
The stack structure in exception handling is 32 bits by combining CCR and PC, but these can be divided into 16 bits and 32 bits, or other control registers can be added. The PC may be 32 bits.
[0170]
The configuration and number of general-purpose registers or the number of general-purpose registers that are restored by a return instruction can be arbitrarily changed. The number of general-purpose registers to be restored may be one. The order stored in the stack can be arbitrarily changed. When restoring the general-purpose register, it is more convenient to read continuously with PC (and CCR).
[0171]
The incrementer (RINC) may also perform addition / subtraction with the output of the instruction decoder in addition to 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 correspond to the general-purpose register specified first. A desired general-purpose register may be specified in combination with the addition / subtraction.
[0172]
When ER7, which is a stack pointer, is designated as a general-purpose register to be restored, writing to ER7 may be prohibited. This is because saving / returning the stack pointer is meaningless and a predetermined point operation may be performed.
[0173]
When executing a general register save instruction, it may have both an instruction to clear the general register after saving and an instruction to hold it. This may be specified by a predetermined bit of the first word of the instruction code, and a control signal (MOD) may be generated to change the operation of the second word.
[0174]
The contents of clearing the general-purpose register are not limited to 0, but may be other values. A means for designating the contents to be cleared may be provided separately.
[0175]
The basic unit of instruction is not limited to 16 bits. The return instruction of the present invention can also be applied in 8-bit units and 32-bit units.
[0176]
For simplicity, the bus width is set to 32 bits and the instruction read is set to 16 bits. However, the instruction read can be set to 32 bits and the speed can be increased. Such an example is described in Japanese Patent Application No. 11-167812. Alternatively, the bus width may be 16 bits, and long word read / write may be executed in two read / write operations in units of words. Such an example is described in Japanese Patent Application No. 11-320518.
[0177]
There are no restrictions on other functional blocks of the microcomputer.
[0178]
In the above description, the case where the invention made by the present inventor is applied to the microcomputer, which is the field of use behind the present invention, has been described. Therefore, the present invention can be applied to at least a data processing apparatus having a plurality of register means.
[0179]
【The invention's effect】
The effects obtained by the representative ones of the inventions disclosed in this subject will be briefly described as follows.
[0180]
In a return instruction from a subroutine or exception processing, the instruction code includes information specifying a plurality of general-purpose registers. When the instruction code is executed, the specified general-purpose register is returned in addition to the return of the program counter. By doing so, usability can be improved, and the program capacity and the number of execution states can be shortened.
[0181]
Furthermore, the instruction code length can be shortened by making the combination of general-purpose registers to be specified continuous.Furthermore, by fixing the number of execution states of each instruction, it is possible to reduce internal conditional branching, The internal logic can be simplified and the logical scale can be reduced. Even in the case of adopting a 16-bit variable instruction code system, it is possible to improve the overall program efficiency by effectively using instruction codes while simplifying instruction prefetching and instruction decoding.
[0182]
It has a general register save instruction that enables the same specification, and this is executed at the beginning of a subroutine or exception processing routine. Finally, the return instruction of the present invention is executed, so that the usability can be further improved. .
[0183]
By continuously returning the general-purpose register and the program counter, the internal operation can be facilitated and speeded up.
[0184]
By supporting a plurality of return instructions with different numbers of registers, it is possible to specify consecutive general-purpose registers, further facilitate the creation of a program, and improve usability.
[Brief description of the drawings]
FIG. 1 is a block diagram of a microcomputer to which the present invention is applied.
FIG. 2 is a diagram illustrating a configuration example of a general-purpose register and a control register built in the CPU.
FIG. 3 is a diagram illustrating a configuration example of a CPU.
FIG. 4 is a register selector. RESL The detailed block diagram of a part of.
FIG. 5 is an instruction format diagram of a first return instruction (RTS / n) including a return of a plurality of general purpose registers and a second return instruction (RTE / n).
FIG. 6 is a diagram illustrating a configuration example of a stack of a first return instruction (RTS / n) including a return of a plurality of general-purpose registers and a second return instruction (RTE / n).
FIG. 7 is a flowchart of the operation of a first return instruction (RTS / n).
FIG. 8 is a diagram showing the execution timing of a first return instruction (RTS / n).
FIG. 9 is a diagram showing an operation flow of a second return instruction (RTE / n).
FIG. 10 is a diagram of execution timing of a second return instruction (RTE / n).
FIG. 11 is a diagram showing an operation flow of a save instruction (STM) for a plurality of general-purpose registers.
FIG. 12 is a diagram showing the execution timing of a save instruction (STM) for a plurality of general-purpose registers.
FIG. 13 is a schematic diagram of a CPU development environment according to the present invention.

Claims (4)

所定の命令を順次実行するデータ処理装置であって、
プログラムカウンタとスタックとレジスタ番号で指定できる複数のレジスタとを有し、
前記スタックは、データの書き込みと読み出しが可能であって、最後に格納された内容から順次読み出しを行うことができるデータ記憶手段であり、
前記データ処理装置は、前記プログラムカウンタで指定されるアドレスに格納された命令を実行し、前記プログラムカウンタの値を更新するものであり、
前記データ処理装置は、前記プログラムカウンタの内容を前記スタックに書き込む第1の命令と、前記複数のレジスタの中の指定されたレジスタの内容を前記スタックに書き込む第2の命令と、前記スタックから読み出した内容を前記プログラムカウンタに書き戻すことができるとともに前記複数のレジスタのうち前記スタックから内容を書き戻すべきレジスタの数とレジスタ番号を指定することができる第3の命令と、前記スタックから読み出した内容を前記プログラムカウンタに書き戻すことができるとともに前記複数のレジスタのうち前記スタックから内容を書き戻すべきレジスタの数とレジスタ番号を指定することができる第4の命令とを実行可能であり、
前記第3の命令と前記第4の命令は、指定できるレジスタの数の取り得る値が異なることを特徴とするデータ処理装置。
A data processing apparatus for sequentially executing predetermined instructions,
It has a program counter, stack and multiple registers that can be specified by register number
The stack is a data storage means that can write and read data, and can sequentially read from the content stored last.
The data processing device executes an instruction stored at an address specified by the program counter, and updates the value of the program counter.
The data processing device reads from the stack a first instruction to write the contents of the program counter to the stack, a second instruction to write the contents of a specified register of the plurality of registers to the stack, and And a third instruction that can specify the number and register number of the registers among the plurality of registers that should be written back from the stack, and read from the stack. And a fourth instruction capable of specifying the number of registers and the register number of the plurality of registers whose contents are to be written back from the stack.
The data processing apparatus according to claim 3, wherein the third instruction and the fourth instruction have different possible values for the number of registers that can be specified.
請求項1記載のデータ処理装置であって、
レジスタ選択のための算術演算手段を備え、
前記第3の命令は、前記スタックから順次読み出した複数の内容を、前記レジスタの内、前記第3の命令の命令コード中に指定された値とこの値を用いて前記算術演算手段によって演算された値とに基づいて指定される複数のレジスタに書込むことができることを特徴とするデータ処理装置。
The data processing apparatus according to claim 1, wherein
Arithmetic operation means for register selection,
In the third instruction, a plurality of contents sequentially read from the stack are calculated by the arithmetic operation means using the value specified in the instruction code of the third instruction in the register and this value. A data processing apparatus capable of writing to a plurality of registers designated based on the value .
請求項1又は2に記載のデータ処理装置であって、
前記データ処理装置は、さらに第5の命令を実行可能であり、
前記第5の命令は、前記複数のレジスタのうち前記スタックから内容を復帰すべきレジスタ番号を指定することができることを特徴とするデータ処理装置。
The data processing apparatus according to claim 1 or 2 ,
The data processing device is further capable of executing a fifth instruction;
The data processing apparatus according to claim 5, wherein the fifth instruction can designate a register number whose contents are to be restored from the stack among the plurality of registers.
請求項1乃至の何れか1項に記載のデータ処理装置であって、
前記データ処理装置は、さらに復帰命令を実行可能であり、
前記復帰命令は、前記スタックから読み出した内容を前記プログラムカウンタに書き戻すことができることを特徴とするデータ処理装置。
The data processing apparatus according to any one of claims 1 to 3 ,
The data processing device can further execute a return instruction,
The data processing apparatus according to claim 1, wherein the return instruction can write back the contents read from the stack to the program counter.
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 JP2002157115A (en) 2002-05-31
JP2002157115A5 JP2002157115A5 (en) 2005-06-30
JP3786575B2 true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9477834B2 (en) * 2012-02-08 2016-10-25 Arm Limited Maintaining secure data isolated from non-secure access when switching between domains
US9116711B2 (en) 2012-02-08 2015-08-25 Arm Limited Exception handling in a data processing apparatus having a secure domain and a less secure domain
US9213828B2 (en) 2012-02-08 2015-12-15 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
JP2016179071A (en) * 2015-03-24 2016-10-13 京楽産業.株式会社 Game machine
JP6518737B2 (en) * 2017-09-01 2019-05-22 京楽産業.株式会社 Gaming machine
JP6518738B2 (en) * 2017-09-01 2019-05-22 京楽産業.株式会社 Gaming machine

Also Published As

Publication number Publication date
JP2002157115A (en) 2002-05-31

Similar Documents

Publication Publication Date Title
TWI476597B (en) Data processing apparatus and semiconductor integrated circuit device
KR100462951B1 (en) Eight-bit microcontroller having a risc architecture
US6567910B2 (en) Digital signal processing unit with emulation circuitry and debug interrupt enable register indicating serviceable time-critical interrupts during real-time emulation mode
US20080201564A1 (en) Data processor
JP4004915B2 (en) Data processing device
JP2001202243A (en) Data processing device
JP3786575B2 (en) Data processing device
JP2006313561A (en) Data processor
JP3727395B2 (en) Microcomputer
JP4545777B2 (en) Data processing device
JP3760093B2 (en) Microcomputer
JP3740321B2 (en) Data processing device
JP4498338B2 (en) Data processing device
JP3839835B2 (en) Data processing apparatus and microcomputer
JP3841820B2 (en) Microcomputer
JP4382076B2 (en) Data processing device
JP2002132499A (en) Data processing device and recording medium
JP2001337821A (en) Data processing device
JP4029016B2 (en) Data processing device
JP3765782B2 (en) Microcomputer
JP3759742B2 (en) Data processing device
JP3539951B2 (en) Data processing device
JP3733137B2 (en) Microcomputer
JP2003162411A (en) Data processor
JP2009134745A (en) Data 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