JP6105307B2 - Instruction execution control device, instruction execution control system, instruction execution control method, and instruction execution control program - Google Patents

Instruction execution control device, instruction execution control system, instruction execution control method, and instruction execution control program Download PDF

Info

Publication number
JP6105307B2
JP6105307B2 JP2013022120A JP2013022120A JP6105307B2 JP 6105307 B2 JP6105307 B2 JP 6105307B2 JP 2013022120 A JP2013022120 A JP 2013022120A JP 2013022120 A JP2013022120 A JP 2013022120A JP 6105307 B2 JP6105307 B2 JP 6105307B2
Authority
JP
Japan
Prior art keywords
instruction
barrier
information
command
execution
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
JP2013022120A
Other languages
Japanese (ja)
Other versions
JP2014153851A (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.)
NEC Platforms Ltd
Original Assignee
NEC Platforms 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 NEC Platforms Ltd filed Critical NEC Platforms Ltd
Priority to JP2013022120A priority Critical patent/JP6105307B2/en
Publication of JP2014153851A publication Critical patent/JP2014153851A/en
Application granted granted Critical
Publication of JP6105307B2 publication Critical patent/JP6105307B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本願発明は、命令間の追い越し機能を実装した計算機において、命令間の順序保障制御を行うための命令実行制御装置、命令実行制御システム、命令実行制御方法、及び、命令実行制御プログラムに関する。   The present invention relates to an instruction execution control device, an instruction execution control system, an instruction execution control method, and an instruction execution control program for performing order guarantee control between instructions in a computer having an overtaking function between instructions.

情報処理装置において、実効性能の向上は永年の課題である。実効性能を向上させるための手段の1つとして、メモリアクセス性能の向上がある。従来からプロセッサに、メモリロード命令とメモリストア命令との間での命令間の追い越し機能を実装して、メモリアクセス性能を向上させてきた。   In information processing apparatuses, improving effective performance has been a long-standing issue. One means for improving effective performance is to improve memory access performance. Conventionally, a processor has been provided with an overtaking function between a memory load instruction and a memory store instruction to improve memory access performance.

命令間の追い越し機能の実現においては、実行結果が不正にならないように、例えば、同一アドレスに対するストア命令とロード命令の間など、命令間で順序保障制御を行う必要がある。   In order to realize the overtaking function between instructions, it is necessary to perform order guarantee control between instructions, for example, between a store instruction and a load instruction for the same address so that the execution result does not become incorrect.

このような、命令間の追い越し機能を備えた情報処理装置における順序保障制御の関連技術として、特許文献1には、複数のベクトルストア命令と後続のベクトルロード命令のアドレスの依存関係のチェックを1つのアドレス比較論理で時分割に実行する装置が公開されている。この装置は、ベクトル命令のアドレス、ディスタンス、要素数情報から、メモリアクセス要素に展開する展開処理と、アドレス比較論理でのアドレス比較処理とを並行して実行して、ベクトル命令間追い越し可否判定を実行する。   As a related technique of order guarantee control in such an information processing apparatus having an overtaking function between instructions, Patent Document 1 discloses a check of the dependency relationship between addresses of a plurality of vector store instructions and subsequent vector load instructions. A device that performs time division using two address comparison logics is disclosed. This device executes the expansion processing to expand to the memory access element from the address, distance, and element number information of the vector instruction and the address comparison processing by the address comparison logic in parallel to determine whether or not the vector instruction can be overtaken. Run.

また、特許文献2には、マルチプロセッサコンピューティングシステムのメモリ整合性挙動をエミュレートするための方法において、メモリアクションの前にメモリバリア命令を実行する方法が公開されている。この方法では、メモリバリア命令の前に実行されたメモリアクションが全てのプロセッサによって登録されていることを保障し、メモリバリア命令が、メモリバリア命令後のメモリアクションが上述で登録された全てのメモリアクションの後で実行されることを、保障している。   Patent Document 2 discloses a method for executing a memory barrier instruction before a memory action in a method for emulating the memory consistency behavior of a multiprocessor computing system. In this method, it is ensured that the memory action executed before the memory barrier instruction is registered by all the processors, and the memory barrier instruction is registered in all the memories in which the memory action after the memory barrier instruction is registered as described above. Ensuring that it is implemented after the action.

特開2010-198439号公報JP 2010-198439 特開2004-110811号公報JP 2004-110811 A

例えば、ベクトル計算機におけるリストベクトルによるメモリアクセス命令は、規則性の無いアドレスに対して一度に複数のアクセスを行う。この場合、特許文献1のようなアドレス比較を行うためには、装置は一度に大量のアドレス比較を行う必要があり、限られたハードウェア量で時分割でアドレス比較を行うと、アドレス比較の処理に時間がかかるという問題がある。   For example, a memory access instruction using a list vector in a vector computer makes a plurality of accesses to an address having no regularity at a time. In this case, in order to perform the address comparison as in Patent Document 1, the apparatus needs to perform a large amount of address comparison at a time. If the address comparison is performed in a time-sharing manner with a limited amount of hardware, the address comparison is performed. There is a problem that processing takes time.

特許文献2のようにメモリバリア命令により順序保障制御を行うようにすれば、上述のようなアドレス比較の処理に時間がかかるという問題は回避できる。しかしながら、特許文献2は、メモリバリア命令を跨ぐ個別の命令間で、具体的にどのように順序保障制御を実現するかの詳細な技術については言及していない。   If the order guarantee control is performed by the memory barrier instruction as in Patent Document 2, the problem that the address comparison process as described above takes time can be avoided. However, Patent Document 2 does not mention a detailed technique on how to implement order guarantee control specifically between individual instructions straddling memory barrier instructions.

本願発明の目的は、上述の課題を解決した命令実行制御装置、命令実行制御システム、命令実行制御方法、及び、命令実行制御プログラムを提供することである。   An object of the present invention is to provide an instruction execution control device, an instruction execution control system, an instruction execution control method, and an instruction execution control program that solve the above-described problems.

本願発明の一実施形態の命令実行制御装置は、命令発行装置から受信された命令であって、実行が保留されているものを記憶する記憶手段と、前記命令を受信した順序以外の順序で実行する手段であって、前記命令発行装置からバリア命令を受信すると、当該バリア命令受信前から前記記憶手段に記憶されていた第一の前記命令の実行が開始するまで、当該バリア命令の後に受信した第二の前記命令の実行を、前記第一、及び、前記第二の前記命令の命令種別が所定の組み合わせである場合に保留する実行手段と、を備える。   An instruction execution control device according to an embodiment of the present invention includes a storage unit that stores instructions received from an instruction issuing device and whose execution is suspended, and executes in an order other than the order in which the instructions are received. When the barrier command is received from the command issuing device, the command is received after the barrier command until the execution of the first command stored in the storage unit is started before the barrier command is received. Execution means for suspending execution of the second instruction when the instruction types of the first and second instructions are a predetermined combination.

本願発明の一実施形態の命令実行制御方法は、命令発行装置から受信された命令であって、実行が保留されているものを記憶域に記憶し、前記命令を受信した順序以外の順序で実行する際に、前記命令発行装置からバリア命令を受信すると、当該バリア命令受信前から前記記憶域に記憶されていた第一の前記命令の実行が開始するまで、当該バリア命令の後に受信した第二の前記命令の実行を、前記第一、及び、前記第二の前記命令の命令種別が所定の組み合わせである場合に保留する。   An instruction execution control method according to an embodiment of the present invention stores an instruction received from an instruction issuing device and whose execution is suspended in a storage area, and executes the instructions in an order other than the order received. When receiving the barrier command from the command issuing device, the second received after the barrier command until the execution of the first command stored in the storage area is started before the barrier command is received. Is suspended when the instruction types of the first and second instructions are a predetermined combination.

本願発明の一実施形態の命令実行制御プログラムは、命令発行装置から受信された命令であって、実行が保留されているものを記憶域に記憶する記憶処理と、前記命令を受信した順序以外の順序で実行する処理であって、前記命令発行装置からバリア命令を受信すると、当該バリア命令受信前から前記記憶域に記憶されていた第一の前記命令の実行が開始するまで、当該バリア命令の後に受信した第二の前記命令の実行を、前記第一、及び、前記第二の前記命令の命令種別が所定の組み合わせである場合に保留する実行処理と、をコンピュータに実行させる。   An instruction execution control program according to an embodiment of the present invention includes a storage process for storing instructions received from an instruction issuing device whose execution is suspended in a storage area, and a sequence other than the order in which the instructions are received. When the barrier instruction is received from the instruction issuing device, the execution of the first instruction stored in the storage area from before the reception of the barrier instruction is started. The computer causes the computer to execute execution processing of the second instruction received later when the instruction types of the first and second instructions are a predetermined combination.

本願発明は、命令間の追い越し機能を備えた情報処理装置において、命令間の順序保障制御を限られたハードウェア量で行う場合の処理時間を短くすることを可能とする。   The present invention makes it possible to shorten the processing time in the case of performing order guarantee control between instructions with a limited amount of hardware in an information processing apparatus having an overtaking function between instructions.

本願発明の第1の実施形態の命令実行制御システムの構成を示すブロック図である。It is a block diagram which shows the structure of the instruction execution control system of 1st Embodiment of this invention. 本願発明の第1の実施形態における記憶部のエントリ内のバリア前フラグと追い越し禁止フラグの設定動作を示すフローチャートである。It is a flowchart which shows the setting operation | movement of the pre-barrier flag and overtaking prohibition flag in the entry of the memory | storage part in 1st Embodiment of this invention. 本願発明の第1の実施形態における記憶部のエントリに格納された命令の命令実行動作を示すフローチャートである。It is a flowchart which shows the command execution operation | movement of the command stored in the entry of the memory | storage part in 1st Embodiment of this invention. 本願発明の第2の実施形態の命令実行制御システムの構成を示すブロック図である。It is a block diagram which shows the structure of the instruction execution control system of 2nd Embodiment of this invention. 本願発明の第2の実施形態における記憶部への命令情報格納動作と切り替えフラグの設定動作を示すフローチャートである。It is a flowchart which shows the instruction information storage operation | movement to the memory | storage part in the 2nd Embodiment of this invention, and the setting operation | movement of a switching flag. 本願発明の第2の実施形態における記憶部に格納された命令の命令実行動作を示すフローチャートである。It is a flowchart which shows the instruction execution operation | movement of the instruction | command stored in the memory | storage part in 2nd Embodiment of this invention. 本願発明の第3の実施形態の命令実行制御装置の構成を示すブロック図である。It is a block diagram which shows the structure of the instruction execution control apparatus of the 3rd Embodiment of this invention.

本願発明の第1の実施の形態について図面を参照して詳細に説明する。   A first embodiment of the present invention will be described in detail with reference to the drawings.

図1は本実施形態の命令実行制御システム1の構成を示すブロック図である。   FIG. 1 is a block diagram showing a configuration of an instruction execution control system 1 of the present embodiment.

本実施形態の命令実行制御システム1は、命令実行制御装置10と、命令発行装置20と、を包含している。命令発行装置20は、命令実行制御システム1が実行する命令を発行して、命令実行制御装置10へ送信する。   The instruction execution control system 1 of this embodiment includes an instruction execution control device 10 and an instruction issue device 20. The instruction issuing device 20 issues an instruction to be executed by the instruction execution control system 1 and transmits it to the instruction execution control device 10.

命令実行制御装置10は、設定部11と、実行部12と、記憶部13と、を包含している。設定部11、及び、実行部12は、電子回路である場合もあれば、コンピュータプログラムである場合もある。記憶部13は、電子回路あるいはコンピュータプログラムによりアクセス制御が行われる電子メモリ等の記憶装置である。尚、命令実行制御システム1は、全て、プロセッサコア内に実装される場合もある。   The instruction execution control device 10 includes a setting unit 11, an execution unit 12, and a storage unit 13. The setting unit 11 and the execution unit 12 may be electronic circuits or computer programs. The storage unit 13 is a storage device such as an electronic memory in which access control is performed by an electronic circuit or a computer program. Note that the instruction execution control system 1 may all be mounted in the processor core.

記憶部13は、実行待ち状態にある命令を格納する3個のエントリ130−1乃至130−3を包含している。記憶部13が包含するエントリの数は、3個に限定されるわけではない。エントリ130−1乃至130−3は、それぞれ、命令情報131−1乃至131−3と、バリア前フラグ132−1乃至132−3と、追い越し禁止フラグ133−1乃至133−3と、追い越し禁止フラグ134−1乃至134−3と、を包含している。   The storage unit 13 includes three entries 130-1 to 130-3 for storing instructions that are waiting to be executed. The number of entries included in the storage unit 13 is not limited to three. The entries 130-1 to 130-3 respectively include instruction information 131-1 to 131-3, pre-barrier flags 132-1 to 132-3, an overtaking prohibition flag 133-1 to 133-3, and an overtaking prohibition flag. 134-1 to 134-3.

命令情報131−1乃至131−3は、命令発行装置20から発行された後、命令実行待ちの状態にある命令の、命令コード等の命令情報である。命令発行装置20から発行された命令の命令情報は、実行部12により、エントリ130−1乃至130−3におけるいずれかの空きエントリに格納され、当該命令が実行されるまで、当該エントリに記憶される。命令発行装置20から発行された命令が、実行待ちになる要因としては、システム内の資源に対するアクセス権の獲得待ちや、他の命令との同期等がある。   The command information 131-1 to 131-3 is command information such as a command code of a command that has been issued from the command issuing device 20 and is waiting for command execution. The instruction information of the instruction issued from the instruction issuing device 20 is stored in any empty entry in the entries 130-1 to 130-3 by the execution unit 12, and is stored in the entry until the instruction is executed. The Factors that cause an instruction issued from the instruction issuing device 20 to wait for execution include waiting for acquisition of access rights to resources in the system, synchronization with other instructions, and the like.

バリア前フラグ132−1乃至132−3は、それぞれ、エントリ130−1乃至130−3に格納された命令が、バリア命令前に発行されたことを示すフラグである。   The pre-barrier flags 132-1 to 132-3 are flags indicating that the instructions stored in the entries 130-1 to 130-3 are issued before the barrier instruction, respectively.

追い越し禁止フラグ133−1乃至133−3、及び、追い越し禁止フラグ134−1乃至134−3は、それぞれ、エントリ130−1乃至130−3に格納された命令が、バリア命令前に発行された命令を追い越して実行できないことを示すフラグである。   The overtaking prohibition flags 133-1 to 133-3 and the overtaking prohibition flags 134-1 to 134-3 are instructions issued by the instructions stored in the entries 130-1 to 130-3, respectively, before the barrier instruction. Is a flag indicating that execution cannot be performed by overtaking.

追い越し禁止フラグは、エントリ130−1乃至130−3の各々に、2個ずつ備えられている。追い越し禁止フラグ133−1は、エントリ130−1に格納された命令が、バリア命令前に発行されたエントリ130−2に格納された命令を追い越すことができないことを示すフラグである。追い越し禁止フラグ134−1は、エントリ130−1に格納された命令が、バリア命令前に発行されたエントリ130−3に格納された命令を追い越すことができないことを示すフラグである。   Two overtaking prohibition flags are provided for each of the entries 130-1 to 130-3. The overtaking prohibition flag 133-1 is a flag indicating that the instruction stored in the entry 130-1 cannot overtake the instruction stored in the entry 130-2 issued before the barrier instruction. The overtaking prohibition flag 134-1 is a flag indicating that the instruction stored in the entry 130-1 cannot overtake the instruction stored in the entry 130-3 issued before the barrier instruction.

同様に、追い越し禁止フラグ133−2乃至134−2は、それぞれ、エントリ130−2に格納された命令が、バリア命令前に発行された、エントリ130−1、及び、エントリ130−3に格納された命令を追い越すことができないことを示すフラグである。追い越し禁止フラグ133−3乃至134−3は、それぞれ、エントリ130−3に格納された命令が、バリア命令前に発行された、エントリ130−1、及び、エントリ130−2に格納された命令を追い越すことができないことを示すフラグである。   Similarly, the overtaking prohibition flags 133-2 to 134-2 are respectively stored in the entry 130-1 and the entry 130-3 in which the instruction stored in the entry 130-2 is issued before the barrier instruction. This flag indicates that the command cannot be overtaken. The overtaking prohibition flags 133-3 to 134-3 indicate the instructions stored in the entry 130-1 and the entry 130-2 issued by the instruction stored in the entry 130-3 before the barrier instruction. This flag indicates that it cannot be overtaken.

設定部11は、命令発行装置2からバリア命令を受信すると、エントリ130−1乃至130−3の中で、命令情報が登録されているものが存在するかどうか確認する。設定部11は、命令情報が登録されているエントリが存在する場合、命令情報が登録されている全てのエントリにおけるバリア前フラグを1に設定する。   When the setting unit 11 receives a barrier command from the command issuing device 2, the setting unit 11 checks whether any of the entries 130-1 to 130-3 has registered command information. When there is an entry in which instruction information is registered, the setting unit 11 sets the pre-barrier flag to 1 in all entries in which instruction information is registered.

設定部11は、命令発行装置20から発行されたバリア命令を除く命令が、エントリ130−1乃至130−3の何れかの空きエントリに実行待ちの命令として格納されると、当該エントリ以外のエントリのバリア前フラグの値を確認する。   When an instruction other than the barrier instruction issued from the instruction issuing device 20 is stored as an instruction waiting for execution in any empty entry of the entries 130-1 to 130-3, the setting unit 11 Check the value of the pre-barrier flag.

例えば、実行待ちの命令がエントリ130−1に格納された場合、設定部11は、エントリ130−2乃至130−3におけるバリア前フラグ132−2乃至132−3の値を確認する。バリア前フラグ132−2が点灯している場合、設定部11は、命令情報131−1、及び、命令情報131−2の命令種別が、事前に登録された所定の組み合わせであるか否かを確認する。   For example, when an instruction waiting for execution is stored in the entry 130-1, the setting unit 11 checks the values of the pre-barrier flags 132-2 to 132-3 in the entries 130-2 to 130-3. When the pre-barrier flag 132-2 is turned on, the setting unit 11 determines whether or not the command information 131-1 and the command type of the command information 131-2 are a predetermined combination registered in advance. Check.

設定部11は、バリア命令により命令実行の順序保障制御を行う対象とする命令種別の組み合わせの情報を記憶している。例えば、命令実行制御装置10が、主記憶へのリストベクトルアクセス命令であるVGT(リストベクトル読み出し)命令とVSC(リストベクトル書き込み)命令についてのみバリア命令による順序保障制御を行う場合、設定部11は、バリア命令を跨ぐ命令の組み合わせとして、VGT−VSC、VSC−VGT、VSC−VSCの3通りの組み合わせを記憶している。尚、VGT−VGTの組み合わせについては、主記憶への書き込みが発生しないため、設定部11は、バリア命令による順序保障制御の対象外としている。   The setting unit 11 stores information on a combination of instruction types to be subjected to instruction execution order guarantee control using a barrier instruction. For example, when the instruction execution control device 10 performs the order guarantee control by the barrier instruction only for the VGT (list vector read) instruction and the VSC (list vector write) instruction which are list vector access instructions to the main memory, the setting unit 11 As combinations of instructions over the barrier instructions, three combinations of VGT-VSC, VSC-VGT, and VSC-VSC are stored. Note that since the VGT-VGT combination is not written to the main memory, the setting unit 11 is excluded from the order guarantee control by the barrier instruction.

命令実行制御装置10が、リストベクトルアクセス命令に限らず、主記憶アクセス系の命令全体について、バリア命令による順序保障制御を行う場合は、設定部11は、上述の場合よりも多くの命令種別の組み合わせを、バリア命令による順序保障制御を行う対象として記憶している。   When the instruction execution control device 10 performs the order guarantee control by the barrier instruction for all the instructions of the main memory access system as well as the list vector access instruction, the setting unit 11 has more instruction types than the above case. The combination is stored as an object to be subjected to the order guarantee control by the barrier instruction.

上述で、命令情報131−1、及び、命令情報131−2の命令種別が、事前に登録された所定の組み合わせである場合、設定部11は、追い越し禁止フラグ133−1を点灯させる。命令情報131−1、及び、命令情報131−2の命令種別が、事前に登録された所定の組み合わせではない場合、エントリ130−1に格納された命令は、バリア命令前に発行されたエントリ130−2に格納された命令を追い越すことが可能であるため、設定部11は、追い越し禁止フラグ133−1を点灯させない。   As described above, when the instruction types of the instruction information 131-1 and the instruction information 131-2 are a predetermined combination registered in advance, the setting unit 11 turns on the overtaking prohibition flag 133-1. When the instruction types of the instruction information 131-1 and the instruction information 131-2 are not a predetermined combination registered in advance, the instruction stored in the entry 130-1 is the entry 130 issued before the barrier instruction. Since the instruction stored in -2 can be overtaken, the setting unit 11 does not light the overtake prohibition flag 133-1.

設定部11は、エントリ130−1乃至130−3のいずれかに格納された命令が実行されると、追い越し禁止フラグ133−1乃至133−3、及び、134−1乃至134−3のうち、当該エントリに対応付けられたもので点灯しているものがあれば、当該追い越し禁止フラグをクリアする。例えば、エントリ130−1に格納された命令が実行された場合、設定部11は、追い越し禁止フラグ133−2、及び、追い越し禁止フラグ133−3のうちで点灯しているものがあれば、当該追い越し禁止フラグをクリアする。   When the instruction stored in any of the entries 130-1 to 130-3 is executed, the setting unit 11 includes the overtaking prohibition flags 133-1 to 133-3 and 134-1 to 134-3. If any of the items associated with the entry is lit, the overtaking prohibition flag is cleared. For example, when the instruction stored in the entry 130-1 is executed, the setting unit 11 determines that the overtaking prohibition flag 133-2 and the overtaking prohibition flag 133-3 are lit if any Clear the overtaking prohibition flag.

実行部12は、エントリ130−1乃至130−3の何れかに格納された命令が、実行可能な状態になっても、当該命令を格納したエントリ内の2つの追い越し禁止フラグのいずれかが点灯している場合、当該命令の実行を保留する。実行部12は、当該命令を格納したエントリ内の2つの追い越し禁止フラグの値が0になると当該命令を実行し、当該命令を実行したことを、設定部11、及び、記憶部13へ送信する。   Even if the instruction stored in one of the entries 130-1 to 130-3 becomes executable, one of the two overtaking prohibition flags in the entry storing the instruction is lit. If so, the execution of the instruction is suspended. The execution unit 12 executes the instruction when the values of the two overtaking prohibition flags in the entry storing the instruction become 0, and transmits the execution of the instruction to the setting unit 11 and the storage unit 13. .

記憶部13は、命令発行装置20から発行された命令の命令情報を、エントリ130−1乃至130−3の何れかの空きエントリに格納する。記憶部13は、実行部12から、命令を実行したことを受信すると、当該命令を格納していたエントリの命令情報とバリア前フラグをクリアし、当該エントリを未使用状態に設定する。   The storage unit 13 stores the instruction information of the instruction issued from the instruction issuing device 20 in any empty entry of the entries 130-1 to 130-3. When the storage unit 13 receives the execution of the instruction from the execution unit 12, the storage unit 13 clears the instruction information and the pre-barrier flag of the entry storing the instruction, and sets the entry to an unused state.

次に、図2のフローチャートを参照して、本実施形態のエントリ130−1乃至130−3における、バリア前フラグと追い越し禁止フラグの設定動作について詳細に説明する。   Next, the setting operation of the pre-barrier flag and the overtaking prohibition flag in the entries 130-1 to 130-3 of this embodiment will be described in detail with reference to the flowchart of FIG.

命令実行制御部10は、命令発行装置20から発行された命令を受信する(S101)。受信した命令がバリア命令の場合(S102でYes)、設定部11は、記憶部13におけるエントリ130−1乃至130−3の中で、命令情報が登録されているものが存在するか確認する(S103)。   The instruction execution control unit 10 receives an instruction issued from the instruction issuing device 20 (S101). When the received command is a barrier command (Yes in S102), the setting unit 11 checks whether any of the entries 130-1 to 130-3 in the storage unit 13 in which command information is registered exists ( S103).

命令情報が登録されているエントリが存在しない場合(S104でNo)、全体の処理は終了する。命令情報が登録されているエントリが存在する場合(S104でYes)、設定部11は、命令情報が登録されているエントリ130−x(xは1乃至3の整数。ただし1つとは限らない)のバリア前フラグ132−xを1に設定し、全体の処理は終了する。   If there is no entry in which the command information is registered (No in S104), the entire process ends. When there is an entry in which the instruction information is registered (Yes in S104), the setting unit 11 registers the entry 130-x in which the instruction information is registered (x is an integer of 1 to 3, but is not limited to one). The pre-barrier flag 132-x is set to 1, and the entire process ends.

S102において、受信した命令がバリア命令でない場合(S102でNo)、記憶部13は、受信した命令の命令情報を、未使用エントリ130−i(iは1乃至3のいずれかの整数)に、命令情報131−iとして格納する(S106)。設定部11は、記憶部13におけるエントリ130−iを除くエントリ130−1乃至130−3の中で、バリア前フラグ133−1乃至133−nが1であるものが存在するか確認する(S107)。   In S102, when the received command is not a barrier command (No in S102), the storage unit 13 sets the command information of the received command to the unused entry 130-i (i is an integer from 1 to 3). Stored as instruction information 131-i (S106). The setting unit 11 checks whether any of the entries 130-1 to 130-3 except the entry 130-i in the storage unit 13 has the pre-barrier flags 133-1 to 133-n being 1 (S107). ).

バリア前フラグが1であるものが存在しない場合(S108でNo)、全体の処理は終了する。バリア前フラグが1であるものが存在する場合(S108でYes)、設定部11は、バリア前フラグが1であるエントリ130−y(yはiを除く1乃至3の整数。ただし1つとは限らない)の命令情報131−yと、エントリ130−iの命令情報131−iが、所定の組み合わせの命令種別であるか確認する(S109)。   If no pre-barrier flag is 1 (No in S108), the entire process ends. If there is a flag with a pre-barrier flag of 1 (Yes in S108), the setting unit 11 enters an entry 130-y with a pre-barrier flag of 1 (y is an integer from 1 to 3 excluding i. It is confirmed whether the instruction information 131-y (not limited) and the instruction information 131-i of the entry 130-i are of a predetermined combination of instruction types (S109).

命令情報131−yと命令情報131−iが所定の組み合わせの命令種別でない場合(S110でNo)、全体の処理は終了する。命令情報131−yと命令情報131−iが所定の組み合わせの命令種別である場合(S110でYes)、設定部11は、エントリ130−iにおける、追い越し禁止フラグ133−i乃至134−iのうち、エントリ130−yに対応するものを1に設定し(S111)、全体の処理は終了する。   When the instruction information 131-y and the instruction information 131-i are not a predetermined combination of instruction types (No in S110), the entire process ends. When the instruction information 131-y and the instruction information 131-i are a predetermined combination of instruction types (Yes in S110), the setting unit 11 includes the overtaking prohibition flags 133-i to 134-i in the entry 130-i. , The entry corresponding to the entry 130-y is set to 1 (S111), and the entire process is terminated.

次に、図3のフローチャートを参照して、本実施形態のエントリ130−1乃至130−3に格納された命令の命令実行動作について詳細に説明する。   Next, the instruction execution operation of the instructions stored in the entries 130-1 to 130-3 of this embodiment will be described in detail with reference to the flowchart of FIG.

実行部12は、エントリ130−j(jは1乃至3のいずれかの整数)の追い越し禁止フラグ133−j乃至134−jが、いずれも0であるか確認する(S201)。追い越し禁止フラグ133−j乃至134−jのうち、少なくともいずれかが0でない場合(S202でNo)、実行部12は、エントリ130−jに格納されている命令の実行を保留し(S203)、全体の処理は終了する。   The execution unit 12 checks whether the overtaking prohibition flags 133-j to 134-j of the entry 130-j (j is an integer from 1 to 3) are all 0 (S201). When at least one of the overtaking prohibition flags 133-j to 134-j is not 0 (No in S202), the execution unit 12 suspends execution of the instruction stored in the entry 130-j (S203). The entire process ends.

追い越し禁止フラグ133−j乃至134−jが、いずれも0である場合(S202でYes)、実行部12は、エントリ130−jに命令情報131−jが格納されている命令が、実行可能の状態にあるか確認する(S204)。当該命令が実行可能でない場合(S205でNo)、処理はS203へ進む。当該命令が実行可能である場合(S205でYes)、実行部12は、エントリ130−jに格納されていた命令を実行し、当該命令を実行したことを記憶部13、及び設定部11へ送信する(S206)。   When the overtaking prohibition flags 133-j to 134-j are all 0 (Yes in S202), the execution unit 12 can execute the instruction whose instruction information 131-j is stored in the entry 130-j. Whether it is in a state is confirmed (S204). If the instruction is not executable (No in S205), the process proceeds to S203. When the instruction can be executed (Yes in S205), the execution unit 12 executes the instruction stored in the entry 130-j and transmits the execution of the instruction to the storage unit 13 and the setting unit 11. (S206).

記憶部13は、エントリ130−jの命令情報131−jとバリア前フラグ132−jの情報をクリアし、エントリ130−jを未使用状態に設定する(S207)。設定部13は、エントリ130−jを除くエントリ130−1乃至130−3における、追い越し禁止フラグ133−1乃至133−3、及び、134−1乃至1343のうち、エントリ130−jに対応したものをクリアし(S208)、全体の処理は終了する。   The storage unit 13 clears the instruction information 131-j and the pre-barrier flag 132-j information of the entry 130-j, and sets the entry 130-j to an unused state (S207). The setting unit 13 corresponds to the entry 130-j among the overtaking prohibition flags 133-1 to 133-3 and 134-1 to 1343 in the entries 130-1 to 130-3 except the entry 130-j. Is cleared (S208), and the entire process ends.

本実施形態には、命令間の追い越し機能を備えたシステムにおいて、命令間の順序保障制御を限られたハードウェア量で行う場合に処理時間を短くし、また、実装するハードウェア量を少なくする効果がある。その理由は、設定部11が、バリア命令の受信により、各エントリのバリア前フラグを点灯させ、バリア命令後に発行されてエントリに格納された命令が、バリア命令前の先行命令を追いこすことができない場合、バリア前フラグの点灯状態をもとに、当該命令に対応する追い越し禁止フラグを点灯させ、実行部12が、当該命令の実行を、追い越し禁止フラグが消灯するまで保留するからである。命令実行制御装置10は、上述の動作により、命令間の順序保障を実現する。   In this embodiment, in a system having an overtaking function between instructions, the processing time is shortened and the amount of hardware to be mounted is reduced when order guarantee control between instructions is performed with a limited amount of hardware. effective. The reason is that the setting unit 11 turns on the pre-barrier flag of each entry upon receipt of the barrier instruction, and the instruction issued after the barrier instruction and stored in the entry cannot track the preceding instruction before the barrier instruction. This is because, based on the lighting state of the pre-barrier flag, the overtaking prohibition flag corresponding to the command is turned on, and the execution unit 12 suspends execution of the command until the overtaking prohibition flag is turned off. The instruction execution control device 10 realizes order guarantee between instructions by the above-described operation.

命令間の追い越し機能を備えたシステムにおいて、同一アドレスへアクセスする命令間で順序保障制御を行う場合、順序保障の対象となる各命令のアクセスアドレスを比較する必要がある。この方式のシステムの場合、例えば、ベクトル計算機におけるリストベクトルによるメモリアクセス命令では、規則性の無いアドレスに対して一度に複数のアドレス比較を行わなければならないため、大規模なアドレス比較回路を実装する必要が生じ、コスト等の問題から、順序保障制御の実現が困難である。   In a system having an overtaking function between instructions, when order guarantee control is performed between instructions that access the same address, it is necessary to compare the access addresses of the instructions to be subject to order guarantee. In the case of this type of system, for example, in a memory access instruction using a list vector in a vector computer, a plurality of address comparisons must be performed at once on an address having no regularity, so a large-scale address comparison circuit is implemented. It becomes necessary, and it is difficult to realize order guarantee control due to problems such as cost.

本実施形態では、命令実行制御装置10が、バリア命令を利用して命令間での順序保障制御を行うため、上述のようなアドレス比較を行う必要がなく、リストベクトルによるメモリアクセス命令であっても、短い処理時間で、命令間での順序保障制御を行うことが可能となる。   In this embodiment, since the instruction execution control device 10 performs order guarantee control between instructions using a barrier instruction, it is not necessary to perform the address comparison as described above, and the memory access instruction is a list vector. However, it is possible to perform order guarantee control between instructions in a short processing time.

また、本実施形態では、設定部11は、バリア命令を跨ぐ命令の種別の組み合わせが、所定の組み合わせのときのみ、追い越し禁止フラグを点灯させ、所定の組み合わせ以外の場合は、追い越し禁止フラグを点灯させずに、バリア命令を跨いでの追い越しを許可することで、システム性能の低下を回避する効果もある。
<第2の実施形態>
次に、本願発明の第2の実施形態について図面を参照して詳細に説明する。
Further, in the present embodiment, the setting unit 11 lights the overtaking prohibition flag only when the combination of instruction types across the barrier instructions is a predetermined combination, and lights the overtaking prohibition flag when the combination is not a predetermined combination. In addition, by allowing overtaking across barrier instructions, there is also an effect of avoiding system performance degradation.
<Second Embodiment>
Next, a second embodiment of the present invention will be described in detail with reference to the drawings.

図4は本願発明の第2の実施形態の命令実行制御システム1の構成を示すブロック図である。本実施形態の命令実行制御装置1は、第1の実施形態と同様に、命令実行制御装置10と、命令発行装置20と、を包含している。   FIG. 4 is a block diagram showing the configuration of the instruction execution control system 1 according to the second embodiment of the present invention. The instruction execution control device 1 of this embodiment includes an instruction execution control device 10 and an instruction issue device 20 as in the first embodiment.

命令実行制御装置10は、実行部12と、記憶部13と、切り替えフラグ14と、を包含している。実行部12は、電子回路である場合もあれば、コンピュータプログラムである場合もある。記憶部13は、電子回路あるいはコンピュータプログラムによりアクセス制御が行われる電子メモリ等の記憶装置である。切り替えフラグ14は、電子回路あるいはコンピュータプログラムにより値が設定されるレジスタ等の回路である。   The instruction execution control device 10 includes an execution unit 12, a storage unit 13, and a switching flag 14. The execution unit 12 may be an electronic circuit or a computer program. The storage unit 13 is a storage device such as an electronic memory in which access control is performed by an electronic circuit or a computer program. The switching flag 14 is a circuit such as a register whose value is set by an electronic circuit or a computer program.

記憶部13は、バッファ15乃至16を包含している。バッファ15乃至16は、ぞれぞれ、1つ以上の命令情報150乃至160を包含している。命令情報150乃至160は、命令発行装置20から発行され、実行待ちの状態にある命令の命令情報である。   The storage unit 13 includes buffers 15 to 16. Each of the buffers 15 to 16 includes one or more instruction information 150 to 160. The command information 150 to 160 is command information of commands issued from the command issuing device 20 and waiting for execution.

記憶部13は、命令発行装置20から、バリア命令を除く命令を受信すると、切り替えフラグ14の値を参照する。記憶部13は、切り替えフラグ14の値が0の場合は、当該命令の命令情報を、命令情報150としてバッファ15に格納し、切り替えフラグ14の値が1の場合は、当該命令の命令情報を、命令情報160としてバッファ16に格納する。   When the storage unit 13 receives an instruction excluding the barrier instruction from the instruction issuing device 20, the storage unit 13 refers to the value of the switching flag 14. When the value of the switching flag 14 is 0, the storage unit 13 stores the instruction information of the instruction in the buffer 15 as the instruction information 150. When the value of the switching flag 14 is 1, the storage unit 13 stores the instruction information of the instruction. The instruction information 160 is stored in the buffer 16.

記憶部13は、切り替えフラグ14の値が変更され、命令情報を格納するバッファを切り替えたときに、切り替え先のバッファに、まだ実行待ちの命令の命令情報が残っている場合は、切り替え先のバッファから全ての実行待ちの命令がなくなるまで、命令情報の格納動作を保留する。   When the value of the switching flag 14 is changed and the buffer for storing the instruction information is switched, the storage unit 13 changes the switching destination buffer if the instruction information of the instruction waiting for execution remains in the switching destination buffer. The instruction information storage operation is deferred until there are no more instructions waiting to be executed from the buffer.

記憶部13は、バッファ15、あるいはバッファ16に格納された命令が、実行部12により実行されると、当該命令の命令情報を、バッファ15、あるいはバッファ16から削除する。   When an instruction stored in the buffer 15 or the buffer 16 is executed by the execution unit 12, the storage unit 13 deletes the instruction information of the instruction from the buffer 15 or the buffer 16.

切り替えフラグ14は、命令発行装置20からバリア命令を受信すると、値が0のときは1へ、値が1のときは0へ、値を更新する。   When the barrier flag is received from the instruction issuing device 20, the switching flag 14 updates the value to 1 when the value is 0 and to 0 when the value is 1.

実行部12は、切り替えフラグ14の値を確認し、切り替えフラグ14の値が0である場合、バリア命令前に発行された命令を格納しているバッファ16の中に、実行可能な状態の命令があるか確認する。実行部12は、同様に、切り替えフラグ14の値が1である場合、バッファ15の中に、実行可能な状態の命令があるか確認する。   The execution unit 12 confirms the value of the switching flag 14, and when the value of the switching flag 14 is 0, the instruction in an executable state is stored in the buffer 16 storing the instruction issued before the barrier instruction. Check if there is. Similarly, when the value of the switching flag 14 is 1, the execution unit 12 checks whether there is an executable instruction in the buffer 15.

実行部12は、上述の確認で、実行可能な状態の命令が存在する場合、当該命令を実行して、当該命令を実行したことを記憶部13へ送信する。実行部12は、上述の確認で、実行可能な状態の命令が存在しない場合、もう片方のバッファに実行可能な命令が存在するか確認する。   When there is an executable instruction in the above confirmation, the execution unit 12 executes the instruction and transmits the execution of the instruction to the storage unit 13. If there is no executable instruction, the execution unit 12 checks whether there is an executable instruction in the other buffer.

実行部12は、もう片方のバッファに実行可能な命令が存在する場合、当該命令の命令種別と、当該命令を格納したバッファでない方のバッファに格納された何れかの命令の命令種別の組み合わせが、所定の組み合わせの命令種別に該当するか確認する。   When there is an executable instruction in the other buffer, the execution unit 12 has a combination of the instruction type of the instruction and the instruction type of any instruction stored in the non-buffer storing the instruction. Confirm whether it corresponds to the instruction type of a predetermined combination.

実行部12は、所定の組み合わせの命令種別に該当するものが存在する場合、当該命令の実行を保留する。実行部12は、所定の組み合わせの命令種別に該当するものが存在しない場合は、当該命令を実行する。   The execution unit 12 suspends execution of the instruction when there is an instruction type corresponding to a predetermined combination of instruction types. If there is no instruction corresponding to the predetermined combination of instruction types, the execution unit 12 executes the instruction.

次に、図5のフローチャートを参照して、本実施形態の記憶部13への命令情報格納動作と切り替えフラグの設定動作について詳細に説明する。   Next, with reference to the flowchart of FIG. 5, the operation of storing the instruction information in the storage unit 13 and the operation of setting the switching flag according to the present embodiment will be described in detail.

命令実行制御装置10は、命令発行装置20から発行された命令を受信する(S301)。受信した命令がバリア命令である場合(S302でYes)、切り替えフラグ14は、値を0から1、あるいは1から0へ更新する(S306)。記憶部13は、切り替えフラグ14が示すバッファが空であるかどうか確認する(S307)。   The instruction execution control device 10 receives the instruction issued from the instruction issuing device 20 (S301). When the received command is a barrier command (Yes in S302), the switching flag 14 updates the value from 0 to 1, or from 1 to 0 (S306). The storage unit 13 checks whether or not the buffer indicated by the switching flag 14 is empty (S307).

切り替えフラグ14が示すバッファが空である場合(S308でYes)、全体の処理は終了する。切り替えフラグ14が示すバッファが空でない場合(S308でNo)、記憶部13は、切り替えフラグが示すバッファへの命令情報格納動作を保留し(S309)、処理はS308へ戻る。   When the buffer indicated by the switching flag 14 is empty (Yes in S308), the entire process ends. When the buffer indicated by the switching flag 14 is not empty (No in S308), the storage unit 13 suspends the instruction information storing operation in the buffer indicated by the switching flag (S309), and the process returns to S308.

受信した命令がバリア命令でない場合(S302でNo)、切り替えフラグ14の値が0
の場合(S303でYes)、記憶部13は、受信した命令の命令情報を、命令情報150としてバッファ15に格納し(S304)、全体の処理は終了する。切り替えフラグ14の値が1の場合(S303でNo)、記憶部13は、受信した命令の命令情報を、命令情報160としてバッファ16に格納し(S305)、全体の処理は終了する。
If the received command is not a barrier command (No in S302), the value of the switching flag 14 is 0.
In this case (Yes in S303), the storage unit 13 stores the instruction information of the received instruction in the buffer 15 as the instruction information 150 (S304), and the entire process ends. When the value of the switching flag 14 is 1 (No in S303), the storage unit 13 stores the instruction information of the received instruction in the buffer 16 as the instruction information 160 (S305), and the entire process ends.

次に、図6のフローチャートを参照して、本実施形態の記憶部13に格納された命令の命令実行動作について詳細に説明する。   Next, the instruction execution operation of the instructions stored in the storage unit 13 of this embodiment will be described in detail with reference to the flowchart of FIG.

実行部12は、切り替えフラグ14の値を確認する(S401)。切り替えフラグ14の値が0の場合(S402でYes)、実行部12は、バッファ16内に格納された命令で、実行可能な状態にあるものがあるか確認する(S403)。切り替えフラグ14の値が1の場合(S402でNo)、実行部12は、バッファ15内に格納された命令で、実行可能な状態にあるものがあるか確認する(S405)。   The execution unit 12 checks the value of the switching flag 14 (S401). When the value of the switching flag 14 is 0 (Yes in S402), the execution unit 12 checks whether there is an instruction that can be executed among the instructions stored in the buffer 16 (S403). When the value of the switching flag 14 is 1 (No in S402), the execution unit 12 confirms whether there is an instruction that is executable in the instructions stored in the buffer 15 (S405).

バッファ16に、実行可能な状態の命令が存在する場合(S404でYes)、あるいは、バッファ15に、実行可能な状態の命令が存在する場合(S406でYes)、実行部12は、実行可能な状態の命令を実行し、当該命令を実行したことを記憶部13へ送信する(S411)。   If there is an executable instruction in the buffer 16 (Yes in S404), or if there is an executable instruction in the buffer 15 (Yes in S406), the execution unit 12 is executable. The state instruction is executed, and the execution of the instruction is transmitted to the storage unit 13 (S411).

バッファ16に、実行可能な状態の命令が存在しない場合(S404でNo)、あるいは、バッファ15に、実行可能な状態の命令が存在しない場合(S406でNo)、実行部12は、もう片方のバッファに格納された命令で、実行可能な状態にあるものがあるか確認する(S407)。   When there is no executable instruction in the buffer 16 (No in S404), or when there is no executable instruction in the buffer 15 (No in S406), the execution unit 12 It is checked whether there are instructions stored in the buffer that are in an executable state (S407).

もう片方のバッファに、実行可能な状態の命令が存在しない場合(S408でNo)、全体の処理は終了する。もう片方のバッファに、実行可能な状態の命令が存在する場合(S408でYes)、実行部12は、実行可能な状態の命令の命令種別と、当該命令を格納したバッファでない方のバッファに格納された何れかの命令の命令種別の組み合わせが、所定の組み合わせの命令種別に該当するか確認する(S409)。   If there is no executable instruction in the other buffer (No in S408), the entire process ends. If there is an executable instruction in the other buffer (Yes in S408), the execution unit 12 stores the instruction type of the executable instruction and the non-buffer storing the instruction. It is confirmed whether the combination of the instruction types of any of the instructions that have been executed corresponds to the instruction type of the predetermined combination (S409).

所定の組み合わせの命令種別に該当するものが存在する場合(S410でYes)、実行部12は、実行可能な状態の命令の実行を保留し(S413)、全体の処理は終了する。所定の組み合わせの命令種別に該当するものが存在しない場合(S410でNo)、実行部12は、実行可能な状態の命令を実行し、当該命令を実行したことを記憶部13へ送信する(S411)。記憶部13は、実行した命令の命令情報を、バッファ15、あるいは、バッファ16から削除し(S412)、全体の処理は終了する。   If there is an instruction type corresponding to the predetermined combination of instructions (Yes in S410), the execution unit 12 suspends execution of the executable instruction (S413), and the entire process ends. If there is no instruction corresponding to the predetermined combination of instruction types (No in S410), the execution unit 12 executes an instruction in an executable state and transmits the execution of the instruction to the storage unit 13 (S411). ). The storage unit 13 deletes the instruction information of the executed instruction from the buffer 15 or the buffer 16 (S412), and the entire process ends.

本実施形態には、第1の実施形態と同様に、命令間の追い越し機能を備えたシステムにおいて、命令間の順序保障制御を限られたハードウェア量で行う場合に処理時間を短くし、また、実装するハードウェア量を少なくする効果がある。その理由は、切り替えフラグ14がバリア命令を受信して値が切り替わることで、記憶部13がバリア命令前後で命令情報を格納するバッファを切り替え、実行部12が、順序保障制御の対象とする命令に関して、バリア命令前の命令を格納している方のバッファに格納された命令の実行を開始するまで、もう片方のバッファに格納された命令の実行を保留するからである。命令実行制御装置10は、上述の動作により、命令間の順序保障を実現する。   In this embodiment, as in the first embodiment, in a system having an overtaking function between instructions, the processing time is shortened when the order guarantee control between instructions is performed with a limited amount of hardware. This has the effect of reducing the amount of hardware to be implemented. The reason is that the switching flag 14 receives the barrier instruction and the value is switched, so that the storage unit 13 switches the buffer for storing the instruction information before and after the barrier instruction, and the execution unit 12 is the instruction that is the target of the order guarantee control. This is because the execution of the instruction stored in the other buffer is suspended until the execution of the instruction stored in the buffer storing the instruction before the barrier instruction is started. The instruction execution control device 10 realizes order guarantee between instructions by the above-described operation.

本実施形態でも、第1の実施形態と同様に、命令実行制御装置10が、バリア命令を利用して命令間での順序保障制御を行うため、アドレス比較回路を実装する必要がなく、簡易なハードウェア構成で、命令間での順序保障制御を行うことが可能となる。   Also in the present embodiment, as in the first embodiment, the instruction execution control device 10 performs order guarantee control between instructions using a barrier instruction, so it is not necessary to mount an address comparison circuit, and simple With a hardware configuration, it is possible to perform order guarantee control between instructions.

尚、本実施形態では、1ビットの切り替えフラグ14により、記憶部13は、2つのバッファ150乃至160の切り替え制御を行っているが、2ビット以上の切り替えフラグ14により、3つ以上のバッファの切り替え制御を行ってもよい。その場合、比較的近いタイミングで複数のバリア命令が発行された場合であっても、命令実行制御装置10が、各バリア命令間を跨ぐ命令間での順序保障制御を行うことが可能となる。
<第3の実施形態>
次に、本願発明の第3の実施形態について図面を参照して詳細に説明する。
In the present embodiment, the storage unit 13 performs switching control of the two buffers 150 to 160 by the 1-bit switching flag 14. Switching control may be performed. In this case, even when a plurality of barrier instructions are issued at relatively close timings, the instruction execution control device 10 can perform order guarantee control between instructions straddling each barrier instruction.
<Third Embodiment>
Next, a third embodiment of the present invention will be described in detail with reference to the drawings.

図7は本願発明の第3の実施形態の命令実行制御装置10の構成を示すブロック図である。本実施形態の命令実行制御装置10は、実行部12と、記憶部13と、を包含している。   FIG. 7 is a block diagram showing the configuration of the instruction execution control apparatus 10 according to the third embodiment of the present invention. The instruction execution control device 10 of the present embodiment includes an execution unit 12 and a storage unit 13.

記憶部13は、命令発行装置20から受信された命令であって、実行が保留されているものを、命令情報131−1乃至131−nとして記憶する。   The storage unit 13 stores instructions received from the instruction issuing device 20 and whose execution is suspended as instruction information 131-1 to 131-n.

実行部12は、命令情報131−1乃至131−nの命令を、命令を受信した順序以外の順序で実行する。実行部12は、命令発行装置20からバリア命令を受信すると、当該バリア命令受信前から記憶部13に命令情報が記憶されていた、順序保障制御の対象となる全ての命令の実行を開始するまで、当該バリア命令の後に受信した命令の実行を、バリア命令前の命令、及び、バリア命令後の命令の命令種別が、所定の組み合わせである場合に保留する。   The execution unit 12 executes the instructions in the instruction information 131-1 to 131-n in an order other than the order in which the instructions are received. When the execution unit 12 receives a barrier command from the command issuing device 20, the execution unit 12 starts executing all commands that have been stored in the storage unit 13 before receiving the barrier command and are subject to order assurance control. The execution of the instruction received after the barrier instruction is suspended when the instruction type of the instruction before the barrier instruction and the instruction after the barrier instruction is a predetermined combination.

本実施形態には、第1、および、第2の実施形態と同様に、命令間の追い越し機能を備えたシステムにおいて、命令間の順序保障制御を限られたハードウェア量で行う場合に処理時間を短くし、また、実装するハードウェア量を少なくする効果がある。その理由は、実行部12が、命令発行装置20からバリア命令を受信すると、当該バリア命令受信前から記憶部13に命令情報が記憶されていた全て命令の実行を開始するまで、当該バリア命令の後に受信した命令の実行を保留するからである。命令実行制御装置10は、上述の動作により、命令間の順序保障を実現する。   In the present embodiment, as in the first and second embodiments, in a system having an overtaking function between instructions, the processing time when order guarantee control between instructions is performed with a limited amount of hardware. And the amount of hardware to be mounted is reduced. The reason is that when the execution unit 12 receives a barrier command from the command issuing device 20, the execution unit 12 starts executing all commands whose command information is stored in the storage unit 13 before receiving the barrier command. This is because execution of an instruction received later is suspended. The instruction execution control device 10 realizes order guarantee between instructions by the above-described operation.

以上、実施形態を参照して本願発明を説明したが、本願発明は上記実施形態に限定されたものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。   While the present invention has been described with reference to the embodiments, the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.

1 命令実行制御システム
10 命令実行制御装置
11 設定部
12 実行部
13 記憶部
130−1乃至130−3 エントリ
131−1乃至131−n 命令情報
132−1乃至132−3 バリア前フラグ
133−1乃至133−3 追い越し禁止フラグ
134−1乃至134−3 追い越し禁止フラグ
14 切り替えフラグ
15乃至16 バッファ
150乃至160 命令情報
20 命令発行装置
DESCRIPTION OF SYMBOLS 1 Instruction execution control system 10 Instruction execution control apparatus 11 Setting part 12 Execution part 13 Storage part 130-1 thru | or 130-3 Entry 131-1 thru | or 131-n Instruction information 132-1 thru | or 132-3 Pre-barrier flag 133-1 thru | or 133-3 Overtaking prohibition flag 134-1 to 134-3 Overtaking prohibition flag 14 Switching flag 15 to 16 Buffer 150 to 160 Instruction information 20 Instruction issuing device

Claims (10)

命令発行装置から受信された命令であって、実行が保留されている命令の命令情報を記憶する記憶域を複数備え、前記記憶域は、バリア命令を受信した場合に当該バリア命令を受信した時点で前記命令を記憶していた前記記憶域が特定可能である、記憶手段と、
前記記憶域に記憶された前記命令情報の前記命令を、前記命令受信された順序以外の順序で実行しうる手段であって、前記バリア命令の後に受信され前記命令である第二の命令の実行を、前記バリア命令の前に受信された前記命令である第一の命令で、かつ当該第二の命令の命令種別との組み合わせが所定の組み合わせであるような命令種別である前記第一の命令が、すべて実行されるまで、保留する実行手段と、
を備える命令実行制御装置。
Instructions received from the instruction issuing device , comprising a plurality of storage areas for storing instruction information of instructions whose execution is suspended, and the storage area receives the barrier instruction when receiving the barrier instruction Storage means capable of specifying the storage area storing the instructions in
It said instruction of said instruction information stored in the storage area, wherein the instructions comprising: means capable of out of the order has been received, the second instruction is the instruction that has been received after the barrier instruction Execution of the first instruction that is the first instruction that is the instruction received before the barrier instruction and the instruction type is such that the combination with the instruction type of the second instruction is a predetermined combination Execution means for holding until all the instructions are executed,
An instruction execution control device comprising:
実行待ちの前記命令の命令情報と、当該命令が前記バリア命令前に発行されたことを示すバリア前情報と、当該命令が前記バリア命令前に発行された前記命令を追い越すことができないことを示す追い越し禁止情報を対応付けて記憶するための前記記憶域であるエントリを複数備えた前記記憶手段と、
前記命令発行装置から前記バリア命令を受信したときに、前記命令の命令情報が格納されている前記エントリにおける前記バリア前情報を設定し、前記命令発行装置から前記バリア命令以外の前記第二の前記命令の命令情報が何れかの前記エントリに格納されたときに、当該エントリの前記命令種別と、前記バリア前情報が設定された、当該エントリを除くいずれかの前記エントリの、前記第一の前記命令の前記命令情報の前記命令種別が、前記所定の組み合わせである場合、当該エントリにおける前記追い越し禁止情報を、当該エントリを除く前記エントリに対応づけて設定する設定手段と、を備え、
前記実行手段は、前記エントリの前記追い越し禁止情報が設定されている場合、当該エントリに前記命令情報が格納された前記命令の実行を保留する、
請求項1の命令実行制御装置。
Instruction information of the instruction waiting to be executed, pre-barrier information indicating that the instruction has been issued before the barrier instruction, and indicates that the instruction cannot pass the instruction issued before the barrier instruction The storage means comprising a plurality of entries as the storage area for storing the overtaking prohibition information in association with each other;
When the barrier command is received from the command issuing device, the pre-barrier information is set in the entry in which the command information of the command is stored, and the second command other than the barrier command is set from the command issuing device. When the instruction information of an instruction is stored in any of the entries, the instruction type of the entry, and the pre-barrier information are set, and the first of the entries of any of the entries excluding the entry A setting means for setting the overtaking prohibition information in the entry in association with the entry excluding the entry when the instruction type of the instruction information of the instruction is the predetermined combination;
The execution means suspends execution of the instruction in which the instruction information is stored in the entry when the overtaking prohibition information of the entry is set.
The instruction execution control device according to claim 1.
前記命令発行装置から前記バリア命令を受信するたびに、2つの値を交互に切り替える切り替えフラグをさらに備え、
前記記憶手段は、前記切り替えフラグの値に対応付けられた、前記記憶域としての2つのバッファを備え、前記命令発行装置から受信した、前記バリア命令を除く実行待ちの前記命令の命令情報を、前記切り替えフラグの値が切り替わった後、前記切り替えフラグの値で特定される前記バッファが一旦空になった後に、当該バッファに記憶し、
前記実行手段は、前記切り替えフラグの値で特定される前記バッファとは異なる前記バッファに記憶されている前記第一の命令が存在する場合で、前記切り替えフラグの値で特定される前記バッファに記憶されている前記第二の前記命令の命令種別との組み合わせが、前記所定の組み合わせであるような命令種別である、前記第一の命令が存在するかを確認し、存在が確認された場合には、当該第二の命令の実行を保留する、
請求項1の命令実行制御装置。
A switching flag for alternately switching two values each time the barrier command is received from the command issuing device;
The storage means includes two buffers as the storage area associated with the value of the switching flag, and receives instruction information of the instruction waiting for execution excluding the barrier instruction received from the instruction issuing device. After the value of the switching flag is switched, the buffer specified by the value of the switching flag is once empty, and then stored in the buffer.
The execution means, in the case where said first instructions stored in different said buffer from said buffer identified by the value of the switching flag is present, stored in the buffer specified by the value of the switching flag The combination of the second instruction and the instruction type is an instruction type that is the predetermined combination, and confirms whether the first instruction exists, and if the existence is confirmed suspends the execution of the second instruction,
The instruction execution control device according to claim 1.
請求項1から3のいずれか一項に記載の命令実行制御装置と、前記命令発行装置とを包含する命令実行制御システム。 An instruction execution control system including the instruction execution control device according to claim 1 and the instruction issuing device. 命令発行装置から受信された命令であって、実行が保留されている命令の命令情報複数の記憶域により記憶し、前記記憶域は、バリア命令を受信した場合に当該バリア命令を受信した時点で前記命令を記憶していた前記記憶域が特定可能であり、
前記記憶域に記憶された前記命令情報の前記命令を、前記命令受信された順序以外の順序で実行する際に、前記バリア命令の後に受信され前記命令である第二の命令の実行を、前記バリア命令の前に受信された前記命令である第一の命令で、かつ当該第二の命令の命令種別との組み合わせが所定の組み合わせであるような命令種別である前記第一の命令が、すべて実行されるまで、保留する、
命令実行制御方法。
A command received from the command issuing device and stored in a plurality of storage areas of command information of a command whose execution is suspended, and the storage area receives the barrier command when a barrier command is received. The storage area that has stored the instruction in can be specified,
Said instruction of said instruction information stored in the storage area, in performing of the order in which the command is received, the execution of the second instruction is the instruction that has been received after the barrier instruction The first instruction, which is the first instruction that is the instruction received before the barrier instruction, and the instruction type is such that the combination with the instruction type of the second instruction is a predetermined combination. , Hold until all run ,
Instruction execution control method.
実行待ちの前記命令の命令情報と、当該命令が前記バリア命令前に発行されたことを示すバリア前情報と、当該命令が前記バリア命令前に発行された前記命令を追い越すことができないことを示す追い越し禁止情報を対応付けて前記記憶域である複数のエントリに記憶し、
前記命令発行装置から前記バリア命令を受信したときに、前記命令の命令情報が格納されている前記エントリにおける前記バリア前情報を設定し、前記命令発行装置から前記バリア命令以外の前記第二の前記命令の命令情報が何れかの前記エントリに格納されたときに、当該エントリの前記命令種別と、前記バリア前情報が設定された、当該エントリを除くいずれかの前記エントリの、前記第一の前記命令の前記命令情報の前記命令種別が、前記所定の組み合わせである場合、当該エントリにおける前記追い越し禁止情報を、当該エントリを除く前記エントリに対応づけて設定し、
前記エントリの前記追い越し禁止情報が設定されている場合、当該エントリに前記命令情報が格納された前記命令の実行を保留する、
請求項5の命令実行制御方法。
Instruction information of the instruction waiting to be executed, pre-barrier information indicating that the instruction has been issued before the barrier instruction, and indicates that the instruction cannot pass the instruction issued before the barrier instruction Storing the overtaking prohibition information in association with the plurality of entries in the storage area ;
When the barrier command is received from the command issuing device, the pre-barrier information is set in the entry in which the command information of the command is stored, and the second command other than the barrier command is set from the command issuing device. When the instruction information of an instruction is stored in any of the entries, the instruction type of the entry, and the pre-barrier information are set, and the first of the entries of any of the entries excluding the entry When the instruction type of the instruction information of the instruction is the predetermined combination, the overtaking prohibition information in the entry is set in association with the entry excluding the entry,
When the overtaking prohibition information of the entry is set, execution of the instruction in which the instruction information is stored in the entry is suspended.
The instruction execution control method according to claim 5.
前記記憶域は、2つの値を交互に切り替える切り替えフラグの前記2つの値にそれぞれ対応付けられる2つの命令記憶域であり、
前記命令実行制御方法は、さらに、
前記命令発行装置から前記バリア命令を受信するたびに、前記切り替えフラグの値を切り替え、
前記命令発行装置から受信した、前記バリア命令を除く実行待ちの前記命令の命令情報を、前記切り替えフラグの値が切り替わった後、前記切り替えフラグの値で特定される前記命令記憶域が一旦空になった後に、当該命令記憶域に記憶し、
前記切り替えフラグの値で特定される前記命令記憶域とは異なる前記命令記憶域に記憶されている前記第一の命令が存在する場合で、前記切り替えフラグの値で特定される前記命令記憶域に記憶されている前記第二の前記命令の命令種別との組み合わせが、前記所定の組み合わせであるような命令種別である、前記第一の命令が存在するかを確認し、存在が確認された場合には、当該第二の命令の実行を保留する、
請求項5の命令実行制御方法。
The storage area is two instruction storage areas respectively associated with the two values of the switching flag for alternately switching two values.
The instruction execution control method further includes:
Each time it receives the barrier instruction from the instruction issue unit, switching the value of the switching flag,
The instruction storage area specified by the value of the switching flag is temporarily emptied after the value of the switching flag is switched in the instruction information of the instruction waiting for execution excluding the barrier instruction received from the instruction issuing device. After that, store it in the instruction storage area,
In the case where the command storage area wherein the first instructions stored in said different instruction storage is a specified by the value of the switching flag is present, the command storage area specified by the value of the switching flag The combination of the second instruction stored with the instruction type is an instruction type that is the predetermined combination, and the existence of the first instruction is confirmed. the suspends the execution of the second instruction,
The instruction execution control method according to claim 5.
命令発行装置から受信された命令であって、実行が保留されている命令の命令情報複数の記憶域に記憶し、前記記憶域は、バリア命令を受信した場合に当該バリア命令を受信した時点で前記命令を記憶していた前記記憶域が特定可能である、記憶処理と、
前記記憶域に記憶された前記命令情報の前記命令を、前記命令受信された順序以外の順序で実行しうる処理であって、前記バリア命令の後に受信され前記命令である第二の命令の実行を、前記バリア命令の前に受信された前記命令である第一の命令で、かつ当該第二の命令の命令種別との組み合わせが所定の組み合わせであるような命令種別である前記第一の命令が、すべて実行されるまで、保留する実行処理と、
をコンピュータに実行させる命令実行制御プログラム。
Instructions received from an instruction issuing device and stored in a plurality of storage areas of instruction information of instructions pending execution, and when the storage area receives a barrier instruction, the storage area receives the barrier instruction A storage process in which the storage area storing the instruction can be specified ;
Said instruction of said instruction information stored in the storage area, wherein the instructions a process that can be executed in an order other than the order in which they are received, the second instruction is the instruction that has been received after the barrier instruction Execution of the first instruction that is the first instruction that is the instruction received before the barrier instruction and the instruction type is such that the combination with the instruction type of the second instruction is a predetermined combination Execution processing to be held until all the instructions are executed,
Instruction execution control program for causing a computer to execute
前記記憶域は、実行待ちの前記命令の命令情報と、当該命令が前記バリア命令前に発行されたことを示すバリア前情報と、当該命令が前記バリア命令前に発行された前記命令を追い越すことができないことを示す追い越し禁止情報を対応付けて記憶するための複数のエントリであり
前記命令実行制御プログラムは、
前記命令発行装置から前記バリア命令を受信したときに、前記命令の命令情報が格納されている前記エントリにおける前記バリア前情報を設定し、前記命令発行装置から前記バリア命令以外の前記第二の前記命令の命令情報が何れかの前記エントリに格納されたときに、当該エントリの前記命令種別と、前記バリア前情報が設定された、当該エントリを除くいずれかの前記エントリの、前記第一の前記命令の前記命令情報の前記命令種別が、前記所定の組み合わせである場合、当該エントリにおける前記追い越し禁止情報を、当該エントリを除く前記エントリに対応づけて設定する設定処理と、
記エントリの前記追い越し禁止情報が設定されている場合、当該エントリに前記命令情報が格納された前記命令の実行を保留する前記実行処理と、
をコンピュータに実行させる請求項8の命令実行制御プログラム。
The storage area overtakes the instruction information of the instruction waiting to be executed, pre-barrier information indicating that the instruction is issued before the barrier instruction, and the instruction issued before the barrier instruction. A plurality of entries for associating and storing the overtaking prohibition information indicating that the
The instruction execution control program is
When the barrier command is received from the command issuing device, the pre-barrier information is set in the entry in which the command information of the command is stored, and the second command other than the barrier command is set from the command issuing device. When the instruction information of an instruction is stored in any of the entries, the instruction type of the entry, and the pre-barrier information are set, and the first of the entries of any of the entries excluding the entry When the instruction type of the instruction information of the instruction is the predetermined combination, setting processing for setting the overtaking prohibition information in the entry in association with the entry excluding the entry;
If the overtaking prohibition information before Symbol entry is set, and the execution process to suspend the execution of the instruction that the instruction information in the entry is stored,
9. The instruction execution control program according to claim 8 , which causes a computer to execute.
前記記憶域は、2つの値を交互に切り替える切り替えフラグの前記2つの値にそれぞれ対応付けられる2つの命令記憶域であり、
前記命令実行制御プログラムは、
前記命令発行装置から前記バリア命令を受信するたびに、前記切り替えフラグの値を切り替える切り替え処理と、
記命令発行装置から受信した、前記バリア命令を除く実行待ちの前記命令の命令情報を、前記切り替えフラグの値が切り替わった後、前記切り替えフラグの値で特定される前記命令記憶域が一旦空になった後に、当該命令記憶域に記憶する前記記憶処理と、
前記切り替えフラグの値で特定される前記命令記憶域とは異なる前記命令記憶域に記憶されている前記第一の命令が存在する場合で、前記切り替えフラグの値で特定される前記命令記憶域に記憶されている前記第二の前記命令の命令種別との組み合わせが、前記所定の組み合わせであるような命令種別である、前記第一の命令が存在するかを確認し、存在が確認された場合には、当該第二の命令の実行を保留する前記実行処理と、
をコンピュータに実行させる請求項8の命令実行制御プログラム。
The storage area is two instruction storage areas respectively associated with the two values of the switching flag for alternately switching two values.
The instruction execution control program is
Each time it receives the barrier instruction from said instruction issuing apparatus, and a switching processing for switching the value of the switching flag,
Received from the previous SL instruction issue unit, the instruction information of the instruction awaiting execution except for the barrier instruction, after the value of the switching flag has been switched, the instruction storage is temporarily empty specified by the value of the switching flag The storage processing to be stored in the instruction storage area,
In the case where the command storage area wherein the first instructions stored in said different instruction storage is a specified by the value of the switching flag is present, the command storage area specified by the value of the switching flag The combination of the second instruction stored with the instruction type is an instruction type that is the predetermined combination, and the existence of the first instruction is confirmed. The execution process for deferring execution of the second instruction,
9. The instruction execution control program according to claim 8 , which causes a computer to execute.
JP2013022120A 2013-02-07 2013-02-07 Instruction execution control device, instruction execution control system, instruction execution control method, and instruction execution control program Active JP6105307B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013022120A JP6105307B2 (en) 2013-02-07 2013-02-07 Instruction execution control device, instruction execution control system, instruction execution control method, and instruction execution control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013022120A JP6105307B2 (en) 2013-02-07 2013-02-07 Instruction execution control device, instruction execution control system, instruction execution control method, and instruction execution control program

Publications (2)

Publication Number Publication Date
JP2014153851A JP2014153851A (en) 2014-08-25
JP6105307B2 true JP6105307B2 (en) 2017-03-29

Family

ID=51575682

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013022120A Active JP6105307B2 (en) 2013-02-07 2013-02-07 Instruction execution control device, instruction execution control system, instruction execution control method, and instruction execution control program

Country Status (1)

Country Link
JP (1) JP6105307B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160092118A1 (en) * 2014-09-26 2016-03-31 Intel Corporation Memory write management in a computer system
KR102262209B1 (en) * 2018-02-09 2021-06-09 한양대학교 산학협력단 Method and apparatus for sending barrier command using dummy io request

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2504536B2 (en) * 1988-10-05 1996-06-05 富士通株式会社 Instruction execution serialization control method
JPH07302200A (en) * 1994-04-28 1995-11-14 Hewlett Packard Co <Hp> Loading instruction method of computer provided with instruction forcing sequencing loading operation and sequencing storage
JP3789320B2 (en) * 2001-06-12 2006-06-21 エヌイーシーコンピュータテクノ株式会社 Vector processing apparatus and overtaking control method using the same
US7606998B2 (en) * 2004-09-10 2009-10-20 Cavium Networks, Inc. Store instruction ordering for multi-core processor
JP4985452B2 (en) * 2008-02-14 2012-07-25 エヌイーシーコンピュータテクノ株式会社 Vector processing equipment

Also Published As

Publication number Publication date
JP2014153851A (en) 2014-08-25

Similar Documents

Publication Publication Date Title
JP7087029B2 (en) Improved functional callback mechanism between the central processing unit (CPU) and the auxiliary processor
US7421694B2 (en) Systems and methods for enhancing performance of a coprocessor
JP5366802B2 (en) Global overflow method for virtualized transactional memory
US20130117541A1 (en) Speculative execution and rollback
US10613792B2 (en) Efficient enforcement of barriers with respect to memory move sequences
US10572179B2 (en) Speculatively performing memory move requests with respect to a barrier
TWI540502B (en) Processor for overlapping atomic regions execution
CN106170768B (en) Dispatching multiple threads in a computer
EP2641171B1 (en) Preventing unintended loss of transactional data in hardware transactional memory systems
US10152322B2 (en) Memory move instruction sequence including a stream of copy-type and paste-type instructions
US20150012727A1 (en) Processing device and control method of processing device
US10846092B2 (en) Execution of micro-operations
US11231931B1 (en) Mechanism for mitigating information leak via cache side channels during speculative execution
US20180052605A1 (en) Memory access in a data processing system utilizing copy and paste instructions
CN109196489B (en) Method and apparatus for reordering in a heterogeneous computing device
JP2018528515A (en) A method for a simplified task-based runtime for efficient parallel computing
US10241945B2 (en) Memory move supporting speculative acquisition of source and destination data granules including copy-type and paste-type instructions
US10346164B2 (en) Memory move instruction sequence targeting an accelerator switchboard
US9152509B2 (en) Transactional memory conflict management
JP6105307B2 (en) Instruction execution control device, instruction execution control system, instruction execution control method, and instruction execution control program
JP6214142B2 (en) Information processing apparatus, information processing method, and program
US10331373B2 (en) Migration of memory move instruction sequences between hardware threads
US10126952B2 (en) Memory move instruction sequence targeting a memory-mapped device
US9996298B2 (en) Memory move instruction sequence enabling software control
US20150052307A1 (en) Processor and control method of processor

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20140822

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160120

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160614

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160712

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160907

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170207

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170302

R150 Certificate of patent or registration of utility model

Ref document number: 6105307

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150