JPH03164945A - Data processor - Google Patents

Data processor

Info

Publication number
JPH03164945A
JPH03164945A JP1305909A JP30590989A JPH03164945A JP H03164945 A JPH03164945 A JP H03164945A JP 1305909 A JP1305909 A JP 1305909A JP 30590989 A JP30590989 A JP 30590989A JP H03164945 A JPH03164945 A JP H03164945A
Authority
JP
Japan
Prior art keywords
instruction
fetch
unit
decoding
trace mode
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
JP1305909A
Other languages
Japanese (ja)
Other versions
JPH0752402B2 (en
Inventor
Yoshio Kasai
河西 善夫
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

Landscapes

  • Advance Control (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To facilitate the program debugging operations by storing only a single instruction into an instruction queue in a trace mode and evading the unnecessary memory accesses. CONSTITUTION:In a trace mode a trace mode signal 31 outputted from an instruction executing part 3 is validated, and an instruction fetch switching circuit 13 selects a trace mode fetch request signal 14 received from an instruc tion decoding part 2 and gives it to an instruction fetch control circuit 12. The circuit 12 fetches only a single word and stores it in an instruction queue 11 every time the signal 14 is validated. Thus just the necessary number of instruction codes are fetched in the trace mode in response to the decoding result of the part 2. As a result, only the instruction codes corresponding to a single instruction are fetched by an instruction fetching part and stored there. Thus the program debugging operations can be facilitated.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータ処理装置に関し、更に詳述すれば、パイ
プライン処理機構を備え、且つ可変長の命令をプログラ
ムデバソグ等のために1命令ずつパイプライン処理機構
で実行するトレースモートの実行が可能なデータ処理装
置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a data processing device, and more specifically, the present invention relates to a data processing device that is equipped with a pipeline processing mechanism and that processes variable length instructions into one instruction for program debugging, etc. 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 employed to increase the processing speed of a data processing device.

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

図中、参照符号lは命令フェッチ部であり、図示しない
命令メモリからデータバス6を介して命令コードをフェ
ッチする・ 命令フェッチ部1には、フェッチされた命令コードを一
時的に格納する命令キュー11と、命令フェッチのため
の制御を実行する命令フェッチ制御回路12とが含まれ
ている。
In the figure, reference numeral 1 is an instruction fetch unit that fetches instruction codes from an instruction memory (not shown) via a data bus 6.The instruction fetch unit 1 includes an instruction queue that temporarily stores the fetched instruction codes. 11, and an instruction fetch control circuit 12 that executes control for fetching instructions.

2は命令デコード部であり、命令キュー11に格納され
ている命令コードをデコードし、その結果を命令実行部
3に与える。
Reference numeral 2 denotes an instruction decoding section, which decodes the instruction code stored in the instruction queue 11 and provides the result to the instruction execution section 3.

命令実行部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に格納する
The instruction fetch unit 1 fetches an instruction code from an instruction memory (not shown) via the data bus 6 under the control of the instruction fetch control circuit 12, and stores it in the instruction queue 11.

命令5幻J−ド部2は、命令;1−ニー11に格納され
ている命令コードを取出してデコードし、そのデコード
結果を命令実行部3へ出力する。
The instruction 5 phantom J-code unit 2 takes out the instruction code stored in the instruction 1-knee 11, decodes it, and outputs the decoding result to the instruction execution unit 3.

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

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

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

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

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

トレースモードの場合、命令フェッチ部lはノーマルモ
ード時と同様に、命令メモリから命令コドをフェッチし
て命令キュー11に格納する。
In the trace mode, the instruction fetch unit l fetches an 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 section 2 takes out the instruction code stored in the instruction queue 11, decodes it, and outputs the decoding result to the instruction execution section 3. Thereafter, the instruction decoding section 2 does not decode other instruction codes until the instruction execution section 3 completes processing for this decoding result.

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

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

以上のような従来のパイプライン処理機構を有するデー
タ処理装置では、命令コードの長さが−・定でない命令
(可変長命令)を取り扱う場合、命令を命令デコード部
2でデ=+−1” した後でないとその命令長が判明し
ない。このため、命令キュー11への命令コードの取込
みはトレースモード時においてもノーマルモート時と同
様に行われている。
In a data processing device having a conventional pipeline processing mechanism as described above, when handling an instruction whose instruction code length is not fixed (variable length instruction), the instruction decoding unit 2 decodes the instruction by decoding the instruction by decoding the instruction by decoding it in the instruction decoding unit 2. The length of the instruction cannot be known until after the instruction is executed.For this reason, instruction codes are taken into the instruction queue 11 in the trace mode in the same way as in the normal mode.

このように、トレースモート時において命令キュー11
への命令コードの取込みがノーマルモード時と同様に行
われる従来のデータ処理装置では、プログラムにバグが
あって命令実行部3において実行された結果にエラーが
発生した場合、命令キュー11には複数の命令コードが
格納されているので、エラーを発生した命令を特定する
ことが容易ではなく、プログラムデバノグに困難を伴う
In this way, during trace mode, the instruction queue 11
In a conventional data processing device in which instruction codes are fetched in the same way as in normal mode, if there is a bug in the program and an error occurs as a result of execution in the instruction execution unit 3, multiple instructions are stored in the instruction queue 11. instruction codes are stored, so it is not easy to identify the instruction that caused the error, and it is difficult to debug the program.

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

〔課題を解決するための手段〕[Means to solve the problem]

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

〔作用〕[Effect]

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

〔発明の実施例〕[Embodiments of the invention]

以下、本発明をその実施例を示す図面に基づいて詳述す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below based on drawings showing embodiments thereof.

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

また、それぞれの命令は、実行ずべき演算を指定するた
めのオペレーションコードと、演算の対象となるデータ
に関する情報を表すオペランドとにて構成されている。
Further, each instruction is composed of an operation code for specifying an operation to be executed, and an operand representing information regarding data to be subjected to the operation.

オペレーションコードは1ハーフワード、オペランドは
O乃至2ハーフワトが指定可能であり、従って命令長は
lハーフワードから3ハーフワードまでの間になる。
The operation code can be specified as 1 halfword, the operand can be specified as O to 2 halfwords, and therefore the instruction length is between 1 halfword and 3 halfwords.

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

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

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

命令フェッチ部lは、後述する命令実行部3から出力さ
れる白金処理開始信号32が与えられると処理を開始す
る。
The instruction fetch unit 1 starts processing upon receiving a platinum processing start signal 32 output from the instruction execution unit 3, which will be described later.

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

具体的には、命令フェッチ切換回路13は二つの2人力
ANDゲート21.22と一つの2人力NORゲート2
3とで構成されている。
Specifically, the instruction fetch switching circuit 13 includes two 2-man-powered AND gates 21 and 22 and one 2-man-powered NOR gate 2.
It is composed of 3.

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

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

2は命令デコード部であり、命令キュー11に格納され
ている命令コードをデコートし、その結果を命令実行部
3に与える。また、命令デコード部2には命令実行部3
からトレースモート信号31及び命令処理開始信号32
も与えられており、これらの信号及び自身のデコード処
理状態に応じてトレースモード時には、命令フェッチ部
1に対してlワード単位でのフェッチを要求するトレー
スモードフェッチ要求信号14を出力する。
Reference numeral 2 denotes an instruction decoding section, which decodes the instruction code stored in the instruction queue 11 and provides the result to the instruction execution section 3. The instruction decode unit 2 also includes an instruction execution unit 3.
trace mote signal 31 and instruction processing start signal 32
are also given, and in accordance with these signals and its own decoding processing state, in the trace mode, it outputs a trace mode fetch request signal 14 requesting the instruction fetch unit 1 to fetch in l word units.

命令実行部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 section 1 and instruction decode section 2.

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

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

ノーマルモードにおいてはトレースモード信号31は無
効状態にされる。そして、命令フェッチ部1は命令フェ
ア千制御回路12の制御に従って、図示しない命令メモ
リからデータバス6を介して命令コードをフェッチし、
命令キュー11に格納する。
In normal mode, trace mode signal 31 is disabled. Then, the instruction fetch unit 1 fetches an instruction code from an instruction memory (not shown) via the data bus 6 under the control of the instruction fair control circuit 12,
Store it in the instruction queue 11.

この命令フェッチ部lによる命令コードのフェッチは、
命令キュー11に空きがある限り、データバス6が空い
ている時間を利用して1ワ一ド単位で反復される。
Fetching of the instruction code by this instruction fetch unit l is as follows:
As long as there is space in the instruction queue 11, the process is repeated one word at a time using the time when the data bus 6 is free.

具体的には、命令キュー11に空きがあれば命令キュー
11は命令フェッチ切換回路13に対して通常フェッチ
要求信号15を出力するが、I・レースモト信号31が
無効であるので、命令フェッチ切換回路13は通常フェ
ッチ要求信号15を選択して命令フェッチ制御回路12
へ与える。これにより命令フJソチ制御回路12は、命
令キュー11から通常フェッチ要求信号15が出力され
る都度、!ソー1m位で命令コードをフェッチし、命令
キュー11に格納する。この際、命令キューエ1に更に
空きがあれば、命令キュー11は再度通常フェッチ要求
信号15を出力するので、命令フェッチ制御回路12は
更に1ワードをフェッチする。
Specifically, if there is 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 I/racemoto signal 31 is invalid, the instruction fetch switching circuit 13 outputs the normal fetch request signal 15. 13 selects the normal fetch request signal 15 and sends the instruction fetch control circuit 12
give to As a result, each time the instruction queue control circuit 12 outputs the normal fetch request signal 15 from the instruction queue 11, ! The instruction code is fetched at about 1 m and stored in the instruction queue 11. At this time, if there is more space in the instruction queue 1, the instruction queue 11 outputs the normal fetch request signal 15 again, so the instruction fetch control circuit 12 fetches one more word.

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

この命令デコート部2による命令コードのデコードは、
まず命令キュー11からオペレーションコードを1ワー
ド取出してデコードし、必要であればオペランドのワー
ド数を決定する。次に、必要なオペランドが命令キュー
11がら取出されてデコードされ、先のオペレーション
コードのデコード結果と併せて命令実行部3へ出力する
The decoding of the instruction code by the instruction decoding section 2 is as follows:
First, one word of the operation code is taken out from the instruction queue 11 and decoded, and if necessary, the number of words of the operand is determined. Next, a necessary operand is taken out from the instruction queue 11, decoded, and output to the instruction execution unit 3 together with the decoded result of the previous operation code.

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

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

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

トレースモード時においては命令実行部3から出力され
るトレースモード信号31が有効になる。
In the trace mode, the trace mode signal 31 output from the instruction execution unit 3 becomes valid.

ごの1−レースモード信号31が有効になることにより
、命令フェッチ切換回路13は命令デコード部2から出
力されるトレースモー「フェッチ要求信号14を選択し
て命令フェッチ制御回路12へ与える。
When the first-race mode signal 31 becomes valid, the instruction fetch switching circuit 13 selects the trace mode fetch request signal 14 output from the instruction decoder 2 and supplies it to the instruction fetch control circuit 12.

命令フェッチ部1はノーマルモード時と同様に命令メモ
リから命令コードをフェッチして命令キュー11に格納
するが、この際の制御はl・レースモード信号31によ
り司られており、トレースモードフェッチ要求信号14
が一度有効になる都度、命令フェッチ制御回路12は1
ワードのみをフェッチして命令キュー11に格納する。
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, but the control at this time is controlled by the l/race mode signal 31, and the trace mode fetch request signal 14
Each time the instruction fetch control circuit 12 becomes valid, the instruction fetch control circuit 12
Only words are fetched and stored in the instruction queue 11.

命令デコード部2は命令キュー11に格納されている命
令コードの内のオペレーションコード部分に相当するハ
ーフワードを取出してデコードする。
The instruction decoding unit 2 extracts and decodes a halfword corresponding to the operation code portion of the instruction code stored in the instruction queue 11.

デコード結果が2ハーフワードのオペランドを要求して
いる場合には、命令キューIIにはlハーフワードしか
残っていない(最初にフェッチされたのは1ワードであ
り、そこからオペレーションコード分の1ハーフワード
が既に命令デコード部2に取込まれている)ので、命令
デコード部2は再度トレースモードフェッチ要求信号I
4を出力する。
If the decoded result requires two halfwords of operands, there are only l halfwords left in Instruction Queue II (one word was fetched first, then one halfword for the operation code). (word has already been fetched into the instruction decode unit 2), the instruction decode unit 2 again outputs the trace mode fetch request signal I.
Outputs 4.

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

これで命令キュー11には3ハ一フワード分が格納され
ているので、命令デコード部2はその内の2ハ一フワー
ド分を取出してデコードし、先のオペレーションコード
のデコード結果と併せて命令実行部3へ出力する。
Now, the instruction queue 11 stores 3-words, so the instruction decoder 2 takes out 2-words, decodes them, and executes the instruction along with the decoding result of the previous operation code. Output to section 3.

また命令デコード部2は、命令実行部3から出力されて
いるトレースモード信号31が有効である場合には、■
命令のデコードが完了した後、そのデコード結果に対す
る命令実行部3での処理が完了するまで他の命令コート
のデコード処理は行わない。
Further, when the trace mode signal 31 output from the instruction execution unit 3 is valid, the instruction decoding unit 2 performs
After the decoding of an instruction is completed, decoding of other instruction codes is not performed until the processing of the decoding result in the instruction execution unit 3 is completed.

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

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

なお、」二記実施例ではパイプライン処理機(11ば命
令フェッチ部1.命令デコー「部2及び命令実行部3の
3ステツプで構成されているが、更に多くのステップで
構成されているデータ処理装置に対しても本発明は適用
可能である。
In the second embodiment, the pipeline processor (11) is composed of three steps: an instruction fetch section 1, an instruction decoder section 2, and an instruction execution section 3, but the data processor is composed of even more steps. The present invention is also applicable to processing devices.

〔発明の効果〕〔Effect of the invention〕

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

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

第1図は本発明に係るデータ処理装置の一構成例を示す
ブロック図、第2図は従来のパイプライン処理機構を有
するデータ処理装置の構成例を示すブロック図である。 1・・・命令フ、y−’7チ部  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 f, y-'7chi section 2... Instruction decoding section 3... Instruction execution section 11... Instruction queue
12... Instruction fetch control circuit 13... Instruction fetch switching circuit Note that the same reference numerals in each figure indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】[Claims] (1)可変長の命令を所定の単位に分割して先取りする
命令フェッチ部と、該命令フェッチ部が先取りした命令
を一時的に格納する記憶手段と、該記憶手段に格納され
ている命令をデコードする命令デコード部と、該命令デ
コード部によるデコード結果に従って命令を実行する命
令実行部とを有するパイプライン処理機構により命令を
パイプライン処理するデータ処理装置において、 前記パイプライン処理機構により1命令の処理が完了し
た後に次の命令の処理を開始するトレースモード時に、
前記命令デコード部のデコード結果に応じて前記命令フ
ェッチ部に次の1単位をフェッチさせる制御回路を備え
たことを特徴とするデータ処理装置。
(1) An instruction fetch unit that divides a variable-length instruction into predetermined units and pre-fetches it; a storage unit that temporarily stores the instructions pre-fetched by the instruction fetch unit; and a storage unit that temporarily stores instructions stored in the storage unit. In a data processing device that performs pipeline processing of instructions by a pipeline processing mechanism having an instruction decoding unit that decodes an instruction and an instruction execution unit that executes an instruction according to a decoding result by the instruction decoding unit, During trace mode, which starts processing the next instruction after processing is completed,
A data processing device comprising: a control circuit that causes the instruction fetch section to fetch the next unit according to a decoding result of the instruction decoding section.
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 true JPH03164945A (en) 1991-07-16
JPH0752402B2 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010515161A (en) * 2006-12-30 2010-05-06 インテル コーポレイション Method and apparatus for supplying threads to a queue

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62145430A (en) * 1985-12-20 1987-06-29 Nec Corp Data processor
JPS63240634A (en) * 1987-03-27 1988-10-06 Nec Corp Information processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62145430A (en) * 1985-12-20 1987-06-29 Nec Corp Data processor
JPS63240634A (en) * 1987-03-27 1988-10-06 Nec Corp Information processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010515161A (en) * 2006-12-30 2010-05-06 インテル コーポレイション Method and apparatus for supplying threads to a queue
US8544019B2 (en) 2006-12-30 2013-09-24 Intel Corporation Thread queueing method and apparatus

Also Published As

Publication number Publication date
JPH0752402B2 (en) 1995-06-05

Similar Documents

Publication Publication Date Title
JPS62197830A (en) Data processing system
JPH07129413A (en) Interruption processor
US4747045A (en) Information processing apparatus having an instruction prefetch circuit
JP2773471B2 (en) Information processing device
JP2694948B2 (en) Micro program processor
JPH03164945A (en) Data processor
JPH0769806B2 (en) Data processing device
JPS6134188B2 (en)
JPH06324861A (en) System and method for controlling cpu
JPH0561660B2 (en)
JP2503223B2 (en) Prior control method
JP2545594B2 (en) Operand data prefetching method
KR19980052331A (en) How to Control Cache Memory on Processors
JPS6221131B2 (en)
JP2825315B2 (en) Information processing device
JP4151497B2 (en) Pipeline processing equipment
JPH0769805B2 (en) Data processing device
JPS6028014B2 (en) microprocessor
JPH11119995A (en) Device and method for processing data
JPS6149695B2 (en)
JPH08297583A (en) Processor and method for interruption processing
JPH04263322A (en) Microcomputer
JPH0192862A (en) Data processor
JPS60126733A (en) Read resetting system of register
JPS6049439A (en) Control system of microprogram