JPH09330218A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH09330218A
JPH09330218A JP17179396A JP17179396A JPH09330218A JP H09330218 A JPH09330218 A JP H09330218A JP 17179396 A JP17179396 A JP 17179396A JP 17179396 A JP17179396 A JP 17179396A JP H09330218 A JPH09330218 A JP H09330218A
Authority
JP
Japan
Prior art keywords
instruction
register
interrupt
microprocessor
instructions
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP17179396A
Other languages
Japanese (ja)
Inventor
Masaru Goto
後藤  勝
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP17179396A priority Critical patent/JPH09330218A/en
Publication of JPH09330218A publication Critical patent/JPH09330218A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a 32-bits RISC type microprocessor for which code efficiency is improved. SOLUTION: A microprocessor 1 has an instruction decoder 6, arithmetical operation logic unit 11, register groups 7 and 9, high-speed multiplication/division unit 12, and interruption controller 8. The instruction decoder 6 is composed of the reduced instruction set computer of 32 bits for decoding the set of instructions under pipeline control, and the instruction set is made for the fixed length of 16 bits. Since the instruction set is limited for the fixed length of 16 bits, code efficiency is improved. Then, since an operation code is made into 6 bits, 32 pieces of general-purpose registers can be sufficiently instructed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】この発明は、特に、GPS
(Global Positioning System )レシーバを制御するの
に用いて好適なRISC(Reduced Instruction Set Co
mputer)型のマイクロプロセッサに関する。
BACKGROUND OF THE INVENTION This invention is particularly applicable to GPS.
(Global Positioning System) RISC (Reduced Instruction Set Co) suitable for controlling a receiver
mputer) type microprocessor.

【0002】[0002]

【従来の技術】衛星からの電波を受信して、移動体の位
置を測位するようなGPSレシーバが知られている。こ
のようなGPSレシーバの制御に用いるRISCプロセ
ッサの開発が進められている。
2. Description of the Related Art There is known a GPS receiver which receives radio waves from a satellite and measures the position of a moving body. A RISC processor used for controlling such a GPS receiver is under development.

【0003】RISCプロセッサは、演算を最小限に抑
える命令セットから構成されており、パイプライン処理
により、全ての命令が略同じ短い時間で実行されるよう
に設定されている。通常、32ビットのRISCプロセ
ッサでは、命令セットは、32ビットの固定長とされて
いる。RISCプロセッサでは、このように命令セット
が固定長とされ、単純化されている。そして、レジスタ
間演算によって、殆どの命令が1クロックで実現でき、
パイプライン処理が容易とされている。
The RISC processor is composed of an instruction set that minimizes operations, and is set by pipeline processing so that all instructions are executed in substantially the same short time. Normally, in a 32-bit RISC processor, the instruction set has a fixed length of 32 bits. In the RISC processor, the instruction set has a fixed length in this way and is simplified. And by register-to-register operation, most instructions can be realized in one clock,
Pipeline processing is easy.

【0004】[0004]

【発明が解決しようとする課題】上述のように、従来の
RISCプロセッサでは、命令セットが32ビットの固
定長とされている。ところが、32ビットの固定長の命
令セットでは、コード効率が良くない。改良を加えて可
変長の命令にしたRISCプロセッサでは、デコード部
の負担が大きくなり、また、分岐後のパイプライン充填
に時間がかかリ、またこれを改善するのに、分岐キャッ
シュが必要になり、回路規模が大きくなるという問題が
ある。また、従来のRISCプロセッサには、コントロ
ーラで必要なビット処理系の命令を持たず、またデータ
処理プロセッサの持っている高速な乗除算器も有してい
ない。
As described above, in the conventional RISC processor, the instruction set has a fixed length of 32 bits. However, the code efficiency is not good with the 32-bit fixed length instruction set. In the RISC processor which has been modified to have variable length instructions, the load on the decoding section becomes heavy, and it takes time to fill the pipeline after branching, and a branch cache is necessary to improve this. Therefore, there is a problem that the circuit scale becomes large. Further, the conventional RISC processor does not have the bit processing type instructions necessary for the controller, nor does it have the high-speed multiplier / divider that the data processing processor has.

【0005】従って、この発明の目的は、コード効率の
向上が図られたマイクロプロセッサを提供することにあ
る。
Therefore, it is an object of the present invention to provide a microprocessor with improved code efficiency.

【0006】[0006]

【課題を解決するための手段】この発明は、命令デコー
ダと、算術演算論理ユニットと、レジスタ群と、高速乗
除算ユニットと、割り込みコントローラとを有し、命令
デコーダは、パイプライン制御により命令セットをデコ
ードする縮小命令セットコンピュータの構成とされ、命
令セットは、16ビットの固定長とされていることを特
徴とするマイクロプロセッサである。
The present invention has an instruction decoder, an arithmetic logic unit, a register group, a high speed multiplication / division unit, and an interrupt controller, and the instruction decoder uses an instruction set by pipeline control. And a reduced instruction set computer for decoding the instruction set, and the instruction set is a microprocessor having a fixed length of 16 bits.

【0007】命令セットを、16ビットの固定長とする
ことにより、コード効率が向上される。そして、オペコ
ードを6ビットとすることで、32本の汎用レジスタに
対する命令が十分に行なえる。
Code efficiency is improved by making the instruction set a fixed length of 16 bits. By setting the operation code to 6 bits, it is possible to sufficiently execute the instruction to the 32 general-purpose registers.

【0008】[0008]

【発明の実施の形態】この発明の実施の形態について、
以下の順序で説明する。 1.プロセッサの概要 2.プロセッサの構成 3.5段パイプライン 4.レジスタ 5.アドレス空間 6.割り込み処理 7.シングルステップ 8.命令セット 9.デバッグ機能
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described.
Description will be made in the following order. 1. Outline of processor 2. Processor configuration 3.5-stage pipeline 4. Register 5. Address space 6. Interrupt processing 7. Single step 8. Instruction set 9. Debug function

【0009】1.プロセッサの概要 この発明が適用されたマイクロプロセッサは、RISC
(Reduced Instruction Set Computer)の構成とされ
た、32ビットのプロセッサである。動作周波数は、2
0〜25MHz、性能は20mips以上である。
1. Outline of Processor A microprocessor to which the present invention is applied is a RISC.
It is a 32-bit processor configured as (Reduced Instruction Set Computer). Operating frequency is 2
0-25 MHz, performance is 20 mips or more.

【0010】RISCでは、命令セットが演算を行なう
最小限のものに抑えられており、全ての命令が略同じ時
間で実行される。このマイクロプロセッサでは、命令セ
ットは16ビットの固定長とされており、コード効率重
視のオリジナルな直交型の命令セットが用意されてい
る。直交型の命令セットでは、各命令は非常に基本的な
タスクを実行し、他の命令とはタスクが重複しない。命
令セットには、例えば、即値命令、レジスタ転送命令、
算術命令、比較命令、論理命令、シフト命令、交換/拡
張命令、NOP命令、ビット処理命令、乗除算命令、メ
モリ転送命令、コプロセッサ転送命令、分岐命令とが含
まれる。
In RISC, the instruction set is kept to a minimum for performing operations, and all instructions are executed in approximately the same time. In this microprocessor, the instruction set has a fixed length of 16 bits, and an original orthogonal type instruction set that emphasizes code efficiency is prepared. In the orthogonal instruction set, each instruction performs a very basic task and does not overlap with other instructions. The instruction set includes, for example, an immediate instruction, a register transfer instruction,
It includes arithmetic instructions, comparison instructions, logical instructions, shift instructions, exchange / extend instructions, NOP instructions, bit processing instructions, multiplication / division instructions, memory transfer instructions, coprocessor transfer instructions, and branch instructions.

【0011】また、RISCプロセッサでは、演算命令
がソースオペランドを読み込んだり、演算結果を書き込
むのに、メモリではなく、レジスタが用いられる。レジ
スタ間演算により殆どの命令が1クロックサイクルで実
行できるようになるため、パイプラインが容易となる。
汎用レジスタとしては、32本分用意されている。
Further, in the RISC processor, the register is used instead of the memory for the operation instruction to read the source operand and write the operation result. Most of the instructions can be executed in one clock cycle by the inter-register operation, so that the pipeline becomes easy.
32 general-purpose registers are prepared.

【0012】このマイクロプロセッサでは、5段パイプ
ライ処理が採用されている。ALUとしては、1サイク
ルのバレルシフタが備えれている。また、(16×1
6)の乗算を1サイクルで実行し、(16(32)×1
6(32))の除算を(10(18)サイクル)で実行
する高速乗除算器が備えられている。
In this microprocessor, 5-stage pipeline processing is adopted. The ALU is equipped with a 1-cycle barrel shifter. In addition, (16 × 1
6) multiplication is executed in one cycle, and (16 (32) × 1
A fast multiplier / divider is provided for performing 6 (32)) divisions in 10 (18) cycles.

【0013】更に、このマイクロプロセッサは、RIS
Cテクノロジーを受け継ぎつつ、CISC(Complex In
struction Set Computer)や、DSP(Digital Signal
Processor)テクノロジー等を取り入れることにより、
コード効率、ビット処理、乗除算、割り込み等の点が大
幅に改善されている。
Further, the microprocessor has a RIS
While inheriting C technology, CISC (Complex In
Structure Set Computer) and DSP (Digital Signal)
Processor) technology etc.
Code efficiency, bit processing, multiplication and division, interrupts, etc. have been greatly improved.

【0014】割り込み処理については、 1)ベクタ命令テーブルの採用 2)割り込みスタックポインタの採用 3)除算命令の結果を専用レジスタに入れて割り込み処
理を受付 ることにより、高速割り込み、多重割り込みが可能とさ
れている。
Regarding interrupt processing, 1) adoption of a vector instruction table 2) adoption of an interrupt stack pointer 3) insertion of the result of a division instruction into a dedicated register and acceptance of interrupt processing enables high-speed interrupts and multiple interrupts Has been done.

【0015】高速割り込み、多重割り込みは、例えば、
GPSシステムの制御に用いる場合に好適である。GP
Sでは、衛星からの電波を受信する複数のDPSチャン
ネルからのリアルタイム割り込みや、多重割り込みが要
求される。
High-speed interrupts and multiple interrupts are, for example,
It is suitable for use in controlling the GPS system. GP
In S, real-time interrupts and multiple interrupts from a plurality of DPS channels that receive radio waves from satellites are required.

【0016】ベクタ命令テーブルの採用により、割り込
みを受け付けると、5段のパイプラインが守られ、ベク
タ命令テーブルに直接フェッチされる。分岐命令は、ベ
クタ命令テーブルに直接書き込まれる。これにより、高
速割り込みが可能になる。割り込みスタックポインタが
採用され、割り込み専用スタックポインタとリターン命
令が用意されている。これにより、割り込みの多重化が
実現される。割り込みで自動退避は、PC(プログラム
カウンタ)のみである。リターン命令では、スタックポ
インタ上のPCのみ内部のPCに書き戻す操作を実行す
る。長い除算命令の結果は、専用レジスタに入れて割り
込みを受け付けるようにしている。他の命令は、1命令
1クロックで実現されている。但し、ディレイスロット
期間は、割り込みが禁止される。
By adopting the vector instruction table, when an interrupt is accepted, the pipeline of five stages is protected and the instruction table is directly fetched. Branch instructions are written directly to the vector instruction table. This enables high speed interrupts. An interrupt stack pointer is adopted, and an interrupt-only stack pointer and a return instruction are prepared. This realizes multiplexing of interrupts. Only PC (program counter) can automatically save by interrupt. In the return instruction, only the PC on the stack pointer is written back to the internal PC. The result of a long divide instruction is placed in a dedicated register to accept an interrupt. Other instructions are realized with one instruction and one clock. However, interrupts are prohibited during the delay slot period.

【0017】また、このマイクロプロセッサでは、強力
なデバッグサポート機能が設けられている。このデバッ
グサポート機能により、外部回路無しで、簡単にターゲ
ットデバッカーが実現される。デバッグサポート機能と
しては、 1)5段パイプラインでのシングルステップ実現機能の
搭載 2)2つのブレーク命令を用意 3)アドレスブレークを3チャンネル搭載 4)データブレークを2チャンネル搭載 5)ICE(インサーキットエミュレータ)ブレーク端
子を配設 が上げられる。
Further, this microprocessor has a strong debug support function. With this debug support function, a target debugger can be easily realized without any external circuit. Debug support functions are as follows: 1) Single step implementation function in a 5-stage pipeline 2) Two break instructions prepared 3) Address break 3 channels installed 4) Data break 2 channels installed 5) ICE (in-circuit) Emulator) The break terminal can be installed.

【0018】今まで、CISCでのみ行なわれていたシ
ングルステップ機能をRISCでも使用することによ
り、プログラムのステップ実行が簡単にできる。但し、
ディレイスロットは、実行して次の命令でブレークが発
生する。ベクタアドレスの異なる2つのブレーク命令を
用意することにより、RAMエリアに対してブレーク命
令を書き込んで、無制限個にブレークポインタを実現可
能である。また、5段のパイプラインで実行しているマ
イクロプロセッサのアドレスブレークポインタを3チャ
ンネル搭載し、上述の2つのブレーク命令の使用できな
いROMエリアに対してブレークが可能である。更に、
5段パイプラインで実行しているマイクロプロセッサの
データブレークポインタを2チャンネル搭載することに
より、内蔵RAMのブレークが容易に実現可能である。
ICEブレーク端子を備えることで、外部からICEへ
の制御遷移が可能である。更に、マイクロプロセッサ1
には、ユーザ定義のコプロセッサが接続可能である。
By using the single step function which has been performed only in CISC up to now in RISC, step execution of a program can be simplified. However,
The delay slot is executed and a break occurs at the next instruction. By preparing two break instructions having different vector addresses, it is possible to write break instructions in the RAM area and realize an unlimited number of break pointers. Further, three channels of address break pointers of a microprocessor executing in a 5-stage pipeline are mounted, and a break can be made in a ROM area where the above two break instructions cannot be used. Furthermore,
The built-in RAM can be easily broken by mounting two channels of data break pointers of a microprocessor executing in a 5-stage pipeline.
By providing the ICE break terminal, control transition from the outside to the ICE is possible. Further, the microprocessor 1
A user-defined coprocessor can be connected to.

【0019】2.プロセッサの構成 図1は、この発明が適用されたマイクロプロセッサ1の
構成を示すものである。図1において、マイクロプロセ
ッサ1からは、データバス2、インストラクションバス
3、コプロセッサバス4が導出される。また、マイクロ
プロセッサ1からは、リセット、クロック、外部割り込
み(7:0)、NMI(Non-Maskable割り込み)、PM
I(Power Management割り込み)等の端子群5が導出さ
れる。
2. Configuration of Processor FIG. 1 shows the configuration of a microprocessor 1 to which the present invention is applied. In FIG. 1, a data bus 2, an instruction bus 3, and a coprocessor bus 4 are derived from the microprocessor 1. Also, from the microprocessor 1, reset, clock, external interrupt (7: 0), NMI (Non-Maskable interrupt), PM
A terminal group 5 such as I (Power Management interrupt) is derived.

【0020】マイクロプロセッサ1によりシステムを構
成する場合には、図2に示すように、マイクロプロセッ
サ1は、データバス2、インストラクションバス3を介
して、メモリコントローラ21に接続される。また、マ
イクロプロセッサ1は、コプロセッサバス4を介して、
コプロセッサ22に接続される。
When the system is constituted by the microprocessor 1, the microprocessor 1 is connected to the memory controller 21 via the data bus 2 and the instruction bus 3 as shown in FIG. Further, the microprocessor 1 is connected via the coprocessor bus 4 to
It is connected to the coprocessor 22.

【0021】図1において、マイクロプロセッサ1は、
命令デコーダ6と、専用コントロールレジスタ群7と、
割り込みコントローラ8と、汎用レジスタ群9と、バイ
パスロジック10と、ALU(Arithmetic and Logic U
nit )11と、乗除算演算部12と、アドレス計算部1
3とからなる。
In FIG. 1, the microprocessor 1 is
An instruction decoder 6, a dedicated control register group 7,
Interrupt controller 8, general-purpose register group 9, bypass logic 10, ALU (Arithmetic and Logic U)
nit) 11, multiplication / division calculation unit 12, and address calculation unit 1
3 and 3.

【0022】命令デコーダ6は、パイプライン制御を行
なっている。パイプライン制御では、命令処理のタスク
を、フェッチ、ALU演算、メモリアクセス、ライトバ
ックというような単純なステージに分解し、命令が1つ
のステージから次のステージに移ると、空いたステージ
に次の命令が入るような処理が行なわれる。このような
ステージ単位で命令を処理することで、1つの命令の完
了を待たずに、次の命令の処理が行なえる。このマイク
ロプロセッサでは、5段のパイプラインが用いられてい
る。
The instruction decoder 6 performs pipeline control. In pipeline control, the task of instruction processing is decomposed into simple stages such as fetch, ALU operation, memory access, and write back, and when an instruction moves from one stage to the next stage, the next stage is released to the empty stage. Processing is performed such that an instruction is entered. By processing an instruction in units of such stages, the next instruction can be processed without waiting for the completion of one instruction. In this microprocessor, a 5-stage pipeline is used.

【0023】専用コントロールレジスタ群7としては、
32ビットのレジスタが10本用意されている。専用コ
ントロールレジスタ群7は、ステータス、割り込み制
御、ICEサポート機能等に用いられる。
As the dedicated control register group 7,
Ten 32-bit registers are prepared. The dedicated control register group 7 is used for status, interrupt control, ICE support function and the like.

【0024】割り込みコントローラ8は、割り込み処理
を行なうためのものである。割り込みは、ベクタ命令テ
ーブルと、割り込みスタックポインタが採用され、最小
1サイクル、最大3サイクルでの割り込み応答機能を実
現している。割り込みベクタ命令テーブルは、割り込み
を受け付けると、5段パイプラインを守って、ベクタ命
令テーブルに直接フェッチするものである。ベクタ命令
テーブルには、分岐命令が書き込まれる。
The interrupt controller 8 is for performing interrupt processing. For the interrupt, a vector instruction table and an interrupt stack pointer are adopted to realize an interrupt response function in a minimum of 1 cycle and a maximum of 3 cycles. When an interrupt is accepted, the interrupt vector instruction table follows the 5-stage pipeline and fetches directly into the vector instruction table. Branch instructions are written in the vector instruction table.

【0025】汎用レジスタ群9としては、32ビットの
レジスタが32本(R0〜R31)用意されている。そ
の中で、レジスタR1はアキュムレータ(ACC)、レ
ジスタR30はスタックポインタ(SP)、レジスタR
31は割り込みスタックポインタ(ISP)である。I
SPは、割り込み処理、例外処理、割り込みリターン処
理等のスタックポインタとして使用される。ACC、S
P、ISPを含む汎用レジスタR0〜R31の初期値は
不定である。
As the general-purpose register group 9, 32 32-bit registers (R0 to R31) are prepared. Among them, the register R1 is the accumulator (ACC), the register R30 is the stack pointer (SP), and the register R.
Reference numeral 31 is an interrupt stack pointer (ISP). I
The SP is used as a stack pointer for interrupt processing, exception processing, interrupt return processing and the like. ACC, S
The initial values of the general-purpose registers R0 to R31 including P and ISP are undefined.

【0026】バイパスロジック10は、5段のパイプラ
インを動かすためのロジックである。ALU11は、1
サイクルのバレルシフタを備えている。乗除算ユニット
12は、16×16ビットの1サイクルの高速乗算演算
器と、16(32)×16(32)ビットの10(1
8)サイクルの高速除算演算器とを備えている。このよ
うに、除算は独立ユニットで構成されており、演算待ち
結果のサイクルでも他の命令を実行できる。アドレス計
算部13は、プログラムカウンタ(PC)、インクリメ
ント、データアライナを含む。
The bypass logic 10 is a logic for moving a 5-stage pipeline. ALU11 is 1
Equipped with a cycle barrel shifter. The multiplication / division unit 12 includes a 16 × 16-bit 1-cycle high-speed multiplication calculator and a 16 (32) × 16 (32) -bit 10 (1
8) It has a cycle high-speed division calculator. In this way, the division is composed of an independent unit, and other instructions can be executed even in the cycle of the operation waiting result. The address calculator 13 includes a program counter (PC), an incrementer, and a data aligner.

【0027】3.5段パイプライン マイクロプロセッサユニット1は、5段のパイプライン
処理が行なわれる。インストラクション、データ、コプ
ロセッサは、独立したバス構造となっており、入出力も
独立に行なっている。各バスは、外部キャッシュ(バッ
ファ)及びコプロセッサレジスタで結合されている。
The 3.5-stage pipeline microprocessor unit 1 carries out 5-stage pipeline processing. The instruction, data, and coprocessor have independent bus structures, and input / output is also performed independently. Each bus is connected by an external cache (buffer) and a coprocessor register.

【0028】パイプライン処理では、命令処理のタスク
が、フェッチ、ALU演算、メモリアクセス、ライトバ
ックというようなステージに分解される。ディレイスロ
ットには、ブランチ系、ロード系、リターン系の3種類
がある。例えば、ブランチ命令では、その前のブランチ
命令をデコードしてブランチ命令と解析する前に、次の
命令のアドレスが出てしまう。これがブランチディレイ
スロットである。また、ロード命令では、次のロード命
令でロードしたレジスタの値を使用するとすると、次の
ロード命令のALUサイクルでは、まだ外部バス上にロ
ードデータがある。ロード命令では、直前の命令でロー
ドしたレジスタのアクセスはできない。これがロードデ
ィレクスロットである。更に、リターン命令では、スタ
ックからプログラムカウンタ(PC)の値を取ってき
て、アドレスを戻すのに、パイプライン動作のために間
に合わない。これがリターンスロットである。
In pipeline processing, the task of instruction processing is decomposed into stages such as fetch, ALU operation, memory access, and write back. There are three types of delay slots: branch type, load type, and return type. For example, with a branch instruction, the address of the next instruction is output before the previous branch instruction is decoded and analyzed as a branch instruction. This is a branch delay slot. Further, if the value of the register loaded by the next load instruction is used in the load instruction, there is still load data on the external bus in the ALU cycle of the next load instruction. The load instruction cannot access the register loaded by the previous instruction. This is the LoadDirect slot. Furthermore, the return instruction fetches the value of the program counter (PC) from the stack and returns the address, which is too late because of a pipeline operation. This is the return slot.

【0029】ブランチ系の命令に対するディレイスロッ
トの数は1スロットであり、ロード系の命令に対するデ
ィレイスロットの数は1スロットであり、リターン系の
命令に対するディレイスロットの数は1スロットであ
る。
The number of delay slots for branch type instructions is one slot, the number of delay slots for load type instructions is one slot, and the number of delay slots for return type instructions is one slot.

【0030】4.レジスタ 4−1.汎用レジスタ 図3は、汎用レジスタの構成を示すものである。汎用レ
ジスタとしては、図3に示すように、R0〜R31の3
2本が用意されている。命令体系は、直交性を考慮して
構成されているので、特殊な命令以外は、演算のレジス
タとして使用できる。ACC(R1)はアキュムレータ
で、即値/ビット処理系のオペランドとして使用され
る。例外としては、SP(R30)はスタックポインタ
で、コール系、リターン系のスタックポインタとして使
用される。ISP(R31)は割り込みスタックポイン
タで、割り込み処理、例外処理、割り込みリターン処理
のスタックポインタとして使用される。汎用レジスタ、
ACC、SP、ISPの初期値は不定である。
4. Register 4-1. General-purpose Register FIG. 3 shows the configuration of the general-purpose register. As a general-purpose register, as shown in FIG.
Two are prepared. Since the instruction system is configured in consideration of orthogonality, it can be used as a register for operations except for special instructions. ACC (R1) is an accumulator and is used as an operand of an immediate / bit processing system. As an exception, SP (R30) is a stack pointer, which is used as a call-type or return-type stack pointer. The ISP (R31) is an interrupt stack pointer, which is used as a stack pointer for interrupt processing, exception processing, and interrupt return processing. General-purpose register,
The initial values of ACC, SP and ISP are indefinite.

【0031】4−2.コプロセッサレジスタ 図4は、コプロセッサレジスタの構成を示すものであ
る。図4に示すように、コプロセッサレジスタは、Co
p0レジスタとして、G0〜G31、C0〜C31、C
op1レジスタとして、G0〜G31、C0〜C31、
の合計128個に拡張できる。コプロセッサレジスタ
と、汎用レジスタとの間の転送をするための命令が定義
されている。
4-2. Coprocessor Register FIG. 4 shows the configuration of the coprocessor register. As shown in FIG. 4, the coprocessor register is Co
As a p0 register, G0 to G31, C0 to C31, C
As op1 registers, G0 to G31, C0 to C31,
Can be expanded to 128 in total. Instructions for transfer between the coprocessor register and the general purpose register are defined.

【0032】Cop0レジスタG0〜G31には、シス
テムコントロールコプロセッサレジスタが合計10個内
蔵されている。その他の使用していないレジスタは、将
来の拡張用である。システムコントロールプロセッサレ
ジスタの概要は、以下の通りである。
The Cop0 registers G0 to G31 incorporate a total of 10 system control coprocessor registers. The other unused registers are for future expansion. The outline of the system control processor register is as follows.

【0033】 Cop0 G0 :SR(Status Register ) フラグを保持する Cop0 G1 :MCR(Machine Control Register) マシン制御 Cop0 G2 :IBR(Interrupt Base Register ) 割り込みベクタベースアドレス設定 Cop0 G3 :ICR(Interrupt Control Register) 割り込み制御 Cop0 G4 :IMR0(Interrupt Mode Register 0 ) 外部割り込みモード制御0 Cop0 G5 :IMR1(Interrupt Mode Register 1 ) 外部割り込みモード制御1 Cop0 G6 :JBR(Jump Base Register) 特殊ジャンプベースアドレス設定 Cop0 G10:IBP0(Instruction Break Point 0 ) インストラクションブレークアドレス設定 Cop0 G11:IBP1(Instruction Break Point 1 ) インストラクションブレークアドレス設定 Cop0 G12:IBP2(Instruction Break Point 2 ) インストラクションブレークアドレス設定Cop0 G0: SR (Status Register) holding flags Cop0 G1: MCR (Machine Control Register) machine control Cop0 G2: IBR (Interrupt Base Register) interrupt vector base address setting Cop0 G3: ICR (Interrupt Control Register) interrupt Control Cop0 G4: IMR0 (Interrupt Mode Register 0) External interrupt mode control 0 Cop0 G5: IMR1 (Interrupt Mode Register 1) External interrupt mode control 1 Cop0 G6: JBR (Jump Base Register) Special jump base address setting Cop0 G10: IBP0 ( Instruction Break Point 0) Instruction break address setting Cop0 G11: IBP1 (Instruction Break Point 1) Instruction break address setting Cop0 G12: IBP2 (Instruction Break Po int 2) Instruction break address setting

【0034】また、データアクセスにより割り込みは、
0CHと1CHの2チャンネルが用意されている。デー
タアクセスによる割り込みには、以下のコプロセッサレ
ジスタが用いられる。
An interrupt due to data access is
There are two channels, 0CH and 1CH. The following coprocessor registers are used for interrupts due to data access.

【0035】 Cop1 G4:DABRO(Data Address Break Register 0 ) 割り込みを実行させたいデータアドレスを記述 Cop1 G5:WDBR0(Write Data Break Register 0 ) 割り込みを実行させたいデータの値を記述 Cop1 G6:WDMR0(Write Data Mask Register 0) マスク制御を行なう Cop1 G7:DBCR0(Data Break Control Register 0 ) データアクセスモードを設定 Cop1 G8:DBRR0(Data Break Run Register 0 データブレークラン Cop1 G9:FMWR(Flash Memory Write Register ) フラッシュメモリ書込みセレクト Cop1 G10:DABR1(Data Address Break Register 1) 割り込みを実行させたいデータアドレスを記述 Cop1 G11:DAMR1(Data Address Masc Register1) マスク制御を行なう Cop1 G12:WDBR1(Write Data Break Register 1) 割り込みを実行したいアドレスを記述 Cop1 G13:WDMR1(Write Data Mask Register1) マスク制御を行なう Cop1 G14:DBCR1(Data Break Control Register 1) データアクセスモードを設定 Cop1 G15:DBRR1(Data Break Run Register 1 データブレークランCop1 G4: DABRO (Data Address Break Register 0) Describe the data address at which the interrupt is to be executed Cop1 G5: WDBR0 (Write Data Break Register 0) Describe the data value at which the interrupt is to be executed Cop1 G6: WDMR0 (Write Data Mask Register 0) Perform mask control Cop1 G7: DBCR0 (Data Break Control Register 0) Set data access mode Cop1 G8: DBRR0 (Data Break Run Register 0 data break run Cop1 G9: FMWR (Flash Memory Write Register) flash memory Write select Cop1 G10: DABR1 (Data Address Break Register 1) Describe the data address for which interrupt is to be executed Cop1 G11: DAMR1 (Data Address Masc Register 1) Perform mask control Cop1 G12: WDBR1 (Wri te Data Break Register 1) Describe the address where you want to execute the interrupt Cop1 G13: WDMR1 (Write Data Mask Register 1) Perform mask control Cop1 G14: DBCR1 (Data Break Control Register 1) Set the data access mode Cop1 G15: DBRR1 (Data Break Run Register 1 Data break run

【0036】なお、図5〜図16は、これらのレジスタ
(Cop1 G4〜G15)に設定されるデータの詳細
を示すものである。
5 to 16 show details of data set in these registers (Cop1 G4 to G15).

【0037】5.アドレス空間 図17は、マイクロプロセッサ1のアドレス空間を示す
ものである。マイクロプロセッサ1のアドレス空間は、
インストラクション、データ、夫々独立に、4GB使用
することができる。外部プロセッサとのやり取りには、
96ワードの外部レジスタを使用することができる。
5. Address Space FIG. 17 shows the address space of the microprocessor 1. The address space of the microprocessor 1 is
4 GB can be used independently for each instruction and data. To interact with an external processor,
A 96-word external register can be used.

【0038】外部リセットを受け付けると、FFFFFE60H
に分岐され、その命令が実行される。ベクタアドレス
は、2ワード(4ワード)おきに設定される。最初の1
ワードにブランチ命令が設定される。後の1ワードは、
ディレイスロットである。ベクタアドレスは、割り込み
ベースレジスタ(IBR)(Cop0 G2)をベース
にしているので、256バイトの境界で任意の位置に配
置できる。インストラクション/データは、同一空間に
マッピングされる。通常のロード命令で、ROM空間等
から値を得ることが可能である。
When an external reset is accepted, FFFFFE60H
And the instruction is executed. The vector address is set every 2 words (4 words). First one
A branch instruction is set in the word. The last one word is
It is a delay slot. Since the vector address is based on the interrupt base register (IBR) (Cop0 G2), it can be located at any position on a 256-byte boundary. Instructions / data are mapped in the same space. It is possible to obtain a value from the ROM space or the like with a normal load instruction.

【0039】6.割り込み処理 割り込み処理は、図18に示すように、優先順位が設定
されている。SSTEP(Single Step )が最優先で、
PMI(Power management)割り込み、NMI(Non-ma
skable)割り込み、…の順に、優先順位が割り振られて
いる。外部割り込みは、Exint0からExint7
までの8本がサポートされている。各割り込みには、ベ
クタアドレスオフセットが決められており、このベクタ
アドレスオフセットから、ベクタアドレスが以下のよう
に求められる。 Vecter Address= {IBR[31:8],Vecter Address Offset
} IBR[31:8] は、割り込みベクタテーブルのベースを設定
する割り込みベースレジスタ(IBR(Cop G
2))で、SYSCALL/BREAK/DEBREA
K命令を実行すると、そのベクタアドレスに分岐し、分
岐命令はベクタ命令テーブルに直接書き込まれる。この
ように、割り込みを受け付けると、5段のパイプライン
が守られ、そのベクタアドレスのベクタ命令テーブルに
直接フェッチされる。これにより、最低1サイクルの高
速割り込みが可能である。
6. Interrupt processing The interrupt processing has a priority order as shown in FIG. SSTEP (Single Step) is the highest priority,
PMI (Power management) interrupt, NMI (Non-ma
Priority is assigned in the order of skable) interrupt, .... External interrupts are from Exint0 to Exint7
Up to 8 are supported. A vector address offset is determined for each interrupt, and a vector address is obtained from this vector address offset as follows. Vecter Address = {IBR [31: 8], Vecter Address Offset
} IBR [31: 8] is an interrupt base register (IBR (Cop G) that sets the base of the interrupt vector table.
2)) in SYSCALL / BREAK / DEBREA
When the K instruction is executed, it branches to the vector address, and the branch instruction is directly written in the vector instruction table. In this way, when the interrupt is accepted, the pipeline of five stages is protected and the vector instruction table of the vector address is directly fetched. As a result, at least one cycle of high-speed interrupt is possible.

【0040】ICR(Cop0 G3)のAIEフラグ
は、全て、割り込みでディスイネーブルされる。割り込
み受付期間は、割り込み禁止期間を除いて、毎サイクル
で実行される。割り込み禁止期間は、全ての割り込みに
ついては、リターンディレイスロット、分岐ディレイス
ロットである。また、PMI割り込み期間中は、リター
ンディレイスロットまで全ての割り込みが禁止される。
NMI割り込み期間中は、リターンディレイスロットま
では、PMI割り込みしか受け付けない。PMI、NM
Iは変化点検出、その他の割り込みは、レベル検出で割
り込みが実行される。割り込み時には、図19に示すよ
うに、退避アドレスが設定される。
All AIE flags of ICR (Cop0 G3) are disabled by interrupt. The interrupt acceptance period is executed every cycle except the interrupt disable period. The interrupt disable period is a return delay slot or a branch delay slot for all interrupts. Also, during the PMI interrupt period, all interrupts are prohibited until the return delay slot.
During the NMI interrupt period, only the PMI interrupt is accepted until the return delay slot. PMI, NM
I is a change point detection, and other interrupts are executed by level detection. At the time of interruption, a save address is set as shown in FIG.

【0041】データアクセスによる割り込みのしかた
は、以下の通りである。 1)リード時にデータアドレス比較のみで割り込みを実
行させたい場合 DABR0(Cop1 G4)に割り込みを実行させた
いデータアドレスを記述する。DBCR0(Cop1
G7)のMRDを「1」、MWRを「0」にする。リー
ドの仕方(SB,SHW,SW)をDBCR0のBE
〔3:0〕により選択する。DBRR0(Cop1 G
8)のRUNを「1」(RUN)に設定する。
The method of interrupting data access is as follows. 1) When you want to execute an interrupt only by comparing data addresses when reading Write the data address you want to execute an interrupt in DABR0 (Cop1 G4). DBCR0 (Cop1
G7) MRD is set to "1" and MWR is set to "0". How to read (SB, SHW, SW) BE of DBCR0
Select by [3: 0]. DBRR0 (Cop1 G
8) Set RUN to "1" (RUN).

【0042】2)ライト時にデータアドレスの比較のみ
で割り込みを実行させたい場合 DABR0に割り込みを実行させたいデータアドレスを
記述する。DBCR0のMWRを「1」、MRDを
「0」に設定する。ライトの仕方(LBU、LB、LH
WU、LHW、LW)をDBCR0のBE〔3:0〕に
より選択する。データ比較条件を無視するために、WD
MR0の全てのビットを「0」にマスクする。DBRR
0のRUNを「1」(RUN)に設定する。
2) When it is desired to execute an interrupt only by comparing data addresses at the time of writing Describe the data address to be executed in DABR0. Set MWR of DBCR0 to "1" and MRD to "0". How to write (LBU, LB, LH
WU, LHW, LW) is selected by BE [3: 0] of DBCR0. WD to ignore the data comparison condition
Mask all bits of MR0 to "0". DBRR
Set the RUN of 0 to "1" (RUN).

【0043】3)ライト時にデータ比較により割り込み
を実行させたい場合 DABR0に割り込みを実行させたいデータアドレスを
記述する。DBCR0のMWEを「1」、MRDを
「0」に設定する。ライトの仕方(LBU、LB、LH
WU、LHW、LW)をDBCR0のBE〔3:0〕に
より選択する。WDR0に割り込みを実行させたいデー
タの値を記述する。あるビットをマスクする必要があれ
ば、対応するWDMR0のビットを「0」にマスクす
る。DBRR0のRUNを「1」(RUN)に設定す
る。
3) When it is desired to execute an interrupt by comparing data at the time of writing Write a data address to execute an interrupt in DABR0. Set MWE of DBCR0 to "1" and MRD of "0". How to write (LBU, LB, LH
WU, LHW, LW) is selected by BE [3: 0] of DBCR0. Describe the value of the data you want WDR0 to execute an interrupt. If it is necessary to mask a bit, the corresponding bit of WDMR0 is masked to "0". Set the RUN of DBRR0 to "1" (RUN).

【0044】4)リード/ライト時にデータアドレスの
比較のみで割り込みを実行させたい場合 DABR0に割り込みを実行させたいデータアドレスを
記述する。DBCR0のMRDを「1」、MWRを
「1」に設定する。リード/ライトの仕方(SB/LB
U/LB、SHW/LHWU/LHW、SW/LW)を
DBCR0のBE〔3:0〕により選択する。データ比
較条件を無視するために、WDMR0の全てのビットを
「0」にマスクする。DBRR0のRUNを「1」(R
UN)に設定する。
4) When it is desired to execute the interrupt only by comparing the data addresses at the time of reading / writing Describe the data address to be executed in DABR0. Set MRD of DBCR0 to "1" and MWR to "1". How to read / write (SB / LB
U / LB, SHW / LHWU / LHW, SW / LW) is selected by BE [3: 0] of DBCR0. All bits of WDMR0 are masked to "0" to ignore the data comparison condition. Set the RUN of DBRR0 to "1" (R
UN).

【0045】5)リード時のデータアドレス比較とライ
ト時のデータ比較により割り込みを実行させたい場合 DABR0に割り込みを実行させたいデータアドレスを
記述する。DBCR0のMWRを「1」、MRDを
「1」に設定する。リード/ライトの仕方(SB/LB
U/LB、SHW/LHWU/LHW、SW/LW)を
DBCR0のBE〔3:0〕により選択する。あるビッ
トをマスクする必要があれば、対応するWDMR0のビ
ットを「0」にマスクする。DBRR0のRUNを
「1」(RUN)に設定する。0CH/1CH共に割り
込みが起こると、同じベクタアドレスに飛ぶ。どちらの
チャンンネルであるかは、DBRR0のRUNを見れば
判断できる。
5) When it is desired to execute an interrupt by comparing the data address at the time of read and the data at the time of write Write the data address at which the interrupt is to be executed in DABR0. The MWR of DBCR0 is set to "1" and the MRD is set to "1". How to read / write (SB / LB
U / LB, SHW / LHWU / LHW, SW / LW) is selected by BE [3: 0] of DBCR0. If it is necessary to mask a bit, the corresponding bit of WDMR0 is masked to "0". Set the RUN of DBRR0 to "1" (RUN). When an interrupt occurs on both 0CH and 1CH, it jumps to the same vector address. Which channel it is can be determined by looking at the RUN of DBRR0.

【0046】7.シングルステップ このマイクロプロセッサ1には、1命令づつ例外処理を
発生させるシングルステップ機能がついている。MCR
(Cop0 G1)のDBSSE(Debug Break Single
Step Enable Bit)をセットして、DBREAK命令を
実行すると、シングルステップ例外処理ルーチンに入
る。この時点で、全ての割り込みは禁止される。
7. Single Step This microprocessor 1 has a single step function for generating exception processing for each instruction. MCR
(Cop0 G1) DBSSE (Debug Break Single
Set the Step Enable Bit) and execute the DBREAK instruction to enter the single step exception handling routine. At this point all interrupts are disabled.

【0047】シングルステップの例外処理ルーチンでの
プログラム手順は、以下の通りである。 1)割り込みスタックポインタ(ISP(R31))に
シングルステップを実行させたいメイプログラムの先頭
番地をセットする。 2)MCR〔10〕のSSEフラグをセットする。 3)RETI命令を実行すると、次の3スロットを実行
した後、シングルステップを実行させたいメインプログ
ラムのアドレスに分岐する。 4)メインプログラムの1命令を実行すると、自動的に
再びシングルステップ冷眼処理ルーチンに戻ってくる。
そのとき、MCR〔10〕のSSEフラグはクリアされ
る。 5)再度、シングルステップ例外処理ルーチンで、MC
R〔10〕のSSEフラグをセットして、RETIを実
行すると、メイプログラムの次のシングルステップを実
行させたい命令アドレスへ分岐する。
The program procedure in the single-step exception handling routine is as follows. 1) Set the start address of the May program for which a single step is to be executed in the interrupt stack pointer (ISP (R31)). 2) Set the SSE flag of MCR [10]. 3) When the RETI instruction is executed, after executing the next 3 slots, the process branches to the address of the main program in which the single step is to be executed. 4) When one instruction of the main program is executed, the process automatically returns to the single-step cold-eye processing routine.
At that time, the SSE flag of MCR [10] is cleared. 5) Once again, in the single-step exception handling routine, MC
When the SSE flag of R [10] is set and RETI is executed, the instruction branches to the instruction address at which the next single step of the May program is to be executed.

【0048】シングルステップ例外処理ルーチンを行け
るまで、以上のような処理が繰り返される。シングルス
テップ処理ルーチンを抜けるためには、シングルステッ
プ例外処理ルーチンの中で、SSEフラグをディスイネ
ーブルにし、実行させたいプログラムカウンタに書き換
えて、RETI命令をを実行する。
The above processing is repeated until the single step exception processing routine can be executed. In order to exit the single step processing routine, the SSE flag is disabled in the single step exception processing routine, the program counter to be executed is rewritten, and the RETI instruction is executed.

【0049】8.命令セット このマイクロプロセッサ1では、コード効率重視のオリ
ジナルな直交型の命令セットが用意されている。コード
体系は、命令セットは16ビットの固定長とされてお
り、OPコードは6ビットである。レジスタ間命令で
は、オペランドに5ビットが割り当てられる。汎用レジ
スタの数は32であるから、5ビットのオペランドで効
率良くコードが定義できる。なお、OPコードは、図2
0〜図23に示すようにマッピングされている。
8. Instruction Set The microprocessor 1 is provided with an original orthogonal type instruction set that emphasizes code efficiency. In the code system, the instruction set has a fixed length of 16 bits, and the OP code has 6 bits. In the register-to-register instruction, 5 bits are assigned to the operand. Since the number of general-purpose registers is 32, a code can be efficiently defined with a 5-bit operand. The OP code is shown in Figure 2.
0 to 23 are mapped as shown in FIG.

【0050】命令としては、即値命令、レジスタ転送命
令、算術命令、比較命令、論理命令、シフト命令、交換
/拡張命令、NOP命令、ビット処理命令、乗除算命
令、メモリ転送命令、コプロセッサ転送命令、分岐命令
からなる。
As the instruction, an immediate instruction, a register transfer instruction, an arithmetic instruction, a comparison instruction, a logical instruction, a shift instruction, an exchange / expansion instruction, a NOP instruction, a bit processing instruction, a multiplication / division instruction, a memory transfer instruction, a coprocessor transfer instruction. , A branch instruction.

【0051】1)即値命令 LPI:即値の値をバイトポジションの位置に従って、
アキュムレータにロードする。また、指定されていない
アキュムレータのバイトの内容は保存される。 LI:即値の値をバイトワードセレクトに従って、アキ
ュムレータにロードする。 LSI,LSIU:即値を指定した汎用レジスタにロー
ドする。
1) Immediate value instruction LPI: Immediate value according to the position of byte position
Load into accumulator. Also, the contents of the unspecified accumulator bytes are preserved. LI: Load the immediate value into the accumulator according to the byte word select. LSI, LSIU: Load an immediate value to a specified general-purpose register.

【0052】2)レジスタ転送命令 MOV:汎用レジスタ間の転送命令である。2) Register transfer instruction MOV: Transfer instruction between general-purpose registers.

【0053】3)算術命令 ADDSI,ADDSIU:即値加算命令である。 ADD,ADDC:レジスタ間加算命令である。 ADDU:レジスタ間無符号加算命令である。 SUB,SUBB:レジスタ間減算命令である。 SUBU:レジスタ間無符号減算命令である。3) Arithmetic instruction ADDSI, ADDSIU: Immediate value addition instruction. ADD, ADDC: Register-to-register addition instructions. ADDU: An unsigned addition instruction between registers. SUB, SUBB: Inter-register subtraction instruction. SUBU: An unsigned subtraction instruction between registers.

【0054】4)比較命令 COMPI,COMPIU:即値比較命令である。 COMP:レジスタ間比較命令である。SUB命令と同
じ動作を行なうが、結果をDEST1に戻さない。 COMPU:レジスタ間の無符号比較命令である。SU
BU命令と同じ動作を行なうが、結果をDEST1に戻
さない。
4) Comparison instruction COMPI, COMPIU: Immediate value comparison instruction. COMP: Inter-register comparison instruction. Performs the same operation as the SUB instruction, but does not return the result to DEST1. COMPU: An unsigned comparison instruction between registers. SU
Performs the same operation as the BU instruction, but does not return the result to DEST1.

【0055】5)論理命令 AND,OR,XOR,NOR:論理演算命令である。5) Logical instruction AND, OR, XOR, NOR: Logical operation instruction.

【0056】6)シフト命令 SLLV,SRLV,SRAV:間接シフト命令であ
る。SLLVはレジスタ間接論理左シフト命令、SRL
Vはレジスタ間接論理右シフト命令、SRAVはレジス
タ間接算術右シフト命令である。 SLL,SRL,SRA:即値シフト命令である。SL
Lは即値論理左シフト命令、SRAは即値論理右シフト
命令、SRAは即値算術右シフト命令である。 RR:キャリーを含めた右シフトを即値の回数だけ実行
する命令である。シフトアウトしたビット(実行前のL
SB)は、キャリーへ格納され、また、MSBにはキャ
リーの値が格納される。 RL:キャリーを含めた左シフトを即値の回数だけ実行
する命令である。シフトアウトしたビット(実行前のM
SB)は、キャリーへ格納され、また、MSBにはキャ
リーの値が格納される。
6) Shift instruction SLLV, SRLV, SRAV: Indirect shift instruction. SLLV is register indirect logic left shift instruction, SRL
V is a register indirect logical right shift instruction, and SRAV is a register indirect arithmetic right shift instruction. SLL, SRL, SRA: Immediate value shift instructions. SL
L is an immediate logical left shift instruction, SRA is an immediate logical right shift instruction, and SRA is an immediate arithmetic right shift instruction. RR: An instruction for executing right shift including carry by the number of immediate values. Bits shifted out (L before execution)
SB) is stored in the carry, and the carry value is stored in the MSB. RL: This is an instruction to execute left shift including carry for the number of immediate values. Bits shifted out (M before execution)
SB) is stored in the carry, and the carry value is stored in the MSB.

【0057】7)交換/拡張命令 XCB:SRC〔15:8〕とSRC1〔7:0〕との
交換命令である。 EXU:下位のバイトのゼロ拡張命令である。 EXS:下位のバイトのサイン拡張命令である。 XCHW:SRC〔OPS:16〕とSRC1〔15:
0〕との交換命令である。 EXHZ:下位のハーフワードのゼロ拡張命令である。 EXHS:下位のハーフワードのサイン拡張命令であ
る。
7) Exchange / Expansion Instruction This is an exchange instruction between XCB: SRC [15: 8] and SRC1 [7: 0]. EXU: Zero extension instruction of lower byte. EXS: Sign extension instruction of lower byte. XCHW: SRC [OPS: 16] and SRC1 [15:
0]. EXHZ: Zero extension instruction of lower half word. EXHS: Sign extension instruction of lower halfword.

【0058】8)NOP命令 NOP:何も実行しない。8) NOP instruction NOP: Nothing is executed.

【0059】9)ビット処理命令、 BS,BT,BTR,BTS,BTC:ビット処理命令
である。
9) Bit processing instruction BS, BT, BTR, BTS, BTC: Bit processing instruction.

【0060】10)乗除算命令 MULTUD;SRC1〔15:0〕とSRC2〔1
5:0〕との無符号乗算命令である。 DIVU:SRC1とSRC2との無符号除算命令であ
る。 MULT:SRC1〔15:0〕とSRC2〔15:
0〕との乗算命令である。 DIV:SRC1とSRC2との除算命令である。 MTHI:汎用レジスタからHIレジスタへの転送命令
である。 MTLO:汎用レジスタからLOレジスタへの転送命令
である。 MFHI:HIレジスタから汎用レジスタへの転送命令
である。 MFHO:LOレジスタから汎用レジスタへの転送命令
である。
10) Multiplication / division instruction MULTUD; SRC1 [15: 0] and SRC2 [1
5: 0] and an unsigned multiplication instruction. DIVU: An unsigned division instruction of SRC1 and SRC2. MULT: SRC1 [15: 0] and SRC2 [15:]
0] with the multiplication instruction. DIV: A division instruction of SRC1 and SRC2. MTHI: Transfer instruction from general-purpose register to HI register. MTLO: Transfer instruction from general-purpose register to LO register. MFHI: Transfer instruction from HI register to general-purpose register. MFHO: Transfer instruction from LO register to general-purpose register.

【0061】11)メモリ転送命令 SW,SHW,SB:インデックスが示すアドレスのメ
モリ空間へのストア命令である。 LW,LHW,LB:インデックスが示すアドレスのメ
モリ空間からのロード命令である。 LHWU,LBU:インデックスが示すアドレスのメモ
リ空間からのロード命令である。
11) Memory transfer instruction SW, SHW, SB: Instructions to store the address indicated by the index in the memory space. LW, LHW, LB: Load instructions from the memory space at the address indicated by the index. LHWU, LBU: Load instructions from the memory space at the address indicated by the index.

【0062】12)コプロセッサ転送命令 CTC0:アキュムレータからコプレッサコントロール
レジスタ0への転送命令である。 CTC1:アキュムレータからコプレッサコントロール
レジスタ1への転送命令である。 CFC0:コプレッサコントロールレジスタ0からアキ
ュムレータへの転送命令である。 CFC1:コプレッサコントロールレジスタ1からアキ
ュムレータへの転送命令である。 MTC0:汎用レジスタからコプレッサ汎用レジスタ0
への転送命令である。 MTC1:汎用レジスタからコプレッサ汎用レジスタ1
への転送命令である。 MFC0:コプレッサ汎用レジスタ0から汎用レジスタ
への転送命令である。 MFC1:コプレッサ汎用レジスタ1から汎用レジスタ
への転送命令である。 SWC0,SWC1:コプロセッサ汎用レジスタからイ
ンデックスが示すアドレスのメモリ空間へのストア命令
である。 LWC0,LWC1:インデックスが示すアドレスのメ
モリ空間からコプロセッサ汎用レジスタへのロード命令
である。
12) Coprocessor transfer instruction CTC0: Transfer instruction from the accumulator to the copressor control register 0. CTC1: Transfer instruction from the accumulator to the copressor control register 1. CFC0: A transfer instruction from the copressor control register 0 to the accumulator. CFC1: Transfer instruction from the copressor control register 1 to the accumulator. MTC0: General-purpose register to copressor general-purpose register 0
Is a transfer instruction to. MTC1: General register to copressor general register 1
Is a transfer instruction to. MFC0: Transfer instruction from the copressor general-purpose register 0 to the general-purpose register. MFC1: A transfer instruction from the copressor general-purpose register 1 to the general-purpose register. SWC0, SWC1: Store instruction from the coprocessor general-purpose register to the memory space of the address indicated by the index. LWC0, LWC1: Load instructions from the memory space of the address indicated by the index to the coprocessor general-purpose register.

【0063】13)分岐命令 <1>プログラムカウンタ相対 RJ,RJAL:プログラムカウンタ相対分岐命令であ
る。RJALはプリディクリメントしたスタックポイン
タの示すアドレスにプログラムカウンタを格納した後、
分岐する。リターン命令によってRJALの次の命令に
戻る。 RBEQ/RBZ,RBNE/RBNZ:条件付PC相
対分岐命令である。 RBLE,RBGE:条件付プログラムカウンタ相対分
岐命令である。 RBLT,RBGT:条件付プログラムカウンタ相対分
岐命令である。 RBLTAL,RBGEAL:条件付プログラムカウン
タ相対分岐命令である。 RBBE,RBAE:条件付プログラムカウンタ相対分
岐命令である。 RBBL,RBAB:条件付プログラムカウンタ相対分
岐命令である。 RBBLAT,RBAEL:条件付プログラムカウンタ
相対分岐命令である。
13) Branch instruction <1> Program counter relative RJ, RJAL: Program counter relative branch instruction. RJAL stores the program counter at the address indicated by the pre-decremented stack pointer, and then
Branch. The return instruction returns to the instruction next to RJAL. RBEQ / RBZ, RBNE / RBNZ: Conditional PC relative branch instructions. RBLE, RBGE: Conditional program counter relative branch instructions. RBLT, RBGT: Conditional program counter relative branch instructions. RBLTAL, RBGEAL: Conditional program counter relative branch instructions. RBBE, RBAE: Conditional program counter relative branch instructions. RBBL, RBAB: Conditional program counter relative branch instructions. RBBLAT, RBAEL: Conditional program counter relative branch instructions.

【0064】<2>レジスタ間接 JR,JLR:レジスタ間接分岐命令である。 JER/JZR,JNER/JNZR:条件付レジスタ
間接分岐命令である。 JLER,JGER:条件付レジスタ間接分岐命令であ
る。 JLTR,JGTR:条件付レジスタ間接分岐命令であ
る。 JLTALR,JGEALR:条件付レジスタ間接分岐
命令である。 JER/JZR,JNER/JNZR:条件付レジスタ
間接分岐命令である。 JBER,JAER/JNCR:条件付レジスタ間接分
岐命令である。 JBR/JCR,JAR:条件付レジスタ間接分岐命令
である。 JBALR,JAEALR:条件付レジスタ間接分岐命
令である。
<2> Register indirect JR, JLR: Register indirect branch instructions. JER / JZR, JNER / JNZR: Conditional register indirect branch instructions. JLER, JGER: Conditional register indirect branch instructions. JLTR, JGTR: Conditional register indirect branch instructions. JLTRAL, JGEALR: Conditional register indirect branch instructions. JER / JZR, JNER / JNZR: Conditional register indirect branch instructions. JBER, JAER / JNCR: Conditional register indirect branch instructions. JBR / JCR, JAR: Conditional register indirect branch instruction. JBALR, JAEALR: Conditional register indirect branch instructions.

【0065】<3>プログラムカウンタセグメント J,JAL:プログラムカウンタ分岐命令である。 BEQ/BZ,BNE/BNZ:条件付プログラムカン
ウタセグメント分岐命令である。 BLE,BGE:条件付プログラムカウンタセグメント
分岐命令である。 BLT,BGT:条件付セグメント分岐命令である。 BLTAL,BGEAL:条件付プログラムカウンタセ
グメント分岐命令である。 BEQ/BZ,BNE/BNZ:条件付プログラムカウ
ンタセグメント分岐命令である。 BBE,BAE:条件付プログラムカウンタセグメント
分岐命令である。 BBL:BAB:条件付プログラムカウンタセグメント
分岐命令である。 BBLAL,BAEAL:条件付プログラムカウンタセ
グメント分岐命令である。
<3> Program counter segment J, JAL: Program counter branch instruction. BEQ / BZ, BNE / BNZ: Conditional program counter segment branch instructions. BLE, BGE: Conditional program counter segment branch instructions. BLT, BGT: Conditional segment branch instructions. BLTAL, BGEAL: Conditional program counter segment branch instructions. BEQ / BZ, BNE / BNZ: Conditional program counter segment branch instructions. BBE, BAE: Conditional program counter segment branch instructions. BBL: BAB: Conditional program counter segment branch instruction. BBLAL, BAEAL: Conditional program counter segment branch instructions.

【0066】<4>システムコール及びリターン系命令 RETD:ジャンプアンドリンク時に使用する。スタッ
クポインタの示すアドレスメモリの値をプログラムカウ
ンタに格納した後、スタックポインタをポストインクリ
メントし、RET命令によって分岐命令の次の命令に戻
る。 SYSCALL,BREAK,DBREAK:ソフトウ
ェア割り込み(例外処理)を行なうための命令である。
プリディクリメントしたISP(InstructionStack Poi
nter )の示すアドレスにプログラムカウンタを格納し
た後、ICRの4重割り込み許可フラグを左シフトし
て、RETI命令によって次の命令に戻る。 RETI:SYSCALL/BREAK/DBREAK
命令の例外処理から戻るときに使用する。ISPの示す
アドレスのメモリの値をプログラムカウンタに格納した
後、ISPをポストクリメントし、ICRの4重割り込
み許可フラグを右にシフトする。RETI命令によって
SYSCALL/BREAK/DBREAK命令の次の
命令に戻る。 JIBIO:{JBR〔31:11〕,セグメントアド
レス〔9:0〕,0}への分岐命令である。
<4> System call and return system instruction RETD: Used during jump and link. After the value of the address memory indicated by the stack pointer is stored in the program counter, the stack pointer is post-incremented and the instruction following the branch instruction is returned by the RET instruction. SYSCALL, BREAK, DBREAK: Instructions for software interrupt (exception processing).
Predecremented ISP (InstructionStack Poi
After storing the program counter at the address indicated by (nter), the quadruple interrupt enable flag of the ICR is left-shifted, and the next instruction is returned by the RETI instruction. RETI: SYSCALL / BREAK / DBREAK
Used when returning from instruction exception processing. After the memory value at the address indicated by the ISP is stored in the program counter, the ISP is post-cremented and the quadruple interrupt enable flag of the ICR is shifted to the right. The RETI instruction returns to the instruction next to the SYSCALL / BREAK / DBREAK instruction. JIBIO: Branch instruction to {JBR [31:11], segment address [9: 0], 0}.

【0067】9.デバッグ機能 この発明が適用されたプロセッサでは、前述したよう
に、シングルステップ機能と、2つのブレーク命令とが
用意され、アドレスブレークが3チャンネル、ブレーク
が2チャンネル搭載され、更に、ICE端子が搭載され
ている。これにより、デバッグが容易とされている。
9. Debug Function As described above, the processor to which the present invention is applied has a single step function and two break instructions, three address break channels, two break channels, and an ICE terminal. ing. This facilitates debugging.

【0068】図24に示すように、評価ボード51上に
は、マイクロプロセッサ1を搭載した回路素子(例え
ば、GPS回路)52と、インストラクションメモリ5
3と、データメモリ54と、コントロール用PLD55
及びSRAM56が配置されている。評価ボード51に
対して、ロジックアナライザ57と、パーソナルコンピ
ュータ58が取り付けられる。
As shown in FIG. 24, a circuit element (for example, GPS circuit) 52 having the microprocessor 1 mounted thereon and an instruction memory 5 are provided on the evaluation board 51.
3, data memory 54, and control PLD 55
And SRAM 56 are arranged. A logic analyzer 57 and a personal computer 58 are attached to the evaluation board 51.

【0069】実行プログラムは、パーソナルコンピュー
タ58上で開発される。この実行プログラムは、ブート
プログラムにより、シリアルインターフェース59を介
して、パーソナルコンピュータ58からダウンロードさ
れる。
The execution program is developed on the personal computer 58. The execution program is downloaded from the personal computer 58 by the boot program via the serial interface 59.

【0070】前述したように、マイクロプロセッサ1に
は、シングルステップ機能が用意されていると共に、ベ
クタアドレスの異なるブレーク命令(2つのBREAK
命令、DBBREAK命令)、3チャンネルのアドレス
ブレーク、2チャンネルのデータブレークが備えられて
いる。シングルステップは、1命令づつ例外を発生させ
る処理で、従来、RISCでは、コントローラとしての
使用が考慮されていなかったので、CISCのようなシ
ングルステップの機能は実現されていなかった。ベクタ
アドレスの異なるブレーク命令(2つのBREAK命
令、DBBREAK命令)が用意されているので、RA
Mエリアに対して、ブレーク命令を書き込んで、無限個
のブレークポインタを実現可能である。5段のパイプラ
インを実行している命令アドレスブレークポインタを3
チャンネル搭載することで、ブレーク命令を使用できな
いROMエリアに対して、ブレークが可能となる。5段
パイプラインで実行しているデータブレークポインタを
2チャンネル搭載することにより、内蔵RAMのブレー
クが容易に実現可能である。更に、マイクロプロセッサ
1は、ICEブレーク端子が容易されている。ICEブ
レーク端子の搭載により、外部からインサーキットエミ
ュレータへの制御遷移が容易である。
As described above, the microprocessor 1 is provided with the single step function, and the break instructions (two BREAK
Command, DBBREAK command), 3 channel address break, and 2 channel data break. The single step is a process of generating an exception for each instruction. Conventionally, the RISC has not considered the use as a controller, so that the single step function like CISC has not been realized. Since break instructions (two BREAK instructions and a DBBREAK instruction) with different vector addresses are prepared, RA
An infinite number of break pointers can be realized by writing a break instruction in the M area. The instruction address break pointer that executes the 5-stage pipeline is set to 3
By installing channels, breaks can be made to ROM areas where break instructions cannot be used. A break in the built-in RAM can be easily realized by mounting two channels of data break pointers executing in a 5-stage pipeline. Further, the microprocessor 1 has an easy ICE break terminal. By installing the ICE break terminal, control transition from the outside to the in-circuit emulator is easy.

【0071】[0071]

【発明の効果】この発明によれば、32ビットのRIS
Cプロセッサで、命令セットが16ビットの固定長とさ
れている。このため、コード効率が向上される。そし
て、16ビットの固定長の命令セットのうちの6ビット
がオペコードとされ、残りの10ビットがオペラントと
して使用できる。このため、例えば、MOV命令では、
図25に示すようになり、汎用レジスタの記述に5ビッ
ト割り当てることができ、32本の汎用レジスタに対す
る命令を記述できる。
According to the present invention, a 32-bit RIS is provided.
In the C processor, the instruction set has a fixed length of 16 bits. Therefore, the code efficiency is improved. Then, 6 bits of the 16-bit fixed length instruction set are used as an opcode, and the remaining 10 bits can be used as an operant. Therefore, for example, in the MOV instruction,
As shown in FIG. 25, 5 bits can be assigned to the description of the general-purpose register, and an instruction for 32 general-purpose registers can be described.

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

【図1】この発明が適用されマイクロプロセッサの内部
構成を示すブロック図である。
FIG. 1 is a block diagram showing an internal configuration of a microprocessor to which the present invention is applied.

【図2】この発明が適用されマイクロプロセッサの外部
インターフェースの説明に用いるブロック図である。
FIG. 2 is a block diagram used to explain an external interface of a microprocessor to which the present invention is applied.

【図3】この発明が適用されマイクロプロセッサにおけ
る汎用レジスタの説明に用いるブロック図である。
FIG. 3 is a block diagram used for explaining a general-purpose register in a microprocessor to which the present invention is applied.

【図4】この発明が適用されマイクロプロセッサにおけ
るコプロセッサレジスタの説明に用いるブロック図であ
る。
FIG. 4 is a block diagram used to describe a coprocessor register in a microprocessor to which the present invention is applied.

【図5】この発明が適用されマイクロプロセッサにおけ
るコプロセッサレジスタの説明に用いる略線図である。
FIG. 5 is a schematic diagram used to explain a coprocessor register in a microprocessor to which the present invention is applied.

【図6】この発明が適用されマイクロプロセッサにおけ
るコプロセッサレジスタの説明に用いる略線図である。
FIG. 6 is a schematic diagram used to explain a coprocessor register in a microprocessor to which the present invention is applied.

【図7】この発明が適用されマイクロプロセッサにおけ
るコプロセッサレジスタの説明に用いる略線図である。
FIG. 7 is a schematic diagram used to explain a coprocessor register in a microprocessor to which the present invention is applied.

【図8】この発明が適用されマイクロプロセッサにおけ
るコプロセッサレジスタの説明に用いる略線図である。
FIG. 8 is a schematic diagram used to explain a coprocessor register in a microprocessor to which the present invention is applied.

【図9】この発明が適用されマイクロプロセッサにおけ
るコプロセッサレジスタの説明に用いる略線図である。
FIG. 9 is a schematic diagram used to explain a coprocessor register in a microprocessor to which the present invention is applied.

【図10】この発明が適用されマイクロプロセッサにお
けるコプロセッサレジスタの説明に用いる略線図であ
る。
FIG. 10 is a schematic diagram used to explain a coprocessor register in a microprocessor to which the present invention is applied.

【図11】この発明が適用されマイクロプロセッサにお
けるコプロセッサレジスタの説明に用いる略線図であ
る。
FIG. 11 is a schematic diagram used to explain a coprocessor register in a microprocessor to which the present invention is applied.

【図12】この発明が適用されマイクロプロセッサにお
けるコプロセッサレジスタの説明に用いる略線図であ
る。
FIG. 12 is a schematic diagram used to explain a coprocessor register in a microprocessor to which the present invention is applied.

【図13】この発明が適用されマイクロプロセッサにお
けるコプロセッサレジスタの説明に用いる略線図であ
る。
FIG. 13 is a schematic diagram used to explain a coprocessor register in a microprocessor to which the present invention is applied.

【図14】この発明が適用されマイクロプロセッサにお
けるコプロセッサレジスタの説明に用いる略線図であ
る。
FIG. 14 is a schematic diagram used to describe a coprocessor register in a microprocessor to which the present invention is applied.

【図15】この発明が適用されマイクロプロセッサにお
けるコプロセッサレジスタの説明に用いる略線図であ
る。
FIG. 15 is a schematic diagram used to explain a coprocessor register in a microprocessor to which the present invention is applied.

【図16】この発明が適用されマイクロプロセッサにお
けるコプロセッサレジスタの説明に用いる略線図であ
る。
FIG. 16 is a schematic diagram used to explain a coprocessor register in a microprocessor to which the present invention is applied.

【図17】この発明が適用されマイクロプロセッサにお
けるメモリ空間の説明に用いる略線図である。
FIG. 17 is a schematic diagram used to explain a memory space in a microprocessor to which the present invention is applied.

【図18】この発明が適用されマイクロプロセッサにお
ける割り込み説明に用いる略線図である。
FIG. 18 is a schematic diagram used to explain an interrupt in a microprocessor to which the present invention is applied.

【図19】この発明が適用されマイクロプロセッサにお
ける割り込み説明に用いる略線図である。
FIG. 19 is a schematic diagram used to explain an interrupt in a microprocessor to which the present invention is applied.

【図20】この発明が適用されマイクロプロセッサにお
ける命令セットの説明に用いる略線図である。
FIG. 20 is a schematic diagram used to explain an instruction set in a microprocessor to which the present invention is applied.

【図21】この発明が適用されマイクロプロセッサにお
ける命令セットの説明に用いる略線図である。
FIG. 21 is a schematic diagram used for explaining an instruction set in a microprocessor to which the present invention is applied.

【図22】この発明が適用されマイクロプロセッサにお
ける命令セットの説明に用いる略線図である。
FIG. 22 is a schematic diagram used for explaining an instruction set in a microprocessor to which the present invention is applied.

【図23】この発明が適用されマイクロプロセッサにお
ける命令セットの説明に用いる略線図である。
FIG. 23 is a schematic diagram used to explain an instruction set in a microprocessor to which the present invention is applied.

【図24】この発明が適用されマイクロプロセッサにお
けるデバッグの説明に用いる斜視図である。
FIG. 24 is a perspective view to which the present invention is applied and which is used for description of debugging in a microprocessor.

【図25】この発明の効果を説明するための略線図であ
る。
FIG. 25 is a schematic diagram for explaining the effect of the present invention.

【符号の説明】[Explanation of symbols]

1・・・マイクロプロセッサ,6・・・命令デコーダ,
8・・・割り込みコントローラ,9・・・汎用レジスタ
群,11・・・ALU,12・・・乗除算演算部
1 ... Microprocessor, 6 ... Instruction decoder,
8 ... Interrupt controller, 9 ... General-purpose register group, 11 ... ALU, 12 ... Multiplication / division operation unit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 命令デコーダと、算術演算論理ユニット
と、レジスタ群と、高速乗除算ユニットと、割り込みコ
ントローラとを有し、 上記命令デコーダは、パイプライン制御により命令セッ
トをデコードする縮小命令セットコンピュータの構成と
され、 上記命令セットは、16ビットの固定長とされているこ
とを特徴とするマイクロプロセッサ。
1. A reduced instruction set computer having an instruction decoder, an arithmetic operation logic unit, a register group, a high speed multiplication / division unit, and an interrupt controller, wherein the instruction decoder decodes an instruction set by pipeline control. And the instruction set has a fixed length of 16 bits.
【請求項2】 上記命令セットは、直交型とされている
請求項1記載のマイクロプロセッサ。
2. The microprocessor according to claim 1, wherein the instruction set is of an orthogonal type.
JP17179396A 1996-06-11 1996-06-11 Microprocessor Pending JPH09330218A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17179396A JPH09330218A (en) 1996-06-11 1996-06-11 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17179396A JPH09330218A (en) 1996-06-11 1996-06-11 Microprocessor

Publications (1)

Publication Number Publication Date
JPH09330218A true JPH09330218A (en) 1997-12-22

Family

ID=15929809

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17179396A Pending JPH09330218A (en) 1996-06-11 1996-06-11 Microprocessor

Country Status (1)

Country Link
JP (1) JPH09330218A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014016773A (en) * 2012-07-09 2014-01-30 Elamina Co Ltd Cashless multiprocessor by registerless architecture
CN111913746A (en) * 2020-08-31 2020-11-10 中国人民解放军国防科技大学 Design method of low-overhead embedded processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014016773A (en) * 2012-07-09 2014-01-30 Elamina Co Ltd Cashless multiprocessor by registerless architecture
CN111913746A (en) * 2020-08-31 2020-11-10 中国人民解放军国防科技大学 Design method of low-overhead embedded processor

Similar Documents

Publication Publication Date Title
CN109661647B (en) Data processing apparatus and method
US5001662A (en) Method and apparatus for multi-gauge computation
Oberman et al. AMD 3DNow! technology: Architecture and implementations
JP3983857B2 (en) Single instruction multiple data processing using multiple banks of vector registers
US6067614A (en) Integrated RISC processor and GPS receiver
US6560697B2 (en) Data processor having repeat instruction processing using executed instruction number counter
US10628155B2 (en) Complex multiply instruction
WO2005099383A2 (en) Processor having compound instruction and operation formats
US7546442B1 (en) Fixed length memory to memory arithmetic and architecture for direct memory access using fixed length instructions
US6799266B1 (en) Methods and apparatus for reducing the size of code with an exposed pipeline by encoding NOP operations as instruction operands
JP2004086837A (en) Data processor
JP4073721B2 (en) Data processing device
US5034880A (en) Apparatus and method for executing a conditional branch instruction
JP2004005603A (en) Method and device for performing repeated block instruction by zero cycle overhead along nested loop
US6223275B1 (en) Microprocessor with reduced instruction set limiting the address space to upper 2 Mbytes and executing a long type register branch instruction in three intermediate instructions
EP1190305B1 (en) Method and apparatus for jump delay slot control in a pipelined processor
EP1360582A2 (en) Apparatus and method for effecting changes in program control flow
JPH09330218A (en) Microprocessor
WO2000070446A2 (en) Method and apparatus for loose register encoding within a pipelined processor
KR19980018071A (en) Single instruction multiple data processing in multimedia signal processor
JPH1115660A (en) Micro processor
JPH09330235A (en) Microprocessor
JPH09330246A (en) Microprocessor
US20060168431A1 (en) Method and apparatus for jump delay slot control in a pipelined processor
US6275925B1 (en) Program execution method and program execution device