KR20100129021A - Method for processing risc instruction and custom instruction parallely and configurable processor using thereof - Google Patents
Method for processing risc instruction and custom instruction parallely and configurable processor using thereof Download PDFInfo
- Publication number
- KR20100129021A KR20100129021A KR1020090047752A KR20090047752A KR20100129021A KR 20100129021 A KR20100129021 A KR 20100129021A KR 1020090047752 A KR1020090047752 A KR 1020090047752A KR 20090047752 A KR20090047752 A KR 20090047752A KR 20100129021 A KR20100129021 A KR 20100129021A
- Authority
- KR
- South Korea
- Prior art keywords
- instruction
- list information
- decoding unit
- unit
- dependency
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 14
- 238000012545 processing Methods 0.000 title claims abstract description 6
- 238000001514 detection method Methods 0.000 claims description 24
- 230000006870 function Effects 0.000 description 38
- 238000010586 diagram Methods 0.000 description 11
- 238000003672 processing method Methods 0.000 description 3
- 239000000470 constituent Substances 0.000 description 1
- 230000000593 degrading effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/38—Concurrent instruction execution, e.g. pipeline or look ahead
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/30181—Instruction operation extension or modification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/46—Multiprogramming arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Executing Machine-Instructions (AREA)
Abstract
Description
본 발명은 RISC 명령어가 수행되는 기반 프로세서와 사용자에 의해 정의된 확장 명령어가 수행되는 맞춤형 기능 유닛이 결합된 구성형 프로세서에 관한 것으로서, 상세하게는 RISC 명령어와 확장 명령어를 동시에 병렬 수행하는 구성형 프로세서에 관한 것이다.The present invention relates to a configurable processor in which a base processor on which RISC instructions are executed and a customized functional unit on which extended instructions defined by a user are executed. Specifically, a configurable processor performing parallel execution of RISC instructions and extension instructions in parallel. It is about.
본 발명은 서울시정개발연구원 및 광운대학교 산학협력단의 기술기반 구축 사업의 일환으로 수행한 연구로부터 도출된 것이다.The present invention is derived from the research conducted as part of the technology foundation project of the Seoul Development Institute and Kwangwoon University Industry-Academic Cooperation Foundation.
[과제고유번호: 400-20080227, 과제명: 나노 SoC 산업육성을 위한 산학협력 혁신 클러스터][Project No .: 400-20080227, Title: Industry-Academic Cooperation Innovation Cluster for Nano SoC Industry Promotion]
최근 임베디드 시스템의 성능 향상에 대한 요구가 증가하면서 기능 확장을 통해 손쉽게 성능을 향상시킬 수 있는 구성형 프로세서(Configurable Processor)에 대한 관심이 증가하고 있다. Recently, as the demand for improving the performance of an embedded system increases, there is a growing interest in a configurable processor that can easily improve performance through function expansion.
도 1은 종래기술에 따른 구성형 프로세서의 구조를 간략히 나타낸 블록도이 다. 1 is a block diagram schematically showing the structure of a configurable processor according to the prior art.
종래기술에 따른 구성형 프로세서는 RISC(reduced instruction set computer) 명령어를 수행하는 기반 프로세서(base processor)와 사용자에 의해 정의된 사용자 정의 명령어(Custom Instruction:CI)가 실행되는 맞춤형 기능 유닛(Configurable Functional Unit:CFU)이 결합된 것이다. 사용자 정의 명령어(Custom Instruction)는 RISC 명령어와는 달리 멀티 사이클의 수행 시간을 가질 수 있으므로, 이하에서는 확장 명령어로 부르기로 한다.According to the prior art, the configurable processor includes a base processor that executes reduced instruction set computer (RISC) instructions and a customizable functional unit that executes a user-defined user-defined instruction (CI). : CFU) is combined. Custom Instructions can have a multi-cycle execution time unlike RISC instructions. Hereinafter, the Instruction will be referred to as an extended instruction.
도 1에서 기반 프로세서 박스로 안에 있는 부분은 기반 프로세서로서 일반적인 RISC 프로세서와 유사한 구조를 가진다. RISC 기반의 구성형 프로세서는 단순한 RISC 프로세서와 비교할 때 CFU 확장을 지원하기 위한 인터페이스를 가지며 확장 명령어를 처리하기 위한 제어 로직이 추가된다.In FIG. 1, the part inside the base processor box is a base processor having a structure similar to that of a general RISC processor. RISC-based configurable processors have an interface to support CFU extensions compared to simple RISC processors, and add control logic to process extension instructions.
이처럼 구성형 프로세서는 특수한 형태의 프로세서로서 기반 프로세서에 빌딩 블록으로 제공되는 빠른 곱셈 명령어나 DSP, SIMD 관련 명령어 등을 추가하거나 응용 프로그램에 적합한 독자적인 기능을 추가할 수 있는 프로세서이다. 일반적으로 구성형 프로세서는 RISC(reduced instruction set computer) 프로세서를 기반 프로세서로 갖는데 이로 인해 추가된 명령어의 수행 사이클이 멀티 사이클일 경우 기반 프로세서의 동작을 멈추어야 한다.As such, the configurable processor is a special type of processor that can add fast multiplication instructions, DSP, SIMD related instructions, etc., which are provided as building blocks to the underlying processor, or add unique functions suitable for an application program. In general, a configurable processor has a reduced instruction set computer (RISC) processor as a base processor. Therefore, when the execution cycle of an added instruction is multicycle, the constituent processor must stop the operation of the base processor.
도 2는 종래기술에 따른 구성형 프로세서에서의 파이프라인 진행도이다.2 is a pipeline flow diagram in a configurable processor according to the prior art.
도 2는 5-stage의 파이프라인을 갖는 RISC 기반 구성형 프로세서에서 멀티 사이클 수행 시간을 갖는 명령어 확장이 수행되었을 경우의 파이프라인의 진행 과 정을 예시한다. 'ci'는 명령어 확장을 위한 어셈블리 기호이고, 첫 번째 인자인 0는 확장 명령어의 식별 기호이다. 도 2름 참조하면 'ise 0' 명령은 4 사이클의 수행 시간을 가지며 확장 명령어가 수행되는 동안 기반 프로세서가 동작을 멈추게 된다.FIG. 2 illustrates the progress of the pipeline when instruction expansion with multi-cycle execution time is performed in a RISC-based configurable processor having a 5-stage pipeline. 'ci' is the assembly symbol for instruction expansion, and the first argument, 0, is the identifier of the extension instruction. Referring to FIG. 2, the 'ise 0' instruction has four cycles of execution time and the base processor stops operating while the extension instruction is executed.
따라서, 멀티 사이클의 수행 주기를 가지는 확장 명령어가 많이 이용되는 경우에는 기반 프로세서가 동작을 멈추는 경우가 많아 구성형 프로세서의 성능이 떨어지는 문제점이 있다.Therefore, when a plurality of extended instructions having a multi-cycle execution period are used, the base processor often stops operating, which causes a problem of degrading the performance of the configurable processor.
본 발명이 해결하고자 하는 과제는, 맞춤형 기능 유닛에서 확장 명령어가 실행되는 동안에도 기반 프로세서에서 RISC 명령어가 병렬적으로 실행되도록 함으로써 멀티 사이클의 수행 주기를 가지는 확장 명령어가 포함된 연산의 총 수행시간을 감소시킬 수 있는 구성형 프로세서 및 구성형 프로세서에서 RISC 명령어와 확장 명령어를 병렬 처리하기 위한 방법을 제공하는 것이다.The problem to be solved by the present invention is to allow the RISC instruction to be executed in parallel in the base processor even while the extended instruction is executed in the customized functional unit, thereby improving the total execution time of the operation including the extended instruction having the multi-cycle execution cycle. The present invention provides a method for parallelizing RISC instructions and extended instructions in a configurable processor and a configurable processor.
상기한 과제를 해결하기 위해 본 발명은, 파이프라인 방식의 기반 프로세서 및 사용자에 의해 정의된 확장 명령어를 실행하는 맞춤형 기능 유닛이 결합된 구성형 프로세서에 있어서, 맞춤형 기능 유닛에서 실행중인 확장 명령어에 대한 목록정보를 저장하고 있는 목록정보 레지스터; 및 목록정보 레지스터를 참조하여 기반 프로세서의 디코딩부에서 처리중인 RISC 명령어와 맞춤형 기능 유닛에서 실행중인 확장 명령어와의 의존성을 판단하고, 의존성이 있는 경우 디코딩부와 연결된 파이프를 스톨시키며, 의존성이 없는 경우 디코딩부와 연결된 파이프를 스톨시키지 않는 의존성 검출부를 포함하며, 목록정보는 확장 명령어의 아이디에 대한 정보와 목적 레지스터에 대한 정보를 포함하는 것을 특징으로 하는, RISC 명령어와 확장 명령어를 병렬 처리하는 구성형 프로세서를 제공하는 것을 특징으로 한다.In order to solve the above problems, the present invention provides a configurable processor in which a pipelined base processor and a customized functional unit for executing an extended instruction defined by a user are combined. A list information register for storing list information; And determining the dependency between the RISC instruction being processed by the decoding unit of the base processor and the extension instruction being executed by the customized function unit by referring to the list information register, and stalling the pipe connected to the decoding unit if there is a dependency. Includes a dependency detection unit that does not stall the pipe connected to the decoding unit, the list information is configured to parallel processing the RISC instruction and the extension instruction, characterized in that it includes information about the ID of the extended instruction and the destination register It is characterized by providing a processor.
바람직하게는, 디코딩부에서 처리중인 명령어가 확장 명령어인 경우, 디코딩부에서 처리중인 확장 명령어에 대한 목록정보가 목록정보 레지스터에 저장될 수 있다.Preferably, when the instruction being processed by the decoding unit is an extension instruction, the list information about the extension instruction being processed by the decoding unit may be stored in the list information register.
바람직하게는, 목록정보 레지스터에 빈 공간이 없어서 디코딩부에서 처리중인 확장 명령어에 대한 목록정보가 저장되지 못하는 경우, 디코딩부는 저장실패 신호를 생성하여 의존성 검출부로 제공하고, 의존성 검출부는 저장실패 신호를 수신하는 경우 디코딩부와 연결된 파이프를 스톨시킬 수 있다.Preferably, when there is no empty space in the list information register and thus the list information for the extended instruction being processed by the decoding unit cannot be stored, the decoding unit generates a storage failure signal and provides the storage failure signal to the dependency detection unit, and the dependency detection unit provides the storage failure signal. When receiving, the pipe connected to the decoding unit may be stalled.
본 발명에 의하면, 맞춤형 기능 유닛에서 확장 명령어가 실행되는 동안에도 기반 프로세서에서 RISC 명령어가 실행되도록 하며, 명령어를 순차적으로 읽어 들이지만 확장 명령어가 수행되는 동안에는 기반 프로세서의 실행부가 병렬 수행되며 순서가 뒤바뀐(out-of-order) 명령어 수행을 가능하게 함으로써, 멀티 사이클의 수행 주기를 가지는 확장 명령어가 포함된 연산을 수행하는 경우 총 수행시간을 감소시켜 구성형 프로세서의 성능을 크게 향상시킬 수 있다.According to the present invention, the RISC instruction is executed in the base processor even while the extended function is executed in the customized function unit, and the instructions are read sequentially, but the execution part of the base processor is executed in parallel while the extended instructions are executed, and the order is reversed. By enabling the execution of out-of-order instructions, the performance of the configurable processor may be greatly improved by reducing the total execution time when performing an operation including an extended instruction having a multi-cycle execution cycle.
이하에서 첨부된 도면을 참조하여, 본 발명의 바람직한 실시예를 상세히 설명한다. 각 도면에 제시된 동일한 참조부호는 동일한 부재를 나타낸다. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Like reference numerals in the drawings denote like elements.
도 3은 멀티 사이클의 실행 주기를 가지는 확장 명령어의 타이밍도를 나타낸다. 도 3의 확장 명령어는 수행 완료에 5 사이클이 소요되는 확장 명령어의 타이밍 도(timing diagram)를 보여준다.3 is a timing diagram of an extension instruction having a multi-cycle execution cycle. 3 shows a timing diagram of an extension instruction that takes 5 cycles to complete execution.
도 4는 본 발명에 따른 구성형 프로세서를 나타낸 블록도이다.4 is a block diagram illustrating a configurable processor according to the present invention.
본 발명은 파이프라인 방식의 기반 프로세서 및 사용자에 의해 정의된 확장 명령어를 실행하는 맞춤형 기능 유닛이 결합된 구성형 프로세서에 있어서, 확장 명령어가 맞춤형 기능 유닛에서 실행되는 동시에 RISC 명령어가 기반 프로세서에서 병렬적으로 실행될 수 있는 구성형 프로세서를 제공한다.The present invention provides a configurable processor in which a pipelined base processor and a customized functional unit for executing an extended instruction defined by a user are combined, wherein the extended instruction is executed in the customized functional unit while RISC instructions are executed in parallel in the based processor. It provides a configurable processor that can be executed as.
일반적으로 구성형 프로세서는 RISC 명령어를 처리하는 파이프라인 방식의 기반 프로세서 및 사용자에 의해 정의된 확장 명령어를 처리하는 맞춤형 기능 유닛이 결합되어 있다. Typically, a configurable processor is a combination of a pipelined processor that handles RISC instructions and a custom functional unit that handles user-defined extension instructions.
도 4를 참조하면, 본 발명에 따른 구성형 프로세서(100)는 파이프라인(pipeline) 방식의 기반 프로세서(140~149), 맞춤형 기능 유닛(Custom Functional Unit:CFU, 130), 의존성 검출부(110) 및 목록정보 레지스터(120)를 포함한다.Referring to FIG. 4, the
기반 프로세서(base processor)는 파이프라인 방식을 이용하는 일반적인 RISC 프로세서로서, 기반 프로세서는 프로그램 카운터(Program counter:PC, 140), 명령어 메모리(Instruction memory, 141), 제1 파이프(Pipe, 142), 디코딩부(Decoding logic, 143), 레지스터 파일(Register file, 144), 제2 파이프(145), 실행부(Execution logic, 146), 제1 멀티플렉서(Multiplexer, 147), 제2 멀티플렉서(Multiplexer, 148), 제3 파이프(149), 데이터 메모리(미도시), 및 제4 파이프(미도시)를 포함한다. The base processor is a general RISC processor using a pipeline method. The base processor is a program counter (PC, 140), an instruction memory (141), a first pipe (142), and decoding.
도 4의 기반 프로세서는 5-stage RISC(reduced instruction set computer) 프로세서를 이용한 예를 도시한 것으로서, 본 발명에 따른 구성형 프로세서는 이에 한정되지 않으며 다양한 stage의 RISC 프로세서가 이용될 수 있다.4 illustrates an example using a 5-stage reduced instruction set computer (RISC) processor. The configurable processor according to the present invention is not limited thereto, and various stages of RISC processors may be used.
도 4의 RISC 기반 프로세서는 읽기(fetch)-디코딩(decoding)-실행(execution)-데이터 메모리(data memory)-기록(write back) 단계의 5단계를 수행한다. 한 명령의 처리시간 동안에 다른 명령들을 중첩시켜서 수행하는 파이프라인 방식을 이용하기 위해 상기 각각의 단계를 수행하는 유닛 사이에는 파이프가 위치한다. 제1 파이프(142)는 명령어 메모리(141)와 디코딩부(143)의 사이에 위치하고, 제2 파이프(145)는 디코딩부(143)와 실행부(146)의 사이에 위치하며, 제3 파이프(149)는 실행부(146)와 데이터 메모리(미도시)의 사이에 위치한다.The RISC-based processor of FIG. 4 performs five steps of a fetch-decoding-execution-data memory-write back phase. Pipes are located between units performing each of the above steps in order to use a pipelined scheme in which other instructions are superimposed during the processing time of one instruction. The
RISC 명령어는 RISC 기반 프로세서의 실행부(146)에서 실행되며, 사용자에 의해 정의된 확장 명령어는 맞춤형 기능 유닛(130)에서 실행된다. The RISC instruction is executed in the
맞춤형 기능 유닛(130)은 제2 파이프(145)의 출력단과 연결되며, 제2 파이프(145)로부터 제공받은 확장 명령어를 실행한다. 맞춤형 기능 유닛(130)은, 확장 명령어의 실행이 종료되면, 그 실행 결과를 제1 멀티플렉서(147)로 제공한다.The
RISC 명령어는 RISC 기반 프로세서의 실행부(146)에서 한 사이클 동안 실행되지만, 사용자에 의해 정의된 확장 명령어는 맞춤형 기능 유닛(130)에서 하나의 사이클 또는 멀티 사이클 동안 실행될 수 있다. 앞서 설명한 것처럼, 종래의 구성형 프로세서는 맞춤형 기능 유닛(130)에서 확장 명령어가 실행되는 동안에는 기반 프로세서의 실행부에서는 RISC 명령을 실행할 수 없었다. 확장 명령어가 한 사이클을 가지는 경우는 상관없지만, 확장 명령어가 멀티 사이클을 가지는 경우에는 기반 프로세서의 동작을 멈추어야 하는 문제점이 있으며, 본 발명에 따른 구성형 프로세서는 이런 문제점을 해결하고자 한다.The RISC instruction is executed for one cycle in the
이를 위해 본 발명에 따른 구성형 프로세서(100)는 의존성 검출부(110)와 목록정보 레지스터(120)를 포함한다.To this end, the
목록정보 레지스터(120)는 맞춤형 기능 유닛(130)에서 실행되고 있는 확장 명령어(CI)에 대한 목록정보를 저장하고 있는 레지스터이다. 목록정보는 확장 명령어의 아이디(ID)에 대한 정보와 목적 레지스터(Destination register)에 대한 정보를 포함하며, 목록정보의 유효성을 확인하기 위한 유효비트를 더 포함할 수 있다.The
도 5는 본 발명에 따른 구성형 프로세서에서 실행목록 레지스터를 나타낸 도면이다. 5 illustrates an execution list register in a configurable processor according to the present invention.
도 5에서처럼, 목록정보 레지스터(120)는 엔트리에 목록정보를 저장하고 있다. 한편, 목록정보는 확장 명령어의 아이디에 대한 정보(122) 및 확장 명령어의 목적 레지스터에 대한 정보(123)를 포함하며, 추가로 목록정보의 유효성을 확인하기 위한 유효비트(valid bit, 121)를 더 포함한다. 유효비트가 '1'이면 목록정보로 판단되는 확장 명령어가 맞춤형 기능 유닛(130)에서 실행중임을 의미한다.As in FIG. 5, the list information register 120 stores list information in an entry. Meanwhile, the list information includes
확장 명령어의 ID에 대한 정보와 목적 레지스터에 대한 정보의 비트 수는 본 발명에 따른 구성형 프로세서의 실시예에 따라서 달라질 수 있다. 예를 들어 256개의 확장 명령어 레지스터를 지원하는 경우 확장 명령어의 ID에 대한 정보의 비트 수는 8이며, 16개의 레지스터를 가지므로 목적 레지스터에 대한 정보의 비트 수는 4이다. The number of bits of the information on the ID of the extension instruction and the information on the destination register may vary according to the embodiment of the configurable processor according to the present invention. For example, when 256 extension instruction registers are supported, the number of bits of information about an ID of an extension instruction is 8, and since there are 16 registers, the number of bits of information about a destination register is 4.
한편, 목록정보 레지스터(120)는 복수의 목록정보를 저장할 수 있다. 목록정보 레지스터에 저장되는 목록정보의 수가 많아질수록 동시에 수행할 수 있는 확장 명령어의 수는 늘어나지만 하드웨어의 구조는 복잡해진다. 또한 , 데이터 간의 의존성이 없이 각각 동시에 수행될 수 있는 맞춤형 기능 유닛이 일반적으로 많지 않으므로, 목록정보 레지스터에 저장되는 목록정보의 수는 2개인 것이 바람직하다.The list information register 120 may store a plurality of list information. As the number of list information stored in the list information register increases, the number of extension instructions that can be executed simultaneously increases, but the structure of the hardware becomes more complicated. In addition, since there are generally not many customized functional units that can be performed simultaneously without dependency between data, it is preferable that the number of list information stored in the list information register is two.
다시 도 4로 되돌아가 설명하도록 한다.Returning to Figure 4 again to be described.
의존성 검출부(110)는 목록정보 레지스터(120)를 참조하여 기반 프로세서의 디코딩부(143)에서 처리중인 RISC 명령어와 맞춤형 기능 유닛(130)에서 실행중인 확장 명령어와의 의존성을 판단하고, 그 의존성에 따라 파이프의 스톨(stall) 여부를 결정한다. The
의존성 검출부(110)는 디코딩부(143)에서 처리중인 RISC 명령어의 소스 레지스터에 대한 정보와 맞춤형 기능 유닛(130)에서 실행중인 확장 명령어의 목적 레지스터에 대한 정보가 일치하면 의존성이 있는 것으로 결정하고, 정보가 일치하지 않으면 의존성이 없는 것으로 결정한다.The
디코딩부(143)에서 처리중인 RISC 명령어와 맞춤형 기능 유닛(130)에서 실행중인 확장 명령어 사이에 의존성이 있는 경우, 의존성 검출부(110)는 프로그램 카운터(140), 제1 파이프(142), 및 제2 파이프(145)를 스톨(stall) 시킨다. 의존성 검출부(110)에 의해 수행되는 스톨은 일반적인 RISC 프로세서에 의해 수행되는 스톨과 동일한 것으로서, 프로그램 카운터(140), 제1 파이프(142), 및 제2 파이프(145)의 내용을 갱신하지 않고 그대로 유지하도록 한다. 또한, 의존성 검출부(110)는 프로그램 카운터(140), 제1 파이프(142), 및 제2 파이프(145)를 스톨시킴과 동시에 제2 파이프(145)에 버블을 만들어 실행부(146)로 버블을 전달하게 할 수 있다.When there is a dependency between the RISC instruction being processed by the
만일 디코딩부(143)에서 처리중인 RISC 명령어와 맞춤형 기능 유닛(130)에서 실행중인 확장 명령어 사이에 의존성이 없는 경우, 의존성 검출부(110)는 프로그램 카운터(140), 제1 파이프(142), 및 제2 파이프(145)를 스톨(stall)시키지 않는다. If there is no dependency between the RISC instruction being processed by the
프로그램 카운터(140), 제1 파이프(142), 및 제2 파이프(145)가 스톨되지 않으면, 다음의 사이클 기간에 프로그램 카운터(140), 제1 파이프(142), 및 제2 파이프(145)에 담긴 내용이 각각 명령 메모리(141), 디코딩부(143), 및 실행부(146)로 전달된다. 따라서, 확장 명령어가 맞춤형 기능 유닛(130)에서 계속 실행되고 있는 동안에도 RISC 명령어가 실행부(146)로 전달되며, 결국에는 확장 명령어와 RISC 명령어가 동시에 병렬적으로 실행될 수 있다.If the
한편 디코딩부(143)에서 처리되는 명령어가 확장 명령어인 경우, 디코딩부(143)는 확장 명령어에 대한 목록정보를 목록정보 레지스터(120)로 제공한다.On the other hand, if the instruction processed in the
목록정보 레지스터(120)는 디코딩부(143)로부터 제공받은 목록정보를 저장한다. 만일 목록정보 레지스터(120)가 빈 공간이 없어서 디코딩부(143)로부터 제공받은 목록정보를 저장하지 못하는 경우, 목록정보 레지스터(120)는 저장실패 신호를 생성하고 생성된 저장실패 신호를 의존성 검출부(110)로 제공한다. 목록정보 레지스터(120)에 빈 공간이 없다는 의미는 동시에 실행될 수 있는 확장 명령어의 수가 정해진 경우 그 정해진 수만큼의 확장 명령어가 각각의 맞춤형 기능 유닛(130)에서 동시에 실행되고 있음을 의미한다.The list information register 120 stores list information provided from the
의존성 검출부(110)는 저장실패 신호를 수신한 경우 프로그램 카운터(140) 및 디코딩부와 연결된 파이프, 즉 제1 파이프(142) 및 제2 파이프(145)를 스톨시킨다. 또한 의존성 검출부(110)는 파이프들을 스톨시킴과 동시에 제2 파이프(145)에 버블을 만들어 실행부(146)로 버블을 전달하게 할 수 있다.When the
한편 RISC 명령어와 확장 명령어를 병렬 처리하기 위해서는, 맞춤형 기능 유닛(130)에서 실행되는 확장 명령어가 종료되는 경우 또한 고려되어야 한다. 확장 명령어와 RISC 명령어 사이에 의존성이 없는 경우 두 명령어가 동시에 실행될 수 있으며, RISC 명령어에 대한 실행 결과와 확장 명령어에 대한 실행 결과가 동시에 멀티플렉서(147, 148)로 전달될 수 있기 때문이다.Meanwhile, in order to process the RISC instruction and the extension instruction in parallel, the case where the extension instruction executed in the customized
맞춤형 기능 유닛(130)은 확장 명령어의 실행이 종료되는 경우 실행종료 신호를 생성하고, 생성된 실행종료 신호를 의존성 검출부(110), 목록정보 레지스터(120), 멀티플렉서(147, 148), 및 제3 파이프(149)로 전달한다.The customized
실행종료 신호를 수신하는 경우 의존성 검출부(110)는 프로그램 카운터(140), 제1 파이프(142), 및 제2 파이프(145)를 스톨시킨다. 이때 의존성 검출부(110)는 제2 파이프(145)에 버블을 만들지 않는다. 제2 파이프(145)는 맞춤형 기능 유닛(130)이 실행종료 신호를 보내는 시점에서 한 사이클 이전 명령어의 내용을 가지고 있기 때문이다.When receiving the execution termination signal, the
실행종료 신호를 수신하는 경우 목록정보 레지스터(120)는 실행종료 신호와 관련된 목록정보를 삭제하여, 추후 새로운 목록정보가 저장될 수 있도록 한다. 한편, 목록정보가 삭제되는 대신 목록정보의 유효비트를 '1'에서 '0'으로 바꾸도록 할 수 있다. 목록정보 레지스터(120)는 새로운 목록정보의 저장 요청이 오는 경우 유효비트를 참조하여 유효비트가 '0'인 엔트리에 새로운 목록정보를 저장한다.When the execution termination signal is received, the list information register 120 deletes the list information related to the execution termination signal so that new list information may be stored later. Meanwhile, instead of deleting the list information, the valid bit of the list information may be changed from '1' to '0'. The list information register 120 stores new list information in an entry having a valid bit of '0' by referring to a valid bit when a request for storing new list information is received.
멀티플렉서(147, 148)는 제1 멀티플렉서 및 제2 멀티플렉서를 포함한다. 제1 멀티플렉서(147)는 실행부(146)의 결과값과 맞춤형 기능 유닛(130)의 결과값을 입력받고, 실행종료 신호에 따라 결과값을 선택한다. 실행종료 신호가 전달되면 제1 멀티플렉서(147)는 맞춤형 기능 유닛(130)의 결과값을 선택하여 제3 파이프(149)로 전달하고, 실행종료 신호가 전달되지 않으면 제1 멀티플렉서(147)는 실행부(148)의 결과값을 선택하여 제3 파이프(149)로 전달한다.
제2 멀티플렉서(148)는 제2 파이프로부터 RISC 명령어의 목적 레지스터에 대한 정보와 목록정보 레지스터(120)로부터 확장 명령어의 목적 레지스터에 대한 정보를 입력받고, 실행종료 신호에 따라 적절한 목적 레지스터에 대한 정보를 선택하여 제3 파이프(149)로 전달한다.The
한편, 목록정보 레지스터(120)에 복수의 목록정보가 저장되는 경우에 있어서 복수의 확장 명령어가 동시에 실행이 종료되는 경우가 또한 고려해야 한다. 이러한 경우 복수의 결과값이 멀티플렉서(147, 148)로 동시에 전달될 수 있기 때문이다.On the other hand, in the case where a plurality of list information is stored in the list information register 120, the case where execution of a plurality of extended instructions is terminated at the same time should also be considered. In this case, a plurality of result values may be simultaneously transmitted to the
이를 해결하기 위해 의존성 검출부(110)는 승인 신호(acknowledge signal)를 생성하여 맞춤형 기능 유닛(130)과 멀티플렉서(147, 148)로 전달되도록 한다.In order to solve this problem, the
의존성 검출부(110)는 다수의 실행종료 신호가 동시에 수신된 경우 목록정보 레지스터(120)의 엔트리 순서대로 처리한다. 즉, 의존성 검출부(110)는 다수의 실행종료 신호 중 엔트리의 순위가 빠른 맞춤형 기능 유닛에 대한 실행종료 신호를 확인하고, 해당 실행종료 신호를 송신한 맞춤형 기능 유닛에 승인 신 호(acknowledge signal)를 전달하며, 해당 실행종료 신호를 송신한 맞춤형 기능 유닛의 결과값이 제3 파이프(149)로 전달되도록 한다. The
한편 각 맞춤형 기능 유닛은 승인 신호를 수신하기 전까지는 실행종료 신호를 계속 '1'로 유지하여 실행종료 신호를 의존성 검출부(110)와 목록정보 레지스터(120)로 전달한다. 다만 이때 각 맞춤형 기능 유닛은 의존성 검출부(110)로부터 승인 신호를 받은 경우에만 멀티플렉서(147, 148) 및 제3 파이프(149)로 실행종료 신호를 전달해야만 한다. 승인 신호를 받은 경우에만 멀티플렉서(147, 148) 및 제3 파이프(149)로 실행종료 신호를 전달함으로써, 동시에 실행 종료된 다수의 결과값 중에서 해당되는 적절한 결과값이 멀티플렉서(147, 148)에 의해 선택될 수 있다. 즉, 여러 맞춤형 기능 유닛에서 실행되던 확장 명령어들이 동시에 끝나는 경우 목록정보 레지스터(120)에 저장된 목록정보의 엔트리 순서대로 각 맞춤형 기능 유닛의 결과값들이 순차로 제3 파이프(149)로 전달될 수 있다. 물론 상기의 작업을 진행하는 동안에 의존성 검출부(110)는 프로그램 카운터(140), 제1 파이프, 및 제2 파이프를 스톨시켜야 함은 당연하다.Meanwhile, each customized function unit keeps the execution end signal at '1' until the acknowledgment signal is received, and transmits the execution end signal to the
정리하면 의존성 검출부(110)에 의해 스톨되는 경우는 크게 다음의 3가지 경우가 있다.In summary, there are three cases of being stalled by the
i) 맞춤형 기능 유닛에서 실행중인 확장 명령어와 디코딩부에서 처리중인 RISC 명령어 사이에 의존관계가 있는 경우,i) if there is a dependency between the extended instruction executing in the custom function unit and the RISC instruction processing in the decoding unit,
ii) 목록정보 레지스터에 빈 공간이 없어서, 디코딩부에서의 확장 명령어에 대한 목록정보를 목록정보 레지스터에 저장하지 못하는 경우, 및ii) when there is no empty space in the list information register, and thus the list information for the extension instruction in the decoding unit cannot be stored in the list information register, and
iii) 맞춤형 기능 유닛에서 실행중인 확장 명령어의 실행이 종료되는 경우.iii) the execution of the extended instruction being executed in the customized function unit ends.
상기에서 설명한 것처럼 3가지 경우 중 i) 과 ii)는 제2 파이프에 버블을 만드는 것이 필요하지만, iii)의 경우에는 제2 파이프에 버블을 만들어서는 안된다.As described above, i) and ii) of the three cases need to make a bubble in the second pipe, but in the case of iii), no bubble is made in the second pipe.
도 6은 본 발명에 따른 구성형 프로세서에서의 파이프라인 진행도이다. 6 is a pipeline flow diagram in a configurable processor according to the present invention.
도 6을 참조하면, 순차적으로 ci 0 - add - sub - shl 명령이 수행되며, ci 0는 5 사이클의 실행 주기를 가짐을 알 수 있다. Referring to FIG. 6, ci 0-add-sub-shl commands are sequentially performed, and ci 0 has an execution cycle of 5 cycles.
ci 0의 목적 레지스터(r1)는 add의 소스 레지스터(r5, r6) 및 sub의 소스 레지스터(r8, r9)와 의존관계가 없으므로, ci 0의 확장 명령어가 맞춤형 기능 유닛에서 실행되는 동안에 add 및 sub의 RISC 명령이 동시에 실행된다.The destination register (r1) of ci 0 is not dependent on the source registers (r5, r6) of add and the source registers (r8, r9) of sub, so that the add and sub instructions of ci 0 are executed while executing in the customized function unit. RISC commands are executed simultaneously.
한편, shl 명령어의 소스 레지스터(r1, r4) 중 하나는 ci 0의 목적 레지스터(r1)와 동일하므로, shl 명령어는 ci 0 명령어의 실행이 종료될 때까지 수행이 중지된다. 여기서, stall 1은 상기 i)의 경우이며, stall 2는 상기의 iii)의 경우이다.Meanwhile, since one of the source registers r1 and r4 of the shl command is the same as the destination register r1 of ci 0, the shl command is stopped until the execution of the ci 0 command ends. Here,
도 7은 본 발명에 따른 구성형 프로세서에서 맞춤형 기능 유닛의 인터페이스를 예시한 도면이다.7 illustrates an interface of a custom functional unit in a configurable processor according to the present invention.
C맞춤형 기능 유닛의 인터페이스 중 dataa[]와 datab[]는 기반 프로세서의 레지스터 파일에서 가져오는 소스 레지스터 오퍼랜드이며 기반 프로세서의 제어 로직은 확장 명령어를 수행할 때 해당 맞춤형 기능 유닛의 start 신호에 '1'을 인가하여 확장 명령어를 실행하도록 한다. reset, clk, clk_en 신호는 동기화 회로에 들어가는 일반적인 신호로서 상세한 설명은 생략하도록 한다. 확장 명령어의 실행 이 끝나고 결과값이 생성되면 result 신호에는 결과값이 인가되고 실행종료 신호에는 '1'이 인가되어 기반 프로세서의 제어 로직에 확장 명령어의 실행이 종료되었음을 알려준다.Among the interfaces of the C Custom Function Unit, dataa [] and datab [] are the source register operands taken from the register file of the base processor, and the control logic of the base processor performs a '1' on the start signal of the custom function unit when executing the extended instruction. Authorize to execute the extension command. The reset, clk, and clk_en signals are general signals entering the synchronization circuit, and detailed descriptions thereof will be omitted. When execution of the extended instruction is completed and the result is generated, the result is applied to the result signal and '1' is applied to the execution termination signal to inform the control logic of the base processor that the execution of the extended instruction has ended.
도 8은 본 발명에 따른 RISC 명령과 확장 명령어의 병렬 처리 방법을 나타낸 흐름도이다.8 is a flowchart illustrating a parallel processing method of an RISC instruction and an extended instruction according to the present invention.
본 발명에 따른 RISC 명령과 확장 명령어의 병렬 처리 방법은 상기에서 설명한 본 발명에 따른 구성형 프로세서와 카테고리가 다를 뿐 실질적으로 동일하므로 중복되는 설명은 생략하도록 한다.Since the parallel processing method of the RISC instruction and the extended instruction according to the present invention is substantially the same as the category of the configurable processor according to the present invention described above, overlapping description thereof will be omitted.
우선, 디코딩부(143)는 처리중인 명령어의 종류를 확인한다(S20).First, the
디코딩부에서 처리중인 명령어가 RISC 명령어인 경우, 의존성 검출부(110)는 맞춤형 기능 유닛에서 실행중인 확장 명령어와 디코딩부에서 처리중인 RISC 명령어와의 의존성을 판단한다(S40). 의존성은 디코딩부에서 처리중인 RISC 명령어의 소스 레지스터에 대한 정보와 상기 맞춤형 기능 유닛에서 실행중인 확장 명령어의 목적 레지스터에 대한 정보와의 일치 여부에 따라 결정된다. 의존관계를 판단하기 위해, 의존성 검출부는 목록정보 레지스터(120)를 참조한다.When the instruction being processed in the decoding unit is a RISC instruction, the
맞춤형 기능 유닛에서 실행중인 확장 명령어와 디코딩부에서 처리중인 RISC 명령어 사이에 의존 관계가 있는 경우(S50), 의존성 검출부는 디코딩부와 연결된 파이프(142, 145)를 스톨시킨다(S60). 또한 의존성 검출부는 프로그램 카운터(140)를 스톨시킬 수도 있으며, 제2 파이프(145)에 버블을 만들어 실행부로 전달하도록 할 수 있다.If there is a dependency relationship between the extension instruction executed in the customized function unit and the RISC instruction processed in the decoding unit (S50), the dependency detection unit stalls the
S30 단계에서 디코딩부에서 처리중인 명령어가 확장 명령어인 경우, 디코딩부는 목록정보 레지스터(120)에 빈 공간이 있는지 여부를 판단하고(S100), 빈 공간이 있으면 디코딩부에서 처리중인 확방 명령어의 목록정보를 목록정보 레지스터에 저장한다(S110).If the instruction being processed in the decoding unit in step S30 is an extended instruction, the decoding unit determines whether there is a free space in the list information register 120 (S100), and if there is a free space, the list information of the extended instruction being processed by the decoding unit. To the list information register (S110).
S100 단계에서, 목록정보 레지스터(120)에 빈 공간이 없으면(S100), 의존성 검출부는 S60 단계를 수행한다.In step S100, if there is no empty space in the list information register 120 (S100), the dependency detector performs step S60.
한편, 맞춤형 기능 유닛에서 실행되던 확장 명령어가 종료되면(S10), 맞춤형 기능 유닛(130)은 의존성 검출부(110)와 목록정보 레지스터(120)로 실행종료 신호를 전달한다.On the other hand, when the extended instruction executed in the customized function unit is terminated (S10), the customized
목록정보 레지스터(120)는 실행종료 신호의 수신 여부를 확인하여 실행이 종료된 확장 명령어가 존재하면, 실행종료 신호와 관련된 확장 명령어에 대한 목록정보를 엔트리에서 삭제한다(S80).The list information register 120 checks whether the execution end signal is received and deletes the list information on the extension command related to the execution end signal from the entry if there is an extension command in which execution ends (S80).
그리고, 의존성 검출부(110)는 디코딩부와 연결된 파이프를 스톨시킨다(S90).Then, the
이상에서는 도면에 도시된 구체적인 실시예를 참고하여 본 발명을 설명하였으나 이는 예시적인 것에 불과하므로, 본 발명이 속하는 기술 분야에서 통상의 기술을 가진 자라면 이로부터 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명의 보호 범위는 후술하는 특허청구범위에 의하여 해석되어야 하고, 그와 동등 및 균등한 범위 내에 있는 모든 기술적 사상은 본 발명의 보호 범위에 포함되는 것으로 해석되어야 할 것이다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the invention. Accordingly, the scope of protection of the present invention should be construed in accordance with the following claims, and all technical ideas within the scope of equivalents and equivalents thereof should be construed as being covered by the scope of the present invention.
도 1은 종래기술에 따른 구성형 프로세서의 구조를 간략히 나타낸 블록도.~ 1 is a block diagram schematically showing the structure of a configurable processor according to the prior art.
도 2는 종래기술에 따른 구성형 프로세서에서의 파이프라인 진행도.2 is a pipeline progress diagram in a configurable processor according to the prior art.
도 3은 멀티 사이클의 수행 주기를 가지는 확장 명령어의 타이밍도.3 is a timing diagram of an extension instruction having a multicycle execution period.
도 4는 본 발명에 따른 구성형 프로세서를 나타낸 블록도.4 is a block diagram illustrating a configurable processor according to the present invention.
도 5는 본 발명에 따른 구성형 프로세서에서 목록정보 레지스터를 나타낸 도면.5 illustrates a listing information register in a configurable processor in accordance with the present invention.
도 6은 본 발명에 따른 구성형 프로세서에서의 파이프라인 진행도.6 is a pipeline progression diagram in a configurable processor in accordance with the present invention.
도 7은 본 발명에 따른 구성형 프로세서에서 맞춤형 기능 유닛의 인터페이스를 나타낸 도면.7 illustrates an interface of a custom functional unit in a configurable processor according to the present invention.
도 8은 본 발명에 따른 RISC 명령과 확장 명령어의 병렬 처리 방법을 나타낸 흐름도.8 is a flowchart illustrating a parallel processing method of an RISC instruction and an extended instruction according to the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020090047752A KR101032771B1 (en) | 2009-05-29 | 2009-05-29 | Method for processing RISC instruction and custom instruction parallely and configurable processor using thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020090047752A KR101032771B1 (en) | 2009-05-29 | 2009-05-29 | Method for processing RISC instruction and custom instruction parallely and configurable processor using thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20100129021A true KR20100129021A (en) | 2010-12-08 |
KR101032771B1 KR101032771B1 (en) | 2011-05-06 |
Family
ID=43505825
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020090047752A KR101032771B1 (en) | 2009-05-29 | 2009-05-29 | Method for processing RISC instruction and custom instruction parallely and configurable processor using thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101032771B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9207922B2 (en) | 2013-01-28 | 2015-12-08 | Samsung Electronics Co., Ltd. | Compiling method and apparatus for scheduling block in pipeline |
CN114257619A (en) * | 2021-12-20 | 2022-03-29 | 中科芯云微电子科技有限公司 | Internet of things terminal, Internet of things system and Internet of things control method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5539911A (en) * | 1991-07-08 | 1996-07-23 | Seiko Epson Corporation | High-performance, superscalar-based computer system with out-of-order instruction execution |
JP3623840B2 (en) | 1996-01-31 | 2005-02-23 | 株式会社ルネサステクノロジ | Data processing apparatus and microprocessor |
KR100308618B1 (en) | 1999-02-27 | 2001-09-26 | 윤종용 | Pipelined data processing system having a microprocessor-coprocessor system on a single chip and method for interfacing host microprocessor with coprocessor |
-
2009
- 2009-05-29 KR KR1020090047752A patent/KR101032771B1/en not_active IP Right Cessation
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9207922B2 (en) | 2013-01-28 | 2015-12-08 | Samsung Electronics Co., Ltd. | Compiling method and apparatus for scheduling block in pipeline |
CN114257619A (en) * | 2021-12-20 | 2022-03-29 | 中科芯云微电子科技有限公司 | Internet of things terminal, Internet of things system and Internet of things control method |
Also Published As
Publication number | Publication date |
---|---|
KR101032771B1 (en) | 2011-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0328721B1 (en) | Dynamic multiple instruction stream multiple data multiple pipeline floatingpoint unit | |
CN101965554B (en) | System and method of selectively committing a result of an executed instruction | |
KR100571322B1 (en) | Exception handling methods, devices, and systems in pipelined processors | |
JP2012529096A (en) | Data processing apparatus and method for handling vector instructions | |
JPH1124929A (en) | Arithmetic processing unit and its method | |
TW201030606A (en) | Optimizing performance of instructions based on sequence detection or information associated with the instructions | |
TW442753B (en) | Data processor system having branch control and method thereof | |
JP2004171573A (en) | Coprocessor extension architecture built by using novel splint-instruction transaction model | |
JP2018005488A (en) | Arithmetic processing unit and control method for arithmetic processing unit | |
JP2009099097A (en) | Data processor | |
WO2012106719A1 (en) | Processor with a coprocessor having early access to not-yet issued instructions | |
TW201342225A (en) | Method for determining instruction order using triggers | |
CN100451951C (en) | 5+3 levels pipeline structure and method in RISC CPU | |
JP3611304B2 (en) | Pipeline processor system and method for generating one-cycle pipeline stalls | |
KR101077425B1 (en) | Efficient interrupt return address save mechanism | |
JP2006517322A (en) | Method and apparatus for hazard detection and management in pipelined digital processors | |
KR20080087171A (en) | Early conditional selection of an operand | |
JP2004259049A (en) | Instruction roll back processor system, instruction roll back method, and instruction roll back program | |
KR101032771B1 (en) | Method for processing RISC instruction and custom instruction parallely and configurable processor using thereof | |
TWI227854B (en) | Method for operating a loop, data processing apparatus and system | |
US7237096B1 (en) | Storing results of producer instructions to facilitate consumer instruction dependency tracking | |
JP4444305B2 (en) | Semiconductor device | |
US20070043930A1 (en) | Performance of a data processing apparatus | |
TWI238352B (en) | Register move operations | |
EP1050805B1 (en) | Transfer of guard values in a computer system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
N231 | Notification of change of applicant | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20140411 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20150312 Year of fee payment: 5 |
|
FPAY | Annual fee payment |
Payment date: 20160128 Year of fee payment: 6 |
|
FPAY | Annual fee payment |
Payment date: 20170403 Year of fee payment: 7 |
|
LAPS | Lapse due to unpaid annual fee |