JPH0254335A - Data processor - Google Patents

Data processor

Info

Publication number
JPH0254335A
JPH0254335A JP20556488A JP20556488A JPH0254335A JP H0254335 A JPH0254335 A JP H0254335A JP 20556488 A JP20556488 A JP 20556488A JP 20556488 A JP20556488 A JP 20556488A JP H0254335 A JPH0254335 A JP H0254335A
Authority
JP
Japan
Prior art keywords
instruction
address
stage
code
operand
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP20556488A
Other languages
Japanese (ja)
Other versions
JPH0769803B2 (en
Inventor
Naoyoshi Nakano
中野 直佳
Toyohiko Yoshida
豊彦 吉田
Masahito Matsuo
雅仁 松尾
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP63205564A priority Critical patent/JPH0769803B2/en
Publication of JPH0254335A publication Critical patent/JPH0254335A/en
Publication of JPH0769803B2 publication Critical patent/JPH0769803B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To attain the pipeline processing with high efficiency by inputting the next instruction address and processing this address based on a unit process code. CONSTITUTION:When a subroutine jump instruction is processed, an instruction decoding means 2 decomposes a 2nd pipeline process stage into a unit process code showing the process of the head address of a subroutine and another unit process code showing the process of the return destination address sent from the subroutine and transfers these two codes through a pipeline at a 1st pipeline process stage. A PC calculation part 3 calculates the next instruction address to be used as the return destination address sent from the subroutine. Then the next instruction address obtained from the part 3 is inputted and processed as a part of the 2nd unit process code which is transferred to the 2nd pipeline process stage from the 1st one based on the 2nd unit process code at the 2nd pipeline process stage.

Description

【発明の詳細な説明】 (産業上の利用分野) この発明は、可変長命令セットを処理するデータ処理装
置に係り、特にパイプライン処理機構により並列的にデ
ータ処理を行う装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a data processing device that processes a variable-length instruction set, and particularly to a device that performs data processing in parallel using a pipeline processing mechanism.

〔従来の技術〕[Conventional technology]

第25図は従来のデータ処理装置におけるバイブライン
処理を説明する機能ブロック図であり、51は命令フェ
ッチステージ(IFステージ)で、メモリより命令コー
ドを取り込み命令デコードステージ(Dステージ)52
に出力する。53はオペランドアドレス計算ステージ(
Aステージ)で、オペランドの実行アドレスを計算する
FIG. 25 is a functional block diagram illustrating vibe line processing in a conventional data processing device, in which 51 is an instruction fetch stage (IF stage), which fetches an instruction code from memory and an instruction decode stage (D stage) 52.
Output to. 53 is an operand address calculation stage (
A stage) calculates the execution address of the operand.

54はオペランドフェッチステージ(Fステージ)で、
計算されたオペランドアドレスに従うオペランドをメモ
リカラ取り込む。55は命令実行ステージ(Eステージ
)で、オペランドに対して所定の演算を実行する。
54 is an operand fetch stage (F stage),
Retrieve the operand according to the calculated operand address from memory. Reference numeral 55 denotes an instruction execution stage (E stage), which executes predetermined operations on operands.

次に動作について説明する。Next, the operation will be explained.

1Fステージ51はメモリから命令コードを取り込みD
ステージ52へ出力する。Dステージ52は、IFステ
ージ51から人力される命令コードを解析して、解析結
果をAステージ53へ出力する。Aステージ53は命令
コード中で指定されたオペランドの実行アドレス計算を
行い、計算したオペランドアドレスをFステージ54へ
出力する。Fステージ54はAステージ53から入力さ
れたオペランドアドレスに従いメモリよりオペランドを
取り込む。取り込んだオペランドはEステージ55へ出
力する。Eステージ55はFステージ54から入力され
たオペランドに対して命令コード中で指定された演算を
実行する。さらに、必要ならその演算結果をメモリへ書
き込む。
1F stage 51 takes in the instruction code from memory D
Output to stage 52. The D stage 52 analyzes the instruction code manually input from the IF stage 51 and outputs the analysis result to the A stage 53. The A stage 53 calculates the execution address of the operand specified in the instruction code, and outputs the calculated operand address to the F stage 54. The F stage 54 fetches an operand from the memory according to the operand address input from the A stage 53. The fetched operand is output to the E stage 55. The E stage 55 executes the operation specified in the instruction code on the operand input from the F stage 54. Furthermore, if necessary, the calculation result is written to memory.

前記のようにパイプライン化されたデータ処理装置では
、各命令で指定される処理は、例えば5つに分解され、
5つの処理を順番に実行することにより、指定された処
理を完了する。
In a pipelined data processing device as described above, the processing specified by each instruction is broken down into, for example, five parts.
The specified process is completed by executing the five processes in order.

各々5つの処理は異なる命令に対しては並列動作させる
ことが可能であり、理想的には上記の5段のパイプライ
ン処理機構により5つの命令を同時に並列処理し、パイ
プライン処理を行わない場合に比べて、最大で5倍の処
理能力を発揮させることができるように構成されている
Each of the five processes can operate in parallel on different instructions, and ideally, five instructions can be processed in parallel using the five-stage pipeline processing mechanism described above, and no pipeline processing is performed. It is designed to deliver up to five times the processing power compared to the previous version.

そして、上記のようなパイプライン処理を行うデータ処
理装置において、例えばサブルーチンヘジャンブする命
令を実行する場合、サブルーチンからリターンする命令
で参照することを目的としてサブルーチンヘジャンブす
る命令の次の命令の番地であるアブルーチンからの戻り
先番地をスタックに積む操作が必要となる。
In a data processing device that performs pipeline processing as described above, for example, when executing an instruction that jumps to a subroutine, the address of the next instruction after the instruction that jumps to the subroutine is used for reference in the instruction that returns from the subroutine. It is necessary to put the return address from the abroutine on the stack.

この場合、一般にサブルーチンヘジャンプする命令をパ
イプライン処理する場合、Eステージ55で戻り先番地
をスタックに積む操作が可能なように、プログラムカウ
ンタ(pc)計算部において、サブルーチンヘジャンブ
する命令の先頭番地とこの命令の命令長を加算してサブ
ルーチンからの戻り先命令の番地を算出し、Eステージ
55で操作可能なレジスタに格納しておくか、またはサ
ブルーチンヘジャンブする命令の番地とこの命令の命令
長をEステージ55で操作可能なレジスタに格納してお
き、Eステージ55において両者を加算し戻り先番地を
得る処理を行う。
In this case, when an instruction that jumps to a subroutine is generally pipelined, the program counter (PC) calculation unit sets the beginning of the instruction that jumps to a subroutine so that the return address can be stacked on the stack in the E stage 55. Either calculate the address of the return destination instruction from the subroutine by adding the address and the instruction length of this instruction, and store it in a register that can be manipulated in the E stage 55, or add the address of the instruction to jump to the subroutine and the instruction length of this instruction. The instruction length is stored in a register that can be operated at the E stage 55, and the E stage 55 adds the two to obtain the return destination address.

また、制御レジスタに値をロードする命令を実行する場
合、制御レジスタに新たな値が書き込まれた時点でそれ
以後に実行される命令を処理する条件が変化する。従っ
て、この制御レジスタに値をロードする命令をEステー
ジ55で実行した際、後続のパイプライン内に取り込ま
れている命令は、この制御レジスタに値をロードする命
令が実行される以前の制御値によって行われたものであ
り、正しい処理であるかどうかが保証されない。
Furthermore, when executing an instruction to load a value into a control register, the conditions for processing instructions to be executed thereafter change at the time a new value is written to the control register. Therefore, when an instruction to load a value into this control register is executed in the E stage 55, the instruction taken into the subsequent pipeline will have the control value before the instruction to load a value into this control register is executed. There is no guarantee that the process is correct.

従って、Eステージ55で制御レジスタに値をロードし
た後、パイプライン内で処理されている後続の命令をキ
ャンセルする処理を行う。
Therefore, after loading a value into the control register in the E stage 55, processing is performed to cancel the subsequent instructions being processed in the pipeline.

(発明が解決しようとする課題) このように従来のパイプライン処理を行うデータ処理装
置においては、以上のようにサブルーチンヘジャンブす
る命令を処理する際、下記(1)。
(Problems to be Solved by the Invention) In a data processing device that performs conventional pipeline processing, when processing an instruction that jumps to a subroutine as described above, the following (1) is performed.

(2)の何れかを設けなければならない特有の問題点が
あった。
There was a particular problem that required one of (2) to be provided.

(1)  サブルーチンからの戻り先番地の計算をプロ
グラムカウンタ計算部(PC計算部)に行わゼた場合、
命令実行ステージ55でこの戻り先番地が処理されるま
でこの戻り先番地を保持するラッチを設ける。
(1) If the return address from the subroutine is calculated by the program counter calculation unit (PC calculation unit),
A latch is provided to hold this return address until it is processed in the instruction execution stage 55.

(2)  サブルーチンヘジャンブする命令の先頭番地
とこの命令の命令長をこの命令が実行される時点まで保
持し、命令実行ステージ55で戻り先番地を計算する場
合、この命令が命令実行ステージ55へ到達するまでこ
の戻り先番地と命令長を保持し、命令実行ステージ55
で操作可能なラッチを設ける。
(2) If the starting address of the instruction to jump to the subroutine and the instruction length of this instruction are held until this instruction is executed, and the return destination address is calculated in the instruction execution stage 55, this instruction is transferred to the instruction execution stage 55. The return destination address and instruction length are held until the return address is reached, and the instruction execution stage 55
Provide a latch that can be operated with.

この発明は、上記の問題点を解決するためになされたも
ので、特定の命令を処理する際、その命令を複数のパイ
プライン処理単位にデコードして順次後段の処理ステー
ジに転送することにより、命令フェッチに並行して特定
命令に処理に必要なアドレスをパイプライン内に効率的
に転送できるデータ処理装置を得ることを目的とする。
This invention was made to solve the above problems, and when processing a specific instruction, the instruction is decoded into multiple pipeline processing units and sequentially transferred to the subsequent processing stage. It is an object of the present invention to provide a data processing device that can efficiently transfer an address necessary for processing a specific instruction into a pipeline in parallel with instruction fetch.

(課題を解決するための手段〕 この発明に係るデータ処理装置は、1つの命令を第2の
パイプラインステージに対する1つまたは複数の単位処
理コードに分解してデコードする分解デコード手段と、
この分解デコード手段によりデコードされた各単位処理
コードに基づいて前記命令に対する複数のアドレス演算
を実行するアドレス演算手段と、このアドレス演算手段
により演算された命令アドレスを前記単位処理コードと
して後段の第2のパイプラインステージに転送する転送
手段とを設けたものである。
(Means for Solving the Problems) A data processing device according to the present invention includes a decomposition decoding means for decomposing and decoding one instruction into one or more unit processing codes for a second pipeline stage;
address calculation means for executing a plurality of address operations for the instruction based on each unit processing code decoded by the decomposition decoding means; A transfer means for transferring the data to the pipeline stage is provided.

〔作用〕[Effect]

この発明においては、命令フェッチが実行されて、1つ
の命令が第1のパイプラインステージに出力されると、
分解デコード手段が1つの命令を第2のパイプラインス
テージに対する1つまたは複数の単位処理コードに分解
してデコードし、アドレス演算手段が1つまたは複数の
単位処理コードに分解された各単位処理コードに基づい
て命令に対する複数のアドレス演算を実行する。そして
、転送手段が演算された命令アドレスを単位処理コード
として後段の第2のパイプラインステージに順次転送す
る。
In this invention, when an instruction fetch is executed and one instruction is output to the first pipeline stage,
The decomposition decoding means decomposes and decodes one instruction into one or more unit processing codes for the second pipeline stage, and the address calculation means decomposes each unit processing code into one or more unit processing codes. Perform multiple address operations on the instruction based on the . Then, the transfer means sequentially transfers the calculated instruction address to the subsequent second pipeline stage as a unit processing code.

〔実施例〕〔Example〕

第1図はこの発明の一実施例を示すデータ処理装置の構
成を説明するブロック図であり、1は命令フェッチ部で
、ブランチバッファ、命令キュ、制御部等から構成され
、次にフェッチすべき命令のアドレスを決定してブラン
チバッファやCPU外部のメモリから命令をフェッチす
る。また、ブランチバッファへの命令登録も行う。
FIG. 1 is a block diagram illustrating the configuration of a data processing device showing an embodiment of the present invention. Reference numeral 1 denotes an instruction fetch unit, which is composed of a branch buffer, an instruction queue, a control unit, etc. The address of the instruction is determined and the instruction is fetched from the branch buffer or memory outside the CPU. It also registers instructions in the branch buffer.

ブランチバッファは小規模であるため、セレクティブキ
ャッシュとして動作する。フランチバッファの動作の詳
細は特願昭61−202041号に詳しく述べられてい
る。
Since the branch buffer is small, it acts as a selective cache. The details of the operation of the franchise buffer are described in detail in Japanese Patent Application No. 61-202041.

次に、フェッチすべき命令のアドレスは命令キューに入
力すべき命令のアドレスとして専用のカウンタで計算さ
れる。分岐やジャンプが起ぎたときには、新な命令のア
ドレスが後述するPC計算部3やデータ演算部6より転
送されてくる。
Next, the address of the instruction to be fetched is calculated by a dedicated counter as the address of the instruction to be input into the instruction queue. When a branch or jump occurs, the address of a new instruction is transferred from the PC calculation unit 3 and data calculation unit 6, which will be described later.

また、CPU外部のメモリから命令をフェッチするとき
は、外部バスインタフェース部7を通して、フェッチす
べき命令のアドレスをアドレス出力回路8からCPU外
部に出力し、データ入出力回路9から命令コードをフェ
ッチする。バッファリングした命令コードのうち、命令
デコード部2で次にデコードすべき命令コードを命令デ
コード部2に出力する。
When fetching an instruction from a memory external to the CPU, the address of the instruction to be fetched is output from the address output circuit 8 to the outside of the CPU through the external bus interface section 7, and the instruction code is fetched from the data input/output circuit 9. . Among the buffered instruction codes, the instruction decoding section 2 outputs the instruction code to be decoded next to the instruction decoding section 2.

命令デコード部2では、基本的に16ビツト(ハーフワ
ード)単位に命令コードをデコードする。このブロック
には第1ハーフワードに含まれるオペコードをデコード
するFHWデコーダ、第2、第3ハーフワードに含まれ
るオペコードをデコードするNFHWデコーダ、アドレ
ッシングモードをデコードするアドレッシングモードデ
コーダが含まれる。
The instruction decoding section 2 basically decodes instruction codes in 16-bit (halfword) units. This block includes an FHW decoder that decodes the opcode included in the first halfword, an NFHW decoder that decodes the opcode included in the second and third halfwords, and an addressing mode decoder that decodes the addressing mode.

さらに、FHWデコーダ、NFHWデコーダの出力をさ
らにデコードして、マイクロROMのエントリアドレス
を計算するデコーダ、条件分岐命令の分岐予測を行う分
岐予測機構、オペランドアドレス計算のときのパイプラ
インコンフリクトをチエツクするアドレス計算コンフリ
クトチエツク機構も具備されている。
Additionally, there is a decoder that further decodes the output of the FHW decoder and NFHW decoder to calculate the micro ROM entry address, a branch prediction mechanism that predicts branches of conditional branch instructions, and an address that checks pipeline conflicts when calculating operand addresses. A calculation conflict check mechanism is also provided.

なお、命令デコード部2は、命令フェッチ部1より入力
された命令コードを2クロツクにつき0〜6バイトデコ
ードする。デコード結果のうち、データ演算部6での演
算に関する情報がマイクロROM部5に、オペランドア
ドレス計算に関係する情報がアベランドアドレス計算部
4に、プログラムカウンタ計算に関係する情報がPC計
算部3にそれぞれ出力される。
Note that the instruction decoding section 2 decodes the instruction code inputted from the instruction fetch section 1 by 0 to 6 bytes every two clocks. Among the decoding results, information related to the calculation in the data calculation section 6 is sent to the micro ROM section 5, information related to operand address calculation is sent to the Averand address calculation section 4, and information related to program counter calculation is sent to the PC calculation section 3. Each is output.

pc計算部3は、命令デコード部2から出力されるPC
計算に関係する情報でハードワイヤードに制御され、目
側のPC値を計算する。なお、この実施例におけるデー
タ処理装置においては、後述する可変長命令セットをも
っており、命令をデコードしてみないとその命令の長さ
が分からない。そこで、PC計算部3は、命令デコード
部2から出力される命令長をデコード中の命令のPC値
に加算することにより、次の命令のPC値を作り出す。
The PC calculation section 3 is a PC output from the instruction decoding section 2.
It is hardwired and controlled by information related to calculation, and calculates the PC value on the eye side. The data processing device in this embodiment has a variable length instruction set, which will be described later, and the length of the instruction cannot be known until the instruction is decoded. Therefore, the PC calculation unit 3 creates the PC value of the next instruction by adding the instruction length output from the instruction decoding unit 2 to the PC value of the instruction being decoded.

また、命令デコード部2が、分岐命令をデコードしてデ
コード段階での分岐を指示したときは、命令長の代わり
に分岐変位を分岐命令のPC値に加算することにより、
分岐先命令のPC値を計算する。分岐命令に対して命令
デコード段階で分岐を行うことをブリブランチという。
Furthermore, when the instruction decoding unit 2 decodes a branch instruction and instructs a branch at the decoding stage, by adding the branch displacement to the PC value of the branch instruction instead of the instruction length,
Calculate the PC value of the branch destination instruction. Branching to a branch instruction at the instruction decoding stage is called a branch.

なお、このプリブランチ時 1204500号、特願昭61−200557号等に詳
しく記載されているので説明は省略する。
It should be noted that detailed description is given in Prebranch Ji No. 1204500, Japanese Patent Application No. 61-200557, etc., so the explanation will be omitted.

PC計算部3の計算結果は、各命令のpc値として命令
のデコード結果とともに出力されるほか、プリブランチ
時には、次にデコードすべき命令のアドレスとして命令
フェッチ部1に出力される。
The calculation result of the PC calculation unit 3 is output as the pc value of each instruction together with the decoding result of the instruction, and at the time of pre-branch, it is output to the instruction fetch unit 1 as the address of the next instruction to be decoded.

また、次に命令デコード部2でデコードされる命令の分
岐予測のためのアドレスにも使用される。なお、上記分
岐予測処理については特願昭62−8394号等の詳細
に説明されている。
It is also used as an address for branch prediction of the next instruction to be decoded by the instruction decoding unit 2. The above branch prediction processing is explained in detail in Japanese Patent Application No. 8394/1983.

オペランドアドレス計算部4は、命令コード部2のアド
レスデコーダなどから出力されたオペランドアドレス計
算に関係する情報によりハードワイヤード制御される。
The operand address calculation unit 4 is hard-wired controlled by information related to operand address calculation output from the address decoder of the instruction code unit 2 and the like.

このブロックではオペランドのアドレス計算に関する殆
どの処理が行われる。アドレス計算結果は、外部バスイ
ンタフェース7に送られる。アドレス計算に必要な汎用
レジスタやプログラムの値はデータ演算部6より入力さ
れる。なお、メモリ間接アドレッシングを行うときは、
外部バスインタフェース部7を通してアドレス出力回路
8からCPU外部に参照すべきメモリアドレスを出力し
、データ入出力部回路9から入力された間接アドレス値
を命令デコード部2を通してフェッチする・ マイクロROM部5には、主にデータ演算部6を制御す
るマイクロプログラムが格納されているマイクロROM
、マイクロシーケンサ、マイクロ命令デコーダ等が設け
られており、マイクロ命令はマイクロROMから2クロ
ツクに1度読み出される。また、マイクロROM部5は
ストアバッファの管理も行う。マイクロROM部5には
命令コードに依存しない割込みや演算実行結果によるフ
ラッグ情報と、デコーダの出力など命令デコード部2の
出力が入力される。マイクロデコーダの出力は主にデー
タ演算部6に対して出力されるが、ジャンプ命令の実行
による他の先行処理中止情報環一部の情報は他のブロッ
クへも出力される。
This block performs most of the processing related to operand address calculation. The address calculation result is sent to the external bus interface 7. Values of general-purpose registers and programs necessary for address calculation are input from the data calculation unit 6. Note that when performing memory indirect addressing,
Outputs the memory address to be referenced from the address output circuit 8 to the outside of the CPU through the external bus interface section 7, and fetches the indirect address value input from the data input/output section circuit 9 through the instruction decoding section 2/to the micro ROM section 5. is a micro ROM in which a micro program that mainly controls the data calculation section 6 is stored.
, a micro sequencer, a micro instruction decoder, etc. are provided, and micro instructions are read out from the micro ROM once every two clocks. The micro ROM unit 5 also manages store buffers. The micro ROM unit 5 receives interrupts that do not depend on instruction codes, flag information based on the results of arithmetic operations, and outputs of the instruction decoding unit 2 such as decoder outputs. The output of the micro-decoder is mainly output to the data calculation unit 6, but part of the information on other preceding processing stop information rings due to the execution of the jump instruction is also output to other blocks.

データ演算部6はマイクロプログラムにより制御され、
マイクロROM部5の出力情報に従い、各命令の機能を
実現するのに必要な演算をレジスタと演算器で実行する
。オペランドアドレス計算部4で計算されたアドレスを
外部バスインタフェース部7を通して得る場合や、その
アドレスでフェッチを行ったオペランドをデータ入出力
回路9から得る場合もある。
The data calculation section 6 is controlled by a microprogram,
According to the output information of the micro ROM unit 5, the registers and the arithmetic unit execute the operations necessary to realize the function of each instruction. The address calculated by the operand address calculation unit 4 may be obtained through the external bus interface unit 7, or the operand fetched at that address may be obtained from the data input/output circuit 9.

演算器としては、ALU、バレルシフタ、プライオリテ
ィエンコーダやカウンタ、シフトレジスタ等がある。レ
ジスタと主な演算器の間は3バスで結合されており、1
つのレジスタ間演算を指示する1マイクロ命令を2クロ
ツクサイクルで処理する。
Examples of arithmetic units include an ALU, a barrel shifter, a priority encoder, a counter, and a shift register. The registers and the main arithmetic unit are connected by 3 buses, 1
One microinstruction that instructs an operation between two registers is processed in two clock cycles.

データ演算のとき、CPU外部のメモリをアクセスする
必要がある時は、マイクロプログラムの指示により外部
バスインタフェース部7を通してアドレス出力回路8か
らアドレスをCPU外部に出力し、データ入出力回路1
9を通して目的のデータをフェッチする0 CPU外部のメモリにデータをストアするときは、外部
バスインタフェース部7を通してアドレス出力回路8よ
りアドレスを出力すると同時に、データ入出力回路9か
らデータをCPU外部に出力する。オペランドストアを
効率的に行うためデータ演算部6には4バイトのストア
バッファがある。なお、ジャンプ命令の処理や例外処理
等を行って新たな命令アドレスをデータ演算部6が得た
ときは、これを命令フェッチ部1とPC計算部3に出力
する。
During data calculation, when it is necessary to access memory external to the CPU, the address is output from the address output circuit 8 to the outside of the CPU through the external bus interface section 7 according to instructions from the microprogram, and the address is output to the outside of the CPU by the data input/output circuit 1.
When storing data in a memory outside the CPU, the address is output from the address output circuit 8 through the external bus interface section 7, and at the same time, the data is output from the data input/output circuit 9 to the outside of the CPU. do. In order to efficiently store operands, the data calculation unit 6 includes a 4-byte store buffer. Note that when the data calculation unit 6 obtains a new instruction address by processing a jump instruction, exception handling, etc., it outputs this to the instruction fetch unit 1 and the PC calculation unit 3.

外部バスインタフェース部7は、外部バスでの通信を制
御し、特にメモリアクセスはすべてクロック同期で行わ
れ、最小2クロックサイクルで行うことができる。
The external bus interface unit 7 controls communication on the external bus, and in particular, all memory accesses are performed in clock synchronization and can be performed in a minimum of two clock cycles.

メモリに対するアクセス要求は命令フェッチ部1、オペ
ランドアドレス計算部4.データ演算部6から独立に発
生し、外部バスインタフェース部7は、これらのメモリ
アクセス要求を調停する。
Access requests to the memory are made by the instruction fetch section 1, operand address calculation section 4. These memory access requests are generated independently from the data calculation unit 6, and the external bus interface unit 7 arbitrates these memory access requests.

さらに、メモリとCPUを結ぶデータバスサイズである
32ビツト(ワード)の整置境界をまたぐメモリ番地に
あるデータのアクセスは、このブロック内で自動的にワ
ード境界をまたぐことを検知して、2回のメモリアクセ
スに分解して行う。
Furthermore, when accessing data at a memory address that straddles a 32-bit (word) aligned boundary, which is the data bus size that connects memory and the CPU, the block automatically detects that it straddles a word boundary, and This is done by breaking it down into multiple memory accesses.

ブリフェッチするオペランドとストアするオペランドが
重なる場合の、コンフリクト防止処理やストアオペラン
ドからフェッチオペランドへのバイパス処理も行う。
It also performs conflict prevention processing and bypass processing from the store operand to the fetch operand when the operand to be fetched and the operand to be stored overlap.

なお、命令フェッチ部1に命令がフェッチされて、1つ
の命令が後述する第2図(a)に示すDステージ12(
第1のパイプラインステージ)に出力されると、分解デ
コード手段となる命令デコード部2が1つの命令を第2
のパイプラインステージとなるAステージ13に対する
1つまたは複数の単位処理コードに分解してデコードし
、アドレス演算手段となるPC計算部3が1つまたは複
数の単位処理コードに分解された各単位処理コードに基
づいて命令に対する複数のアドレス演算を実行する。そ
して、転送手段を兼ねるオペランドアドレス計算部4が
演算された、例えばサブルーチンジャンプ命令の飛び先
アドレス、戻り先アドレスまたは複数のロード命令によ
る次命令の先頭アドレス等のアドレス情報を単位処理コ
ードとして後段の第2のパイプラインステージに順次内
部バスを介して転送する(詳細は後述する)。
Note that when an instruction is fetched by the instruction fetch unit 1, one instruction is transferred to the D stage 12 (described later) as shown in FIG. 2(a).
When the instruction is output to the first pipeline stage (first pipeline stage), the instruction decoding unit 2 serving as decomposition decoding means outputs one instruction to the second pipeline stage.
Each unit process decomposed into one or more unit processing codes for the A stage 13, which is a pipeline stage of Perform multiple address operations on instructions based on code. Then, the operand address calculation unit 4, which also serves as a transfer means, uses the calculated address information, such as the jump destination address of a subroutine jump instruction, the return destination address, or the start address of the next instruction by multiple load instructions, as a unit processing code for subsequent steps. The data is sequentially transferred to the second pipeline stage via the internal bus (details will be described later).

第2図(a)は、第1図に示したデータ処理装置のパイ
プライン処理を説明する構成ブロック図であり、11は
命令フェッチステージ(IFステージ)で、命令のブリ
フェッチを行い、命令コード21を後段のステージに出
力する。12はデコードステージ(Dステージ)で、命
令コード21をデコードし、オペランドアドレス計算を
実行し、オペコードの中間デコード結果となるDコード
22.アドレス計算情報となるAコード23を後段のス
テージに出力する。13はオペランドアドレス計算ステ
ージ(Aステージ)で、レジスタやメモリの書込み予約
およびマイクロプログラムのエントリ番地とマイクロプ
ログラムに対するパラメニタ等からなるRコード24お
よびアドレス計算結果となるFコード25を出力する。
FIG. 2(a) is a configuration block diagram illustrating the pipeline processing of the data processing device shown in FIG. output to the subsequent stage. 12 is a decode stage (D stage) which decodes the instruction code 21, executes operand address calculation, and generates a D code 22.1 which is an intermediate decode result of the operation code. A code 23 serving as address calculation information is output to the subsequent stage. Reference numeral 13 denotes an operand address calculation stage (A stage) which outputs an R code 24 consisting of register and memory write reservations, microprogram entry addresses, parameters for the microprogram, etc., and an F code 25 which is the result of address calculation.

14はオペランドフェッチステージ(Fステージ)で、
マイクロROMアクセスを行うRステージ16゜オペラ
ンドのブリフェッチを行うOFステージ17から構成さ
れ、Rステージ16は、実行制御コードとなるEコード
26を生成し、OFステージ17はフェッチしたオペラ
ンドとなるSコード27をそれぞれ実行ステージ(Eス
テージ)15へ出力するといった、例えば5段構成のパ
イプライン処理を実行する。なお、Eステージ15では
、1段のストアバッファがあるほか、高機能命令の一部
は命令実行自体をパイプライン化するため、実際には5
段以上のパイプライン処理と同等の処理を行える。
14 is the operand fetch stage (F stage),
It consists of an R stage 16° that performs micro ROM access, and an OF stage 17 that performs a pre-fetch of the operand. For example, a five-stage pipeline process is executed, in which each stage is output to the execution stage (E stage) 15. In addition, in E stage 15, there is a one-stage store buffer, and some of the high-performance instructions pipeline the instruction execution itself, so there are actually five stages.
Processing equivalent to pipeline processing with stages or higher can be performed.

また、各ステージは、他のステージとは独立に動作し、
理論上は5つのステージが完全に独立動作する。各ステ
ージは1回の処理を最小2クロックで実行可能となって
いる。さらに、この実施例におけるデータ処理装置にお
いては、メモリーメモリ間演算や、メモリ間接アドレッ
シング等、基本パイプライン処理1回だけでは処理が行
えない命令があるが、これらの処理に対してもなるべく
均衡したパイプライン処理が行えるように設計されてい
る。複数のメモリオペランドをもつ命令に対してはメモ
リオペランドの数をもとに、デコード段階で複数のパイ
プライン処理単位(ステップコード)に分解してパイプ
ライン処理を行うのである。特にパイプライン処理単位
の分解方法については、特願昭61−236456号に
詳しく記載されており、ここでの説明は省略する。
Also, each stage operates independently of the other stages,
In theory, the five stages operate completely independently. Each stage can execute one process in a minimum of two clocks. Furthermore, in the data processing device in this embodiment, there are instructions such as inter-memory operations and memory indirect addressing that cannot be processed by just one basic pipeline process, but these processes are also balanced as much as possible. Designed for pipeline processing. For instructions with multiple memory operands, the instructions are decomposed into multiple pipeline processing units (step codes) based on the number of memory operands, and pipeline processing is performed. In particular, the method of decomposing the pipeline processing units is described in detail in Japanese Patent Application No. 1983-236456, and will not be described here.

次に第2図(b)を参照しながらこの発明におけるパイ
プライン処理単位について説明する。
Next, the pipeline processing unit in this invention will be explained with reference to FIG. 2(b).

第2図(b)は基本的命令フォーマットを説明する模式
図であり、この実施例における各命令は、例えば2バイ
トの命令基本部、O〜4バイトのアドレッシング拡張部
を1〜3回繰り返すことにより構成される。
FIG. 2(b) is a schematic diagram explaining the basic instruction format, and each instruction in this embodiment includes, for example, a 2-byte instruction basic part and an O to 4-byte addressing extension part, which are repeated 1 to 3 times. Consisted of.

パイプライン処理単位は、命令セットのフォーマットの
特徴を利用して決定され、この実施例における命令は、
2バイト車位の可変長命令であり、第2図(b)に示す
ように基本的には2バイトの命令基本部+0〜4バイト
のアドレッシング拡張部を1〜3回繰り返すことにより
、1命令が構成されていて、命令基本部には多くの場合
オペコード部とアドレッシングモード指定部があり、命
令により2または4バイトの命令固有の拡張部が最後に
付く。
The pipeline processing unit is determined using the format characteristics of the instruction set, and the instructions in this example are:
It is a 2-byte variable length instruction, and as shown in Figure 2(b), one instruction is basically completed by repeating the 2-byte basic instruction part + 0 to 4-byte addressing extension part 1 to 3 times. The instruction base often has an opcode section, an addressing mode specification section, and ends with a 2 or 4-byte instruction-specific extension section, depending on the instruction.

命令基本部には命令のオペコード、基本アドレッシング
モード、リテラル等が含まれ、アドレッシング拡張部は
、ディスプレイスメント、絶対アドレス、即値1分岐命
令の変位の何れかである。
The instruction basic part includes an instruction opcode, basic addressing mode, literal, etc., and the addressing extension part is any one of a displacement, an absolute address, and a displacement of an immediate 1 branch instruction.

また、命令固有の拡張部には、レジスタマツプ。Additionally, instruction-specific extensions include register maps.

I−f o rryxa を命令の即値指定等がある。I-f rryxa  is specified as an immediate value of an instruction.

次に第2図(a)における各ステージの動作について説
明する。
Next, the operation of each stage in FIG. 2(a) will be explained.

Dステージ12では、2バイトの命令基本部子〇〜4バ
イトのアドレッシング拡張部または命令固有の拡張部を
1つのデコード単位として処理する。そして、各回のデ
コード結果をステップコードと呼び、Aステージ13以
降ではこのステップコードをパイプライン処理の単位と
している。なお、ステップコードの数は命令毎に固有で
あり、1つの命令は最小1個、最大3個のステップコー
ドに分かれる。そして、パイプライン上に存在するステ
ップコードはすべて別命令に対するものである可能性が
あり、プログラムカウンタの値はステップコード毎に管
理する。すべてのステップコードはそのステップコード
のもとになった命令のプログラムカウンタ値を持つ。ス
テップコードに付属してパイプラインの各ステージを流
れるプログラムカウンタ値はステッププログラムカウン
タ(spc)と呼ばれ、このステッププログラムカウン
タは、パイプラインステージを次々と受は渡されて行く
In the D stage 12, a 2-byte instruction basic part 0 to a 4-byte addressing extension part or instruction-specific extension part are processed as one decoding unit. The decoding result of each time is called a step code, and from the A stage 13 onwards, this step code is used as a unit of pipeline processing. Note that the number of step codes is unique for each instruction, and one instruction is divided into a minimum of 1 step code and a maximum of 3 step codes. There is a possibility that all the step codes existing on the pipeline are for different instructions, and the value of the program counter is managed for each step code. Every step code has the program counter value of the instruction on which it is based. The program counter value that is attached to the step code and flows through each stage of the pipeline is called a step program counter (spc), and the step program counter is passed from one pipeline stage to another.

各パイプラインステージの入出カステップコードには第
2図(a)に示したようなコード名が付記されるが、ス
テップコードは、オペコードに関する処理を行って、マ
イクロROMのエントリ番地やEステージ15に対する
パラメータ等になる系列と、Eステージ15のマイクロ
命令に対するオペランドになる系列の2系列に分かれる
The input/output step code of each pipeline stage is given a code name as shown in FIG. It is divided into two series: a series that becomes parameters, etc. for the E stage 15, and a series that becomes operands for the microinstruction of the E stage 15.

IFステージ11は、命令を外部メモリやブランチバッ
ファからフェッチし、命令キューに入力して、Dステー
ジ12に対して命令コード21を出力する。命令キュー
の入力は整置された4バイト単位で行う。メモリから命
令をフェッチするときは整置された4バイトにつき最小
2クロックを要する。ブランチバッファがヒツトした時
は、整置された4バイトにつき1クロツクでフェッチ可
能となる。命令キューの出力単位は2バイト毎に可変で
あり、2クロツクの間に最大6バイトまで出力できる。
The IF stage 11 fetches an instruction from an external memory or a branch buffer, inputs it into an instruction queue, and outputs an instruction code 21 to the D stage 12. Input to the instruction queue is performed in aligned 4-byte units. Fetching an instruction from memory requires a minimum of two clocks per four aligned bytes. When the branch buffer is hit, each aligned 4 byte can be fetched in one clock. The output unit of the instruction queue is variable every 2 bytes, and up to 6 bytes can be output during 2 clocks.

また、分岐の直後には命令キューをバイパスして命令基
本部に2バイトを直接命令デコーダに転送することもで
きる。
Further, immediately after a branch, the instruction queue can be bypassed and the two bytes of the instruction basic part can be directly transferred to the instruction decoder.

ブランチバッファへの命令の登録やクリア等の制御、ブ
リフェッチ先命令アドレスの管理や命令キューの制御も
IFステージ11で行う9次にフェッチすべき命令のア
ドレスは、命令キューに入力すべき命令のアドレスとし
て専用のカウンタで計算される。分岐やジャンプが発生
した時には、新たな命令のアドレスが、第1図に示した
PC計算部3.データ演算部6から内部バスを介して転
送されてくる。
The IF stage 11 also controls the registration and clearing of instructions in the branch buffer, manages the pre-fetch destination instruction address, and controls the instruction queue.9 The address of the next instruction to be fetched is the address of the instruction to be input into the instruction queue. is calculated using a dedicated counter. When a branch or jump occurs, the address of the new instruction is calculated by the PC calculation unit 3. shown in FIG. The data is transferred from the data calculation unit 6 via the internal bus.

命令コード21がDステージ12に入力されると、Dス
テージ12は命令シード21を、第1図に示した命令デ
コード部2のFHデコーダ、NFHWデコーダ、アドレ
ッシングモードデコーダ等を使用し、2クロック単位に
1度デコードする。
When the instruction code 21 is input to the D stage 12, the D stage 12 uses the FH decoder, NFHW decoder, addressing mode decoder, etc. of the instruction decoding section 2 shown in FIG. decode once.

1回のデコード処理で、0〜6バイトの命令コードを消
費し、1回のデコードでAステージ13に対してアドレ
ス計算情報となるAコード23(約35ビツトの制御コ
ードと最大32ビツトアドレス修飾情報)と、オペコー
ドの中間デコード結果となるDコード22を約50ビツ
トの制御コードと8ビツトのリテラル情報とをAステー
ジ13に出力する。
One decoding process consumes 0 to 6 bytes of instruction code, and one decoding process consumes the A code 23 (approximately 35 bits of control code and up to 32 bits of address modification) which becomes address calculation information for the A stage 13. information), a D code 22 which is an intermediate decoding result of the operation code, a control code of approximately 50 bits, and literal information of 8 bits are output to the A stage 13.

なお、Dステージ12では、各命令のPC計算部3の制
御1分岐予測処理、ブリブランチ命令に対するブリブラ
ンチ処理、命令キューからの命令コード出力制御も行う
In addition, in the D stage 12, control 1 branch prediction processing of the PC calculation unit 3 for each instruction, bribranch processing for a bribranch instruction, and instruction code output control from the instruction queue are also performed.

Aステージ13に対してAコード23(約35ビツトの
制御コード、最大32ビツトアドレス修飾情報)と、オ
ペコードの中間デコード結果となるDコード22が入力
されると、Aステージ13は大別して2つの処理を行う
When the A code 23 (approximately 35-bit control code, maximum 32-bit address modification information) and the D code 22, which is the intermediate decoding result of the operation code, are input to the A stage 13, the A stage 13 can be roughly divided into two types. Perform processing.

一方は、命令デコード部2のデコーダを使用してオペコ
ードの後段デコードを行う処理で、他方はオペランドア
ドレス計算部4でオペランドアドレスの計算を行う処理
である。
One is a process in which the decoder of the instruction decoding unit 2 is used to perform subsequent decoding of the operation code, and the other is a process in which the operand address calculation unit 4 calculates an operand address.

オペコードの後段デコード処理は、Dコード22を入力
とし、レジスタやメモリの書込み予約およびマイクロプ
ログラムのエントリ番地とマイクロプログラムに対する
パラメータ等を含むRコード24の出力を行う。なお、
レジスタやメモリの書込み予約は、アドレス計算で参照
したレジスタやメモリの内容が、パイプライン上を先行
する命令で書き換えられ、誤りたアドレス計算が行われ
るのを防ぐためのものである。レジスタやメモリの書込
み予約は、デッドロックを避けるため、ステップコード
毎に行うのではなく命令毎に行う。
The subsequent decoding process of the operation code takes the D code 22 as input, and outputs the R code 24 which includes register and memory write reservations, the entry address of the microprogram, parameters for the microprogram, and the like. In addition,
Write reservation for registers and memories is to prevent the contents of registers and memories referenced in address calculations from being rewritten by instructions that precede them on the pipeline, resulting in incorrect address calculations. To avoid deadlock, write reservations for registers and memory are made for each instruction, not for each step code.

なお、レジスタやメモリの書込み予約については、特願
昭62−144394号等に詳しく記載されている。
Note that writing reservations for registers and memories are described in detail in Japanese Patent Application No. 144394/1983.

一方、オペランドアドレス計算処理については、Aコー
ド23を入力とし、Aコード23に従いオペランドアド
レス計算部4で加算やメモリ間接参照を組み合わせてア
ドレス計算を行い、その計算結果をFコード25として
出力する。この際、アドレス計算に伴うレジスタやメモ
リの読出し時にコンフリクトチエツクを行い、先行命令
がレジスタやメモリに書き込み処理を終了していないた
めコンフリクトが指示されれば、先行命令がEステージ
15で書き込み処理を終了するまで待つ。また、オペラ
ンドアドレスやメモリ間接参照のアドレスがメモリにマ
ツプされたI10領域に入るかどうかのチエツクも行う
On the other hand, regarding operand address calculation processing, the A code 23 is input, and the operand address calculation unit 4 performs address calculation by combining addition and memory indirect reference according to the A code 23, and outputs the calculation result as an F code 25. At this time, a conflict check is performed when reading the register or memory associated with address calculation, and if a conflict is indicated because the preceding instruction has not finished writing to the register or memory, the preceding instruction executes the write processing at E stage 15. Wait until it finishes. It also checks whether the operand address or memory indirect reference address falls within the I10 area mapped to memory.

また、Aステージ13では、スタックからのポツプ操作
、スタックへのブツシュ操作等によるスタックポインタ
(sp)のコンフリクトを防ぐためEステージ15のス
タックポインタ(sp)に先行するAステージスタック
ポインタ(ASP)を備えており、ポツプ、ブツシュ操
作に伴うAステージスタックポインタ(ASP)の更新
はこのステージで行われる。従って、通常のホップ、ブ
ツシュ操作に伴うAステージスタックポインタ(ASP
)の更新は、このステージで行われる。
In addition, in the A stage 13, the A stage stack pointer (ASP) that precedes the stack pointer (sp) in the E stage 15 is set to prevent stack pointer (sp) conflicts due to pop operations from the stack, push operations to the stack, etc. The A stage stack pointer (ASP) is updated at this stage in conjunction with pop and push operations. Therefore, the A stage stack pointer (ASP
) is updated at this stage.

従って、通常のホップ、ブツシュ操作直後でもAステー
ジスタックポインタ(ASP)を参照することにより、
スタックポインタ(sp)のコンフリクトでステップコ
ードの処理を遅らせることなく処理を進めることができ
る。なお、スタックポインタ(sp)の管理方法につい
ては、特願昭62−145852号に詳細に記載されて
いる。
Therefore, by referring to the A stage stack pointer (ASP) even immediately after a normal hop or push operation,
Processing can proceed without delaying step code processing due to stack pointer (sp) conflicts. The method of managing the stack pointer (sp) is described in detail in Japanese Patent Application No. 145852/1982.

Aステージ13の後段ステージとなるFステージ14も
、上記のようにコード処理が大きく2つに分かれ、マイ
クロROMのアクセス処理を行うRステージ16と、オ
ペランドプリフェッチ処理を行うOFステージ17とか
ら構成されている。
The F stage 14, which is the subsequent stage of the A stage 13, also has code processing divided into two parts as described above, and is composed of an R stage 16 that performs micro ROM access processing and an OF stage 17 that performs operand prefetch processing. ing.

なお、Rステージ16とOFステージ17とが必ずしも
同時に動作するわけではなく、メモリ・アクセス権が獲
得できるかどうかなどに依存して、独立に動作する。
Note that the R stage 16 and the OF stage 17 do not necessarily operate simultaneously, but operate independently depending on whether memory access rights can be acquired or not.

Rステージ16の処理となるマイクロROMアクセス処
理は、Rコード24に対して次のEステージ15での実
行に使用する実行制御コードであるEコード26を作り
出すためのマイクロROMアクセスとマイクロ命令デコ
ード処理である。
Micro ROM access processing, which is the processing of R stage 16, includes micro ROM access and micro instruction decoding processing for creating E code 26, which is an execution control code used for execution in the next E stage 15, for R code 24. It is.

1つのRコードに対する処理が2つ以上のマイクロプロ
グラムに分解される場合、マイクロROMはEステージ
15で使用され、次のRコード24はマイクロROMア
クセス待ちになる。Rコード24に対するマイクロRO
Mアクセスが行われるのは、その前のEステージ15で
の最後のマイクロ命令実行の時である。なお、この実施
例におけるデータ処理装置においては、殆どの基本命令
は1マイクロプログラムステツプで行われるため、実際
にはRコード24に対するマイクロROM7クセスが次
々と行われることが多い。
When processing for one R code is broken down into two or more microprograms, the micro ROM is used in the E stage 15, and the next R code 24 waits for access to the micro ROM. Micro RO for R code 24
The M access is performed at the time of execution of the last microinstruction in the previous E stage 15. In the data processing device of this embodiment, since most basic instructions are executed in one microprogram step, in reality, accesses to the micro ROM 7 to the R code 24 are often executed one after another.

一方、OFステージ17では、Fステージ14で行う2
つの処理のうち、オペランドプリフェッチ処理を行う。
On the other hand, in the OF stage 17, the 2
Among these processes, perform operand prefetch processing.

オペランドブリフェッチはFコード25を入力とし、フ
ェッチしたオペランドとそのアドレスをSコード27と
して出力する。1つのFコード25では、ワード境界を
またいでもよいが4バイト以下のオペランドフェッチを
指定する。Fコード25にはオペランドのアクセスを行
うかどうかの指定も含まれており、Aステージ13で計
算したオペランドアドレス自体や即値をEステージ15
に転送する場合にはオペランドフェッチを行わず、Fコ
ード25の内容をSコード27として転送する。また、
プリフェッチしようとするオペランドとEステージ15
が書き込み処理を行おうとするオペランドが包含関係を
満たすときには、オペランドプリフェッチに関してメモ
リアクセスは行わず、Eステージ15が書き込もうとす
る値をバイパスする。
The operand briefetch takes the F code 25 as input and outputs the fetched operand and its address as the S code 27. One F code 25 specifies operand fetch of 4 bytes or less, although it may cross word boundaries. The F code 25 also includes a designation as to whether or not to access the operand, and the operand address itself and the immediate value calculated in the A stage 13 are sent to the E stage 15.
When transferring to , the contents of the F code 25 are transferred as the S code 27 without performing operand fetch. Also,
Operand to be prefetched and E stage 15
When the operand that the E stage 15 attempts to write satisfies the inclusion relationship, no memory access is performed for operand prefetch, and the value that the E stage 15 attempts to write is bypassed.

また、I10領域に対してはオペランドブリフェッチを
遅延させ、先行命令がすべて完了するまで待ってオペラ
ンドフェッチを行う。
Further, operand prefetch is delayed for the I10 area, and operand fetch is performed after waiting until all preceding instructions are completed.

Fステージ14よりEコード26.Sコード27がEス
テージ15に入力されると、各種演算器を用いたデータ
の処理、データのリード、ライト等の処理を実行する。
E code 26 from F stage 14. When the S code 27 is input to the E stage 15, data processing using various arithmetic units, data reading, data writing, etc. are executed.

演算器としてはALU。ALU is a computing unit.

バレルシフタ、プライオリティエンコーダ、カウンタ、
シフトレジスタ等がある。このEステージ15が命令を
実行するステージであり、Fステージ14以前のステー
ジで行われた処理は、すべてEステージ15のための前
処理である。Eステージ15でジャンプ命令が実行され
たときは、IFステージ11〜Fステージ14までの処
理はすべて無効化され、飛び先番地が命令フェッチ部1
とPC計算部3に出力される。Eステージ15は、マイ
クロプログラムにより制御され、Rコード24に示され
たマイクロプログラムのエントリ番地からの一連のマイ
クロプログラムを実行することにより命令を実行する。
Barrel shifter, priority encoder, counter,
There are shift registers, etc. This E stage 15 is a stage for executing instructions, and all processes performed in stages before the F stage 14 are preprocessing for the E stage 15. When a jump instruction is executed at E stage 15, all processing from IF stage 11 to F stage 14 is invalidated, and the jump destination address is set to instruction fetch section 1.
is output to the PC calculation section 3. The E stage 15 is controlled by a microprogram and executes instructions by executing a series of microprograms starting from the microprogram entry address indicated in the R code 24.

マイクロROMの読み出しとマイクロ命令の実行は、パ
イプライン化されて行われる。従って、マイクロプログ
ラムで分岐が起きたときは、1マイクロステツプの空き
ができる。
Reading of the micro ROM and execution of micro instructions are performed in a pipelined manner. Therefore, when a branch occurs in a microprogram, one microstep becomes available.

また、Eステージ15はデータ演算部6にあるストアバ
ッファを利用して、4バイト以内のオペランドストアと
次のマイクロ命令実行をパイプライン処理することもで
きる。
Further, the E stage 15 can perform pipeline processing of operand storage within 4 bytes and execution of the next microinstruction by using the store buffer in the data calculation unit 6.

Eステージ15ではAステージ13で行ったレジスタや
メモリに対する書き込み予約をオペランドの書き込みの
後解除する。
In the E stage 15, the write reservation for registers and memory made in the A stage 13 is canceled after the operand is written.

パイプラインの各ステージは、人力ラッチと出力ラッチ
を持ち、他のステージとは独立に動作することを基本と
する。各ステージは1つ前に行った処理が終り、その処
理結果を出力ラッチから次のステージの入力ラッチに転
送し、自分のステージの入力ラッチに次の処理に必要な
入力信号がすべて揃えば次の処理を開始する機構になっ
ており、各ステージは、1つ前段のステージから出方さ
れてくる次の処理に対する入力信号がすべて有効となり
、今の処理結果を後段のステージの入力ラッチに転送し
て出力ラッチが空になると、次の処理を開始する。
Each stage of the pipeline has a manual latch and an output latch, and basically operates independently from other stages. Each stage finishes the previous processing and transfers the processing result from the output latch to the input latch of the next stage, and when the input latch of its own stage has all the input signals necessary for the next processing, the next stage is started. The mechanism is such that each stage receives all input signals for the next process from the previous stage, and transfers the current processing result to the input latch of the next stage. When the output latch is empty, the next process begins.

各ステージが動作する1つ前のクロックタイミングで人
力信号がすべて揃っている必要がある。
It is necessary that all human input signals are available at the clock timing one before each stage operates.

人力信舟が揃っていないと、そのステージは待ち状態(
人力待ち)になる。出力ラッチから次のステージの人力
ラッチへの転送を行うときは、次のステージの人力ラッ
チが空き状態になっている必要があり、次のステージの
入力ラッチが空きでない場合も、パイプラインステージ
は待ち状態(出力待ち)になる。必要なメモリアクセス
権が獲得できなかったり、処理しているメモリアクセス
にウェイトが挿入されたり、その他のパイプラインコン
フリクトが生じると、各ステージの処理自体が遅延する
If Shinshu Jinriki is not available, the stage will be in a waiting state (
Waiting for human power). When performing a transfer from the output latch to the next stage's manual latch, the next stage's manual latch must be free, and even if the next stage's input latch is not free, the pipeline stage It enters a waiting state (waiting for output). If the necessary memory access rights cannot be obtained, if a wait is inserted into the memory access being processed, or if other pipeline conflicts occur, the processing itself at each stage will be delayed.

次に第3図を参照しながら第1図の処理機能について詳
細に説明する。
Next, the processing functions shown in FIG. 1 will be explained in detail with reference to FIG.

第3図は、第1図に示したデータ処理装置の詳細ブロッ
ク図であり、以下、特にサブルーチンジャンブ命令(J
SR命令)および制御レジスタへの値のロード命令(L
DC命令)に基づくデータ処理を構成とともに説明する
FIG. 3 is a detailed block diagram of the data processing device shown in FIG.
SR instruction) and load value to control register instruction (L
Data processing based on DC command) will be explained along with its configuration.

命令デコード部2とpc加算器3bの入力端。Input terminal of instruction decoding section 2 and PC adder 3b.

アドレス加算器4dの入力端は、ディスプレースメント
値9分岐命令の変位値を転送するDISPバス30で結
ばれている。命令デコード部2とアドレス加算器4dの
入力側はステップコード生成に使用した命令コード長、
スタックブツシュモードの時のブリデクトメント値等を
転送する補正値バス32で結ばれている。また、命令デ
コード部2とPC加算器3bの入力端はステップコード
の生成に使用した命令コード長を転送する命令長バス3
1で結ばれている。レジスタファイル6dとアドレス加
算器4dの入力側はレジスタファイル6dに蓄えられて
いるアドレス値を転送するAバス33で結ばれている。
The input end of the address adder 4d is connected by a DISP bus 30 that transfers the displacement value of the displacement value 9 branch instruction. The input side of the instruction decoding unit 2 and address adder 4d is the instruction code length used for step code generation;
They are connected by a correction value bus 32 that transfers the bridement value and the like in the stacked bush mode. In addition, the input terminals of the instruction decoding section 2 and the PC adder 3b are connected to an instruction length bus 3 that transfers the instruction code length used to generate the step code.
They are connected by 1. The register file 6d and the input side of the address adder 4d are connected by an A bus 33 that transfers address values stored in the register file 6d.

命令長バス31の値とDISPバス30の値のどちらか
を選択して人力する被加算値選択回路3aの出力と、D
ステージ12でデコードした命令のPC値を保持するD
PCラッチ3dまたはステップコードの切れ回毎の作業
用PC値を保持するTPOラッチ3dの何れかとは、P
C加算器3bに人力される。pc加算器3bの出力は、
PC加算器出力ラッチ3cを通してCAババス6やPo
バス37に出力される。Poバス37は、Tpcラッチ
3d、DPCラッチ3eおよびAステージ13で処理中
の命令のPC値を保持するAPCラッチ3fに結合して
いる。TPCラッチ3dにはEステージ15で分岐やジ
ャンプが生じたときに新たな命令番地を入力するため、
CAババス6からの人力経路もある、 補正値バス32の値とDISPバス30の値は、ディス
プレースメント選択回路4bに人力され、どちらか一方
がアドレス加算器4dに入力される。DISPバス30
の値とAバス33の値はベースアドレス選択回路4cに
人力され、どちらか一方がアドレス加算器4dに入力さ
れる。アドレス加算器4dは、ディスプレースメント選
択回路4bの出力、ベースアドレス選択回路4Cの出力
およびAバス33より入力された値をシフトすることに
より、1倍、2倍、4倍、8倍の値とするインデックス
値生成回路4aの出力の計3つの値を入力として、3値
加算を行う。アドレス加算器4dの出力値は、アドレス
加算器出力ラッチ4eを通してAOババス4に出力され
る。AOババス4は、Fステージ14でのオペランドフ
ェッチ時にAAババス5を通してアドレス出力回路8か
らCPU外部に出力するオペランドアドレス値を保持す
るFAラッチ7aに接続されている。
The output of the augend selection circuit 3a which manually selects either the value of the instruction length bus 31 or the value of the DISP bus 30, and D
D that holds the PC value of the instruction decoded in stage 12
Either the PC latch 3d or the TPO latch 3d that holds the working PC value each time the step code breaks is P.
It is manually input to the C adder 3b. The output of the pc adder 3b is
CA bus 6 and Po through PC adder output latch 3c.
It is output to bus 37. The Po bus 37 is coupled to a Tpc latch 3d, a DPC latch 3e, and an APC latch 3f that holds the PC value of the instruction being processed in the A stage 13. In order to input a new instruction address to the TPC latch 3d when a branch or jump occurs in the E stage 15,
There is also a manual route from the CA bus 6. The values of the correction value bus 32 and the DISP bus 30 are manually input to the displacement selection circuit 4b, and either one is input to the address adder 4d. DISP bus 30
and the value of the A bus 33 are input to the base address selection circuit 4c, and either one is input to the address adder 4d. The address adder 4d shifts the output of the displacement selection circuit 4b, the output of the base address selection circuit 4C, and the values inputted from the A bus 33 to obtain values of 1, 2, 4, and 8 times. Three-value addition is performed by inputting a total of three values output from the index value generation circuit 4a. The output value of the address adder 4d is output to the AO bus 4 through the address adder output latch 4e. The AO bus 4 is connected to an FA latch 7a that holds an operand address value that is output from the address output circuit 8 to the outside of the CPU through the AA bus 5 when an operand is fetched in the F stage 14.

FAラッチ7aは、アドレス加算器4dで計算されたオ
ペランドアドレスをEステージ15で使用するためにオ
ペランドアドレスを保持するSAラッチ7bへの出力経
路を持つ。SAラッチ7bはデータ演算部6の汎用デー
タバスであるS1バス38への出力経路を持つ。命令の
アドレスを転送するCAババス6は、アドレス加算器出
力ラッチ4eと、TPCラッチ3d、命令フェッチ部1
がブリフェッチする命令コードの番地を管理するQIN
PCカウンタ1bからCPU外部に出力するときその値
を保持するCAAラッチ7cと、Eステージ15で分岐
やジャンプが起きたときに、新たな命令番地を32バス
39から人力するEBクラッチCとに結合している。A
PCラッチ3eは、Aバス33と、Fステージ14で処
理中のPC値を保持するラッチFPC3fとに出力経路
がある。FPCラッチ3gはEステージ15で処理中の
命令のPC値を保持するCPCラッチ3hへの出力経路
を持つ。また、CPCラッチ3hは、S1バス38との
間で入出力経路を持つ。レジスタファイル6dは、汎用
レジスタや作業用レジスタ等からなり、S1バス38.
S2バス39およびAパス33への出力経路を持ち、D
○ババス0からの入力経路を持つ。データ演算器6の演
算機構であるデータ演算部6eは、S1バス38.S2
バス39からの人力経路を持ち、DOババス0への出力
経路を持つ。
FA latch 7a has an output path to SA latch 7b which holds the operand address calculated by address adder 4d for use in E stage 15. The SA latch 7b has an output path to the S1 bus 38, which is a general-purpose data bus of the data calculation section 6. The CA bus 6 that transfers the address of an instruction includes an address adder output latch 4e, a TPC latch 3d, and an instruction fetch unit 1.
QIN that manages the address of the instruction code that is briefly fetched by
Connects the CAA latch 7c that holds the value when outputting it from the PC counter 1b to the outside of the CPU, and the EB clutch C that manually inputs a new instruction address from the 32 bus 39 when a branch or jump occurs in the E stage 15. are doing. A
The PC latch 3e has an output path to the A bus 33 and the latch FPC 3f that holds the PC value being processed in the F stage 14. The FPC latch 3g has an output path to the CPC latch 3h which holds the PC value of the instruction being processed in the E stage 15. Further, the CPC latch 3h has an input/output path with the S1 bus 38. The register file 6d consists of general-purpose registers, working registers, etc., and is connected to the S1 bus 38.
It has an output path to the S2 bus 39 and the A path 33, and
○Has an input route from Babasu 0. The data calculation unit 6e, which is the calculation mechanism of the data calculation unit 6, is connected to the S1 bus 38. S2
It has a human route from bus 39 and an output route to DO bus 0.

データ処理装置のステータス情報が格納されているPS
Wレジスタ、コンテキストブロックのベースアドレスが
格納されているレジスタ、デバッフサポート機構の動作
モード情報を格納するレジスタやブランチバッファのモ
ード情報を格納するレジスタ等からなる制御レジスタ群
6bは、DOババス0からの入力経路を持ち、S2バス
39への出力経路を持つ。Eステージ15が用いるデー
タのフェッチおよびストアアドレスを格納するAAレジ
スタ7dはS1バス38からの入力経路を持ち、AAバ
バス5への出力経路を持つ。Eステージ15が処理する
フェッチデータおよびストアデータを格納するDDレジ
スタ6fはDOババス0からの人力経路を持ち、S1バ
ス38.S2バス39への出力経路を持つとともに、D
Dババス1への入出力経路を持つ。Fステージ14でF
Aラッチ7aに格納されたオペランドアドレスによって
外部メモリよりフェッチされたオペランドデータを保持
するSDクラッチgは、DDババス1からの入力経路と
S1バス38.S2バス39への出力経路を持つ。4f
はスタックポインタ(Asp)で、Aステージ13によ
り管理され、D。
PS where status information of data processing equipment is stored
The control register group 6b consists of the W register, the register storing the base address of the context block, the register storing the operation mode information of the debuff support mechanism, the register storing the mode information of the branch buffer, etc. It has an input path and an output path to the S2 bus 39. The AA register 7d, which stores data fetch and store addresses used by the E stage 15, has an input path from the S1 bus 38 and an output path to the AA bus 5. The DD register 6f, which stores fetch data and store data processed by the E stage 15, has a manual route from the DO bus 0 and is connected to the S1 bus 38. It has an output path to the S2 bus 39 and
It has an input/output route to the D bus 1. F at stage 14
The SD clutch g, which holds the operand data fetched from the external memory according to the operand address stored in the A latch 7a, is connected to the input path from the DD bus 1 and the S1 bus 38. It has an output path to the S2 bus 39. 4f
is a stack pointer (Asp), managed by the A stage 13, and D.

バス40からの入力経路を持ち、Aバス33およびFス
テージ14が管理するスタックポインタ(FSP)4g
への出力経路を持つ。
Stack pointer (FSP) 4g that has an input path from bus 40 and is managed by A bus 33 and F stage 14
has an output route to.

スタックポインタ(FSP)4gは、スタックポインタ
(ASP)4fからの入力経路を持ち、Eステージ15
が管理するスタックポインタ(CSP)6aへの出力経
路を持つ。スタックポインタ(CSP)6aは、Doバ
バス0とスタックポインタ(FSP)4gからの入力経
路を持ち、S1バス38.S2バス39への出力経路を
持つ。
The stack pointer (FSP) 4g has an input path from the stack pointer (ASP) 4f, and the E stage 15
It has an output path to the stack pointer (CSP) 6a managed by CSP. The stack pointer (CSP) 6a has input paths from the Do bus 0 and the stack pointer (FSP) 4g, and the S1 bus 38. It has an output path to the S2 bus 39.

次にサブルーチンジャンプ命令(JSR命令)および制
御レジスタへの値のロード命令(LDC命令)に基づく
パイプライン処理を説明するために、特にpc計算部3
の詳細動作について説明する。
Next, in order to explain pipeline processing based on a subroutine jump instruction (JSR instruction) and an instruction to load a value into a control register (LDC instruction), we will specifically explain the pc calculation unit 3.
The detailed operation will be explained below.

PC計算部3はDステージ12で命令コードがデコード
されるとき、1つ前にデコードされた命令コードの長さ
情報とその1つ前にデコードされた命令コードの先頭番
地とからデコード中の命令コードの先頭番地を計算する
。PC計算部3ではDPCラッチ3eに命令の切れ目の
アドレスである命令のPC値を保持し、TPOラッチ3
dにステップコードの切れ目のアドレスを保持させる。
When the instruction code is decoded in the D stage 12, the PC calculation unit 3 determines the instruction being decoded based on the length information of the instruction code decoded immediately before and the starting address of the instruction code decoded immediately before. Calculate the starting address of the code. In the PC calculation unit 3, the DPC latch 3e holds the PC value of the instruction, which is the address of the instruction break, and the TPO latch 3
d holds the address of the break in the step code.

このとき、DPCラッチ3eは命令の切れ目のアドレス
が計算された場合に限って更新され、TPOラッチ3d
はステップコードの切れ目のアドレスが計算される毎に
更新される。パイプライン上で処理されるステップコー
ドのPC値は、そのステップコードの元になった命令の
PC値が必要であるため、DPCラッチ3eの値がAP
Cラッチ3f、FPCラッチ3g、CPCラッチhと転
送されて行く。
At this time, the DPC latch 3e is updated only when the instruction break address is calculated, and the TPO latch 3d
is updated every time the step code break address is calculated. The PC value of the step code processed on the pipeline requires the PC value of the instruction that is the source of the step code, so the value of the DPC latch 3e is
The data is transferred to C latch 3f, FPC latch 3g, and CPC latch h.

なお、命令コード処理は、上述したようにステップコー
ド単位に行われ、1回のデコード処理で0〜6バイトの
命令が消費される。そして、命令デコード処理毎に判明
したそのときに使用した命令コードの長さが命令デコー
ド部2から命令長バス31に出力される。
Note that instruction code processing is performed in step code units as described above, and one decoding process consumes instructions of 0 to 6 bytes. Then, the length of the instruction code used at that time, which is determined for each instruction decoding process, is output from the instruction decoding section 2 to the instruction length bus 31.

次に第4図(a)に示すサブルーチンジャンプ命令(J
SR命令)によるパイプライン処理を第5図に示すフロ
ーチャートを参照しながら説明する。
Next, the subroutine jump instruction (J
Pipeline processing using the SR command will be explained with reference to the flowchart shown in FIG.

なお、サブルーチンジャンプ命令(以下車にJSR命令
という)は、Dステージ12で2つのステップコードに
分解されて処理される。
Note that a subroutine jump instruction (hereinafter referred to as JSR instruction) is decomposed into two step codes and processed in the D stage 12.

第4図(a)はサブルーチンジャンプ命令(JSR命令
)のフォーマットを示す模式図であり、この図において
、45aは命令基本部を示し、45bは才へランド指定
部(newpc)で、このオペランド指定部45bの実
行アドレスにサブルーチンジャンプする命令の場合に相
当する。
FIG. 4(a) is a schematic diagram showing the format of a subroutine jump instruction (JSR instruction). In this figure, 45a indicates the instruction basic part, and 45b indicates the new land specification part (newpc), which specifies the operand. This corresponds to the case of an instruction that jumps to a subroutine to the execution address of section 45b.

45cは拡張部で、飛び先番地のアドレス計算に絶対ア
ドレスや変位等が定義される。
Reference numeral 45c is an extension section in which absolute addresses, displacements, etc. are defined for address calculation of the jump destination address.

第5図はこの発明によるサブルーチンジャンプ命令処理
手順を説明するフローチャートである。
FIG. 5 is a flowchart illustrating the subroutine jump instruction processing procedure according to the present invention.

なお、(1)〜(16)は各ステップを示し、図中の縦
ラインは各ステージ処理区域を示し、横ラインは各ステ
ップコード処理順位を示す。
Note that (1) to (16) indicate each step, the vertical line in the figure indicates each stage processing area, and the horizontal line indicates each step code processing order.

先ず、第1のステップコード処理について説明する。First, the first step code processing will be explained.

先ずIFステージ11でJSR命令を取り込む(1)。First, a JSR instruction is taken in at the IF stage 11 (1).

次いで、Dステージ12にてJSR命令をデコードし、
JSR命令の第1ステツプコードを示すDコード22と
飛び先アドレスの実行アドレスを計算するためのAコー
ド23を生成する(2)。もし、飛び先番地のアドレス
計算に絶対アドレス変位等の拡張部45cを必要とする
場合には、そのデータも命令キュー1aから同時に取り
込む。被加算値選択回路3aにはそのデータも命令キュ
ー1aから命令デコード部2に取り込まれた命令長が出
力される。そこで、PC演算部3は、Dステージ12が
JSR命令の処理を開始したステップに同期して、JS
R命令の1つ前の命令に関するアドレス値を保持してい
るTPCラッチ3dの値とJSR命令の1つ前の命令の
最終ステップでDステージ12から出力された命令長を
保持する被加算値選択回路3aの値がPC加算器3bで
加算され、加算結果であるJSR命令の先頭アドレスが
TPCラッチ3dとDPCラッチ3eに書き込む(3)
Next, the JSR instruction is decoded at the D stage 12,
A D code 22 indicating the first step code of the JSR instruction and an A code 23 for calculating the execution address of the jump destination address are generated (2). If an extension section 45c such as absolute address displacement is required to calculate the address of the jump destination, that data is also fetched from the instruction queue 1a at the same time. The instruction length taken into the instruction decoder 2 from the instruction queue 1a is also output to the augend selection circuit 3a. Therefore, in synchronization with the step in which the D stage 12 starts processing the JSR instruction, the PC calculation unit 3
Selection of an addend value that holds the value of the TPC latch 3d that holds the address value for the instruction immediately before the R instruction and the instruction length output from the D stage 12 in the final step of the instruction immediately before the JSR instruction. The value of the circuit 3a is added by the PC adder 3b, and the start address of the JSR instruction, which is the addition result, is written to the TPC latch 3d and DPC latch 3e (3)
.

次いで、Aステージ13では、Aコード23の指示に従
ってオペランドアドレス計算部4において、飛び先のア
ドレスの計算を行い、計算された飛び先のアドレスをD
Oババス4を介してFAレジスタ7aに転送する(4)
Next, in the A stage 13, the operand address calculation unit 4 calculates the address of the jump destination according to the instructions of the A code 23, and the calculated address of the jump destination is transferred to D.
Transfer to FA register 7a via O bus 4 (4)
.

次いで、Fステージ14では、FAレジスタ7aの値を
SAレジスタ7bに転送する(5)。次いで、Eステー
ジ15では、飛び先アドレスが格納されているSAレジ
スタ7aの値が51バス38を介してEBレジスタ6C
に転送する(6)次に、第2のステップコードに関する
処理について説明する。
Next, in the F stage 14, the value of the FA register 7a is transferred to the SA register 7b (5). Next, in the E stage 15, the value of the SA register 7a in which the jump destination address is stored is transferred to the EB register 6C via the 51 bus 38.
(6) Next, processing related to the second step code will be explained.

Dステージ12ではJSR命令の第2ステツプコードを
示すり、コード22と戻り先の実行アドレスに関する処
理を指示するためのAコード23を生成する(7)。な
お、このステップコードの処理に関しては命令キュー1
aから命令データは取り込まれない。
In the D stage 12, an A code 23 is generated to indicate the second step code of the JSR instruction or to instruct processing related to the code 22 and the execution address of the return destination (7). Regarding the processing of this step code, instruction queue 1
No command data is fetched from a.

次いで、PCC計算部子は、Dステージ12のJSR命
令処理のステップ(2)の処理に同期してJSR命令の
先頭アドレスが格納されているTPCラッチ3dの値と
被加算値選択回路3aの出力値である命令長がpc加算
器3bで加算されてTPOラッチ3dに書き込まれる(
8)。
Next, in synchronization with the processing of step (2) of the JSR instruction processing in the D stage 12, the PCC calculation unit extracts the value of the TPC latch 3d in which the start address of the JSR instruction is stored and the output of the augend selection circuit 3a. The instruction length, which is the value, is added by the pc adder 3b and written to the TPO latch 3d (
8).

Aステージ13では、JSR命令の第1ステツプコード
の処理のために消費された命令長がPCC計算部子加算
されてJSR命令の次の命令番地が格納されているTP
Cラッチ3dの値がDISPバス30を介してベースア
ドレス選択回路4cに入力され、アドレス加算器4dに
出力される。
In the A stage 13, the instruction length consumed for processing the first step code of the JSR instruction is added to the PCC calculation unit, and the instruction length is added to the TP where the next instruction address of the JSR instruction is stored.
The value of the C latch 3d is input to the base address selection circuit 4c via the DISP bus 30, and output to the address adder 4d.

また、インデックス値生成回路4aとディスプレースメ
ント選択回路4bの出力がクリアされる。インデックス
値生成回路4aとディスプレースメント選択回路4bと
ベースアドレス選択回路4Cの出力がアドレス加算器4
dで3値加算され、アドレス加算器4dの出力、すなわ
ち、戻り先アドレスがAOババス4を介してFAレジス
タ7aに転送される(9)。
Furthermore, the outputs of the index value generation circuit 4a and displacement selection circuit 4b are cleared. The outputs of the index value generation circuit 4a, displacement selection circuit 4b, and base address selection circuit 4C are sent to the address adder 4.
The three values are added at step d, and the output of the address adder 4d, that is, the return destination address, is transferred to the FA register 7a via the AO bus 4 (9).

また、Aステージ13では、APCラッチ3fの値がデ
ィクリメントされ、FSPラッチ4gに転送される(1
0)。
Furthermore, in the A stage 13, the value of the APC latch 3f is decremented and transferred to the FSP latch 4g (1
0).

Fステージ14では、FAレジスタ7aの値がSAレジ
スタ7bに転送されるとともに(11)、FSPラッチ
4gの値がCSPラッチ6aに転送される(12)。
In the F stage 14, the value of the FA register 7a is transferred to the SA register 7b (11), and the value of the FSP latch 4g is transferred to the CSP latch 6a (12).

Eステージ15では、スタックのアドレスが格納されて
いるC3Pラツチ6aの値を51バス38を介してAA
レジスタ7dに転送しく13)、戻り先アドレスが格納
されているSAレジスタ7bの値を81バス38.デー
タ演算器6e、Doババス0を介してDDレジスタ6f
に転送する(14)。
In the E stage 15, the value of the C3P latch 6a in which the stack address is stored is transferred to the AA via the 51 bus 38.
The value of the SA register 7b in which the return destination address is stored is transferred to the register 7d (81 bus 38.13). Data calculation unit 6e, DD register 6f via Do bus 0
(14).

次いで、AAレジスタ7dの示すアドレスにDDレジス
タ6fの内容をストアした後(15)、EBレジスタ6
Cの示すアドレスへのジャンプを指示する信号を全ステ
ージに対して出力する(16)。
Next, after storing the contents of the DD register 6f at the address indicated by the AA register 7d (15), the EB register 6
A signal instructing a jump to the address indicated by C is output to all stages (16).

次に第4図(b)、(c)および第6図を参照しながら
制御レジスタに値をロードする(LDC命令)に基づく
パイプライン処理について説明する。
Next, pipeline processing based on loading a value into a control register (LDC instruction) will be described with reference to FIGS. 4(b) and 4(c) and FIG. 6.

第4図(b)、(C)はこの発明におけるLDC命令の
ビット割付けを説明する模式図であり、。
FIGS. 4(b) and 4(c) are schematic diagrams illustrating the bit allocation of the LDC instruction in the present invention.

同図(b)は一般形フオーマット(Gフォーマット)を
示し、46a、46eは命令基本部を示し、46bは指
定フィールド(RR)で、ソースオペランドサイズを指
定する。46cはオペランド指定フィールドで、値sr
cがセットされる。
4B shows a general format (G format), 46a and 46e indicate basic instruction parts, and 46b is a specification field (RR) for specifying the source operand size. 46c is an operand specification field, and the value sr
c is set.

46dは拡張部を示す。46fは指定フィールドで、デ
ィスティネーションアドレス(WW)がセットされる。
46d indicates an extension. 46f is a designation field in which a destination address (WW) is set.

46gはオペランド指定フィールドで、制御レジスタを
指定する値destがセットされる。
46g is an operand specification field in which a value dest specifying a control register is set.

同図(C)はEフォーマットを示し、第1オペランドが
8ビツトの即値である場合に相当し、47a、47cは
命令基本部を示し、47bは即値指定フィルードを示し
、47dは指定フィールドで、ディスティネーションア
ドレス(WW)がセットされる。47eは拡張部を示す
Figure (C) shows the E format, which corresponds to the case where the first operand is an 8-bit immediate value, 47a and 47c show the instruction basic part, 47b shows the immediate value specification field, 47d is the specification field, Destination address (WW) is set. 47e indicates an extension part.

第6図はこの発明による制御レジスタに値をロードする
ロード命令処理手順を説明するフローチャートである。
FIG. 6 is a flowchart illustrating a load instruction processing procedure for loading a value into a control register according to the present invention.

なお、(1)〜(17)は各ステップを示し、図中の縦
ラインは各ステージ処理区域を示し、横ラインは各ステ
ップコード処理順位を示す。また、LDC命令フォーマ
ットは、上記第4図(b)に示したGフォーマットによ
るLDC命令を例として説明する。
Note that (1) to (17) indicate each step, the vertical lines in the figure indicate each stage processing area, and the horizontal lines indicate each step code processing order. Further, the LDC instruction format will be explained using the LDC instruction in the G format shown in FIG. 4(b) as an example.

先ず、第1のステップコード処理について説明する。First, the first step code processing will be explained.

先ずIFステージ11でLDC命令を取り込む(1)。First, an LDC instruction is taken in at the IF stage 11 (1).

次いで、Dステージ12にてLDC命令が第1ステツプ
コードを示すDコード22と値srCのアドレスを計算
するためのAコード23が生成される(2)。もし、値
srcのアドレスの計算に第4図(b)に示した拡張部
46dを必要とする場合にはそのデータも命令キュー1
a(第3図参照)から同時に命令デコード部2に取り込
む。
Next, in the D stage 12, the LDC instruction generates a D code 22 indicating the first step code and an A code 23 for calculating the address of the value srC (2). If the extension section 46d shown in FIG. 4(b) is required to calculate the address of the value src, the data is also stored in the instruction queue 1.
A (see FIG. 3) are simultaneously taken into the instruction decoding section 2.

ここでは、Gフォーマットを採用するため、値srcが
イミーディエット値として処理されるので、アドレス計
算は必要はない。
Here, since the G format is adopted, the value src is processed as an immediate value, so there is no need for address calculation.

被加算値選択回路3aにはそのステップで命令キュー1
aから命令デコード部2に取り込まれた命令長が出力さ
れる。PC演算部3では、Dステージ12がLDC命令
の処理を開始したステップに同期して、LDC命令の1
つ前の命令に関するアドレス値を保持しているTPCラ
ッチ3dの値とLDC命令の1つ前の命令の最終ステッ
プでDステージ12から出力された命令長を保持する被
加算値選択回路3aの値がpc加算器3bで加算されて
、加算結果であるLDC命令の先頭アドレスがTPCラ
ッチ3dとDPCラッチ3eに書き込まれる(3) Aステージ13では、Aコード23の指示に従ってイミ
ーディエット値となる値srcがオペランドアドレス計
算部4内を転送され、ざらにAOババス4を介してFA
レジスタ7aに転送される(4)。
The augend selection circuit 3a receives instruction queue 1 at that step.
The instruction length taken into the instruction decoding section 2 is output from a. In the PC calculation unit 3, one of the LDC instructions is processed in synchronization with the step in which the D stage 12 starts processing the LDC instruction.
The value of the TPC latch 3d that holds the address value related to the previous instruction and the value of the augend selection circuit 3a that holds the instruction length output from the D stage 12 at the final step of the instruction immediately before the LDC instruction. are added by the PC adder 3b, and the start address of the LDC instruction, which is the addition result, is written to the TPC latch 3d and DPC latch 3e (3) In the A stage 13, the value that becomes the immediate value according to the instruction of the A code 23 is written src is transferred within the operand address calculation unit 4 and sent to the FA via the AO bus 4.
It is transferred to register 7a (4).

Fステージ14では、FAレジスタ7aの値がSAレジ
スタ7bに転送される(5) Eステージ15ではSrCを示すSAレジスタ7bの値
が31バス38.データ演算器6e、DOババス0を介
してレジスタファイル6d内に存在するワーキングレジ
スタに転送される(6)。
In the F stage 14, the value of the FA register 7a is transferred to the SA register 7b (5). In the E stage 15, the value of the SA register 7b indicating SrC is transferred to the 31 bus 38. The data is transferred to the working register existing in the register file 6d via the data calculator 6e and the DO bus 0 (6).

第2のステップコードに関する処理は、先ず、Dステー
ジ12で、LDC命令の第2の命令基本部が命令キュー
1aから命令デコード部2に取り込まれ、命令デコード
部2でデコードされると、LDC命令の第2ステツプコ
ードを示すDコード22と制御レジスタのアドレスを計
算するためのAコード23が生成される(7)  もし
、制御レジスタのアドレス計算に拡張部47fが必要な
らそのデータも命令キュー1aから同時に取り込む。
In the processing related to the second step code, first, in the D stage 12, the second instruction basic part of the LDC instruction is fetched from the instruction queue 1a to the instruction decoding unit 2, and when decoded by the instruction decoding unit 2, the LDC instruction A D code 22 indicating the second step code and an A code 23 for calculating the address of the control register are generated (7) If the extension section 47f is required to calculate the address of the control register, its data is also stored in the instruction queue 1a. Import from simultaneously.

被加算選択回路3aにはそのステップで命令キュー1a
から命令デコード部2に取り込まれた命令長が出力され
る。pc演算部3では、LDC命令の先頭アドレスを保
持するTPOラッチ3dの値と、ステップ(1)で命令
デコード部2から転送された命令長を保持する被加算値
選択回路3aの出力値がPC加算器3bで加算されてT
PCラッチ3dに書込まれる(8) Aステージ13では、Aコード23の指示に従ってオペ
ランドアドレス計算部4において、指定された制御レジ
スタのアドレス計算を行い、計算された制御レジスタの
アドレスは、AOババス4を介してFAレジスタ7aに
転送される(9)。
The addend selection circuit 3a receives the instruction queue 1a at that step.
The instruction length taken into the instruction decoding section 2 is output from the instruction decoder 2. In the PC calculation unit 3, the value of the TPO latch 3d that holds the start address of the LDC instruction and the output value of the augend selection circuit 3a that holds the instruction length transferred from the instruction decoding unit 2 in step (1) are calculated as PC. Added by adder 3b, T
Written to the PC latch 3d (8) In the A stage 13, the address of the specified control register is calculated in the operand address calculation unit 4 according to the instruction of the A code 23, and the calculated address of the control register is sent to the AO bus 4 to the FA register 7a (9).

Fステージ14では、FAレジスタ7aの値がSAレジ
スタ7bに転送される(10)。
In the F stage 14, the value of the FA register 7a is transferred to the SA register 7b (10).

Eステージ15では、第1のステップコードでロードす
べき値を格納したワーキングレジスタの内容がSAレジ
スタ7b内のアドレスで示される制御レジスタに転送さ
れて格納される(11)。
In the E stage 15, the contents of the working register storing the value to be loaded in the first step code are transferred to and stored in the control register indicated by the address in the SA register 7b (11).

さらに第3のステップコードに関する処理は、先ず、D
ステージ12ではLDC命令の第3ステツプコードの処
理に関しては命令キュー1aから命令データは取り込ま
れない。このとき、第3ステツプコードであるDコード
22.Aコード23が生成され(12)、PCC計算部
子は、Dステージ12のステップ(3)の処理に同期し
てTPOラッチ3dの値と被加算値選択回路3aの値が
pc加算器3bで加算され、次の命令の先頭アドレスを
TPOラッチ3dに書込まれる(13)。
Furthermore, the processing regarding the third step code is first performed by D
In stage 12, no instruction data is fetched from the instruction queue 1a regarding the processing of the third step code of the LDC instruction. At this time, the third step code, D code 22. The A code 23 is generated (12), and the PCC calculation unit calculates the value of the TPO latch 3d and the value of the augend selection circuit 3a in the PC adder 3b in synchronization with the processing of step (3) of the D stage 12. The first address of the next instruction is written to the TPO latch 3d (13).

Aステージ13では、Aコード23の指示に従ってLD
C命令の次の命令番地が格納されているTPCラッチ3
dの値がDISPバス30を介してベースアドレス選択
回路4Cに入力され、アドレス加算器4dに出力される
。また、インデックス値生成回路4aとディスプレース
メント選択回路4bの出力がクリアされる。インデック
ス値生成回路4aとディスプレースメント選択回路4b
とベースアドレス選択回路4cの出力がアドレス加算器
4dで3値加算(「0」加算)され、アドレス加算器4
dの出力、すなわちLDC命令の次の命令アドレスがA
Oババス4を介してFAレジスタ7aに転送される(1
4)。
At A stage 13, the LD
TPC latch 3 where the next instruction address of the C instruction is stored
The value of d is input to the base address selection circuit 4C via the DISP bus 30, and output to the address adder 4d. Furthermore, the outputs of the index value generation circuit 4a and displacement selection circuit 4b are cleared. Index value generation circuit 4a and displacement selection circuit 4b
and the output of the base address selection circuit 4c are added in three values (addition of "0") by the address adder 4d.
The output of d, that is, the next instruction address of the LDC instruction is A
Transferred to the FA register 7a via the O bus 4 (1
4).

Fステージ14ではFAレジスタ7aの値がSAレジス
タ7bに転送される(15)。
In the F stage 14, the value of the FA register 7a is transferred to the SA register 7b (15).

Eステージ15では、LDC命令の次の命令のアドレス
が格納されているSAレジスタ7bの値をS1バス3B
を介してEBレジスタ6cに転送した後(16)、EB
レジスタ6cの示すアドレスへのジャンプを指示しく1
7)、制御レジスタに値をロードするためのパイプライ
ン処理を終了する。
In the E stage 15, the value of the SA register 7b, which stores the address of the next instruction after the LDC instruction, is transferred to the S1 bus 3B.
After transferring to the EB register 6c via (16), the EB
Instruct 1 to jump to the address indicated by register 6c.
7) Finish the pipeline process for loading the value into the control register.

次に第7図〜第17図を参照しながらこの発明における
命令フォーマットについて説明する。
Next, the instruction format in this invention will be explained with reference to FIGS. 7 to 17.

なお、この実施例におけるデータ処理装置は、2オへラ
ンド命令に対して基本的に4バイト+拡張部の構成を持
ち、すべてのアドレッシングモードが利用できる一般形
のフォーマットと頻度の高い命令とアドレッシングモー
ドのみを使用できる短縮形フォーマットの2つのフォー
マットが定義されている。
Note that the data processing device in this embodiment basically has a configuration of 4 bytes + extension part for 2 oherand instructions, and has a general format that can use all addressing modes, as well as frequently used instructions and addressing. Two formats of abbreviated formats are defined in which only modes can be used.

第7図〜第16図は使用命令フォマットの割付はビット
を説明する模式図であり、各図中の−はオペコードエリ
アを示し、#はリテラルまたは即値の割付はエリアを示
し、Eaは8ビツトの一般形のアドレッシングモードで
オペランドを指定するエリアを示し、shは6ビツトの
短縮形のアドレッシングモードでオペランドを指定する
エリアを示し、Rnはレジスタ上のオペランドをレジス
タ番号で指定するエリアを示す。
Figures 7 to 16 are schematic diagrams explaining the bit assignments of the instruction formats used. - in each figure indicates an opcode area, # indicates an area for literal or immediate value assignments, and Ea indicates an 8-bit bit. sh indicates an area for specifying an operand in the general addressing mode, sh indicates an area for specifying an operand in a 6-bit abbreviated addressing mode, and Rn indicates an area for specifying an operand on a register by a register number.

なお、フォーマットは第7図に示すように右側がLSB
側で、かつ高いアドレスになっている。
Note that the format is LSB on the right side as shown in Figure 7.
on the side, and has a high address.

アドレスNとアドレスN+1の2バイトを見ないと、命
令フォーマットが判別できないようになっているが、こ
れは命令が必ず16ビツト(2バイト)単位でフェッチ
、デコードされることを前提としているからである。
The instruction format cannot be determined without looking at the two bytes of address N and address N+1, but this is because it is assumed that instructions are always fetched and decoded in units of 16 bits (2 bytes). be.

また、いずれのフォーマットの場合も、各オペランドの
エリアEaまたはエリアshの拡張部は、必ずエリアE
aまたはエリアshの基本部を含むハーフワードの直後
におかれる。これは、命令により暗黙に指定される即値
データや命令の拡張部に優先する。従って、4バイト以
上の命令では、エリアEaの拡張部によって命令のオペ
コードが分断される場合がある。
In addition, in any format, the extended part of area Ea or area sh of each operand must be area E.
It is placed immediately after the halfword containing a or the basic part of area sh. This overrides any immediate data or extensions of the instruction that are implicitly specified by the instruction. Therefore, for an instruction of 4 bytes or more, the operation code of the instruction may be divided by the extension part of area Ea.

次に第8図〜第11図を参照しながら短縮形2オペラン
ド命令のフォーマットについて説明する。
Next, the format of the abbreviated two-operand instruction will be explained with reference to FIGS. 8 to 11.

第8図はメモリレジスタ間演算命令のフォーマットを示
し、ソースオペランド側がメモリとなるL−forma
tとディスティネーションオペランド側がメモリとなる
S−formatがある。
Figure 8 shows the format of an operation instruction between memory registers, and the L-forma where the source operand side is memory.
There is an S-format in which the t and destination operand sides are memories.

特に、L−formatでは、shはソースオペランド
の指定フィールドを示し、Rnは前記指定フィールドs
hのオペランドサイズの指定を示し、レジスタ上に置か
れたディスティネーションオペランドのサイズは、32
ビツトに固定されている。レジスタ側とメモリ側のサイ
ズが異なり、ソース側のサイズが小さい場合に符号拡張
が行われる。
In particular, in L-format, sh indicates the specified field of the source operand, and Rn indicates the specified field s.
Indicates the specification of the operand size of h, and the size of the destination operand placed on the register is 32
Fixed to bit. Sign extension is performed when the size of the register side and the memory side are different and the size of the source side is small.

S−formatでは、shはディスティネーションオ
ペランドの指定フィールドを示し、Rnは前記指定フィ
ールドshのオペランドサイズの指定を示す。レジスタ
側とメモリ側のサイズが異なり、ソース側のサイズが大
きい場合に溢れた部分の切り捨てとオーバーフローチエ
ツクが行われる。
In the S-format, sh indicates a destination operand specification field, and Rn indicates the operand size specification of the specification field sh. If the size of the register side and the memory side are different, and the size of the source side is large, the overflow portion is truncated and an overflow check is performed.

第9図はレジスターレジスタ間演算命令のフォーマット
(R−f o rma t)を示し、Rnはディスティ
ネーションレジスタの指定フィールドを示し、Ftmは
ソースレジスタの指定フィールドを示し、オペランドサ
イズは32ビツトのみである。
Figure 9 shows the format (R-format) of a register-register operation instruction, where Rn indicates the destination register specification field, Ftm indicates the source register specification field, and the operand size is only 32 bits. be.

第10図はリテラル−メモリ間演算命令のフォーマット
(Q−f o rma t)を示し、MMはディスティ
ネーションオペランドサイズの指定フィールドを示し、
shはディスティネーションオペランドの指定フィール
ドを示す。
FIG. 10 shows the format (Q-format) of a literal-memory operation instruction, where MM indicates a destination operand size specification field,
sh indicates the designated field of the destination operand.

第11図は即値−メモリ間演算命令のフォーマット(I
−format)を示し、MMはオペランドサイズの指
定フィールド(ソース、ディスティネーションで共通)
を示し、shはディスティネーションオペランドの指定
フィールドを示し、I−f o rma tの即値のサ
イズは、ディスティネーション側のオペランドのサイズ
と共通に8.16.32ビツトとなり、ゼロ拡張、符号
拡張は行われない。
Figure 11 shows the format of an immediate-memory operation instruction (I
-format), and MM is the operand size specification field (common for source and destination)
, sh indicates the specified field of the destination operand, the size of the immediate value of I-format is 8.16.32 bits, which is the same as the size of the destination operand, and zero extension and sign extension are Not done.

第12図は1オペランド命令の一般形フオーマット(G
l−f o rma t)を示し、MMはオペランドサ
イズの指定フィールドを示す。なお、部のGl−for
mat命令では、エリアEaの外にも拡張部がある。ま
た、指定フィールドMMを使用しない命令もある。
Figure 12 shows the general format of a one-operand instruction (G
MM indicates the operand size specification field. In addition, Gl-for
In the mat instruction, there is an extension part outside the area Ea. There are also instructions that do not use the designated field MM.

第13図〜第16図は2オペランド命令の一般形フオー
マットを示し、8ビツトで指定する一般形アドレッシン
グモードのオペランドが最大2つ存在する命令であり、
オペランドの総数自体は3つ以上になる場合がある。
Figures 13 to 16 show the general format of a two-operand instruction, which has a maximum of two operands in the general addressing mode specified by 8 bits.
The total number of operands itself may be three or more.

第13図は第1オペランドがメモリ読出しを必要とする
命令フォーマット(G−format)を示し、EaM
はディスティネーションオペランドの指定フィールドを
示し、MMはディスティネーションオペランドサイズの
指定フィールドを示し、EaRはソースオペランド指定
フィールドを示し、RRはソースオペランドサイズの指
定フィールドを示す。
FIG. 13 shows an instruction format (G-format) in which the first operand requires memory read, and EaM
indicates a destination operand specification field, MM indicates a destination operand size specification field, EaR indicates a source operand specification field, and RR indicates a source operand size specification field.

第14図は第1オペランドが8ビツト即値の命令のフォ
ーマット(E−format)を示し、EaMはディス
ティネーションオペランドの指定フィールドを示し、M
Mはディスティネーションオペランドサイズの指定フィ
ールドを示し、#はソースオペランド値を示す。
Figure 14 shows the format of an instruction whose first operand is an 8-bit immediate value (E-format), EaM indicates the destination operand specification field, and M
M indicates a destination operand size specification field, and # indicates a source operand value.

第15図は第1オペランドがアドレス計算のみの命令フ
ォーマット(GA−format)を示し、EaWはデ
ィスティネーションオペランドの指定フィールドを示し
、WWはディスティネーションオペランドの指定フィー
ルドを示し、EaAはソースオペランドの指定フィール
ドを示し、ソースオペランドとしては実行アドレスの計
算結果自体が使用される。
Figure 15 shows an instruction format (GA-format) in which the first operand is only address calculation, EaW indicates the destination operand specification field, WW indicates the destination operand specification field, and EaA indicates the source operand specification field. field, and the execution address calculation result itself is used as the source operand.

第16図はショートブランチ命令のフォーマットを示し
、CCCCはブランチ条件指定フィールドを示し、di
sp:8はジャンプ先との変位指定フィールドを示し、
この実施例において、8ビツトで変位を指定する場合に
は、ビットパターンでの指定値を2倍して変位値とする
FIG. 16 shows the format of a short branch instruction, CCCC indicates a branch condition specification field, and di
sp:8 indicates a displacement specification field with respect to the jump destination,
In this embodiment, when specifying displacement using 8 bits, the specified value in the bit pattern is doubled to obtain the displacement value.

次に第17図〜第24図を参照しながらこの実施例にお
けるアドレッシングモードについて説明する。
Next, the addressing mode in this embodiment will be explained with reference to FIGS. 17 to 24.

なお、この実施例におけるデータ処理装置のアドレッシ
ングモード指定方法には、レジスタを含めて6ビツトで
指定する短縮形と、8ビツトで指定する一般形とがあり
、未定義のアドレツシングモードを指定した場合や、意
味的に考えて明らかにおかしなアドレッシングモードの
組み合わせを指定した場合には、未定義命令を実行した
場合と同じく予約命令例外を発生し、例外処理を起動す
る。
In this embodiment, there are two methods for specifying the addressing mode of the data processing device: an abbreviated form in which the addressing mode is specified using 6 bits including the register, and a general form in which the addressing mode is specified using 8 bits. or if a combination of addressing modes that is semantically incorrect is specified, a reserved instruction exception is generated and exception handling is started, just as if an undefined instruction were executed.

これに該当するのは、ディスティネーションが即値モー
ドの場合、アドレス計算を伴うべきアドレッシングモー
ド指定フィールドで即値モードを指定した場合等がある
This applies, for example, when the destination is in immediate mode, or when immediate mode is specified in the addressing mode specification field that should involve address calculation.

なお、第17図〜第24図に示すフォーマット中におい
て、Rnはレジスタ指定フィールドを示し、mem [
EA]はF、Aで示されるアドレスのメモリ内容を示し
、(sh)は6ビツトの短縮形アドレッシングモードで
の指定方法を示し、(Ea)は8ビツトの一般形アドレ
ッシングモードでの指定方法を示し、図中の点線部は拡
張部を示す。
Note that in the formats shown in FIGS. 17 to 24, Rn indicates a register specification field, and mem [
EA] indicates the memory contents of the addresses indicated by F and A, (sh) indicates the specification method in the 6-bit abbreviated addressing mode, and (Ea) indicates the specification method in the 8-bit general addressing mode. The dotted line portion in the figure indicates the expanded portion.

また、この実施例においては、下記に示す基本アドレッ
シングモード、レジスタ直接モード、レジスタ間接モー
ド、レジスタ相対間接モード、即値モード、絶対モード
、PC相対間接モード、スタックポツプモード、スタッ
クブツシュモード等の各モードをサポートする。
In this embodiment, the following basic addressing modes, register direct mode, register indirect mode, register relative indirect mode, immediate value mode, absolute mode, PC relative indirect mode, stack pop mode, stack bush mode, etc. Support each mode.

第17図はレジスタ直接モードのフォーマットを示し、
レジスタの内容をそのままオペランドとするモードであ
り、Rnは汎用レジスタの番号を示す。
Figure 17 shows the format of register direct mode,
This is a mode in which the contents of the register are used as operands as they are, and Rn indicates the number of the general-purpose register.

第18図はレジスタ間接モードのフォーマットを示し、
レジスタの内容をアドレスとするメモリの内容をオペラ
ンドとするモードであり、Rnは汎用レジスタの番号を
示す。
Figure 18 shows the format of register indirect mode,
This is a mode in which the contents of the register are the addresses and the contents of the memory are the operands, and Rn indicates the number of the general-purpose register.

第19図はレジスタ相対間接モードのフォーマットを示
し、ディスプレースメント値が16ビツトか32ビツト
かにより2種類に分かれ、それぞれレジスタの内容に1
6ビツトまたは32ビツトのディスプレースメント値を
加えたアドレスとするメモリの内容をオペランドとする
モードであり、Rnは汎用レジスタ番号を示し、dis
p:1B 。
Figure 19 shows the format of the register relative indirect mode, which is divided into two types depending on whether the displacement value is 16 bits or 32 bits.
This is a mode in which the operand is the contents of the memory, which is the address to which a 6-bit or 32-bit displacement value has been added. Rn indicates the general-purpose register number, and dis
p:1B.

disp:32はそれぞれ16ビツト、32ビツトのデ
ィスプレースメント値を示し、ディスプレースメント値
は符号付きとして扱う。
disp:32 indicates displacement values of 16 bits and 32 bits, respectively, and the displacement values are treated as signed.

第20図は即値モードのフォーマットを示し、命令コー
ド中で指定されるビットパターンをそのまま2進数と1
做してオペランドとするモードであり、imm dat
aは即値を示す。i+nm dataのサイズはオペラ
ンドサイズとして命令中で指定される。
Figure 20 shows the format of the immediate value mode, in which the bit pattern specified in the instruction code is converted into a binary number and a digit as is.
It is a mode that is used as an operand, and imm dat
a indicates an immediate value. The size of i+nm data is specified in the instruction as the operand size.

第21図は絶対モードのフォーマットを示し、アドレス
値が16ビツトで示されるか32ビツトで示されるかに
より21in頚に分かれ、それぞれ命令コード中で指定
される16ビツトまたは32ビツトのビットパターンを
アドレスとしたメモリの内容をオペランドとするモード
であり、abs:16゜abs:32はそれぞれ16ビ
ツト、32ビツトのアドレス値を示し、abs:16で
アドレスが示されるときは指定されたアドレス値を32
ビツトに符号拡張する。
Figure 21 shows the format of the absolute mode, which is divided into 21-inch sections depending on whether the address value is expressed in 16 bits or 32 bits. This mode uses the contents of the memory as the operand, and abs:16° and abs:32 indicate 16-bit and 32-bit address values, respectively, and when an address is indicated by abs:16, the specified address value is set to 32 bits.
Sign extend to bits.

第22図はPC相対間接モードのフォーマットを示し、
ディスプレースメント値が16ビツトか32ビツトによ
り2種類に分かれ、それぞれプログラムカウンタの内容
に16ビツトまたは32ビツトのディスプレースメント
値を加えた値をアドレスとするメモリの内容をオペラン
ドとするモードであり、dlsp:16 、 disp
:32はそれぞれ16ビツト、32ビツトのディスプレ
ースメント値を示し、ディスプレースメント値は符号付
きとして扱う。
Figure 22 shows the format of PC relative indirect mode,
This mode is divided into two types depending on whether the displacement value is 16 bits or 32 bits, and the operand is the contents of the memory whose address is the value obtained by adding the 16-bit or 32-bit displacement value to the contents of the program counter. :16,disp
:32 indicates a 16-bit and 32-bit displacement value, respectively, and the displacement value is treated as signed.

なお、PC相対間接モードにおいて参照されるプログラ
ムカウンタの値は、そのオペランドを含む命令の先頭ア
ドレスであり、多段間接アドレッシングモードにおいて
、プログラムカウンタの値が参照される場合にも、同じ
ように命令先頭のドレスをPC相対の基準値として使用
する。
Note that the value of the program counter referenced in PC relative indirect mode is the start address of the instruction that includes the operand, and when the value of the program counter is referenced in multistage indirect addressing mode, it is also the start address of the instruction that includes the operand. dress is used as the PC-relative reference value.

第23図はスタックポツプモードのフォーマットを示し
、スタックポインタ(sp)の内容をアドレスとするメ
モリの内容をオペランドとするモードであり、オペラン
ドアクセス後、スタックポインタSPをオペランドサイ
ズだけインクリメントする0例えば32ビツトデータを
扱う場合には、オペランドアクセス後、スタックポイン
タSPを+4だけ更新される。B、Hのサイズのオベラ
ンドに対するスタックポツプモードの指定も可能であり
、それぞれスタックポインタSPが+1、+2だけ更新
される。なお、オペランドに対しスタックポツプモード
が意味を持たないものに対しては、予約命令例外を発生
する。具体的に予約命令例外となるのは、writeオ
ペランド。
Figure 23 shows the format of the stack pop mode, which uses the contents of the stack pointer (sp) as the address and the contents of the memory as the operand, and after the operand is accessed, the stack pointer SP is incremented by the operand size. When handling 32-bit data, the stack pointer SP is updated by +4 after operand access. It is also possible to specify stack pop mode for overlands of size B and H, and the stack pointer SP is updated by +1 and +2, respectively. Note that a reserved instruction exception is generated for operands for which the stack pop mode has no meaning. Specifically, the write operand is a reserved instruction exception.

read−mod i fy−wr i teオペラン
ドに対するスタックポツプモード指定である。
This is the stack pop mode specification for the read-modify-write operand.

第24図はスタックブツシュモードのフォーマットを示
し、スタックポインタ(sp)の内容をオペランドサイ
ズだけディクリメントした内容をアドレスとするメモリ
の内容をオペランドとするモードであり、スタックブツ
シュモードではオペランドアクセス前にスタックポイン
タ(sp)がディクリメントされる。例えば32とット
データを扱う場合には、オペランドアクセス前にスタッ
クポインタ(sp)が「−4」だけ更新される。
Figure 24 shows the format of stack bush mode. In this mode, the operand is the memory content whose address is the content obtained by decrementing the content of the stack pointer (sp) by the operand size. In stack bush mode, operand access is The stack pointer (sp) is decremented before. For example, when handling 32 bit data, the stack pointer (sp) is updated by "-4" before accessing the operand.

B、Hのサイズのオペランドに対するスタックブツシュ
モードの指定も可能であり、それぞれスタックポインタ
(sp)がそれぞれ−1,−2だけ更新される。なお、
オペランドに対しスタックブツシュモードが意味を持た
ないものに対しては、予約命令例外を発生する。具体的
に予約命令例外となるのは、writeオペランド、r
ead−mod i fy−wr i teオペランド
に対するスタックブツシュモード指定である。
It is also possible to specify the stack bush mode for operands of size B and H, and the stack pointer (sp) is updated by -1 and -2, respectively. In addition,
A reserved instruction exception is generated for operands for which the stack mode has no meaning. Specifically, the reserved instruction exception is the write operand, r
This is the stack bush mode specification for the ead-mod fy-wr ite operand.

(発明の効果) 以上説明したように、この発明は1つの命令を第2のパ
イプラインステージに対する1つまたは複数の単位処理
コードに分解してデコードする分解デコード手段と、こ
の分解デコード手段によりデコードされた各単位処理コ
ードに基づいて命令に対する複数のアドレス演算を実行
するアドレス演算手段と、このアドレス演算手段により
演算された命令アドレスを単位処理コードとして後段の
第2のパイプラインステージに転送する転送手段とを設
けたので、例えばサブルーチンジャンプ命令を処理する
場合、2つのステップコードに分割してパイプライン中
を流し、第1のステップコードでサブルーチンへの飛び
先アドレスに関する処理を実行させるとともに、第2の
ステップコードでサブルーチンからの戻り先アドレスに
関する処理を実行させることが可能となり、従来のよう
アドレス情報を保持するラッチ手段を設けることなくパ
イプライン処理を効率よく行える。
(Effects of the Invention) As explained above, the present invention includes a disassembly decoding means for disassembling and decoding one instruction into one or more unit processing codes for the second pipeline stage, and decoding by this disassembly decoding means. address calculation means for executing a plurality of address operations for instructions based on each unit processing code, and a transfer for transferring the instruction address calculated by the address calculation means to a subsequent second pipeline stage as a unit processing code. For example, when processing a subroutine jump instruction, the first step code is divided into two step codes and passed through the pipeline, and the first step code executes processing related to the jump address to the subroutine. It is possible to execute processing related to the return destination address from the subroutine using step code 2, and pipeline processing can be performed efficiently without providing a latch means for holding address information as in the past.

また、制御レジスタへのロード命令を処理する場合、3
つのステップコードに分割してパイプライン中を流すこ
とにより、第1のステップコードでソースオペランドに
関する処理を、第2のステップコードで制御レジスタへ
のロードに関する処理を、第3のステップコードで次の
命令へのジャンプに関する処理を行わせることができる
。従って、2種類の命令の次の命令の先頭番地をステッ
プコードに伴うオペランドアドレスとしてパイプライン
中を流すことかでき、次の命令のプログラムカウンタ値
処理のため特別の転送経路を排除でき、効率よくパイプ
ライン処理が可能となる。
Also, when processing a load instruction to a control register, 3
By dividing the code into three step codes and running them through the pipeline, the first step code handles processing related to source operands, the second step code handles processing related to loading into control registers, and the third step code handles processing related to the next step. Processing related to jumping to an instruction can be performed. Therefore, the start address of the next instruction of the two types of instructions can be passed through the pipeline as the operand address accompanying the step code, and a special transfer path can be eliminated for processing the program counter value of the next instruction. Pipeline processing becomes possible.

さらに、制御レジスタへのロード命令をパイプライン処
理する場合、命令実行ステージで値を制御レジスタにロ
ードした後、レジスタにロードされている次の命令の先
頭番地へジャンプ処理でき、この命令で値がロードされ
る以前の値を持った制御レジスタで取り込まれたパイプ
ライン内の命令をすべてキャンセルでき、正しい制御レ
ジスタの制御の下でこの制御レジスタに値をロードする
命令の次の命令を新たにフェッチすることができる等の
優れた効果を奏する。
Furthermore, when pipeline processing is performed on a load instruction to a control register, after the value is loaded into the control register in the instruction execution stage, it is possible to jump to the start address of the next instruction loaded in the register, and the value is Can cancel any instruction in the pipeline that has been fetched with a control register whose value was previously loaded, and a new instruction following the instruction that loads this control register can be fetched under the control of the correct control register. It has excellent effects such as being able to

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

第1図はこの発明の一実施例を示すデータ処理装置の構
成を説明するブロック図、第2図(a)は、第1図に示
したデータ処理装置のバイブライン処理を説明する構成
ブロック図、第2図(b)は基本的命令フォーマットを
説明する模式図、第3図は、第1図に示したデータ処理
装置の詳細ブロック図、第4図(a)はサブルーチンジ
ャンプ命令のフォーマットを示す模式図、第4図(b)
、(C)はこの発明におけるロード命令のビット割付け
を説明する模式図、第5図はこの発明によるサブルーチ
ンジャンプ命令処理手順を説明するフローチャート、第
6図はこの発明による制御レジスタに値をロードするロ
ード命令処理手順を説明するフローチャート、第7図〜
第工6図は使用命令フオマットの割付゛けビットを説明
する模式図、17図〜第24図はこの発明におけるアド
レッシンモードを説明する模式図、第25図従来のデー
タ処理装置におけるパイプライン処理を説明する機能ブ
ロック図である。 図において、1は命令フェッチ部、2は命令デコード部
、3はPC計算部、4はオペランドアドレス計算部、5
はマイクロROM部、6はデータ演算部、7は外部イン
タフェース部、8はアドレス出力回路、9はデータ入出
力回路である。 なお、各図中の同一符号は同一または相当部分を示す。 代理人 大 岩 増 雄    (外2名)(2バイト
) (θ〜4Aイト) (a)JSR 第 図 くアドレス〉 N◆l N+2 N+3 第 図 byte: N+2−1 第 図 byte: N lo図 byte: N+2−1 第 図 byte: N+2−1 byte二 N+2 N中2◆M−1 第12図 byte: N+2−1 第 図 byte: N+2−1 byte : N+2 ト2◆1 N+2中2 ・−・・・・ N争2十滅◆2−1 第 図 byte: byte : N中4−1 第 図 byte: N◆2−1 byte: N◆2 ト2◆l N◆2◆2 ・・・・・・ N中2十ト2−1 第 図 byte: 第 図 ツう 図 弔 図 ムラ 図 第 図 弔 図 力 図 果 図 第 図 E:命令実行ステージ 1、事件の表示 21発明の名称 正 書(自発) 平成 着  年  月 特願昭 θ3−205584号 データ処理装置 5、補正の対象 明細書全文および図面 6、補正の内容 (1)明細書全文を別紙のように補正する。 (2)図面中、第3図、第4図(b)、(C)第5図お
よび第6図を別紙のように補正する。 以上 3、補正をする者 事件との関係
FIG. 1 is a block diagram explaining the configuration of a data processing device showing an embodiment of the present invention, and FIG. 2(a) is a configuration block diagram explaining the vibe line processing of the data processing device shown in FIG. , FIG. 2(b) is a schematic diagram explaining the basic instruction format, FIG. 3 is a detailed block diagram of the data processing device shown in FIG. 1, and FIG. 4(a) is a schematic diagram explaining the format of the subroutine jump instruction. Schematic diagram shown in Fig. 4(b)
, (C) is a schematic diagram explaining the bit allocation of the load instruction according to the present invention, FIG. 5 is a flowchart explaining the subroutine jump instruction processing procedure according to the present invention, and FIG. Flowchart explaining load instruction processing procedure, Fig. 7~
Fig. 6 is a schematic diagram explaining the allocated bits of the instruction format used, Figs. It is a functional block diagram explaining. In the figure, 1 is an instruction fetch unit, 2 is an instruction decode unit, 3 is a PC calculation unit, 4 is an operand address calculation unit, and 5
1 is a micro ROM section, 6 is a data calculation section, 7 is an external interface section, 8 is an address output circuit, and 9 is a data input/output circuit. Note that the same reference numerals in each figure indicate the same or corresponding parts. Agent Masuo Oiwa (2 other people) (2 bytes) (θ ~ 4A bytes) (a) JSR Address of Figure 〉 N◆l N+2 N+3 Figure byte: N+2-1 Figure byte: N lo Figure byte : N+2-1 Figure byte: N+2-1 Byte 2 N+2 2 in N◆M-1 Figure 12 byte: N+2-1 Figure byte: N+2-1 Byte: N+2 To2◆1 2 in N+2 ・-・・・・ N battle 2 10 ◆ 2-1 Figure byte: Byte : N middle 4-1 Figure byte: N ◆ 2-1 Byte: N ◆ 2 To 2 ◆ l N ◆ 2 ◆ 2 ・・・・・・・ N middle 20th 2-1 Figure byte: Figure 2, Figure byte: Figure 2, Figure 2, Figure E: Command execution stage 1, incident display 21, title of the invention (spontaneous). ) Patent Application No. Sho 3-205584, December 2009 Data Processing Device 5, Full text of the specification to be amended and Drawing 6, Contents of the amendment (1) The entire text of the specification shall be amended as shown in the attached sheet. (2) In the drawings, FIGS. 3, 4(b), (C), 5 and 6 will be corrected as shown in the attached sheet. Above 3. Relationship with the case of the person making the amendment

Claims (1)

【特許請求の範囲】[Claims] 命令のデコードを行う第1のパイプラインステージと、
この第1のパイプラインステージより後段のパイプライ
ンステージとなる複数の第2のパイプラインステージか
らなるパイプライン処理機構を有するデータ処理装置に
おいて、1つの命令を前記第2のパイプラインステージ
に対する1つまたは複数の単位処理コードに分解してデ
コードする分解デコード手段と、この分解デコード手段
によりデコードされた各単位処理コードに基づいて前記
命令に対する複数のアドレス演算を実行するアドレス演
算手段と、このアドレス演算手段により演算された命令
アドレスを前記単位処理コードとして後段の第2のパイ
プラインステージに転送する転送手段とを具備したこと
を特徴とするデータ処理装置。
a first pipeline stage for decoding instructions;
In a data processing device having a pipeline processing mechanism consisting of a plurality of second pipeline stages, which are pipeline stages subsequent to the first pipeline stage, one instruction is sent to the second pipeline stage. or decomposition decoding means for disassembling and decoding into a plurality of unit processing codes, address calculation means for executing a plurality of address operations for the instruction based on each unit processing code decoded by the decomposition decoding means, and the address operation A data processing device comprising: transfer means for transferring an instruction address calculated by the means to a subsequent second pipeline stage as the unit processing code.
JP63205564A 1988-08-18 1988-08-18 Data processing device Expired - Fee Related JPH0769803B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63205564A JPH0769803B2 (en) 1988-08-18 1988-08-18 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63205564A JPH0769803B2 (en) 1988-08-18 1988-08-18 Data processing device

Publications (2)

Publication Number Publication Date
JPH0254335A true JPH0254335A (en) 1990-02-23
JPH0769803B2 JPH0769803B2 (en) 1995-07-31

Family

ID=16508984

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63205564A Expired - Fee Related JPH0769803B2 (en) 1988-08-18 1988-08-18 Data processing device

Country Status (1)

Country Link
JP (1) JPH0769803B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6389932A (en) * 1986-10-03 1988-04-20 Mitsubishi Electric Corp Data processor

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6389932A (en) * 1986-10-03 1988-04-20 Mitsubishi Electric Corp Data processor

Also Published As

Publication number Publication date
JPH0769803B2 (en) 1995-07-31

Similar Documents

Publication Publication Date Title
JP3658072B2 (en) Data processing apparatus and data processing method
US6560697B2 (en) Data processor having repeat instruction processing using executed instruction number counter
US5091853A (en) Chained addressing mode pipelined processor which merges separately decoded parts of a multiple operation instruction
JPH04109336A (en) Data processor
JP2507638B2 (en) Data processing device
JPH03218523A (en) Data processor
JPH02173823A (en) Data processor
US4945511A (en) Improved pipelined processor with two stage decoder for exchanging register values for similar operand instructions
JPH0496825A (en) Data processor
JPH01214932A (en) Data processor
JPH0338725A (en) Data processor and microprocessor
JP3789583B2 (en) Data processing device
JPH0391029A (en) Data processor
US5077659A (en) Data processor employing the same microprograms for data having different bit lengths
JPH04109339A (en) Register number specifying circuit and data processor provided with the circuit
JPH0769806B2 (en) Data processing device
JP2504235B2 (en) Data processing device
JPH0254335A (en) Data processor
JP2522048B2 (en) Microprocessor and data processing device using the same
JP3147884B2 (en) Storage device and information processing device
JP3102399B2 (en) Data processing apparatus and method
JPH0225932A (en) Data processor
JPH0218621A (en) Data processor
JPH0769805B2 (en) Data processing device
JPH0290325A (en) Data processor

Legal Events

Date Code Title Description
S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees