JP6314620B2 - Arithmetic processing device and control method of arithmetic processing device - Google Patents

Arithmetic processing device and control method of arithmetic processing device Download PDF

Info

Publication number
JP6314620B2
JP6314620B2 JP2014081872A JP2014081872A JP6314620B2 JP 6314620 B2 JP6314620 B2 JP 6314620B2 JP 2014081872 A JP2014081872 A JP 2014081872A JP 2014081872 A JP2014081872 A JP 2014081872A JP 6314620 B2 JP6314620 B2 JP 6314620B2
Authority
JP
Japan
Prior art keywords
instruction
completion
unit
information
signal
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.)
Active
Application number
JP2014081872A
Other languages
Japanese (ja)
Other versions
JP2015203914A (en
Inventor
敦史 伏島
敦史 伏島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2014081872A priority Critical patent/JP6314620B2/en
Publication of JP2015203914A publication Critical patent/JP2015203914A/en
Application granted granted Critical
Publication of JP6314620B2 publication Critical patent/JP6314620B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Advance Control (AREA)

Description

本発明は、演算処理装置および演算処理装置の制御方法に関する。   The present invention relates to an arithmetic processing unit and a control method for the arithmetic processing unit.

プロセッサ等の演算処理装置は、例えば、命令デコーダと、演算を実行する演算器と、コミットスタックエントリ(CSE:Commit Stack Entry)と、リザベーションステーション(RS:Reservation Station)とを有する(例えば、特許文献1参照)。例えば、命令デコーダは、命令キャッシュメモリから受信した命令をインオーダでデコードする。   An arithmetic processing unit such as a processor includes, for example, an instruction decoder, an arithmetic unit that executes an operation, a commit stack entry (CSE), and a reservation station (RS) (for example, Patent Documents). 1). For example, the instruction decoder decodes an instruction received from the instruction cache memory in order.

コミットスタックエントリは、例えば、命令を完了させるための命令完了処理に用いられるバッファである。命令完了処理は、例えば、命令の実行結果をレジスタ等に反映する制御である。また、リザベーションステーションは、例えば、固定小数点演算命令、浮動小数点演算命令等の命令種別毎に設けられ、アウトオブオーダ実行を制御する。例えば、アウトオブオーダ実行では、プログラム順に拘わらず実行可能な命令から実行される。   The commit stack entry is, for example, a buffer used for instruction completion processing for completing an instruction. The instruction completion process is, for example, control that reflects the execution result of the instruction in a register or the like. The reservation station is provided for each instruction type, such as a fixed-point arithmetic instruction and a floating-point arithmetic instruction, and controls out-of-order execution. For example, in out-of-order execution, execution is performed from an executable instruction regardless of the program order.

例えば、演算処理装置は、命令デコーダでデコードした全ての命令を、命令順にインオーダでコミットスタックエントリに登録するとともに、各リザベーションステーションに登録する。各リザベーションステーションは、実行可能な状態の命令をアウトオブオーダで選択する。そして、例えば、演算器は、リザベーションステーションで選択された命令を実行する。   For example, the arithmetic processing unit registers all instructions decoded by the instruction decoder in the commit stack entry in the order of instructions and registers them in each reservation station. Each reservation station selects an executable instruction out of order. Then, for example, the computing unit executes the instruction selected by the reservation station.

ここで、浮動小数点演算等の演算処理では、オーバーフロー等の例外が発生する場合がある。このため、演算結果に基づいて検出されるオーバーフロー等を表示するフラグを検査して例外処理が必要か否かを判定する浮動小数点演算装置が提案されている(例えば、特許文献2参照)。以下、演算処理により発生する例外を演算例外とも称する。   Here, in arithmetic processing such as floating point arithmetic, exceptions such as overflow may occur. For this reason, a floating-point arithmetic device has been proposed that determines whether or not exception processing is necessary by inspecting a flag that displays an overflow or the like detected based on the operation result (see, for example, Patent Document 2). Hereinafter, an exception generated by the calculation process is also referred to as a calculation exception.

例えば、演算例外の検出が抑止されている場合、コミットスタックエントリは、演算器による演算の完了を示す演算完了情報を受信したとき、演算完了情報に対応する命令に関する情報を演算の完了を示す情報に更新する。例えば、演算処理装置が所定のクロックのサイクルで動作している場合、演算の完了を示す情報に更新された命令の情報は、情報を更新したサイクルの次のサイクル以降に、インオーダでコミットスタックエントリから読み出される。例えば、コミットスタックエントリから読み出された命令の情報に基づいて、命令完了処理がインオーダで実行される。   For example, when the detection of an operation exception is suppressed, when the commit stack entry receives operation completion information indicating completion of an operation by the operation unit, information regarding an instruction corresponding to the operation completion information is displayed as information indicating the completion of the operation. Update to For example, when the arithmetic processing unit is operating in a cycle of a predetermined clock, the information of the instruction updated to the information indicating the completion of the operation is the commit stack entry in-order after the cycle after the information is updated. Read from. For example, the instruction completion process is executed in order based on the information of the instruction read from the commit stack entry.

なお、遅延スロットを持つ命令を処理するパイプライン方式の情報処理装置では、フラグレジスタの状態により、遅延命令の直後の割り込みを有効または無効に切り替える割り込み処理方法が提案されている(例えば、特許文献3参照)。フラグレジスタの状態は、例えば、ソフトウエアで設定可能である。   Note that, in a pipelined information processing apparatus that processes an instruction having a delay slot, an interrupt processing method has been proposed in which an interrupt immediately after a delay instruction is enabled or disabled depending on the state of a flag register (for example, Patent Documents). 3). The state of the flag register can be set by software, for example.

特開2011−8732号公報JP 2011-8732 A 特開平5−143320号公報JP-A-5-143320 特開2007−188527号公報JP 2007-188527 A

演算器が演算完了情報を出力したサイクルで、コミットスタックエントリに登録されている命令の情報が読み出された場合、読み出された命令の情報には、演算完了情報の内容(演算の完了)は、反映されていない。このため、命令完了処理の実行は、演算例外の検出が抑止されている場合でも、コミットスタックエントリに登録されている命令の情報が演算の完了を示す情報に更新されるまで待たされる。   If the instruction information registered in the commit stack entry is read in the cycle in which the arithmetic unit outputs the operation completion information, the read instruction information includes the content of the operation completion information (completion of operation). Is not reflected. For this reason, the execution of the instruction completion process is waited until the information of the instruction registered in the commit stack entry is updated to information indicating the completion of the operation even when the detection of the operation exception is suppressed.

1つの側面では、本件開示の演算処理装置および演算処理装置の制御方法は、演算例外の検出が抑止されている場合に、演算器が演算完了情報を出力してから命令完了処理を実行するまでの時間を短縮することである。   In one aspect, the arithmetic processing device and the control method for the arithmetic processing device disclosed in the present disclosure are from when the arithmetic unit outputs the operation completion information to when executing the instruction completion processing when detection of the operation exception is suppressed. It is to shorten the time.

一観点によれば、演算処理装置は、命令をデコードするデコード部と、デコードされた命令に基づく演算を実行する演算部と、命令を完了させる命令完了処理をデコードされた順に実行する完了制御部とを有し、完了制御部は、デコードされた命令がデコードされた順に登録され、登録された命令に基づく演算が完了したか否か示す状態情報を保持し、演算部による演算の完了を示す演算完了情報を受信した場合、演算完了情報が示す命令の状態情報を、演算の完了を示す情報に更新する保持部と、命令完了処理の対象となる命令を、デコードされた順に保持部から読み出す選択部と、演算処理により発生する例外の検出が抑止され、かつ、演算部から出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報を生成するバイパス部と、演算の完了を示すバイパス情報が生成された命令に対してはバイパス情報に基づいて命令完了処理を実行し、演算の完了を示すバイパス情報が生成されていない命令に対しては保持部から読み出した命令の状態情報に基づいて命令完了処理を実行する完了処理部とを有する。   According to one aspect, the arithmetic processing device includes a decoding unit that decodes an instruction, an arithmetic unit that executes an operation based on the decoded instruction, and a completion control unit that executes instruction completion processing for completing the instruction in the order of decoding The completion control unit is registered in the order in which the decoded instructions are decoded, holds state information indicating whether the calculation based on the registered instruction is completed, and indicates completion of the calculation by the calculation unit When the operation completion information is received, a holding unit that updates the state information of the instruction indicated by the operation completion information to information indicating the completion of the operation, and instructions that are the target of the instruction completion processing are read from the holding unit in the order of decoding. When the selection unit and detection of exceptions generated by the arithmetic processing are suppressed, and the instruction indicated by the operation completion information output from the arithmetic unit matches the instruction that is the target of the instruction completion processing A bypass unit that generates bypass information indicating the completion of the operation, and bypass information that indicates completion of the operation by executing an instruction completion process based on the bypass information for the instruction for which the bypass information indicating the completion of the operation is generated For a command that has not been generated, a completion processing unit that executes a command completion process based on the status information of the command read from the holding unit.

別の観点によれば、命令をデコードするデコード部と、デコードされた命令に基づく演算を実行する演算部と、デコードされた命令がデコードされた順に登録される保持部に、命令に基づく演算が完了したか否か示す状態情報を命令に対応させて格納し、命令を完了させる命令完了処理をデコードされた順に実行する完了制御部とを有する演算処理装置の制御方法では、完了制御部は、命令完了処理の対象となる命令を、デコードされた順に保持部から読み出し、完了制御部は、演算部による演算の完了を示す演算完了情報を受信した場合、保持部に保持された状態情報のうち、演算完了情報が示す命令の状態情報を、演算の完了を示す情報に更新し、完了制御部は、演算処理により発生する例外の検出が抑止され、かつ、演算部から出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報を生成し、完了制御部は、演算の完了を示すバイパス情報が生成された命令に対してはバイパス情報に基づいて命令完了処理を実行し、演算の完了を示すバイパス情報が生成されていない命令に対しては保持部から読み出した命令の状態情報に基づいて命令完了処理を実行する。   According to another aspect, an operation based on an instruction is performed in a decoding unit that decodes an instruction, an operation unit that performs an operation based on the decoded instruction, and a holding unit that registers the decoded instruction in the order of decoding. In the control method of the arithmetic processing unit having a completion control unit that stores state information indicating whether or not completed in correspondence with an instruction and executes instruction completion processing for completing the instruction in the order of decoding, the completion control unit includes: Instructions subject to instruction completion processing are read from the holding unit in the decoded order, and when the completion control unit receives calculation completion information indicating completion of the calculation by the calculation unit, the completion control unit includes state information held in the holding unit. The status information of the instruction indicated by the operation completion information is updated to information indicating the completion of the operation, and the completion control unit suppresses detection of an exception generated by the operation process and is output from the operation unit. If the instruction indicated by the operation completion information matches the instruction that is the target of the instruction completion processing, bypass information indicating completion of the operation is generated, and the completion control unit generates bypass information indicating completion of the operation. Instruction completion processing is executed based on the bypass information for the received instruction, and instruction completion processing is executed based on the status information of the instruction read from the holding unit for the instruction for which bypass information indicating completion of the operation is not generated Execute.

本件開示の演算処理装置および演算処理装置の制御方法は、演算例外の検出が抑止されている場合に、演算器が演算完了情報を出力してから命令完了処理を実行するまでの時間を短縮できる。   The arithmetic processing device and the control method of the arithmetic processing device disclosed in the present disclosure can shorten the time from when the arithmetic unit outputs the operation completion information until the execution of the instruction completion processing when the detection of the arithmetic exception is suppressed. .

演算処理装置および演算処理装置の制御方法の一実施形態を示す図である。It is a figure which shows one Embodiment of the arithmetic processing apparatus and the control method of an arithmetic processing apparatus. 図1に示した演算処理装置の動作フローの一例を示す図である。It is a figure which shows an example of the operation | movement flow of the arithmetic processing unit shown in FIG. 図1に示した演算処理装置の動作フローの別の例を示す図である。It is a figure which shows another example of the operation | movement flow of the arithmetic processing unit shown in FIG. 演算処理装置および演算処理装置の制御方法の別の実施形態を示す図である。It is a figure which shows another embodiment of the arithmetic processing apparatus and the control method of an arithmetic processing apparatus. 図4に示した命令完了制御部の一例を示す図である。It is a figure which shows an example of the command completion control part shown in FIG. 図4に示した演算処理装置のパイプライン処理の一例を示す図である。It is a figure which shows an example of the pipeline process of the arithmetic processing unit shown in FIG. スーパースカラ方式によるアウトオブオーダ実行の一例を示す図である。It is a figure which shows an example of the out-of-order execution by a superscalar system. 図5に示した命令完了制御部の動作の一例を示す図である。It is a figure which shows an example of operation | movement of the instruction completion control part shown in FIG. 図5に示した命令完了制御部の動作の別の例を示す図である。It is a figure which shows another example of operation | movement of the instruction completion control part shown in FIG. 図5に示した命令完了制御部の動作の別の例を示す図である。It is a figure which shows another example of operation | movement of the instruction completion control part shown in FIG. 図5に示した命令完了制御部の動作の別の例を示す図である。It is a figure which shows another example of operation | movement of the instruction completion control part shown in FIG. 図5に示した命令完了制御部の動作の比較例を示す図である。It is a figure which shows the comparative example of operation | movement of the instruction completion control part shown in FIG. 図4に示した命令完了制御部の別の例を示す図である。It is a figure which shows another example of the instruction completion control part shown in FIG. 図13に示した命令完了制御部の動作フローの一例を示す図である。It is a figure which shows an example of the operation | movement flow of the instruction completion control part shown in FIG. 図13に示した命令完了制御部の動作の一例を示す図である。It is a figure which shows an example of operation | movement of the instruction completion control part shown in FIG.

以下、実施形態を図面を用いて説明する。   Hereinafter, embodiments will be described with reference to the drawings.

図1は、演算処理装置および演算処理装置の制御方法の一実施形態を示す。この実施形態の演算処理装置PUは、例えば、所定のクロックのサイクルで動作するCPU(Central Processing Unit)等のプロセッサである。なお、演算処理装置PUは、命令を実行する複数の回路を有するスーパースカラ方式のプロセッサでもよいし、スーパースカラ方式以外のプロセッサでもよい。   FIG. 1 shows an embodiment of an arithmetic processing unit and a control method for the arithmetic processing unit. The arithmetic processing unit PU of this embodiment is, for example, a processor such as a CPU (Central Processing Unit) that operates at a predetermined clock cycle. The arithmetic processing unit PU may be a superscalar processor having a plurality of circuits for executing instructions, or may be a processor other than the superscalar processor.

演算処理装置PUは、命令をデコードする命令デコーダDECと、デコードされた命令に基づく演算を実行する演算部OPと、命令を完了させる命令完了処理(以下、コミット処理とも称する)をデコードされた順に実行する命令完了制御部CCTLとを有する。コミット処理は、例えば、命令の実行結果をレジスタ等に反映する制御である。   The arithmetic processing unit PU decodes an instruction decoder DEC that decodes an instruction, an operation unit OP that executes an operation based on the decoded instruction, and an instruction completion process that completes the instruction (hereinafter also referred to as a commit process) in the order of decoding. And an instruction completion control unit CCTL to be executed. The commit process is, for example, control for reflecting an instruction execution result in a register or the like.

命令デコーダDECは、命令をデコードするデコード部の一例である。例えば、命令デコーダDECは、命令キャッシュから命令を読み出し、読み出した命令をデコードする。そして、命令デコーダDECは、デコードした命令をリザベーションステーションRSおよび命令完了制御部CCTLに出力する。そしてリザベーションステーションRSから演算部OPに命令が出力される。   The instruction decoder DEC is an example of a decoding unit that decodes an instruction. For example, the instruction decoder DEC reads an instruction from the instruction cache and decodes the read instruction. Then, the instruction decoder DEC outputs the decoded instruction to the reservation station RS and the instruction completion control unit CCTL. Then, a command is output from the reservation station RS to the operation unit OP.

演算部OPは、デコードされた命令に基づく演算を実行する演算部の一例である。例えば、演算部OPは、浮動小数点演算を実行する演算器、固定小数点演算を実行する演算器等を有する。演算部OPは、命令デコーダDECでデコードされた命令がセットされたリザベーションステーションRSからの命令を受信する。そして、演算部OPは、受信した命令のデコード結果に基づいて、浮動小数点演算、固定小数点演算等をアウトオブオーダで実行する。例えば、アウトオブオーダ実行では、プログラム順に拘わらずリザベーションステーションRSに登録された命令で実行可能な命令から実行される。   The operation unit OP is an example of an operation unit that performs an operation based on a decoded instruction. For example, the operation unit OP includes an arithmetic unit that performs floating-point arithmetic, an arithmetic unit that performs fixed-point arithmetic, and the like. The operation unit OP receives an instruction from the reservation station RS in which the instruction decoded by the instruction decoder DEC is set. Then, the arithmetic unit OP performs floating point arithmetic, fixed point arithmetic, and the like out of order based on the decoded result of the received instruction. For example, in out-of-order execution, execution is performed from an instruction that can be executed by an instruction registered in the reservation station RS regardless of the program order.

また、演算部OPは、命令に基づく演算が完了した場合、演算の完了を示す演算完了情報を命令完了制御部CCTLに出力する。また、例えば、演算部OPは、オーバーフロー、アンダーフロー、ゼロ除算等の例外が演算処理により発生した場合、例外が発生したことを示す例外情報を命令完了制御部CCTLに出力してもよい。以下、演算処理により発生する例外を演算例外とも称する。   Further, when the operation based on the instruction is completed, the operation unit OP outputs operation completion information indicating the completion of the operation to the instruction completion control unit CCTL. Further, for example, when an exception such as overflow, underflow, or division by zero occurs in the arithmetic processing, the arithmetic unit OP may output exception information indicating that the exception has occurred to the instruction completion control unit CCTL. Hereinafter, an exception generated by the calculation process is also referred to as a calculation exception.

命令完了制御部CCTLは、命令を完了させる命令完了処理をデコードされた順に実行する完了制御部の一例である。例えば、命令完了制御部CCTLは、命令完了処理を1サイクル中に最大4個の命令に対して実行する。この場合、命令完了処理が実行されていない命令のうち、最も古い命令(先頭の命令)から4番目の命令までの4個の命令が、命令完了処理の対象の命令に対応する。   The instruction completion control unit CCTL is an example of a completion control unit that executes instruction completion processing for completing an instruction in the order of decoding. For example, the instruction completion control unit CCTL executes the instruction completion process for up to four instructions in one cycle. In this case, among the instructions for which the instruction completion processing is not executed, four instructions from the oldest instruction (first instruction) to the fourth instruction correspond to the instruction completion target instructions.

なお、命令完了処理が実行される命令の1サイクル中の最大数は、4個に限定されない。また、命令完了制御部CCTLは、例えば、命令完了処理の対象である4個の命令の中に、演算が完了していない命令が含まれる場合、先頭の命令から演算が完了していない命令の前の命令までを対象に、命令完了処理を実行する。   Note that the maximum number of instructions executed in the instruction completion process in one cycle is not limited to four. The instruction completion control unit CCTL, for example, when an instruction that has not been calculated is included in the four instructions that are the target of instruction completion processing, Command completion processing is executed up to the previous command.

命令完了制御部CCTLは、例えば、コミットスタックエントリCSE、選択部SEL10、バイパス部BYPおよび完了処理部COMPUを有する。   The instruction completion control unit CCTL includes, for example, a commit stack entry CSE, a selection unit SEL10, a bypass unit BYP, and a completion processing unit COMPU.

コミットスタックエントリCSEは、デコードされた命令がデコードされた順に登録される保持部の一例である。コミットスタックエントリCSEは、例えば、命令完了処理に用いられるバッファである。例えば、コミットスタックエントリCSEには、命令を識別するための命令識別子(以下、IID(Instruction IDentification)とも称する)、命令種別、状態情報、命令結果が格納されるレジスタ番号等を含むエントリ情報が命令毎に登録される。状態情報は、例えば、命令の実行待ち、命令の実行中、命令の終了等の命令の状態を示す情報である。したがって、状態情報は、登録された命令に基づく演算が完了したか否か示す情報に対応する。   The commit stack entry CSE is an example of a holding unit in which decoded instructions are registered in the order of decoding. The commit stack entry CSE is a buffer used for instruction completion processing, for example. For example, the commit stack entry CSE includes entry information including an instruction identifier for identifying an instruction (hereinafter also referred to as IID (Instruction IDentification)), an instruction type, status information, a register number in which an instruction result is stored, and the like. Registered every time. The state information is information indicating the state of the instruction, such as waiting for execution of the instruction, executing the instruction, or ending the instruction. Therefore, the state information corresponds to information indicating whether or not the calculation based on the registered instruction is completed.

例えば、コミットスタックエントリCSEは、命令デコーダDECでデコードされた命令を受信し、受信した命令に関するエントリ情報をデコードされた順に並ぶように保持する。これにより、命令デコーダDECでデコードされた命令がデコードされた順にコミットスタックエントリCSEに登録される。   For example, the commit stack entry CSE receives an instruction decoded by the instruction decoder DEC, and holds entry information related to the received instruction so that they are arranged in the order of decoding. As a result, the instructions decoded by the instruction decoder DEC are registered in the commit stack entry CSE in the order of decoding.

また、コミットスタックエントリCSEは、演算部OPによる演算の完了を示す演算完了情報を受信した場合、演算完了情報が示す命令の状態情報を、演算の完了を示す情報に更新する。   When the commit stack entry CSE receives operation completion information indicating completion of the operation by the operation unit OP, the commit stack entry CSE updates the status information of the instruction indicated by the operation completion information to information indicating the completion of the operation.

選択部SEL10は、命令完了処理の対象となる命令を、デコードされた順に保持部(例えば、コミットスタックエントリCSE)から読み出す選択部の一例である。例えば、選択部SEL10は、コミットスタックエントリCSEに登録されている有効な命令(命令完了処理が実行されていない命令)のうち、最も古い命令から順にコミットスタックエントリCSEから読み出す。デコードされた順に命令完了処理が実行されるため、コミットスタックエントリCSEに登録されている有効な命令のうちの最も古い命令は、命令完了処理の対象となる先頭の命令に対応する。   The selection unit SEL10 is an example of a selection unit that reads instructions to be subjected to instruction completion processing from a holding unit (for example, commit stack entry CSE) in the order of decoding. For example, the selection unit SEL10 reads from the commit stack entry CSE in order from the oldest instruction among the valid instructions registered in the commit stack entry CSE (instructions for which instruction completion processing has not been executed). Since the instruction completion processing is executed in the order of decoding, the oldest instruction among the valid instructions registered in the commit stack entry CSE corresponds to the first instruction that is the target of the instruction completion processing.

選択部SEL10によりコミットスタックエントリCSEから読み出された命令は、例えば、完了処理部COMPUおよびバイパス部BYPに転送される。例えば、選択部SEL10は、コミットスタックエントリCSEから読み出した命令の状態情報をバイパス部BYPに出力し、コミットスタックエントリCSEから読み出した命令の状態情報以外の情報(IID、命令種別等)を完了処理部COMPUに出力する。   The instruction read from the commit stack entry CSE by the selection unit SEL10 is transferred to, for example, the completion processing unit COMPU and the bypass unit BYP. For example, the selection unit SEL10 outputs the state information of the instruction read from the commit stack entry CSE to the bypass unit BYP, and completes information (IID, instruction type, etc.) other than the state information of the instruction read from the commit stack entry CSE Output to the unit COMPU.

バイパス部BYPは、演算の完了を示すバイパス情報を生成するバイパス部の一例である。バイパス部BYPは、例えば、演算処理により発生する例外の検出が抑止されている場合に、演算部OPによる演算の完了を示す演算完了情報に基づいて、演算の完了を示すバイパス情報を生成する。   The bypass unit BYP is an example of a bypass unit that generates bypass information indicating completion of calculation. For example, when the detection of an exception caused by the arithmetic processing is suppressed, the bypass unit BYP generates bypass information indicating the completion of the calculation based on the calculation completion information indicating the completion of the calculation by the calculation unit OP.

ここで、例えば、演算処理装置PUは、浮動小数点演算等の演算処理により発生する例外の検出を抑止することを示すFED(Floating-point Exception Disable mode)フラグを有する。例えば、FEDフラグが”1”に設定された場合、演算例外の検出が抑止される。また、例えば、FEDフラグが”0”に設定された場合、演算例外の検出は抑止されない。FEDフラグは、例えば、プログラムの動作中に命令により任意に書き換え可能である。なお、FEDフラグにより検出が抑止される演算例外は、浮動小数点演算により発生する例外に限定されない。例えば、固定小数点演算により発生する例外の検出も、FEDフラグにより抑止されてもよい。   Here, for example, the arithmetic processing unit PU has a FED (Floating-point Exception Disable mode) flag indicating that detection of an exception caused by arithmetic processing such as floating point arithmetic is suppressed. For example, when the FED flag is set to “1”, detection of an operation exception is suppressed. For example, when the FED flag is set to “0”, the detection of the calculation exception is not suppressed. For example, the FED flag can be arbitrarily rewritten by an instruction during the operation of the program. Note that an operation exception whose detection is suppressed by the FED flag is not limited to an exception generated by a floating-point operation. For example, detection of an exception that occurs due to fixed-point arithmetic may be suppressed by the FED flag.

例えば、バイパス部BYPは、演算部OPによる演算の完了を示す演算完了情報を受信する。そして、バイパス部BYPは、演算処理により発生する例外の検出が抑止され、かつ、演算部OPから出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報を生成する。すなわち、バイパス部BYPは、命令完了処理の対象となる命令の演算完了情報が演算部OPから出力された場合、演算完了情報の内容(演算の完了)を反映したバイパス情報を生成する。   For example, the bypass unit BYP receives calculation completion information indicating completion of calculation by the calculation unit OP. Then, the bypass unit BYP suppresses detection of an exception generated by the arithmetic processing, and the instruction indicated by the operation completion information output from the arithmetic unit OP matches the instruction that is the target of the instruction completion processing. The bypass information indicating the completion of the calculation is generated. That is, the bypass unit BYP generates bypass information that reflects the content of the operation completion information (completion of operation) when the operation completion information of the instruction that is the target of the instruction completion process is output from the operation unit OP.

また、例えば、バイパス部BYPは、選択部SEL10から受信した命令の状態情報を完了処理部COMPUに転送する。なお、バイパス部BYPは、演算の完了を示すバイパス情報を生成した場合、バイパス情報に対応する命令の状態情報の代わりに、演算の完了を示すバイパス情報を完了処理部COMPUに出力する。この場合、演算完了情報の内容が反映される前にコミットスタックエントリCSEから読み出された命令の状態情報の代わりに、演算完了情報の内容(演算の完了)を反映したバイパス情報が完了処理部COMPUに転送される。   Further, for example, the bypass unit BYP transfers the status information of the command received from the selection unit SEL10 to the completion processing unit COMPU. When the bypass unit BYP generates bypass information indicating the completion of the calculation, the bypass unit BYP outputs the bypass information indicating the completion of the calculation to the completion processing unit COMPU instead of the state information of the instruction corresponding to the bypass information. In this case, instead of the state information of the instruction read from the commit stack entry CSE before the content of the operation completion information is reflected, bypass information reflecting the content of the operation completion information (completion of operation) is received as a completion processing unit. Forwarded to COMPU.

このように、バイパス部BYPは、演算例外の検出が抑止されている場合に、演算部OPが演算完了情報を出力してから演算完了情報の内容を完了処理部COMPUに通知するまでの時間を短縮できる。これにより、演算処理装置PUは、演算例外の検出が抑止されている場合に、演算部OPが演算完了情報を出力してから命令完了処理を実行するまでの時間を短縮できる。   In this way, when the detection of the calculation exception is suppressed, the bypass unit BYP determines the time from when the calculation unit OP outputs the calculation completion information until the completion processing unit COMPU is notified of the content of the calculation completion information. Can be shortened. As a result, the arithmetic processing unit PU can shorten the time from when the arithmetic unit OP outputs the operation completion information to when the instruction completion processing is executed when detection of the arithmetic exception is suppressed.

完了処理部COMPUは、バイパス情報が生成された命令に対してはバイパス情報に基づいて命令完了処理を実行し、バイパス情報が生成されていない命令に対しては保持部から読み出した状態情報に基づいて命令完了処理を実行する完了処理部の一例である。例えば、完了処理部COMPUは、バイパス部BYPから受信した情報(バイパス情報あるいは命令の状態情報)に基づいて、演算が完了したか否かを命令毎に判定する。   The completion processing unit COMPU executes instruction completion processing based on the bypass information for an instruction for which bypass information has been generated, and based on state information read from the holding unit for an instruction for which bypass information has not been generated. 3 is an example of a completion processing unit that executes instruction completion processing. For example, the completion processing unit COMPU determines, for each instruction, whether or not the calculation is completed based on information (bypass information or instruction state information) received from the bypass unit BYP.

例えば、完了処理部COMPUは、演算の完了を示すバイパス情報が生成された命令に対しては、演算が完了したと判定する。また、例えば、完了処理部COMPUは、演算の完了を示すバイパス情報が生成されていない命令に対しては、コミットスタックエントリCSEから読み出された命令の状態情報に基づいて、演算が完了したか否かを判定する。   For example, the completion processing unit COMPU determines that the calculation has been completed for an instruction for which bypass information indicating the completion of the calculation is generated. In addition, for example, the completion processing unit COMPU, for an instruction for which bypass information indicating completion of the operation is not generated, has the operation been completed based on the state information of the instruction read from the commit stack entry CSE. Determine whether or not.

そして、完了処理部COMPUは、演算が完了したか否かの判定結果に基づいて、命令完了処理の対象の命令に対する命令完了処理をデコードされた順に実行する。例えば、完了処理部COMPUは、命令完了処理の対象としてコミットスタックエントリCSEから読み出された命令のうち、先頭の命令から演算が完了していない命令の前の命令までを対象に、命令完了処理をデコードされた順に実行する。なお、完了処理部COMPUは、例えば、命令完了処理の対象としてコミットスタックエントリCSEから読み出された全ての命令で演算が完了している場合、命令完了処理の対象の全ての命令に対して、命令完了処理をデコードされた順に実行する。   Then, the completion processing unit COMPU executes the instruction completion processing for the instruction targeted for the instruction completion processing in the order of decoding based on the determination result of whether or not the calculation is completed. For example, the completion processing unit COMPU processes instruction completion processing from the first instruction to the instruction before the instruction that has not been completed among the instructions read from the commit stack entry CSE as the target of instruction completion processing. Are executed in the order of decoding. The completion processing unit COMPU, for example, for all instructions read from the commit stack entry CSE as the target of instruction completion processing, for all instructions targeted for instruction completion processing, Instruction completion processing is executed in the order of decoding.

なお、演算処理装置PUの構成は、この例に限定されない。例えば、命令完了制御部CCTLは、演算完了情報以外の完了情報(例えば、分岐命令に対する分岐予測の判定結果等を示す分岐判定完了情報)を受信し、受信した完了情報に基づいて命令完了処理を実行してもよい。   Note that the configuration of the arithmetic processing unit PU is not limited to this example. For example, the instruction completion control unit CCTL receives completion information other than the operation completion information (for example, branch determination completion information indicating a branch prediction determination result for the branch instruction), and performs instruction completion processing based on the received completion information. May be executed.

また、例えば、選択部SEL10は、コミットスタックエントリCSEから読み出した命令の状態情報を、バイパス部BYPに出力せずに、完了処理部COMPUに出力してもよい。この場合、完了処理部COMPUは、バイパス情報および選択部SEL10によりコミットスタックエントリCSEから読み出された命令の状態情報に基づいて、命令完了処理を実行するか否かを決定する。例えば、完了処理部COMPUは、演算の完了を示すバイパス情報が生成された命令に対しては、命令完了処理を実行するか否かをバイパス情報に基づいて決定する。また、完了処理部COMPUは、演算の完了を示すバイパス情報が生成されていない命令に対しては、命令完了処理を実行するか否かを、コミットスタックエントリCSEから読み出された命令の状態情報に基づいて決定する。   Further, for example, the selection unit SEL10 may output the status information of the instruction read from the commit stack entry CSE to the completion processing unit COMPU without outputting to the bypass unit BYP. In this case, the completion processing unit COMPU determines whether or not to execute the instruction completion processing based on the bypass information and the state information of the instruction read from the commit stack entry CSE by the selection unit SEL10. For example, the completion processing unit COMPU determines, based on the bypass information, whether or not to execute the instruction completion processing for an instruction for which bypass information indicating completion of the operation is generated. Further, the completion processing unit COMPU determines whether or not to execute the instruction completion processing for an instruction for which bypass information indicating the completion of the operation is not generated, from the status information of the instruction read from the commit stack entry CSE Determine based on.

図2は、図1に示した演算処理装置PUの動作フローの一例を示す。すなわち、図2は、演算処理装置の制御方法の一形態を示す。なお、図2は、演算例外の検出が抑止された場合の命令完了制御部CCTLの動作の一例を示す。図2の動作は、ハードウエアのみで実現されてもよく、ハードウエアをソフトウエアにより制御することにより実現されてもよい。   FIG. 2 shows an example of an operation flow of the arithmetic processing unit PU shown in FIG. That is, FIG. 2 shows one form of the control method of the arithmetic processing unit. FIG. 2 shows an example of the operation of the instruction completion control unit CCTL when detection of an operation exception is suppressed. The operation of FIG. 2 may be realized only by hardware, or may be realized by controlling the hardware by software.

また、図2には示していないが、命令デコーダDECでデコードされた命令は、デコードされた順にコミットスタックエントリCSEに登録される。例えば、命令完了制御部CCTLは、デコードされた命令がデコードされた順に登録されるコミットスタックエントリCSEに、命令に基づく演算が完了したか否か示す状態情報を命令に対応させて格納する。   Although not shown in FIG. 2, instructions decoded by the instruction decoder DEC are registered in the commit stack entry CSE in the order of decoding. For example, the instruction completion control unit CCTL stores state information indicating whether or not the operation based on the instruction is completed in a commit stack entry CSE registered in the order in which the decoded instruction is decoded in association with the instruction.

例えば、ステップS120は、ステップS130−S140と並列に実行される。この場合、ステップS120−S140は、例えば、同一サイクルに実行される。また、例えば、ステップS150は、ステップS120−S140が実行されたサイクルの後のサイクルに実行される。   For example, step S120 is executed in parallel with steps S130-S140. In this case, steps S120 to S140 are executed in the same cycle, for example. Further, for example, step S150 is executed in a cycle after the cycle in which steps S120 to S140 are executed.

ステップS100では、選択部SEL10は、命令完了処理の対象となる命令を、デコードされた順にコミットスタックエントリCSEから読み出す。例えば、命令完了処理が実行される命令の1サイクル中の最大数が4個の場合、選択部SEL10は、コミットスタックエントリCSEに登録されている有効な命令のうち、最も古い命令から順に4個の命令をコミットスタックエントリCSEから読み出す。   In step S100, the selection unit SEL10 reads instructions to be subjected to instruction completion processing from the commit stack entry CSE in the order of decoding. For example, when the maximum number of instructions executed in the instruction completion process is four in one cycle, the selection unit SEL10 selects four effective instructions registered in the commit stack entry CSE in order from the oldest instruction. Are read from the commit stack entry CSE.

ステップS110では、命令完了制御部CCTLは、演算部OPによる演算の完了を示す演算完了情報を受信したか否かを判定する。演算完了情報を受信した場合(ステップS110のYes)、命令完了制御部CCTLの動作は、ステップS120に移る。一方、演算完了情報を受信していない場合(ステップS110のNo)、命令完了制御部CCTLの動作は、ステップS150に移る。   In step S110, the instruction completion control unit CCTL determines whether or not calculation completion information indicating completion of calculation by the calculation unit OP has been received. When the calculation completion information is received (Yes in step S110), the operation of the instruction completion control unit CCTL proceeds to step S120. On the other hand, when the operation completion information has not been received (No in step S110), the operation of the instruction completion control unit CCTL proceeds to step S150.

ステップS120では、命令完了制御部CCTLは、コミットスタックエントリCSEに保持された状態情報のうち、演算完了情報が示す命令の状態情報を、演算の完了を示す情報に更新する。すなわち、コミットスタックエントリCSEは、演算部OPによる演算の完了を示す演算完了情報を受信した場合、演算完了情報が示す命令の状態情報を、演算の完了を示す情報に更新する。   In step S120, the instruction completion control unit CCTL updates the state information of the instruction indicated by the operation completion information among the state information held in the commit stack entry CSE to information indicating the completion of the operation. That is, when the commit stack entry CSE receives the operation completion information indicating the completion of the operation by the operation unit OP, the commit stack entry CSE updates the status information of the instruction indicated by the operation completion information to the information indicating the completion of the operation.

ステップS130では、命令完了制御部CCTLは、ステップS110で受信した演算完了情報の命令がステップS100で読み出した命令完了処理の対象となる命令か否かを判定する。なお、演算完了情報の命令は、演算完了情報が示す命令(演算が完了した命令)である。演算完了情報の命令が命令完了処理の対象である場合(ステップS130のYes)、命令完了制御部CCTLの動作は、ステップS140に移る。一方、演算完了情報の命令が命令完了処理の対象でない場合(ステップS130のNo)、命令完了制御部CCTLの動作は、ステップS150に移る。   In step S130, the instruction completion control unit CCTL determines whether or not the instruction of the operation completion information received in step S110 is a target of the instruction completion process read in step S100. The operation completion information instruction is an instruction indicated by the operation completion information (an instruction for which the operation has been completed). When the instruction of the operation completion information is a target of instruction completion processing (Yes in step S130), the operation of the instruction completion control unit CCTL proceeds to step S140. On the other hand, when the instruction of the operation completion information is not the target of the instruction completion process (No in Step S130), the operation of the instruction completion control unit CCTL proceeds to Step S150.

ステップS140では、バイパス部BYPは、演算完了情報に基づいて、演算(演算完了情報が示す命令の演算)の完了を示すバイパス情報を生成する。例えば、バイパス部BYPは、演算完了情報が示す命令に対して、演算の完了を示すバイパス情報を生成する。このように、バイパス部BYPは、演算処理により発生する例外の検出が抑止され、かつ、演算部OPから出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報を生成する。   In step S140, the bypass unit BYP generates bypass information indicating the completion of the calculation (the calculation of the instruction indicated by the calculation completion information) based on the calculation completion information. For example, the bypass unit BYP generates bypass information indicating completion of the operation in response to an instruction indicated by the operation completion information. In this way, the bypass unit BYP suppresses detection of exceptions generated by the arithmetic processing, and the instruction indicated by the arithmetic completion information output from the arithmetic unit OP matches the instruction that is the target of the instruction completion processing. If so, bypass information indicating completion of the calculation is generated.

ステップS150では、命令完了制御部CCTLは、バイパス情報およびコミットスタックエントリCSEから読み出した命令の状態情報に基づいて、命令完了処理を実行する。例えば、完了処理部COMPUは、ステップS140で生成されたバイパス情報およびステップS100でコミットスタックエントリCSEから読み出した命令の状態情報に基づいて、命令完了処理を実行する。   In step S150, the instruction completion control unit CCTL executes instruction completion processing based on the bypass information and the state information of the instruction read from the commit stack entry CSE. For example, the completion processing unit COMPU executes instruction completion processing based on the bypass information generated in step S140 and the state information of the instruction read from the commit stack entry CSE in step S100.

例えば、完了処理部COMPUは、ステップS140で生成されたバイパス情報およびステップS100でコミットスタックエントリCSEから読み出された命令の状態情報のいずれかが演算の完了を示す場合に、演算が完了したと判定する。そして、完了処理部COMPUは、例えば、ステップS100でコミットスタックエントリCSEから読み出された命令のうち、先頭の命令から演算が完了していない命令の前の命令までを対象に、命令完了処理をデコードされた順に実行する。   For example, the completion processing unit COMPU determines that the operation is completed when either the bypass information generated in step S140 or the status information of the instruction read from the commit stack entry CSE in step S100 indicates the completion of the operation. judge. Then, for example, the completion processing unit COMPU performs instruction completion processing from the first instruction read from the commit stack entry CSE to the instruction before the instruction that has not been completed. Run in decoded order.

なお、完了処理部COMPUは、例えば、ステップS100でコミットスタックエントリCSEから読み出された全ての命令で演算が完了している場合、命令完了処理の対象の全ての命令に対して、命令完了処理をデコードされた順に実行する。命令完了処理が実行されることにより、命令完了処理の対象が更新される。   For example, when the operation is completed for all the instructions read from the commit stack entry CSE in step S100, the completion processing unit COMPU performs the instruction completion process for all the instructions that are the target of the instruction completion process. Are executed in the order of decoding. By executing the instruction completion process, the target of the instruction completion process is updated.

また、完了処理部COMPUは、例えば、ステップS100でコミットスタックエントリCSEから読み出された全ての命令で演算が完了していない場合、コミットスタックエントリCSEから読み出された全ての命令に対して、命令完了処理を実行しない。この場合、命令完了処理の対象は更新されない。   Further, for example, when the operation is not completed for all the instructions read from the commit stack entry CSE in step S100, the completion processing unit COMPU performs the processing for all the instructions read from the commit stack entry CSE. Does not execute instruction completion processing. In this case, the target of the instruction completion process is not updated.

このように、例えば、演算完了情報の内容は、コミットスタックエントリCSEが演算完了情報を受信したサイクル中に、コミットスタックエントリCSEに設定され、演算完了情報が示す命令の状態情報として保持される。このため、ステップS150で参照される状態情報には、ステップS110で受信した演算完了情報の内容は反映されていない。例えば、演算完了情報の内容は、コミットスタックエントリCSEが演算完了情報を受信したサイクルより後のサイクルでコミットスタックエントリCSEから読み出された命令の状態情報に反映される。   Thus, for example, the content of the operation completion information is set in the commit stack entry CSE during the cycle in which the commit stack entry CSE receives the operation completion information, and is held as instruction status information indicated by the operation completion information. For this reason, the content of the calculation completion information received at step S110 is not reflected in the state information referred to at step S150. For example, the content of the operation completion information is reflected in the state information of the instruction read from the commit stack entry CSE in a cycle after the cycle in which the commit stack entry CSE receives the operation completion information.

これに対し、例えば、ステップS110で受信した演算完了情報の命令が命令完了処理の対象である場合、演算完了情報の内容は、コミットスタックエントリCSEが演算完了情報を受信したサイクル中に、ステップS150で参照されるバイパス情報に反映される。すなわち、演算処理装置PUは、演算部OPが演算完了情報を出力してから演算完了情報の内容が反映された情報を完了処理部COMPUが受信するまでの時間を短縮できる。   On the other hand, for example, when the instruction of the operation completion information received in step S110 is an instruction completion processing target, the content of the operation completion information is the same as that in step S150 during the cycle in which the commit stack entry CSE receives the operation completion information. It is reflected in the bypass information referenced in. That is, the arithmetic processing unit PU can shorten the time from when the calculation unit OP outputs the calculation completion information to when the completion processing unit COMPU receives the information reflecting the contents of the calculation completion information.

これにより、演算処理装置PUは、演算例外の検出が抑止されている場合に、演算部OPが演算完了情報を出力してから命令完了処理を実行するまでの時間を短縮できる。例えば、演算処理装置PUは、ステップS120に要するサイクル数が1サイクルの場合、演算部OPが演算完了情報を出力してから命令完了処理を実行するまでの時間を、バイパス部BYPが省かれた構成に比べて、1サイクル短縮できる。なお、演算処理装置PUの動作は、この例に限定されない。   As a result, the arithmetic processing unit PU can shorten the time from when the arithmetic unit OP outputs the operation completion information to when the instruction completion processing is executed when detection of the arithmetic exception is suppressed. For example, when the number of cycles required for step S120 is one cycle, the arithmetic processing unit PU omits the bypass unit BYP from the time when the arithmetic unit OP outputs the operation completion information to the time when the instruction completion processing is executed. Compared to the configuration, one cycle can be shortened. Note that the operation of the arithmetic processing unit PU is not limited to this example.

図3は、図1に示した演算処理装置PUの動作フローの別の例を示す。なお、図3は、演算例外の検出が抑止されていない場合の命令完了制御部CCTLの動作の一例を示す。図3の動作は、ハードウエアのみで実現されてもよく、ハードウエアをソフトウエアにより制御することにより実現されてもよい。また、図3には示していないが、命令デコーダDECでデコードされた命令は、デコードされた順にコミットスタックエントリCSEに登録される。なお、図2の動作と同一または同様な動作については、詳細な説明を省略する。   FIG. 3 shows another example of the operation flow of the arithmetic processing unit PU shown in FIG. FIG. 3 shows an example of the operation of the instruction completion control unit CCTL when the detection of the operation exception is not suppressed. The operation of FIG. 3 may be realized only by hardware, or may be realized by controlling the hardware by software. Although not shown in FIG. 3, instructions decoded by the instruction decoder DEC are registered in the commit stack entry CSE in the order of decoding. Detailed description of the same or similar operations as those in FIG. 2 will be omitted.

ステップS200では、選択部SEL10は、命令完了処理の対象となる命令を、デコードされた順にコミットスタックエントリCSEから読み出す。   In step S200, the selection unit SEL10 reads instructions to be subjected to instruction completion processing from the commit stack entry CSE in the order of decoding.

ステップS210では、命令完了制御部CCTLは、演算部OPによる演算の完了を示す演算完了情報を受信したか否かを判定する。演算完了情報を受信した場合(ステップS210のYes)、命令完了制御部CCTLの動作は、ステップS220に移る。一方、演算完了情報を受信していない場合(ステップS210のNo)、命令完了制御部CCTLの動作は、ステップS250に移る。   In step S210, the instruction completion control unit CCTL determines whether or not calculation completion information indicating completion of calculation by the calculation unit OP has been received. When the operation completion information is received (Yes in step S210), the operation of the instruction completion control unit CCTL proceeds to step S220. On the other hand, when the operation completion information has not been received (No in step S210), the operation of the instruction completion control unit CCTL proceeds to step S250.

ステップS220では、命令完了制御部CCTLは、コミットスタックエントリCSEに保持された状態情報のうち、演算完了情報が示す命令の状態情報を、演算の完了を示す情報に更新する。   In step S220, the instruction completion control unit CCTL updates the state information of the instruction indicated by the operation completion information among the state information held in the commit stack entry CSE to information indicating the completion of the operation.

ステップS230では、命令完了制御部CCTLは、例外が検出されたか否かを判定する。例えば、命令完了制御部CCTLは、オーバーフロー、アンダーフロー、ゼロ除算等の例外が発生したことを示す例外情報を演算部OPから受信したか否かを判定する。例外が検出された場合(ステップS230のYes)、命令完了制御部CCTLの動作は、ステップS240に移る。一方、例外が検出されていない場合(ステップS230のNo)、命令完了制御部CCTLの動作は、ステップS250に移る。   In step S230, the instruction completion control unit CCTL determines whether an exception is detected. For example, the instruction completion control unit CCTL determines whether exception information indicating that an exception such as overflow, underflow, or division by zero has occurred is received from the arithmetic unit OP. If an exception is detected (Yes in step S230), the operation of the instruction completion control unit CCTL proceeds to step S240. On the other hand, when no exception is detected (No in step S230), the operation of the instruction completion control unit CCTL proceeds to step S250.

ステップS240では、命令完了制御部CCTLは、コミットスタックエントリCSEに保持された状態情報のうち、演算完了情報が示す命令の状態情報を、例外の発生を示す情報に更新する。   In step S240, the instruction completion control unit CCTL updates the state information of the instruction indicated by the operation completion information among the state information held in the commit stack entry CSE to information indicating the occurrence of an exception.

ステップS250では、命令完了制御部CCTLは、コミットスタックエントリCSEから読み出した命令の状態情報に基づいて、命令完了処理を実行する。例えば、完了処理部COMPUは、ステップS100でコミットスタックエントリCSEから読み出した命令の状態情報が例外の発生を示している場合、例外処理を実行する。例外処理では、例えば、例外が発生した命令の後続の命令は、キャンセルされる。   In step S250, the instruction completion control unit CCTL executes instruction completion processing based on the instruction status information read from the commit stack entry CSE. For example, the completion processing unit COMPU executes exception processing when the status information of the instruction read from the commit stack entry CSE in step S100 indicates the occurrence of an exception. In exception processing, for example, an instruction subsequent to an instruction in which an exception has occurred is canceled.

なお、演算処理装置PUの動作は、この例に限定されない。例えば、バイパス部BYPは、図14に示すように、例外が検出されず、かつ、演算部OPから出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報を生成してもよい。この場合、例えば、命令完了制御部CCTLは、ステップS250において、バイパス情報およびコミットスタックエントリCSEから読み出した命令の状態情報に基づいて、命令完了処理を実行する。   Note that the operation of the arithmetic processing unit PU is not limited to this example. For example, as shown in FIG. 14, in the bypass unit BYP, no exception is detected, and the instruction indicated by the operation completion information output from the operation unit OP matches the instruction that is the target of the instruction completion process. In this case, bypass information indicating completion of the calculation may be generated. In this case, for example, the instruction completion control unit CCTL executes an instruction completion process based on the bypass information and the instruction status information read from the commit stack entry CSE in step S250.

以上、図1から図3に示した実施形態の演算処理装置および演算処理装置の制御方法では、命令完了制御部CCTLは、バイパス情報およびコミットスタックエントリCSEから読み出した命令の状態情報に基づいて、命令完了処理を実行する。例えば、命令完了制御部CCTLは、演算処理により発生する例外の検出が抑止され、かつ、演算部OPから出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報を生成する。   As described above, in the arithmetic processing device and the control method of the arithmetic processing device of the embodiment shown in FIGS. 1 to 3, the instruction completion control unit CCTL is based on the bypass information and the status information of the instruction read from the commit stack entry CSE. Instruction completion processing is executed. For example, the instruction completion control unit CCTL suppresses detection of exceptions generated by the arithmetic processing, and the instruction indicated by the operation completion information output from the arithmetic unit OP matches the instruction that is the target of the instruction completion processing. If so, bypass information indicating completion of the calculation is generated.

すなわち、バイパス部BYPは、命令完了処理の対象となる命令の演算完了情報が演算部OPから出力された場合、演算完了情報の内容(演算の完了)を反映したバイパス情報を生成する。そして、バイパス部BYPは、例えば、演算の完了を示すバイパス情報を生成した場合、バイパス情報に対応する命令の状態情報の代わりに、演算の完了を示すバイパス情報を完了処理部COMPUに出力する。   That is, the bypass unit BYP generates bypass information that reflects the content of the operation completion information (completion of operation) when the operation completion information of the instruction that is the target of the instruction completion process is output from the operation unit OP. For example, when the bypass unit BYP generates bypass information indicating the completion of the calculation, the bypass unit BYP outputs the bypass information indicating the completion of the calculation to the completion processing unit COMPU instead of the state information of the instruction corresponding to the bypass information.

これにより、この実施形態では、演算例外の検出が抑止されている場合に、演算部OPが演算完了情報を出力してから演算完了情報の内容を完了処理部COMPUに通知するまでの時間を短縮できる。この結果、この実施形態では、演算例外の検出が抑止されている場合に、演算部OPが演算完了情報を出力してから命令完了処理を実行するまでの時間を短縮できる。   Thereby, in this embodiment, when the detection of the calculation exception is suppressed, the time from the calculation unit OP outputting the calculation completion information to notifying the completion processing unit COMPU of the content of the calculation completion information is shortened. it can. As a result, in this embodiment, when the detection of the operation exception is suppressed, the time from when the operation unit OP outputs the operation completion information to when the instruction completion processing is executed can be shortened.

図4は、演算処理装置および演算処理装置の制御方法の別の実施形態を示す。図1から図3で説明した要素と同一または同様の要素については、同一または同様の符号を付し、これ等については、詳細な説明を省略する。なお、図4に示した命令完了制御部CCTLでは、図を見やすくするために、コミットスタックエントリCSE以外の記載を省略している。   FIG. 4 shows another embodiment of the arithmetic processing device and the control method of the arithmetic processing device. Elements that are the same as or similar to those described in FIGS. 1 to 3 are given the same or similar reference numerals, and detailed descriptions thereof are omitted. In the instruction completion control unit CCTL shown in FIG. 4, descriptions other than the commit stack entry CSE are omitted for easy understanding of the drawing.

演算処理装置PUは、例えば、所定のクロックのサイクルで動作するCPU等のプロセッサである。例えば、演算処理装置PUは、命令を実行する複数の回路(演算器EXU、FPU等)を有するスーパースカラ方式のプロセッサである。演算処理装置PUは、例えば、状態制御部MCTL、分岐予測機構BRPRE、命令フェッチアドレス生成器FAGEN、命令キャッシュCCM、命令デコーダDEC、演算部OP、データキャッシュDCM、分岐制御部BCTLおよび命令完了制御部CCTLを有する。   The arithmetic processing unit PU is a processor such as a CPU that operates in a predetermined clock cycle, for example. For example, the arithmetic processing unit PU is a superscalar processor having a plurality of circuits (operating units EXU, FPU, etc.) that execute instructions. The arithmetic processing unit PU includes, for example, a state control unit MCTL, a branch prediction mechanism BRPRE, an instruction fetch address generator FAGEN, an instruction cache CCM, an instruction decoder DEC, an operation unit OP, a data cache DCM, a branch control unit BCTL, and an instruction completion control unit. Have CCTL.

状態制御部MCTLは、例えば、プログラムカウンタPCおよびネクストプログラムカウンタNPCを有する。プログラムカウンタPCは、例えば、演算処理装置PUが実行する命令のアドレスを示す値(以下、PC値とも称する)を、命令フェッチアドレス生成器FAGENに出力する。ネクストプログラムカウンタNPCは、次のPC値を保持する。例えば、プログラムカウンタPCの値(PC値)およびネクストプログラムカウンタNPCの値(次のPC値)は、命令完了処理が実行される度に、増加する。   The state control unit MCTL includes, for example, a program counter PC and a next program counter NPC. For example, the program counter PC outputs a value indicating an address of an instruction executed by the arithmetic processing unit PU (hereinafter also referred to as a PC value) to the instruction fetch address generator FAGEN. The next program counter NPC holds the next PC value. For example, the value of the program counter PC (PC value) and the value of the next program counter NPC (next PC value) increase every time the instruction completion process is executed.

また、状態制御部MCTLは、演算例外の検出を抑止することを示すFEDフラグを有する。例えば、FEDフラグは、演算処理装置PUの動作モードを設定するための命令により任意に書き換え可能である。例えば、状態制御部MCTLは、演算例外の検出を抑止する場合、FEDフラグを”1”に設定し、演算例外の検出を抑止しない場合、FEDフラグを”0”に設定する。そして、状態制御部MCTLは、FEDフラグの設定値を命令完了制御部CCTLに出力する。   Further, the state control unit MCTL has an FED flag indicating that detection of an operation exception is suppressed. For example, the FED flag can be arbitrarily rewritten by an instruction for setting the operation mode of the arithmetic processing unit PU. For example, the state control unit MCTL sets the FED flag to “1” when the detection of the calculation exception is suppressed, and sets the FED flag to “0” when the detection of the calculation exception is not suppressed. Then, the state control unit MCTL outputs the set value of the FED flag to the instruction completion control unit CCTL.

分岐予測機構BRPREは、分岐命令の結果を予測する。命令フェッチアドレス生成器FAGENは、プログラムカウンタPCの値(PC値)、分岐予測機構BRPREによる分岐予測の結果、分岐制御部BCTLからの情報(例えば、分岐予測が成功したか否かを示す情報)等に基づいて、命令フェッチアドレスを生成する。命令キャッシュCCMには、例えば、プログラムを実行するための複数の命令が格納される。例えば、命令キャッシュCCMは、命令フェッチアドレス生成器FAGENで生成された命令フェッチアドレスが示す命令を、命令デコーダDECに出力する。   The branch prediction mechanism BRPRE predicts the result of the branch instruction. The instruction fetch address generator FAGEN receives the value of the program counter PC (PC value), the result of branch prediction by the branch prediction mechanism BRPRE, and information from the branch control unit BCTL (for example, information indicating whether or not branch prediction is successful). Based on the above, an instruction fetch address is generated. The instruction cache CCM stores, for example, a plurality of instructions for executing a program. For example, the instruction cache CCM outputs an instruction indicated by the instruction fetch address generated by the instruction fetch address generator FAGEN to the instruction decoder DEC.

命令デコーダDECは、図1に示した命令デコーダDECと同一または同様である。すなわち、命令デコーダDECは、命令をデコードするデコード部の一例である。例えば、命令デコーダDECは、命令フェッチアドレス生成器FAGENで生成された命令フェッチアドレスが示す命令を、命令キャッシュCCMから読み出す。そして、命令デコーダDECは、命令キャッシュCCMから読み出した命令をデコードし、デコードした命令を命令完了制御部CCTLに出力する。これにより、命令デコーダDECでデコードされた命令は、命令完了制御部CCTLのコミットスタックエントリCSEに、命令順にインオーダで登録される。   The instruction decoder DEC is the same as or similar to the instruction decoder DEC shown in FIG. That is, the instruction decoder DEC is an example of a decoding unit that decodes an instruction. For example, the instruction decoder DEC reads an instruction indicated by the instruction fetch address generated by the instruction fetch address generator FAGEN from the instruction cache CCM. Then, the instruction decoder DEC decodes the instruction read from the instruction cache CCM, and outputs the decoded instruction to the instruction completion control unit CCTL. As a result, the instruction decoded by the instruction decoder DEC is registered in order in the instruction order in the commit stack entry CSE of the instruction completion control unit CCTL.

また、命令デコーダDECは、デコードした命令を、演算部OPのリザベーションステーションRSA、RSE、RSFおよび分岐制御部BCTLのリザベーションステーションRSBRに出力する。これにより、命令デコーダDECでデコードされた命令は、リザベーションステーションRSA、RSE、RSF、RSBRのいずれかに登録される。なお、リザベーションステーションRSA、RSE、RSF、RSBRは、例えば、ロード/ストア命令、固定小数点演算命令、浮動小数点演算命令、分岐命令等の命令種別毎に設けられ、アウトオブオーダ実行を制御する。   The instruction decoder DEC outputs the decoded instruction to the reservation stations RSA, RSE, RSF of the operation unit OP and the reservation station RSBR of the branch control unit BCTL. As a result, the instruction decoded by the instruction decoder DEC is registered in one of the reservation stations RSA, RSE, RSF, and RSBR. The reservation stations RSA, RSE, RSF, and RSBR are provided for each instruction type such as a load / store instruction, a fixed-point arithmetic instruction, a floating-point arithmetic instruction, a branch instruction, and the like, and control out-of-order execution.

演算部OPは、図1に示した演算部OPと同一または同様である。すなわち、演算部OPは、デコードされた命令に基づく演算を実行する演算部の一例である。例えば、演算部OPは、リザベーションステーションRSA、RSE、RSF、オペランドアドレス生成器OAGEN、演算器EXU、FPU、固定小数点更新バッファEXBUF、浮動小数点更新バッファFPBUF、固定小数点レジスタEXREGおよび浮動小数点レジスタFPREGを有する。   The calculation unit OP is the same as or similar to the calculation unit OP shown in FIG. That is, the operation unit OP is an example of an operation unit that executes an operation based on the decoded instruction. For example, the arithmetic unit OP includes reservation stations RSA, RSE, RSF, operand address generators OAGEN, arithmetic units EXU, FPU, fixed point update buffer EXBUF, floating point update buffer FPBUF, fixed point register EXREG, and floating point register FPREG. .

以下、固定小数点更新バッファEXBUFおよび固定小数点レジスタEXREGを、それぞれ更新バッファEXBUFおよびレジスタEXREGとも称する。また、浮動小数点更新バッファFPBUFおよび浮動小数点レジスタFPREGを、それぞれ更新バッファFPBUFおよびレジスタFPREGとも称する。   Hereinafter, the fixed-point update buffer EXBUF and the fixed-point register EXREG are also referred to as an update buffer EXBUF and a register EXREG, respectively. The floating point update buffer FPBUF and the floating point register FPREG are also referred to as an update buffer FPBUF and a register FPREG, respectively.

リザベーションステーションRSAは、ロード/ストア命令用のリザベーションステーション(RSA:Reservation Station for Address)である。例えば、リザベーションステーションRSAは、命令デコーダDECでデコードされたロード/ストア命令を受信する。これにより、リザベーションステーションRSAには、ロード/ストア命令が登録される。そして、リザベーションステーションRSAは、実行可能な状態のロード/ストア命令をアウトオブオーダで選択する。オペランドアドレス生成器OAGENは、リザベーションステーションRSAで選択された命令のオペランドのアドレスを生成する。   The reservation station RSA is a reservation station (RSA) for load / store instructions. For example, the reservation station RSA receives the load / store instruction decoded by the instruction decoder DEC. Thereby, a load / store instruction is registered in the reservation station RSA. Then, the reservation station RSA selects an executable load / store instruction out of order. The operand address generator OAGEN generates the address of the operand of the instruction selected by the reservation station RSA.

データキャッシュDCMは、例えば、ロード命令の場合、オペランドアドレス生成器OAGENで生成されたアドレスのデータを更新バッファEXBUF、FPBUF等に転送する。また、例えば、データキャッシュDCMは、ストア命令の場合、オペランドアドレス生成器OAGENで生成されたアドレスに、レジスタ等から受信したデータを書き込む。また、データキャッシュDCMは、更新バッファEXBUF、FPBUF等へのデータ転送が完了した場合、データ転送が完了したことを示すデータ転送完了情報を命令完了制御部CCTLに出力する。   For example, in the case of a load instruction, the data cache DCM transfers the data at the address generated by the operand address generator OAGEN to the update buffers EXBUF, FPBUF, and the like. Further, for example, in the case of a store instruction, the data cache DCM writes the data received from the register or the like to the address generated by the operand address generator OAGEN. Further, when the data transfer to the update buffer EXBUF, FPBUF, or the like is completed, the data cache DCM outputs data transfer completion information indicating that the data transfer is completed to the instruction completion control unit CCTL.

リザベーションステーションRSEは、固定小数点演算命令用のリザベーションステーション(RSE:Reservation Station for Execution)である。例えば、リザベーションステーションRSEは、命令デコーダDECでデコードされた固定小数点演算命令を受信する。これにより、リザベーションステーションRSEには、固定小数点演算命令が登録される。そして、リザベーションステーションRSEは、実行可能な状態の固定小数点演算命令をアウトオブオーダで選択する。   The reservation station RSE is a reservation station (RSE) for fixed point arithmetic instructions. For example, the reservation station RSE receives a fixed point arithmetic instruction decoded by the instruction decoder DEC. As a result, a fixed-point arithmetic instruction is registered in the reservation station RSE. Then, the reservation station RSE selects an executable fixed-point operation instruction out-of-order.

演算器EXUは、固定小数点演算を実行する演算器である。例えば、演算器EXUは、リザベーションステーションRSEで選択された固定小数点演算命令に基づいて、更新バッファEXBUF、レジスタEXREG等からデータを受信し、固定小数点演算を実行する。演算結果は、例えば、更新バッファEXBUFに転送される。例えば、演算器EXUは、演算結果を更新バッファEXBUFに転送した場合、演算の完了を示す演算完了情報を命令完了制御部CCTLに出力する。また、例えば、演算器EXUは、演算例外が発生した場合、演算例外が発生したことを示す例外情報を命令完了制御部CCTLに出力する。   The arithmetic unit EXU is an arithmetic unit that performs fixed-point arithmetic. For example, the arithmetic unit EXU receives data from the update buffer EXBUF, the register EXREG, etc. based on the fixed-point arithmetic instruction selected by the reservation station RSE, and executes the fixed-point arithmetic. The calculation result is transferred to, for example, the update buffer EXBUF. For example, when the operation unit EXU transfers the operation result to the update buffer EXBUF, the operation unit EXU outputs operation completion information indicating the completion of the operation to the instruction completion control unit CCTL. Further, for example, when an arithmetic exception occurs, the arithmetic unit EXU outputs exception information indicating that the arithmetic exception has occurred to the instruction completion control unit CCTL.

固定小数点更新バッファEXBUFは、演算器EXUから受信した演算結果を記憶する。そして、固定小数点更新バッファEXBUFは、記憶した演算結果を、命令完了制御部CCTLからの制御に応じて、固定小数点レジスタEXREGに出力する。これにより、演算器EXUによる演算の結果が固定小数点レジスタEXREGに格納される。   The fixed-point update buffer EXBUF stores the calculation result received from the calculator EXU. Then, the fixed-point update buffer EXBUF outputs the stored calculation result to the fixed-point register EXREG in accordance with control from the instruction completion control unit CCTL. As a result, the result of the calculation by the calculator EXU is stored in the fixed point register EXREG.

リザベーションステーションRSFは、浮動小数点演算命令用のリザベーションステーション(RSF:Reservation Station for Floating point)である。例えば、リザベーションステーションRSFは、命令デコーダDECでデコードされた浮動小数点演算命令を受信する。これにより、リザベーションステーションRSFには、浮動小数点演算命令が登録される。そして、リザベーションステーションRSFは、実行可能な状態の浮動小数点演算命令をアウトオブオーダで選択する。   The reservation station RSF is a reservation station (RSF) for a floating point arithmetic instruction. For example, the reservation station RSF receives a floating point arithmetic instruction decoded by the instruction decoder DEC. As a result, a floating point arithmetic instruction is registered in the reservation station RSF. Then, the reservation station RSF selects an executable floating-point arithmetic instruction out-of-order.

演算器FPUは、浮動小数点演算を実行する演算器である。例えば、演算器FPUは、リザベーションステーションRSFで選択された浮動小数点演算命令に基づいて、更新バッファFPBUF、レジスタFPREG等からデータを受信し、浮動小数点演算を実行する。演算結果は、例えば、更新バッファFPBUFに転送される。例えば、演算器FPUは、演算結果を更新バッファFPBUFに転送した場合、演算の完了を示す演算完了情報を命令完了制御部CCTLに出力する。また、例えば、演算器FPUは、演算例外が発生した場合、演算例外が発生したことを示す例外情報を命令完了制御部CCTLに出力する。   The arithmetic unit FPU is an arithmetic unit that performs floating-point arithmetic. For example, the arithmetic unit FPU receives data from the update buffer FPBUF, the register FPREG, and the like based on the floating point arithmetic instruction selected by the reservation station RSF, and executes the floating point arithmetic. The calculation result is transferred to the update buffer FPBUF, for example. For example, when the operation unit FPU transfers the operation result to the update buffer FPBUF, the operation unit FPU outputs operation completion information indicating the completion of the operation to the instruction completion control unit CCTL. Further, for example, when an arithmetic exception occurs, the arithmetic unit FPU outputs exception information indicating that the arithmetic exception has occurred to the instruction completion control unit CCTL.

浮動小数点更新バッファFPBUFは、演算器FPUから受信した演算結果を記憶する。そして、浮動小数点更新バッファFPBUFは、記憶した演算結果を、命令完了制御部CCTLからの制御に応じて、浮動小数点レジスタFPREGに出力する。これにより、演算器FPUによる演算の結果が浮動小数点レジスタFPREGに格納される。   The floating point update buffer FPBUF stores the calculation result received from the calculator FPU. Then, the floating-point update buffer FPBUF outputs the stored calculation result to the floating-point register FPREG in accordance with control from the instruction completion control unit CCTL. As a result, the result of the calculation by the calculator FPU is stored in the floating point register FPREG.

分岐制御部BCTLは、例えば、リザベーションステーションRSBRを有する。リザベーションステーションRSBRは、分岐命令用のリザベーションステーション(RSBR:Reservation Station for BRanch)である。例えば、リザベーションステーションRSBRは、命令デコーダDECでデコードされた分岐命令を受信する。これにより、リザベーションステーションRSBRには、分岐命令が登録される。そして、リザベーションステーションRSBRは、実行可能な状態の分岐命令をアウトオブオーダで選択する。   The branch control unit BCTL has, for example, a reservation station RSBR. The reservation station RSBR is a reservation station for branch instructions (RSBR). For example, the reservation station RSBR receives the branch instruction decoded by the instruction decoder DEC. As a result, a branch instruction is registered in the reservation station RSBR. Then, the reservation station RSBR selects an executable branch instruction out-of-order.

例えば、分岐制御部BCTLは、リザベーションステーションRSBRで選択された分岐命令に対する分岐予測機構BRPREの分岐予測が成功したか否かを判定する。そして、分岐制御部BCTLは、分岐予測機構BRPREの分岐予測が成功したか否かの判定結果に基づいて、ネクストプログラムカウンタNPCの値(次のPC値)等を更新する。また、分岐制御部BCTLは、例えば、分岐予測機構BRPREの分岐予測が成功したか否かの判定が完了した場合、分岐予測機構BRPREの分岐予測に対する判定が完了したことを示す分岐判定完了情報を命令完了制御部CCTLに出力する。   For example, the branch control unit BCTL determines whether the branch prediction of the branch prediction mechanism BRPRE for the branch instruction selected by the reservation station RSBR is successful. Then, the branch control unit BCTL updates the value of the next program counter NPC (next PC value) and the like based on the determination result of whether the branch prediction of the branch prediction mechanism BRPRE is successful. In addition, for example, when the determination of whether or not the branch prediction of the branch prediction mechanism BRPRE is successful, the branch control unit BCTL receives the branch determination completion information indicating that the determination of the branch prediction of the branch prediction mechanism BRPRE is completed. Output to the instruction completion control unit CCTL.

このように、演算部OPおよび分岐制御部BCTLは、データ転送、浮動小数点演算、固定小数点演算、分岐処理等をアウトオブオーダで実行する。   As described above, the operation unit OP and the branch control unit BCTL perform data transfer, floating point operation, fixed point operation, branch processing, and the like out of order.

命令完了制御部CCTLは、図1に示した命令完了制御部CCTLと同一または同様である。すなわち、命令完了制御部CCTLは、命令を完了させる命令完了処理をデコードされた順に実行する完了制御部の一例である。例えば、命令完了制御部CCTLは、図5に示すように、コミットスタックエントリCSE等を有する。   The instruction completion control unit CCTL is the same as or similar to the instruction completion control unit CCTL shown in FIG. That is, the instruction completion control unit CCTL is an example of a completion control unit that executes instruction completion processing for completing an instruction in the order of decoding. For example, the instruction completion control unit CCTL has a commit stack entry CSE as shown in FIG.

コミットスタックエントリCSEは、図1に示したコミットスタックエントリCSEと同一または同様である。すなわち、コミットスタックエントリCSEは、デコードされた命令がデコードされた順に登録される保持部の一例である。コミットスタックエントリCSEは、例えば、命令デコーダDECでデコードされた命令の命令種別、命令の状態(実行待ち、実行中、実行終了等)を示す状態情報、命令結果が格納されるレジスタ番号等を含むエントリ情報を命令識別子毎に保持する。例えば、コミットスタックエントリCSEは、命令のエントリ情報を保持する複数(例えば、64個)のラッチを有し、エントリ情報を命令識別子毎に保持する。命令完了制御部CCTLの詳細は、図5で説明する。   The commit stack entry CSE is the same as or similar to the commit stack entry CSE shown in FIG. That is, the commit stack entry CSE is an example of a holding unit in which decoded instructions are registered in the order of decoding. The commit stack entry CSE includes, for example, the instruction type of the instruction decoded by the instruction decoder DEC, state information indicating the state of the instruction (execution waiting, executing, execution end, etc.), a register number in which the instruction result is stored, and the like. Entry information is held for each instruction identifier. For example, the commit stack entry CSE has a plurality of (for example, 64) latches that hold instruction entry information, and holds entry information for each instruction identifier. Details of the instruction completion control unit CCTL will be described with reference to FIG.

なお、演算処理装置PUの構成は、この例に限定されない。例えば、演算部OPは、複数のオペランドアドレス生成器OAGENと、複数の演算器EXUと、複数の演算器FPUとを有してもよい。また、演算処理装置PUの動作は、例えば、図2および図3に示した動作と同一または同様である。   Note that the configuration of the arithmetic processing unit PU is not limited to this example. For example, the operation unit OP may include a plurality of operand address generators OAGEN, a plurality of operation units EXU, and a plurality of operation units FPU. The operation of the arithmetic processing unit PU is the same as or similar to the operation shown in FIGS. 2 and 3, for example.

図5は、図4に示した命令完了制御部CCTLの一例を示す。なお、図5では、図を見やすくするために、データキャッシュDCMからのデータ転送完了情報、分岐制御部BCTLからの分岐判定完了情報、演算器EXUからの演算完了情報、例外情報等を受信するモジュールの記載を省略している。例えば、バイパス部BYPの比較部CMP20および論理積部AND3は、完了情報を出力する各モジュール(データキャッシュDCM、分岐制御部BCTL、演算器EXU、FPU等の各モジュール)に対応して設けられる。この場合、論理和部OR1は、各モジュールに対応して設けられた論理積部AND3の出力と選択部SEL10の出力との論理和結果を出力する。また、例えば、選択部SEL20、ラッチLAT10、LAT12、LAT20、LAT40、インバータINV1、論理積部AND1、AND2、比較部CMP10は、完了情報および例外情報を出力する各演算器EXU、FPUに対応して設けられる。   FIG. 5 shows an example of the instruction completion control unit CCTL shown in FIG. In FIG. 5, a module for receiving data transfer completion information from the data cache DCM, branch determination completion information from the branch control unit BCTL, operation completion information from the arithmetic unit EXU, exception information, etc. Is omitted. For example, the comparison unit CMP20 and the logical product unit AND3 of the bypass unit BYP are provided corresponding to each module (data cache DCM, branch control unit BCTL, arithmetic unit EXU, FPU, etc.) that outputs completion information. In this case, the logical sum unit OR1 outputs a logical sum result of the output of the logical product unit AND3 provided corresponding to each module and the output of the selection unit SEL10. Further, for example, the selection unit SEL20, the latches LAT10, LAT12, LAT20, LAT40, the inverter INV1, the logical product units AND1, AND2, and the comparison unit CMP10 correspond to the respective arithmetic units EXU, FPU that output the completion information and the exception information. Provided.

図5の例では、命令完了制御部CCTLは、命令完了処理を1サイクル中に最大4個の命令に対して実行する。なお、命令完了処理が実行される命令の1サイクル中の最大数は、4個に限定されない。   In the example of FIG. 5, the instruction completion control unit CCTL executes the instruction completion process for a maximum of four instructions in one cycle. Note that the maximum number of instructions executed in the instruction completion process in one cycle is not limited to four.

命令完了制御部CCTLは、ポインタ部PT、加算部ADD、ラッチLAT10、LAT12、LAT20、LAT30、LAT40、インバータINV1、論理積部AND1、AND2、選択部SEL10、SEL20、コミットスタックエントリCSE、バイパス部BYP、比較部CMP10、命令完了処理部COMPU1および命令完了部COMPU2を有する。また、バイパス部BYPは、比較部CMP20、論理積部AND3および論理和部OR1を有する。   The instruction completion control unit CCTL includes a pointer unit PT, an addition unit ADD, latches LAT10, LAT12, LAT20, LAT30, LAT40, an inverter INV1, an AND unit AND1, AND2, a selection unit SEL10, SEL20, a commit stack entry CSE, and a bypass unit BYP. , A comparison unit CMP10, an instruction completion processing unit COMPU1, and an instruction completion unit COMPU2. The bypass unit BYP includes a comparison unit CMP20, a logical product unit AND3, and a logical sum unit OR1.

命令完了制御部CCTLは、FEDフラグの設定値を示す信号FEDを状態制御部MCTLから受信する。また、命令完了制御部CCTLは、演算の完了を示す演算完了信号ECOMPと命令を識別するための命令識別子EIIDとを、演算完了情報として演算器FPUから受信する。例えば、コミットスタックエントリCSEに登録可能な命令数が64個の場合、命令識別子EIIDは、6ビットの信号である。   The instruction completion control unit CCTL receives a signal FED indicating the set value of the FED flag from the state control unit MCTL. The instruction completion control unit CCTL receives an operation completion signal ECOMP indicating the completion of the operation and an instruction identifier EIID for identifying the instruction from the arithmetic unit FPU as operation completion information. For example, when the number of instructions that can be registered in the commit stack entry CSE is 64, the instruction identifier EIID is a 6-bit signal.

さらに、命令完了制御部CCTLは、オーバーフロー等の例外が演算器FPUの演算処理により発生した場合、演算例外が発生したことを示す例外情報EXSIGを、演算完了信号ECOMPを受信した次のサイクルで、演算器FPUから受信する。以下、演算完了信号ECOMP、命令識別子EIID、例外情報EXSIGを、信号ECOMP、EIID、EXSIGとも称する。   Further, the instruction completion control unit CCTL, when an exception such as an overflow occurs due to the arithmetic processing of the arithmetic unit FPU, the exception information EXSIG indicating that the arithmetic exception has occurred is displayed in the next cycle when the arithmetic completion signal ECOMP is received. Received from the arithmetic unit FPU. Hereinafter, the operation completion signal ECOMP, the instruction identifier EIID, and the exception information EXIGG are also referred to as signals ECOMP, EID, and EXIGG.

ラッチLAT10、LAT12、LAT20、LAT30、LAT40は、受信したデータを保持する。そして、ラッチLAT10、LAT12、LAT20、LAT30、LAT40は、保持したデータを、データを受信した次のサイクルで出力する。   The latches LAT10, LAT12, LAT20, LAT30, and LAT40 hold the received data. Then, the latches LAT10, LAT12, LAT20, LAT30, and LAT40 output the held data in the next cycle when the data is received.

例えば、ラッチLAT10は、演算完了信号ECOMPおよび命令識別子EIIDを演算器FPUから受信し、演算完了信号ECOMPおよび命令識別子EIIDを保持する。そして、ラッチLAT10は、信号ECOMP、EIIDを受信した次のサイクルで、信号ECOMP、EIIDを演算完了信号ECOMP_LCHおよび命令識別子EIID_LCHとしてラッチLAT12および選択部SEL20に出力する。以下、演算完了信号ECOMP_LCHおよび命令識別子EIID_LCHを信号ECOMP_LCH、EIID_LCHとも称する。   For example, the latch LAT10 receives the operation completion signal ECOMP and the instruction identifier EIID from the arithmetic unit FPU, and holds the operation completion signal ECOMP and the instruction identifier EIID. Then, the latch LAT10 outputs the signals ECOMP and EIID to the latch LAT12 and the selection unit SEL20 as the operation completion signal ECOMP_LCH and the instruction identifier EIID_LCH in the next cycle after receiving the signals ECOMP and EIID. Hereinafter, the operation completion signal ECOMP_LCH and the instruction identifier EIID_LCH are also referred to as signals ECOMP_LCH and EID_LCH.

また、例えば、ラッチLAT12は、ラッチLAT10から受信した信号ECOMP_LCH、EIID_LCHを、信号ECOMP_LCH、EIID_LCHを受信した次のサイクルで、演算完了信号ECOMP_LLおよび命令識別子EIID_LLとして出力する。例えば、ラッチLAT12は、演算完了信号ECOMP_LLを論理積部AND2に出力し、命令識別子EIID_LLを比較部CMP10およびコミットスタックエントリCSEに出力する。   In addition, for example, the latch LAT12 outputs the signals ECOMP_LCH and EIID_LCH received from the latch LAT10 as the operation completion signal ECOMP_LL and the instruction identifier EIID_LL in the next cycle after receiving the signals ECOMP_LCH and EIID_LCH. For example, the latch LAT12 outputs the operation completion signal ECOMP_LL to the logical product unit AND2, and outputs the instruction identifier EIID_LL to the comparison unit CMP10 and the commit stack entry CSE.

選択部SEL20は、演算完了信号ECOMPおよび命令識別子EIIDを演算器FPUから受信し、演算完了信号ECOMP_LCHおよび命令識別子EIID_LCHをラッチLAT10から受信する。さらに、選択部SEL20は、信号FEDを状態制御部MCTLから受信する。そして、選択部SEL20は、信号ECOMP、EIIDの組と信号ECOMP_LCH、EIID_LCHの組とのいずれかを信号FEDに基づいて選択し、選択した信号を信号ECOMPa、EIIDaとして、コミットスタックエントリCSEに出力する。   The selection unit SEL20 receives the operation completion signal ECOMP and the instruction identifier EIID from the arithmetic unit FPU, and receives the operation completion signal ECOMP_LCH and the instruction identifier EIID_LCH from the latch LAT10. Further, the selection unit SEL20 receives the signal FED from the state control unit MCTL. Then, the selection unit SEL20 selects one of the signal ECOMP and EIID and the signal ECOMMP_LCH and EIID_LCH based on the signal FED, and outputs the selected signal to the commit stack entry CSE as the signals ECOMPa and EIIDa. .

例えば、選択部SEL20は、信号FEDが論理値”1”の場合、演算器FPUから受信した演算完了信号ECOMPおよび命令識別子EIIDを、信号ECOMPa、EIIDaとしてコミットスタックエントリCSEに出力する。また、例えば、選択部SEL20は、信号FEDが論理値”0”の場合、ラッチLAT10から受信した演算完了信号ECOMP_LCHおよび命令識別子EIID_LCHを、信号ECOMPa、EIIDaとしてコミットスタックエントリCSEに出力する。以下、信号ECOMPaを演算完了信号ECOMPaとも称し、信号EIIDaを命令識別子EIIDaとも称する。   For example, when the signal FED has a logical value “1”, the selection unit SEL20 outputs the operation completion signal ECOMP and the instruction identifier EIID received from the arithmetic unit FPU to the commit stack entry CSE as signals ECOMPa and EIIDa. For example, when the signal FED has a logical value “0”, the selection unit SEL20 outputs the operation completion signal ECOMP_LCH and the instruction identifier EIID_LCH received from the latch LAT10 to the commit stack entry CSE as signals ECOMPa and EIIDa. Hereinafter, the signal ECOMPa is also referred to as an operation completion signal ECOMPa, and the signal EIIDa is also referred to as an instruction identifier EIIDa.

コミットスタックエントリCSEは、選択部SEL20から受信した演算完了信号ECOMPaおよび命令識別子EIIDaに基づいて、命令識別子EIIDaに対応する命令のエントリ情報を更新する。例えば、コミットスタックエントリCSEは、命令識別子EIIDaに対応する命令のエントリ情報のうちの状態情報を、演算完了信号ECOMPaの情報(演算の完了)に設定する。   The commit stack entry CSE updates entry information of an instruction corresponding to the instruction identifier EIIDa based on the calculation completion signal ECOMPa and the instruction identifier EIIDa received from the selection unit SEL20. For example, the commit stack entry CSE sets the status information in the entry information of the instruction corresponding to the instruction identifier EIIDa to the information of the operation completion signal ECOMPa (completion of operation).

また、コミットスタックエントリCSEは、例外情報EXSIG_LCHおよび命令識別子EIID_LLをラッチLAT20、LAT12からそれぞれ受信した場合、命令識別子EIID_LLに対応する命令のエントリ情報を更新する。例えば、コミットスタックエントリCSEは、命令識別子EIID_LLに対応する命令のエントリ情報のうちの状態情報を、例外情報EXSIG_LCHの内容(演算例外の発生)に設定する。   In addition, when the commit stack entry CSE receives the exception information EXSIG_LCH and the instruction identifier EIID_LL from the latches LAT20 and LAT12, the commit stack entry CSE updates the entry information of the instruction corresponding to the instruction identifier EIID_LL. For example, the commit stack entry CSE sets the state information in the entry information of the instruction corresponding to the instruction identifier EIID_LL to the content of the exception information EXIG_LCH (occurrence of operation exception).

例外情報EXSIG_LCHは、演算器FPUから論理積部AND1、ラッチLAT20を介してコミットスタックエントリCSEに転送された例外情報EXSIGに対応する。なお、信号FEDが論理値”1”の場合、例外情報EXSIG_LCHは、論理積部AND1が例外情報EXSIGを受信したか否かに拘わらず、論理値”0”である。   The exception information EXSIG_LCH corresponds to the exception information EXSIG transferred from the computing unit FPU to the commit stack entry CSE via the logical product unit AND1 and the latch LAT20. When the signal FED has a logical value “1”, the exception information EXSIG_LCH has a logical value “0” regardless of whether or not the AND unit AND1 receives the exception information EXSIG.

例えば、インバータINV1は、信号FEDを状態制御部MCTLから受信し、信号FEDの反転信号を論理積部AND1に出力する。論理積部AND1は、例外情報EXSIGを演算器FPUから受信し、信号FEDの反転信号をインバータINV1から受信する。そして、論理積部AND1は、例外情報EXSIGと信号FEDの反転信号との論理積結果をラッチLAT20に出力する。   For example, the inverter INV1 receives the signal FED from the state control unit MCTL, and outputs an inverted signal of the signal FED to the AND unit AND1. The AND unit AND1 receives the exception information EXSIG from the arithmetic unit FPU and receives the inverted signal of the signal FED from the inverter INV1. The logical product unit AND1 outputs a logical product result of the exception information EXSIG and the inverted signal of the signal FED to the latch LAT20.

ラッチLAT20は、論理積部AND1から受信した論理積結果(例外情報EXSIGと信号FEDの反転信号との論理積結果)を、論理積結果を受信した次のサイクルで、例外情報EXSIG_LCHとして出力する。例えば、ラッチLAT20は、例外情報EXSIG_LCHをコミットスタックエントリCSEおよび論理積部AND2に出力する。   The latch LAT20 outputs the logical product result (logical product result of the exception information EXSIG and the inverted signal of the signal FED) received from the logical product unit AND1 as exception information EXSIG_LCH in the next cycle in which the logical product result is received. For example, the latch LAT20 outputs the exception information EXSIG_LCH to the commit stack entry CSE and the AND unit AND2.

ここで、演算器FPUは、例えば、演算例外が発生した場合、演算完了信号ECOMPおよび命令識別子EIIDを出力した次のサイクルに、演算例外が発生したことを示す例外情報EXSIGを命令完了制御部CCTLに出力する。このため、コミットスタックエントリCSEは、演算例外が発生した場合、例外情報EXSIG_LCHを、命令識別子EIID_LLを受信したサイクルと同じサイクルに受信する。   Here, for example, when an operation exception occurs, the arithmetic unit FPU sends the exception information EXSIG indicating that the operation exception has occurred in the next cycle after outputting the operation completion signal ECOMP and the instruction identifier EIID to the instruction completion control unit CCTL. Output to. For this reason, when an operation exception occurs, the commit stack entry CSE receives the exception information EXSIG_LCH in the same cycle as the cycle in which the instruction identifier EIID_LL is received.

コミットスタックエントリCSEに登録された命令のエントリ情報は、ポインタPTR1、PTR2、PTR3、PTR4に基づいて、読み出される。なお、ポインタPTR1、PTR2、PTR3、PTR4は、ポインタPTRm1、PTRm2、PTRm3、PTRm4に基づいて生成される。   The entry information of the instruction registered in the commit stack entry CSE is read based on the pointers PTR1, PTR2, PTR3, and PTR4. Note that the pointers PTR1, PTR2, PTR3, and PTR4 are generated based on the pointers PTRm1, PTRm2, PTRm3, and PTRm4.

ポインタPTRm1は、コミットスタックエントリCSEに登録されている有効な命令(命令完了処理が実行されていない命令)の中で最も古い命令識別子の番号を示すポインタ信号である。すなわち、ポインタPTRm1は、キューの先頭(TOQ:Top Of Queue)を示すポインタ信号である。ポインタPTRm2、PTRm3、PTRm4は、コミットスタックエントリCSEに登録されている有効な命令の中で、それぞれ2番目、3番目、4番目に古い命令識別子の番号を示すポインタ信号である。   The pointer PTRm1 is a pointer signal indicating the number of the oldest instruction identifier among valid instructions registered in the commit stack entry CSE (instructions for which instruction completion processing has not been executed). That is, the pointer PTRm1 is a pointer signal indicating the top of the queue (TOQ: Top Of Queue). The pointers PTRm2, PTRm3, and PTRm4 are pointer signals indicating the numbers of the second, third, and fourth oldest instruction identifiers among the valid instructions registered in the commit stack entry CSE.

例えば、コミットスタックエントリCSEに登録可能な命令数が64個の場合、各ポインタPTRm(PTRm1−PTRm4)、PTR(PTR1−PTR4)は、6ビットの信号である。各ポインタPTRmは、例えば、命令完了処理が実行される度にカウントアップする。   For example, when the number of instructions that can be registered in the commit stack entry CSE is 64, the pointers PTRm (PTRm1-PTRm4) and PTR (PTR1-PTR4) are 6-bit signals. Each pointer PTRm is counted up, for example, every time an instruction completion process is executed.

例えば、ポインタ部PTは、ポインタPTRm1−PTRm4を保持し、保持したポインタPTRm1−PTRm4を加算部ADDに出力する。   For example, the pointer unit PT holds the pointers PTRm1 to PTRm4, and outputs the held pointers PTRm1 to PTRm4 to the adding unit ADD.

加算部ADDは、ポインタPTRm1−PTRm4をポインタ部PTから受信し、信号COMMIT1、COMMIT2、COMMIT3、COMMIT4を命令完了処理部COMPU1から受信する。そして、加算部ADDは、ポインタ部PTから受信したポインタPTRm1−PTRm4を、命令完了処理部COMPU1から受信した信号COMMIT1−COMMIT4に応じてカウントアップする。なお、信号COMMIT1−COMMIT4は、例えば、命令完了部COMPU2に命令完了処理を実行させるための信号である。   The adding unit ADD receives the pointers PTRm1 to PTRm4 from the pointer unit PT, and receives the signals COMMIT1, COMMIT2, COMMIT3, and COMMIT4 from the instruction completion processing unit COMPU1. Then, the adding unit ADD counts up the pointers PTRm1 to PTRm4 received from the pointer unit PT according to the signals COMMIT1 to COMMIT4 received from the instruction completion processing unit COMPU1. The signals COMMIT1 to COMMIT4 are signals for causing the instruction completion unit COMPU2 to execute instruction completion processing, for example.

例えば、加算部ADDは、信号COMMIT1のみが論理値”1”の場合、1個の命令が完了するため、ポインタ部PTから受信したポインタPTRm1−PTRm4の値に1をそれぞれ加算する。また、例えば、加算部ADDは、信号COMMIT1−COMMIT4の全てが論理値”1”の場合、4個の命令が完了するため、ポインタ部PTから受信したポインタPTRm1−PTRm4の値に4をそれぞれ加算する。   For example, when only the signal COMMIT1 has the logical value “1”, the adder ADD adds 1 to the values of the pointers PTRm1 to PTRm4 received from the pointer unit PT because one instruction is completed. Further, for example, when all of the signals COMMIT1 to COMMIT4 have the logical value “1”, the adder ADD adds 4 to the values of the pointers PTRm1 to PTRm4 received from the pointer unit PT because four instructions are completed. To do.

そして、加算部ADDは、信号COMMIT1−COMMIT4に応じてカウントアップしたポインタPTRm1−PTRm4を、ポインタPTR1−PTR4として、ポインタ部PT、選択部SEL10、比較部CMP10、CMP20に出力する。例えば、ポインタ部PTは、加算部ADDから受信したポインタPTR1−PTR4を、ポインタPTRm1−PTRm4として保持する。   Then, the addition unit ADD outputs the pointers PTRm1 to PTRm4 counted up according to the signals COMMIT1 to COMMIT4 as the pointers PTR1 to PTR4 to the pointer unit PT, the selection unit SEL10, the comparison units CMP10 and CMP20. For example, the pointer unit PT holds the pointers PTR1 to PTR4 received from the adding unit ADD as pointers PTRm1 to PTRm4.

なお、コミットスタックエントリCSEに登録可能な命令数が64個の場合、例えば、ポインタPTRm1−PTRm4、PTR1−PTR4に設定される数値の上限は、63である。このため、加算部ADDは、加算後のポインタPTR1−PTR4の値が63を超える場合、0に戻って計算する。例えば、ポインタPTRm1の値が62で、信号COMMIT1のみが論理値”1”の場合、ポインタPTR1、PTR2、PTR3、PTR4の値は、それぞれ63、0、1、2である。   When the number of instructions that can be registered in the commit stack entry CSE is 64, for example, the upper limit of the numerical values set in the pointers PTRm1-PTRm4 and PTR1-PTR4 is 63. For this reason, when the value of the pointers PTR1 to PTR4 after the addition exceeds 63, the addition unit ADD returns to 0 and performs calculation. For example, when the value of the pointer PTRm1 is 62 and only the signal COMMIT1 is the logical value “1”, the values of the pointers PTR1, PTR2, PTR3, and PTR4 are 63, 0, 1, and 2, respectively.

選択部SEL10は、図1に示した選択部SEL10と同一または同様である。すなわち、選択部SEL10は、命令完了処理の対象となる命令を、デコードされた順に保持部(例えば、コミットスタックエントリCSE)から読み出す選択部の一例である。例えば、選択部SEL10は、コミットスタックエントリCSEからエントリ情報を読み出す際の読み出しポインタとして、ポインタPTR1−PTR4を加算部ADDから受信する。そして、選択部SEL10は、コミットスタックエントリCSEに命令識別子毎に登録されているエントリ情報から、ポインタPTR1−PTR4が示す番号の命令識別子のエントリ情報を読み出す。   The selection unit SEL10 is the same as or similar to the selection unit SEL10 illustrated in FIG. That is, the selection unit SEL10 is an example of a selection unit that reads instructions to be subjected to instruction completion processing from a holding unit (for example, commit stack entry CSE) in the order of decoding. For example, the selection unit SEL10 receives the pointers PTR1 to PTR4 from the addition unit ADD as read pointers when reading entry information from the commit stack entry CSE. Then, the selection unit SEL10 reads the entry information of the instruction identifier having the number indicated by the pointers PTR1 to PTR4 from the entry information registered for each instruction identifier in the commit stack entry CSE.

例えば、選択部SEL10は、コミットスタックエントリCSEから読み出したエントリ情報のうちの信号ECOMPc1、ECOMPc2、ECOMPc3、ECOMPc4を、バイパス部BYPの論理和部OR1に出力する。なお、信号ECOMPc1−ECOMPc4は、ポインタPTR1−PTR4が示す命令のエントリ情報のうちの状態情報に設定された演算完了信号ECOMPの情報を示す信号である。   For example, the selection unit SEL10 outputs signals ECOMPc1, ECOMPc2, ECOMPc3, and ECOMPc4 in the entry information read from the commit stack entry CSE to the logical sum unit OR1 of the bypass unit BYP. Signals ECOMPc1-ECOMPc4 are signals indicating information on the operation completion signal ECOMP set in the state information in the entry information of the instruction indicated by the pointers PTR1-PTR4.

また、例えば、選択部SEL10は、コミットスタックエントリCSEから読み出したエントリ情報のうちの信号TRAPs1、TRAPs2、TRAPs3、TRAPs4をラッチLAT30に出力する。なお、信号TRAPs1−TRAPs4は、ポインタPTR1−PTR4が示す命令のエントリ情報のうちの状態情報に設定された例外情報EXSIG_LCHの内容を示す信号である。これにより、ポインタPTR1−PTR4が示す命令の例外情報EXSIG_LCHの内容(信号TRAPs1−TRAPs4)がラッチLAT30に設定される。   For example, the selection unit SEL10 outputs signals TRAPs1, TRAPs2, TRAPs3, and TRAPs4 in the entry information read from the commit stack entry CSE to the latch LAT30. Signals TRAPs1-TRAPs4 are signals indicating the contents of the exception information EXSIG_LCH set in the state information in the entry information of the instruction indicated by the pointers PTR1-PTR4. Thereby, the contents (signals TRAPs1-TRAPs4) of the exception information EXSIG_LCH of the instruction indicated by the pointers PTR1-PTR4 are set in the latch LAT30.

ここで、バイパス部BYPについて説明する。バイパス部BYPは、図1に示したバイパス部BYPと同一または同様である。すなわち、バイパス部BYPは、演算の完了を示すバイパス情報を生成するバイパス部の一例である。例えば、バイパス部BYPの比較部CMP20は、命令識別子EIIDを演算器FPUから受信し、ポインタPTR1−PTR4を加算部ADDから受信する。そして、比較部CMP20は、命令識別子EIIDと各ポインタPTR1−PTR4とを比較し、比較結果を論理積部AND3に出力する。   Here, the bypass unit BYP will be described. The bypass unit BYP is the same as or similar to the bypass unit BYP shown in FIG. That is, the bypass unit BYP is an example of a bypass unit that generates bypass information indicating completion of calculation. For example, the comparison unit CMP20 of the bypass unit BYP receives the instruction identifier EIID from the arithmetic unit FPU and receives the pointers PTR1 to PTR4 from the addition unit ADD. Then, the comparison unit CMP20 compares the instruction identifier EIID with the pointers PTR1 to PTR4 and outputs the comparison result to the AND unit AND3.

例えば、比較部CMP20は、命令識別子EIIDとポインタPTR1とが一致している場合、命令識別子EIIDとポインタPTR1とが一致していることを示す比較結果(論理値”1”の信号)を論理積部AND3に出力する。さらに、比較部CMP20は、命令識別子EIIDと各ポインタPTR2−PTR3とが一致していないことを示す比較結果(論理値”0”の信号)を論理積部AND3に出力する。   For example, when the instruction identifier EIID matches the pointer PTR1, the comparison unit CMP20 performs a logical AND operation on a comparison result (a signal having a logical value “1”) indicating that the instruction identifier EIID matches the pointer PTR1. Output to the part AND3. Further, the comparison unit CMP20 outputs a comparison result (a signal having a logical value “0”) indicating that the instruction identifier EIID and the pointers PTR2 to PTR3 do not match to the logical product unit AND3.

論理積部AND3は、命令識別子EIIDと各ポインタPTR1−PTR4との比較結果、演算完了信号ECOMPおよび信号FEDを、比較部CMP20、演算器FPUおよび状態制御部MCTLからそれぞれ受信する。そして、論理積部AND3は、受信した信号の論理積結果を、バイパス情報ECOMPw1、ECOMPw2、ECOMPw3、ECOMPw4として論理和部OR1に出力する。   The AND unit AND3 receives the comparison result between the instruction identifier EIID and each of the pointers PTR1 to PTR4, the operation completion signal ECOMP, and the signal FED from the comparison unit CMP20, the arithmetic unit FPU, and the state control unit MCTL, respectively. Then, the logical product unit AND3 outputs the logical product result of the received signal to the logical sum unit OR1 as bypass information ECOMPw1, ECOMPw2, ECOMPw3, and ECOMPw4.

例えば、論理積部AND3は、命令識別子EIIDとポインタPTR1との比較結果、演算完了信号ECOMPおよび信号FEDの3つの信号の論理積結果を、バイパス情報ECOMPw1として論理和部OR1に出力する。また、例えば、論理積部AND3は、命令識別子EIIDとポインタPTR2との比較結果、演算完了信号ECOMPおよび信号FEDの3つの信号の論理積結果を、バイパス情報ECOMPw2として論理和部OR1に出力する。   For example, the logical product unit AND3 outputs the logical product result of the three signals of the comparison result between the instruction identifier EIID and the pointer PTR1 and the operation completion signal ECOMP and the signal FED as the bypass information ECOMPw1 to the logical sum unit OR1. Further, for example, the logical product unit AND3 outputs the logical product result of the three signals of the comparison result between the instruction identifier EIID and the pointer PTR2 and the operation completion signal ECOMP and the signal FED as the bypass information ECOMPw2 to the logical sum unit OR1.

また、例えば、論理積部AND3は、命令識別子EIIDとポインタPTR3との比較結果、演算完了信号ECOMPおよび信号FEDの3つの信号の論理積結果を、バイパス情報ECOMPw3として論理和部OR1に出力する。また、例えば、論理積部AND3は、命令識別子EIIDとポインタPTR4との比較結果、演算完了信号ECOMPおよび信号FEDの3つの信号の論理積結果を、バイパス情報ECOMPw4として論理和部OR1に出力する。   Further, for example, the AND unit AND3 outputs the comparison result between the instruction identifier EIID and the pointer PTR3 and the logical product result of three signals of the operation completion signal ECOMP and the signal FED to the OR unit OR1 as bypass information ECOMPw3. Further, for example, the AND unit AND3 outputs a comparison result between the instruction identifier EIID and the pointer PTR4 and a logical product result of three signals of the operation completion signal ECOMP and the signal FED to the OR unit OR1 as bypass information ECOMPw4.

このように、演算の完了を示すバイパス情報ECOMPw(例えば、論理値”1”の信号)は、演算完了信号ECOMPに対応する命令識別子EIIDとポインタPTRとが一致し、かつ、信号FEDが論理値”1”の場合、生成される。すなわち、バイパス部BYPは、演算処理により発生する例外の検出が抑止され、かつ、演算器FPUから出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報ECOMPwを生成する。以下、バイパス情報ECOMPw1−ECOMPw4を信号ECOMPw1−ECOMPw4とも称する。   As described above, the bypass information ECOMPw (for example, a signal having the logical value “1”) indicating the completion of the operation matches the instruction identifier EIID corresponding to the operation completion signal ECOMP and the pointer PTR, and the signal FED has the logical value. If “1”, it is generated. In other words, the bypass unit BYP suppresses detection of an exception generated by the arithmetic processing, and the instruction indicated by the arithmetic completion information output from the arithmetic unit FPU matches the instruction that is the target of the instruction completion processing. Bypass information ECOMPw indicating completion of the calculation is generated. Hereinafter, the bypass information ECOMPw1-ECOMPw4 is also referred to as signals ECOMPw1-ECOMPw4.

論理和部OR1は、信号ECOMPw1−ECOMPw4を論理積部AND3から受信し、信号ECOMPc1−ECOMPc4を選択部SEL10から受信する。そして、論理和部OR1は、信号ECOMPw1−ECOMPw4と信号ECOMPc1−ECOMPc4とのそれぞれの論理和結果を、信号ECOMPs1、ECOMPs2、ECOMPs3、ECOMPs4としてラッチLAT30に出力する。   The OR unit OR1 receives the signals ECOMPw1-ECOMPw4 from the logical product unit AND3, and receives the signals ECOMPc1-ECOMPc4 from the selection unit SEL10. Then, the OR unit OR1 outputs the logical OR results of the signals ECOMPw1-ECOMPw4 and the signals ECOMPc1-ECOMPc4 to the latch LAT30 as signals ECOMPs1, ECOMPs2, ECOMPS3, ECOMPs4.

これにより、ポインタPTR1−PTR4が示す命令の状態に関する情報(信号ECOMPs1−ECOMPs4)がラッチLAT30に設定される。以下、信号ECOMPs1−ECOMPs4を演算完了信号ECOMPs1−ECOMPs4とも称する。   Thereby, information (signals ECOMPs1-ECOMPs4) related to the state of the instruction indicated by the pointers PTR1-PTR4 is set in the latch LAT30. Hereinafter, the signals ECOMPs1-ECOMPs4 are also referred to as operation completion signals ECOMPs1-ECOMPs4.

なお、例えば、信号ECOMPs1は、信号ECOMPw1、ECOMPc1の論理和結果であり、信号ECOMPs2は、信号ECOMPw2、ECOMPc2の論理和結果である。また、例えば、信号ECOMPs3は、信号ECOMPw3、ECOMPc3の論理和結果であり、信号ECOMPs4は、信号ECOMPw4、ECOMPc4の論理和結果である。   For example, the signal ECOMPs1 is a logical sum result of the signals ECOMPw1 and ECOMPc1, and the signal ECOMPs2 is a logical sum result of the signals ECOMPw2 and ECOMPc2. For example, the signal ECOMPs3 is a logical sum result of the signals ECOMPw3 and ECOMPc3, and the signal ECOMPs4 is a logical sum result of the signals ECOMPw4 and ECOMPc4.

このように、演算例外の検出が抑止され、かつ、命令識別子EIIDがポインタPTR1−PTR4のいずれかに一致している場合、命令識別子EIIDが示す命令の演算完了信号ECOMPsとして、演算完了信号ECOMPがラッチLAT30に転送される。すなわち、命令完了処理の対象の命令に関する演算完了信号ECOMPがコミットスタックエントリCSEを介さずにラッチLAT30に転送される。このため、命令完了制御部CCTLは、命令完了処理の対象の命令に関する演算完了信号ECOMPを受信してから演算完了信号ECOMPの情報をラッチLAT30に設定するまでの時間を短縮できる。   As described above, when the detection of the operation exception is suppressed and the instruction identifier EIID matches any of the pointers PTR1 to PTR4, the operation completion signal ECOMP is used as the operation completion signal ECOMPs of the instruction indicated by the instruction identifier EIID. It is transferred to the latch LAT30. That is, the operation completion signal ECOMP relating to the instruction to be processed is transferred to the latch LAT 30 without going through the commit stack entry CSE. For this reason, the instruction completion control unit CCTL can shorten the time from the reception of the operation completion signal ECOMP related to the instruction to be subjected to instruction completion processing until the information of the operation completion signal ECOMP is set in the latch LAT30.

例えば、ラッチLAT30は、バイパス部BYPの論理和部OR1から受信した信号ECOMPs1−ECOMPs4を保持する。そして、ラッチLAT30は、保持した信号ECOMPs1−ECOMPs4を、信号ECOMPs1−ECOMPs4を受信した次のサイクルで、信号ECOMPsl1、ECOMPsl2、ECOMPsl3、ECOMPsl4として命令完了部COMPU1に出力する。   For example, the latch LAT30 holds the signals ECOMPs1-ECOMPs4 received from the logical sum unit OR1 of the bypass unit BYP. The latch LAT 30 outputs the held signals ECOMPs 1 to ECOMPs 4 to the instruction completion unit COMPU 1 as signals ECOMPsl 1, ECOMPsl 2, ECOMPsl 3, and ECOMPsl 4 in the next cycle when the signals ECOMPs 1 to ECOMPs 4 are received.

また、例えば、ラッチLAT30は、選択部SEL10から受信した信号TRAPs1−TRAPs4を保持する。そして、ラッチLAT30は、保持した信号TRAPs1−TRAPs4を、信号TRAPs1−TRAPs4を受信した次のサイクルで、信号TRAPsl1、TRAPsl2、TRAPsl3、TRAPsl4として命令完了部COMPU2に出力する。   Further, for example, the latch LAT30 holds the signals TRAPs1-TRAPs4 received from the selection unit SEL10. Then, the latch LAT30 outputs the held signals TRAPs1-TRAPs4 to the instruction completion unit COMPU2 as signals TRAPsl1, TRAPsl2, TRAPsl3, TRAPsl4 in the next cycle when the signals TRAPs1-TRAPs4 are received.

なお、命令完了部COMPU1は、ラッチLAT30から出力された信号ECOMPsl1−ECOMPsl4の他に、命令完了処理の実行を抑止する信号INHをラッチLAT40から受信する。信号INHは、例えば、演算例外の検出が抑止されず、かつ、命令完了処理の対象となる命令のいずれかで演算例外が発生した場合に生成される。   The instruction completion unit COMPU1 receives from the latch LAT40 a signal INH that inhibits execution of the instruction completion processing in addition to the signals ECOMPsl1-ECOMPsl4 output from the latch LAT30. The signal INH is generated, for example, when detection of an operation exception is not suppressed and an operation exception occurs in one of the instructions that are the target of instruction completion processing.

例えば、比較部CMP10は、命令識別子EIID_LLおよびポインタPTR1−PTR4をラッチLAT12および加算部ADDから受信し、命令識別子EIID_LLと各ポインタPTR1−PTR4とを比較する。そして、比較部CMP10は、例えば、命令識別子EIID_LLがポインタPTR1−PTR4のいずれかと一致している場合、比較結果として、論理値”1”の信号を論理積部AND2に出力する。また、例えば、比較部CMP10は、命令識別子EIID_LLがポインタPTR1−PTR4のいずれにも一致していない場合、比較結果として、論理値”0”の信号を論理積部AND2に出力する。   For example, the comparison unit CMP10 receives the instruction identifier EIID_LL and the pointers PTR1-PTR4 from the latch LAT12 and the addition unit ADD, and compares the instruction identifier EIID_LL with each pointer PTR1-PTR4. For example, when the instruction identifier EIID_LL matches any of the pointers PTR1 to PTR4, the comparison unit CMP10 outputs a signal having a logical value “1” to the logical product unit AND2 as a comparison result. Further, for example, when the instruction identifier EIID_LL does not match any of the pointers PTR1 to PTR4, the comparison unit CMP10 outputs a signal having a logical value “0” to the logical product unit AND2 as a comparison result.

論理積部AND2は、例えば、比較部CMP10による比較結果、ラッチLAT12に保持された演算完了信号ECOMP_LLおよびラッチLAT20に保持された例外情報EXSIG_LCHを受信する。そして、論理積部AND2は、比較部CMP10による比較結果、演算完了信号ECOMP_LLおよび例外情報EXSIG_LCHの3つの信号の論理積結果を、ラッチLAT40に出力する。ラッチLAT40は、論理積部AND2による論理積結果を、論理積結果を受信した次のサイクルで、信号INHとして命令完了処理部COMPU1に出力する。   The AND unit AND2 receives, for example, the comparison result by the comparison unit CMP10, the operation completion signal ECOMP_LL held in the latch LAT12, and the exception information EXSIG_LCH held in the latch LAT20. Then, the AND unit AND2 outputs the logical product result of the three signals of the comparison result by the comparison unit CMP10, the operation completion signal ECOMP_LL, and the exception information EXSIG_LCH to the latch LAT40. The latch LAT40 outputs the logical product result of the logical product unit AND2 to the instruction completion processing unit COMPU1 as a signal INH in the next cycle after receiving the logical product result.

命令完了処理部COMPU1および命令完了部COMPU2は、完了処理部の一例である。例えば、命令完了処理部COMPU1は、信号ECOMPsl1−ECOMPsl4をラッチLAT30から受信し、命令完了処理の実行を抑止する信号INHをラッチLAT40から受信する。   The instruction completion processing unit COMPU1 and the instruction completion unit COMPU2 are examples of a completion processing unit. For example, the instruction completion processing unit COMPU1 receives the signals ECOMPsl1-ECOMPsl4 from the latch LAT30, and receives the signal INH for inhibiting the execution of the instruction completion processing from the latch LAT40.

そして、命令完了処理部COMPU1は、信号ECOMPsl1−ECOMPsl4、INHに基づいて、信号COMMIT1−COMMIT4を生成する。例えば、命令完了処理部COMPU1は、命令完了処理の実行を抑止する信号INHを受信した場合やパイプラインフラッシュが実行された場合、命令完了処理を実行させるための信号COMMIT1−COMMIT4の生成を抑止する。   Then, the instruction completion processing unit COMPU1 generates signals COMMIT1-COMMIT4 based on the signals ECOMPsl1-ECOMPsl4, INH. For example, the instruction completion processing unit COMPU1 suppresses generation of the signals COMMIT1 to COMMIT4 for executing the instruction completion processing when the signal INH for suppressing the execution of the instruction completion processing is received or when the pipeline flush is executed. .

例えば、信号INHが論理値”0”のサイクルでは、命令完了処理部COMPU1は、命令完了処理を実行させるための信号COMMIT1−COMMIT4(例えば、論理値”1”の信号)を命令完了部COMPU2に出力することを抑止する。   For example, in a cycle in which the signal INH is a logical value “0”, the instruction completion processing unit COMPU1 sends signals COMMIT1 to COMMIT4 (for example, a signal having a logical value “1”) for executing the instruction completion processing to the instruction completion unit COMPU2. Suppresses output.

例えば、論理値”1”の信号COMMITが命令完了処理の実行を指示している場合、命令完了処理部COMPU1は、信号INHが論理値”1”のサイクルでは、信号COMMIT1−COMMIT4を論理値”0”に設定する。また、例えば、信号INHが論理値”0”のサイクルでは、命令完了処理部COMPU1は、論理値”1”の信号COMMIT1−COMMIT4を、論理値”1”の信号ECOMPsl1−ECOMPsl4の受信に応じて、命令完了部COMPU2に出力する。   For example, when the signal COMMIT having the logical value “1” instructs execution of the instruction completion process, the instruction completion processing unit COMPU1 sets the signals COMMIT1 to COMMIT4 to the logical value in the cycle in which the signal INH has the logical value “1”. Set to 0 ”. Further, for example, in a cycle in which the signal INH has a logical value “0”, the instruction completion processing unit COMPU1 receives the signals COMMIT1 to COMMIT4 having the logical value “1” and the signals ECOMPsl1 to ECOMPsl4 having the logical value “1”. , Output to the instruction completion unit COMPU2.

なお、例えば、信号INHが論理値”0”のサイクルにおいて、信号COMMIT1が論理値”1”に設定される条件は、信号ECOMPsl1が論理値”1”の場合である。また、信号COMMIT2が論理値”1”に設定される条件は、信号COMMIT1および信号ECOMPsl2が論理値”1”の場合である。信号COMMIT3が論理値”1”に設定される条件は、信号COMMIT2および信号ECOMPsl3が論理値”1”の場合である。信号COMMIT4が論理値”1”に設定される条件は、信号COMMIT3および信号ECOMPsl4が論理値”1”の場合である。以下、各信号COMMIT1−COMMIT4が論理値”1”に設定される条件を完了条件とも称する。   For example, the condition that the signal COMMIT1 is set to the logic value “1” in the cycle in which the signal INH is the logic value “0” is the case where the signal ECOMPsl1 is the logic value “1”. The condition for setting the signal COMMIT2 to the logical value “1” is when the signal COMMIT1 and the signal ECOMPsl2 are the logical value “1”. The condition for setting the signal COMMIT3 to the logical value “1” is when the signal COMMIT2 and the signal ECOMPsl3 are the logical value “1”. The condition for setting the signal COMMIT4 to the logical value “1” is when the signal COMMIT3 and the signal ECOMPsl4 are the logical value “1”. Hereinafter, a condition in which each of the signals COMMIT1 to COMMIT4 is set to the logical value “1” is also referred to as a completion condition.

命令完了部COMPU2は、信号COMMIT1−COMMIT4を命令完了処理部COMPU1から受信し、信号TRAPsl1−TRAPsl4をラッチLAT30から受信する。そして、命令完了部COMPU2は、信号COMMIT1−COMMIT4や信号TRAPsl1−TRAPsl4に基づいて、命令完了処理や例外処理を実行する。   The instruction completion unit COMPU2 receives the signals COMMIT1-COMMIT4 from the instruction completion processing unit COMPU1, and receives the signals TRAPsl1-TRAPsl4 from the latch LAT30. Then, the instruction completion unit COMPU2 executes instruction completion processing and exception processing based on the signals COMMIT1-COMMIT4 and the signals TRAPsl1-TRAPsl4.

例えば、命令完了部COMPU2は、論理値”1”の信号COMMIT1−COMMIT4を受信した場合、浮動小数点レジスタFPREGへの演算結果の書き込みを実行させる制御信号を、浮動小数点更新バッファFPBUF等に出力する。また、例えば、命令完了部COMPU2は、論理値”1”の信号COMMIT1−COMMIT4を受信した場合、PC値および次のPC値の更新等を実行させる制御信号を、状態制御部MCTLに出力する。   For example, when the instruction completion unit COMPU2 receives the signals COMMIT1 to COMMIT4 having the logical value “1”, the instruction completion unit COMPU2 outputs a control signal for writing the operation result to the floating point register FPREG to the floating point update buffer FPBUF and the like. Further, for example, when the instruction completion unit COMPU2 receives the signal COMMIT1 to COMMIT4 having the logical value “1”, the instruction completion unit COMPU2 outputs a control signal for updating the PC value and the next PC value to the state control unit MCTL.

このように、命令完了部COMPU2は、バイパス情報ECOMPw1−ECOMPw4、信号ECOMPc1−ECOMPc4等に基づいて生成される信号COMMIT1−COMMIT4に基づいて、命令完了処理を実行する。すなわち、命令完了部COMPU2は、バイパス情報ECOMPwおよび選択部SEL10によりコミットスタックエントリCSEから読み出された命令の状態情報(信号ECOMPc)に基づいて、命令完了処理を実行する。   In this way, the instruction completion unit COMPU2 executes instruction completion processing based on the signals COMMIT1-COMMIT4 generated based on the bypass information ECOMPw1-ECOMPw4, the signals ECOMPc1-ECOMPc4, and the like. That is, the instruction completion unit COMPU2 executes instruction completion processing based on the bypass information ECOMPw and the state information (signal ECOMPc) of the instruction read from the commit stack entry CSE by the selection unit SEL10.

例えば、演算の完了を示すバイパス情報ECOMPw1が生成された場合、信号COMMIT1は、演算の完了を示すバイパス情報ECOMPw1に対応する信号である。また、例えば、演算の完了を示すバイパス情報ECOMPw1が生成されていない場合、信号COMMIT1は、信号ECOMPc1に対応する信号である。   For example, when the bypass information ECOMPw1 indicating the completion of the operation is generated, the signal COMMIT1 is a signal corresponding to the bypass information ECOMPw1 indicating the completion of the operation. For example, when the bypass information ECOMPw1 indicating completion of the calculation is not generated, the signal COMMIT1 is a signal corresponding to the signal ECOMPc1.

したがって、命令完了部COMPU2は、例えば、演算の完了を示すバイパス情報ECOMPw1が生成された命令に対してはバイパス情報ECOMPw1に基づいて命令完了処理を実行する。また、例えば、命令完了部COMPU2は、演算の完了を示すバイパス情報ECOMPw1が生成されていない命令に対してはコミットスタックエントリCSEから読み出された信号ECOMPc1に基づいて命令完了処理を実行する。   Therefore, for example, the instruction completion unit COMPU2 executes instruction completion processing based on the bypass information ECOMPw1 for the instruction for which the bypass information ECOMPw1 indicating the completion of the operation is generated. Further, for example, the instruction completion unit COMPU2 executes instruction completion processing based on the signal ECOMPc1 read from the commit stack entry CSE for an instruction for which bypass information ECOMPw1 indicating completion of the operation has not been generated.

なお、例えば、図1に示した完了処理部COMPUは、ラッチLAT30、命令完了処理部COMPU1、命令完了部COMPU2等を含むモジュールに対応する。また、命令完了制御部CCTLの構成は、この例に限定されない。   For example, the completion processing unit COMPU illustrated in FIG. 1 corresponds to a module including the latch LAT 30, the instruction completion processing unit COMPU1, the instruction completion unit COMPU2, and the like. Further, the configuration of the instruction completion control unit CCTL is not limited to this example.

図6は、図4に示した演算処理装置PUのパイプライン処理の一例を示す。例えば、演算処理装置PUは、デコードステージD、プライオリティステージP、バッファステージB、演算実行ステージX、レジスタ更新ステージUおよびレジスタ書き込みステージWを含むパイプライン処理を実行する。   FIG. 6 shows an example of pipeline processing of the arithmetic processing unit PU shown in FIG. For example, the arithmetic processing unit PU executes pipeline processing including a decode stage D, a priority stage P, a buffer stage B, an arithmetic execution stage X, a register update stage U, and a register write stage W.

デコードステージDでは、命令デコーダDECは、命令キャシュCCMから受信した命令を、インオーダでデコードする。そして、命令デコーダDECは、デコードした命令を命令識別子とともに、命令完了制御部CCTLのコミットスタックエントリCSEに命令順にインオーダで登録する。さらに、命令デコーダDECは、デコードした命令を、命令種別に基づいて、リザベーションステーションRSA、RSE、RSF、RSBRに登録する。   In the decode stage D, the instruction decoder DEC decodes the instruction received from the instruction cache CCM in order. Then, the instruction decoder DEC registers the decoded instruction together with the instruction identifier in the order of instructions in the commit stack entry CSE of the instruction completion control unit CCTL in order. Further, the instruction decoder DEC registers the decoded instruction in the reservation stations RSA, RSE, RSF, and RSBR based on the instruction type.

プライオリティステージPでは、各リザベーションステーションRSA、RSE、RSF、RSBRは、実行可能な状態の命令を選択する。バッファステージBでは、演算器EXU、FPU等のモジュールは、プライオリティステージPで選択された命令で使用するデータ等をレジスタ(例えば、レジスタEXREG、FPREG等)から読み出す。   In the priority stage P, each reservation station RSA, RSE, RSF, RSBR selects an instruction in an executable state. In the buffer stage B, modules such as the arithmetic units EXU and FPU read data and the like used by the instruction selected in the priority stage P from a register (for example, registers EXREG and FPREG).

演算実行ステージXでは、演算器EXU、FPU等のモジュールは、バッファステージBでレジスタから読み出したデータ等を用いて、プライオリティステージPで選択された命令を実行する。   In the operation execution stage X, modules such as the operation units EXU and FPU execute the instruction selected in the priority stage P using the data read from the register in the buffer stage B and the like.

レジスタ更新ステージUでは、演算器EXU、FPU等のモジュールは、演算結果を更新バッファ(例えば、更新バッファEXBUF、FPBUF等)に格納する。また、演算器EXU、FPUは、演算の完了を示す演算完了情報(例えば、演算完了信号ECOMP、命令識別子EIID)を命令完了制御部CCTLに出力する。なお、例えば、演算例外が発生した場合、演算器EXU、FPUは、演算例外が発生したことを示す例外情報EXSIGを命令完了制御部CCTLに出力する。   In the register update stage U, modules such as the calculators EXU and FPU store the calculation results in an update buffer (for example, update buffer EXBUF, FPBUF, etc.). Further, the arithmetic units EXU and FPU output calculation completion information (for example, a calculation completion signal ECOMP and an instruction identifier EIID) indicating the completion of the calculation to the instruction completion control unit CCTL. For example, when an arithmetic exception occurs, the arithmetic units EXU and FPU output exception information EXSIG indicating that the arithmetic exception has occurred to the instruction completion control unit CCTL.

また、例えば、データキャッシュDCMは、データ転送が完了したことを示すデータ転送完了情報を命令完了制御部CCTLに出力する。また、例えば、分岐制御部BCTLは、分岐予測機構BRPREの分岐予測に対する判定が完了したことを示す分岐判定完了情報を命令完了制御部CCTLに出力する。そして、命令完了制御部CCTLは、演算完了信号ECOMP等の各完了情報に基づいて、インオーダで命令完了処理を実行する。   Further, for example, the data cache DCM outputs data transfer completion information indicating that the data transfer is completed to the instruction completion control unit CCTL. Further, for example, the branch control unit BCTL outputs branch determination completion information indicating that the determination on the branch prediction of the branch prediction mechanism BRPRE is completed to the instruction completion control unit CCTL. Then, the instruction completion control unit CCTL executes instruction completion processing in-order based on each completion information such as the operation completion signal ECOMP.

レジスタ書き込みステージWでは、更新バッファ(例えば、更新バッファEXBUF、FPBUF等)は、演算結果等をレジスタ(例えば、レジスタEXREG、FPREG等)に書き込む。また、状態制御部MCTLは、PC値、次のPC値等を更新する。なお、演算処理装置PUのパイプライン処理は、この例に限定されない。   In the register write stage W, the update buffer (for example, the update buffer EXBUF, FPBUF, etc.) writes the operation result or the like to the register (for example, the register EXREG, FPREG, etc.). Further, the state control unit MCTL updates the PC value, the next PC value, and the like. Note that the pipeline processing of the arithmetic processing unit PU is not limited to this example.

図7は、スーパースカラ方式によるアウトオブオーダ実行の一例を示す。なお、図7の例では、演算処理装置PUは、最大4個の命令を並列に実行する。例えば、命令デコーダDECは、命令キャッシュCCMから複数の命令をインオーダーで取得(フェッチ)し、取得した複数の命令をインオーダでデコードする。そして、演算部OPや分岐制御部BCTLは、命令デコーダDECでデコードされた複数の命令をアウトオブオーダで実行する。最後に、命令完了制御部CCTL等は、演算等が完了した命令に対するコミット処理(命令完了処理)をインオーダで実行する。コミット処理がインオーダで実行されるため、アウトオブオーダで実行された命令は、コミット処理が実行されるまで、待たされる場合がある(図7のコミット待ち)。このように、演算処理装置PUは、複数の命令をアウトオブオーダで実行した場合にも、コミット処理をインオーダで実行する。   FIG. 7 shows an example of out-of-order execution by the superscalar method. In the example of FIG. 7, the arithmetic processing unit PU executes a maximum of four instructions in parallel. For example, the instruction decoder DEC acquires (fetches) a plurality of instructions from the instruction cache CCM in order, and decodes the acquired plurality of instructions in order. Then, the operation unit OP and the branch control unit BCTL execute a plurality of instructions decoded by the instruction decoder DEC out of order. Finally, the instruction completion control unit CCTL or the like executes a commit process (instruction completion process) for an instruction for which an operation has been completed in order. Since the commit process is executed in order, an instruction executed out of order may be waited until the commit process is executed (commit wait in FIG. 7). As described above, the arithmetic processing unit PU executes the commit process in order even when a plurality of instructions are executed out of order.

図8は、図5に示した命令完了制御部CCTLの動作の一例を示す。なお、図8は、演算例外の検出が抑止され(FED=1)、かつ、演算例外が発生した場合の命令完了制御部CCTLの動作の一例を示す。なお、図8の動作では、信号FEDが論理値”1”であるため、論理値”1”の例外情報EXSIGを命令完了制御部CCTLがサイクル5で受信した場合でも、例外情報EXSIG_LCHは、論理値”0”に維持される。このため、信号INHは、論理値”0”に維持される。   FIG. 8 shows an example of the operation of the instruction completion control unit CCTL shown in FIG. FIG. 8 shows an example of the operation of the instruction completion control unit CCTL when detection of an operation exception is suppressed (FED = 1) and an operation exception occurs. In the operation of FIG. 8, since the signal FED has the logical value “1”, even when the instruction completion control unit CCTL receives the exception information EXSIG having the logical value “1” in the cycle 5, the exception information EXSIG_LCH is The value is maintained at “0”. For this reason, the signal INH is maintained at the logical value “0”.

図のFADD(IID=12)は、値”12”の命令識別子(IID=12)に対応する命令に基づく浮動小数点加算のパイプラインステージを示す。例えば、サイクル4は、浮動小数点加算の最後の演算実行ステージXに対応する。   FADD (IID = 12) in the figure indicates a pipeline stage of floating point addition based on an instruction corresponding to an instruction identifier (IID = 12) having a value “12”. For example, cycle 4 corresponds to the last operation execution stage X of the floating point addition.

サイクル4では、命令完了制御部CCTLは、論理値”1”の演算完了信号ECOMPおよび値”12”の命令識別子EIIDを演算器FPUから受信する。なお、値”12”の命令識別子EIIDは、演算完了信号ECOMPに対応する命令の識別子である。信号FEDが論理値”1”で、かつ、ポインタPTR1の値と命令識別子EIIDの値とがともに12であるため、信号ECOMPw1は、演算完了信号ECOMPの論理値”1”と同じ論理値”1”に変化する。そして、信号ECOMPw1が論理値”1”に変化したことにより、信号ECOMPs1が論理値”1”に変化する。   In cycle 4, the instruction completion control unit CCTL receives the operation completion signal ECOMP having the logical value “1” and the instruction identifier EIID having the value “12” from the arithmetic unit FPU. The instruction identifier EIID having the value “12” is an identifier of an instruction corresponding to the operation completion signal ECOMP. Since the signal FED is a logical value “1” and the value of the pointer PTR1 and the value of the instruction identifier EIID are both 12, the signal ECOMPw1 is the same logical value “1” as the logical value “1” of the operation completion signal ECOMP. To change. Then, since the signal ECOMPw1 changes to the logical value “1”, the signal ECOMPs1 changes to the logical value “1”.

これにより、論理値”1”の信号ECOMPs1がラッチLAT30に保持される。また、サイクル4では、コミットスタックエントリCSEに登録されている命令のうち、値”12”の命令識別子EIIDに対応する命令の状態情報に、演算完了信号ECOMPの情報(演算の完了)が設定される。   As a result, the signal ECOMPs1 having the logical value “1” is held in the latch LAT30. In cycle 4, the operation completion signal ECOMP information (computation completion) is set in the status information of the instruction corresponding to the instruction identifier EIID having the value “12” among the instructions registered in the commit stack entry CSE. The

サイクル5では、サイクル4で論理値”1”の信号ECOMPs1がラッチLAT30に保持されたため、ラッチLAT30の出力信号である信号ECOMPsl1が論理値”1”に変化する。信号ECOMPsl1が論理値”1”で、信号INHが論理値”0”であるため、信号COMMIT1が論理値”1”に変化する。   In cycle 5, since the signal ECOMPs1 having the logical value “1” is held in the latch LAT30 in cycle 4, the signal ECOMPsl1 that is the output signal of the latch LAT30 changes to the logical value “1”. Since the signal ECOMPsl1 is the logical value “1” and the signal INH is the logical value “0”, the signal COMMIT1 changes to the logical value “1”.

また、例えば、信号COMMIT2−COMIT4は、図5で説明したそれぞれの完了条件を満たしている場合、論理値”1”に変化する。例えば、サイクル4で論理値”1”の信号ECOMPc2−ECOMPc4がコミットスタックエントリCSEから読み出された場合、信号COMMIT2−COMIT4もサイクル5で論理値”1”に変化する。信号COMMIT1−COMIT4が論理値”1”に変化するため、ポインタPTR1の値は16(=12+4)に変化する。これにより、値”16”のポインタPTR1が、ポインタ部PTに保持される。   Further, for example, the signals COMMIT 2 -COMIT 4 change to the logical value “1” when the completion conditions described in FIG. 5 are satisfied. For example, when the signal ECOMPc2-ECOMPc4 having the logical value “1” is read from the commit stack entry CSE in the cycle 4, the signal COMMIT2-COMIT4 also changes to the logical value “1” in the cycle 5. Since the signal COMMIT1-COMIT4 changes to the logical value “1”, the value of the pointer PTR1 changes to 16 (= 12 + 4). As a result, the pointer PTR1 having the value “16” is held in the pointer portion PT.

サイクル6では、ポインタPTR1mの値は、サイクル5でポインタ部PTに保持されたポインタPTR1の値である16に変化する。   In cycle 6, the value of pointer PTR1m changes to 16, which is the value of pointer PTR1 held in pointer unit PT in cycle 5.

このように、命令完了制御部CCTLは、例えば、信号FEDが論理値”1”で、かつ、命令識別子EIIDの値がポインタPTR1の値と同じ場合、レジスタ更新ステージUを1サイクルで実行できる。これに対し、例えば、バイパス情報ECOMPw1−ECOMPw4が生成されない構成では、図12に示すように、レジスタ更新ステージUを2サイクルで実行する。   In this way, the instruction completion control unit CCTL can execute the register update stage U in one cycle when the signal FED has a logical value “1” and the value of the instruction identifier EIID is the same as the value of the pointer PTR1, for example. On the other hand, for example, in a configuration in which bypass information ECOMPw1-ECOMPw4 is not generated, the register update stage U is executed in two cycles as shown in FIG.

すなわち、図8の動作では、バイパス情報ECOMPw1−ECOMPw4が生成されない構成の動作(例えば、図12の動作)に比べて、命令完了処理を1サイクル早く開始できる。このため、演算処理装置PUの性能が向上する。例えば、信号COMMIT2−COMIT4の完了条件が満たされている場合、演算処理装置PUは、ポインタPTR2−PTR4が示す命令(ポインタPTR1が示す命令の後続の命令)も、ポインタPTR1が示す命令と同じサイクルで命令完了処理を開始できる。すなわち、演算処理装置PUは、バイパス情報ECOMPw1−ECOMPw4が生成されない構成の動作(例えば、図12の動作)に比べて、後続の命令に対する命令完了処理も1サイクル早く開始できる。   That is, in the operation of FIG. 8, the instruction completion process can be started one cycle earlier than the operation of the configuration in which the bypass information ECOMPw1-ECOMPw4 is not generated (for example, the operation of FIG. 12). For this reason, the performance of the arithmetic processing unit PU is improved. For example, when the completion condition of the signal COMMIT2-COMIT4 is satisfied, the arithmetic processing unit PU also causes the instruction indicated by the pointer PTR2-PTR4 (the instruction subsequent to the instruction indicated by the pointer PTR1) to be in the same cycle as the instruction indicated by the pointer PTR1. The instruction completion process can be started. That is, the arithmetic processing unit PU can also start the instruction completion process for the subsequent instruction one cycle earlier than the operation (for example, the operation of FIG. 12) in which the bypass information ECOMPw1-ECOMPw4 is not generated.

図9は、図5に示した命令完了制御部CCTLの動作の別の例を示す。なお、図9は、演算例外の検出が抑止され(FED=1)、かつ、演算例外が発生しない場合の命令完了制御部CCTLの動作の一例を示す。図8で説明した動作と同一または同様な動作については、詳細な説明を省略する。図のFADD(IID=12)は、値”12”の命令識別子(IID=12)に対応する命令に基づく浮動小数点加算のパイプラインステージを示す。   FIG. 9 shows another example of the operation of the instruction completion control unit CCTL shown in FIG. FIG. 9 shows an example of the operation of the instruction completion control unit CCTL when detection of an operation exception is suppressed (FED = 1) and no operation exception occurs. Detailed descriptions of the same or similar operations as those described in FIG. 8 are omitted. FADD (IID = 12) in the figure indicates a pipeline stage of floating point addition based on an instruction corresponding to an instruction identifier (IID = 12) having a value “12”.

図9の動作は、演算器FPUからの例外情報EXSIGが論理値”0”に維持されている点を除いて、図8の動作と同一または同様である。したがって、図9の動作においても、バイパス情報ECOMPw1−ECOMPw4が生成されない構成の動作(例えば、図12)に比べて、命令完了処理を1サイクル早く開始できる。   The operation of FIG. 9 is the same as or similar to the operation of FIG. 8 except that the exception information EXSIG from the arithmetic unit FPU is maintained at the logical value “0”. Therefore, also in the operation of FIG. 9, the instruction completion process can be started one cycle earlier than the operation (for example, FIG. 12) in which the bypass information ECOMPw1-ECOMPw4 is not generated.

図10は、図5に示した命令完了制御部CCTLの動作の別の例を示す。なお、図10は、演算例外の検出が抑止されていない状態(FED=0)で、演算例外が発生した場合の命令完了制御部CCTLの動作の一例を示す。図8から図9で説明した動作と同一または同様な動作については、詳細な説明を省略する。図のFADD(IID=12)は、値”12”の命令識別子(IID=12)に対応する命令に基づく浮動小数点加算のパイプラインステージを示す。例えば、サイクル4は、浮動小数点加算の最後の演算実行ステージXに対応する。   FIG. 10 shows another example of the operation of the instruction completion control unit CCTL shown in FIG. FIG. 10 shows an example of the operation of the instruction completion control unit CCTL when an operation exception occurs in a state where detection of an operation exception is not suppressed (FED = 0). Detailed description of the same or similar operations as those described with reference to FIGS. 8 to 9 will be omitted. FADD (IID = 12) in the figure indicates a pipeline stage of floating point addition based on an instruction corresponding to an instruction identifier (IID = 12) having a value “12”. For example, cycle 4 corresponds to the last operation execution stage X of the floating point addition.

サイクル4では、命令完了制御部CCTLは、論理値”1”の演算完了信号ECOMPおよび値”12”の命令識別子EIIDを演算器FPUから受信する。これにより、論理値”1”の演算完了信号ECOMPおよび値”12”の命令識別子EIIDがラッチLAT10に保持される。なお、信号FEDが論理値”0”であるため、サイクル4では、演算完了信号ECOMの情報は、コミットスタックエントリCSEに登録されない。また、信号FEDが論理値”0”であるため、信号ECOMPw1は論理値”0”に維持される。   In cycle 4, the instruction completion control unit CCTL receives the operation completion signal ECOMP having the logical value “1” and the instruction identifier EIID having the value “12” from the arithmetic unit FPU. As a result, the operation completion signal ECOMP having the logical value “1” and the instruction identifier EIID having the value “12” are held in the latch LAT10. Note that since the signal FED is the logical value “0”, the information of the operation completion signal ECOM is not registered in the commit stack entry CSE in the cycle 4. Further, since the signal FED has the logical value “0”, the signal ECOMPw1 is maintained at the logical value “0”.

サイクル5では、命令完了制御部CCTLは、論理値”1”の例外情報EXSIGを演算器FPUから受信する。これにより、論理値”1”の例外情報EXSIGがラッチLAT20に保持される。また、演算完了信号ECOMP_LCHおよび命令識別子EIID_LCHは、論理値”1”および値”12”にそれぞれ変化する。   In cycle 5, the instruction completion control unit CCTL receives exception information EXSIG having a logical value “1” from the arithmetic unit FPU. As a result, the exception information EXSIG having the logical value “1” is held in the latch LAT20. Further, the operation completion signal ECOMP_LCH and the instruction identifier EIID_LCH change to the logical value “1” and the value “12”, respectively.

信号FEDが論理値”0”であるため、コミットスタックエントリCSEに登録されている命令のうち、値”12”の命令識別子EIID_LCHに対応する命令の状態情報に、演算完了信号ECOMP_LCHの情報(演算の完了)が設定される。また、論理値”1”の演算完了信号ECOMP_LCHおよび値”12”の命令識別子EIID_LCHは、ラッチLAT12に保持される。   Since the signal FED has the logical value “0”, among the instructions registered in the commit stack entry CSE, the status information of the instruction corresponding to the instruction identifier EIID_LCH having the value “12” includes the information (calculation of the operation completion signal ECOMP_LCH). Completed) is set. The operation completion signal ECOMP_LCH having the logical value “1” and the instruction identifier EIID_LCH having the value “12” are held in the latch LAT12.

サイクル6では、ポインタPTR1の値が12であるため、コミットスタックエントリCSEに登録されている命令のうち、値”12”の命令識別子に対応する命令の状態情報(例えば、演算完了信号ECOMP_LCHの情報)が読み出される。これにより、信号ECOMPc1が論理値”1”に変化する。そして、信号ECOMPc1が論理値”1”に変化したことにより、信号ECOMPs1が論理値”1”に変化する。これにより、論理値”1”の信号ECOMPs1がラッチLAT30に保持される。   In cycle 6, since the value of the pointer PTR1 is 12, among the instructions registered in the commit stack entry CSE, the status information of the instruction corresponding to the instruction identifier of the value “12” (for example, information of the operation completion signal ECOMP_LCH) ) Is read out. As a result, the signal ECOMPc1 changes to the logical value “1”. Then, since the signal ECOMPc1 changes to the logical value “1”, the signal ECOMPs1 changes to the logical value “1”. As a result, the signal ECOMPs1 having the logical value “1” is held in the latch LAT30.

また、演算完了信号ECOMP_LLおよび命令識別子EIID_LLは、論理値”1”および値”12”にそれぞれ変化する。例外情報EXSIG_LCHは、論理値”1”に変化する。これにより、コミットスタックエントリCSEに登録されている命令のうち、値”12”の命令識別子EIID_LLに対応する命令の状態情報に、例外情報EXSIG_LCHの内容(例外発生)が設定される。なお、信号TRAPs1は、サイクル5までに例外情報EXSIG_LCHの内容がコミットスタックエントリCSEに設定されていないため、サイクル6では、論理値”0”に維持される。   In addition, the operation completion signal ECOMP_LL and the instruction identifier EIID_LL change to the logical value “1” and the value “12”, respectively. The exception information EXSIG_LCH changes to a logical value “1”. As a result, the contents (exception occurrence) of the exception information EXIG_LCH are set in the status information of the instruction corresponding to the instruction identifier EIID_LL having the value “12” among the instructions registered in the commit stack entry CSE. The signal TRAPs1 is maintained at the logical value “0” in the cycle 6 because the contents of the exception information EXSIG_LCH is not set in the commit stack entry CSE until the cycle 5.

例外情報EXSIG_LCHおよび演算完了信号ECOMP_LLの両方が論理値”1”で、かつ、ポインタPTR1の値と命令識別子EIID_LLの値とが一致するため、論理積部AND2の出力は、論理値”1”に変化する。これにより、論理値”1”の信号がラッチLAT40に保持される。   Since both the exception information EXSIG_LCH and the operation completion signal ECOMP_LL have the logical value “1” and the value of the pointer PTR1 matches the value of the instruction identifier EIID_LL, the output of the AND unit AND2 becomes the logical value “1”. Change. As a result, a signal having a logical value “1” is held in the latch LAT 40.

サイクル7では、サイクル6で論理値”1”の信号がラッチLAT40に保持されたため、ラッチLAT40の出力信号である信号INHが論理値”1”に変化する。また、信号ECOMPsl1は、論理値”1”に変化する。なお、信号INHが論理値”1”であるため、信号ECOMPsl1が論理値”1”に変化した場合でも、信号COMMIT1は、論理値”0”に維持される。このため、信号COMMIT2−COMMIT4は、例えば、サイクル6で論理値”1”の信号ECOMPc2−ECOMPc4がコミットスタックエントリCSEから読み出された場合でも、論理値”0”に維持される。   In cycle 7, since the signal having the logical value “1” is held in the latch LAT 40 in cycle 6, the signal INH that is the output signal of the latch LAT 40 changes to the logical value “1”. Further, the signal ECOMPsl1 changes to a logical value “1”. Note that since the signal INH has the logical value “1”, the signal COMMIT1 is maintained at the logical value “0” even when the signal ECOMPsl1 changes to the logical value “1”. Therefore, the signals COMMIT2 to COMMIT4 are maintained at the logical value “0” even when the signals ECOMPC2 to ECOMPC4 having the logical value “1” are read from the commit stack entry CSE in the cycle 6, for example.

また、信号COMMIT1−COMMIT4が論理値”0”に維持されているため、ポインタPTR1の値も、12に維持される。ポインタPTR1の値が12であるため、コミットスタックエントリCSEに登録されている命令のうち、値”12”の命令識別子に対応する命令の状態情報(例えば、演算完了信号ECOMP_LCHの情報、例外情報EXSIG_LCHの情報)が読み出される。   Further, since the signals COMMIT1 to COMMIT4 are maintained at the logical value “0”, the value of the pointer PTR1 is also maintained at 12. Since the value of the pointer PTR1 is 12, among the instructions registered in the commit stack entry CSE, the status information of the instruction corresponding to the instruction identifier of the value “12” (for example, information on the operation completion signal ECOMP_LCH, exception information EXSIG_LCH Information) is read out.

これにより、信号ECOMPc1、ECOMPs1は、論理値”1”に維持され、信号TRAPs1は、論理値”1”に変化する。この結果、論理値”1”の信号ECOMPs1、TRAPs1がラッチLAT30に保持される。また、論理積部AND2の出力は、例外情報EXSIG_LCH等が論理値”0”であるため、論理値”0”に変化する。これにより、論理値”0”の信号がラッチLAT40に保持される。   As a result, the signals ECOMPc1 and ECOMPs1 are maintained at the logical value “1”, and the signal TRAPs1 is changed to the logical value “1”. As a result, the signals ECOMPs1 and TRAPs1 having the logical value “1” are held in the latch LAT30. Further, the output of the logical product AND2 changes to the logical value “0” because the exception information EXSIG_LCH and the like has the logical value “0”. As a result, a signal having a logical value “0” is held in the latch LAT 40.

サイクル8では、サイクル7で論理値”0”の信号がラッチLAT40に保持されたため、ラッチLAT40の出力信号である信号INHが論理値”0”に変化する。また、信号ECOMPsl1は、論理値”1”に維持される。信号ECOMPsl1が論理値”1”で、信号INHが論理値”0”であるため、信号COMMIT1が論理値”1”に変化する。   In cycle 8, since the signal having the logical value “0” is held in the latch LAT 40 in cycle 7, the signal INH that is the output signal of the latch LAT 40 changes to the logical value “0”. Further, the signal ECOMPsl1 is maintained at the logical value “1”. Since the signal ECOMPsl1 is the logical value “1” and the signal INH is the logical value “0”, the signal COMMIT1 changes to the logical value “1”.

また、信号TRAPsl1は、論理値”1”に変化する。これにより、例外が検出される。信号TRAPsl1が論理値”1”であるため、信号COMMIT2−COMMIT4は、論理値”0”に維持される。信号COMMIT1が論理値”1”で、信号COMMIT2−COMMIT4が論理値”0”であるため、ポインタPTR1の値は13(=12+1)に変化する。これにより、値”13”のポインタPTR1が、ポインタ部PTに保持される。   Further, the signal TRAPsl1 changes to a logical value “1”. Thereby, an exception is detected. Since the signal TRAPsl1 has the logical value “1”, the signals COMMIT2 to COMMIT4 are maintained at the logical value “0”. Since the signal COMMIT1 is the logical value “1” and the signals COMMIT2 to COMMIT4 are the logical value “0”, the value of the pointer PTR1 changes to 13 (= 12 + 1). As a result, the pointer PTR1 having the value “13” is held in the pointer portion PT.

サイクル9では、ポインタPTR1mの値は、サイクル8でポインタ部PTに保持されたポインタPTR1の値である13に変化する。サイクル8で信号TRAPsl1が論理値”1”に変化したため、例外処理が実行される。例えば、例外が発生した命令の後続の命令は、全てキャンセルされ、コミットスタックエントリCSEの登録から消去される。これにより、ポインタPTR1の値は、0に設定される。そして、発生した例外に応じた例外処理が実行される。   In cycle 9, the value of pointer PTR1m changes to 13 which is the value of pointer PTR1 held in pointer unit PT in cycle 8. Since the signal TRAPsl1 changes to the logical value “1” in cycle 8, exception processing is executed. For example, all instructions following the instruction in which the exception occurred are canceled and deleted from the registration of the commit stack entry CSE. Thereby, the value of the pointer PTR1 is set to 0. Then, exception processing corresponding to the exception that has occurred is executed.

図11は、図5に示した命令完了制御部CCTLの動作の別の例を示す。なお、図11は、演算例外の検出が抑止されていない状態(FED=0)で、演算例外が発生しない場合の命令完了制御部CCTLの動作の一例を示す。図8から図10で説明した動作と同一または同様な動作については、詳細な説明を省略する。図のFADD(IID=12)は、値”12”の命令識別子(IID=12)に対応する命令に基づく浮動小数点加算のパイプラインステージを示す。例えば、サイクル4は、浮動小数点加算の最後の演算実行ステージXに対応する。   FIG. 11 shows another example of the operation of the instruction completion control unit CCTL shown in FIG. FIG. 11 shows an example of the operation of the instruction completion control unit CCTL when no operation exception occurs in a state where detection of an operation exception is not suppressed (FED = 0). Detailed descriptions of the same or similar operations as those described in FIGS. 8 to 10 are omitted. FADD (IID = 12) in the figure indicates a pipeline stage of floating point addition based on an instruction corresponding to an instruction identifier (IID = 12) having a value “12”. For example, cycle 4 corresponds to the last operation execution stage X of the floating point addition.

サイクル4では、命令完了制御部CCTLは、論理値”1”の演算完了信号ECOMPおよび値”12”の命令識別子EIIDを演算器FPUから受信する。なお、信号FEDが論理値”0”であるため、サイクル4では、演算完了信号ECOMの情報は、コミットスタックエントリCSEに登録されない。また、信号FEDが論理値”0”であるため、信号ECOMPw1は論理値”0”に維持される。   In cycle 4, the instruction completion control unit CCTL receives the operation completion signal ECOMP having the logical value “1” and the instruction identifier EIID having the value “12” from the arithmetic unit FPU. Note that since the signal FED is the logical value “0”, the information of the operation completion signal ECOM is not registered in the commit stack entry CSE in the cycle 4. Further, since the signal FED has the logical value “0”, the signal ECOMPw1 is maintained at the logical value “0”.

サイクル5では、演算完了信号ECOMP_LCHおよび命令識別子EIID_LCHは、論理値”1”および値”12”にそれぞれ変化する。信号FEDが論理値”0”であるため、コミットスタックエントリCSEに登録されている命令のうち、値”12”の命令識別子EIID_LCHに対応する命令の状態情報に、演算完了信号ECOMP_LCHの情報(演算の完了)が設定される。なお、例外情報EXSIGが論理値”0”に維持されるため、ラッチLAT20に保持される値も0に維持される。   In cycle 5, the operation completion signal ECOMP_LCH and the instruction identifier EIID_LCH change to the logical value “1” and the value “12”, respectively. Since the signal FED has the logical value “0”, among the instructions registered in the commit stack entry CSE, the status information of the instruction corresponding to the instruction identifier EIID_LCH having the value “12” includes the information (calculation of the operation completion signal ECOMP_LCH). Completed) is set. Note that since the exception information EXSIG is maintained at the logical value “0”, the value held in the latch LAT 20 is also maintained at 0.

サイクル6では、ポインタPTR1の値が12であるため、コミットスタックエントリCSEに登録されている命令のうち、値”12”の命令識別子に対応する命令の状態情報(例えば、演算完了信号ECOMP_LCHの情報)が読み出される。これにより、信号ECOMPc1が論理値”1”に変化する。そして、信号ECOMPc1が論理値”1”に変化したことにより、信号ECOMPs1が論理値”1”に変化する。   In cycle 6, since the value of the pointer PTR1 is 12, among the instructions registered in the commit stack entry CSE, the status information of the instruction corresponding to the instruction identifier of the value “12” (for example, information of the operation completion signal ECOMP_LCH) ) Is read out. As a result, the signal ECOMPc1 changes to the logical value “1”. Then, since the signal ECOMPc1 changes to the logical value “1”, the signal ECOMPs1 changes to the logical value “1”.

また、演算完了信号ECOMP_LLおよび命令識別子EIID_LLは、論理値”1”および値”12”にそれぞれ変化する。例外情報EXSIG_LCHは、論理値”0”に維持される。例外情報EXSIG_LCHが論理値”0”であるため、コミットスタックエントリCSEは、値”12”の命令識別子EIID_LLの状態情報を更新しない。また、例外情報EXSIG_LCHが論理値”0”であるため、論理積部AND2の出力は、論理値”0”に維持される。したがって、ラッチLAT40に保持される値も0に維持される。   In addition, the operation completion signal ECOMP_LL and the instruction identifier EIID_LL change to the logical value “1” and the value “12”, respectively. The exception information EXSIG_LCH is maintained at the logical value “0”. Since the exception information EXSIG_LCH has the logical value “0”, the commit stack entry CSE does not update the state information of the instruction identifier EIID_LL having the value “12”. Further, since the exception information EXSIG_LCH has the logical value “0”, the output of the logical product unit AND2 is maintained at the logical value “0”. Therefore, the value held in the latch LAT 40 is also maintained at 0.

サイクル7では、信号ECOMPsl1が論理値”1”に変化し、ラッチLAT40の出力信号である信号INHは、論理値”0”に維持される。信号ECOMPsl1が論理値”1”で、信号INHが論理値”0”であるため、信号COMMIT1が論理値”1”に変化する。また、例えば、信号COMMIT2−COMIT4は、図5で説明したそれぞれの完了条件を満たしている場合、論理値”1”に変化する。信号COMMIT1−COMIT4が論理値”1”に変化するため、ポインタPTR1の値は16(=12+4)に変化する。これにより、値”16”のポインタPTR1が、ポインタ部PTに保持される。   In cycle 7, the signal ECOMPsl1 changes to the logical value “1”, and the signal INH that is the output signal of the latch LAT40 is maintained at the logical value “0”. Since the signal ECOMPsl1 is the logical value “1” and the signal INH is the logical value “0”, the signal COMMIT1 changes to the logical value “1”. Further, for example, the signals COMMIT 2 -COMIT 4 change to the logical value “1” when the completion conditions described in FIG. 5 are satisfied. Since the signal COMMIT1-COMIT4 changes to the logical value “1”, the value of the pointer PTR1 changes to 16 (= 12 + 4). As a result, the pointer PTR1 having the value “16” is held in the pointer portion PT.

サイクル8では、ポインタPTR1mの値は、サイクル7でポインタ部PTに保持されたポインタPTR1の値である16に変化する。   In cycle 8, the value of pointer PTR1m changes to 16, which is the value of pointer PTR1 held in pointer unit PT in cycle 7.

図12は、図5に示した命令完了制御部CCTLの動作の比較例を示す。図8から図11で説明した動作と同一または同様な動作については、詳細な説明を省略する。なお、図12は、図5に示したバイパス部BYPが省かれた命令完了制御部CCTLの動作の一例を示す。図12の動作は、図8の動作に対応している。例えば、図12の動作では、演算例外の検出は抑止され、演算例外は発生する。なお、図12の動作では、信号FEDが論理値”1”であるため、論理値”1”の例外情報EXSIGを命令完了制御部CCTLがサイクル5で受信した場合でも、例外情報EXSIG_LCHは、論理値”0”に維持される。このため、信号INHは、論理値”0”に維持される。   FIG. 12 shows a comparative example of the operation of the instruction completion control unit CCTL shown in FIG. Detailed description of the same or similar operations as those described in FIGS. 8 to 11 is omitted. FIG. 12 shows an example of the operation of the instruction completion control unit CCTL in which the bypass unit BYP shown in FIG. 5 is omitted. The operation of FIG. 12 corresponds to the operation of FIG. For example, in the operation of FIG. 12, detection of an operation exception is suppressed and an operation exception occurs. In the operation of FIG. 12, since the signal FED has the logical value “1”, even when the instruction completion control unit CCTL receives the exception information EXSIG having the logical value “1” in cycle 5, the exception information EXSIG_LCH is The value is maintained at “0”. For this reason, the signal INH is maintained at the logical value “0”.

また、図12の括弧内の信号ECOMPw1、信号ECOMPc1は、バイパス部BYPが省かれたことにより、図8の動作から省かれた信号を示している。したがって、図12の動作では、ラッチLAT30が受信する信号ECOMPs1は、コミットスタックエントリCSEから読み出された信号である。なお、図のFADD(IID=12)は、値”12”の命令識別子(IID=12)に対応する命令に基づく浮動小数点加算のパイプラインステージを示す。例えば、サイクル4は、浮動小数点加算の最後の演算実行ステージXに対応する。   Further, the signal ECOMPw1 and the signal ECOMPc1 in parentheses in FIG. 12 indicate signals that are omitted from the operation in FIG. 8 because the bypass unit BYP is omitted. Therefore, in the operation of FIG. 12, the signal ECOMPs1 received by the latch LAT30 is a signal read from the commit stack entry CSE. Note that FADD (IID = 12) in the figure indicates a pipeline stage of floating point addition based on an instruction corresponding to an instruction identifier (IID = 12) having a value “12”. For example, cycle 4 corresponds to the last operation execution stage X of the floating point addition.

サイクル4では、命令完了制御部CCTLは、論理値”1”の演算完了信号ECOMPおよび値”12”の命令識別子EIIDを演算器FPUから受信する。信号FEDが論理値”1”であるため、コミットスタックエントリCSEに登録されている命令のうち、値”12”の命令識別子EIIDに対応する命令の状態情報に、演算完了信号ECOMPの情報(演算の完了)が設定される。   In cycle 4, the instruction completion control unit CCTL receives the operation completion signal ECOMP having the logical value “1” and the instruction identifier EIID having the value “12” from the arithmetic unit FPU. Since the signal FED is the logical value “1”, among the instructions registered in the commit stack entry CSE, the status information of the instruction corresponding to the instruction identifier EIID having the value “12” includes the information of the operation completion signal ECOMP (calculation Completed) is set.

サイクル5では、ポインタPTR1の値が12であるため、コミットスタックエントリCSEに登録されている命令のうち、値”12”の命令識別子に対応する命令の状態情報(例えば、演算完了信号ECOMPの情報)が読み出される。これにより、信号ECOMPs1が論理値”1”に変化する。   In cycle 5, since the value of the pointer PTR1 is 12, among the instructions registered in the commit stack entry CSE, the status information of the instruction corresponding to the instruction identifier of the value “12” (for example, the information of the operation completion signal ECOMP) ) Is read out. As a result, the signal ECOMPs1 changes to the logical value “1”.

サイクル6では、信号ECOMPsl1が論理値”1”に変化する。信号ECOMPsl1が論理値”1”で、信号INHが論理値”0”であるため、信号COMMIT1が論理値”1”に変化する。また、例えば、信号COMMIT2−COMIT4は、図5で説明したそれぞれの完了条件を満たしている場合、論理値”1”に変化する。信号COMMIT1−COMIT4が論理値”1”に変化するため、ポインタPTR1の値は16(=12+4)に変化する。これにより、値”16”のポインタPTR1が、ポインタ部PTに保持される。   In cycle 6, the signal ECOMPsl1 changes to the logical value “1”. Since the signal ECOMPsl1 is the logical value “1” and the signal INH is the logical value “0”, the signal COMMIT1 changes to the logical value “1”. Further, for example, the signals COMMIT 2 -COMIT 4 change to the logical value “1” when the completion conditions described in FIG. 5 are satisfied. Since the signal COMMIT1-COMIT4 changes to the logical value “1”, the value of the pointer PTR1 changes to 16 (= 12 + 4). As a result, the pointer PTR1 having the value “16” is held in the pointer portion PT.

サイクル7では、ポインタPTR1mの値は、サイクル5でポインタ部PTに保持されたポインタPTR1の値である16に変化する。   In cycle 7, the value of pointer PTR1m changes to 16, which is the value of pointer PTR1 held in pointer unit PT in cycle 5.

このように、バイパス部BYPが省かれた比較例では、レジスタ更新ステージUを2サイクルで実行する。これに対し、バイパス部BYPを含む命令完了制御部CCTLは、レジスタ更新ステージUを1サイクルで実行できる。すなわち、演算処理装置PUは、図12の比較例の動作に比べて、命令完了処理を1サイクル早く開始できる。したがって、演算処理装置PUは、演算例外の検出が抑止されている場合に、演算器FPU等の演算器が演算完了信号ECOMPを出力してから命令完了処理を実行するまでの時間を短縮できる。   As described above, in the comparative example in which the bypass unit BYP is omitted, the register update stage U is executed in two cycles. On the other hand, the instruction completion control unit CCTL including the bypass unit BYP can execute the register update stage U in one cycle. That is, the arithmetic processing unit PU can start the instruction completion processing one cycle earlier than the operation of the comparative example of FIG. Therefore, the arithmetic processing unit PU can shorten the time from when the arithmetic unit such as the arithmetic unit FPU outputs the arithmetic completion signal ECOM to executing the instruction completion processing when detection of the arithmetic exception is suppressed.

以上、図4から図11に示した実施形態の演算処理装置および演算処理装置の制御方法においても、図1から図3に示した実施形態の演算処理装置および演算処理装置の制御方法と同様の効果を得ることができる。例えば、バイパス部BYPは、演算処理により発生する例外の検出が抑止され、かつ、演算部OPから出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報ECOMPwを生成する。これにより、この実施形態においても、演算例外の検出が抑止されている場合に、演算部OPが演算完了情報を出力してから命令完了処理を実行するまでの時間を短縮できる。   As described above, the arithmetic processing device and the control method of the arithmetic processing device of the embodiment shown in FIGS. 4 to 11 are the same as the arithmetic processing device and the control method of the arithmetic processing device of the embodiment shown in FIGS. An effect can be obtained. For example, in the bypass unit BYP, detection of an exception caused by the arithmetic processing is suppressed, and the instruction indicated by the operation completion information output from the arithmetic unit OP matches the instruction that is the target of the instruction completion processing. Bypass information ECOMPw indicating completion of the calculation is generated. Thereby, also in this embodiment, when the detection of the operation exception is suppressed, the time from the operation unit OP outputting the operation completion information to executing the instruction completion process can be shortened.

例えば、バイパス部BYPは、信号FEDが論理値”1”で、かつ、ポインタPTR1の値と命令識別子EIIDの値とが一致する場合、論理値”1”の演算完了信号ECOMPに基づいて、論理値”1”のバイパス情報ECOMPw1を生成する。この場合、命令完了処理の対象の命令に関する演算完了信号ECOMPの情報(例えば、演算完了信号ECOMPsl1)は、コミットスタックエントリCSEを介さずにラッチLAT30に転送される。   For example, when the signal FED has a logical value “1” and the value of the pointer PTR1 matches the value of the instruction identifier EIID, the bypass unit BYP generates a logical value based on the operation completion signal ECOMP having the logical value “1”. Bypass information ECOMPw1 having a value “1” is generated. In this case, the information on the operation completion signal ECOMP (for example, the operation completion signal ECOMPsl1) related to the instruction to be processed is transferred to the latch LAT 30 without going through the commit stack entry CSE.

このため、この実施形態では、演算例外の検出が抑止されている場合に、演算部OPが演算完了信号ECOMPを出力してから演算完了信号ECOMPの情報を命令完了部COMPU2等に通知するまでの時間を短縮できる。この結果、この実施形態では、演算例外の検出が抑止されている場合に、演算部OPが演算完了情報を出力してから命令完了処理を実行するまでの時間を短縮できる。   For this reason, in this embodiment, when the detection of the operation exception is suppressed, the operation unit OP outputs the operation completion signal ECOMP until the information of the operation completion signal ECOMP is notified to the instruction completion unit COMPU2 and the like. You can save time. As a result, in this embodiment, when the detection of the operation exception is suppressed, the time from when the operation unit OP outputs the operation completion information to when the instruction completion processing is executed can be shortened.

図13は、図4に示した命令完了制御部CCTLの別の例を示す。なお、図13の命令完了制御部CCTLを有する演算処理装置PUは、図5に示した命令完了制御部CCTLの代わりに図13の命令完了制御部CCTLを有することを除いて、図4に示した演算処理装置PUと同様である。図13の命令完了制御部CCTLを有する演算処理装置PUも、演算処理装置の一態様である。   FIG. 13 shows another example of the instruction completion control unit CCTL shown in FIG. The arithmetic processing unit PU having the instruction completion control unit CCTL of FIG. 13 is shown in FIG. 4 except that it has the instruction completion control unit CCTL of FIG. 13 instead of the instruction completion control unit CCTL shown in FIG. This is the same as the arithmetic processing unit PU. The arithmetic processing unit PU having the instruction completion control unit CCTL in FIG. 13 is also an aspect of the arithmetic processing device.

図13の命令完了制御部CCTLは、図5に示したバイパス部BYPの代わりにバイパス部BYP2を有する。図13の命令完了制御部CCTLのその他の構成は、図5に示した命令完了制御部CCTLと同様である。図1から図12で説明した要素と同様の要素については、同様の符号を付し、これ等については、詳細な説明を省略する。なお、図13においても、図5と同様に、データキャッシュDCMからのデータ転送完了情報、分岐制御部BCTLからの分岐判定完了情報、演算器EXUからの演算完了情報、例外情報等を受信するモジュールの記載を省略している。   The instruction completion control unit CCTL in FIG. 13 includes a bypass unit BYP2 instead of the bypass unit BYP shown in FIG. Other configurations of the instruction completion control unit CCTL of FIG. 13 are the same as those of the instruction completion control unit CCTL shown in FIG. Elements similar to those described in FIGS. 1 to 12 are denoted by the same reference numerals, and detailed description thereof will be omitted. In FIG. 13, as in FIG. 5, a module that receives data transfer completion information from the data cache DCM, branch determination completion information from the branch control unit BCTL, operation completion information from the operator EXU, exception information, and the like. Is omitted.

命令完了制御部CCTLは、ポインタ部PT、加算部ADD、ラッチLAT10、LAT12、LAT20、LAT30、LAT40、インバータINV1、論理積部AND1、AND2、選択部SEL10、SEL20、コミットスタックエントリCSE、バイパス部BYP2、比較部CMP10、命令完了処理部COMPU1および命令完了部COMPU2を有する。命令完了制御部CCTLに含まれる各モジュールは、バイパス部BYP2を除いて、図5に示した命令完了制御部CCTLに含まれる各モジュールと同一または同様である。   The instruction completion control unit CCTL includes a pointer unit PT, an addition unit ADD, latches LAT10, LAT12, LAT20, LAT30, LAT40, an inverter INV1, an AND unit AND1, AND2, a selection unit SEL10, SEL20, a commit stack entry CSE, and a bypass unit BYP2. , A comparison unit CMP10, an instruction completion processing unit COMPU1, and an instruction completion unit COMPU2. Each module included in the instruction completion control unit CCTL is the same as or similar to each module included in the instruction completion control unit CCTL shown in FIG. 5 except for the bypass unit BYP2.

例えば、ポインタ部PT、加算部ADD、ラッチLAT10−LAT40、インバータINV1は、図5に示したポインタ部PT、加算部ADD、ラッチLAT10−LAT40、インバータINV1と同一または同様である。また、論理積部AND1、AND2、選択部SEL10、SEL20、コミットスタックエントリCSEは、図5に示した論理積部AND1、AND2、選択部SEL10、SEL20、コミットスタックエントリCSEと同一または同様である。また、比較部CMP10、命令完了処理部COMPU1および命令完了部COMPU2は、図5に示した比較部CMP10、命令完了処理部COMPU1および命令完了部COMPU2と同一または同様である。   For example, the pointer unit PT, the adding unit ADD, the latches LAT10-LAT40, and the inverter INV1 are the same as or similar to the pointer unit PT, the adding unit ADD, the latches LAT10-LAT40, and the inverter INV1 shown in FIG. The AND units AND1 and AND2, the selection units SEL10 and SEL20, and the commit stack entry CSE are the same as or similar to the AND units AND1 and AND2, the selection units SEL10 and SEL20, and the commit stack entry CSE shown in FIG. The comparison unit CMP10, the instruction completion processing unit COMPU1, and the instruction completion unit COMPU2 are the same as or similar to the comparison unit CMP10, the instruction completion processing unit COMPU1, and the instruction completion unit COMPU2 illustrated in FIG.

バイパス部BYP2は、演算の完了を示すバイパス情報を生成するバイパス部の一例である。例えば、バイパス部BYP2は、演算例外の検出が抑止され、かつ、演算部OPから出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報ECOMPwを生成する。また、バイパス部BYP2は、演算例外の検出が抑止されていない状態では、演算例外が検出されず、かつ、演算部OPから出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報ECOMPwを生成する。   The bypass unit BYP2 is an example of a bypass unit that generates bypass information indicating completion of calculation. For example, the bypass unit BYP2 completes the operation when the detection of the operation exception is suppressed and the instruction indicated by the operation completion information output from the operation unit OP matches the instruction to be processed by the instruction completion process. Bypass information ECOMPw is generated. In addition, the bypass unit BYP2 does not detect an operation exception in a state where detection of the operation exception is not suppressed, and an instruction indicated by the operation completion information output from the operation unit OP and an instruction to be subjected to instruction completion processing Is in agreement, the bypass information ECOMPw indicating the completion of the calculation is generated.

例えば、バイパス部BYP2は、ポインタPTR1−PTR4、信号FED、例外情報EXSIG、信号ECOMPa、EIIDaおよび信号ECOMPc1−ECOMPc4を受信する。そして、バイパス部BYP2は、ポインタPTR1−PTR4、信号FED、例外情報EXSIG、信号ECOMPa、EIIDaに基づいて、信号ECOMPw1−ECOMPw4を生成する。また、バイパス部BYP2は、信号ECOMPw1−ECOMPw4と信号ECOMPc1−ECOMPc4とのそれぞれの論理和結果を、信号ECOMPs1−ECOMPs4としてラッチLAT30に出力する。   For example, the bypass unit BYP2 receives the pointers PTR1-PTR4, the signal FED, the exception information EXSIG, the signals ECOMPa, EIDa, and the signals ECOMPc1-ECOMPc4. Then, the bypass unit BYP2 generates signals ECOMPw1 to ECOMPw4 based on the pointers PTR1 to PTR4, the signal FED, the exception information EXSIG, the signals ECOMPa, and EIIDa. Further, the bypass unit BYP2 outputs the logical sum result of the signals ECOMPw1-ECOMPw4 and the signals ECOMPc1-ECOMPc4 to the latch LAT30 as signals ECOMPs1-ECOMPs4.

なお、図5で説明したように、信号FEDが論理値”1”の場合、信号ECOMPa、EIIDaは、それぞれ演算完了信号ECOMPおよび命令識別子EIIDと同一または同様である。また、信号FEDが論理値”0”の場合、信号ECOMPa、EIIDaは、それぞれ演算完了信号ECOMP_LCHおよび命令識別子EIID_LCHと同一または同様である。   As described with reference to FIG. 5, when the signal FED has the logical value “1”, the signals ECOMPa and EIIDa are the same as or similar to the operation completion signal ECOMP and the instruction identifier EIID, respectively. When the signal FED has a logical value “0”, the signals ECOMPa and EIIDa are the same as or similar to the operation completion signal ECOMP_LCH and the instruction identifier EIID_LCH, respectively.

例えば、バイパス部BYP2は、比較部CMP20、論理積部AND3、論理和部OR1、OR2およびインバータINV2を有する。比較部CMP20は、信号EIIDaを命令識別子EIIDの代わりに受信することを除いて、図5に示した比較部CMP20と同一または同様である。例えば、比較部CMP20は、信号EIIDaを選択部SEL20から受信し、ポインタPTR1−PTR4を加算部ADDから受信する。そして、比較部CMP20は、信号EIIDaと各ポインタPTR1−PTR4とを比較し、比較結果を論理積部AND3に出力する。   For example, the bypass unit BYP2 includes a comparison unit CMP20, a logical product unit AND3, logical sum units OR1 and OR2, and an inverter INV2. The comparison unit CMP20 is the same as or similar to the comparison unit CMP20 shown in FIG. 5 except that it receives the signal EIIDa instead of the instruction identifier EIID. For example, the comparison unit CMP20 receives the signal EIIDa from the selection unit SEL20 and receives the pointers PTR1 to PTR4 from the addition unit ADD. Then, the comparison unit CMP20 compares the signal EIDa with the pointers PTR1 to PTR4, and outputs the comparison result to the AND unit AND3.

例えば、比較部CMP20は、信号EIIDaとポインタPTR1とが一致している場合、信号EIIDaとポインタPTR1とが一致していることを示す比較結果(論理値”1”の信号)を論理積部AND3に出力する。さらに、比較部CMP20は、信号EIIDaと各ポインタPTR2−PTR3とが一致していないことを示す比較結果(論理値”0”の信号)を論理積部AND3に出力する。   For example, when the signal EIDa and the pointer PTR1 match, the comparison unit CMP20 outputs a comparison result (a signal having a logical value “1”) indicating that the signal EIIDa and the pointer PTR1 match with the AND unit AND3. Output to. Further, the comparison unit CMP20 outputs a comparison result (a signal having a logical value “0”) indicating that the signal EIIDa and the pointers PTR2 to PTR3 do not match to the logical product unit AND3.

インバータINV2は、例外情報EXSIGを状態制御部MCTLから受信し、例外情報EXSIGの反転信号を論理和部OR2に出力する。論理和部OR2は、例外情報EXSIGの反転信号をインバータINV2から受信し、信号FEDを状態制御部MCTLから受信する。そして、論理和部OR2は、例外情報EXSIGの反転信号と信号FEDとの論理和結果を、信号FEXとして論理積部AND3に出力する。   The inverter INV2 receives the exception information EXSIG from the state control unit MCTL and outputs an inverted signal of the exception information EXSIG to the logical sum unit OR2. The OR unit OR2 receives the inverted signal of the exception information EXSIG from the inverter INV2, and receives the signal FED from the state control unit MCTL. Then, the logical sum unit OR2 outputs a logical sum result of the inverted signal of the exception information EXSIG and the signal FED to the logical product unit AND3 as the signal FEX.

論理積部AND3は、信号EIIDaと各ポインタPTR1−PTR4との比較結果、信号ECOMPaおよび信号FEXを、比較部CMP20、選択部SEL20および論理和部OR2からそれぞれ受信する。そして、論理積部AND3は、受信した信号の論理積結果を、バイパス情報ECOMPw1−ECOMPw4として論理和部OR1に出力する。   The logical product unit AND3 receives the comparison result of the signal EIIDa and the pointers PTR1 to PTR4, the signal ECOMPa, and the signal FEX from the comparison unit CMP20, the selection unit SEL20, and the logical sum unit OR2. Then, the AND unit AND3 outputs a logical product result of the received signals to the OR unit OR1 as bypass information ECOMPw1-ECOMPw4.

例えば、論理積部AND3は、信号EIIDaとポインタPTR1との比較結果、信号ECOMPaおよび信号FEXの3つの信号の論理積結果を、バイパス情報ECOMPw1として論理和部OR1に出力する。また、例えば、論理積部AND3は、信号EIIDaとポインタPTR2との比較結果、信号ECOMPaおよび信号FEXの3つの信号の論理積結果を、バイパス情報ECOMPw2として論理和部OR1に出力する。   For example, the AND unit AND3 outputs the comparison result of the signal EIIDa and the pointer PTR1, and the logical product result of the three signals ECOMMPa and FEX to the OR unit OR1 as the bypass information ECOMPw1. Further, for example, the logical product unit AND3 outputs the comparison result between the signal EIIDa and the pointer PTR2 and the logical product result of the three signals ECOMMPa and FEX to the logical sum unit OR1 as bypass information ECOMPw2.

また、例えば、論理積部AND3は、信号EIIDaとポインタPTR3との比較結果、信号ECOMPaおよび信号FEXの3つの信号の論理積結果を、バイパス情報ECOMPw3として論理和部OR1に出力する。また、例えば、論理積部AND3は、信号EIIDaとポインタPTR4との比較結果、信号ECOMPaおよび信号FEXの3つの信号の論理積結果を、バイパス情報ECOMPw4として論理和部OR1に出力する。   Further, for example, the logical product unit AND3 outputs the comparison result between the signal EIIDa and the pointer PTR3 and the logical product result of the three signals ECOMMPa and FEX to the logical sum unit OR1 as bypass information ECOMPw3. For example, the AND unit AND3 outputs the comparison result of the signal EIIDa and the pointer PTR4 and the logical product result of the three signals ECOMMPa and FEX to the OR unit OR1 as bypass information ECOMPw4.

論理和部OR1は、信号ECOMPw1−ECOMPw4を論理積部AND3から受信し、信号ECOMPc1−ECOMPc4を選択部SEL10から受信する。そして、論理和部OR1は、信号ECOMPw1−ECOMPw4と信号ECOMPc1−ECOMPc4とのそれぞれの論理和結果を、信号ECOMPs1−ECOMPs4としてラッチLAT30に出力する。   The OR unit OR1 receives the signals ECOMPw1-ECOMPw4 from the logical product unit AND3, and receives the signals ECOMPc1-ECOMPc4 from the selection unit SEL10. Then, the logical sum OR1 outputs the logical sum results of the signals ECOMPw1-ECOMPw4 and the signals ECOMPc1-ECOMPc4 to the latch LAT30 as signals ECOMPs1-ECOMPs4.

なお、バイパス部BYP2の構成は、この例に限定されない。ここで、信号FEDが論理値”1”の場合、信号ECOMPa、EIIDaは、それぞれ演算完了信号ECOMPおよび命令識別子EIIDと同一または同様である。したがって、信号FEDが論理値”1”の場合、論理積部AND3の入力信号は、図5に示したバイパス部BYPの論理積部AND3の入力信号と同一または同様である。すなわち、信号FEDが論理値”1”の場合、バイパス部BYP2の動作は、バイパス部BYPの動作と同一または同様である。   The configuration of the bypass unit BYP2 is not limited to this example. Here, when the signal FED has a logical value “1”, the signals ECOMPa and EIIDa are the same as or similar to the operation completion signal ECOMP and the instruction identifier EIID, respectively. Therefore, when the signal FED is the logical value “1”, the input signal of the AND unit AND3 is the same as or similar to the input signal of the AND unit AND3 of the bypass unit BYP shown in FIG. That is, when the signal FED is the logical value “1”, the operation of the bypass unit BYP2 is the same as or similar to the operation of the bypass unit BYP.

このため、信号FEDが論理値”1”の場合、命令完了制御部CCTLの動作は、図5に示した命令完了制御部CCTLの動作と同一または同様である。したがって、命令完了制御部CCTLは、演算例外の検出が抑止されている場合に、演算部OPが演算完了信号ECOMPを出力してから演算完了信号ECOMPの情報を命令完了部COMPU2等に通知するまでの時間を短縮できる。   Therefore, when the signal FED is a logical value “1”, the operation of the instruction completion control unit CCTL is the same as or similar to the operation of the instruction completion control unit CCTL shown in FIG. Therefore, the instruction completion control unit CCTL, when the detection of the operation exception is suppressed, until the operation unit OP outputs the operation completion signal ECOMP and notifies the instruction completion unit COMPU2 and the like of the information of the operation completion signal ECOMP. Can be shortened.

この結果、命令完了制御部CCTLは、演算例外の検出が抑止されている場合に、演算部OPが演算完了信号ECOMPを出力してから命令完了処理を実行するまでの時間を短縮できる。なお、信号FEDが論理値”0”の場合の命令完了制御部CCTLの動作は、図14および図15で説明する。   As a result, the instruction completion control unit CCTL can shorten the time from when the operation unit OP outputs the operation completion signal ECOMP to executing the instruction completion process when the detection of the operation exception is suppressed. The operation of the instruction completion control unit CCTL when the signal FED is the logical value “0” will be described with reference to FIGS.

図14は、図13に示した命令完了制御部CCTLの動作フローの一例を示す。すなわち、図14は、演算処理装置の制御方法の一態様を示す。なお、図14は、演算例外の検出が抑止されていない場合の命令完了制御部CCTLの動作の一例を示す。図14の動作では、ステップS232、S234が図3に示した動作に追加され、ステップS250の代わりにステップS250aが実行される。図14のその他の動作は、図3の動作と同一または同様である。   FIG. 14 shows an example of the operation flow of the instruction completion control unit CCTL shown in FIG. That is, FIG. 14 shows one mode of a method for controlling the arithmetic processing unit. FIG. 14 shows an example of the operation of the instruction completion control unit CCTL when the detection of the operation exception is not suppressed. In the operation of FIG. 14, steps S232 and S234 are added to the operation shown in FIG. 3, and step S250a is executed instead of step S250. Other operations in FIG. 14 are the same as or similar to the operations in FIG.

図14の動作は、ハードウエアのみで実現されてもよく、ハードウエアをソフトウエアにより制御することにより実現されてもよい。図2および図3の動作と同一または同様な動作については、詳細な説明を省略する。例えば、図14には示していないが、命令デコーダDECでデコードされた命令は、デコードされた順にコミットスタックエントリCSEに登録される。   The operation of FIG. 14 may be realized only by hardware, or may be realized by controlling the hardware by software. Detailed description of the same or similar operations as those in FIGS. 2 and 3 is omitted. For example, although not shown in FIG. 14, instructions decoded by the instruction decoder DEC are registered in the commit stack entry CSE in the order of decoding.

ステップS200では、選択部SEL10は、命令完了処理の対象となる命令を、デコードされた順にコミットスタックエントリCSEから読み出す。   In step S200, the selection unit SEL10 reads instructions to be subjected to instruction completion processing from the commit stack entry CSE in the order of decoding.

ステップS210では、命令完了制御部CCTLは、演算完了情報(例えば、演算完了信号ECOMP、命令識別子EIID)を受信したか否かを判定する。演算完了情報を受信した場合(ステップS210のYes)、命令完了制御部CCTLの動作は、ステップS220に移る。一方、演算完了情報を受信していない場合(ステップS210のNo)、命令完了制御部CCTLの動作は、ステップS250に移る。   In step S210, the instruction completion control unit CCTL determines whether or not calculation completion information (for example, calculation completion signal ECOMP, instruction identifier EIID) has been received. When the operation completion information is received (Yes in step S210), the operation of the instruction completion control unit CCTL proceeds to step S220. On the other hand, when the operation completion information has not been received (No in step S210), the operation of the instruction completion control unit CCTL proceeds to step S250.

ステップS220では、命令完了制御部CCTLは、コミットスタックエントリCSEに保持された状態情報のうち、命令識別子EIID_LCH(信号EIIDa)が示す命令の状態情報を、演算の完了を示す情報に更新する。例えば、コミットスタックエントリCSEは、命令識別子EIID_LCH(信号EIIDa)が示す命令の状態情報を、演算完了信号ECOMP_LCH(信号ECOPMa)の情報に更新する。   In step S220, the instruction completion control unit CCTL updates the state information of the instruction indicated by the instruction identifier EIID_LCH (signal EIIDa) among the state information held in the commit stack entry CSE to information indicating the completion of the operation. For example, the commit stack entry CSE updates the state information of the instruction indicated by the instruction identifier EIID_LCH (signal EIIDa) to the information of the operation completion signal ECOMP_LCH (signal ECOMPa).

ステップS230では、命令完了制御部CCTLは、例外が検出されたか否かを判定する。例えば、命令完了制御部CCTLは、演算例外が発生したことを示す例外情報EXSIGを演算部OPから受信したか否かを判定する。例外が検出された場合(ステップS230のYes)、命令完了制御部CCTLの動作は、ステップS240に移る。一方、例外が検出されていない場合(ステップS230のNo)、命令完了制御部CCTLの動作は、ステップS232に移る。   In step S230, the instruction completion control unit CCTL determines whether an exception is detected. For example, the instruction completion control unit CCTL determines whether or not exception information EXSIG indicating that an operation exception has occurred has been received from the operation unit OP. If an exception is detected (Yes in step S230), the operation of the instruction completion control unit CCTL proceeds to step S240. On the other hand, when no exception is detected (No in step S230), the operation of the instruction completion control unit CCTL proceeds to step S232.

ステップS232では、命令完了制御部CCTLは、例えば、演算完了信号ECOMP_LCH(信号ECOPMa)の命令がステップS200で読み出した命令完了処理の対象となる命令か否かを判定する。例えば、命令完了制御部CCTLは、命令識別子EIID_LCH(信号EIIDa)がポインタPTR1−PTR4に一致するか否かを判定する。演算完了信号ECOMP_LCH(信号ECOPMa)の命令が命令完了処理の対象である場合(ステップS232のYes)、命令完了制御部CCTLの動作は、ステップS234に移る。一方、演算完了信号ECOMP_LCH(信号ECOPMa)の命令が命令完了処理の対象でない場合(ステップS232のNo)、命令完了制御部CCTLの動作は、ステップS250aに移る。   In step S232, for example, the instruction completion control unit CCTL determines whether or not the instruction of the operation completion signal ECOMP_LCH (signal ECOMPa) is a target of the instruction completion process read in step S200. For example, the instruction completion control unit CCTL determines whether or not the instruction identifier EIID_LCH (signal EIIDa) matches the pointers PTR1 to PTR4. When the instruction of the operation completion signal ECOMP_LCH (signal ECOMPa) is an instruction completion process target (Yes in step S232), the operation of the instruction completion control unit CCTL proceeds to step S234. On the other hand, when the instruction of the operation completion signal ECOMP_LCH (signal ECOMPa) is not the target of instruction completion processing (No in Step S232), the operation of the instruction completion control unit CCTL proceeds to Step S250a.

ステップS234では、バイパス部BYP2は、演算完了信号ECOMP_LCH(信号ECOPMa)に基づいて、演算の完了を示すバイパス情報ECOMPwを生成する。例えば、バイパス部BYP2は、命令識別子EIID_LCH(信号EIIDa)が示す命令に対して、演算の完了を示すバイパス情報ECOMPwを生成する。このように、バイパス部BYP2は、例外の検出が抑止されていない状態では、例外が検出されず、演算部OPから出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報ECOMPwを生成する。   In step S234, the bypass unit BYP2 generates bypass information ECOMPw indicating the completion of the calculation based on the calculation completion signal ECOMP_LCH (signal ECOMPa). For example, the bypass unit BYP2 generates bypass information ECOMPw indicating completion of the operation for the instruction indicated by the instruction identifier EIID_LCH (signal EIIDa). Thus, in the state where the detection of the exception is not suppressed, the bypass unit BYP2 does not detect the exception, and the instruction indicated by the operation completion information output from the operation unit OP and the instruction that is the target of the instruction completion process. If they match, bypass information ECOMPw indicating completion of the calculation is generated.

ステップS240では、命令完了制御部CCTLは、コミットスタックエントリCSEに保持された状態情報のうち、命令識別子EIID_LLが示す命令の状態情報を、例外の発生を示す情報に更新する。例えば、コミットスタックエントリCSEは、命令識別子EIID_LLが示す命令の状態情報を、例外情報EXSIG_LCHの内容に更新する。   In step S240, the instruction completion control unit CCTL updates the state information of the instruction indicated by the instruction identifier EIID_LL among the state information held in the commit stack entry CSE to information indicating the occurrence of an exception. For example, the commit stack entry CSE updates the state information of the instruction indicated by the instruction identifier EIID_LL to the contents of the exception information EXIG_LCH.

ステップS250aでは、命令完了制御部CCTLは、バイパス情報ECOMPwおよびコミットスタックエントリCSEから読み出した命令の状態情報(信号ECOMPc)に基づいて、命令完了処理を実行する。例えば、命令完了処理部COMPU1は、信号ECOMPw1−ECOMPw4と信号ECOMPc1−ECOMPc4とのそれぞれの論理和結果である信号ECOMPsl1−ECOMPsl4に基づいて、信号COMMIT1−COMMIT4を生成する。そして、命令完了部COMPU2は、信号COMMIT1−COMMIT4に基づいて、命令完了処理を実行する。   In step S250a, the instruction completion control unit CCTL executes instruction completion processing based on the bypass information ECOMPw and the instruction status information (signal ECOMPC) read from the commit stack entry CSE. For example, the instruction completion processing unit COMPU1 generates the signals COMMIT1-COMMIT4 based on the signals ECOMPsl1-ECOMPsl4 that are the logical sums of the signals ECOMPw1-ECOMPw4 and the signals ECOMPc1-ECOMPc4. Then, the instruction completion unit COMPU2 executes instruction completion processing based on the signals COMMIT1 to COMMIT4.

なお、演算処理装置PUの動作は、この例に限定されない。また、演算例外の検出が抑止されている場合(FEDフラグ=1)の演算処理装置PUの動作は、図2に示した動作と同一または同様である。   Note that the operation of the arithmetic processing unit PU is not limited to this example. Further, the operation of the arithmetic processing unit PU when the detection of the arithmetic exception is suppressed (FED flag = 1) is the same as or similar to the operation shown in FIG.

図15は、図13に示した命令完了制御部CCTLの動作の一例を示す。なお、図15は、演算例外の検出が抑止されていない状態(FED=0)で、演算例外が発生しない場合の命令完了制御部CCTLの動作の一例を示す。すなわち、図15の動作は、図11の動作に対応している。図8から図11で説明した動作と同一または同様な動作については、詳細な説明を省略する。図のFADD(IID=12)は、値”12”の命令識別子(IID=12)に対応する命令に基づく浮動小数点加算のパイプラインステージを示す。例えば、サイクル4は、浮動小数点加算の最後の演算実行ステージXに対応する。   FIG. 15 shows an example of the operation of the instruction completion control unit CCTL shown in FIG. FIG. 15 shows an example of the operation of the instruction completion control unit CCTL when no operation exception occurs in the state where detection of the operation exception is not suppressed (FED = 0). That is, the operation of FIG. 15 corresponds to the operation of FIG. Detailed description of the same or similar operations as those described in FIGS. 8 to 11 is omitted. FADD (IID = 12) in the figure indicates a pipeline stage of floating point addition based on an instruction corresponding to an instruction identifier (IID = 12) having a value “12”. For example, cycle 4 corresponds to the last operation execution stage X of the floating point addition.

なお、図15の動作では、例外が発生しないため、例外情報EXSIG、EXSIG_LCHは、論理値”0”に維持される。このため、信号INHは、論理値”0”に維持される。また、例外情報EXSIGの反転信号は、論理値”1”に維持される。   In the operation of FIG. 15, since no exception occurs, the exception information EXSIG and EXSIG_LCH is maintained at the logical value “0”. For this reason, the signal INH is maintained at the logical value “0”. Further, the inverted signal of the exception information EXSIG is maintained at the logical value “1”.

サイクル4では、命令完了制御部CCTLは、論理値”1”の演算完了信号ECOMPおよび値”12”の命令識別子EIIDを演算器FPUから受信する。なお、信号FEDが論理値”0”であるため、サイクル4では、演算完了信号ECOMの情報は、コミットスタックエントリCSEに登録されない。   In cycle 4, the instruction completion control unit CCTL receives the operation completion signal ECOMP having the logical value “1” and the instruction identifier EIID having the value “12” from the arithmetic unit FPU. Note that since the signal FED is the logical value “0”, the information of the operation completion signal ECOM is not registered in the commit stack entry CSE in the cycle 4.

サイクル5では、演算完了信号ECOMP_LCHおよび命令識別子EIID_LCHは、論理値”1”および値”12”にそれぞれ変化する。信号FEDが論理値”0”であるため、信号EIIDaとして命令識別子EIID_LCHが選択され、信号ECOMPaとして、演算完了信号ECOMP_LCHが選択される。このため、コミットスタックエントリCSEに登録されている命令のうち、値”12”の命令識別子EIID_LCH(信号EIIDa)に対応する命令の状態情報に、演算完了信号ECOMP_LCH(信号ECOMPa)の情報(演算の完了)が設定される。   In cycle 5, the operation completion signal ECOMP_LCH and the instruction identifier EIID_LCH change to the logical value “1” and the value “12”, respectively. Since the signal FED is the logical value “0”, the instruction identifier EIID_LCH is selected as the signal EIDa, and the operation completion signal ECOMP_LCH is selected as the signal ECOMPa. For this reason, out of the instructions registered in the commit stack entry CSE, the status information of the instruction corresponding to the instruction identifier EIID_LCH (signal EIIDa) having the value “12” is added to the information (calculation of the calculation completion signal ECOMP_LCH (signal ECOMPa)). Completed) is set.

また、例外情報EXSIGの反転信号は、論理値”1”であり、ポインタPTR1の値と命令識別子EIID_LCH(信号EIIDa)の値とは、ともに12である。このため、信号ECOMPw1は、演算完了信号ECOMP_LCHの論理値”1”と同じ論理値”1”に変化する。そして、信号ECOMPw1が論理値”1”に変化したことにより、信号ECOMPs1が論理値”1”に変化する。これにより、論理値”1”の信号ECOMPs1がラッチLAT30に保持される。   Further, the inverted signal of the exception information EXSIG is a logical value “1”, and the value of the pointer PTR1 and the value of the instruction identifier EIID_LCH (signal EIIDa) are both 12. For this reason, the signal ECOMPw1 changes to the same logical value “1” as the logical value “1” of the operation completion signal ECOMP_LCH. Then, since the signal ECOMPw1 changes to the logical value “1”, the signal ECOMPs1 changes to the logical value “1”. As a result, the signal ECOMPs1 having the logical value “1” is held in the latch LAT30.

サイクル6では、サイクル5で論理値”1”の信号ECOMPs1がラッチLAT30に保持されたため、ラッチLAT30の出力信号である信号ECOMPsl1が論理値”1”に変化する。信号ECOMPsl1が論理値”1”で、信号INHが論理値”0”であるため、信号COMMIT1が論理値”1”に変化する。   In cycle 6, since the signal ECOMPs1 having the logical value “1” is held in the latch LAT30 in cycle 5, the signal ECOMPsl1 that is the output signal of the latch LAT30 changes to the logical value “1”. Since the signal ECOMPsl1 is the logical value “1” and the signal INH is the logical value “0”, the signal COMMIT1 changes to the logical value “1”.

また、例えば、信号COMMIT2−COMIT4は、図5で説明したそれぞれの完了条件を満たしている場合、論理値”1”に変化する。例えば、サイクル5で論理値”1”の信号ECOMPc2−ECOMPc4がコミットスタックエントリCSEから読み出された場合、信号COMMIT2−COMIT4もサイクル6で論理値”1”に変化する。信号COMMIT1−COMIT4が論理値”1”に変化するため、ポインタPTR1の値は16(=12+4)に変化する。これにより、値”16”のポインタPTR1が、ポインタ部PTに保持される。   Further, for example, the signals COMMIT 2 -COMIT 4 change to the logical value “1” when the completion conditions described in FIG. 5 are satisfied. For example, when the signal ECOMPc2-ECOMPc4 having the logical value “1” is read from the commit stack entry CSE in the cycle 5, the signal COMMIT2-COMIT4 also changes to the logical value “1” in the cycle 6. Since the signal COMMIT1-COMIT4 changes to the logical value “1”, the value of the pointer PTR1 changes to 16 (= 12 + 4). As a result, the pointer PTR1 having the value “16” is held in the pointer portion PT.

サイクル7では、ポインタPTR1mの値は、サイクル6でポインタ部PTに保持されたポインタPTR1の値である16に変化する。   In cycle 7, the value of pointer PTR1m changes to 16, which is the value of pointer PTR1 held in pointer unit PT in cycle 6.

このように、命令完了制御部CCTLは、例えば、例外の検出が抑止されていない状態でも、例外が検出されず、かつ、命令識別子EIID_IIDの値がポインタPTR1の値と同じ場合、レジスタ更新ステージUを2サイクルで実行できる。これに対し、例えば、例外の検出が抑止されていない場合にバイパス情報ECOMPw1−ECOMPw4が生成されない構成の動作(例えば、図11の動作)では、レジスタ更新ステージUを3サイクルで実行する。   In this way, the instruction completion control unit CCTL, for example, if the exception is not detected and the value of the instruction identifier EIID_IID is the same as the value of the pointer PTR1, even if the detection of the exception is not suppressed, Can be executed in two cycles. On the other hand, for example, in the operation of the configuration in which the bypass information ECOMPw1 to ECOMPw4 is not generated when the detection of the exception is not suppressed (for example, the operation of FIG. 11), the register update stage U is executed in three cycles.

すなわち、図15の動作では、例外の検出が抑止されていない場合にバイパス情報ECOMPw1−ECOMPw4が生成されない構成の動作(例えば、図11の動作)に比べて、命令完了処理を1サイクル早く開始できる。このため、演算処理装置PUの性能が向上する。例えば、信号COMMIT2−COMIT4の完了条件が満たされている場合、演算処理装置PUは、ポインタPTR2−PTR4が示す命令(ポインタPTR1が示す命令の後続の命令)も、ポインタPTR1が示す命令と同じサイクルで命令完了処理を開始できる。すなわち、演算処理装置PUは、例外の検出が抑止されていない場合にバイパス情報ECOMPw1−ECOMPw4が生成されない構成の動作(例えば、図11の動作)に比べて、後続の命令に対する命令完了処理も1サイクル早く開始できる。   That is, in the operation of FIG. 15, the instruction completion process can be started one cycle earlier than the operation (for example, the operation of FIG. 11) in which the bypass information ECOMPw1 to ECOMPw4 is not generated when the exception detection is not suppressed. . For this reason, the performance of the arithmetic processing unit PU is improved. For example, when the completion condition of the signal COMMIT2-COMIT4 is satisfied, the arithmetic processing unit PU also causes the instruction indicated by the pointer PTR2-PTR4 (the instruction subsequent to the instruction indicated by the pointer PTR1) to be in the same cycle as the instruction indicated by the pointer PTR1. The instruction completion process can be started. That is, the arithmetic processing unit PU also performs instruction completion processing for subsequent instructions as compared to an operation (for example, the operation of FIG. 11) in which bypass information ECOMPw1 to ECOMPw4 is not generated when detection of an exception is not suppressed. Start cycle early.

なお、演算例外の検出が抑止されていない状態(FEDフラグ=0)で、演算例外が発生した場合の命令完了制御部CCTLの動作は、図10に示した動作と同一または同様である。また、演算例外の検出が抑止されている場合(FEDフラグ=1)の命令完了制御部CCTLの動作は、図8および図9に示した動作と同一または同様である。   Note that the operation of the instruction completion control unit CCTL when an operation exception occurs in a state where detection of an operation exception is not suppressed (FED flag = 0) is the same as or similar to the operation shown in FIG. Further, the operation of the instruction completion control unit CCTL when the detection of the operation exception is suppressed (FED flag = 1) is the same as or similar to the operation shown in FIGS.

以上、図13から図15に示した実施形態の演算処理装置および演算処理装置の制御方法においても、図1から図12に示した実施形態の演算処理装置および演算処理装置の制御方法と同様の効果を得ることができる。例えば、バイパス部BYP2は、演算処理により発生する例外の検出が抑止され、かつ、演算部OPから出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報ECOMPwを生成する。これにより、この実施形態においても、演算例外の検出が抑止されている場合に、演算部OPが演算完了情報を出力してから命令完了処理を実行するまでの時間を短縮できる。   As described above, the arithmetic processing device and the control method of the arithmetic processing device of the embodiment shown in FIGS. 13 to 15 are the same as the arithmetic processing device and the control method of the arithmetic processing device of the embodiment shown in FIGS. An effect can be obtained. For example, in the bypass unit BYP2, detection of an exception caused by the arithmetic processing is suppressed, and the instruction indicated by the arithmetic completion information output from the arithmetic unit OP matches the instruction that is the target of the instruction completion processing. Bypass information ECOMPw indicating completion of the calculation is generated. Thereby, also in this embodiment, when the detection of the operation exception is suppressed, the time from the operation unit OP outputting the operation completion information to executing the instruction completion process can be shortened.

さらに、この実施形態では、演算例外の検出が抑止されていない状態でも、演算例外が検出されない場合に、演算部OPが演算完了情報を出力してから命令完了処理を実行するまでの時間を短縮できる。例えば、バイパス部BYP2は、演算例外の検出が抑止されていない状態で、演算例外が検出されず、演算部OPから出力された演算完了情報が示す命令と命令完了処理の対象となる命令とが一致している場合、演算の完了を示すバイパス情報ECOMPwを生成する。   Further, in this embodiment, even when the detection of the operation exception is not suppressed, when the operation exception is not detected, the time until the instruction completion processing is executed after the operation unit OP outputs the operation completion information is shortened. it can. For example, in the bypass unit BYP2, the operation exception is not detected and the instruction indicated by the operation completion information output from the operation unit OP and the instruction to be processed by the instruction completion process are not detected. If they match, bypass information ECOMPw indicating completion of the calculation is generated.

このため、この実施形態では、演算例外の検出が抑止されていない状態でも、演算例外が検出されない場合に、演算部OPが演算完了信号ECOMPを出力してから演算完了信号ECOMPの情報を命令完了部COMPU2等に通知するまでの時間を短縮できる。この結果、この実施形態では、演算例外の検出が抑止されていない状態でも、演算例外が検出されない場合に、演算部OPが演算完了情報を出力してから命令完了処理を実行するまでの時間を短縮できる。   Therefore, in this embodiment, even when the detection of the operation exception is not suppressed, when the operation exception is not detected, the operation unit OP outputs the operation completion signal ECOMP, and then the information of the operation completion signal ECOMP is completed. The time until notification to the unit COMPU2 and the like can be shortened. As a result, in this embodiment, even when the detection of the operation exception is not suppressed, when the operation exception is not detected, the time from the operation unit OP outputting the operation completion information to executing the instruction completion processing is increased. Can be shortened.

以上の実施形態において説明した発明を整理して、付記として開示する。
(付記1)
命令をデコードするデコード部と、デコードされた前記命令に基づく演算を実行する演算部と、前記命令を完了させる命令完了処理をデコードされた順に実行する完了制御部とを有し、
前記完了制御部は、
デコードされた前記命令がデコードされた順に登録され、登録された前記命令に基づく演算が完了したか否か示す状態情報を保持し、前記演算部による演算の完了を示す演算完了情報を受信した場合、前記演算完了情報が示す前記命令の前記状態情報を、演算の完了を示す情報に更新する保持部と、
前記命令完了処理の対象となる前記命令を、デコードされた順に前記保持部から読み出す選択部と、
演算処理により発生する例外の検出が抑止され、かつ、前記演算部から出力された前記演算完了情報が示す前記命令と前記命令完了処理の対象となる前記命令とが一致している場合、演算の完了を示すバイパス情報を生成するバイパス部と、
演算の完了を示す前記バイパス情報が生成された前記命令に対しては前記バイパス情報に基づいて前記命令完了処理を実行し、演算の完了を示す前記バイパス情報が生成されていない前記命令に対しては前記保持部から読み出した前記命令の前記状態情報に基づいて前記命令完了処理を実行する完了処理部とを有することを特徴とする演算処理装置。
(付記2)
付記1に記載の演算処理装置において、
前記バイパス部は、前記例外の検出が抑止されていない状態では、前記例外が検出されず、かつ、前記演算部から出力された前記演算完了情報が示す前記命令と前記命令完了処理の対象となる前記命令とが一致している場合、演算の完了を示す前記バイパス情報を生成する
ことを特徴とする演算処理装置。
(付記3)
命令をデコードするデコード部と、デコードされた前記命令に基づく演算を実行する演算部と、デコードされた前記命令がデコードされた順に登録される保持部に、前記命令に基づく演算が完了したか否か示す状態情報を前記命令に対応させて格納し、前記命令を完了させる命令完了処理をデコードされた順に実行する完了制御部とを有する演算処理装置の制御方法において、
前記完了制御部は、前記命令完了処理の対象となる前記命令を、デコードされた順に前記保持部から読み出し、
前記完了制御部は、前記演算部による演算の完了を示す演算完了情報を受信した場合、前記保持部に保持された前記状態情報のうち、前記演算完了情報が示す前記命令の前記状態情報を、演算の完了を示す情報に更新し、
前記完了制御部は、演算処理により発生する例外の検出が抑止され、かつ、前記演算部から出力された前記演算完了情報が示す前記命令と前記命令完了処理の対象となる前記命令とが一致している場合、演算の完了を示すバイパス情報を生成し、
前記完了制御部は、演算の完了を示す前記バイパス情報が生成された前記命令に対しては前記バイパス情報に基づいて前記命令完了処理を実行し、演算の完了を示す前記バイパス情報が生成されていない前記命令に対しては前記保持部から読み出した前記命令の前記状態情報に基づいて前記命令完了処理を実行する
ことを特徴とする演算処理装置の制御方法。
(付記4)
付記3に記載の演算処理装置の制御方法において、
前記完了制御部は、前記例外の検出が抑止されていない状態では、前記例外が検出されず、かつ、前記演算部から出力された前記演算完了情報が示す前記命令と前記命令完了処理の対象となる前記命令とが一致している場合、演算の完了を示す前記バイパス情報を生成する
ことを特徴とする演算処理装置の制御方法。
The invention described in the above embodiments is organized and disclosed as an appendix.
(Appendix 1)
A decoding unit that decodes an instruction, an operation unit that executes an operation based on the decoded instruction, and a completion control unit that executes instruction completion processing for completing the instruction in the order of decoding,
The completion control unit
When the decoded instructions are registered in the order of decoding, holding state information indicating whether or not an operation based on the registered instruction is completed, and receiving operation completion information indicating completion of the operation by the operation unit A holding unit that updates the state information of the instruction indicated by the calculation completion information to information indicating completion of the calculation;
A selection unit that reads out the instruction to be processed by the instruction completion process from the holding unit in the order of decoding;
When the detection of an exception caused by the arithmetic processing is suppressed and the instruction indicated by the arithmetic completion information output from the arithmetic unit is coincident with the instruction that is the target of the instruction completion processing, A bypass unit for generating bypass information indicating completion;
The instruction completion process is executed based on the bypass information for the instruction in which the bypass information indicating the completion of the operation is generated, and the instruction in which the bypass information indicating the completion of the operation is not generated. And a completion processing unit that executes the instruction completion processing based on the state information of the instruction read from the holding unit.
(Appendix 2)
In the arithmetic processing device according to attachment 1,
The bypass unit is a target of the instruction and the instruction completion process indicated by the calculation completion information output from the calculation unit when the exception detection is not suppressed and the exception is not detected. When the instruction matches, the bypass information indicating completion of the operation is generated.
(Appendix 3)
Whether the operation based on the instruction is completed in the decoding unit that decodes the instruction, the operation unit that executes the operation based on the decoded instruction, and the holding unit that is registered in the order in which the decoded instruction is decoded In the control method of the arithmetic processing unit having a completion control unit that stores state information corresponding to the instruction and executes instruction completion processing for completing the instruction in the order of decoding,
The completion control unit reads the instructions to be processed by the instruction completion process from the holding unit in the order of decoding,
When the completion control unit receives calculation completion information indicating completion of calculation by the calculation unit, among the state information held in the holding unit, the state information of the instruction indicated by the calculation completion information is Update to information indicating the completion of the calculation,
The completion control unit is configured to suppress detection of an exception caused by the arithmetic processing, and the instruction indicated by the arithmetic completion information output from the arithmetic unit matches the instruction that is the target of the instruction completion processing. Generate bypass information indicating the completion of the operation,
The completion control unit executes the instruction completion processing based on the bypass information for the instruction for which the bypass information indicating the completion of the calculation is generated, and the bypass information indicating the completion of the calculation is generated. The control method for the arithmetic processing device, wherein the instruction completion processing is executed based on the state information of the instruction read from the holding unit for the instruction that does not exist.
(Appendix 4)
In the control method of the arithmetic processing unit according to attachment 3,
In the state where the detection of the exception is not suppressed, the completion control unit does not detect the exception, and the instruction indicated by the calculation completion information output from the calculation unit and the target of the instruction completion process When the instruction matches, the bypass information indicating the completion of the operation is generated.

以上の詳細な説明により、実施形態の特徴点および利点は明らかになるであろう。これは、特許請求の範囲がその精神および権利範囲を逸脱しない範囲で前述のような実施形態の特徴点および利点にまで及ぶことを意図するものである。また、当該技術分野において通常の知識を有する者であれば、あらゆる改良および変更に容易に想到できるはずである。したがって、発明性を有する実施形態の範囲を前述したものに限定する意図はなく、実施形態に開示された範囲に含まれる適当な改良物および均等物に拠ることも可能である。   From the above detailed description, features and advantages of the embodiments will become apparent. This is intended to cover the features and advantages of the embodiments described above without departing from the spirit and scope of the claims. Also, any improvement and modification should be readily conceivable by those having ordinary knowledge in the art. Therefore, there is no intention to limit the scope of the inventive embodiments to those described above, and appropriate modifications and equivalents included in the scope disclosed in the embodiments can be used.

ADD‥加算部;AND1、AND2、AND3‥論理積部;BCTL‥分岐制御部;BRPRE‥分岐予測機構;BYP、BYP2‥バイパス部;CCM‥命令キャッシュ;CCTL‥命令完了制御部;CMP10、CMP20‥比較部;COMPU‥完了処理部;COMPU1‥命令完了処理部;COMPU2‥命令完了部;CSE‥コミットスタックエントリ;DCM‥データキャッシュ;DEC‥命令デコーダ;EXBUF‥固定小数点更新バッファ;EXREG‥固定小数点レジスタ;EXU、FPU‥演算器;FAGEN‥命令フェッチアドレス生成器;FPBUF‥浮動小数点更新バッファ;FPREG‥浮動小数点レジスタ;INV1、INV2‥インバータ;LAT10、LAT12、LAT20、LAT30、LAT40‥ラッチ;MCTL‥状態制御部;NPC‥ネクストプログラムカウンタ;OAGEN‥オペランドアドレス生成器;OP‥演算部;OR1、OR2‥論理和部;PC‥プログラムカウンタ;PT‥ポインタ部;PU‥演算処理装置;RS、RSA、RSE、RSF、RSBR‥リザベーションステーション;SEL10、SEL20‥選択部   ADD: Adder; AND1, AND2, AND3: Logical product; BCTL: Branch controller; BRPRE: Branch prediction mechanism; BYP, BYP2: Bypass unit; CCM: Instruction cache; CCTL: Instruction completion controller: CMP10, CMP20, etc. COMPU. Completion processing unit; COMPU1. Instruction completion processing unit; COMPU2. Instruction completion unit; CSE ... Commit stack entry; DCM ... Data cache; DEC ... Instruction decoder; EXBUF ... Fixed-point update buffer; EXREG ... Fixed-point register EXU, FPU ... arithmetic unit; FAGEN ... instruction fetch address generator; FPBUF ... floating point update buffer; FPREG ... floating point register; INV1, INV2 ... inverter; LAT10, LAT12, LAT20, LAT30, LAT4 Latch; MCTL State control unit; NPC Next program counter; OAGEN Operand address generator; OP Arithmetic unit; OR1, OR2 OR unit; PC Program counter; PT Pointer unit; PU Arithmetic processing unit RS, RSA, RSE, RSF, RSBR ... reservation station; SEL10, SEL20 ... selection unit

Claims (3)

命令をデコードするデコード部と、デコードされた前記命令に基づく演算を実行する演算部と、前記命令を完了させる命令完了処理をデコードされた順に実行する完了制御部とを有し、
前記完了制御部は、
デコードされた前記命令がデコードされた順に登録され、登録された前記命令に基づく演算が完了したか否か示す状態情報を保持し、前記演算部による演算の完了を示す演算完了情報を受信した場合、前記演算完了情報が示す前記命令の前記状態情報を、演算の完了を示す情報に更新する保持部と、
前記命令完了処理の対象となる前記命令を、デコードされた順に前記保持部から読み出す選択部と、
演算処理により発生する例外の検出が抑止され、かつ、前記演算部から出力された前記演算完了情報が示す前記命令と前記命令完了処理の対象となる前記命令とが一致している場合、演算の完了を示すバイパス情報を生成するバイパス部と、
演算の完了を示す前記バイパス情報が生成された前記命令に対しては前記バイパス情報に基づいて前記命令完了処理を実行し、演算の完了を示す前記バイパス情報が生成されていない前記命令に対しては前記保持部から読み出した前記命令の前記状態情報に基づいて前記命令完了処理を実行する完了処理部とを有することを特徴とする演算処理装置。
A decoding unit that decodes an instruction, an operation unit that executes an operation based on the decoded instruction, and a completion control unit that executes instruction completion processing for completing the instruction in the order of decoding,
The completion control unit
When the decoded instructions are registered in the order of decoding, holding state information indicating whether or not an operation based on the registered instruction is completed, and receiving operation completion information indicating completion of the operation by the operation unit A holding unit that updates the state information of the instruction indicated by the calculation completion information to information indicating completion of the calculation;
A selection unit that reads out the instruction to be processed by the instruction completion process from the holding unit in the order of decoding;
When the detection of an exception caused by the arithmetic processing is suppressed and the instruction indicated by the arithmetic completion information output from the arithmetic unit is coincident with the instruction that is the target of the instruction completion processing, A bypass unit for generating bypass information indicating completion;
The instruction completion process is executed based on the bypass information for the instruction in which the bypass information indicating the completion of the operation is generated, and the instruction in which the bypass information indicating the completion of the operation is not generated. And a completion processing unit that executes the instruction completion processing based on the state information of the instruction read from the holding unit.
請求項1に記載の演算処理装置において、
前記バイパス部は、前記例外の検出が抑止されていない状態では、前記例外が検出されず、かつ、前記演算部から出力された前記演算完了情報が示す前記命令と前記命令完了処理の対象となる前記命令とが一致している場合、演算の完了を示す前記バイパス情報を生成する
ことを特徴とする演算処理装置。
The arithmetic processing device according to claim 1,
The bypass unit is a target of the instruction and the instruction completion process indicated by the calculation completion information output from the calculation unit when the exception detection is not suppressed and the exception is not detected. When the instruction matches, the bypass information indicating completion of the operation is generated.
命令をデコードするデコード部と、デコードされた前記命令に基づく演算を実行する演算部と、デコードされた前記命令がデコードされた順に登録される保持部に、前記命令に基づく演算が完了したか否か示す状態情報を前記命令に対応させて格納し、前記命令を完了させる命令完了処理をデコードされた順に実行する完了制御部とを有する演算処理装置の制御方法において、
前記完了制御部は、前記命令完了処理の対象となる前記命令を、デコードされた順に前記保持部から読み出し、
前記完了制御部は、前記演算部による演算の完了を示す演算完了情報を受信した場合、前記保持部に保持された前記状態情報のうち、前記演算完了情報が示す前記命令の前記状態情報を、演算の完了を示す情報に更新し、
前記完了制御部は、演算処理により発生する例外の検出が抑止され、かつ、前記演算部から出力された前記演算完了情報が示す前記命令と前記命令完了処理の対象となる前記命令とが一致している場合、演算の完了を示すバイパス情報を生成し、
前記完了制御部は、演算の完了を示す前記バイパス情報が生成された前記命令に対しては前記バイパス情報に基づいて前記命令完了処理を実行し、演算の完了を示す前記バイパス情報が生成されていない前記命令に対しては前記保持部から読み出した前記命令の前記状態情報に基づいて前記命令完了処理を実行する
ことを特徴とする演算処理装置の制御方法。
Whether the operation based on the instruction is completed in the decoding unit that decodes the instruction, the operation unit that executes the operation based on the decoded instruction, and the holding unit that is registered in the order in which the decoded instruction is decoded In the control method of the arithmetic processing unit having a completion control unit that stores state information corresponding to the instruction and executes instruction completion processing for completing the instruction in the order of decoding,
The completion control unit reads the instructions to be processed by the instruction completion process from the holding unit in the order of decoding,
When the completion control unit receives calculation completion information indicating completion of calculation by the calculation unit, among the state information held in the holding unit, the state information of the instruction indicated by the calculation completion information is Update to information indicating the completion of the calculation,
The completion control unit is configured to suppress detection of an exception caused by the arithmetic processing, and the instruction indicated by the arithmetic completion information output from the arithmetic unit matches the instruction that is the target of the instruction completion processing. Generate bypass information indicating the completion of the operation,
The completion control unit executes the instruction completion processing based on the bypass information for the instruction for which the bypass information indicating the completion of the calculation is generated, and the bypass information indicating the completion of the calculation is generated. The control method for the arithmetic processing device, wherein the instruction completion processing is executed based on the state information of the instruction read from the holding unit for the instruction that does not exist.
JP2014081872A 2014-04-11 2014-04-11 Arithmetic processing device and control method of arithmetic processing device Active JP6314620B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014081872A JP6314620B2 (en) 2014-04-11 2014-04-11 Arithmetic processing device and control method of arithmetic processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014081872A JP6314620B2 (en) 2014-04-11 2014-04-11 Arithmetic processing device and control method of arithmetic processing device

Publications (2)

Publication Number Publication Date
JP2015203914A JP2015203914A (en) 2015-11-16
JP6314620B2 true JP6314620B2 (en) 2018-04-25

Family

ID=54597361

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014081872A Active JP6314620B2 (en) 2014-04-11 2014-04-11 Arithmetic processing device and control method of arithmetic processing device

Country Status (1)

Country Link
JP (1) JP6314620B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6009511A (en) * 1997-06-11 1999-12-28 Advanced Micro Devices, Inc. Apparatus and method for tagging floating point operands and results for rapid detection of special floating point numbers
JP3469469B2 (en) * 1998-07-07 2003-11-25 富士通株式会社 Information processing device
JP5949327B2 (en) * 2012-08-24 2016-07-06 富士通株式会社 Arithmetic processing device and control method of arithmetic processing device
JP6098429B2 (en) * 2013-08-12 2017-03-22 富士通株式会社 Arithmetic processing device and control method of arithmetic processing device

Also Published As

Publication number Publication date
JP2015203914A (en) 2015-11-16

Similar Documents

Publication Publication Date Title
JP5889986B2 (en) System and method for selectively committing the results of executed instructions
EP3091433B1 (en) System and method to reduce load-store collision penalty in speculative out of order engine
TWI552070B (en) Execute at commit state update instructions, apparatus, methods, and systems
US8074060B2 (en) Out-of-order execution microprocessor that selectively initiates instruction retirement early
JP5154119B2 (en) Processor
JP5491071B2 (en) Instruction fusion arithmetic device and instruction fusion arithmetic method
US9851973B2 (en) Dynamic branch hints using branches-to-nowhere conditional branch
US10846092B2 (en) Execution of micro-operations
JP2018005488A (en) Arithmetic processing unit and control method for arithmetic processing unit
US8447961B2 (en) Mechanism for efficient implementation of software pipelined loops in VLIW processors
US10942748B2 (en) Method and system for processing interrupts with shadow units in a microcontroller
US6983359B2 (en) Processor and method for pre-fetching out-of-order instructions
US9594564B2 (en) Arithmetic processing device and control method of arithmetic processing device
US11055101B2 (en) Processing apparatus and controlling method for processing apparatus
JP7409208B2 (en) arithmetic processing unit
JP6314620B2 (en) Arithmetic processing device and control method of arithmetic processing device
CN112559048B (en) Instruction processing device, processor and processing method thereof
US10929137B2 (en) Arithmetic processing device and control method for arithmetic processing device
US9710389B2 (en) Method and apparatus for memory aliasing detection in an out-of-order instruction execution platform
JP3721002B2 (en) Processor and instruction fetch method for selecting one of a plurality of fetch addresses generated in parallel to form a memory request
US20140201505A1 (en) Prediction-based thread selection in a multithreading processor
US11314505B2 (en) Arithmetic processing device
US20230315446A1 (en) Arithmetic processing apparatus and method for arithmetic processing
US20110078486A1 (en) Dynamic selection of execution stage
US7991816B2 (en) Inverting data on result bus to prepare for instruction in the next cycle for high frequency execution units

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170110

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7426

Effective date: 20170803

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20170803

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20170804

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180116

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20180214

TRDD Decision of grant or rejection written
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20180219

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20180219

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180227

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180312

R150 Certificate of patent or registration of utility model

Ref document number: 6314620

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150