WO2015155894A1 - プロセッサーおよび方法 - Google Patents

プロセッサーおよび方法 Download PDF

Info

Publication number
WO2015155894A1
WO2015155894A1 PCT/JP2014/060518 JP2014060518W WO2015155894A1 WO 2015155894 A1 WO2015155894 A1 WO 2015155894A1 JP 2014060518 W JP2014060518 W JP 2014060518W WO 2015155894 A1 WO2015155894 A1 WO 2015155894A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing
processing unit
threads
instructions
stage
Prior art date
Application number
PCT/JP2014/060518
Other languages
English (en)
French (fr)
Inventor
貴宏 渡邉
Original Assignee
株式会社Murakumo
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 株式会社Murakumo filed Critical 株式会社Murakumo
Priority to JP2014540665A priority Critical patent/JP5630798B1/ja
Priority to PCT/JP2014/060518 priority patent/WO2015155894A1/ja
Priority to EP14827997.9A priority patent/EP3131004A4/en
Priority to US14/609,818 priority patent/US20150293766A1/en
Publication of WO2015155894A1 publication Critical patent/WO2015155894A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3851Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution from multiple instruction streams, e.g. multistreaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • G06F9/3012Organisation of register space, e.g. banked or distributed register file
    • G06F9/30123Organisation of register space, e.g. banked or distributed register file according to context, e.g. thread buffers

Definitions

  • the present invention relates to a processor.
  • the dispatch circuit determines which instructions in the buffer are ready for execution and executes the ready instructions Issue an instruction from one thread before an instruction from another thread, regardless of which instruction was first fetched into the buffer, and an instruction from a particular thread is issued Then, a technique has been proposed in which the fetch circuit fills a usable buffer by the next instruction from the thread (see Patent Document 1).
  • each of the plurality of hardware thread units of the multi-thread processor has a corresponding local register that can be updated by the hardware thread unit.
  • a local register of a particular one of the hardware thread units issues one or more instructions after the particular hardware thread unit issues one or more instructions
  • a processor has been proposed that stores a value that identifies the next thread that is allowed (see Patent Document 2).
  • the instruction pipeline includes a type of pipeline in which a single thread is executed in a series of instruction pipelines, and a so-called “circular pipeline” in which a plurality of threads are executed while being sequentially circulated in the series of instruction pipelines.
  • a type pipeline There is a type pipeline.
  • FIG. 6 is a diagram showing a concept of a conventional cyclic pipeline type instruction pipeline.
  • the instruction pipeline divides the processing of each instruction into a plurality of stages (processing elements) that can be executed independently, and each stage takes the output of the previous stage as its input, and its output as the output of the subsequent stage. By being interconnected so as to be input, the processing in each stage is parallelized and the instruction throughput as a whole is reduced.
  • FIG. 6 shows an example in which a processing unit for performing processing relating to each stage processes instructions relating to five threads T1 to T5 in parallel.
  • an object of the present invention is to perform parallel processing by a processor more efficiently.
  • the present invention employs the following means in order to solve the above-described problems. That is, according to an example of the present disclosure, a plurality of processing units corresponding to each stage and a processing unit for the previous stage prepared for processing instructions in a plurality of stages continuously process a plurality of instructions. And a control means for controlling the plurality of processing units so that the processing unit for the subsequent stage continuously processes the plurality of instructions for which the processing by the processing unit for the previous stage has been completed.
  • a processor comprising
  • the processor further includes a plurality of execution contexts for executing a plurality of threads, and the control means includes a processing unit for a previous stage when the plurality of threads are to be executed. After continuously processing instructions related to at least two or more threads of the plurality of threads, the processing unit for the subsequent stage is changed to the two or more threads that have been processed by the processing unit for the preceding stage.
  • the plurality of processing units may be controlled so that the processing of such instructions is continuously performed.
  • the plurality of threads are assigned to any of a plurality of groups, and the control unit executes the instructions of the threads assigned to different groups at the same time.
  • the unit may be controlled.
  • the number of threads assigned to the group may be changeable by setting.
  • the number of groups may be prepared based on the number of processing units provided in the processor.
  • control means sends instructions related to two or more threads assigned to the first group to other processing units.
  • the plurality of processing units may be controlled so as to process instructions relating to two or more threads assigned to the second group.
  • control unit processes the instructions related to all the threads to be processed by the processing unit for the subsequent stage.
  • the plurality of processing units may be controlled so as to be performed continuously.
  • the present invention can be understood as a computer system, an information processing apparatus, a method executed by a computer, or a program executed by a computer.
  • the present invention can also be understood as a program recorded on a recording medium readable by a computer, other devices, machines, or the like.
  • a computer-readable recording medium refers to a recording medium that accumulates information such as data and programs by electrical, magnetic, optical, mechanical, or chemical action and can be read from a computer or the like.
  • parallel processing by a processor can be performed more efficiently.
  • FIG. 1 is a diagram showing an outline of a system according to the present embodiment.
  • the system according to the present embodiment includes a CPU 11 and a memory (Random Access Memory, RAM) 12.
  • the memory 12 is directly connected to the CPU 11 so as to be readable and writable.
  • a method for connecting the memory 12 and the CPU 11 a method in which a port (processing unit side port) included in the CPU 11 and a port (storage device side port) included in the memory 12 are serially connected is employed.
  • a connection method other than the example in the present embodiment may be adopted as a connection method between the memory 12 and the CPU 11.
  • an optical connection may be employed for part or all of the connection.
  • the connection between the CPU 11 and the memory 12 may be physically shared using a bus or the like.
  • the memory 12 may be shared by two or more CPUs.
  • the CPU 11 includes a plurality of processing units and a plurality of execution contexts, thereby dividing each instruction (instruction) processing into stages (processing elements) that can be executed independently, and each stage.
  • it is a CPU that can parallelize the processing in each stage by being interconnected so that the output of the preceding stage is its own input and its output is the input of the subsequent stage.
  • FIG. 2 is a diagram illustrating a configuration of the CPU 11 according to the present embodiment.
  • the multiple stages for processing instructions include instruction fetch, instruction decode (and register fetch), instruction execution, memory access, and register writeback, which are here. Processed in the order listed.
  • the CPU 11 performs processing unit IF for performing instruction fetch, processing unit ID for performing instruction decoding, processing unit EX for executing instructions, and memory access.
  • a processing unit WB for performing write-back to a register. Since each stage is processed in the above order, the present disclosure uses the terms “previous stage” and “rear stage” when specifying the stage in a relative relationship. For example, in the relationship between the processing unit IF and the processing unit ID, the processing unit IF is a processing unit for the previous stage, and the processing unit ID is a processing unit for the subsequent stage.
  • the CPU 11 further includes a control unit 13 that controls the plurality of processing units described above. After the processing unit for the previous stage performs the processing of the plurality of instructions continuously, the control unit 13 performs the processing of the plurality of instructions for which the processing unit for the previous stage has finished processing by the processing unit for the previous stage. A plurality of processing units are controlled to be performed continuously. Further, the control unit 13 controls a plurality of processing units so that instructions of threads assigned to different groups are executed at the same time. This group will be described later.
  • FIG. 3 is a diagram showing a configuration of an execution context to be processed by the CPU 11 in the present embodiment.
  • an example in which one thread is assigned for each execution context will be described.
  • Each thread includes instructions included in a program executed in the thread in the order to be executed.
  • a plurality of threads that are successively executed by each processing unit are grouped.
  • units in which threads are grouped (assigned) are referred to as “banks” or “groups”. Since the number of groups that can be processed simultaneously is the same as the number of processing units (the number of stages in the conventional instruction pipeline), in this embodiment, the number of banks is the same as the number of processing units.
  • the number of execution contexts (the number of threads executed in parallel) in the CPU 11 is determined based on the number of banks (the number of pipeline stages and the number of processing units) and the number of execution contexts per bank.
  • the number of execution contexts is expressed by the following formula.
  • Execution context count "bank count” * "execution context count per bank”
  • the number of banks is five, but the number of banks is not limited to five, and is determined according to the number of processing units included in the adopted CPU. Further, in this embodiment, the case where the number of execution contexts per bank is four will be described. However, the number of execution contexts per bank may be other numbers, and can be changed by setting. Also good. However, the number of execution contexts to be set has an upper limit that can be set due to hardware limitations of the CPU 11 (the number of circuits created on the CPU 11).
  • a thread assigned to each execution context is indicated by a combination of a bank number and a thread number in the bank.
  • the thread B1T1 is the first thread in the bank 1
  • the thread B5T4 is the fourth thread in the bank 5.
  • the CPU 11 when processing an instruction, divides one instruction into a plurality of stages (processing elements) and causes a processing unit prepared for each stage to execute the instruction. Since a plurality of processing units can operate simultaneously, a cyclic pipeline type instruction pipeline that processes a plurality of instructions in parallel by shifting the processing timing of each stage is conventionally used.
  • a cyclic pipeline type instruction pipeline that processes a plurality of instructions in parallel by shifting the processing timing of each stage is conventionally used.
  • the processing related to the subsequent stage of these multiple threads is transferred to the subsequent stage.
  • the processing unit is controlled so as to continuously perform processing while changing the processing target thread.
  • the flowchart shown in FIG. 4 is an example of a processing flow for realizing such control.
  • FIG. 4 is a flowchart showing the flow of control in each processing unit according to the present embodiment.
  • the control shown in this flowchart is repeatedly executed for each clock by each of the five processing units provided in the CPU 11 while the CPU 11 according to the present embodiment performs parallel processing.
  • the CPU 11 determines whether or not there is a thread including an instruction to be processed in the bank (for example, bank 1) that is the target of processing in the current clock (step S101).
  • the CPU 11 An instruction of a thread (for example, thread B1T2) including an instruction to be processed is processed (step S102).
  • the CPU 11 sets the processing target to the next bank (for example, bank 2). (Step S103). Then, the CPU 11 processes an instruction of a thread (for example, thread B2T1) that includes an instruction to be processed in a bank that has been newly processed (step S104).
  • FIG. 5 is a diagram illustrating an example of a clock cycle when the control according to the present embodiment is performed.
  • the processing unit IF processes the four threads B1T1 to B1T4 in the bank 1
  • the threads B1T1 to B1T4 are processed after the processing unit IF processes the threads shown in FIG.
  • processing in the order of processing by the processing unit ID in the subsequent stage is realized.
  • the threads B1T1 to B1T4 are processed by the processing unit EX.
  • the processing is taken over by the subsequent processing unit.
  • the control unit 13 determines that the processing unit for the previous stage is at least two or more threads (in the present embodiment, the first stage). Instructions relating to two or more threads for which processing by the processing unit for the subsequent stage has been completed by the processing unit for the subsequent stage after the processing related to the instruction relating to the two or more threads assigned to the bank is continuously performed A plurality of processing units are controlled so that the above processes are continuously performed.
  • the present embodiment it is possible to delay the processing for each stage related to each instruction by at least 4 clocks (the number of execution contexts per bank).
  • the instruction of the thread B1T1 is fetched by the processing unit IF at clock n, then decoded and registered by the processing unit ID at clock n + 4, executed by the processing unit EX at clock n + 8, and processed at clock n + 12.
  • the memory is accessed by the MEM and written back by the processing unit WB at the clock n + 16, whereby the processing is completed.
  • An instruction pipeline can be constructed.
  • FIG. 5 is a clock cycle when processing of all instructions is completed in one clock in all processing units.
  • the processing by the processing unit may not be completed in one clock for some reason, and the clock cycle is not limited to the example shown in FIG.
  • the control unit 13 receives the instructions related to two or more threads assigned to the first bank by other processing units. While being processed, the plurality of processing units are controlled so as to process instructions relating to two or more threads assigned to the second bank. That is, while a certain processing unit is processing a thread in a certain bank, the preceding processing unit that has completed the processing in that bank processes the thread in the next bank. For example, while the processing unit ID is processing the thread of the bank 1 (threads B1T1 to B1T4), the processing unit IF that has completed the processing of the bank 1 processes the threads B2T1 to B2T4 of the bank 2. Therefore, according to the present embodiment, it is possible to improve the overall throughput while enabling the processing delay as described above.
  • a pipeline can be configured, and parallel processing by the CPU 11 can be performed more efficiently.
  • a temporary memory is provided in the processor to cache data.
  • the processor became complicated by such a mechanism. According to the embodiment described above, it is possible to delay the processing related to each instruction without lowering the overall throughput, so that the temporary memory previously provided in the processor is omitted, and the configuration of the processor is complicated. It is also possible to prevent this.
  • the temporary memory may not be omitted when implementing the present disclosure.
  • the processing unit can be used without waste, and the throughput of the entire processor can be improved.
  • the embodiment described above is an example, and the processor and method according to the present disclosure are not limited to a specific configuration.
  • the specific structure according to embodiment is employ
  • the above disclosure may be employed for a single-core CPU or a multi-core CPU.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Advance Control (AREA)

Abstract

プロセッサーによる並列処理をより効率的に行うことを課題とし、プロセッサーに、複数のステージに分けて命令を処理するために用意された、各ステージに対応する複数の処理ユニットと、前段ステージ用の処理ユニットが複数の命令の処理を連続して行った後に、後段ステージ用の処理ユニットが、前段ステージ用の処理ユニットによる処理が終了した複数の命令の処理を連続して行うように、複数の処理ユニットを制御する制御手段と、を備えた。

Description

プロセッサーおよび方法
 本発明は、プロセッサーに関する。
 従来、実行パイプライン内のバブルの発生を減らす実行コア・アーキテクチャを提供するために、ディスパッチ回路がバッファ内のどの命令が実行の準備ができているかどうかを判定し、準備ができた命令を実行のために発行し、あるスレッドからの命令を、別のスレッドからの命令の前に、どちらの命令が最初にバッファにフェッチされたかに無関係に発行し、特定のスレッドからの命令が発行されると、フェッチ回路が、そのスレッドからの次の命令によって、使用可能なバッファ充てんする技術が提案されている(特許文献1を参照)。
 また、スレッド機能停止につながるブロック状態が生じることを防止する目的で、マルチスレッド・プロセッサの複数のハードウェア・スレッド・ユニットの各々が、そのハードウェア・スレッド・ユニットで更新可能な対応するローカルレジスタを含むことができ、ハードウェア・スレッド・ユニットの特定のもののローカルレジスタが、その特定のハードウェア・スレッド・ユニットが1つまたは複数の命令を発行した後で1つまたは複数の命令を発行することが許される次のスレッドを識別する値を格納するプロセッサーが提案されている(特許文献2を参照)。
特開2005-182825号公報 特表2006-502505号公報
 従来、CPU(Central Processing Unit)等のプロセッサーが処理を行う場合に、命令スループット(単位時間あたりに実行できる命令数)を向上させる目的で、所謂命令パイプラインが採用されている。ここで、命令パイプラインには、単一のスレッドを一連の命令パイプラインで実行する型のパイプラインと、複数のスレッドを一連の命令パイプラインにおいて順次循環させながら実行する所謂「循環パイプライン」型のパイプラインとがある。
 図6は、従来の循環パイプライン型の命令パイプラインの概念を示す図である。命令パイプラインは、各命令の処理を、独立して実行できる複数のステージ(処理要素)に分割し、各ステージが、前段のステージの出力を自身の入力とし、自身の出力を後段のステージの入力とするように相互接続されることで各ステージにおける処理を並列化し、全体としての命令スループットを削減するものである。図6には、各ステージに係る処理を行うための処理ユニットが、5つのスレッドT1からT5に係る命令を並行して処理する例が示されている。
 しかし、あるステージの処理は、必ずしも1クロックで完了しない。このため、従来の命令パイプラインでは、例えば、メモリアクセス等のレスポンス待ちに予測困難な長い時間がかかる等の原因によって、当該ステージまたは他のステージにおいて処理が行われない状態(所謂バブル)が発生することがあり、これによって並列処理の効率が悪化する。
 本発明は、上記した問題に鑑み、プロセッサーによる並列処理をより効率的に行うことを課題とする。
 本発明は、上記した課題を解決するために、以下の手段を採用した。即ち、本開示の一例は、複数のステージに分けて命令を処理するために用意された、各ステージに対応する複数の処理ユニットと、前段ステージ用の処理ユニットが複数の命令の処理を連続して行った後に、後段ステージ用の処理ユニットが、前記前段ステージ用の処理ユニットによる処理が終了した前記複数の命令の処理を連続して行うように、前記複数の処理ユニットを制御する制御手段と、を備えるプロセッサーである。
 また、前記プロセッサーは、複数のスレッドを実行するための複数の実行コンテキストを更に備え、前記制御手段は、前記複数のスレッドが実行の対象となっている場合に、前段ステージ用の処理ユニットが前記複数のスレッドのうちの少なくとも2以上のスレッドに係る命令の処理を連続して行った後に、後段ステージ用の処理ユニットが、前記前段ステージ用の処理ユニットによる処理が終了した前記2以上のスレッドに係る命令の処理を連続して行うように、前記複数の処理ユニットを制御してもよい。
 また、前記複数のスレッドは、複数のグループの何れかに割り当てられており、前記制御手段は、互いに異なるグループに割り当てられたスレッドの命令を、同一の時点において実行するように、前記複数の処理ユニットを制御してもよい。
 また、前記グループに割り当てられるスレッドの数は、設定により変更可能であってもよい。
 また、前記グループは、該プロセッサーに備えられた処理ユニット数に基づいた数用意されてもよい。
 また、前記制御手段は、第一のグループに割り当てられた2以上のスレッドに係る命令の処理が終了した後、該第一のグループに割り当てられた2以上のスレッドに係る命令が他の処理ユニットによって処理されている間、第二のグループに割り当てられた2以上のスレッドに係る命令を処理するように、前記複数の処理ユニットを制御してもよい。
 また、前記制御手段は、前段ステージ用の処理ユニットが処理対象の全てのスレッドに係る命令の処理を連続して行った後に、後段ステージ用の処理ユニットが処理対象の全てスレッドに係る命令の処理を連続して行うように、前記複数の処理ユニットを制御してもよい。
 なお、本発明は、コンピューターシステム、情報処理装置、コンピューターによって実行される方法、またはコンピューターに実行させるプログラムとして把握することが可能である。また、本発明は、そのようなプログラムをコンピューターその他の装置、機械等が読み取り可能な記録媒体に記録したものとしても把握できる。ここで、コンピューター等が読み取り可能な記録媒体とは、データやプログラム等の情報を電気的、磁気的、光学的、機械的、または化学的作用によって蓄積し、コンピューター等から読み取ることができる記録媒体をいう。
 本発明によれば、プロセッサーによる並列処理をより効率的に行うことが可能となる。
実施形態に係るシステムの概略を示す図である。 実施形態に係るCPUの構成を示す図である。 実施形態においてCPUによる処理の対象となる実行コンテキストの構成を示す図である。 実施形態に係る、各処理ユニットにおける制御の流れを示すフローチャートである。 実施形態に係る制御を行った場合のクロックサイクルの一例を示す図である。 従来の循環パイプライン型の命令パイプラインの概念を示す図である。
 以下、本開示に係るプロセッサーおよび方法の実施の形態を、図面に基づいて説明する。但し、以下に説明する実施の形態は、実施形態を例示するものであって、本開示に係るプロセッサーおよび方法を以下に説明する具体的構成に限定するものではない。実施にあたっては、実施形態に応じた具体的構成が適宜採用され、また、種々の改良や変形が行われてよい。
 <システム構成>
 図1は、本実施形態に係るシステムの概略を示す図である。本実施形態に係るシステムは、CPU11およびメモリ(Random Access Memory、RAM)12を備える。そして、メモリ12は、CPU11に、読み書き可能に直接接続される。本実施形態では、メモリ12とCPU11との接続方法として、CPU11が備えるポート(処理ユニット側ポート)と、メモリ12が備えるポート(記憶装置側ポート)とが、シリアル接続される方法が採用される。但し、メモリ12とCPU11との接続方法には、本実施形態における例以外の接続方法が採用されてもよい。例えば、接続には、その一部または全部に光接続が採用されてもよい。また、CPU11とメモリ12との間の接続は、物理的にはバス等を用いて共有されていてもよい。また、本実施形態では、メモリ12が1のCPU11によって利用される例について説明しているが、メモリ12は、2以上のCPUによって共有されてもよい。
 また、本実施形態に係るCPU11は、複数の処理ユニット、および複数の実行コンテキストを備えることで、各命令(instruction)の処理を、独立して実行できるステージ(処理要素)に分割し、各ステージが、前段のステージの出力を自身の入力とし、自身の出力を後段のステージの入力とするように相互接続されることで各ステージにおける処理を並列化することが出来るCPUである。
 図2は、本実施形態に係るCPU11の構成を示す図である。本実施形態において、命令を処理するための複数のステージには、命令フェッチ、命令デコード(およびレジスタフェッチ)、命令の実行、メモリアクセス、およびレジスタへのライトバックがあり、これらのステージはここに記載された順序で処理される。そして、これらのステージに係る処理を行うために、CPU11は、命令フェッチを行うための処理ユニットIF、命令デコードを行うための処理ユニットID、命令を実行するための処理ユニットEX、メモリアクセスを行うための処理ユニットMEM、およびレジスタへのライトバックを行うための処理ユニットWBを備える。各ステージが上記順序で処理されることから、本開示では、相対的な関係においてステージを特定する際に「前段ステージ」および「後段ステージ」との語を用いる。例えば、処理ユニットIFと処理ユニットIDとの関係では、処理ユニットIFが前段ステージ用の処理ユニットであり、処理ユニットIDが後段ステージ用の処理ユニットである。
 CPU11は、更に、先述の複数の処理ユニットを制御する制御部13を備える。制御部13は、前段ステージ用の処理ユニットが複数の命令の処理を連続して行った後に、後段ステージ用の処理ユニットが、前段ステージ用の処理ユニットによる処理が終了した複数の命令の処理を連続して行うように、複数の処理ユニットを制御する。また、制御部13は、互いに異なるグループに割り当てられたスレッドの命令を、同一の時点において実行するように、複数の処理ユニットを制御する。このグループについては後述する。
 図3は、本実施形態においてCPU11による処理の対象となる実行コンテキストの構成を示す図である。なお、本実施形態では、実行コンテキスト毎に1のスレッドが割り当てられる例について説明する。各スレッドには、当該スレッドにおいて実行されるプログラムに含まれる命令が実行すべき順に含まれている。
 また、本実施形態では、夫々の処理ユニットによって連続して実行される複数のスレッドがグルーピングされる。以下、スレッドがグルーピングされる(割り当てられる)単位を「バンク」または「グループ」と称する。同時に処理できるグループの数は処理ユニットの数(従来の命令パイプラインにおけるステージ数)と同数となるため、本実施形態において、バンク数は処理ユニット数と同一である。
 CPU11における実行コンテキストの数(並列的に実行されるスレッドの数)は、バンク数(パイプラインのステージ数、処理ユニット数)および1バンクあたりの実行コンテキスト数に基づいて決定される。実行コンテキスト数は、以下に示す式で表される。
 実行コンテキスト数=「バンク数」*「1バンクあたりの実行コンテキスト数」
 先述の通り、バンク数は処理ユニット数と同数となるため、本実施形態におけるバンク数は5である。また、本実施形態では、1バンクあたりの実行コンテキスト数として4が設定される。このため、本実施形態では、1のCPU11に20(=5*4)の実行コンテキストが用意され、これらの実行コンテキストに割り当てられた20のスレッドが並列的に実行される。
 なお、本実施形態ではバンク数は5であるが、バンク数は5に限定されず、採用されるCPUが備える処理ユニット数に応じて決定される。また、本実施形態では、1バンクあたりの実行コンテキスト数が4である場合について説明するが、1バンクあたりの実行コンテキスト数は、その他の数であってもよいし、設定により変更可能であってもよい。但し、設定される実行コンテキスト数には、CPU11のハードウェア上の制限(CPU11上に作成された回路の数)により、設定可能な上限がある。
 本実施形態では、理解を容易にするため、各実行コンテキストに割り当てられるスレッドを、バンク番号とバンク内のスレッド番号との組み合わせで示す。例えば、図3に示す例では、スレッドB1T1は、バンク1の1つ目のスレッドであり、スレッドB5T4は、バンク5の4つ目のスレッドである。
 <処理の流れ>
 上述の通り、本実施形態に係るCPU11は、命令を処理する際に、1の命令を複数のステージ(処理要素)に分け、各ステージのために用意された処理ユニットに実行させる。複数の処理ユニットは同時に動作することが可能であるため、各ステージの処理のタイミングをずらすことで複数の命令を並行して処理する、循環パイプライン型の命令パイプラインが従来用いられている。本実施形態では、このような命令パイプラインにおいて、処理対象のスレッドを変更しながら複数スレッドの処理を連続して行った後に、これらの複数スレッドの後段のステージに係る処理を、後段のステージに係る処理ユニットが、処理対象のスレッドを変更しながら連続して行うように制御することとした。図4に示すフローチャートは、このような制御を実現するための処理の流れの一例である。
 図4は、本実施形態に係る、各処理ユニットにおける制御の流れを示すフローチャートである。本フローチャートに示された制御は、本実施形態に係るCPU11が並列処理を行う間、CPU11が備える5つの処理ユニットの夫々によって、1クロック毎に繰り返し実行される。
 各処理ユニットにおける制御において、CPU11は、現クロックにおいて処理の対象となっているバンク(例えば、バンク1)に、処理すべき命令を含むスレッドが有るか否かを判定する(ステップS101)。ここで、処理すべき命令を含むスレッドが有る場合(換言すれば、当該バンクに続けて実行すべきスレッドが残っている場合)には、CPU11は、現在処理の対象となっているバンクの、処理すべき命令を含むスレッド(例えば、スレッドB1T2)の命令を処理する(ステップS102)。一方、当該バンクに処理すべき命令を含むスレッドが無い場合(換言すれば、当該バンクにおけるスレッドの連続実行が終了した場合)には、CPU11は、処理の対象を次のバンク(例えば、バンク2)に切り替える(ステップS103)。そして、CPU11は、新たに処理の対象となったバンクの、処理すべき命令を含むスレッド(例えば、スレッドB2T1)の命令を処理する(ステップS104)。
 図5は、本実施形態に係る制御を行った場合のクロックサイクルの一例を示す図である。例えば、図3に示したスレッドの構成に対して図4に示した制御が行われることで、処理ユニットIFがバンク1の4つのスレッドB1T1からB1T4を処理した後に、これらのスレッドB1T1からB1T4を、後段の処理ユニットIDが処理する、という順序での処理が実現される。なお、処理ユニットIDによる処理が終了すると、スレッドB1T1からB1T4は、処理ユニットEXによって処理される。以降、処理は各処理ユニットがスレッドB1T1からB1T4の処理を完了する毎に後段の処理ユニットに引き継がれる。
 このようにして、制御部13は、複数のスレッドが実行の対象となっている場合に、前段ステージ用の処理ユニットが複数のスレッドのうちの少なくとも2以上のスレッド(本実施形態では、第一のバンクに割り当てられた2以上のスレッド)に係る命令の処理を連続して行った後に、後段ステージ用の処理ユニットが、前段ステージ用の処理ユニットによる処理が終了した2以上のスレッドに係る命令の処理を連続して行うように、複数の処理ユニットを制御する。
 本実施形態によれば、各命令に係るステージ毎の処理を少なくとも4クロック(バンクあたりの実行コンテキスト数)ずつ遅延させることが出来る。例えば、スレッドB1T1の命令は、クロックnで処理ユニットIFによって命令フェッチされた後、クロックn+4で処理ユニットIDによって命令デコードおよびレジスタフェッチされ、クロックn+8で処理ユニットEXによって実行され、クロックn+12で処理ユニットMEMによってメモリアクセスされ、クロックn+16で処理ユニットWBによってライトバックされることで、処理が完了する。このような制御が行われることで、前段ステージと後段ステージとの間に十分な時間的余裕が出来、メモリアクセス等のレスポンス待ちに長い時間がかかるような処理を行う場合にも、無駄の少ない命令パイプラインを構成することが出来る。
 なお、図5に示した例は、全ての処理ユニットにおいて、全ての命令の処理が1クロックで終了する場合のクロックサイクルである。何らかの理由で処理ユニットによる処理が1クロックで完了しないこともあり得、クロックサイクルは図5に示した例に限定されない。
 また、制御部13は、第一のバンクに割り当てられた2以上のスレッドに係る命令の処理が終了した後、第一のバンクに割り当てられた2以上のスレッドに係る命令が他の処理ユニットによって処理されている間、第二のバンクに割り当てられた2以上のスレッドに係る命令を処理するように、複数の処理ユニットを制御する。即ち、ある処理ユニットがあるバンクのスレッドを処理している間には、当該バンクの処理を完了した前段の処理ユニットは、次のバンクのスレッドを処理する。例えば、処理ユニットIDがバンク1のスレッド(スレッドB1T1からB1T4)を処理している間には、バンク1の処理を完了した処理ユニットIFは、バンク2のスレッドB2T1からB2T4を処理する。このため、本実施形態によれば、前記したような処理の遅延を可能としつつ、全体のスループットを向上させることが出来る。
 図5に示されたクロックサイクルが1周すると、再びスレッドB1T1が処理ユニットIFによって処理される。ここで、各スレッドには、上述の通り当該スレッドにおいて実行されるプログラムに含まれる命令が実行すべき順に含まれているため、次のクロックサイクルにおいて処理される命令は、スレッドB1T1に含まれる、前のクロックサイクルにおいて処理された命令の次の命令である。
 上記説明した実施形態によれば、前段ステージと後段ステージとの間に十分な時間的余裕が出来、メモリアクセス等のレスポンス待ちに長い時間がかかるような処理を行う場合にも、無駄の少ない命令パイプラインを構成することが出来、CPU11による並列処理をより効率的に行うことが出来る。
 また、従来、メモリアクセスの処理に多くのクロックを消費して前記したような状態が発生してしまうことを避けるために、プロセッサー内に一時メモリを設けてデータをキャッシュする仕組みがあるが、このような仕組みによってプロセッサーが複雑化するという問題もあった。上記説明した実施形態によれば、全体のスループットを下げることなく各命令に係る処理を遅延させることが可能であるため、プロセッサー内に従来設けられていた一時メモリを省略し、プロセッサーの構成が複雑化することを防ぐことも可能である。但し、本開示の実施に際して、一時メモリは省略されなくてもよい。
 更に、上記説明した実施形態によれば、バンク毎にスレッドを並行して処理するため、処理ユニットを無駄なく用いることが出来、プロセッサー全体のスループットを向上させることも可能である。
 なお、上述の通り、上記に説明した実施の形態は、例示であって、本開示に係るプロセッサーおよび方法を具体的構成に限定するものではない。実施にあたっては、実施形態に応じた具体的構成が適宜採用され、また、種々の改良や変形が行われてよい。例えば、上記開示は、シングルコアのCPUに採用されてもよいし、マルチコアのCPUに採用されてもよい。
  11 CPU
  12 メモリ
 

Claims (8)

  1.  複数のステージに分けて命令を処理するために用意された、各ステージに対応する複数の処理ユニットと、
     前段ステージ用の処理ユニットが複数の命令の処理を連続して行った後に、後段ステージ用の処理ユニットが、前記前段ステージ用の処理ユニットによる処理が終了した前記複数の命令の処理を連続して行うように、前記複数の処理ユニットを制御する制御手段と、
     を備えるプロセッサー。
  2.  複数のスレッドを実行するための複数の実行コンテキストを更に備え、
     前記制御手段は、前記複数のスレッドが実行の対象となっている場合に、前段ステージ用の処理ユニットが前記複数のスレッドのうちの少なくとも2以上のスレッドに係る命令の処理を連続して行った後に、後段ステージ用の処理ユニットが、前記前段ステージ用の処理ユニットによる処理が終了した前記2以上のスレッドに係る命令の処理を連続して行うように、前記複数の処理ユニットを制御する、
     請求項1に記載のプロセッサー。
  3.  前記複数のスレッドは、複数のグループの何れかに割り当てられており、
     前記制御手段は、互いに異なるグループに割り当てられたスレッドの命令を、同一の時点において実行するように、前記複数の処理ユニットを制御する、
     請求項2に記載のプロセッサー。
  4.  前記グループに割り当てられるスレッドの数は、設定により変更可能である、
     請求項3に記載のプロセッサー。
  5.  前記グループは、該プロセッサーに備えられた処理ユニット数に基づいた数用意される、
     請求項3または4に記載のプロセッサー。
  6.  前記制御手段は、第一のグループに割り当てられた2以上のスレッドに係る命令の処理が終了した後、該第一のグループに割り当てられた2以上のスレッドに係る命令が他の処理ユニットによって処理されている間、第二のグループに割り当てられた2以上のスレッドに係る命令を処理するように、前記複数の処理ユニットを制御する、
     請求項3から5の何れか一項に記載のプロセッサー。
  7.  前記制御手段は、前段ステージ用の処理ユニットが処理対象の全てのスレッドに係る命令の処理を連続して行った後に、後段ステージ用の処理ユニットが処理対象の全てスレッドに係る命令の処理を連続して行うように、前記複数の処理ユニットを制御する、
     請求項2から6の何れか一項に記載のプロセッサー。
  8.  複数のステージに分けて命令を処理するために用意された、各ステージに対応する複数の処理ユニットを備えるプロセッサーの制御方法であって、
     前記複数の処理ユニットのうち前段ステージ用の処理ユニットに、複数の命令の処理を連続して行わせるステップと、
     前記前段ステージ用の処理ユニットが前記複数の命令の処理を連続して行った後に、後段ステージ用の処理ユニットに、該複数の命令の処理を連続して行わせるステップと、
     を備える、プロセッサーの制御方法。
     
PCT/JP2014/060518 2014-04-11 2014-04-11 プロセッサーおよび方法 WO2015155894A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2014540665A JP5630798B1 (ja) 2014-04-11 2014-04-11 プロセッサーおよび方法
PCT/JP2014/060518 WO2015155894A1 (ja) 2014-04-11 2014-04-11 プロセッサーおよび方法
EP14827997.9A EP3131004A4 (en) 2014-04-11 2014-04-11 Processor and method
US14/609,818 US20150293766A1 (en) 2014-04-11 2015-01-30 Processor and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/060518 WO2015155894A1 (ja) 2014-04-11 2014-04-11 プロセッサーおよび方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/609,818 Continuation US20150293766A1 (en) 2014-04-11 2015-01-30 Processor and method

Publications (1)

Publication Number Publication Date
WO2015155894A1 true WO2015155894A1 (ja) 2015-10-15

Family

ID=52144982

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/060518 WO2015155894A1 (ja) 2014-04-11 2014-04-11 プロセッサーおよび方法

Country Status (4)

Country Link
US (1) US20150293766A1 (ja)
EP (1) EP3131004A4 (ja)
JP (1) JP5630798B1 (ja)
WO (1) WO2015155894A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170135500A (ko) * 2016-05-31 2017-12-08 에스케이하이닉스 주식회사 메모리 시스템 및 메모리 시스템의 동작 방법

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023161725A1 (en) * 2022-02-28 2023-08-31 Neuroblade Ltd. Processing systems

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005182825A (ja) 2003-12-18 2005-07-07 Nvidia Corp マルチスレッド式マイクロプロセッサのスレッドにまたがるアウト・オブ・オーダー命令ディスパッチ
JP2006502505A (ja) 2002-10-11 2006-01-19 サンドブリッジ テクノロジーズ インコーポレーテッド トークン・トリガ・マルチスレッディングの方法および装置
US20080313438A1 (en) * 2007-06-14 2008-12-18 David Arnold Luick Unified Cascaded Delayed Execution Pipeline for Fixed and Floating Point Instructions

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02208727A (ja) * 1989-02-09 1990-08-20 Mitsubishi Electric Corp 情報処理装置
JP3146058B2 (ja) * 1991-04-05 2001-03-12 株式会社東芝 並列処理型プロセッサシステムおよび並列処理型プロセッサシステムの制御方法
JP2806252B2 (ja) * 1994-03-04 1998-09-30 日本電気株式会社 データ処理装置
JPH1196005A (ja) * 1997-09-19 1999-04-09 Nec Corp 並列処理装置
WO2001033351A1 (fr) * 1999-10-29 2001-05-10 Fujitsu Limited Architecture de processeur
US20030135716A1 (en) * 2002-01-14 2003-07-17 Gil Vinitzky Method of creating a high performance virtual multiprocessor by adding a new dimension to a processor's pipeline
US6904511B2 (en) * 2002-10-11 2005-06-07 Sandbridge Technologies, Inc. Method and apparatus for register file port reduction in a multithreaded processor
US7836276B2 (en) * 2005-12-02 2010-11-16 Nvidia Corporation System and method for processing thread groups in a SIMD architecture
US7594078B2 (en) * 2006-02-09 2009-09-22 International Business Machines Corporation D-cache miss prediction and scheduling
US7945763B2 (en) * 2006-12-13 2011-05-17 International Business Machines Corporation Single shared instruction predecoder for supporting multiple processors
US20080148020A1 (en) * 2006-12-13 2008-06-19 Luick David A Low Cost Persistent Instruction Predecoded Issue and Dispatcher
US8578387B1 (en) * 2007-07-31 2013-11-05 Nvidia Corporation Dynamic load balancing of instructions for execution by heterogeneous processing engines
WO2009118776A1 (ja) * 2008-03-25 2009-10-01 富士通株式会社 マルチプロセッサ

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006502505A (ja) 2002-10-11 2006-01-19 サンドブリッジ テクノロジーズ インコーポレーテッド トークン・トリガ・マルチスレッディングの方法および装置
JP2005182825A (ja) 2003-12-18 2005-07-07 Nvidia Corp マルチスレッド式マイクロプロセッサのスレッドにまたがるアウト・オブ・オーダー命令ディスパッチ
US20080313438A1 (en) * 2007-06-14 2008-12-18 David Arnold Luick Unified Cascaded Delayed Execution Pipeline for Fixed and Floating Point Instructions

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3131004A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170135500A (ko) * 2016-05-31 2017-12-08 에스케이하이닉스 주식회사 메모리 시스템 및 메모리 시스템의 동작 방법
KR102643467B1 (ko) * 2016-05-31 2024-03-06 에스케이하이닉스 주식회사 메모리 시스템 및 메모리 시스템의 동작 방법

Also Published As

Publication number Publication date
EP3131004A1 (en) 2017-02-15
EP3131004A4 (en) 2017-11-08
JPWO2015155894A1 (ja) 2017-04-13
JP5630798B1 (ja) 2014-11-26
US20150293766A1 (en) 2015-10-15

Similar Documents

Publication Publication Date Title
CN111414197A (zh) 数据处理系统、编译器、处理器的方法和机器可读介质
WO2016140756A1 (en) Register renaming in multi-core block-based instruction set architecture
JP6493088B2 (ja) 演算処理装置及び演算処理装置の制御方法
US9886278B2 (en) Computing architecture and method for processing data
EP2352082B1 (en) Data processing device for performing a plurality of calculation processes in parallel
JP5630798B1 (ja) プロセッサーおよび方法
JP6094356B2 (ja) 演算処理装置
US11755329B2 (en) Arithmetic processing apparatus and method for selecting an executable instruction based on priority information written in response to priority flag comparison
US20120151145A1 (en) Data Driven Micro-Scheduling of the Individual Processing Elements of a Wide Vector SIMD Processing Unit
JP2014191663A (ja) 演算処理装置、情報処理装置、および演算処理装置の制御方法
EP3591518B1 (en) Processor and instruction scheduling method
KR101420592B1 (ko) 컴퓨터 시스템
JP2011198356A (ja) 複数の独立したシーケンスプログラムを並列実行するプログラマブルコントローラ
US10133578B2 (en) System and method for an asynchronous processor with heterogeneous processors
JP5871298B2 (ja) 情報処理装置、情報処理方法及び情報処理プログラム
JP6292324B2 (ja) 演算処理装置
JP2008102599A (ja) プロセッサ
US20090276777A1 (en) Multiple Programs for Efficient State Transitions on Multi-Threaded Processors
CN108255587B (zh) 一种同步多线程处理器
CN112579168B (zh) 指令执行单元、处理器以及信号处理方法
US10565036B1 (en) Method of synchronizing host and coprocessor operations via FIFO communication
JP2013125288A (ja) データ処理装置及びデータ処理方法
JP6307975B2 (ja) 演算処理装置及び演算処理装置の制御方法
JP6060853B2 (ja) プロセッサおよびプロセッサの処理方法
JP2012174105A (ja) メモリアクセス制御回路

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2014540665

Country of ref document: JP

Kind code of ref document: A

REEP Request for entry into the european phase

Ref document number: 2014827997

Country of ref document: EP

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14827997

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE