JPH09223010A - Microprocessor and its processing method - Google Patents

Microprocessor and its processing method

Info

Publication number
JPH09223010A
JPH09223010A JP2934896A JP2934896A JPH09223010A JP H09223010 A JPH09223010 A JP H09223010A JP 2934896 A JP2934896 A JP 2934896A JP 2934896 A JP2934896 A JP 2934896A JP H09223010 A JPH09223010 A JP H09223010A
Authority
JP
Japan
Prior art keywords
instruction
pipeline
time information
stage
clock
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2934896A
Other languages
Japanese (ja)
Inventor
Toru Uchiumi
透 内海
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2934896A priority Critical patent/JPH09223010A/en
Publication of JPH09223010A publication Critical patent/JPH09223010A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To change the frequency of a clock signal and to improve the total processing speed of a microprocessor by using a clock control circuit which changes the frequency of a clock to be supplied to each pipeline stage based on the time information held by each pipeline holding means. SOLUTION: A clock control circuit 353 changes the frequency of a clock signal 354 based on the time information held in the time information fields 321a, 331a and 341a of stages E, M and W respectively. Only the instruction that is held by an input register of the stage M requires 6 cycles of a source clock 352 for its execution, and the instructions of stages E and W can operate by 4 cycles of the source clock 352 respectively. Under such conditions, the type of instruction that is held by the input register of a stage D cannot be discriminated and the time required for its execution is fixed at 4 cycles of the source clock 352. The circuit 353 does not raise the clock signal 354 before the execution is over for the instruction of the stage M that requires the longest time.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、クロックに同期し
て、パイプライン方式で命令を実行するマイクロプロセ
ッサとその処理方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor for executing instructions in a pipeline system in synchronization with a clock and a processing method thereof.

【0002】[0002]

【従来の技術】図9は、従来のパイプライン方式のマイ
クロプロセッサのブロック図を示す。このマイクロプロ
セッサは、F,D,E,M,Wの5段のパイプライン構
成をとる。
2. Description of the Related Art FIG. 9 is a block diagram of a conventional pipeline type microprocessor. This microprocessor has a five-stage pipeline configuration of F, D, E, M, and W.

【0003】Fステージでは、命令キャッシュ101か
ら取り出された命令がDステージ入力レジスタ111に
取り込まれる。Dステージでは、レジスタファイル11
2の読み出しと、デコーダ113による命令のデコード
が行われ、その出力はEステージ入力レジスタ121に
取り込まれる。
In the F stage, the instruction fetched from the instruction cache 101 is fetched in the D stage input register 111. In the D stage, register file 11
2 is read and an instruction is decoded by the decoder 113, and its output is captured in the E stage input register 121.

【0004】Eステージでは、命令の種類によって、オ
ペランドアドレス加算器122によるアドレス計算、A
LU123による算術演算または論理演算、またはシフ
タ124によるシフト操作が行われ、その結果はMステ
ージ入力レジスタ131に取り込まれる。
At the E stage, depending on the type of instruction, the address calculation by the operand address adder 122, A
An arithmetic operation or a logical operation by the LU 123 or a shift operation by the shifter 124 is performed, and the result is stored in the M stage input register 131.

【0005】Mステージでは、命令の種類によって、デ
ータキャッシュ132からの読み出し、またはデータキ
ャッシュ132への書き込み、またはMステージ入力レ
ジスタ131に保持されたEステージでの演算結果のW
ステージ入力レジスタ141への転送が行われる。
At the M stage, depending on the type of instruction, reading from the data cache 132, writing to the data cache 132, or W of the operation result at the E stage held in the M stage input register 131 is performed.
Transfer to the stage input register 141 is performed.

【0006】Wステージでは、命令の種類によって、レ
ジスタファイル112への書き込みが行われる。以上の
5つのパイプラインステージの中を命令が次々と1クロ
ックに1段ずつ進む。この様子を図10に示す。
At the W stage, writing to the register file 112 is performed depending on the type of instruction. Instructions progress one stage at a time in one clock in the above five pipeline stages. This is shown in FIG.

【0007】なお、Dステージに記載されているレジス
タファイル112とWステージに記載されているレジス
タファイル112は、パイプライン動作の説明のために
別々に記載されているが、実際には同一のものであり、
1クロックの間に読み出し動作と書き込み動作を同時に
実行できる機能を持つ。
Although the register file 112 described in the D stage and the register file 112 described in the W stage are described separately for the purpose of explaining the pipeline operation, they are actually the same. And
It has the function of simultaneously executing the read operation and the write operation in one clock.

【0008】D,E,M,Wの各々の入力レジスタには
クロック制御回路153からのクロック信号154が供
給されており、このクロック信号154の立ち上がりに
同期してこれらの入力レジスタは前段の命令を取り込
む。つまり、クロック信号154の1回の立ち上がりで
パイプラインが1段進む。
A clock signal 154 from a clock control circuit 153 is supplied to each of the D, E, M, and W input registers, and these input registers are synchronized with the rising edge of the clock signal 154 to instruct the preceding stage instruction. Take in. That is, the pipeline advances one stage at each rising edge of the clock signal 154.

【0009】クロック制御回路153は、クロック発生
器151から出力される原クロック信号152を6分周
してクロック信号154として出力する。図11は、従
来例のクロック制御回路153の回路図であり、このク
ロック制御回路153は主として3段のD−FF回路か
らなる分周器である。図12はその動作タイミングを表
す。原クロックを6分周した波形のみ出力する。
The clock control circuit 153 divides the original clock signal 152 output from the clock generator 151 by 6, and outputs it as a clock signal 154. FIG. 11 is a circuit diagram of a conventional clock control circuit 153. The clock control circuit 153 is a frequency divider mainly composed of three-stage D-FF circuits. FIG. 12 shows the operation timing. Only the waveform obtained by dividing the original clock by 6 is output.

【0010】[0010]

【発明が解決しようとする課題】D,E,M,Wの各々
の入力レジスタ111、121、131、141には同
一のクロック信号154が供給されている。このクロッ
ク信号154の周波数は高ければ高いほどパイプライン
内を命令が速く流れ、プロセッサの処理速度は向上す
る。クロック信号154の最大周波数は、5つのパイプ
ラインステージのうち最も動作の完了の遅いステージに
よって決定される。なぜなら、すべてのパイプラインス
テージの動作が完了する前にクロック信号154を立ち
上げると、誤った値を次のパイプラインステージに入力
してしまうからである。ここではMステージのデータキ
ャッシュ132の動作が他のレジスタファイル112や
ALU123などと比較して最も遅いとする。
The same clock signal 154 is supplied to the input registers 111, 121, 131 and 141 of D, E, M and W, respectively. The higher the frequency of the clock signal 154, the faster the instructions flow through the pipeline, and the processing speed of the processor is improved. The maximum frequency of clock signal 154 is determined by the most recently completed stage of the five pipeline stages. This is because if the clock signal 154 is raised before the operation of all pipeline stages is completed, an incorrect value will be input to the next pipeline stage. Here, it is assumed that the operation of the data cache 132 of the M stage is the slowest as compared with the other register file 112 and ALU 123.

【0011】従来例の問題点は、命令の種類によっては
データキャッシュを使用しないにもかかわらず、データ
キャッシュの動作速度に律速されて最大周波数を上げら
れないことである。データキャッシュを使用する場合で
もプロセッサが正常に動作するようにクロック信号15
4の周波数が低く設定されており、しかもその周波数を
状況に応じて変えることができないために、本来ならも
っと高速に処理できる命令までも遅く処理され、プロセ
ッサ全体の処理速度の低下を招いている。
A problem with the conventional example is that the maximum frequency cannot be increased due to the operating speed of the data cache, although the data cache is not used depending on the type of instruction. Even if the data cache is used, the clock signal 15 is used so that the processor operates normally.
Since the frequency of 4 is set low and the frequency cannot be changed according to the situation, even instructions that could otherwise be processed at higher speed are processed slower, resulting in a decrease in the processing speed of the entire processor. .

【0012】本発明は、上記の課題を解決するものであ
り、その目的は、命令に応じてクロック信号の周波数を
変えることでプロセッサ全体の処理速度の向上を図るこ
とにある。
The present invention is intended to solve the above problems, and an object thereof is to improve the processing speed of the entire processor by changing the frequency of a clock signal according to an instruction.

【0013】[0013]

【課題を解決するための手段】クロックに同期してパイ
プライン方式で命令を実行するマイクロプロセッサにお
いて、実行すべき命令を保持する命令レジスタと、前記
命令レジスタに保持されている命令をデコードし、その
命令がそれ以降の各々のパイプラインステージで実行に
必要とする時間情報を出力する命令デコーダと、前記命
令デコーダの出力する時間情報であり、命令の実行とと
もにパイプラインを流れる時間情報を保持する時間情報
保持フィールドを有する複数のパイプラインステージ
と、前記複数のパイプラインステージに保持されている
時間情報に従ってパイプラインに供給するクロックの周
波数を変化させるクロック制御回路と、前記クロック制
御回路に供給するクロックを生成するクロック発生器と
を具備するマイクロプロセッサを用いて、不必要な動作
周波数の低下を防ぎ、プロセッサの処理速度を向上させ
る。
In a microprocessor for executing an instruction in a pipeline system in synchronization with a clock, an instruction register holding an instruction to be executed and an instruction held in the instruction register are decoded, The instruction decoder outputs the time information required for execution in each subsequent pipeline stage, and the time information output by the instruction decoder, and holds the time information flowing through the pipeline as the instruction is executed. A plurality of pipeline stages having a time information holding field, a clock control circuit for changing the frequency of a clock supplied to the pipeline according to the time information held in the plurality of pipeline stages, and a clock control circuit Micro having a clock generator for generating a clock Using processor prevents reduction of unnecessary operating frequency, improve the processing speed of the processor.

【0014】[0014]

【発明の実施の形態】以下、図面を参照して本発明の実
施例を説明する。図1は、本発明の実施例を示す。図1
のマイクロプロセッサは、F,D,E,M,Wの5段の
パイプライン構成をとる。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows an embodiment of the present invention. FIG.
The microprocessor has a five-stage pipeline structure of F, D, E, M, and W.

【0015】まず、Fステージでは、命令キャッシュ3
01から取り出された命令がDステージ入力レジスタ3
11に取り込まれる。Dステージでは、レジスタファイ
ル312の読み出しと、デコーダ313による命令のデ
コードが行われ、その出力はEステージ入力レジスタ3
21に取り込まれる。命令のデコードとともに、デコー
ダ313はそれ以降の各パイプラインステージにおいて
その命令を実行するのに要する時間の情報を出力する。
図2は、この時間情報を出力するデコーダ313の構成
を示す。デコーダ313は、従来の命令デコーダと同一
の機能を有する命令デコーダ313aと、命令デコーダ
313aが命令をデコードするのに従って、E,M,W
の各パイプラインステージでその命令を実行するのに要
する時間情報を出力する時間情報設定回路313bとに
より構成される。この時間情報設定回路313bが出力
する時間情報は、Eステージの入力レジスタに設けられ
た時間情報フィールド(time)321a、で保持さ
れる。
First, in the F stage, the instruction cache 3
The instruction fetched from 01 is the D stage input register 3
Taken in 11. In the D stage, the register file 312 is read and the decoder 313 decodes the instruction, and the output is the E stage input register 3
21. Along with the decoding of the instruction, the decoder 313 outputs information on the time required to execute the instruction in each subsequent pipeline stage.
FIG. 2 shows the configuration of the decoder 313 that outputs this time information. The decoder 313 includes an instruction decoder 313a having the same function as that of a conventional instruction decoder, and E, M, W as the instruction decoder 313a decodes an instruction.
And a time information setting circuit 313b that outputs the time information required to execute the instruction in each pipeline stage. The time information output by the time information setting circuit 313b is held in the time information field (time) 321a provided in the input register of the E stage.

【0016】Eステージでは、命令の種類によって、オ
ペランドアドレス加算器322によるアドレス計算、A
LU323による算術演算または論理演算、またはシフ
タ324によるシフト操作が行われ、その結果はMステ
ージ入力レジスタ331に取り込まれる。それと同時
に、Eステージの入力ステージに設けられた時間情報フ
ィールド321aで保持されている時間情報が、Mステ
ージの入力レジスタに設けられた時間情報フィールド3
31aに転送される。
In the E stage, depending on the type of instruction, the address calculation by the operand address adder 322, A
An arithmetic operation or a logical operation by the LU 323 or a shift operation by the shifter 324 is performed, and the result is stored in the M stage input register 331. At the same time, the time information held in the time information field 321a provided in the input stage of the E stage is changed to the time information field 3 provided in the input register of the M stage.
31a.

【0017】Mステージでは、命令の種類によって、デ
ータキャッシュ332からの読み出し、またはデータキ
ャッシュ332への書き込み、またはMステージ入力レ
ジスタ331に保持されたEステージでの演算結果のW
ステージ入力レジスタ341への転送が行われる。それ
と同時に、Mステージの入力ステージに設けられた時間
情報フィールド331aで保持されている時間情報が、
Wステージの入力レジスタに設けられた時間情報フィー
ルド341aに転送される。
At the M stage, depending on the type of instruction, reading from the data cache 332, writing to the data cache 332, or W of the operation result at the E stage held in the M stage input register 331 is performed.
Transfer to the stage input register 341 is performed. At the same time, the time information held in the time information field 331a provided in the input stage of the M stage is
It is transferred to the time information field 341a provided in the input register of the W stage.

【0018】Wステージでは、命令の種類によって、レ
ジスタファイル312への書き込みが行われる。以上の
5つのパイプラインステージの中を命令が次々と1クロ
ックに1段ずつ進む。
At the W stage, writing to the register file 312 is performed depending on the type of instruction. Instructions progress one stage at a time in one clock in the above five pipeline stages.

【0019】また、クロック制御回路353は、E,
M,Wの各々のステージの時間情報フィールド321
a、331a、341aに保持されている時間情報に基
づいてクロック信号354の周波数を変化させる。クロ
ック制御回路353の動作例について以下説明する。例
えば、図1において、Mステージの入力レジスタに保持
されている命令だけが実行に原クロック352の6サイ
クル分を必要とし、EステージとWステージの命令は4
サイクル分で動作できるとする。Dステージの入力レジ
スタに保持されている命令は、デコーダ313でデコー
ドされる前であるので、命令の種類が判別できず、命令
の実行に要する時間は4サイクル分に固定されている。
クロック制御回路353は最も時間を要するMステージ
の命令の実行が完了するまでクロック信号354を立ち
上げない。
Further, the clock control circuit 353 has E,
Time information field 321 for each stage of M and W
The frequency of the clock signal 354 is changed based on the time information held in a, 331a, and 341a. An operation example of the clock control circuit 353 will be described below. For example, in FIG. 1, only the instruction held in the input register of the M stage requires 6 cycles of the original clock 352 to execute, and the instruction of the E stage and the W stage requires 4 cycles.
It is assumed that it can operate in cycles. Since the instruction held in the input register of the D stage is before being decoded by the decoder 313, the type of the instruction cannot be discriminated and the time required to execute the instruction is fixed to 4 cycles.
The clock control circuit 353 does not raise the clock signal 354 until the execution of the instruction in the M stage, which takes the longest time, is completed.

【0020】次に本発明を適用したマイクロプロセッサ
の動作を図3を用いて説明する。番号Nの命令はMステ
ージでのみ原クロック352の6サイクル分の時間を要
し、それ以外のステージでは4サイクル分で動作できる
命令であるとする。番号N−1、N+1、N+2の命令
は全てのステージを4サイクル分の時間で実行できるも
のとする。番号Nの命令がMステージにある場合を除
き、クロック制御回路353は原クロック352の4サ
イクル分を1サイクルとするクロック信号354を出力
し、パイプラインは高速に流れる。番号Nの命令がMス
テージに入ると、クロック制御回路353は原クロック
352の6サイクル分を1サイクルとするクロック信号
354を出力し、パイプライン動作は一時的に遅くな
る。番号Nの命令がMステージを通過すると再び、原ク
ロックの4サイクル分を1サイクルとするクロック信号
を出力し、4パイプラインは高速に動作する。図10に
示す従来例の動作タイミングと比較すると、短い時間で
同一命令数を処理していることがわかる。
Next, the operation of the microprocessor to which the present invention is applied will be described with reference to FIG. It is assumed that the instruction of number N requires 6 cycles of the original clock 352 only in the M stage and can operate in 4 cycles in the other stages. The instructions with numbers N-1, N + 1, and N + 2 are assumed to be able to execute all stages in a time corresponding to four cycles. The clock control circuit 353 outputs a clock signal 354 whose one cycle is four cycles of the original clock 352 except when the instruction of the number N is in the M stage, and the pipeline flows at high speed. When the instruction with the number N enters the M stage, the clock control circuit 353 outputs a clock signal 354 having 6 cycles of the original clock 352 as one cycle, and the pipeline operation is temporarily delayed. When the instruction of the number N passes through the M stage, a clock signal having 4 cycles of the original clock as 1 cycle is output again, and the 4 pipelines operate at high speed. Comparing with the operation timing of the conventional example shown in FIG. 10, it can be seen that the same number of instructions is processed in a short time.

【0021】時間情報を保持するフィールドは、具体的
には図6(a)で示される。Eステージの入力レジスタ
321にある時間情報フィールド321aは、E,M,
W各ステージでの時間情報を表す各々1ビットの計3ビ
ットの情報を持つ。”0”はそのステージの実行に原ク
ロック352の4サイクル分の時間を要することを表
す。”1”は6サイクル分の時間を要することを表す。
図6(a)の例では、EステージとWステージは4サイ
クルで実行でき、Mステージは6サイクルかかる命令が
パイプラインを進むことを示す。パイプラインを進む
時、不要となった時間情報は次のステージに伝達しな
い。
The field holding the time information is specifically shown in FIG. 6 (a). The time information field 321a in the input register 321 of the E stage has E, M, and
W has a total of 3 bits of 1 bit each representing time information in each stage. "0" indicates that the execution of that stage requires a time corresponding to four cycles of the original clock 352. "1" indicates that it takes 6 cycles.
In the example of FIG. 6A, the E stage and the W stage can be executed in 4 cycles, and the M stage shows that an instruction which takes 6 cycles advances in the pipeline. When going through the pipeline, the time information that is no longer needed is not transmitted to the next stage.

【0022】図6(b)(c)は、時間情報フィールド
の別の例である。図6(b)は、クロック信号の周波数
を低下させるMステージで周波数を落とすかどうかのみ
を1ビットで表すものである。Mステージではなく、ス
テージの構成に応じてEステージでもWステージでも良
い。図6(c)は、E,M,Wのいずれか1つのステー
ジの動作周波数を落とすことができる。例えば、ある命
令をデコードして情報”10”をクロック信号に同期し
て時間情報フィールドに流すと、この命令がMステージ
にある時周波数が落ちる。情報”01”の場合Eステー
ジ、情報”11”の場合Wステージの周波数が低下す
る。どのステージでも周波数を落とさないときは”0
0”を流す。
6B and 6C show another example of the time information field. FIG. 6B shows by 1 bit only whether or not the frequency is lowered in the M stage which lowers the frequency of the clock signal. Instead of the M stage, the E stage or the W stage may be used depending on the stage configuration. In FIG. 6C, the operating frequency of any one of the stages E, M and W can be lowered. For example, when a certain instruction is decoded and information "10" is sent to the time information field in synchronization with the clock signal, the frequency drops when this instruction is in the M stage. The frequency of the E stage decreases when the information is “01”, and the frequency of the W stage decreases when the information is “11”. "0" when the frequency is not dropped at any stage
Flow 0 ".

【0023】図4は、本発明のクロック制御回路353
の回路図である。図5は、図4の回路の動作タイミング
を表す。まず、図4の回路の構成を説明する。図11に
示した従来のクロック制御回路と同じく、主として3段
のDフリップフロップ回路360、361、362から
なる分周器である。図11の回路に加えてセレクタ36
5を新たに設け、そのオア回路369から出力される選
択信号に時間情報入力325、333、342の論理和
信号を用いる。セレクタ365には、一方入力としてア
ンド回路370から出力されるDフリップフロップ36
1のQ出力の反転とDフリップフロップ362のQ出力
との論理積信号が供給され、他方入力としてアンド回路
371から出力されるDフリップフロップ361のQ出
力とDフリップフロップ362のQ出力の反転との論理
積信号が供給される。前記オア回路369から出力され
る選択信号が1のときは、前記一方入力が出力され、選
択信号が0のときは、前記他方入力が出力される。セレ
クタ365の出力は、インバータ372を介してセレク
タ363の一方入力端に入力され、カウンタリセット信
号として用いられる。
FIG. 4 shows the clock control circuit 353 of the present invention.
FIG. FIG. 5 shows the operation timing of the circuit of FIG. First, the configuration of the circuit shown in FIG. 4 will be described. Similar to the conventional clock control circuit shown in FIG. 11, the frequency divider mainly comprises three stages of D flip-flop circuits 360, 361, 362. In addition to the circuit of FIG. 11, the selector 36
5 is newly provided, and the OR signal of the time information inputs 325, 333, 342 is used as the selection signal output from the OR circuit 369. The selector 365 receives the D flip-flop 36 output from the AND circuit 370 as one input.
An AND signal of the inversion of the Q output of 1 and the Q output of the D flip-flop 362 is supplied, and the Q output of the D flip-flop 361 and the Q output of the D flip-flop 362 output from the AND circuit 371 as the other input are inverted. An AND signal with is supplied. When the selection signal output from the OR circuit 369 is 1, the one input is output, and when the selection signal is 0, the other input is output. The output of the selector 365 is input to one input end of the selector 363 via the inverter 372 and used as a counter reset signal.

【0024】この回路は、図6(a)で示す時間情報を
用いるときに使用されるものである。他の形式の時間情
報を用いるときは、オア回路に代えて時間情報入力32
5、333、342から選択信号を生成する適切な論理
回路を使用する。
This circuit is used when the time information shown in FIG. 6 (a) is used. When using other types of time information, the time information input 32 is used instead of the OR circuit.
5. Use appropriate logic circuitry to generate the select signal from 5,333,342.

【0025】フリップフロップ360,361,362
はクロック入力信号の立ち上がりに同期してD入力を取
り込み、その正転信号をQに、反転信号をQNに出力す
る。リセット信号355がローレベルになるとセレクタ
363と364は原クロック352を選択する。同時に
フリップフロップ361、362のD入力は0に、また
フリップフロップ360のD入力は1になる。この状態
で原クロック352が立ち上がるとフリップフロップ3
61、362は0に、またフリップフロップ360は1
に初期化される。
Flip-flops 360, 361, 362
Takes in the D input in synchronization with the rising edge of the clock input signal, and outputs its normal signal to Q and its inverted signal to QN. When the reset signal 355 goes low, the selectors 363 and 364 select the original clock 352. At the same time, the D inputs of the flip-flops 361 and 362 become 0, and the D inputs of the flip-flop 360 become 1. When the original clock 352 rises in this state, the flip-flop 3
61 and 362 are 0, and flip-flop 360 is 1
Is initialized to

【0026】リセット信号355がハイレベルになると
フリップフロップ361、362はカウンタとして動作
する。選択信号365が0のとき、フリップフロップ3
62が0、フリップフロップ361が1になるとカウン
タリセット信号366が1になり、原クロック352の
次の立ち上がりでフリップフロップ361、362は0
にリセットされ、同時にフリップフロップ360のQ出
力は反転する。この繰り返しにより、クロック信号35
4の波形は原クロック352を4分周した波形になる。
When the reset signal 355 goes high, the flip-flops 361 and 362 operate as counters. When the selection signal 365 is 0, the flip-flop 3
When 62 becomes 0 and the flip-flop 361 becomes 1, the counter reset signal 366 becomes 1, and the flip-flops 361 and 362 become 0 at the next rising edge of the original clock 352.
And the Q output of the flip-flop 360 is inverted at the same time. By repeating this, the clock signal 35
The waveform of 4 is a waveform obtained by dividing the original clock 352 by 4.

【0027】時間情報信号325、333、342のう
ち1本でも1になると選択信号365が1になり、フリ
ップフロップ362が1、フリップフロップ361が0
になって初めてカウンタリセット信号366が1にな
る。次の原クロック352の次の立ち上がりでフリップ
フロップ361、362は0にリセットされ、同時にフ
リップフロップ360のQ出力は反転する。この繰り返
しにより、クロック信号354の波形は原クロック35
2を6分周した波形になる。
When even one of the time information signals 325, 333, 342 becomes 1, the selection signal 365 becomes 1, the flip-flop 362 becomes 1, and the flip-flop 361 becomes 0.
The counter reset signal 366 goes to 1 only after. At the next rising edge of the next original clock 352, the flip-flops 361 and 362 are reset to 0, and at the same time, the Q output of the flip-flop 360 is inverted. By repeating this, the waveform of the clock signal 354 becomes the original clock 35.
It becomes a waveform obtained by dividing 2 by 6.

【0028】このようにE,M,Wステージのいずれか
のステージに遅い命令があるとクロック信号354の周
波数が低くなる。図7は、本発明の他の実施例である。
図1の実施例との違いは、E,M,W各々のステージで
の実行時間を外部入力信号315を用いて外部から制御
できることである。実行時間を示す情報が図6(a)の
形式のとき、外部入力信号315を1にすればデコーダ
313の出力した時間情報はそのままEステージの時間
情報フィールドに取り込まれ、0にすれば時間情報は0
となり対応するステージでの実行時間は長くならない。
つまり、あらかじめ命令ごとにステージごとの実行時間
情報は命令デコーダ313によって規定されているが、
それを外部から制御できるようにしたものである。
As described above, when there is a slow instruction in any one of the E, M, and W stages, the frequency of the clock signal 354 becomes low. FIG. 7 shows another embodiment of the present invention.
The difference from the embodiment of FIG. 1 is that the execution time in each of the E, M, and W stages can be externally controlled using an external input signal 315. When the information indicating the execution time is in the format of FIG. 6A, if the external input signal 315 is set to 1, the time information output from the decoder 313 is directly taken into the time information field of the E stage, and if it is set to 0, the time information is output. Is 0
The execution time at the corresponding stage does not become long.
That is, although the execution time information for each instruction for each stage is defined in advance by the instruction decoder 313,
It is possible to control it from the outside.

【0029】図8は、本発明のさらに別の実施例であ
る。図1の実施例との違いは、実行時間を長くする命令
をソフトウェアによって設定できるようにしたことであ
る。低速命令レジスタ317とマスクレジスタ319は
機械語命令によって書き込み可能なレジスタである。D
ステージ入力レジスタの命令ビットパターンと低速命令
レジスタに格納された命令ビットパターンを比較器31
8で比較し、その結果に応じた時間情報をEステージ入
力レジスタ321に書き込む。命令ビットパターンを比
較するとき、比較するビットのビット位置には1を、ま
た比較しないビットのビット位置には0をおいたデータ
をマスクレジスタ319に書き込んでおき、これと命令
ビットパターンの論理積をAND回路316でとること
で比較するビットを制限する。こうすることで、次の例
のように複数の命令を低速命令として実行できるように
なる。 命令 マスク 比較器入力 比較 低速命令レジスタ 11101000 and 1111000 -> 11100000 <-> 11100000 11101111 and 1111000 -> 11100000 <-> 11100000 上の命令では、どちらも低速命令にあたることになる。
Mステージで低速な命令であって、図6(a)の形式の
時間情報を用いるのであれば、”010”が出力され
る。
FIG. 8 shows still another embodiment of the present invention. The difference from the embodiment of FIG. 1 is that an instruction for lengthening the execution time can be set by software. The low speed instruction register 317 and the mask register 319 are registers writable by a machine language instruction. D
The comparator 31 compares the instruction bit pattern of the stage input register and the instruction bit pattern stored in the low speed instruction register.
8, and the time information according to the result is written in the E stage input register 321. When comparing instruction bit patterns, data in which 1 is set in the bit positions of the bits to be compared and 0 is set in the bit positions of the bits that are not compared is written in the mask register 319, and the logical product of this and the instruction bit pattern is written. The AND circuit 316 limits the bits to be compared. By doing so, it becomes possible to execute a plurality of instructions as low speed instructions as in the following example. Instruction mask Comparator input Comparison low speed instruction register 11101000 and 1111000-> 11100000 <-> 11100000 11101111 and 1111000-> 11100000 <-> 11100000 Both of the above instructions are low speed instructions.
If the instruction is slow in the M stage and the time information in the format shown in FIG. 6A is used, "010" is output.

【0030】さらに、ステージ毎の実行時間情報を命令
毎に生成する他の手段として、Dステージ入力レジスタ
の命令コードをアドレスとして読み出し動作を行うEE
PROMを使用する方法もある。
Further, as another means for generating the execution time information for each stage for each instruction, the EE for performing the read operation using the instruction code of the D stage input register as an address.
There is also a method of using a PROM.

【0031】[0031]

【発明の効果】以上述べたように、本発明は、命令をデ
コードして各パイプラインステージで実行に必要とする
時間の情報を出力するデコーダを設け、各パイプライン
ステージのレジスタに時間情報を保持するフィールドを
設けて、命令とともに時間情報がパイプラインステージ
を流れるようにし、各パイプラインステージに保持され
ている各命令の時間情報に従って、クロック制御回路に
よってパイプラインに供給するクロックの周波数を変化
させることで、プロセッサの処理速度を向上させる。
As described above, the present invention is provided with a decoder which decodes an instruction and outputs information on the time required for execution in each pipeline stage, and registers the time information in the register of each pipeline stage. A field to hold is provided so that time information flows along with the instruction in the pipeline stage, and the frequency of the clock supplied to the pipeline by the clock control circuit is changed according to the time information of each instruction held in each pipeline stage. By doing so, the processing speed of the processor is improved.

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

【図1】本発明のブロック図。FIG. 1 is a block diagram of the present invention.

【図2】本発明のデコーダを表す図。FIG. 2 is a diagram showing a decoder of the present invention.

【図3】本発明の動作タイミングを表す図。FIG. 3 is a diagram showing an operation timing of the present invention.

【図4】本発明のクロック制御回路の回路図。FIG. 4 is a circuit diagram of a clock control circuit of the present invention.

【図5】本発明のクロック制御回路の動作タイミングを
表す図。
FIG. 5 is a diagram showing the operation timing of the clock control circuit of the present invention.

【図6】時間情報フィールドの構成例を表す図。FIG. 6 is a diagram showing a configuration example of a time information field.

【図7】本発明の別の実施例を表す図。FIG. 7 is a diagram showing another embodiment of the present invention.

【図8】本発明のさらに別の実施例を表す図。FIG. 8 is a diagram showing still another embodiment of the present invention.

【図9】従来例のブロック図。FIG. 9 is a block diagram of a conventional example.

【図10】従来例の動作タイミングを表す図。FIG. 10 is a diagram showing operation timing of a conventional example.

【図11】従来例のクロック制御回路の回路図。FIG. 11 is a circuit diagram of a conventional clock control circuit.

【図12】従来例のクロック制御回路の動作タイミング
を表す図。
FIG. 12 is a diagram showing an operation timing of a clock control circuit of a conventional example.

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

313…デコーダ、 321…Eステージ入力レジスタ、 321a…Eステージ入力レジスタの時間情報フィール
ド、 331…Mステージ入力レジスタ、 331a…Mステージ入力レジスタの時間情報フィール
ド、 341…Wステージ入力レジスタ、 341a…Wステージ入力レジスタの時間情報フィール
ド、 351…クロック発生器、 353…クロック制御回路。
313 ... Decoder, 321 ... E stage input register, 321a ... E stage input register time information field, 331 ... M stage input register, 331a ... M stage input register time information field, 341 ... W stage input register, 341a ... W Time information field of stage input register, 351 ... Clock generator, 353 ... Clock control circuit.

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 複数のパイプラインステージを有し、ク
ロックに同期してパイプライン方式で命令を実行するマ
イクロプロセッサにおいて、 実行すべき命令を保持する命令レジスタと、 前記命令レジスタに保持されている命令をデコードする
とともに、その命令がそれ以降のパイプラインステージ
で実行するのに必要な時間の情報を次のパイプラインス
テージに出力する命令デコーダと、 前記各パイプラインステージに設けられ、前記命令デコ
ーダから出力され、命令の実行とともにパイプラインを
流れる前記時間情報を保持する保持手段と、 前記各パイプラインの保持手段に保持されている時間情
報に従って、前記各パイプラインステージに供給するク
ロックの周波数を変化させるクロック制御回路と、を具
備することを特徴とするマイクロプロセッサ。
1. In a microprocessor having a plurality of pipeline stages and executing instructions in a pipeline system in synchronization with a clock, an instruction register holding an instruction to be executed, and an instruction register held in the instruction register. An instruction decoder that decodes an instruction and outputs information on the time required for the instruction to execute in a subsequent pipeline stage to the next pipeline stage; and an instruction decoder provided in each pipeline stage, And a frequency of a clock to be supplied to each pipeline stage according to the time information held in the holding means of each pipeline and the holding means that outputs the time information flowing through the pipeline with the execution of the instruction. And a clock control circuit for changing the clock. Russia processor.
【請求項2】 前記命令デコーダと前記保持手段の間に
設けられ、前記命令デコーダの出力する時間情報と外部
から入力される制御情報を入力とし、前記命令がそれ以
降の各パイプラインステージで実行に必要な時間情報を
出力する制御回路をさらに具備することを特徴とする請
求項1記載のマイクロプロセッサ。
2. The instruction is provided between the instruction decoder and the holding means, and receives time information output from the instruction decoder and control information input from the outside, and the instruction is executed in each subsequent pipeline stage. The microprocessor according to claim 1, further comprising a control circuit that outputs time information necessary for the microprocessor.
【請求項3】 複数のパイプラインステージを有し、ク
ロックに同期してパイプライン方式で命令を実行するマ
イクロプロセッサにおいて、 実行すべき命令を保持する第1のレジスタと、 前記複数のパイプラインステージのいずれかで通常より
も長い実行時間を必要とする命令を指定する情報を保持
する第2のレジスタと、 前記命令レジスタに保持されている命令のマスクすべき
フィールドを指定する情報を保持する第3のレジスタ
と、 前記第1のレジスタの内容と前記第3のレジスタの内容
を入力とし、一部のフィールドがマスクされた情報を出
力するアンド回路と、 前記アンド回路の出力と前記第2のレジスタに保持され
ている情報を比較し、前記実行すべき命令をそれ以降の
各々のパイプラインステージで実行するのに必要な時間
の情報を出力する比較器と、 前記各パイプラインステージに設けられ、前記命令デコ
ーダから出力され、命令の実行とともにパイプラインを
流れる前記時間情報を保持する保持手段と、 前記各パイプラインの保持手段に保持されている時間情
報に従って、前記各パイプラインステージに供給するク
ロックの周波数を変化させるクロック制御回路と、を具
備することを特徴とするマイクロプロセッサ。
3. A microprocessor having a plurality of pipeline stages and executing instructions in a pipeline system in synchronization with a clock, a first register holding an instruction to be executed, and the plurality of pipeline stages. A second register that holds information that specifies an instruction that requires a longer execution time than usual, and a second register that holds information that specifies a field to be masked for the instruction held in the instruction register. A third register, an AND circuit that inputs the contents of the first register and the contents of the third register, and outputs information in which some fields are masked, the output of the AND circuit, and the second It compares the information held in the registers and determines the time required to execute the instruction to be executed in each subsequent pipeline stage. A comparator for outputting information, a holding unit provided in each of the pipeline stages for holding the time information output from the instruction decoder and flowing through the pipeline with execution of an instruction, and a holding unit for each of the pipelines. A clock control circuit that changes the frequency of the clock supplied to each of the pipeline stages according to the held time information.
【請求項4】 前記時間情報は、1ビットの情報からな
り、特定のパイプラインステージで前記命令が通常より
も長い実行時間を必要とするかどうかを示すことを特徴
とする請求項1記載のマイクロプロセッサ。
4. The time information comprises 1-bit information, and indicates whether or not the instruction requires a longer than usual execution time in a specific pipeline stage. Microprocessor.
【請求項5】 前記時間情報は、ある一つのパイプライ
ンステージを識別するための複数のビットからなり、そ
の時間情報を含む命令がその時間情報が示すパイプライ
ンステージに入った時、各パイプラインに供給されるク
ロックの周波数を下げることを特徴とする請求項1記載
のマイクロプロセッサ。
5. The time information comprises a plurality of bits for identifying a certain pipeline stage, and when an instruction including the time information enters a pipeline stage indicated by the time information, each pipeline 2. The microprocessor according to claim 1, wherein the frequency of the clock supplied to the microprocessor is reduced.
【請求項6】 前記時間情報は、パイプラインステージ
の数と同数のビットからなり、各々のビットが対応する
パイプラインステージで前記命令が通常よりも長い実行
時間を必要とするかどうかを示すことを特徴とする請求
項1記載のマイクロプロセッサ。
6. The time information comprises the same number of bits as the number of pipeline stages, each bit indicating whether the instruction requires a longer than normal execution time in the corresponding pipeline stage. The microprocessor according to claim 1, characterized in that:
【請求項7】 複数のパイプラインステージを有し、ク
ロックに同期してパイプライン方式で命令を実行するマ
イクロプロセッサにおいて、 デコーダは実行すべき命令をデコードするとともに、前
記命令がそれ以降の各々のパイプラインステージで実行
に必要な時間情報を出力し、 前記時間情報はパイプラインステージで保持されて、命
令とともにパイプラインを流れ、 各パイプラインステージに保持されている前記時間情報
に従ってパイプラインに供給するクロックの周波数を変
化させることを特徴とするマイクロプロセッサの処理方
法。
7. In a microprocessor having a plurality of pipeline stages and executing instructions in a pipeline system in synchronization with a clock, a decoder decodes an instruction to be executed, and the instruction decodes each subsequent instruction. Outputs time information required for execution in the pipeline stage, the time information is held in the pipeline stage, flows through the pipeline with the instruction, and is supplied to the pipeline according to the time information held in each pipeline stage. A method of processing a microprocessor, characterized in that the frequency of a clock to be used is changed.
【請求項8】 前記時間情報と外部から入力される制御
情報とから、その命令がそれ以降の各パイプラインステ
ージで実行に必要とされる時間情報を出力することを特
徴とする請求項7記載のマイクロプロセッサの処理法
法。
8. The time information required for execution of the instruction in each subsequent pipeline stage is output from the time information and control information input from the outside. Microprocessor processing method.
【請求項9】 複数のパイプラインステージを有し、ク
ロックに同期してパイプライン方式で命令を実装するマ
イクロプロセッサの処理方法であって、 実行すべき命令のビットパターンとマスクであるビット
パターンとの間でアンド演算を行い、 前記アンド演算の結果と複数のパイプラインステージの
いずれかで通常よりも長い実行時間を必要とする命令を
指定する情報とを比較し、 前記実行すべき命令がそれ以降の各パイプラインステー
ジの実行に必要とする時間情報を出力し、 複数のパイプラインステージに保持されている前記時間
情報に従ってパイプラインに供給するクロックの周波数
を変化させることを特徴とするマイクロプロセッサの処
理方法。
9. A processing method of a microprocessor having a plurality of pipeline stages and implementing instructions in a pipeline system in synchronization with a clock, comprising a bit pattern of an instruction to be executed and a bit pattern which is a mask. AND operation is performed between the two, and the result of the AND operation is compared with information specifying an instruction that requires a longer than usual execution time in any of a plurality of pipeline stages, and the instruction to be executed is A microprocessor characterized by outputting time information required for execution of each subsequent pipeline stage, and changing a frequency of a clock supplied to the pipeline according to the time information held in a plurality of pipeline stages. Processing method.
JP2934896A 1996-02-16 1996-02-16 Microprocessor and its processing method Pending JPH09223010A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2934896A JPH09223010A (en) 1996-02-16 1996-02-16 Microprocessor and its processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2934896A JPH09223010A (en) 1996-02-16 1996-02-16 Microprocessor and its processing method

Publications (1)

Publication Number Publication Date
JPH09223010A true JPH09223010A (en) 1997-08-26

Family

ID=12273728

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2934896A Pending JPH09223010A (en) 1996-02-16 1996-02-16 Microprocessor and its processing method

Country Status (1)

Country Link
JP (1) JPH09223010A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011081643A (en) * 2009-10-08 2011-04-21 Canon Inc Data processing apparatus including parallel processing circuit having a plurality of processing modules, and control method for the same
CN113076277A (en) * 2021-03-26 2021-07-06 大唐微电子技术有限公司 Method and device for realizing pipeline scheduling, computer storage medium and terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011081643A (en) * 2009-10-08 2011-04-21 Canon Inc Data processing apparatus including parallel processing circuit having a plurality of processing modules, and control method for the same
CN113076277A (en) * 2021-03-26 2021-07-06 大唐微电子技术有限公司 Method and device for realizing pipeline scheduling, computer storage medium and terminal
CN113076277B (en) * 2021-03-26 2024-05-03 大唐微电子技术有限公司 Method, device, computer storage medium and terminal for realizing pipeline scheduling

Similar Documents

Publication Publication Date Title
US6216223B1 (en) Methods and apparatus to dynamically reconfigure the instruction pipeline of an indirect very long instruction word scalable processor
US5710902A (en) Instruction dependency chain indentifier
US9329866B2 (en) Methods and apparatus for adapting pipeline stage latency based on instruction type
EP0368826A2 (en) Data processing circuit
US4459666A (en) Plural microcode control memory
JP4574493B2 (en) Processor system and multi-thread processor
US20030033503A1 (en) Single instruction having opcode and stack control field
US20240004663A1 (en) Processing device with vector transformation execution
JP3817436B2 (en) Processor and renaming device
JPH09223010A (en) Microprocessor and its processing method
JP2520882B2 (en) Data processing device and data processing method
JP3958239B2 (en) Microcontroller
JPH03271829A (en) Information processor
JPH09305401A (en) Computer and compiler
KR960016401B1 (en) Page selecting circuit of register pages using register page pointer
JPH0277940A (en) Data processor
JPH09101889A (en) Arithmetic unit for pipeline
JP2812610B2 (en) Pipeline control method
JP2000020309A (en) Digital signal processor
SU1262516A1 (en) Microprogram control device
JPS60250473A (en) Vector processor
JP2001184209A (en) Device and method for decoding instruction code
JP2543589B2 (en) Data processing device
JPS6221129B2 (en)
JPS60140465A (en) Vector processor