[go: up one dir, main page]

JPH04239919A - information processing equipment - Google Patents

information processing equipment

Info

Publication number
JPH04239919A
JPH04239919A JP704991A JP704991A JPH04239919A JP H04239919 A JPH04239919 A JP H04239919A JP 704991 A JP704991 A JP 704991A JP 704991 A JP704991 A JP 704991A JP H04239919 A JPH04239919 A JP H04239919A
Authority
JP
Japan
Prior art keywords
instruction
branch
branch destination
destination address
fetch
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
JP704991A
Other languages
Japanese (ja)
Inventor
Masashi Takahashi
真史 高橋
Yasuo Yamada
泰生 山田
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 JP704991A priority Critical patent/JPH04239919A/en
Publication of JPH04239919A publication Critical patent/JPH04239919A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】[発明の目的][Object of the invention]

【0002】0002

【産業上の利用分野】分岐命令の実行を高速に行う情報
処理装置に関する。
TECHNICAL FIELD The present invention relates to an information processing device that executes branch instructions at high speed.

【0003】0003

【従来の技術】近年LSI技術の進歩によって、高い処
理能力を1チップに集積した高性能マイクロプロセッサ
(以下、情報処理装置という)が数多く開発されている
。図4は従来の情報処理装置の構成を示すブロック図、
図5はこの情報処理装置による一般命令実行時の動作タ
イミング図である。
2. Description of the Related Art In recent years, with the advancement of LSI technology, many high-performance microprocessors (hereinafter referred to as information processing devices) that have high processing power integrated into a single chip have been developed. FIG. 4 is a block diagram showing the configuration of a conventional information processing device.
FIG. 5 is an operation timing chart when this information processing device executes a general instruction.

【0004】(1)メモリ制御部130により、フェッ
チ制御部132内のフェッチカウンタの示すメモリ番地
から命令がフェッチされ、命令キュー140に格納され
る。 (2)デコーダ110は、命令キュー140から命令を
取得、デコードし、命令長を生成する。 (3)実行部120は、デコーダ110からの処理コー
ド、レジスタコード、演算サイズをもとに演算を実行し
、さらにデコーダ110からの現実行命令長によってプ
ログラムカウンタを更新する。このように、デコードと
命令実行をパイプライン化することにより、一般命令の
高速処理を実現している。
(1) The memory control unit 130 fetches an instruction from the memory address indicated by the fetch counter in the fetch control unit 132 and stores it in the instruction queue 140. (2) The decoder 110 obtains an instruction from the instruction queue 140, decodes it, and generates an instruction length. (3) The execution unit 120 executes an operation based on the processing code, register code, and operation size from the decoder 110, and further updates the program counter based on the actual execution instruction length from the decoder 110. In this way, by pipelining decoding and instruction execution, high-speed processing of general instructions is achieved.

【0005】しかしながら、分岐命令が存在した場合に
は、分岐先命令の実行が高速に行えない。ここで、図6
のような分岐命令を含む命令列を実行した時の動作タイ
ミングを図7に示す。図6中、BRAが分岐命令、AD
Dが分岐先命令である。分岐命令時の処理手順は、次の
ようになる。 (1)データパス121において、現プログラムカウン
タ値に、命令コード中の分岐アドレスオフセットを加算
することにより、分岐先アドレスを算出する(図中のア
ドレス計算サイクル)。 (2)算出した分岐先アドレスを用いて、分岐先命令列
のフェッチをメモリ制御部130で行う(図中のフェッ
チ開始サイクル)。 (3)フェッチした分岐先命令列の実行を開始する(図
中のADD命令実行サイクル)。
However, if a branch instruction exists, the branch destination instruction cannot be executed at high speed. Here, Figure 6
FIG. 7 shows the operation timing when executing an instruction sequence including a branch instruction such as the following. In Figure 6, BRA is a branch instruction, AD
D is the branch destination instruction. The processing procedure for a branch instruction is as follows. (1) In the data path 121, a branch destination address is calculated by adding the branch address offset in the instruction code to the current program counter value (address calculation cycle in the figure). (2) Using the calculated branch destination address, the memory control unit 130 fetches the branch destination instruction sequence (fetch start cycle in the figure). (3) Start execution of the fetched branch destination instruction sequence (ADD instruction execution cycle in the figure).

【0006】ここで、データパス121において分岐先
アドレスが算出された後、分岐先命令列のフェッチ開始
が可能となっている。また、分岐先命令フェッチが可能
となった時には、分岐命令以後にフェッチした命令(以
下、旧命令と呼ぶ)をフェッチ中である。このため、速
やかに分岐先命令列のフェッチ(図中のADD命令フェ
ッチ)に移行できず、デコーダ110はアイドル状態に
なる。この結果、分岐命令の実行から分岐先命令例の実
行に移行するまでに多大な時間を要してしまう。
[0006] Here, after the branch destination address is calculated in the data path 121, it is possible to start fetching the branch destination instruction string. Furthermore, when it becomes possible to fetch a branch destination instruction, the instructions fetched after the branch instruction (hereinafter referred to as old instructions) are being fetched. For this reason, the decoder 110 cannot immediately proceed to fetching the branch destination instruction sequence (ADD instruction fetch in the figure), and the decoder 110 becomes idle. As a result, a large amount of time is required to transition from execution of the branch instruction to execution of the example branch destination instruction.

【0007】[0007]

【発明が解決しようとする課題】このように、従来の情
報処理装置では、データパスにおいて分岐先アドレスを
計算した後、分岐先命令列のフェッチが開始される。ま
た、旧命令列がフェッチ中であるために、分岐先命令列
へのフェッチが速やかに開始されない。これらにより、
分岐先命令列のフェッチ中に実行部がアイドル状態にな
る期間が長くなり、分岐先命令列への移行が大幅に遅れ
るという問題があった。
As described above, in the conventional information processing apparatus, after calculating the branch destination address in the data path, fetching of the branch destination instruction sequence is started. Furthermore, since the old instruction string is being fetched, fetching to the branch destination instruction string is not started immediately. With these,
There is a problem in that the execution unit remains in an idle state for a long time while fetching a branch destination instruction sequence, resulting in a significant delay in transition to the branch destination instruction sequence.

【0008】そこでこの発明は、このような従来の事情
に鑑みてなされたものであり、その目的とするところは
、分岐命令を認識すると直ちに旧命令列のフェッチを停
止し、同時に分岐先アドレスの計算をフェッチ制御部に
よって行うことにより、分岐命令の実行を大幅に高速化
することができる情報処理装置を提供することにある。
The present invention has been made in view of the above-mentioned conventional circumstances, and its purpose is to immediately stop fetching the old instruction sequence when a branch instruction is recognized, and at the same time to read the branch destination address. An object of the present invention is to provide an information processing device that can significantly speed up the execution of branch instructions by performing calculations using a fetch control unit.

【0009】[発明の構成][Configuration of the invention]

【0010】0010

【課題を解決するための手段】上記目的を達成するため
、この発明は、取得した命令が分岐命令であると認識す
ると、直ちに分岐命令以後の命令のフェッチ停止を指示
し、これと同時に分岐先アドレス計算を要求するデコー
ダと、このデコーダの指示によって分岐命令以後の命令
のフェッチを停止する命令フェッチ手段と、このデコー
ダの要求によって分岐先アドレス計算を実行する分岐先
アドレス計算手段とを備え、この分岐先アドレス計算手
段によって計算された分岐先アドレスの分岐先命令を前
記命令フェッチ手段がフェッチすることにより、分岐先
命令の実行を素早く行うことを特徴としている。
[Means for Solving the Problem] In order to achieve the above object, the present invention, upon recognizing that an acquired instruction is a branch instruction, immediately instructs to stop fetching of instructions after the branch instruction, and at the same time A decoder that requests address calculation, an instruction fetch means that stops fetching instructions after the branch instruction according to instructions from this decoder, and a branch destination address calculation means that executes branch destination address calculation according to a request from this decoder. The branch destination instruction is quickly executed by the instruction fetching device fetching the branch destination instruction at the branch destination address calculated by the branch destination address calculation device.

【0011】[0011]

【作用】上記構成により、この発明は、分岐命令デコー
ド開始と同時に、デコーダからフェッチ制御部に対して
旧命令列のフェッチ停止を指示する。また、これと同時
に、直ちに分岐先アドレスの計算をデコーダの要求によ
りフェッチ制御部で行う。計算された分岐先アドレスの
分岐先命令を、フェッチ制御部によってフェッチし、分
岐先命令の実行を素早く行っている。
With the above structure, the present invention instructs the fetch control unit from the decoder to stop fetching the old instruction sequence at the same time as branch instruction decoding starts. At the same time, the fetch control unit immediately calculates the branch destination address upon request from the decoder. The branch destination instruction at the calculated branch destination address is fetched by the fetch control unit, and the branch destination instruction is quickly executed.

【0012】0012

【実施例】以下、図面を参照しながらこの発明の実施例
を説明する。この発明の情報処理装置の全体構成は、図
4で示したものと同一である。図4で示した情報処理装
置は、デコーダ110、実行部120、メモリ制御部1
30、命令キュー140から構成されている。
Embodiments Hereinafter, embodiments of the present invention will be described with reference to the drawings. The overall configuration of the information processing device of this invention is the same as that shown in FIG. The information processing device shown in FIG. 4 includes a decoder 110, an execution unit 120, a memory control unit 1
30 and an instruction queue 140.

【0013】デコーダ110は、デコードする機械語命
令コードを一時保持する命令レジスタ111、デコード
の状態遷移を制御するデコードシーケンサ112、所定
の状態で所定の制御信号を生成する制御信号生成部11
3から構成される。制御信号生成部113は、命令レジ
スタ111からの機械語命令コード、デコードシーケン
サ112からの状態番号に従って、所定の制御信号を生
成する。制御信号生成部113からは、実行シーケンサ
122に対しては、命令処理コード、レジスタコード、
命令長を出力する。また、メモリ制御部130に対して
は、フェッチ開始指示、及びこの発明の特徴となるフェ
ッチ停止指示等の制御信号を出力する。また、命令レジ
スタ111から、命令コード中に存在するイミディエー
トデータ、ジャンプ先アドレスが、制御信号生成部11
3による指示でデータパス121内のリテラルバッファ
とフェッチ制御部132に転送される。
The decoder 110 includes an instruction register 111 that temporarily holds a machine language instruction code to be decoded, a decode sequencer 112 that controls decoding state transitions, and a control signal generator 11 that generates a predetermined control signal in a predetermined state.
Consists of 3. The control signal generation unit 113 generates a predetermined control signal according to the machine language instruction code from the instruction register 111 and the state number from the decode sequencer 112. The control signal generation unit 113 sends instruction processing code, register code,
Outputs the instruction length. Furthermore, control signals such as a fetch start instruction and a fetch stop instruction, which is a feature of the present invention, are output to the memory control unit 130. Further, from the instruction register 111, the immediate data and jump destination address present in the instruction code are transferred to the control signal generation unit 11.
3, the data is transferred to the literal buffer in the data path 121 and the fetch control unit 132.

【0014】デコーダ110では次の処理を行う。 (1)命令キュー140に対して命令取得を要求し、命
令を取得してデコードする。2ワード目、3ワード目が
必要な場合は、さらに命令キュー140に取得要求を出
す。 (2)命令キュー140から取得した命令に、ディスプ
レースメント、イミディエートデータが含まれている場
合、これをデータパス121内のリテラルバッファに格
納する。 (3)分岐命令、シャンプ命令をデコードすると、直ち
にフェッチストップ、キュークリア指示を出す。さらに
、可能ならば分岐先アドレス計算、分岐先命令列のフェ
ッチ開始をメモリ制御部130に要求する。 (4)条件付き分岐命令時に条件判断を行い、条件成立
時はメモリ制御部130に分岐先命令列のフェッチ開始
を要求する。
The decoder 110 performs the following processing. (1) A request is made to the instruction queue 140 to obtain an instruction, and the instruction is obtained and decoded. If the second and third words are required, an acquisition request is further issued to the instruction queue 140. (2) If the instruction obtained from the instruction queue 140 includes displacement and immediate data, store this in the literal buffer in the data path 121. (3) Immediately after decoding a branch instruction or shampoo instruction, a fetch stop or queue clear instruction is issued. Furthermore, if possible, it requests the memory control unit 130 to calculate the branch destination address and start fetching the branch destination instruction string. (4) A condition is determined at the time of a conditional branch instruction, and when the condition is satisfied, a request is made to the memory control unit 130 to start fetching the branch destination instruction sequence.

【0015】実行部120は、データパス121と実行
シーケンサ122とから構成され、デコーダ110で機
械語命令をデコードして得られた処理コードをもとに、
演算を実行するブロックである。データパス121は、
各種レジスタ、演算器、バス、リテラルバッファなとか
ら構成される。また、実行シーケンサ122は、状態遷
移回路と制御信号生成回路から構成されるが、マイクロ
プログラム構成にしても差し支えない。データパス12
1では、実行シーケンサ122によって、演算レジスタ
や演算器が制御されて演算が行われる。また、実行シー
ケンサ122の制御によってメモリ制御部130内のプ
ログラムカウンタが更新される。実行シーケンサ122
は、デコーダ110からの処理コードにしたがって状態
遷移を起動し、所定の状態でデータパス121を制御す
るための制御信号、あるいはデータアクセス制御部13
1に対するメモリアクセス要求を出力する。
The execution unit 120 is composed of a data path 121 and an execution sequencer 122, and based on the processing code obtained by decoding the machine language instruction with the decoder 110,
This is a block that executes calculations. The data path 121 is
It consists of various registers, arithmetic units, buses, and literal buffers. Furthermore, although the execution sequencer 122 is composed of a state transition circuit and a control signal generation circuit, it may also be configured as a microprogram. data path 12
1, an execution sequencer 122 controls arithmetic registers and arithmetic units to perform arithmetic operations. Furthermore, the program counter in the memory control unit 130 is updated under the control of the execution sequencer 122. Execution sequencer 122
is a control signal for starting a state transition according to a processing code from the decoder 110 and controlling the data path 121 in a predetermined state, or a data access control unit 13
Outputs a memory access request for 1.

【0016】メモリ制御部130は、データアクセス制
御部131と、詳細は後述するフェッチ制御部132と
から構成される。データアクセス制御部131は、メモ
リバスのタイミングサイクルを管理している。実行シー
ケンサ122の指示によって、指定されたアドレスに対
して演算データのメモリへの読み書きを行う。実行シー
ケンサ122からメモリアクセスの指示がなく、さらに
命令キュー140に空きがあるときは、フェッチ制御部
132内のフェッチカウンタ値をアドレスとして命令フ
ェッチを行い、命令キュー140に格納するとともに、
フェッチカウンタをインクリメントするようフェッチ制
御部132に指示を出す。
The memory control section 130 is composed of a data access control section 131 and a fetch control section 132, the details of which will be described later. The data access control unit 131 manages timing cycles of the memory bus. According to instructions from the execution sequencer 122, calculation data is read from and written to the memory at a specified address. When there is no memory access instruction from the execution sequencer 122 and there is space in the instruction queue 140, an instruction is fetched using the fetch counter value in the fetch control unit 132 as an address and stored in the instruction queue 140.
An instruction is issued to the fetch control unit 132 to increment the fetch counter.

【0017】命令キュー140は、FIFO(Firs
t_In,First_Out)構成であり、フェッチ
された命令をデータアクセス制御部131の制御によっ
て格納し、デコーダ110から要求があればデコーダ1
10に対して命令を出力する。
The instruction queue 140 is a FIFO (Firs
t_In, First_Out) configuration, the fetched instruction is stored under the control of the data access control unit 131, and if there is a request from the decoder 110, the fetched instruction is stored in the decoder 1.
Outputs the command to 10.

【0018】図1は、フェッチ制御部132の詳細構成
を示すブロック図である。このフェッチ制御部132は
、プログラムカウンタ11、プログラムカウンタ更新器
12、この発明の中心となる分岐先アドレス加算器13
、フェッチカウンタ14、フェッチカウンタ更新器15
、及びMUX(マルチプレクサ)16,17から構成さ
れる。
FIG. 1 is a block diagram showing the detailed configuration of the fetch control section 132. The fetch control unit 132 includes a program counter 11, a program counter updater 12, and a branch destination address adder 13, which is the core of this invention.
, fetch counter 14, fetch counter updater 15
, and MUX (multiplexers) 16 and 17.

【0019】プログラムカウンタ(以下、PCと略す)
11は、実行部120で現在実行中の命令アドレスを示
す。プログラムカウンタ更新器12は、現実行命令長を
PC11に加算し、次実行命令、すなわち現在デコード
中の命令のアドレス(以下、次PC値と呼ぶ)を出力す
る。通常の連続した命令列を実行する場合は、1つの命
令実行終了ごとに、実行シーケンサ122によって、P
C11が次PC値で更新される。分岐命令等の実行によ
って、実行命令列が不連続になる場合は、実行シーケン
サ122の制御でデータパス121内で演算された新P
C値が内部データバスを介して転送され、この値でPC
11を更新する。
[0019] Program counter (hereinafter abbreviated as PC)
11 indicates the address of the instruction currently being executed by the execution unit 120. The program counter updater 12 adds the actual executed instruction length to the PC 11 and outputs the address of the next executed instruction, that is, the instruction currently being decoded (hereinafter referred to as the next PC value). When executing a normal continuous instruction sequence, the execution sequencer 122 selects P
C11 is updated with the next PC value. When the execution instruction sequence becomes discontinuous due to the execution of a branch instruction, etc., the new P
C value is transferred via the internal data bus, and with this value the PC
Update 11.

【0020】フェッチカウンタ(以下、FCと略す)1
4は、PC11とは独立に更新される。通常の連続した
命令をフェッチ中は、1命令フェッチされるごとにデー
タアクセス制御部131の制御によってフェッチカウン
タ更新器15の出力値で1ワードずつ更新される。分岐
命令デコード時は、デコーダ110の指示によって分岐
先アドレス加算器13の出力がFC14に格納される。 分岐先アドレス加算器13は、次PC値に、命令デコー
ド中の分岐オフセットの存在するビット領域を常に加算
する構成となっている。なお、分岐先アドレスのベース
として次PC値を用いるのは、分岐命令デコード時は、
分岐命令のアドレスは次PC値で示されるからである。 この分岐先アドレス加算器13を備えたことにより、命
令デコード開始と同時に、分岐先アドレスの計算が並行
して開始される。デコードした命令が分岐命令であれば
、分岐先アドレス加算器13の出力をFC14に格納す
るよう、FC14入力段のマルチプレクサ17を制御す
る。分岐命令以外の場合は無意味な加算を行うことにな
るが、加算結果はそのまま捨てられ、PC11をインク
リメントした値で更新するようマルチプレクサ16が制
御される。
[0020] Fetch counter (hereinafter abbreviated as FC) 1
4 is updated independently of the PC 11. During normal fetching of consecutive instructions, each word is updated by the output value of the fetch counter updater 15 under the control of the data access control unit 131 every time one instruction is fetched. When decoding a branch instruction, the output of the branch destination address adder 13 is stored in the FC 14 according to instructions from the decoder 110. The branch destination address adder 13 is configured to always add a bit area in which a branch offset exists during instruction decoding to the next PC value. Note that the next PC value is used as the base of the branch destination address when decoding a branch instruction.
This is because the address of the branch instruction is indicated by the next PC value. By providing this branch destination address adder 13, calculation of the branch destination address is started in parallel with the start of instruction decoding. If the decoded instruction is a branch instruction, the multiplexer 17 at the input stage of the FC 14 is controlled so that the output of the branch destination address adder 13 is stored in the FC 14 . In cases other than branch instructions, meaningless addition is performed, but the addition result is discarded as is, and the multiplexer 16 is controlled to update the PC 11 with the incremented value.

【0021】次に、この発明の情報処理装置による分岐
命令処理の動作について説明する。図6で示した命令列
を実行した時の動作タイミング図を、図2及び図3に示
す。 (1)デコーダ110の命令レジスタ111が、命令の
デコードを開始する。デコーダ110は、この命令が分
岐命令であることを認識すると、メモリ制御部130に
対して新たなフェッチに入らないようにフェッチ停止指
示を出すと共に、命令キュー140をクリアする。新た
なフェッチに入ってしまっている場合でも、フェッチさ
れたデータは命令キュー140には格納されない。さら
に、デコーダ110は、分岐先アドレスオフセットをデ
ータパス121内のリテラルバッファに格納する(図2
及び図3中のフェッチ停止サイクル)。
Next, the operation of branch instruction processing by the information processing apparatus of the present invention will be explained. Operation timing diagrams when the instruction sequence shown in FIG. 6 is executed are shown in FIGS. 2 and 3. (1) The instruction register 111 of the decoder 110 starts decoding an instruction. When the decoder 110 recognizes that this instruction is a branch instruction, it issues a fetch stop instruction to the memory control unit 130 so as not to enter a new fetch, and clears the instruction queue 140. The fetched data is not stored in the instruction queue 140 even if it has entered a new fetch. Further, the decoder 110 stores the branch destination address offset in a literal buffer in the data path 121 (see FIG.
and the fetch stop cycle in FIG. 3).

【0022】デコーダ110によるフェッチ停止指示と
並行して、フェッチ制御部132内の分岐先アドレス加
算器13により、分岐先アドレスオフセットと次PC値
との加算が開始される。分岐命令コード中の分岐先アド
レスオフセットの存在するビット位置は決まっているの
で、分岐先アドレス加算器13は、この命令が分岐命令
であるか否かにかかわらず、常に分岐先アドレスオフセ
ットの存在するビット領域と次PC値との加算を行う。 従って、分岐命令でない場合はまったく無意味な演算を
行うことになるが、分岐命令の場合は、データパス12
1による実行時の分岐先アドレス計算を開始する以前に
、フェッチ制御部132によるフェッチするための分岐
先アドレスを算出する。このクロックサイクル中に、フ
ェッチするための分岐先アドレスがFC14に格納され
る(同図中のアドレス計算サイクル)。
In parallel with the fetch stop instruction from the decoder 110, the branch destination address adder 13 in the fetch control unit 132 starts adding the branch destination address offset and the next PC value. Since the bit position where the branch destination address offset exists in the branch instruction code is fixed, the branch destination address adder 13 always detects the presence of the branch destination address offset regardless of whether this instruction is a branch instruction or not. Adds the bit area and the next PC value. Therefore, if it is not a branch instruction, a completely meaningless operation will be performed, but if it is a branch instruction, the data path 12
1, the branch destination address for fetching by the fetch control unit 132 is calculated before starting the branch destination address calculation during execution. During this clock cycle, a branch destination address for fetching is stored in the FC 14 (address calculation cycle in the figure).

【0023】(2)デコーダ110は、フェッチ制御部
132に対して分岐先命令列のフェッチ開始指示を出す
。フェッチ制御部132では、旧命令のフェッチによる
メモリアクセスが終了するまで待機し、メモリアクセス
が終了していれば分岐先命令列のフェッチを開始する。 すでに(1)で旧命令列のフェッチ停止指示を出してい
るので、分岐先命令列のフェッチ開始を素早く行える(
同図中のフェッチ開始サイクル)。 (3)デコーダ110から実行シーケンサ122に対し
て、分岐命令の処理コードが転送される。その後、命令
キュー140に分岐先命令がフェッチされてくるので、
ここから分岐先命令シーケンスのデコードが開始される
(同図中の実行部への指示サイクル)。
(2) The decoder 110 issues an instruction to the fetch control unit 132 to start fetching the branch destination instruction sequence. The fetch control unit 132 waits until the memory access by fetching the old instruction is completed, and if the memory access is completed, starts fetching the branch destination instruction sequence. Since we have already issued an instruction to stop fetching the old instruction string in (1), we can quickly start fetching the branch destination instruction string (
(fetch start cycle in the same figure). (3) The processing code of the branch instruction is transferred from the decoder 110 to the execution sequencer 122. After that, the branch destination instruction is fetched into the instruction queue 140, so
From here, decoding of the branch destination instruction sequence starts (instruction cycle to the execution unit in the figure).

【0024】次に、分岐命令の処理コードを渡された実
行部120での処理について説明する。 (4)実行シーケンサ122の指示で、データパス12
1内においてリテラルバッファに格納されている分岐先
アドレスオフセットとPC値を加算し、実行時の分岐先
アドレスを算出する。 (5)算出した分岐先アドレスを、フェッチ制御部13
2内のPC11に格納する。これにより、分岐先命令が
実行される(同図中のADD命令実行サイクル)。
Next, a description will be given of the processing performed by the execution unit 120 to which the processing code for the branch instruction is passed. (4) Based on instructions from the execution sequencer 122, the data path 12
1, the branch destination address offset stored in the literal buffer and the PC value are added to calculate the branch destination address at the time of execution. (5) The calculated branch destination address is sent to the fetch control unit 13
The data is stored in the PC 11 in the PC 2. As a result, the branch destination instruction is executed (ADD instruction execution cycle in the figure).

【0025】図2及び図3から分かるように、タイミン
グの違いによりフェッチとデコードの位相関係がいずれ
であっても、分岐命令によるデコード上のロスは1クロ
ックに抑えられている。図7で示した従来のタイミング
と比較すると、デコードと同時に旧命令のフェッチが停
止されると同時にアドレス計算されるため、デコード上
のアイドルが短縮されている。この結果、BRA命令の
実行からADD命令の実行まで、従来は5クロック待ち
時間があったのに対し、この発明では2クロックに短縮
されている。
As can be seen from FIGS. 2 and 3, regardless of the phase relationship between fetch and decoding due to the difference in timing, the loss in decoding due to a branch instruction is suppressed to one clock. Compared to the conventional timing shown in FIG. 7, since the fetch of the old instruction is stopped at the same time as decoding, and the address is calculated at the same time, the idle period during decoding is shortened. As a result, while conventionally there was a waiting time of 5 clocks from the execution of the BRA instruction to the execution of the ADD instruction, this is shortened to 2 clocks in the present invention.

【0026】以上のように、デコーダ110が分岐命令
を認識した時点で直ちに旧命令のフェッチを中止するこ
とにより、分岐先命令列へのフェッチに速やかに移行で
きる。さらに、分岐先アドレス加算器13によってフェ
ッチするための分岐先アドレスを直ちに求めることがで
きるので、分岐先命令列のフェッチにすばやく移行でき
る。これらにより、分岐命令の高速化が実現できる。
As described above, by immediately stopping the fetching of the old instruction when the decoder 110 recognizes a branch instruction, it is possible to quickly move on to fetching the branch destination instruction sequence. Furthermore, since the branch destination address for fetching can be immediately obtained by the branch destination address adder 13, it is possible to quickly move to fetching the branch destination instruction string. With these, speeding up of branch instructions can be realized.

【0027】なおこの発明は、分岐命令のみならず、分
岐サブルーチン命令の高速化にもそのまま用いることが
できる。また、絶対アドレス指定ジャンプ命令、ジャン
プサブルーチン命令では、分岐先アドレス加算器13は
用いないが、それ以外の高速化手法、例えばジャンプ命
令デコード開始と同時に旧命令列のフェッチを停止する
といった手法はそのまま応用することができる。また、
条件付き分岐命令にもそのまま応用できる。この場合、
条件付き分岐命令デコード開始と同時にフェッチ停止、
分岐先アドレス計算を行うのは同様で、デコードが条件
判定を行い、条件成立ならば算出した分岐先アドレスで
フェッチを開始し、条件成立ならば、通常通りインクリ
メントしたフェッチアドレスでフェッチを開始すればよ
い。これらの命令を併せた出現頻度は比較的高いので、
この発明は全体の処理速度の向上にもつながる。
The present invention can be used as is to speed up not only branch instructions but also branch subroutine instructions. Furthermore, although the branch destination address adder 13 is not used for absolute addressing jump instructions and jump subroutine instructions, other speed-up techniques, such as stopping the fetching of the old instruction sequence at the same time as jump instruction decoding starts, can be used as is. It can be applied. Also,
It can also be applied directly to conditional branch instructions. in this case,
Fetch stops at the same time as conditional branch instruction decoding starts,
The calculation of the branch destination address is the same, and the decode judges the condition, and if the condition is met, it starts fetching with the calculated branch destination address, and if the condition is met, it starts fetching with the incremented fetch address as usual. good. Since the frequency of appearance of these instructions together is relatively high,
This invention also leads to improvement in overall processing speed.

【0028】また、この発明は、今回の実施例で述べた
構成に限定されるものではない。例えば、今回の実施例
では、デコードシーケンサ112と実行シーケンサ12
2を分離させたが、従来通りこれらを1つに統合したま
までも同様な効果を得ることができる。この場合、分岐
先アドレス計算のベースはプログラムカウンタ値になる
。命令実行と同時に旧命令フェッチを停止し、分岐専用
加算器で分岐先アドレスを計算する。デコーダ110を
分離させた場合よりも処理速度は低下するが、これらの
対策を施さない場合と比較すると大幅な速度向上が期待
できる。
Furthermore, the present invention is not limited to the configuration described in this embodiment. For example, in this embodiment, the decode sequencer 112 and the execution sequencer 12
Although the two are separated, the same effect can be obtained even if they are integrated into one as in the past. In this case, the basis for calculating the branch destination address is the program counter value. The old instruction fetch is stopped at the same time as the instruction is executed, and the branch destination address is calculated using the branch-dedicated adder. Although the processing speed will be lower than when the decoder 110 is separated, a significant speed improvement can be expected compared to when these measures are not taken.

【0029】[0029]

【発明の効果】以上で述べたように、この発明の情報処
理装置によれば、分岐命令をデコーダが認識した時点で
、分岐命令以後の命令列のフェッチを停止し、さらに分
岐命令のデコードと並行してフェッチ制御部において分
岐先アドレスを算出するようにした。これにより、分岐
先命令列のフェッチに直ちに移行することができ、分岐
命令の大幅な高速化が実現できる。
As described above, according to the information processing device of the present invention, when the decoder recognizes a branch instruction, it stops fetching the instruction sequence after the branch instruction, and further decodes the branch instruction. The branch destination address is calculated in parallel in the fetch control unit. As a result, it is possible to immediately proceed to fetching the branch destination instruction sequence, and it is possible to realize a significant increase in the speed of branch instructions.

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

【図1】この発明の情報処理装置の特徴となるフェッチ
制御部のブロック図である。
FIG. 1 is a block diagram of a fetch control unit that is a feature of an information processing device of the present invention.

【図2】この発明により分岐命令を実行した時のタイミ
ング図である。
FIG. 2 is a timing diagram when a branch instruction is executed according to the present invention.

【図3】図2よりも位相がずれた時のタイミング図であ
る。
FIG. 3 is a timing diagram when the phase is shifted from that in FIG. 2;

【図4】従来の情報処理装置のブロック図である。FIG. 4 is a block diagram of a conventional information processing device.

【図5】従来の情報処理装置による一般命令実行時のタ
イミング図である。
FIG. 5 is a timing diagram when a general instruction is executed by a conventional information processing device.

【図6】分岐命令を含む命令列の一例である。FIG. 6 is an example of an instruction sequence including a branch instruction.

【図7】従来の情報処理装置による分岐命令実行時のタ
イミング図である。
FIG. 7 is a timing diagram when a conventional information processing device executes a branch instruction.

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

11  プログラムカウンタ 12  プログラムカウンタ更新器 13  分岐先アドレス加算器 14  フェッチカウンタ 15  フェッチカウンタ更新器 16,17  MUX(マルチプレクサ)110  デ
コーダ 111  命令レジスタ 112  デコードシーケンサ 113  制御信号生成部 120  実行部 121  データパス 122  実行シーケンサ 130  メモリ制御部 131  データアクセス制御部 132  フェッチ制御部 140  命令キュー
11 Program counter 12 Program counter updater 13 Branch destination address adder 14 Fetch counter 15 Fetch counter updater 16, 17 MUX (multiplexer) 110 Decoder 111 Instruction register 112 Decode sequencer 113 Control signal generation unit 120 Execution unit 121 Data path 122 Execution Sequencer 130 Memory control unit 131 Data access control unit 132 Fetch control unit 140 Instruction queue

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  取得した命令が分岐命令であると認識
すると、直ちに分岐命令以後の命令のフェッチ停止を指
示し、これと同時に分岐先アドレス計算を要求するデコ
ーダと、このデコーダの指示によって分岐命令以後の命
令のフェッチを停止する命令フェッチ手段と、このデコ
ーダの要求によって分岐先アドレス計算を実行する分岐
先アドレス計算手段とを備え、この分岐先アドレス計算
手段によって計算された分岐先アドレスの分岐先命令を
前記命令フェッチ手段がフェッチすることにより、分岐
先命令の実行を素早く行うことを特徴とする情報処理装
置。
1. A decoder that, upon recognizing that the acquired instruction is a branch instruction, immediately instructs to stop fetching instructions after the branch instruction and simultaneously requests calculation of a branch destination address; The branch destination of the branch destination address calculated by the branch destination address calculation device is provided with an instruction fetch unit that stops fetching of subsequent instructions, and a branch destination address calculation unit that executes branch destination address calculation according to a request from the decoder. An information processing device characterized in that a branch destination instruction is quickly executed by fetching the instruction by the instruction fetching means.
JP704991A 1991-01-24 1991-01-24 information processing equipment Pending JPH04239919A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP704991A JPH04239919A (en) 1991-01-24 1991-01-24 information processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP704991A JPH04239919A (en) 1991-01-24 1991-01-24 information processing equipment

Publications (1)

Publication Number Publication Date
JPH04239919A true JPH04239919A (en) 1992-08-27

Family

ID=11655204

Family Applications (1)

Application Number Title Priority Date Filing Date
JP704991A Pending JPH04239919A (en) 1991-01-24 1991-01-24 information processing equipment

Country Status (1)

Country Link
JP (1) JPH04239919A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009059246A (en) * 2007-08-31 2009-03-19 Toshiba Corp Microprocessor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009059246A (en) * 2007-08-31 2009-03-19 Toshiba Corp Microprocessor
US8131977B2 (en) 2007-08-31 2012-03-06 Kabushiki Kaisha Toshiba Microprocessor inhibiting instruction storage in cache and not decoding based on pre-analysis information to reduce power consumption

Similar Documents

Publication Publication Date Title
JPH09120360A (en) Data processor having execution unit for executing load instruction and method of operating the same
US4897787A (en) Data processing system
JP5209933B2 (en) Data processing device
EP1241567B1 (en) Method and apparatus for executing coprocessor instructions
JP2693678B2 (en) Data processing device
US5390305A (en) Information processing apparatus capable of executing exception at high speed
JP2987311B2 (en) Processor and translation device
JPH03233630A (en) Information processor
JPH04239919A (en) information processing equipment
EP1177499B1 (en) Processor and method of executing instructions from several instruction sources
JPS6049337B2 (en) Pipeline control method
US5187782A (en) Data processing system
JP2583506B2 (en) Data processing device
JPH0651984A (en) Microprocessor
JP2002182902A (en) Memory data access structure and its method
JPH0338727A (en) Resources interference controller and data processor
US5062036A (en) Instruction prefetcher
JP2545594B2 (en) Operand data prefetching method
JP2636074B2 (en) Microprocessor
JPH04213120A (en) information processing equipment
JPH05150978A (en) Processor
JP2001034474A (en) Data processor and data processing method
JPH0317135B2 (en)
JPS62189535A (en) microprocessor controller
JP2004062427A (en) Microprocessor