KR102292580B1 - Apparatus and method for managing physical register file of high-performance out-of-order superscalar cores - Google Patents
Apparatus and method for managing physical register file of high-performance out-of-order superscalar cores Download PDFInfo
- Publication number
- KR102292580B1 KR102292580B1 KR1020200033669A KR20200033669A KR102292580B1 KR 102292580 B1 KR102292580 B1 KR 102292580B1 KR 1020200033669 A KR1020200033669 A KR 1020200033669A KR 20200033669 A KR20200033669 A KR 20200033669A KR 102292580 B1 KR102292580 B1 KR 102292580B1
- Authority
- KR
- South Korea
- Prior art keywords
- instruction
- physical
- register
- block
- instructions
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/30141—Implementation provisions of register files, e.g. ports
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/3005—Arrangements for executing specific machine instructions to perform operations for flow control
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/3012—Organisation of register space, e.g. banked or distributed register file
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Advance Control (AREA)
Abstract
본 발명은 코어로 인가되는 다수의 명령어를 기지정된 기준에 따라 명령어 블록으로 구분하고, 구분된 명령어 블록 내에서 비최종 쓰기 명령어를 식별하며, 명령어 블록 내에서 식별된 비최종 쓰기 명령어의 논리 목적 레지스터에 쓰기된 값에 대해 유일하게 읽기 동작을 수행하는 단일 읽기 명령어를 판별하여, 물리 레지스터 파일의 다수의 물리 레지스터 중 판별된 단일 읽기 명령어에서 물리 소스 레지스터로 할당된 물리 레지스터를 동일 명령어 내의 물리 목적 레지스터로 재할당하여, 작은 용량의 물리 레지스터 파일로도 높은 수준의 명령어 실행 성능을 지원하고, 물리 레지스터 파일의 유효 크기를 증대시켜 제조 비용 및 전력 소비를 저감시킬 수 있는 비순차 실행 코어의 물리 레지스터 파일 관리 장치 및 방법을 제공할 수 있다.The present invention divides a plurality of instructions applied to the core into instruction blocks according to a predetermined criterion, identifies a non-final write instruction within the divided instruction block, and a logical purpose register of the non-final write instruction identified within the instruction block. By determining a single read command that uniquely performs a read operation on the value written to, the physical register allocated as a physical source register in a single read command determined among multiple physical registers in the physical register file is converted to a physical object register within the same instruction. physical register file of out-of-order execution core that can support a high level of instruction execution performance even with a small-capacity physical register file and increase the effective size of the physical register file to reduce manufacturing cost and power consumption. Management devices and methods may be provided.
Description
본 발명은 물리 레지스터 파일 관리 장치 및 방법에 관한 것으로, 고성능 비순차 실행 코어의 물리 레지스터 파일 관리 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and method for managing a physical register file, and to an apparatus and method for managing a physical register file of a high-performance out-of-order execution core.
비순차 실행(Out-of-order execution: OoOE 또는 비순차적 명령어 처리라고도 함)은 고성능 마이크로프로세서가 특정한 종류의 지연으로 인해 낭비될 수 있는 명령 사이클을 이용하고자 하는 패러다임이다. 비순차 실행은 명령 실행 효율을 높이기 위해 명령을 순서에 따라 처리하지 않는 기법으로 현재 많은 프로세서에 채용되고 있다.Out-of-order execution (also known as OoOE or out-of-order instruction processing) is a paradigm in which high-performance microprocessors seek to exploit instruction cycles that can be wasted due to certain kinds of delays. Out-of-order execution is a technique that does not process instructions in order to increase instruction execution efficiency, and is currently employed in many processors.
최신 비순차실행 코어 구조는 비순차적으로 실행되는 명령어들이 코어의 구조적 상태(architectural state)를 원래의 프로그램 순서에 따라 올바르게 갱신(update)할 수 있도록 하기 위하여 리오더 버퍼(Reorder Buffer) 및 물리 레지스터 파일(Physical Register File)을 사용하고 있다.The latest out-of-order execution core architecture has a reorder buffer and a physical register file ( Physical Register File) is being used.
리오더 버퍼는 디코딩(decoding)된 모든 명령어를 프로그램 순서에 따라 저장하고 있는 구조체로서 연산을 완료한 명령어를 원래의 순서대로 커밋(commit) 함으로써 코어의 구조적 상태가 올바르게 갱신될 수 있도록 한다. 이를 위해 각 명령어는 비순차 실행이 수행되기 이전 디스패치(dispatch) 단계에서 원래의 순서대로 리오더 버퍼 엔트리를 할당 받는다. 즉, 실행되는 모든 명령어는 연산을 완료하고 파이프라인에서 커밋되기 전까지 리오더 버퍼 엔트리를 할당 받는다.The reorder buffer is a structure that stores all decoded instructions according to the program order, and by committing the instructions that have completed the operation in the original order, the structural state of the core can be updated correctly. To this end, each instruction is allocated a reorder buffer entry in the original order in the dispatch stage before out-of-order execution is performed. That is, every instruction that is executed is allocated a reorder buffer entry until it completes the operation and is committed in the pipeline.
그리고 물리 레지스터 파일은 연산을 완료한 명령어의 결과값을 저장하고 있는 구조체로서, 하나의 논리 레지스터에 다수의 물리 레지스터를 할당함으로써 동일한 논리 레지스터를 갱신하는 서로 다른 명령어 간의 비순차실행이 올바르게 이루어질 수 있도록 한다. 이를 위해 논리 레지스터를 갱신하는 모든 명령어에 대하여 디스패치 단계에서 물리 레지스터를 할당한다.In addition, the physical register file is a structure that stores the result of the instruction that has completed the operation. By allocating a number of physical registers to one logical register, the physical register file is designed to correctly execute out-of-order execution between different instructions that update the same logical register. do. For this purpose, physical registers are allocated in the dispatch stage for all instructions that update logical registers.
즉, 실행되는 모든 명령어는 연산을 완료하고 파이프라인에서 커밋되기 전까지 리오더 버퍼 엔트리를 할당 받고 있어야 하며, 그 중 논리 레지스터를 갱신하는 명령어는 이후의 명령어에 의해 동일한 논리 레지스터가 갱신될 때까지 물리 레지스터를 할당 받고 있어야 한다.In other words, all executed instructions must be allocated a reorder buffer entry until the operation is completed and committed in the pipeline. should be assigned
한편 최신 프로세서들은 코어 내부에서 프로그램의 실행 성능을 높이기 위해 프로그램에 내재된 명령어 수준의 병렬성(instruction-level parallelism, ILP)을 활용하여 데이터 의존성이 없는 다수의 명령어를 동시에 실행하는 방법을 사용하고 있다. 이때 물리 레지스터 파일의 크기가 작으면, 다른 구성 요소가 병렬성을 제공할 수 있더라도, 즉 파이프 라인 내부의 유휴 연산 자원이 충분하더라도, 물리 레지스터 파일의 부족에 의해 연산 결과를 저장할 수 없어, 병렬적으로 실행할 수 있는 명령의 수가 제한된다. 이에 최신 프로세서들은 점점 더 큰 용량의 물리 레지스터 파일을 채용하고 있다.On the other hand, modern processors use a method of simultaneously executing multiple instructions without data dependency by utilizing the instruction-level parallelism (ILP) inherent in the program to increase the execution performance of the program inside the core. At this time, if the size of the physical register file is small, even if other components can provide parallelism, that is, even if the idle computational resources inside the pipeline are sufficient, the operation result cannot be stored due to the lack of the physical register file, The number of commands that can be executed is limited. As a result, modern processors employ increasingly large physical register files.
그러나 물리 레지스터 파일은 실행되는 모든 명령어에 의해 각 명령어 당 적어도 두 번 이상 접근되기 때문에, 크기가 커질수록 칩을 구현하기 위한 트랜지스터 개수 및 전력 소모량이 증가하게 되어 전체 시스템의 구성 비용 및 전력 효율에 큰 오버헤드가 될 수 있다.However, since the physical register file is accessed at least twice for each instruction by all executed instructions, the larger the size, the greater the number of transistors and power consumption to implement the chip, which has a significant impact on the overall system configuration cost and power efficiency. It can be overhead.
본 발명의 목적은 기지정된 조건에 따른 명령어에서 물리 레지스터 파일의 물리 소스 레지스터가 조기에 릴리즈되어, 동일 명령어 내에서 물리 목적 레지스터로 즉시 재할당되도록 함으로써 작은 용량의 물리 레지스터 파일로도 높은 수준의 명령어 실행 성능을 지원할 수 있도록 하는 물리 레지스터 파일 관리 장치 및 방법을 제공하는데 있다.It is an object of the present invention to provide a high-level instruction even with a small capacity physical register file by allowing the physical source register of the physical register file to be released early in an instruction according to a predetermined condition and immediately reallocated to the physical destination register within the same instruction. An object of the present invention is to provide an apparatus and method for managing a physical register file that can support execution performance.
본 발명의 다른 목적은 물리 레지스터 파일의 물리 레지스터러를 조기 릴리즈 및 재할당하여 물리 레지스터 파일의 유효 크기를 증대시킴으로써, 제조 비용 및 전력 소비를 저감시킬 수 있는 물리 레지스터 파일 관리 장치 및 방법을 제공하는데 있다.Another object of the present invention is to provide an apparatus and method for managing a physical register file, which can reduce manufacturing cost and power consumption by increasing the effective size of the physical register file by early release and reallocation of the physical register of the physical register file. have.
상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 비순차 실행 코어의 물리 레지스터 파일 관리 장치는 상기 코어로 인가되는 다수의 명령어를 기지정된 기준에 따라 명령어 블록으로 구분하고, 구분된 명령어 블록 내에서 비최종 쓰기 명령어를 식별하며, 명령어 블록 내에서 식별된 비최종 쓰기 명령어의 논리 목적 레지스터에 쓰기된 값에 대해 유일하게 읽기 동작을 수행하는 단일 읽기 명령어를 판별하여, 물리 레지스터 파일의 다수의 물리 레지스터 중 판별된 단일 읽기 명령어에서 물리 소스 레지스터로 할당된 물리 레지스터를 동일 명령어 내의 물리 목적 레지스터로 재할당한다.In order to achieve the above object, an apparatus for managing a physical register file of an out-of-order execution core according to an embodiment of the present invention divides a plurality of instructions applied to the core into instruction blocks according to a predetermined criterion, and Identifies a non-final write command in the command block and determines a single read command that uniquely performs a read operation on the value written to the logical purpose register of the non-final write command identified within the instruction block, so that multiple physical A physical register allocated as a physical source register in a single read instruction determined among registers is reallocated as a physical destination register in the same instruction.
상기 물리 레지스터 파일 관리 장치는 상기 다수의 명령어 중 분기 명령어를 탐색하여 탐색된 분기 명령어를 기준으로 상기 다수의 명령어를 상기 명령어 블록으로 구분하고, 명령어 블록 내의 다수의 명령어 중 최종 쓰기 작업을 수행하는 최종 쓰기 명령어를 식별하는 블록 설정부; 및 상기 블록 설정부에서 식별된 최종 쓰기 명령어 이외에 명령어 블록 내에서 쓰기 작업을 수행하는 비최종 쓰기 명령어를 확인하고, 상기 비최종 쓰기 명령어의 논리 목적 레지스터에 할당된 물리 레지스터 파일의 물리 레지스터인 물리 목적 레지스터를 물리 소스 레지스터로 이용하여 물리 소스 레지스터에 쓰기된 값을 읽는 단일 읽기 명령어를 판별하며, 판별된 단일 읽기 명령어에서 물리 소스 레지스터의 값에 대한 읽기 동작이 수행되면 상기 물리 소스 레지스터가 조기에 릴리즈되어, 상기 단일 읽기 명령어에 대한 연산 결과가 저장되는 물리 목적 레지스터로 재할당되도록 하는 핸드오버부를 포함할 수 있다.The physical register file management apparatus searches for a branch instruction among the plurality of instructions, divides the plurality of instructions into the instruction block based on the searched branch instruction, and performs a final write operation among the plurality of instructions in the instruction block. a block setting unit for identifying a write command; and a physical object that is a physical register of a physical register file allocated to a logical object register of the non-final write instruction by identifying a non-final write instruction for performing a write operation within a command block in addition to the last write instruction identified in the block setting unit A single read command for reading a value written to the physical source register is determined using the register as a physical source register, and when a read operation is performed on the value of the physical source register in the determined single read command, the physical source register is released early and a handover unit for reallocating a physical object register in which an operation result of the single read command is stored.
상기 핸드오버부는 상기 코어로 인가되는 다수의 명령어가 오피 코드와 논리 소스 레지스터 및 논리 목적 레지스터 주소로 디코딩된 명령어를 인가받고, 디코딩된 명령어의 논리 소스 레지스터 및 논리 목적 레지스터 각각에 물리 레지스터 파일의 물리 레지스터를 물리 소스 레지스터 및 물리 목적 레지스터로 할당하되, 상기 단일 읽기 명령어에 대해서는 동일한 물리 레지스터를 물리 소스 레지스터 중 하나와 물리 목적 레지스터를 할당하여 리네임된 명령어를 획득할 수 있다.The handover unit receives an instruction in which a plurality of instructions applied to the core are decoded by an opcode and a logical source register and logical destination register address, and a physical register file is stored in a logical source register and a logical destination register of the decoded instruction, respectively. A register may be allocated as a physical source register and a physical object register, but for the single read instruction, a renamed instruction may be obtained by allocating the same physical register to one of the physical source registers and the physical object register.
상기 코어는 상기 리네임된 명령어를 디스패치하여 상기 단일 읽기 명령어의 물리 소스 레지스터에 저장된 값이 명령어에 대한 연산을 수행하는 연산 실행부로 전달되면, 물리 소스 레지스터를 즉시 릴리즈하고, 상기 명령어를 상기 연산 실행부로 이슈하여 연산 실행부의 연산 실행된 결과가 릴리즈된 물리 소스 레지스터에 저장되도록 하는 명령어 이슈부를 더 포함할 수 있다.When the core dispatches the renamed instruction and the value stored in the physical source register of the single read instruction is transferred to an operation execution unit that performs an operation on the instruction, the core immediately releases the physical source register and executes the operation It may further include an instruction issue unit for issuing a negative issue so that the operation execution result of the operation execution unit is stored in a released physical source register.
상기 물리 레지스터 파일 관리 장치는 적어도 하나의 명령어 블록을 엔트리로서 저장하는 블록 히스토리 테이블; 및 상기 코어에서 상기 명령어 블록에 포함된 명령어가 정상적으로 실행되는지 여부를 모니터링하여, 모든 명령어가 정상적으로 실행된 것으로 판별되면, 명령어 블록에 대응하는 모든 명령어에 대해 커밋 승인하는 블록 순서 큐를 더 포함할 수 있다.The physical register file management apparatus includes: a block history table storing at least one instruction block as an entry; and a block order queue that monitors whether the instructions included in the instruction block are normally executed in the core, and when it is determined that all instructions are normally executed, commits and approves all instructions corresponding to the instruction block. have.
상기 블록 설정부는 명령어 블록 내에 포함되는 다수의 명령어 중 첫번째 명령어에 대한 메모리 주소를 나타내는 블록 정의자와 다수의 명령어 중 최종 쓰기 작업을 수행하는 명령어의 위치 정보를 나타내는 최종 쓰기 지시자 및 분기 명령어의 위치 및 예측 분기 경로를 나타내는 분기 지시자를 상기 명령어 블록의 정보에 포함하여 상기 블록 히스토리 테이블의 엔트리에 저장하고, 상기 블록 순서 큐로부터 연속하는 동일한 명령어 블록들에 대해 기지정된 기준 커밋 횟수 이상 연속하여 커밋 승인되면, 서로 인접한 명령어 블록을 병합하고, 병합된 명령어 블록의 정보를 상기 블록 히스토리 테이블에 재저장할 수 있다.The block setting unit includes a block definer indicating a memory address for a first instruction among a plurality of instructions included in an instruction block, a last write indicator indicating location information of an instruction performing a final write operation among a plurality of instructions, and a location of a branch instruction; When a branch indicator indicating a predicted branch path is included in the information of the instruction block and stored in the entry of the block history table, and from the block order queue, when consecutive commits are approved for more than a predetermined reference commit number of consecutive identical instruction blocks , it is possible to merge adjacent instruction blocks, and restore information of the merged instruction blocks to the block history table.
상기 블록 순서 큐는 상기 명령어 블록의 명령어 중 적어도 하나에서 오류가 발생된 것으로 판별되면, 명령어 블록 내에서 오류가 발생된 명령어의 위치 정보를 블록 설정부로 전달할 수 있다.When it is determined that an error has occurred in at least one of the instructions of the instruction block, the block order queue may transmit location information of the instruction in which an error occurs in the instruction block to the block setting unit.
상기 블록 설정부는 상기 블록 순서 큐에서 전달된 오류가 발생된 명령어의 위치 정보에 기반하여 오류가 발생된 명령어 이전 분기 명령어를 기준으로 2개의 명령어 블록을 분할하고, 분할된 명령어 블록의 정보를 상기 블록 히스토리 테이블에 재저장할 수 있다.The block setting unit divides two instruction blocks based on a branch instruction before an error occurred instruction based on the location information of the instruction in which the error occurred transmitted from the block order queue, and divides the information of the divided instruction block into the block It can be restored to the history table.
상기 다른 목적을 달성하기 위한 본 발명의 다른 실시예에 따른 비순차 실행 코어의 물리 레지스터 파일 관리 방법은 상기 코어로 인가되는 다수의 명령어를 기지정된 기준에 따라 명령어 블록으로 구분하고, 구분된 명령어 블록 내에서 비최종 쓰기 명령어를 식별하며, 명령어 블록 내에서 식별된 비최종 쓰기 명령어의 논리 목적 레지스터에 쓰기된 값에 대해 유일하게 읽기 동작을 수행하는 단일 읽기 명령어를 판별하는 단계; 물리 레지스터 파일의 다수의 물리 레지스터 중 판별된 단일 읽기 명령어에서 물리 소스 레지스터로 할당된 물리 레지스터를 동일 명령어 내의 물리 목적 레지스터로 재할당하는 단계를 포함한다.In a method for managing a physical register file of an out-of-order execution core according to another embodiment of the present invention for achieving the above other object, a plurality of instructions applied to the core are divided into instruction blocks according to a predetermined criterion, and the divided instruction blocks identifying a non-final write command in the command block, and determining a single read command that uniquely performs a read operation on a value written to a logical object register of the non-last write command identified in the instruction block; and reallocating a physical register allocated as a physical source register in a determined single read instruction among a plurality of physical registers of the physical register file to a physical destination register in the same instruction.
따라서, 본 발명의 실시예에 따른 비순차 실행 코어의 물리 레지스터 파일 관리 장치 및 방법은 명령어가 반복 실행되는 프로그램의 특성을 활용하여, 다수의 명령어를 명령어 블록으로 그룹화하고, 각 명령어 블록 내부에서 기지정된 조건에 따른 명령어에 대해 물리 소스 레지스터가 조기에 릴리즈되어, 동일 명령어 내에서 물리 목적 레지스터로 즉시 재할당되도록 함으로써 작은 용량의 물리 레지스터 파일로도 높은 수준의 명령어 실행 성능을 지원할 수 있도록 관리할 수 있다. 이에 물리 레지스터 파일의 유효 크기를 증대시켜 제조 비용 및 전력 소비를 저감시킬 수 있다.Accordingly, the apparatus and method for managing a physical register file of an out-of-order execution core according to an embodiment of the present invention utilize the characteristics of a program in which instructions are repeatedly executed, group a plurality of instructions into instruction blocks, and write in each instruction block. Physical source registers are released early for instructions according to specified conditions and are immediately reallocated to physical destination registers within the same instruction, so that even a small size physical register file can be managed to support a high level of instruction execution performance. have. Accordingly, it is possible to increase the effective size of the physical register file, thereby reducing manufacturing cost and power consumption.
도 1은 본 발명의 일 실시예에 따른 비순차 실행 코어의 개략적 구조를 나타낸다.
도 2는 도 1의 비순차 실행 코어에서 물리 레지스터 파일의 유효 크기를 증가시키기 위해 물리 레지스터를 조기 릴리즈 및 재할당하는 일 예를 나타낸다.
도 3은 도 1의 비순차 실행 코어에서 물리 레지스터 파일의 유효 크기를 증가시키기 위해 물리 레지스터를 조기 릴리즈 및 재할당하는 다른 예를 나타낸다.
도 4는 도 1의 블록 설정부가 명령어 블록을 병합하거나 분할하는 과정을 설명하기 위한 도면이다.
도 5는 본 발명의 일 실시예에 따른 비순차 실행 코어의 물리 레지스터 파일 관리 방법을 나타낸다.1 shows a schematic structure of an out-of-order execution core according to an embodiment of the present invention.
FIG. 2 shows an example of early release and reallocation of physical registers to increase the effective size of a physical register file in the out-of-order execution core of FIG. 1 .
FIG. 3 shows another example of early release and reallocation of physical registers to increase the effective size of the physical register file in the out-of-order execution core of FIG. 1 .
FIG. 4 is a diagram for explaining a process of merging or dividing command blocks by the block setting unit of FIG. 1 .
5 illustrates a method for managing a physical register file of an out-of-order execution core according to an embodiment of the present invention.
본 발명과 본 발명의 동작상의 이점 및 본 발명의 실시에 의하여 달성되는 목적을 충분히 이해하기 위해서는 본 발명의 바람직한 실시예를 예시하는 첨부 도면 및 첨부 도면에 기재된 내용을 참조하여야만 한다. In order to fully understand the present invention, the operational advantages of the present invention, and the objects achieved by the practice of the present invention, reference should be made to the accompanying drawings illustrating preferred embodiments of the present invention and the contents described in the accompanying drawings.
이하, 첨부한 도면을 참조하여 본 발명의 바람직한 실시예를 설명함으로써, 본 발명을 상세히 설명한다. 그러나, 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며, 설명하는 실시예에 한정되는 것이 아니다. 그리고, 본 발명을 명확하게 설명하기 위하여 설명과 관계없는 부분은 생략되며, 도면의 동일한 참조부호는 동일한 부재임을 나타낸다. Hereinafter, the present invention will be described in detail by describing preferred embodiments of the present invention with reference to the accompanying drawings. However, the present invention may be embodied in various different forms, and is not limited to the described embodiments. In addition, in order to clearly describe the present invention, parts irrelevant to the description are omitted, and the same reference numerals in the drawings indicate the same members.
명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라, 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 "...부", "...기", "모듈", "블록" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. Throughout the specification, when a part "includes" a certain component, it means that other components may be further included, rather than excluding other components unless otherwise stated. In addition, terms such as "... unit", "... group", "module", and "block" described in the specification mean a unit that processes at least one function or operation, which is hardware, software, or hardware. and a combination of software.
도 1은 본 발명의 일 실시예에 따른 비순차 실행 코어의 개략적 구조를 나타낸다.1 shows a schematic structure of an out-of-order execution core according to an embodiment of the present invention.
도 1을 참조하면, 비순차 실행 코어는 명령어 이슈부(100), 명령어 블록화부(200), 리오더 버퍼(300), 물리 레지스터 파일(400) 및 연산 실행부(500)를 포함한다.Referring to FIG. 1 , the out-of-order execution core includes an
우선 명령어 이슈부(100)는 명령어 캐시부(110), 명령어 페치부(120), 명령어 디코더부(130), 리네임부(140) 및 디스패치부(150)를 포함할 수 있다.First, the
명령어 캐시(instruction cache)부(110)는 인가된 명령어를 임시로 저장하고, 명령어 페치(instruction fetch)부(120)는 명령어 캐시부(110)에 저장된 명령어를 순차적으로 인가받아 저장한다. 명령어 페치부(120)는 일종의 큐(queue)로서 선입 선출 방식으로 명령어를 인가받아 저장하고 출력할 수 있다. 즉 명령어 페치부(120)는 먼저 입력된 명령어를 우선 출력할 수 있다. 그리고 출력된 명령어는 명령어 페치부(120)에서 제거된다. 또한 명령어 페치부(120)는 명령어 페치 과정에서 다수의 명령어 중 분기 명령어에서 분기되는 경로에 대한 분기 예측(branch prediction)을 함께 수행할 수 있다. 분기 예측은 후술하는 명령 블록화부(200)가 명령어 블록을 설정하기 위해 이용된다.The
명령어 디코더부(130)는 명령어 페치부(120)에서 인가되는 명령어를 내부적으로 사용하는 오피 코드(Opcode)와 소스 및 목적 레지스터 주소들로 변환하여 디코딩한다. 여기에서 하나의 명령어가 가질 수 있는 목적 레지스터 수는 한 개이며, 소스 레지스터 수는 두 개이며, 목적 레지스터와 소스 레지스터는 모두 논리 레지스터이다. 변환된 명령어들은 리네임부(140)로 전달된다.The
리네임부(140)는 비순차 실행 코어에서 비순차적으로 실행되는 명령어들 사이의 데이터 의존성을 해결하기 위해 구비되는 구성으로, 논리적 레지스터를 물리 레지스터 파일(Physical Register File: 이하 PRF)(400)의 물리적 레지스터로 변환한다. 즉 명령어 디코더부(130)에서 인가된 명령 명령어의 논리적 목적 레지스터에 대해서 PRF(400)의 물리적 목적 레지스터(physical destination register)를 할당하며, 논리적 소스 레지스터에 대해서는 PRF(400)의 대응되는 물리적 소스 레지스터(physical source register)로 변환하여 준다.The
일반적으로 리네임부(140)는 논리 레지스터에서 물리 레지스터로 변환된 명령어를 바로 디스패치부(150)로 전달하지만 본 실시예에서 리네임부(140)는 명령 블록화부(200)로 전달한다. 그리고 명령 블록화부(200)에 의해 물리 레지스터가 재할당된 명령어를 디스패치부(150)로 전달한다.In general, the
디스패치부(150)는 리네임부(140)에 의해 재할당된 명령어를 인가받아 저장하고, 저장된 명령어를 순차적으로 연산 실행부(500)로 디스패치(dispatch)한다. 디스패치부(150)는 리네임부(140)에서 전달되는 명령 각각을 엔트리로 저장하며, 각 엔트리에는 오피 코드, 물리 목적 레지스터 주소, 물리 소스 레지스터 주소들이 저장될 수 있다. 디스패치부(150)는 저장된 명령어에 대해서 물리 레지스터 파일(400)의 물리 소스 레지스터들의 데이터가 모두 준비되고, 사용하고자 하는 연산 실행부(500)가 가용한 경우에, 명령어를 연산 실행부(500)로 이슈(issue)한다.The
명령어 블록화부(200)는 본 실시예의 비순차 실행 코어의 물리 레지스터 파일 관리 장치로서, 명령어 이슈부(100)에서 이슈되는 다수의 명령어를 분석하여 기지정된 방식에 따라 블록화하고, 블록화된 다수의 명령어를 분석하여, 블록 내의 다수의 명령어 중 각 논리 목적 레지스터에 대한 최종적인 쓰기 동작 명령어와 최종 쓰기가 아닌 명령어를 구분한다. 그리고 동일 블록 내에서 분석된 명령어 중 해당 논리 목적 레지스터에 쓰기된 값이 이후 다른 명령어에 의해 단지 1회의 단일 읽기 동작만이 수행되는지 확인한다. 즉 블록 내의 다수의 명령어에서 특정 물리 목적 레지스터가 특정 논리 목적 레지스터에 할당되고, 할당된 물리 목적 레지스터가 이후 다른 명령어에 의해 1회만 물리 소스 레지스터로 이용되는 경우를 판별하여, 물리 소스 레지스터로 이용하는 명령어를 탐색한다.The
물리 소스 레지스터로 이용하는 명령어가 탐색되면, 명령어 블록화부(200)는 탐색된 명령어의 물리 소스 레지스터가 동일 명령어 내의 물리 목적 레지스터로 즉시 이용되도록 재할당한다. 즉 탐색된 명령어의 물리 소스 레지스터는 읽기 작업이 수행되면 즉시 릴리즈(release)되어, 조기에 릴리즈된 물리 소스 레지스터에 연산 결과가 저장되도록 곧바로 동일 명령어 내의 물리 목적 레지스터로 재할당한다. 이는 물리 레지스터 파일의 특정 물리 레지스터가 동일 명령어 내에서 물리 소스 레지스터로 이용된 후, 곧바로 물리 목적 레지스터로 재사용될 수 있도록 다시 리네임하는 것으로 볼 수 있다.When an instruction used as a physical source register is searched for, the
상기한 바와 같이, 비순차 실행 코어에서 하나의 명령어가 가질 수 있는 목적 레지스터 수는 한 개이고 소스 레지스터 수는 두 개이므로, 기존에는 각 명령어당 서로 다른 3개의 물리 레지스터가 요구되어 할당되었다. 본 실시예에서 명령어 블록화부(200)는 탐색된 동일 명령어에서 물리 소스 레지스와 물리 목적 레지스터에 대해 물리 레지스터 파일의 서로 다른 물리 레지스터가 할당되지 않고, 동일한 물리 레지스터가 할당될 수 있도록 한다.As described above, since the number of destination registers and the number of source registers that one instruction can have in the out-of-order execution core is two, conventionally, three different physical registers are required and allocated for each instruction. In the present embodiment, the
이는 물리 레지스터 파일에서 특정 명령어 블록을 위해 할당되어야 하는 물리 레지스터의 개수를 크게 줄일 수 있도록 한다. 그러므로 물리 레지스터 파일의 유효 크기(effective size)를 증가시켜 파이프 라인 내부의 유휴 연산 자원이 충분히 활용할 수 있도록 하여 병렬성을 개선함으로써, 코어가 높은 수준의 명령어 실행 성능을 갖도록 할 수 있다. 또한 제조 비용 및 전력 소비를 저감시킬 수 있다.This allows to greatly reduce the number of physical registers that must be allocated for a particular instruction block in the physical register file. Therefore, by increasing the effective size of the physical register file so that the idle computational resources inside the pipeline can be fully utilized, parallelism is improved, so that the core can have a high level of instruction execution performance. It is also possible to reduce manufacturing cost and power consumption.
명령어 블록화부(200)는 블록 설정부(210), 블록 히스토리 테이블(220), 블록 순서 큐(230) 및 핸드오버부(240)를 포함할 수 있다.The
블록 설정부(210)는 명령어 이슈부(100)로부터 연산 실행부(500)에서 실행될 명령어를 인가받아 분석한다. 일 예로 블록 설정부(210)는 명령어 이슈부(100)의 명령어 디코더부(130)로부터 다수의 명령어를 인가받을 수 있으나, 경우에 따라, 리네임부(140) 또는 디스패치부(150)로부터 명령어를 인가받을 수 있다.The
블록 설정부(210)는 명령어가 인가되면, 블록 히스토리 테이블(Block History Table: 이하 BLHT)(220)을 탐색하여, 인가된 명령어가 포함된 명령어 블록이 BLHT(220)에 존재하는지 판별한다.When a command is applied, the
만일 명령어 블록이 존재하지 않는 것으로 판별되면, 블록 설정부(210)는 인가되는 다수의 명령어들을 블록화하여 명령어 블록을 생성한다. 여기서 블록 설정부(210)는 인가되는 다수의 명령어들 중 분기(branch) 명령어를 탐색하고, 분기 명령어가 확인되면, 분기 명령어가 인가될 때까지의 이전 명령어 전체를 하나의 명령어 그룹으로 설정한다. 그리고 설정된 명령어 블록을 BLHT(220)에 BLHT 엔트리로 할당하여 저장한다. 여기서 브랜치 명령어를 기준으로 구분되는 명령어 그룹 각각을 기본 블록(basic block)이라 한다. 즉 기본 블록은 인접한 두개의 브랜치 명령어 사이에 위치하는 다수의 명령어를 그룹화한 명령어 그룹을 의미한다.If it is determined that the command block does not exist, the
이때, 블록 설정부(210)는 BLHT 엔트리에 명령어 블록을 정의하는 블록 정의자와 명령어 블록 내부의 다수의 명령어 중 다수의 논리 레지스터 각각에 대해 최종 쓰기(last write) 작업을 수행하는 명령어를 지시하는 최종 쓰기 지시자를 포함시킬 수 있다.At this time, the
블록 설정부(210)는 우선 블록에 포함되는 다수의 명령어 중 첫번째 명령어에 대한 메모리 주소를 프로그램 카운터(program counter: 이하 PC)로부터 인가받아 블록 정의자로서 BLHT 엔트리에 포함시킬 수 있다. 그리고 다수의 명령어 중 최종 쓰기 작업을 수행하는 명령어 각각의 위치를 비트 벡터 형식으로 작성하여 최종 쓰기 지시자로서 BLHT 엔트리에 포함시킬 수 있다. 일 예로 명령어 블록에 5개의 명령어가 포함되어 있고, 이중 3번째와 4번째 명령어가 각 논리 레지스터에 대한 최종 쓰기 명령어인 경우, 블록 설정부(210)는 "00110"와 같은 비트 벡터 형식으로 최종 쓰기 지시자를 작성하여 BLHT 엔트리에 포함시킬 수 있다. 또한 블록 설정부(210)는 블록 내부의 분기 명령어의 분기 경로(branch path)를 나타내는 분기 지시자를 BLHT 엔트리에 포함시킬 수도 있다. 파이프 라인 기법에서 분기 명령어의 분기 경로는 분기 명령어의 조건이 참으로 판정되어 분기 목적지로 이동하는 테이큰(taken)과 조건이 거짓으로 판정되어 다음 명령어를 실행하는 낫테이큰(not taken)으로 구분되며, 블록 설정부(210)는 블록 내의 분기 명령어의 분기 경로를 나타내는 분기 지시자를 비트값으로 표현하여 BLHT 엔트리에 포함시킬 수 있다.The
한편, 블록 설정부(210)는 인가된 명령어가 포함된 명령어 블록이 BLHT(220)에 이미 존재하는 것으로 판별되면, 블록 순서 큐(230)로부터 전달되는 커밋 승인 신호 또는 실행 오류 신호에 따라 BLHT(220)에 저장된 다수의 BLHT 엔트리, 즉 다수의 명령어 블록 중 인접한 블록을 병합하거나, 이전 병합된 명령어 블록에서 일부 명령어 블록을 별도로 분할할 수 있다.On the other hand, when it is determined that the command block including the applied command already exists in the
BLHT(220)는 블록 설정부(210)에 의해 설정된 명령어 블록 각각을 BLHT 엔트리로서 저장한다. 그리고 BLHT(220)는 BLHT 엔트리에 기반하여 최종 쓰기 지시자와 분기 지시자에 대응하는 명령어들을 각각 ROB(300)로 전달하여 저장한다. 즉 BLHT 엔트리에 포함된 최종 쓰기 지시자와 분기 지시자에 대응하는 명령어들 각각을 ROB(300)의 엔트리로 저장한다. 또한 BLHT(220)는 블록 순서 큐(230)의 요청에 따라 저장된 BLHT 엔트리를 블록 순서 큐(230)로 전달한다.
블록 순서 큐(230)는 블록 설정부(210)에서 생성되거나 탐색된 BLHT 엔트리를 BLHT(220)로부터 인가받는다. 블록 순서 큐(230)는 BLHT 엔트리에 대응하는 명령어 블록에 포함된 다수의 명령어 중 첫번째 명령어가 디스패치부(150)에서 디스패치되면, BLHT(220)에 요청하여 대응하는 명령어 블록을 인가받아 할당하고, 명령어 블록에 포함된 모든 명령어가 연산 실행부(500)에서 정상적으로 실행되는지 모니터링한다. 그리고 명령어 블록의 모든 명령어가 정상적으로 실행된 것으로 판별되면, 명령어 블록에 포함된 명령어에 대한 커밋 승인 신호를 ROB(300)와 디스패치부(150)로 전달한다. 즉 ROB(300)와 디스패치부(150)가 해당 명령어 블록에 포함된 명령어에 대한 할당을 해제하도록 한다.The
그러나 만일 명령어 블록의 명령어가 정상적으로 실행되지 않은 것으로 판단되면, 실행 오류 신호를 ROB(300)와 디스패치부(150)로 전달하여 해당 명령어 블록의 명령어의 실행을 무효화(pipeline flush)하고, 재실행되도록 한다. 즉 명령어 블록에 포함된 명령어들에 대한 할당이 유지되도록 한다.However, if it is determined that the instruction of the instruction block is not normally executed, an execution error signal is transmitted to the
일 예로 블록 순서 큐(230)는 BLHT 엔트리에 의해 지정된 명령어 블록의 명령어를 실행 중 분기 경로에 오류가 발생하거나 예외 상황이 발생되면, 실행 오류 신호를 ROB(300)와 디스패치부(150)로 출력하여 BLHT 엔트리, 즉 명령어 블록의 모든 명령어에 대한 실행 결과를 무효화하고, 해당 명령어 블록이 재실행되도록 한다.For example, the
또한 블록 순서 큐(230)는 커밋 승인 신호 또는 실행 오류 신호를 블록 설정부(210)로 전송하여, 블록 설정부(210)가 커밋 승인 신호 또는 실행 오류 신호에 응답하여, 명령어 블록을 병합하거나 분할하도록 한다. 이때 블록 순서 큐(230)는 실행 오류 신호와 함께 명령어 블록에서 실행 오류가 발생된 명령어 정보(예를 들면 명령어 위치 정보)를 함께 블록 설정부(210)로 전달할 수 있다.In addition, the
이에 블록 설정부(210)는 동일한 명령어 블록에 대해 기지정된 기준 커밋 횟수(예를 들면 5회) 이상 커밋 승인 신호가 인가되면, 해당 명령어 블록과 인접한 다음 명령어 블록을 병합할 수 있다. 그러나 동일한 명령어 블록에 대해 기지정된 기준 오류 횟수(예를 들면 2회) 이상 실행 오류 신호가 인가되면, 해당 명령어 블록에서 실행 오류가 발생된 명령어에 인접한 이전 분기 명령어을 기준으로 명령어 블록을 분할할 수 있다. 이는 블록 설정부(210)가 상기한 바와 같이 분기 명령어를 기반으로 기본 블록을 생성하기 때문이다.Accordingly, when a commit approval signal is applied to the same command block by a predetermined reference number of commits (eg, 5 times) or more, the
핸드오버부(240)는 블록 순서 큐(230)으로부터 BLHT 엔트리를 인가받고, BLHT 엔트리로 지정된 명령어 블록에서 최종 쓰기 지시자가 지정되지 않은 명령어를 확인한다. 즉 각 논리 목적 레지스터에 대해 최종 쓰기가 아닌 명령어를 확인한다. 그리고 확인된 명령어에 의해 논리 목적 레지스터에 쓰기된 값이 이후 다른 명령어에 의해 1회의 단일 읽기 동작만이 수행되는 명령어를 확인한다.The
핸드오버부(240)는 리네임부(140)에서 논리 레지스터에서 물리 레지스터로 변환된 명령어 중 확인된 읽기 동작이 수행되는 명령어를 인가받고, 인가된 물리 목적 레지스터를 물리 소스 레지스터와 동일한 물리 레지스터가 되도록 재할당하여 리네임부(140)로 전달한다.The
여기서 핸드오버부(240)가 최종 쓰기가 아닌 명령어를 확인하는 것은 논리 목적 레지스터의 값이 명령어 블록 내에서 반드시 다시 갱신될 것이므로, 명령어 블록의 모든 연산이 완료되어 결과로 출력될 때까지 특정 물리 레지스터에 할당되어 유지되지 않아도 되기 때문이다. 또한 1회의 단일 읽기 동작만이 수행되는 명령어를 확인하는 것은 특정 물리 레지스터에 저장된 값이 읽기 동작이 수행된 이후에 재사용되지 않음을 사전에 판단함으로써, 읽기 동작이 수행된 물리 소스 레지스터를 조기에 릴리즈하여 물리 목적 레지스터로 재할당하여도 연산에 오류가 발생되지 않도록 하기 위함이다.Here, when the
ROB(300)는 BLHT(220)에 저장된 다수의 BLHT 엔트리 중 블록 설정부(210)에 의해 지정된 BLHT 엔트리에 기반하여 최종 쓰기 지시자와 분기 지시자에 대응하는 명령어들 각각을 ROB 엔트리로 저장한다. ROB(300)는 선입 선출법에 따라 다수의 명령어를 ROB 엔트리로 할당하고, 할당해제 할 수 있다.The
여기서 ROB(300)는 블록 설정부(210)에 의해 지정된 BLHT 엔트리에 기반하여 최종 쓰기 지시자와 분기 지시자에 대응하는 명령어들 각각을 ROB 엔트리로 저장한다.Here, the
본 실시예에서 명령어 블록화부(200)가 다수의 명령어를 명령어 블록으로 병합하고, 명령어 블록에 최종 쓰기 지시자를 포함시켜, BLHT 엔트리로 할당하고, ROB(300)가 최종 쓰기 지시자에 대응하는 명령을 ROB 엔트리로 할당하여 저장하는 것은 ROB(300)의 유효 크기를 증가시키기 위해서이다.In this embodiment, the
PRF(400)는 연산 실행부(500)에서 실행되는 명령어에 따라 연산되어야 하는 값과 연산이 완료된 결과값을 저장하는 구조체로서, 비순차 실행 코어에서 연산 실행 시에 하나의 논리 레지스터에 다수의 물리 레지스터를 할당함으로써 동일한 논리 레지스터를 갱신하는 서로 다른 명령어 간의 비순차실행이 올바르게 이루어질 수 있도록 한다. The
PRF(400)는 다수의 물리 레지스터로 구성되고, 다수의 물리 레지스터 각각에는 명령어의 피연산값 또는 연산 결과값이 저장될 수 있다. 여기서 특정 명령어에서 피연산값이 저장된 물리 레지스터를 물리 소스 레지스터라 하고, 명령어의 연산 결과값이 저장되는 물리 레지스터를 물리 목적 레지스터라 한다.The
PRF(400)는 디스패치부(150)에서 명령어가 이슈되면, 이슈된 명령어에 지정된 물리 소스 레지스터에 저장된 값을 읽어 연산 실행부(500)로 전달하고, 연산 실행부(500)에서 연산 결과값이 인가되면, 인가된 연산 결과값을 이슈된 명령어에 지정된 물리 목적 레지스터에 저장한다.When an instruction is issued by the
연산 실행부(500)는 디스패치부(150)로부터 이슈되는 디스패치 엔트리에 따라 연산 동작을 수행한다. 연산 실행부(500)는 디스패치 엔트리에 포함된 오피 코드와 물리 목적 레지스터 주소, 물리 소스 레지스터 주소 중 물리 소스 레지스터 주소에 따라 지정되는 PRF(400)의 물리 레지스터에 저장된 값을 읽어 피연산값을 획득하고, 획득된 피연산값을 오피 코드에 따라 연산하여 PRF(400)에서 물리 목적 레지스터 주소에 의해 지정되는 레지스터의 값을 할당하여 갱신한다.The
여기서는 설명의 편의를 위하여 연산 실행부(500)를 단일 블록으로 도시하였으나, 연산 실행부(500)는 다수의 연산 기능부로 구성될 수 있으며, 다수의 연산 기능부 각각은 오피 코드에 따라 서로 다른 기능을 수행하도록 구성될 수 있다. 연산 실행부(500)는 파이프 라인 기법에 따라 다수의 연산을 병렬로 수행할 수 있다.Herein, the
기존에는 명령어 이슈부(100)의 리네임부(140)에서 논리 레지스터를 갱신하는 명령어에 의해 PRF(400)의 물리 레지스터가 할당되며, 이후의 다른 명령어에 의해 동일한 논리 레지스터가 갱신될 때까지 물리 레지스터의 할당 유지하였다. 즉 대응하는 논리 레지스터가 갱신될 때까지 이전 할당된 물리 레지스터의 릴리즈가 이루어 지지 않았다. 이는 논리 레지스터에 할당된 물리 레지스터의 안정적으로 유지되도록 하여 연산 오류가 발생되지 않도록 하기 위함이다.Conventionally, a physical register of the
그에 반해 본 실시예에서 명령어 블록화부(200)는 물리 레지스터 파일 관리 장치로 동작하여, 상기한 조건에 따라 탐색된 명령어의 경우, 물리 소스 레지스터 주소에 따라 지정되는 PRF(400)의 물리 레지스터에 저장된 값이 읽기 동작이 수행되고 나면, 이후 명령어 블록 내에서 다시 재사용되지 않는다는 점을 감안하여, 저장된 값이 연산 실행부(500)로 전달되면 물리 레지스터가 즉시 릴리즈 되도록 한다. 그리고 릴리즈된 물리 레지스터를 곧바로 물리 목적 레지스터로 이용하여 연산 실행부(500)에서 수행된 연산 결과값이 저장되도록 함으로써 PRF(400)의 물리적 크기 증가 없이 유효 크기를 증가시키는 효과를 획득할 수 있다. 실제 비순차 실행 코어에서 실행되는 명령어를 분석한 결과, 명령어의 88%가 최종 쓰기 명령어가 아닌 명령어의 물리 목적 레지스터를 물리 소스 레지스터로 이용하는 명령어로 확인되었다. 따라서 본 실시예에 따른 물리 레지스터 파일 관리 장치는 동일한 크기의 PRF(400)를 이용하여 7.3배 더 많은 명령어에 대해 물리 레지스터를 할당할 수 있다. 즉 PRF(400)의 크기를 7.3배 증대시킨 것과 동일한 효과를 유발할 수 있다.In contrast, in the present embodiment, the
상기에서는 설명의 편의를 위하여, 블록 설정부(210)와 핸드오버부(240)를 별도의 구성으로 도시하였으나, 핸드오버부(240)는 블록 설정부(210)에 포함되어 구성될 수 있다. 또한 상기에서는 핸드오버부(240)가 리네임부(140)로부터 논리 레지스터에서 물리 레지스터로 변환된 명령어를 인가받고, 인가된 물리 레지스터를 재할당하여 리네임부(140)로 전달하는 것으로 설명하였다. 그러나 핸드오버부(240)는 단지 리네임부(140)에서 변환될 명령어가 확인된 읽기 동작이 수행되는 명령어임을 지적하는 재할당 지시자를 리네임부(140)로 전달함으로써, 리네임부(140)가 직접 해당 명령어에서 물리 소스 레지스터와 물리 목적 레지스터에 대해 동일한 물리 레지스터를 할당하도록 할 수도 있다.In the above description, for convenience of explanation, the
또한 경우에 따라서는 리네임부(140)와 핸드오버부(240)가 통합되어 구성됨으로써, 리네임부(140)와 핸드오버부(240) 중 하나가 생략될 수도 있다.Also, in some cases, since the
도 2는 도 1의 비순차 실행 코어에서 물리 레지스터 파일의 유효 크기를 증가시키기 위해 물리 레지스터를 조기 릴리즈 및 재할당하는 일 예를 나타낸다.FIG. 2 shows an example of early release and reallocation of physical registers to increase the effective size of a physical register file in the out-of-order execution core of FIG. 1 .
도 2에서 R1 ~ R4는 각각 논리 레지스터를 나타내고, P1 ~ P9는 각각 PRF의 물리 레지스터를 나타낸다. 도 2를 참조하면 (a)는 기존의 방식에 따라 블록화를 수행하지 않고, 명령어 이슈부(100)에 인가된 명령어(I1 ~ I5)를 순차적으로 나열한 경우를 나타낸다. 그리고 (b)는 인가된 5개의 명령어(I1 ~ I5)에 대해 블록화를 수행한 경우를 나타낸다. (a)와 (b)에 도시된 바와 같이, 블록화가 수행되는 경우나 블록화가 수행되지 않는 경우 모두 제1 및 제2 논리 레지스터(R1, R2)에 저장되는 제1 및 제2 명령어(I1, I2)에 의해 연산 결과값은 제3 및 제4 명령어(I3, I4)에 의해 오버라이트 되어 갱신됨을 알 수 있다. 다만, 블록화가 수행되지 않는 (a)의 경우, 제3 및 제4 명령어(I3, I4)가 제1 및 제2 논리 레지스터(R1, R2)에 대한 최종 쓰기 명령인지 판별할 수 없는 반면, 블록화가 수행된 (b)의 경우, 제3 및 제4 명령어(I3, I4)가 제1 및 제2 논리 레지스터(R1, R2)에 대한 최종 쓰기 명령으로 판별할 수 있다.In FIG. 2 , R1 to R4 represent logical registers, respectively, and P1 to P9 respectively represent physical registers of the PRF. Referring to FIG. 2 , (a) shows a case in which the commands I 1 to I 5 applied to the
한편 (c)는 블록화된 명령어 블록에 대해 기존의 PRF 관리 기법에 따라 논리 레지스터가 물리 레지스터로 변환된 명령어 블록을 나타내고, (d)는 본 실시예에 따라 논리 레지스터가 물리 레지스터로 변환된 명령어 블록을 나타낸다.Meanwhile, (c) shows an instruction block in which a logical register is converted into a physical register according to the existing PRF management technique for the blocked instruction block, and (d) is an instruction block in which a logical register is converted into a physical register according to the present embodiment. indicates
(c)의 경우, 제1 및 제2 명령어(I1, I2)의 제1 및 제2 논리 목적 레지스터(R1, R2) 각각에 제5 및 제6 물리 레지스터(P5, P6)를 각각 물리 목적 레지스터로 할당하였다. 그리고 제3 및 제4 명령어(I3, I4)가 제1 및 제2 논리 레지스터(R1, R2)에 대해서는 제7 및 제8 물리 레지스터(P7, P8)를 각각 물리 목적 레지스터로 할당하였다.In the case of (c), the fifth and sixth physical registers P5 and P6 are physically written to the first and second logical object registers R1 and R2 of the first and second instructions I 1 and I 2 , respectively. It is allocated as a destination register. In addition, the third and fourth instructions I 3 and I 4 allocate the seventh and eighth physical registers P7 and P8 as physical object registers for the first and second logical registers R1 and R2, respectively.
그러나 (c)에서 제1 명령어(I1)의 제1 논리 목적 레지스터(R1)는 명령어 블록 내에서 제1 명령어(I3)에 의해 갱신되므로, 최종 쓰기 명령이 아니다. 그리고 제1 명령어(I1)에서 할당된 제5 물리 레지스터(P5)의 경우, 제2 명령어(I2)의 물리 소스 레지스터로서 1회만 이용되고, 이후 명령어 블록내에서 다시 이용되지 않는다. 즉 제5 물리 레지스터(P5)는 제2 명령어(I2)에서 읽혀진 이후에는 사용되지 않는다. 그럼에도 불구하고, 기존에는 (c)에 도시된 바와 같이, 제5 물리 레지스터(P5)를 릴리즈하지 않음에 따라 제2 명령어(I2)의 제2 논리 목적 레지스터(R2)로서 제6 물리 레지스터(P5)를 추가로 할당하였다.However, (c) a first logical destination register (R1) of the first instruction (I 1) in the are updated by the first instruction (I 3) in the block of instructions, it is not a final write command. In addition, in the case of the fifth physical register P5 allocated in the first instruction I 1 , it is used only once as a physical source register of the second instruction I 2 , and is not used again in the instruction block thereafter. That is, the fifth physical register P5 is not used after being read from the second instruction I 2 . Nevertheless, conventionally, as shown in (c), as the fifth physical register (P5) is not released, the sixth physical register ( R2) as the second logical object register (R2) of the second instruction (I 2 ) P5) was further allocated.
그에 비해 본 실시예에 따른 (d)를 살펴보면, 제2 명령어(I2)에서 물리 소스 레지스터로 이용되어 저장된 값이 읽혀진 제5 물리 레지스터(P5)를 즉시 릴리즈하고, 릴리즈된 제5 물리 레지스터(P5)를 제2 논리 목적 레지스터(R2)에 재할당하였다. (d)에서는 제2 명령어(I2)에서 재할당된 제5 물리 레지스터(P5')를 제1 명령어(I1)에서 할당된 제5 물리 레지스터(P5)와 차별화하기 위해 ' 표시를 추가하였다. 즉 재할당된 제5 물리 레지스터(P5')는 제5 물리 레지스터(P5)와 별개의 값을 저장하는 물리 레지스터이다.In contrast, looking at (d) according to the present embodiment, the fifth physical register P5 from which the stored value is read by being used as a physical source register in the second instruction I 2 is immediately released, and the released fifth physical register ( P5) is reallocated to the second logical object register R2. In (d), a ' mark is added to differentiate the fifth physical register (P5') reallocated in the second instruction (I 2 ) from the fifth physical register (P5) allocated in the first instruction (I 1 ). . That is, the reallocated fifth physical register P5' is a physical register that stores a value separate from the fifth physical register P5.
그리고 제2 명령어(I2)의 제2 논리 목적 레지스터(R2)에 제5 물리 레지스터(P5')가 재할당됨에 따라 제2 논리 목적 레지스터(R2)를 논리 소스 레지스터로 이용하는 제3 및 제4 명령어(I3, I4)는 재할당된 제5 물리 레지스터(P5')를 물리 소스 레지스터로 이용함을 알 수 있다.And as the fifth physical register P5' is reallocated to the second logical object register R2 of the second instruction I 2 , third and fourth using the second logical object register R2 as a logical source register It can be seen that the instructions I 3 and I 4 use the reallocated fifth physical register P5' as a physical source register.
결과적으로 본 실시예에 따른 비순차 실행 코어의 물리 레지스터 파일 관리 장치에 따르면, 제6 물리 레지스터(P6)를 여분의 물리 레지스터로 활용할 수 있게 되므로 물리적인 크기 증가 없이 물리 레지스터 파일의 유효 크기를 증가시켜 비순차 실행 코어의 실행 성능을 향상시킬 수 있다.As a result, according to the apparatus for managing the physical register file of the out-of-order execution core according to the present embodiment, since the sixth physical register P6 can be used as an extra physical register, the effective size of the physical register file is increased without increasing the physical size. to improve the execution performance of out-of-order execution cores.
도 3은 도 1의 비순차 실행 코어에서 물리 레지스터 파일의 유효 크기를 증가시키기 위해 물리 레지스터를 조기 릴리즈 및 재할당하는 다른 예를 나타낸다.FIG. 3 shows another example of early release and reallocation of physical registers to increase the effective size of the physical register file in the out-of-order execution core of FIG. 1 .
도 3에서 (a)는 다수의 명령어로 구성된 명령어 블록을 나타내고, (b)는 기존의 PRF 관리 기법에 따라 논리 레지스터가 물리 레지스터로 변환된 명령어 블록을 나타내며, (c)는 본 실시예에 따라 물리 레지스터로 변환된 명령어 블록을 나타낸다.In FIG. 3, (a) shows an instruction block composed of a plurality of instructions, (b) shows an instruction block in which logical registers are converted into physical registers according to the existing PRF management technique, (c) shows an instruction block according to the present embodiment Represents an instruction block converted to a physical register.
도 2에서는 단순한 예로서 제1 명령어(I1)의 제1 논리 목적 레지스터(R1)에 할당된 제5 물리 레지스터(P5)가 제2 명령어(I2)의 제2 논리 목적 레지스터(R2)에 재할당됨으로써, 제6 물리 레지스터(P6) 하나가 여분으로 더 이용될 수 있는 경우를 도시하였다.In FIG. 2 , as a simple example, the fifth physical register P5 allocated to the first logical object register R1 of the first instruction I 1 is stored in the second logical object register R2 of the second instruction I 2 . A case in which one sixth physical register P6 can be used in excess by reallocation is illustrated.
그러나, 재할당된 물리 레지스터는 명령어가 상기한 조건을 만족하는 경우 반복적으로 계속 재할당될 수 있다.However, the reallocated physical register may continue to be reallocated repeatedly if the instruction satisfies the above condition.
도 3의 (c)를 참조하면, 제1 명령어(I1)에서 논리 목적 레지스터로 할당되고, 제2 명령어(I2)에서 논리 목적 레지스터로 재할당된 제1 물리 레지스터(P1, P1')는 상기한 조건을 만족하는 경우, 반복적으로 추가 재할당될 수 있다. 도 3의 (c)에서 제2 명령어(I2)에서 재할당된 제1 물리 레지스터(P1')는 제3 명령어(I3)에서 추가로 재할당됨으로써, 하나의 명령어 블록에서 3번 반복하여 할당되었으며, 이로 인해 PRF(400)에서 2개의 물리 레지스터를 여분으로 더 활용할 수 있게 되었다.Referring to (c) of FIG. 3 , first physical registers P1 and P1' allocated as logical object registers in the first instruction I 1 and reallocated as logical object registers in the second instruction I 2 . may be iteratively additionally reassigned when the above conditions are satisfied. In (c) of FIG. 3 , the first physical register P1 ′ reallocated in the second instruction I 2 is further reallocated in the third instruction I 3 , thereby repeating three times in one instruction block. has been allocated, so that the
그리고 본 실시예에 따른 PRF(400)의 유효 크기는 명령어 블록의 크기가 커질수록 더욱 효과적 증가될 수 있다. 이는 명령어 블록의 크기가 커질수록 명령어 블록 내의 전체 명령어 개수에 비해 최종 쓰기 명령어 개수의 비율이 줄어들기 때문이다.In addition, the effective size of the
도 4는 도 1의 블록 설정부가 명령어 블록을 병합하거나 분할하는 과정을 설명하기 위한 도면이다.FIG. 4 is a diagram for explaining a process of merging or dividing command blocks by the block setting unit of FIG. 1 .
도 4에서 (a)는 프로그램에서 분기 명령어를 기준으로 구분된 블록(B1 ~ B6)에 따른 제어 흐름 그래프를 나타낸다. (a)에 도시된 바와 같이, 프로그램에는 다수의 분기 명령어(B1 ~ B6)가 포함될 수 있으며, 다수의 분기 명령어(B1 ~ B6)는 다음 실행될 명령어에 대한 분기가 수행될 수 있다. (a)에서는 제1 분기 명령어(B1)가 낫테이큰(NT)되어 분기되고, 제3 분기 명령어(B3)에서는 테이큰(T)되어 분기되며, 제4 분기 명령어(B4)에서도 테이큰(T)되어 제6 분기 명령어(B6) 방향으로 분기되는 경로로 프로그램이 실행되는 경우를 나타내고 있다.4(a) shows a control flow graph according to blocks B1 to B6 divided based on a branch instruction in a program. As shown in (a), a program may include a plurality of branch instructions B1 to B6, and the plurality of branch instructions B1 to B6 may be branched to an instruction to be next executed. In (a), the first branch instruction B1 is not taken (NT) and branched, and in the third branch instruction (B3), it is taken and branched, and the fourth branch instruction (B4) is also taken (T). A case in which the program is executed by a path branching in the direction of the sixth branch instruction B6 is shown.
그리고 블록 설정부(210)는 (b)의 좌측에 도시된 바와 같이, 분기 명령어(B1 ~ B6)를 기준으로 다수의 명령어 블록(iB1 ~ iB6)을 생성할 수 있다. 이때 다수의 명령어 블록(iB1 ~ iB6) 각각은 대응하는 하나의 분기 명령어(B1 ~ B6)가 포함된 기준 블록이며, 각 분기 명령어(B1 ~ B6)의 분기 경로는 미리 예측되어 있다.In addition, the
그리고 동일 분기 경로가 선택되어 동일한 명령어 블록에 대해 기지정된 기준 커밋 횟수(여기서는 일 예로 5회) 이상 커밋 승인 신호가 인가되면, 분기 경로 상에서 서로 인접한 명령어 블록들을 서로 결합한다. (b)에서는 가운데 도시된 바와 같이, 제3 명령어 블록(iB3)과 제6 명령어 블록(iB3)이 각각 제1 명령어 블록(iB1)과 제4 명령어 블록(iB4)에 병합되었다. 그리고 이후에도 연속하여 동일 분기 경로로 커밋 승인 신호가 인가되면, (b)의 오른쪽에 도시된 바와 같이, 병합된 명령어 블록들(iB1, iB4)를 다시 하나의 명령어 블록(iB1)으로 병합할 수 있다.In addition, when the same branch path is selected and a commit approval signal is applied more than a predetermined reference number of commits (here, for example, 5 times) or more for the same instruction block, instruction blocks adjacent to each other on the branch path are combined with each other. In (b), as shown in the middle, the third instruction block iB3 and the sixth instruction block iB3 are merged into the first instruction block iB1 and the fourth instruction block iB4, respectively. And even after that, if a commit approval signal is continuously applied to the same branch path, as shown on the right side of (b), the merged instruction blocks iB1 and iB4 can be merged back into one instruction block iB1. .
한편, 병합된 하나의 명령어 블록(iB1)을 반복하여 실행하는 동안 명령어 블록(iB1) 내의 특정 위치(여기서는 일 예로 기존의 제4 명령어 블록(iB4)의 명령어)에서 기지정된 기준 오류 횟수(예를 들면 2회) 이상 실행 오류 신호가 인가되면, 오류가 발생된 위치의 명령어가 포함된 기준 블록(iB4) 이전 기준 블록(iB3)에서 병합된 명령어 블록(iB1)을 분할하고, 다른 분기 경로 상의 제5 명령어 블록(iB5)으로 분기 경로를 변경할 수 있다.On the other hand, while repeatedly executing one merged instruction block (iB1), a predetermined reference error count (for example, If an execution error signal is applied more than twice), the merged instruction block (iB1) is divided from the reference block (iB3) before the reference block (iB4) containing the instruction at the location where the error occurred, and the second on the other branch path is divided. The branch path can be changed with 5 instruction blocks (iB5).
도시하지 않았으나, 변경된 분기 경로에서 다시 기준 커밋 횟수 이상 커밋 승인 신호가 인가되면, 블록 설정부(210)는 제5 명령어 블록(iB5)을 병합된 명령어 블록(iB1)에 추가 병합할 수 있다.Although not shown, when the commit approval signal is applied again by the reference commit number or more in the changed branch path, the
이러한 과정을 프로그램에서 요구되는 횟수동안 반복 실행함으로써, 블록 설정부(210)는 최적의 명령어 블록 조합을 획득할 수 있다.By repeating this process for a number of times required by the program, the
프로그램 명령어의 경우, 컴파일러가 컴파일을 수행하는 동안 다수의 명령어를 블록화 시키는 경우도 있으나, 컴파일러는 명령어를 실행하지 않기 때문에 실질적인 블록화가 수행될 수 없다. 즉 여러 분기 명령어나 예외 상황을 고려하여 블록화를 할 수 없어 최적의 명령어 블록을 획득할 수 없다는 한계가 있다. 그러나 상기한 바와 같이, 본 실시예에서는 프로그램 명령어가 반복 실행된다는 점에 기반하여, 이전 명령어 블록의 실행 결과를 기반으로 블록화를 수행하므로, 명령어 블록을 최적화할 수 있다.In the case of program instructions, although the compiler may block a number of instructions while compiling, actual blocking cannot be performed because the compiler does not execute the instructions. That is, there is a limitation in that it is impossible to obtain an optimal instruction block because blockization cannot be performed in consideration of several branch instructions or exception conditions. However, as described above, in the present embodiment, since the block is performed based on the execution result of the previous instruction block based on the fact that the program instruction is repeatedly executed, the instruction block can be optimized.
도 5는 본 발명의 일 실시예에 따른 비순차 실행 코어의 물리 레지스터 파일 관리 방법을 나타낸다.5 illustrates a method for managing a physical register file of an out-of-order execution core according to an embodiment of the present invention.
도 1 내지 도 4를 참조하여, 도 5의 물리 레지스터 파일 관리 방법을 설명하면, 우선 미리 작성된 프로그램에 따른 다수의 명령어가 인가된다(S11). 인가된 다수의 명령어는 명령어 이슈부(100)에 의해 페치되고 디코딩된다. 물리 레지스터 파일 관리 장치인 명령어 블록화부(200)는 디코딩된 명령어를 인가받아 블록화한다(S12). 명령어 블록화부(200)는 디코딩된 다수의 명령어 중 분기 명령어를 탐색하여 탐색된 분기 명령어를 기준으로 명령어를 명령어 블록으로 블록화할 수 있다. 명령어 블록화부(200)는 디코딩된 명령어를 인가받을 수도 있으나, 경우에 따라서는 디코딩된 명령어의 논리 레지스터에 물리 레지스터 파일의 물리 레지스터가 할당되어 리네임된 명령어를 인가받을 수도 있다.Referring to FIGS. 1 to 4 , the physical register file management method of FIG. 5 is described. First, a plurality of instructions according to a pre-written program are applied ( S11 ). The applied plurality of instructions are fetched and decoded by the
명령어가 블록화되면, 물리 레지스터 파일 관리 장치는 명령어 블록 내의 명령어를 분석하여, 블록 내의 다수의 명령어 중 각 논리 목적 레지스터에 대한 최종 쓰기가 아닌 명령어인 비최종 쓰기 명령어를 식별한다(S13). 그리고 식별된 비최종 쓰기 명령어에 의해 논리 목적 레지스터에 쓰기된 값이 명령어 블록 내의 전체 명령어에서 단지 1회의 단일 읽기 동작만이 수행되는지 확인하여, 해당 값에 읽기 동작을 수행하는 단일 읽기 명령어를 판별한다(S14).When the instruction is blocked, the physical register file management apparatus analyzes the instruction in the instruction block, and identifies a non-final write instruction that is not a final write to each logical object register among a plurality of instructions in the block ( S13 ). Then, the value written to the logical object register by the identified non-final write instruction is checked whether only one single read operation is performed in all instructions in the instruction block, and a single read instruction that performs a read operation on the value is determined. (S14).
여기서 비최종 쓰기 명령어는 식별된 비최종 쓰기 명령어에서 논리 목적 레지스터에 물리 레지스터 파일의 물리 레지스터를 물리 목적 레지스터로 할당하여 리네임되며, 단일 읽기 명령어는 식별된 비최종 쓰기 명령어에서 리네임된 물리 목적 레지스터가 물리 소스 레지스터로 이용되도록 리네임 되는 명령어이다.Here, the non-last write instruction is renamed by allocating the physical register of the physical register file to the logical object register in the identified non-last write instruction as a physical object register, and a single read instruction is renamed from the identified non-last write instruction to the physical object renamed. This is an instruction whose register is renamed to be used as a physical source register.
그리고 본 실시예의 물리 레지스터 파일 관리 장치는 단일 읽기 명령어의 물리 소스 레지스터가 동일 명령어 내에서 물리 목적 레지스터로 재할당한다(S15). 즉 하나의 명령어 내에서 물리 소스 레지스터가 물리 목적 레지스터로 다시 이용될 수 있도록 재할당하여 리네임할 수 있다.And, in the physical register file management apparatus of this embodiment, the physical source register of a single read command is reallocated to a physical object register within the same command (S15). That is, within one instruction, a physical source register can be re-allocated and renamed so that it can be used again as a physical object register.
이후 명령어 이슈부(100)에서 판별된 명령어가 디스패치되는지 판별한다(S16). 만일 판별된 명령어가 디스패치되면, 할당된 물리 소스 레지스터에 저장된 값을 읽어 연산 실행부(500)로 전달하여 연산이 실행되도록 하고, 물리 소스 레지스터를 조기에 즉시 릴리즈하여 재사용할 수 있도록 한다(S17).Thereafter, it is determined whether the command determined by the
그리고 연산 실행부(500)는 명령어 이슈부(100)에서 이슈된 명령어와 물리 소스 레지스터에서 읽은 값을 이용하여 명령어에 대응하는 연산을 실행한다(S18). 연산 실행부(500)에서 연산이 실행되어 연산 결과가 획득되면, 연산 결과를 재할당된 물리 목적 레지스터, 즉 물리 레지스터 파일에서 물리 소스 레지스터와 동일한 물리 레지스터에 저장한다(S19).Then, the
이후 연산 결과에 따라 명령어 블록을 최적화한다(S20). 여기서 연산 최적화는 다수의 명령어로 구성된 명령어 블록의 연산이 정상적으로 실행된 횟수 또는 정상적으로 실행되지 않은 오류 횟수를 기반으로 인접한 명령어 블록을 병합하거나 분할하여 최적화할 수 있다.Thereafter, the instruction block is optimized according to the operation result (S20). Here, the operation optimization may be optimized by merging or dividing adjacent instruction blocks based on the number of times the operation of the instruction block composed of a plurality of instructions is normally executed or the number of errors that are not normally executed.
다만 상기한 명령어 블록의 최적화는 명령어 블록의 크기를 증가시켜 물리 레지스터 파일 관리의 효율성을 더욱 높이기 위한 것이므로, 경우에 따라 생략될 수도 있다.However, since the above-described optimization of the instruction block is to further increase the efficiency of the physical register file management by increasing the size of the instruction block, it may be omitted in some cases.
본 발명에 따른 방법은 컴퓨터에서 실행시키기 위한 매체에 저장된 컴퓨터 프로그램으로 구현될 수 있다. 여기서 컴퓨터 판독가능 매체는 컴퓨터에 의해 액세스 될 수 있는 임의의 가용 매체일 수 있고, 또한 컴퓨터 저장 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함하며, ROM(판독 전용 메모리), RAM(랜덤 액세스 메모리), CD(컴팩트 디스크)-ROM, DVD(디지털 비디오 디스크)-ROM, 자기 테이프, 플로피 디스크, 광데이터 저장장치 등을 포함할 수 있다.The method according to the present invention may be implemented as a computer program stored in a medium for execution by a computer. Here, the computer-readable medium may be any available medium that can be accessed by a computer, and may include all computer storage media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, and read dedicated memory), RAM (Random Access Memory), CD (Compact Disk)-ROM, DVD (Digital Video Disk)-ROM, magnetic tape, floppy disk, optical data storage, and the like.
본 발명은 도면에 도시된 실시예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다.Although the present invention has been described with reference to the embodiment shown in the drawings, which is merely exemplary, those skilled in the art will understand that various modifications and equivalent other embodiments are possible therefrom.
따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 청구범위의 기술적 사상에 의해 정해져야 할 것이다.Accordingly, the true technical protection scope of the present invention should be defined by the technical spirit of the appended claims.
100: 명령어 이슈부 200: 명령어 블록화부
300: 리오더 버퍼 400: 물리 레지스터 파일
500: 연산 실행부 110: 명령어 캐시부
120: 명령어 페치부 130: 명령어 디코더부
140: 리네임부 150: 디스패치부
210: 블록 설정부 220: 블록 히스토리 테이블
230: 블록 순서 큐 240: 핸드오버부100: instruction issue unit 200: instruction block unit
300: reorder buffer 400: physical register file
500: operation execution unit 110: instruction cache unit
120: instruction fetch unit 130: instruction decoder unit
140: rename unit 150: dispatch unit
210: block setting unit 220: block history table
230: block order queue 240: handover unit
Claims (16)
상기 코어로 인가되는 다수의 명령어를 기지정된 기준에 따라 명령어 블록으로 구분하고, 구분된 명령어 블록 내에서 비최종 쓰기 명령어를 식별하며, 명령어 블록 내에서 식별된 비최종 쓰기 명령어의 논리 목적 레지스터에 쓰기된 값에 대해 유일하게 읽기 동작을 수행하는 단일 읽기 명령어를 판별하여, 물리 레지스터 파일의 다수의 물리 레지스터 중 판별된 단일 읽기 명령어에서 물리 소스 레지스터로 할당된 물리 레지스터를 동일 명령어 내의 물리 목적 레지스터로 재할당하는 물리 레지스터 파일 관리 장치.A device for managing a physical register file of an out-of-order execution core, comprising:
Classifies a plurality of instructions applied to the core into instruction blocks according to a predetermined criterion, identifies a non-final write instruction within the divided instruction block, and writes to a logical object register of the non-final write instruction identified within the instruction block Determines a single read command that uniquely performs a read operation on the value specified, and rewrites the physical register allocated as a physical source register in a single read command among multiple physical registers of the physical register file to a physical object register within the same instruction. Allocating physical register file management device.
상기 다수의 명령어 중 분기 명령어를 탐색하여 탐색된 분기 명령어를 기준으로 상기 다수의 명령어를 상기 명령어 블록으로 구분하고, 명령어 블록 내의 다수의 명령어 중 최종 쓰기 작업을 수행하는 최종 쓰기 명령어를 식별하는 블록 설정부; 및
상기 블록 설정부에서 식별된 최종 쓰기 명령어 이외에 명령어 블록 내에서 쓰기 작업을 수행하는 비최종 쓰기 명령어를 확인하고, 상기 비최종 쓰기 명령어의 논리 목적 레지스터에 할당된 물리 레지스터 파일의 물리 레지스터인 물리 목적 레지스터를 물리 소스 레지스터로 이용하여 물리 소스 레지스터에 쓰기된 값을 읽는 단일 읽기 명령어를 판별하며, 판별된 단일 읽기 명령어에서 물리 소스 레지스터의 값에 대한 읽기 동작이 수행되면 상기 물리 소스 레지스터가 조기에 릴리즈되어, 상기 단일 읽기 명령어에 대한 연산 결과가 저장되는 물리 목적 레지스터로 재할당되도록 하는 핸드오버부를 포함하는 물리 레지스터 파일 관리 장치.The apparatus of claim 1, wherein the physical register file management device is
A block setting for searching for a branch instruction among the plurality of instructions, classifying the plurality of instructions into the instruction block based on the searched branch instruction, and identifying a last write instruction performing a final write operation among the plurality of instructions in the instruction block wealth; and
In addition to the last write command identified in the block setting unit, a non-final write command that performs a write operation within a command block is checked, and a physical register that is a physical register of a physical register file allocated to a logical target register of the non-final write command. is used as a physical source register to determine a single read command that reads the value written to the physical source register, and when a read operation is performed on the value of the physical source register in the determined single read command, the physical source register is released early , a physical register file management apparatus comprising a handover unit for reallocating a physical object register in which an operation result of the single read command is stored.
상기 코어로 인가되는 다수의 명령어가 오피 코드와 논리 소스 레지스터 및 논리 목적 레지스터 주소로 디코딩된 명령어를 인가받고, 디코딩된 명령어의 논리 소스 레지스터 및 논리 목적 레지스터 각각에 물리 레지스터 파일의 물리 레지스터를 물리 소스 레지스터 및 물리 목적 레지스터로 할당하되, 상기 단일 읽기 명령어에 대해서는 동일한 물리 레지스터를 물리 소스 레지스터 중 하나와 물리 목적 레지스터를 할당하여 리네임된 명령어를 획득하는 물리 레지스터 파일 관리 장치.The method of claim 2, wherein the handover unit
A plurality of instructions applied to the core receives the decoded instruction as an opcode and a logical source register and logical destination register address, and a physical register of a physical register file is stored in each of the logical source register and logical object register of the decoded instruction as a physical source. A physical register file management apparatus for allocating a register and a physical object register, wherein for the single read instruction, the same physical register is allocated to one of a physical source register and a physical object register to obtain a renamed instruction.
상기 리네임된 명령어를 디스패치하여 상기 단일 읽기 명령어의 물리 소스 레지스터에 저장된 값이 명령어에 대한 연산을 수행하는 연산 실행부로 전달되면, 물리 소스 레지스터를 즉시 릴리즈하고, 상기 명령어를 상기 연산 실행부로 이슈하여 연산 실행부의 연산 실행된 결과가 릴리즈된 물리 소스 레지스터에 저장되도록 하는 명령어 이슈부를 더 포함하는 물리 레지스터 파일 관리 장치.4. The method of claim 3, wherein the core is
When the value stored in the physical source register of the single read instruction by dispatching the renamed instruction is transferred to the operation execution unit that performs the operation on the instruction, the physical source register is immediately released, and the instruction is issued to the operation execution unit. The physical register file management apparatus further comprising an instruction issue unit configured to store an operation execution result of the operation execution unit in a released physical source register.
적어도 하나의 명령어 블록을 엔트리로서 저장하는 블록 히스토리 테이블; 및
상기 코어에서 상기 명령어 블록에 포함된 명령어가 정상적으로 실행되는지 여부를 모니터링하여, 모든 명령어가 정상적으로 실행된 것으로 판별되면, 명령어 블록에 대응하는 모든 명령어에 대해 커밋 승인하는 블록 순서 큐를 더 포함하는 물리 레지스터 파일 관리 장치.4. The apparatus of claim 3, wherein the physical register file management device comprises:
a block history table storing at least one instruction block as an entry; and
The core monitors whether instructions included in the instruction block are normally executed, and when it is determined that all instructions have been normally executed, a physical register further comprising a block order queue that approves commits for all instructions corresponding to the instruction block file management device.
명령어 블록 내에 포함되는 다수의 명령어 중 첫번째 명령어에 대한 메모리 주소를 나타내는 블록 정의자와 다수의 명령어 중 최종 쓰기 작업을 수행하는 명령어의 위치 정보를 나타내는 최종 쓰기 지시자 및 분기 명령어의 위치 및 예측 분기 경로를 나타내는 분기 지시자를 상기 명령어 블록의 정보에 포함하여 상기 블록 히스토리 테이블의 엔트리에 저장하고,
상기 블록 순서 큐로부터 연속하는 동일한 명령어 블록들에 대해 기지정된 기준 커밋 횟수 이상 연속하여 커밋 승인되면, 서로 인접한 명령어 블록을 병합하고, 병합된 명령어 블록의 정보를 상기 블록 히스토리 테이블에 재저장하는 물리 레지스터 파일 관리 장치.The method of claim 5, wherein the block setting unit
The block definer indicating the memory address of the first instruction among the plurality of instructions included in the instruction block, the last write indicator indicating the location information of the instruction performing the last write operation among the plurality of instructions, and the location and predicted branch path of the branch instruction storing the indicated branch indicator in the information of the instruction block in the entry of the block history table,
A physical register for merging adjacent instruction blocks and restoring information of the merged instruction blocks to the block history table when commits are continuously approved for more than a predetermined reference commit number of consecutive identical instruction blocks from the block order queue file management device.
상기 명령어 블록의 명령어 중 적어도 하나에서 오류가 발생된 것으로 판별되면, 명령어 블록 내에서 오류가 발생된 명령어의 위치 정보를 블록 설정부로 전달하는 물리 레지스터 파일 관리 장치.7. The method of claim 6, wherein the block order queue is
When it is determined that an error has occurred in at least one of the instructions of the instruction block, the apparatus for managing a physical register file transfers location information of an error occurring instruction in the instruction block to a block setting unit.
상기 블록 순서 큐에서 전달된 오류가 발생된 명령어의 위치 정보에 기반하여 오류가 발생된 명령어 이전 분기 명령어를 기준으로 2개의 명령어 블록을 분할하고, 분할된 명령어 블록의 정보를 상기 블록 히스토리 테이블에 재저장하는 물리 레지스터 파일 관리 장치.The method of claim 7, wherein the block setting unit
Based on the location information of the instruction in which the error occurred transmitted from the block order queue, two instruction blocks are divided based on the branch instruction before the instruction in which the error occurred, and the information of the divided instruction block is rewritten in the block history table. Physical register file management device that stores.
상기 코어로 인가되는 다수의 명령어를 기지정된 기준에 따라 명령어 블록으로 구분하고, 구분된 명령어 블록 내에서 비최종 쓰기 명령어를 식별하며, 명령어 블록 내에서 식별된 비최종 쓰기 명령어의 논리 목적 레지스터에 쓰기된 값에 대해 유일하게 읽기 동작을 수행하는 단일 읽기 명령어를 판별하는 단계;
물리 레지스터 파일의 다수의 물리 레지스터 중 판별된 단일 읽기 명령어에서 물리 소스 레지스터로 할당된 물리 레지스터를 동일 명령어 내의 물리 목적 레지스터로 재할당하는 단계를 포함하는 물리 레지스터 파일 관리 방법.A physical register file management method performed in a physical register file management device of an out-of-order execution core, comprising:
Classifies a plurality of instructions applied to the core into instruction blocks according to a predetermined criterion, identifies a non-final write instruction within the divided instruction block, and writes to a logical object register of the non-final write instruction identified within the instruction block determining a single read command that uniquely performs a read operation on the read value;
A physical register file management method comprising reallocating a physical register allocated as a physical source register in a determined single read instruction among a plurality of physical registers of a physical register file to a physical object register in the same instruction.
상기 다수의 명령어 중 분기 명령어를 탐색하여 탐색된 분기 명령어를 기준으로 상기 다수의 명령어를 상기 명령어 블록으로 구분하는 단계;
명령어 블록 내의 다수의 명령어 중 최종 쓰기 작업을 수행하는 최종 쓰기 명령어와 최종 쓰기 명령어 이외에 명령어 블록 내에서 쓰기 작업을 수행하는 비최종 쓰기 명령어를 구분하는 단계;
상기 비최종 쓰기 명령어의 논리 목적 레지스터에 할당된 물리 레지스터 파일의 물리 레지스터인 물리 목적 레지스터를 물리 소스 레지스터로 이용하여 물리 소스 레지스터에 쓰기된 값을 읽는 단일 읽기 명령어를 판별하는 단계를 포함하는 물리 레지스터 파일 관리 방법.The method of claim 9, wherein determining the single read command comprises:
searching for a branch instruction among the plurality of instructions and classifying the plurality of instructions into the instruction block based on the searched branch instruction;
distinguishing between a final write command for performing a final write operation among a plurality of commands in the command block and a non-final write command for performing a write operation in the command block in addition to the final write command;
and determining a single read command for reading a value written to a physical source register by using a physical object register, which is a physical register of a physical register file allocated to the logical object register of the non-final write instruction, as a physical source register; How to manage files.
상기 코어로 인가되는 다수의 명령어가 오피 코드와 논리 소스 레지스터 및 논리 목적 레지스터 주소로 디코딩된 명령어의 논리 소스 레지스터 및 논리 목적 레지스터 각각에 물리 레지스터 파일의 물리 레지스터를 물리 소스 레지스터 및 물리 목적 레지스터로 할당하되, 상기 단일 읽기 명령어에 대해서는 동일한 물리 레지스터를 물리 소스 레지스터 중 하나와 물리 목적 레지스터를 할당하여 리네임된 명령어를 획득하는 물리 레지스터 파일 관리 방법.The method of claim 10, wherein the reallocating to the physical destination register comprises:
Physical registers of the physical register file are allocated as physical source registers and physical object registers, respectively, to logical source registers and logical destination registers of instructions in which a plurality of instructions applied to the core are decoded into opcodes and logical source registers and logical destination register addresses However, for the single read command, a physical register file management method for acquiring the renamed command by allocating the same physical register with one of the physical source registers and the physical destination register.
상기 리네임된 명령어를 디스패치하여 상기 단일 읽기 명령어의 물리 소스 레지스터에 저장된 값을 명령어에 대응하는 연산이 수행을 수행하기 위해 읽는 단계;
상기 물리 소스 레지스터에 저장된 값을 읽은 후 즉시 물리 소스 레지스터를 릴리즈하는 단계; 및
상기 명령어에 대응하는 연산 실행된 결과를 물리 목적 레지스터로 지정된 릴리즈된 물리 소스 레지스터에 저장하는 단계를 더 포함하는 물리 레지스터 파일 관리 방법.12. The method of claim 11, wherein the physical register file management method comprises:
dispatching the renamed instruction to read a value stored in a physical source register of the single read instruction to perform an operation corresponding to the instruction;
releasing the physical source register immediately after reading the value stored in the physical source register; and
and storing the result of the operation corresponding to the instruction in a released physical source register designated as a physical object register.
상기 코어로 인가되는 명령어가 포함된 명령어 블록이 각각 다수의 명령어를 포함하는 적어도 하나의 명령어 블록을 엔트리로서 저장하는 블록 히스토리 테이블에 저장되어 있는지 판별하는 단계;
구분된 명령어 블록의 정보를 상기 블록 히스토리 테이블에 저장하는 단계;
상기 코어에서 상기 명령어 블록에 포함된 명령어가 정상적으로 실행되는지 여부를 모니터링하여, 모든 명령어가 정상적으로 실행된 것으로 판별되면, 명령어 블록에 대응하는 모든 명령어에 대해 커밋 승인하는 단계를 더 포함하는 물리 레지스터 파일 관리 방법.13. The method of claim 12, wherein the physical register file management method comprises:
determining whether the instruction block including the instruction applied to the core is stored in a block history table storing at least one instruction block including a plurality of instructions as an entry;
storing information of the divided instruction block in the block history table;
Monitoring whether the instructions included in the instruction block are normally executed by the core, and when it is determined that all instructions are normally executed, committing all instructions corresponding to the instruction block Way.
명령어 블록 내에 포함되는 다수의 명령어 중 첫번째 명령어에 대한 메모리 주소를 나타내는 블록 정의자와 다수의 명령어 중 최종 쓰기 작업을 수행하는 명령어의 위치 정보를 나타내는 최종 쓰기 지시자 및 분기 명령어의 위치 및 예측 분기 경로를 나타내는 분기 지시자를 포함하는 물리 레지스터 파일 관리 방법.14. The method of claim 13, wherein the information of the instruction block is
The block definer indicating the memory address of the first instruction among the plurality of instructions included in the instruction block, the last write indicator indicating the location information of the instruction performing the last write operation among the plurality of instructions, and the location and predicted branch path of the branch instruction A method of managing a physical register file containing branch directives indicating
연속하는 동일한 명령어 블록들에 대해 기지정된 기준 커밋 횟수 이상 연속하여 커밋 승인되면, 서로 인접한 명령어 블록을 병합하는 단계; 및
병합된 명령어 블록의 정보를 상기 블록 히스토리 테이블에 재저장하는 단계를 포함하는 물리 레지스터 파일 관리 방법.15. The method of claim 14, wherein the physical register file management method comprises:
merging adjacent instruction blocks when commits are continuously approved for more than a predetermined reference number of commits for consecutive identical instruction blocks; and
and restoring information of the merged instruction block to the block history table.
상기 명령어 블록의 명령어 중 적어도 하나에서 오류가 발생된 것으로 판별되면, 명령어 블록 내에서 오류가 발생된 명령어의 위치 정보를 획득하는 단계;
획득된 오류가 발생된 명령어의 위치 정보에 기반하여 오류가 발생된 명령어 이전 분기 명령어를 기준으로 2개의 명령어 블록을 분할하는 단계; 및
분할된 명령어 블록의 정보를 상기 블록 히스토리 테이블에 재저장하는 단계를 더 포함하는 물리 레지스터 파일 관리 방법.16. The method of claim 15, wherein the physical register file management method comprises:
if it is determined that an error has occurred in at least one of the instructions of the instruction block, obtaining location information of the instruction in which the error has occurred in the instruction block;
dividing the two instruction blocks based on the branch instruction prior to the instruction in which the error occurred based on the obtained location information of the instruction in which the error occurred; and
The method of managing a physical register file further comprising the step of re-storing the divided instruction block information in the block history table.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020200033669A KR102292580B1 (en) | 2020-03-19 | 2020-03-19 | Apparatus and method for managing physical register file of high-performance out-of-order superscalar cores |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020200033669A KR102292580B1 (en) | 2020-03-19 | 2020-03-19 | Apparatus and method for managing physical register file of high-performance out-of-order superscalar cores |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| KR102292580B1 true KR102292580B1 (en) | 2021-08-20 |
Family
ID=77466478
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| KR1020200033669A Active KR102292580B1 (en) | 2020-03-19 | 2020-03-19 | Apparatus and method for managing physical register file of high-performance out-of-order superscalar cores |
Country Status (1)
| Country | Link |
|---|---|
| KR (1) | KR102292580B1 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115509610A (en) * | 2022-09-29 | 2022-12-23 | 上海壁仞智能科技有限公司 | Out-of-order execution computing device |
| KR20240010164A (en) | 2022-07-15 | 2024-01-23 | 연세대학교 산학협력단 | Apparatus and Method for Instruction Scheduling of High-Performance Out-of-Order Cores |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20060022973A (en) * | 2004-09-08 | 2006-03-13 | 삼성전자주식회사 | Hardware device capable of performing non-sequential execution of conditional execution instruction and method |
| KR20080065733A (en) * | 2007-01-10 | 2008-07-15 | 연세대학교 산학협력단 | Register Renaming System and Method Based on Similarity of Register Values |
| KR101139066B1 (en) | 2007-09-12 | 2012-04-30 | 콸콤 인코포레이티드 | Register file system and method for pipelined processing |
| JP2018169838A (en) * | 2017-03-30 | 2018-11-01 | 日本電気株式会社 | Processor |
-
2020
- 2020-03-19 KR KR1020200033669A patent/KR102292580B1/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20060022973A (en) * | 2004-09-08 | 2006-03-13 | 삼성전자주식회사 | Hardware device capable of performing non-sequential execution of conditional execution instruction and method |
| KR20080065733A (en) * | 2007-01-10 | 2008-07-15 | 연세대학교 산학협력단 | Register Renaming System and Method Based on Similarity of Register Values |
| KR101139066B1 (en) | 2007-09-12 | 2012-04-30 | 콸콤 인코포레이티드 | Register file system and method for pipelined processing |
| JP2018169838A (en) * | 2017-03-30 | 2018-11-01 | 日本電気株式会社 | Processor |
Non-Patent Citations (1)
| Title |
|---|
| F. Afram 외 2명. A group-commit mechanism for ROB-based processors implementing the X86 ISA. 2013.02. * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20240010164A (en) | 2022-07-15 | 2024-01-23 | 연세대학교 산학협력단 | Apparatus and Method for Instruction Scheduling of High-Performance Out-of-Order Cores |
| CN115509610A (en) * | 2022-09-29 | 2022-12-23 | 上海壁仞智能科技有限公司 | Out-of-order execution computing device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7263600B2 (en) | System and method for validating a memory file that links speculative results of load operations to register values | |
| JP5894120B2 (en) | Zero cycle load | |
| US7228402B2 (en) | Predicate register file write by an instruction with a pending instruction having data dependency | |
| JP7007371B2 (en) | Handling of inter-element address hazards for vector instructions | |
| US20150039860A1 (en) | Rda checkpoint optimization | |
| KR20010053622A (en) | Processor configured to map logical register numbers to physical register numbers using virtual register numbers | |
| US10649780B2 (en) | Data processing apparatus and method for executing a stream of instructions out of order with respect to original program order | |
| CN1945525A (en) | System and method for lifetime counter design for handling instruction flushes from a queue | |
| CN1221913A (en) | Method and system for single cycle dispatch of multiple instructions in superscalar processor system | |
| JP4856646B2 (en) | Continuous flow processor pipeline | |
| CN101458636A (en) | Late lock acquisition mechanism for hardware lock elision (HLE) | |
| US20160011876A1 (en) | Managing instruction order in a processor pipeline | |
| US20070050592A1 (en) | Method and apparatus for accessing misaligned data streams | |
| US6772317B2 (en) | Method and apparatus for optimizing load memory accesses | |
| TWI659357B (en) | Manage instruction order in the processor pipeline | |
| KR102292580B1 (en) | Apparatus and method for managing physical register file of high-performance out-of-order superscalar cores | |
| CN102890624A (en) | Method adn system for out of order millicode control operation | |
| US11507379B2 (en) | Managing load and store instructions for memory barrier handling | |
| CN108027736B (en) | Runtime code parallelization using out-of-order renaming by pre-allocation of physical registers | |
| JP2001092657A (en) | Central processing unit, compiling method, and recording medium recording compiling program | |
| US10185561B2 (en) | Processor with efficient memory access | |
| US9575897B2 (en) | Processor with efficient processing of recurring load instructions from nearby memory addresses | |
| US7640419B2 (en) | Method for and a trailing store buffer for use in memory renaming | |
| US8782378B2 (en) | Dynamic instruction splitting | |
| EP3871081B1 (en) | Register renaming-based techniques for block-based processors |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20200319 |
|
| PA0201 | Request for examination | ||
| PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20210226 Patent event code: PE09021S01D |
|
| E701 | Decision to grant or registration of patent right | ||
| PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20210815 |
|
| GRNT | Written decision to grant | ||
| PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20210817 Patent event code: PR07011E01D |
|
| PR1002 | Payment of registration fee |
Payment date: 20210817 End annual number: 3 Start annual number: 1 |
|
| PG1601 | Publication of registration | ||
| PR1001 | Payment of annual fee |
Payment date: 20240801 Start annual number: 4 End annual number: 4 |