JPH0752402B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JPH0752402B2
JPH0752402B2 JP1305909A JP30590989A JPH0752402B2 JP H0752402 B2 JPH0752402 B2 JP H0752402B2 JP 1305909 A JP1305909 A JP 1305909A JP 30590989 A JP30590989 A JP 30590989A JP H0752402 B2 JPH0752402 B2 JP H0752402B2
Authority
JP
Japan
Prior art keywords
instruction
unit
fetch
decoding
queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1305909A
Other languages
Japanese (ja)
Other versions
JPH03164945A (en
Inventor
善夫 河西
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP1305909A priority Critical patent/JPH0752402B2/en
Publication of JPH03164945A publication Critical patent/JPH03164945A/en
Publication of JPH0752402B2 publication Critical patent/JPH0752402B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータ処理装置に関し、更に詳述すれば、パイ
プライン処理機構を備え、且つ可変長の命令をプログラ
ムデバッグ等のために1命令ずつパイプライン処理機構
で実行するトレースモードの実行が可能なデータ処理装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing device, and more specifically, it is equipped with a pipeline processing mechanism, and variable length instructions are provided one by one for program debugging and the like. The present invention relates to a data processing device capable of executing a trace mode executed by a pipeline processing mechanism.

〔従来の技術〕[Conventional technology]

データ処理装置の処理速度を高速化する目的でパイプラ
イン処理機構が一般的に採用されている。
A pipeline processing mechanism is generally adopted for the purpose of increasing the processing speed of a data processing device.

第2図は従来の一般的なパイプライン処理機構を有する
データ処理装置の要部の構成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of a main part of a data processing device having a conventional general pipeline processing mechanism.

図中、参照符号1は命令フェッチ部であり、図示しない
命令メモリからデータバス6を介して命令コードをフェ
ッチする。
In the figure, reference numeral 1 is an instruction fetch unit, which fetches an instruction code from an instruction memory (not shown) via the data bus 6.

命令フェッチ部1には、フェッチされた命令コードを一
時的に格納する命令キュー11と、命令フェッチのための
制御を実行する命令フェッチ制御回路12とが含まれてい
る。
The instruction fetch unit 1 includes an instruction queue 11 that temporarily stores the fetched instruction code, and an instruction fetch control circuit 12 that executes control for instruction fetch.

2は命令デコード部であり、命令キュー11に格納されて
いる命令コードをデコードし、その結果を命令実行部3
に与える。
An instruction decoding unit 2 decodes the instruction code stored in the instruction queue 11 and outputs the result to the instruction executing unit 3
Give to.

命令実行部3は命令コードのデコード結果に従って実際
に命令を実行する。
The instruction execution unit 3 actually executes the instruction according to the decoding result of the instruction code.

このような従来のデータ処理装置の動作は以下の如くで
ある。
The operation of such a conventional data processing device is as follows.

命令フェッチ部1は命令フェッチ制御回路12の制御に従
って、図示しない命令メモリからデータバス6を介して
命令コードをフェッチし、命令キュー11に格納する。
Under the control of the instruction fetch control circuit 12, the instruction fetch unit 1 fetches an instruction code from an instruction memory (not shown) via the data bus 6 and stores it in the instruction queue 11.

命令デコード部2は、命令キュー11に格納されている命
令コードを取出してデコードし、そのデコード結果を命
令実行部3へ出力する。
The instruction decoding unit 2 fetches and decodes the instruction code stored in the instruction queue 11, and outputs the decoding result to the instruction executing unit 3.

命令実行部3は命令デコード部2から与えられたデコー
ド結果に従って演算を実行し、必要に応じて演算結果を
その格納先のアドレスをアドレスバス7へ、また演算結
果のデータをデータバス6へ出力することにより、メモ
リ等に書込む。
The instruction execution unit 3 executes an operation in accordance with the decoding result given from the instruction decoding unit 2, and outputs the operation result to the address bus 7 as the storage destination address and the operation result data to the data bus 6 as necessary. By doing so, the data is written in the memory or the like.

このように、パイプライン処理機構を有するデータ処理
装置では、それぞれの命令で指定される処理は、フェッ
チ,デコード,実行の3ステップに分解され、それぞれ
のステップが順次的に処理されることにより実行され
る。そして、それぞれのステップでの処理は並列実行可
能であるので、たとえば第1の命令が命令実行部3にお
いて処理されている間に第2の命令が命令デコード部2
においてデコードされ、第3の命令が命令フェッチ部1
において命令メモリからフェッチされるというように、
複数の命令をパイプライン処理機構で同時的に並列実行
することが可能になる。
As described above, in the data processing device having the pipeline processing mechanism, the processing specified by each instruction is decomposed into three steps of fetch, decode, and execute, and the processing is executed by sequentially processing each step. To be done. Since the processing in each step can be executed in parallel, for example, while the first instruction is being processed by the instruction execution unit 3, the second instruction is processed by the instruction decoding unit 2.
And the third instruction is decoded in the instruction fetch unit 1
Is fetched from the instruction memory at
It becomes possible to simultaneously execute a plurality of instructions in parallel by the pipeline processing mechanism.

従って、第2図に示した3ステップのパイプライン処理
機構では、パイプライン処理機構を有さないデータ処理
装置に比して一般的には3倍の処理能力を発揮すること
になる。
Therefore, the three-step pipeline processing mechanism shown in FIG. 2 generally exhibits a processing capacity three times as high as that of the data processing apparatus having no pipeline processing mechanism.

また、メモリアクセス、即ちメモリからの命令,データ
等の読出し及びメモリへのデータの書込みはパイプライ
ン処理機構での処理に比して一般的に低速である。この
ため、命令キュー11によりメモリから命令コードをフェ
ッチする速度と、命令デコード部2において命令コード
を処理する速度との差を吸収するために、命令キュー11
では可能な限り、具体的には命令キュー11に空きがあり
データバス6が使用可能な限り命令メモリから命令コー
ドの先取り(プリフェッチ)を行う。
Further, memory access, that is, reading of instructions and data from the memory and writing of data to the memory are generally slower than the processing by the pipeline processing mechanism. Therefore, in order to absorb the difference between the speed of fetching the instruction code from the memory by the instruction queue 11 and the speed of processing the instruction code in the instruction decoding unit 2, the instruction queue 11
Then, as much as possible, specifically, as long as the instruction queue 11 has a free space and the data bus 6 can be used, the instruction code is prefetched (prefetched) from the instruction memory.

ところで、上述のようなパイプライン処理機構を有する
データ処理装置においてはプログラムデバッグ等の目的
で、パイプライン処理機構へ1命令のみを取込んで順次
実行させることがある。このような命令の処理状態はト
レースモードと称され、一方前述したパイプライン処理
機構の各ステップによるパイプライン処理を行う状態は
ノーマルモードと称される。
By the way, in the data processing device having the above pipeline processing mechanism, only one instruction may be fetched into the pipeline processing mechanism and executed sequentially for the purpose of program debugging. The processing state of such an instruction is called a trace mode, while the state in which pipeline processing by each step of the pipeline processing mechanism described above is performed is called a normal mode.

トレースモードの場合、命令フェッチ部1はノーマルモ
ード時と同様に、命令メモリから命令コードをフェッチ
して命令キュー11に格納する。
In the trace mode, the instruction fetch unit 1 fetches the instruction code from the instruction memory and stores it in the instruction queue 11 as in the normal mode.

命令デコード部2は命令キュー11に格納されている命令
コードを取出してデコードし、デコード結果を命令実行
部3へ出力する。この後、命令デコード部2はこの命令
のデコード結果に対する命令実行部3での処理が完了す
るまで他の命令のデコード処理は行わない。
The instruction decoding unit 2 takes out the instruction code stored in the instruction queue 11, decodes it, and outputs the decoding result to the instruction executing unit 3. After that, the instruction decoding unit 2 does not perform decoding processing of other instructions until the processing of the decoding result of this instruction by the instruction executing unit 3 is completed.

命令実行部3は命令デコード部2から与えられた命令コ
ードのデコード結果に従って指定された演算を実行し、
必要に応じて演算結果をメモリに書込むことはノーマル
モード時と同様である。
The instruction execution unit 3 executes the designated operation according to the decoding result of the instruction code given from the instruction decoding unit 2,
Writing the operation result to the memory as needed is the same as in the normal mode.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

以上のような従来のパイプライン処理機構を有するデー
タ処理装置では、命令コードの長さが一定でない命令
(可変長命令)を取り扱う場合、命令を命令デコード部
2でデコードした後でないとその命令長が判明しない。
このため、命令キュー11への命令コードの取込みはトレ
ースモード時においてもノーマルモード時と同様に行わ
れている。
In the data processing device having the conventional pipeline processing mechanism as described above, when handling an instruction (variable length instruction) in which the instruction code length is not constant, the instruction length must be decoded by the instruction decoding unit 2. Is not known.
Therefore, the fetching of the instruction code into the instruction queue 11 is performed in the trace mode as in the normal mode.

このように、トレースモード時において命令キュー11へ
の命令コードの取込みがノーマルモード時と同様に行わ
れる従来のデータ処理装置では、プログラムにバグがあ
って命令実行部3において実行された結果にエラーが発
生した場合、実行されない命令に対するメモリアクセス
が行われているので、エラーを発生した命令を特定する
ことが容易ではなく、プログラムデバッグに困難を伴
う。
As described above, in the conventional data processing device in which the instruction code is fetched into the instruction queue 11 in the trace mode in the same manner as in the normal mode, there is a bug in the program and the result executed by the instruction execution unit 3 is erroneous. If the error occurs, the memory access is being performed to the instruction that is not executed, so it is not easy to identify the instruction that caused the error, and it is difficult to debug the program.

本発明はこのような事情に鑑みてなされたものであり、
トレースモード時にはパイプライン処理機構上で実行さ
れる1命令分のみを命令キュー11に格納して不必要なメ
モリアクセスを行わないことにより、命令実行部でエラ
ーが発生したような場合のプログラムデバッグを容易に
したデータ処理装置の提供を目的とする。
The present invention has been made in view of such circumstances,
In the trace mode, only one instruction executed on the pipeline processing mechanism is stored in the instruction queue 11 and unnecessary memory access is not performed to debug the program when an error occurs in the instruction execution unit. An object is to provide an easy data processing device.

〔課題を解決するための手段〕[Means for Solving the Problems]

本発明のデータ処理装置は、命令を1命令づつパイプラ
イン処理機構で処理するトレースモード時には、命令デ
コード部でのデコード結果に応じて命令フェッチ部に命
令フェッチの1単位づつ命令コードをフェッチさせる制
御回路を備えている。
In the trace mode in which instructions are processed one instruction at a time by the pipeline processing mechanism, the data processing apparatus controls the instruction fetch section to fetch an instruction code for each unit of instruction fetch according to the decoding result in the instruction decoding section. It has a circuit.

〔作用〕[Action]

本発明のデータ処理装置では、トレースモード時には命
令デコード部でのデコード結果に応じて必要な分だけ命
令コードがフェッチされるので、1命令分に対応する命
令コードのみが命令フェッチ部にフェッチされ格納され
る。
In the data processing device of the present invention, in the trace mode, as many instruction codes as necessary are fetched according to the decoding result in the instruction decoding unit, so only the instruction code corresponding to one instruction is fetched and stored in the instruction fetch unit. To be done.

〔発明の実施例〕Example of Invention

以下、本発明をその実施例を示す図面に基づいて詳述す
る。
Hereinafter, the present invention will be described in detail with reference to the drawings showing an embodiment thereof.

なお、本発明のデータ処理装置で取り扱う命令はハーフ
ワード単位の可変長とする。1ワードとは、命令コード
の長さを表すためのある長さの単位(たとえば16ビット
=2バイト等)である。
The instructions handled by the data processing device of the present invention have a variable length in halfword units. One word is a unit of a certain length (for example, 16 bits = 2 bytes) for indicating the length of the instruction code.

また、それぞれの命令は、実行すべき演算を指定するた
めのオペレーションコードと、演算の対象となるデータ
に関する情報を表すオペランドとにて構成されている。
オペレーションコードは1ハーフワード,オペランドは
0乃至2ハーフワードが指定可能であり、従って命令長
は1ハーフワードから3ハーフワードまでの間になる。
Further, each instruction is composed of an operation code for designating an operation to be executed and an operand representing information regarding data to be operated.
The operation code can specify 1 halfword and the operand can specify 0 to 2 halfwords. Therefore, the instruction length is between 1 halfword and 3 halfwords.

第1図は本発明に係るデータ処理装置の要部の一構成例
を示すブロック図である。
FIG. 1 is a block diagram showing a configuration example of a main part of a data processing device according to the present invention.

図中、参照符号1は命令フェッチ部であり、図示しない
命令メモリからデータバス6を介して命令コードをフェ
ッチする。
In the figure, reference numeral 1 is an instruction fetch unit, which fetches an instruction code from an instruction memory (not shown) via the data bus 6.

命令フェッチ部1には、フェッチされた命令コードを4
ワード(8ハーフワード)まで一時的に格納可能な命令
キュー11と、命令フェッチのための制御を実行する命令
フェッチ制御回路12と、命令フェッチ切換回路13とが含
まれている。なお、命令キュー11は破線にて8等分され
ているが、これは各区画がそれぞれ1ハーフワードを格
納する容量であることを表している。
The instruction fetch unit 1 stores the fetched instruction code in 4
An instruction queue 11 that can temporarily store up to 8 words (8 half words), an instruction fetch control circuit 12 that executes control for instruction fetch, and an instruction fetch switching circuit 13 are included. The instruction queue 11 is divided into eight equal parts by a broken line, which means that each partition has a capacity of storing one half word.

命令フェッチ部1は、後述する命令実行部3から出力さ
れる命令処理開始信号32が与えられると処理を開始す
る。
The instruction fetch unit 1 starts processing when an instruction processing start signal 32 output from an instruction execution unit 3 described later is given.

また命令フェッチ切換回路13には、命令キュー11から通
常フェッチ要求信号15と命令実行部3からトレースモー
ド信号31と、後述する命令デコード部2からトレースモ
ードフェッチ要求信号14とが与えられており、これらの
信号に従って命令フェッチ制御回路12に指示を与える。
The instruction fetch switching circuit 13 is supplied with a normal fetch request signal 15 from the instruction queue 11, a trace mode signal 31 from the instruction executing section 3, and a trace mode fetch request signal 14 from the instruction decoding section 2 which will be described later. The instruction fetch control circuit 12 is instructed according to these signals.

具体的には、命令フェッチ切換回路13は二つの2入力AN
Dゲート21,22と一つの2入力ORゲート23とで構成されて
いる。
Specifically, the instruction fetch switching circuit 13 has two 2-input ANs.
It is composed of D gates 21 and 22 and one 2-input OR gate 23.

第1のANDゲート21の一方の入力には通常フェッチ要求
信号15が、他方の入力にはトレースモード信号31の反転
信号が与えられている。第2のANDゲート22の一方の入
力にはトレースモードフェッチ要求信号14が、他方の入
力にはトレースモード信号31が与えられている。そし
て、両ANDゲート21,22の出力がORゲート23の両入力に与
えられ、ORゲート23の出力が命令フェッチ制御回路12に
与えられている。
The normal fetch request signal 15 is applied to one input of the first AND gate 21, and the inverted signal of the trace mode signal 31 is applied to the other input. The trace mode fetch request signal 14 is applied to one input of the second AND gate 22, and the trace mode signal 31 is applied to the other input. The outputs of the AND gates 21 and 22 are given to both inputs of the OR gate 23, and the output of the OR gate 23 is given to the instruction fetch control circuit 12.

従って、トレースモード信号31が無効(ローレベル)で
ある場合、第1のANDゲート21がイネーブル状態になる
ので、通常フェッチ要求信号15が有効(ハイレベル)に
なればこれが命令フェッチ制御回路12に与えられる。一
方、トレースモード信号31が有効である場合、第2のAN
Dゲート22がイネーブル状態になるので、トレースモー
ドフェッチ要求信号14が有効になればこれが命令フェッ
チ制御回路12に与えられる。
Therefore, when the trace mode signal 31 is invalid (low level), the first AND gate 21 is enabled. Therefore, when the normal fetch request signal 15 is valid (high level), this is sent to the instruction fetch control circuit 12. Given. On the other hand, when the trace mode signal 31 is valid, the second AN
Since the D gate 22 is enabled, when the trace mode fetch request signal 14 becomes valid, it is given to the instruction fetch control circuit 12.

2は命令デコード部であり、命令キュー11に格納されて
いる命令コードをデコードし、その結果を命令実行部3
に与える。また、命令デコード部2には命令実行部3か
らトレースモード信号31及び命令処理開始信号32も与え
られており、これらの信号及び自身のデコード処理状態
に応じてトレースモード時には、命令フェッチ部1に対
して1ワード単位でのフェッチを要求するトレースモー
ドフェッチ要求信号14を出力する。
An instruction decoding unit 2 decodes the instruction code stored in the instruction queue 11 and outputs the result to the instruction executing unit 3
Give to. Further, the instruction decoding unit 2 is also provided with a trace mode signal 31 and an instruction processing start signal 32 from the instruction executing unit 3, and the instruction fetch unit 1 is supplied to the instruction fetch unit 1 in the trace mode according to these signals and its own decoding processing state. On the other hand, the trace mode fetch request signal 14 for requesting fetch in 1-word units is output.

命令実行部3は命令コードのデコード結果に従って実際
に命令を実行する。また、命令フェッチ部1及び命令デ
コード部2に対してトレースモード信号31及び命令処理
開始信号32を出力する。
The instruction execution unit 3 actually executes the instruction according to the decoding result of the instruction code. It also outputs a trace mode signal 31 and an instruction processing start signal 32 to the instruction fetch unit 1 and the instruction decoding unit 2.

このように構成された本発明のデータ処理装置の動作は
以下の如くである。
The operation of the data processing apparatus of the present invention thus configured is as follows.

命令実行部3から命令処理開始信号32が出力されると、
これが命令フェッチ部1及び命令デコード部2に与えら
れて処理が開始される。
When the instruction processing start signal 32 is output from the instruction execution unit 3,
This is given to the instruction fetch unit 1 and the instruction decode unit 2 to start the processing.

ノーマルモードにおいてはトレースモード信号31は無効
状態にされる。そして、命令フェッチ部1は命令フェッ
チ制御回路12の制御に従って、図示しない命令メモリか
らデータバス6を介して命令コードをフェッチし、命令
キュー11に格納する。この命令フェッチ部1による命令
コードのフェッチは、命令キュー11に空きがある限り、
データバス6が空いている時間を利用して1ワード単位
で反復される。
In the normal mode, the trace mode signal 31 is disabled. Then, under the control of the instruction fetch control circuit 12, the instruction fetch unit 1 fetches an instruction code from an instruction memory (not shown) via the data bus 6 and stores it in the instruction queue 11. This instruction fetch unit 1 fetches an instruction code as long as the instruction queue 11 has a free space.
It is repeated word by word using the time when the data bus 6 is idle.

具体的には、命令キュー11に空きがあれば命令キュー11
は命令フェッチ切換回路13に対して通常フェッチ要求信
号15を出力するが、トレースモード信号31が無効である
ので、命令フェッチ切換回路13は通常フェッチ要求信号
15を選択して命令フェッチ制御回路12へ与える。これに
より命令フェッチ制御回路12は、命令キュー11から通常
フェッチ要求信号15が出力される都度、1ワード単位で
命令コードをフェッチし、命令キュー11に格納する。こ
の際、命令キュー11に更に空きがあれば、命令キュー11
は再度通常フェッチ要求信号15を出力するので、命令フ
ェッチ制御回路12は更に1ワードをフェッチする。
Specifically, if there is a free space in the instruction queue 11, the instruction queue 11
Outputs the normal fetch request signal 15 to the instruction fetch switching circuit 13, but since the trace mode signal 31 is invalid, the instruction fetch switching circuit 13 outputs the normal fetch request signal.
15 is selected and given to the instruction fetch control circuit 12. As a result, the instruction fetch control circuit 12 fetches the instruction code in units of one word and stores it in the instruction queue 11 every time the normal fetch request signal 15 is output from the instruction queue 11. At this time, if there is more free space in the instruction queue 11, the instruction queue 11
Outputs the normal fetch request signal 15 again, the instruction fetch control circuit 12 further fetches one word.

命令デコード部2は、命令キュー11に格納されている命
令コードを取出してデコードし、そのデコード結果を命
令実行部3へ出力する。
The instruction decoding unit 2 fetches and decodes the instruction code stored in the instruction queue 11, and outputs the decoding result to the instruction executing unit 3.

この命令デコード部2による命令コードのデコードは、
まず命令キュー11からオペレーションコードを1ハーフ
ワード取出してデコードし、オペランドのワード数を決
定する。次に、必要なオペランドを命令キュー11から取
出してデコードし、先のオペレーションコードのデコー
ド結果と併せて命令実行部3へ出力する。
Decoding of the instruction code by the instruction decoding unit 2 is
First, one halfword is fetched from the instruction queue 11 and decoded to determine the number of words in the operand. Next, the necessary operands are fetched from the instruction queue 11, decoded, and output to the instruction execution unit 3 together with the decoding result of the previous operation code.

命令実行部3は命令デコード部2から与えられたデコー
ド結果に従って演算を実行し、必要に応じて演算結果を
その格納先のアドレスをアドレスバス7へ、また演算結
果のデータをデータバス6へ出力することにより、メモ
リ等に書込む。
The instruction execution unit 3 executes an operation in accordance with the decoding result given from the instruction decoding unit 2, and outputs the operation result to the address bus 7 as the storage destination address and the operation result data to the data bus 6 as necessary. By doing so, the data is written in the memory or the like.

このように、本発明のデータ処理装置では、ノーマルモ
ード時に命令フェッチ部1,命令デコード部2及び命令実
行部3がそれぞれ独立して処理を実行するので、たとえ
ば第1の命令が命令実行部3において処理されている間
に第2の実行が命令デコード部2においてデコードさ
れ、第3の命令が命令フェッチ部1において命令メモリ
からフェッチされるというように、複数の命令をパイプ
ライン処理機構の中で同時的に実行することが可能にな
る。
As described above, in the data processing device of the present invention, the instruction fetch unit 1, the instruction decoding unit 2, and the instruction execution unit 3 independently execute the processing in the normal mode, so that, for example, the first instruction is executed by the instruction execution unit 3. A plurality of instructions in the pipeline processing mechanism such that the second execution is decoded in the instruction decoding unit 2 while the third instruction is fetched from the instruction memory in the instruction fetching unit 1 while being processed in. It becomes possible to execute simultaneously.

従って、第1図に示した3ステップのパイプライン処理
機構では、パイプライン処理機構を有さないデータ処理
装置に比して一般的には3倍の処理能力を発揮すること
になる。
Therefore, the three-step pipeline processing mechanism shown in FIG. 1 generally exhibits a processing capacity three times as high as that of a data processing apparatus having no pipeline processing mechanism.

トレースモード時においては命令実行部3から出力され
るトレースモード信号31が有効になる。このトレースモ
ード信号31が有効になることにより、命令フェッチ切換
回路13は命令デコード部2から出力されるトレースモー
ドフェッチ要求信号14を選択して命令フェッチ制御回路
12へ与える。
In the trace mode, the trace mode signal 31 output from the instruction executing section 3 becomes valid. When the trace mode signal 31 becomes valid, the instruction fetch switching circuit 13 selects the trace mode fetch request signal 14 output from the instruction decoding unit 2 to select the instruction fetch control circuit.
Give to 12.

命令フェッチ部1はノーマルモード時と同様に命令メモ
リから命令コードをフェッチして命令キュー11に格納す
るが、この際の制御はトレースモード信号31により司ら
れており、トレースモードフェッチ要求信号14が一度有
効になる都度、命令フェッチ制御回路12は1ワードのみ
をフェッチして命令キュー11に格納する。
The instruction fetch unit 1 fetches an instruction code from the instruction memory and stores it in the instruction queue 11 as in the normal mode. The control at this time is controlled by the trace mode signal 31, and the trace mode fetch request signal 14 Each time it becomes valid, the instruction fetch control circuit 12 fetches only one word and stores it in the instruction queue 11.

命令デコード部2は命令キュー11に格納されている命令
コードの内のオペレーションコード部分に相当する1ハ
ーフワードを取出してデコードする。デコード結果が2
ハーフワードのオペランドを要求している場合には、命
令キュー11には1ハーフワードしか残っていない(最初
にフェッチされたのは1ワードであり、そこからオペレ
ーションコード分の1ハーフワードが既に命令デコード
部2に取込まれている)ので、命令デコード部2は再度
トレースモードフェッチ要求信号14を出力する。
The instruction decoding unit 2 takes out and decodes one halfword corresponding to the operation code portion of the instruction code stored in the instruction queue 11. The decoding result is 2
When requesting a halfword operand, only one halfword remains in the instruction queue 11 (the first fetched is one word, from which one halfword for the operation code has already been instructed). The instruction decoding unit 2 outputs the trace mode fetch request signal 14 again.

トレースモードフェッチ要求信号14が再度出力されるこ
とにより、命令フェッチ部1は次の1ワードをフェッチ
して命令キュー11に格納する。
When the trace mode fetch request signal 14 is output again, the instruction fetch unit 1 fetches the next one word and stores it in the instruction queue 11.

これで命令キュー11には3ハーフワード分が格納されて
いるので、命令デコード部2はその内の2ハーフワード
分を取出してデコードし、先のオペレーションコードの
デコード結果と併せて命令実行部3へ出力する。
Now, since three halfwords are stored in the instruction queue 11, the instruction decoding unit 2 extracts and decodes two halfwords of the halfwords, and the instruction execution unit 3 along with the decoding result of the previous operation code. Output to.

また命令デコード部2は、命令実行部3から出力されて
いるトレースモード信号31が有効である場合には、1命
令のデコードが完了した後、そのデコード結果に対する
命令実行部3での処理が完了するまで他の命令コードの
デコード処理は行わない。
When the trace mode signal 31 output from the instruction executing unit 3 is valid, the instruction decoding unit 2 completes the decoding of one instruction, and then the processing of the decoded result by the instruction executing unit 3 is completed. Until this is done, the decode processing of other instruction codes is not performed.

命令実行部3は命令デコード部2から与えられた命令コ
ードのデコード結果に従って指定された演算を実行し、
必要に応じて演算結果をメモリに書込むことはノーマル
モード時と同様である。
The instruction execution unit 3 executes the designated operation according to the decoding result of the instruction code given from the instruction decoding unit 2,
Writing the operation result to the memory as needed is the same as in the normal mode.

そして、1命令についての実行処理が完了した場合には
命令処理開始信号32を出力する。この命令処理開始信号
32が出力されることにより、命令フェッチ部1及び命令
デコード部2は上述の如きトレースモードでの処理を再
度実行する。
When the execution process for one instruction is completed, the instruction processing start signal 32 is output. This instruction processing start signal
When 32 is output, the instruction fetch unit 1 and the instruction decoding unit 2 execute the processing in the trace mode as described above again.

なお、上記実施例ではパイプライン処理機構は命令フェ
ッチ部1,命令デコード部2及び命令実行部3の3ステッ
プで構成されているが、更に多くのステップで構成され
ているデータ処理装置に対しても本発明は適用可能であ
る。
In the above embodiment, the pipeline processing mechanism is composed of the instruction fetch unit 1, the instruction decoding unit 2 and the instruction execution unit 3 in three steps. The present invention is also applicable.

〔発明の効果〕〔The invention's effect〕

以上のように本発明のデータ処理装置では、ノーマルモ
ード時には命令フェッチ部,命令デコード部及び命令実
行部が独立に並列動作して複数の命令をパイプライン処
理する。またトレースモード時には1命令の命令コード
のみをフェッチしてデコードし、実行する。このため、
必要なメモリアクセスのみが実行されて不必要なメモリ
アクセスは行われないので、プログラムデバッグが容易
になる。
As described above, in the data processing device of the present invention, in the normal mode, the instruction fetch unit, the instruction decoding unit, and the instruction execution unit independently operate in parallel to pipeline a plurality of instructions. In the trace mode, only the instruction code of one instruction is fetched, decoded, and executed. For this reason,
Since only necessary memory accesses are executed and unnecessary memory accesses are not performed, program debugging becomes easy.

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

第1図は本発明に係るデータ処理装置の一構成例を示す
ブロック図、第2図は従来のパイプライン処理機構を有
するデータ処理装置の構成例を示すブロック図である。 1……命令フェッチ部、2……命令デコード部、3……
命令実行部、11……命令キュー、12……命令フェッチ制
御回路、13……命令フェッチ切換回路 なお、各図中同一符号は同一又は相当部分を示す。
FIG. 1 is a block diagram showing a configuration example of a data processing device according to the present invention, and FIG. 2 is a block diagram showing a configuration example of a data processing device having a conventional pipeline processing mechanism. 1 ... Instruction fetch section, 2 ... Instruction decode section, 3 ...
Instruction execution unit, 11 ... Instruction queue, 12 ... Instruction fetch control circuit, 13 ... Instruction fetch switching circuit In the drawings, the same reference numerals indicate the same or corresponding portions.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】可変長の命令を所定の単位に分割して先取
りする命令フェッチ部と、該命令フェッチ部が先取りし
た命令を一時的に格納する複数単位の容量の記憶手段
と、該記憶手段に格納されている命令をデコードする命
令デコード部と、該命令デコード部によるデコード結果
に従って命令を実行する命令実行部とを有するパイプラ
イン処理機構により命令をパイプライン処理するデータ
処理装置において、 前記パイプライン処理機構により1命令の処理が完了し
た後に次の命令の処理を開始するトレースモード時に、
前記記憶手段に命令の1単位を格納し、その格納内容に
ついての前記命令デコード部のデコード結果に応じて前
記命令フェッチ部に前記命令の続きを1単位ずつフェッ
チさせる制御回路を備えたことを特徴とするデータ処理
装置。
1. An instruction fetch unit that divides a variable-length instruction into predetermined units and prefetches it, a storage unit having a plurality of units of capacity for temporarily storing the instructions prefetched by the instruction fetch unit, and the storage unit. In an instruction decoding unit for decoding an instruction stored in the instruction processing unit and an instruction execution unit for executing the instruction according to the decoding result of the instruction decoding unit, In the trace mode in which the processing of the next instruction is started after the processing of one instruction is completed by the line processing mechanism,
The memory means stores one unit of an instruction, and the instruction fetch unit is provided with a control circuit that causes the instruction fetch unit to fetch the continuation of the instruction one unit at a time according to a decoding result of the stored content of the instruction decoding unit. And data processing device.
JP1305909A 1989-11-24 1989-11-24 Data processing device Expired - Lifetime JPH0752402B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1305909A JPH0752402B2 (en) 1989-11-24 1989-11-24 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1305909A JPH0752402B2 (en) 1989-11-24 1989-11-24 Data processing device

Publications (2)

Publication Number Publication Date
JPH03164945A JPH03164945A (en) 1991-07-16
JPH0752402B2 true JPH0752402B2 (en) 1995-06-05

Family

ID=17950762

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1305909A Expired - Lifetime JPH0752402B2 (en) 1989-11-24 1989-11-24 Data processing device

Country Status (1)

Country Link
JP (1) JPH0752402B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7975272B2 (en) * 2006-12-30 2011-07-05 Intel Corporation Thread queuing method and apparatus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0812601B2 (en) * 1985-12-20 1996-02-07 日本電気株式会社 Data processing device
JPS63240634A (en) * 1987-03-27 1988-10-06 Nec Corp Information processor

Also Published As

Publication number Publication date
JPH03164945A (en) 1991-07-16

Similar Documents

Publication Publication Date Title
US5235686A (en) Computer system having mixed macrocode and microcode
JP2003510682A5 (en)
JPS6339931B2 (en)
US5502827A (en) Pipelined data processor for floating point and integer operation with exception handling
JP3707581B2 (en) Data processing system having self-aligned stack pointer and method thereof
US4747045A (en) Information processing apparatus having an instruction prefetch circuit
JPH03233630A (en) Information processor
EP0279953B1 (en) Computer system having mixed macrocode and microcode instruction execution
JPH0752402B2 (en) Data processing device
JPH0769806B2 (en) Data processing device
US5463747A (en) Microprogram data processor processing operand address calculation and instruction execution with common hardware
JP2532560B2 (en) Data processing device for high-performance exception handling
JPH0241770B2 (en)
US6289439B1 (en) Method, device and microprocessor for performing an XOR clear without executing an XOR instruction
JPS6221131B2 (en)
JP3102399B2 (en) Data processing apparatus and method
JP4702004B2 (en) Microcomputer
JPH087713B2 (en) Microprocessor
JP2545594B2 (en) Operand data prefetching method
JP2867798B2 (en) Advance control unit
JPH07191879A (en) Microprocessor provided with executing function of instruction for debugging and debugging method
JPS6149695B2 (en)
JPH0150934B2 (en)
JPS6047617B2 (en) information processing equipment
JPH0769805B2 (en) Data processing device