KR100552675B1 - Apparatus for Selecting Extended Instruction and Method Thereof - Google Patents

Apparatus for Selecting Extended Instruction and Method Thereof Download PDF

Info

Publication number
KR100552675B1
KR100552675B1 KR1020030097858A KR20030097858A KR100552675B1 KR 100552675 B1 KR100552675 B1 KR 100552675B1 KR 1020030097858 A KR1020030097858 A KR 1020030097858A KR 20030097858 A KR20030097858 A KR 20030097858A KR 100552675 B1 KR100552675 B1 KR 100552675B1
Authority
KR
South Korea
Prior art keywords
instruction
data flow
application code
flow graph
profiling
Prior art date
Application number
KR1020030097858A
Other languages
Korean (ko)
Other versions
KR20050066555A (en
Inventor
김영수
배영환
조한진
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to KR1020030097858A priority Critical patent/KR100552675B1/en
Publication of KR20050066555A publication Critical patent/KR20050066555A/en
Application granted granted Critical
Publication of KR100552675B1 publication Critical patent/KR100552675B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30181Instruction operation extension or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • G06F9/3012Organisation of register space, e.g. banked or distributed register file
    • G06F9/3013Organisation of register space, e.g. banked or distributed register file according to data content, e.g. floating-point registers, address registers

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

1. 청구범위에 기재된 발명이 속한 기술분야1. TECHNICAL FIELD OF THE INVENTION

본 발명은 확장 인스트럭션 선택 장치 및 그 방법에 관한 것임.The present invention relates to an extended instruction selection device and a method thereof.

2. 발명이 해결하려고 하는 기술적 과제2. The technical problem to be solved by the invention

본 발명은, 어플리케이션의 성능 향상을 위해 확장 인스트럭션 셋을 추출하기 위한 확장 인스트럭션 선택 장치 및 그 방법을 제공하는데 그 목적이 있음.An object of the present invention is to provide an extended instruction selection apparatus and method for extracting an extended instruction set for improving performance of an application.

3. 발명의 해결방법의 요지3. Summary of Solution to Invention

본 발명은, 확장 인스트럭션 선택 장치에 있어서, 어플리케이션 코드의 데이터 플로우를 분석하여 데이터 플로우 그래프를 추출하기 위한 데이터 플로우 그래프 추출 수단; 상기 데이터 플로우 그래프 추출 수단에서 추출한 데이터 플로우 그래프에서 확장 인스트럭션 후보를 추출하기 위한 확장 인스트럭션 후보 추출 수단; 상기 확장 인스트럭션 후보 추출 수단에서 추출한 확장 인스트럭션 후보를 합성하여 비용함수를 결정하기 위한 합성 수단; 상기 어플리케이션 코드를 최적화하여 최적화된 어플리케이션 코드를 추출하기 위한 최적화 수단; 기 정해진 기본 인스트럭션 셋과 상기 최적화 수단에서 최적화된 어플리케이션 코드를 프로파일링하기 위한 프로파일링 수단; 및 상기 합성 수단으로부터의 비용함수와 상기 프로파일링 수단으로부터의 프로파일링 결과에 대하여 시뮬레이티드 어닐링을 수행하여 확산 인스트럭션 셋을 선택하기 위한 확산 인스트럭션 선택 수단을 포함함.An extended instruction selection device, comprising: data flow graph extraction means for analyzing a data flow of an application code to extract a data flow graph; Extension instruction candidate extraction means for extracting an extension instruction candidate from the data flow graph extracted by the data flow graph extraction means; Synthesizing means for synthesizing the extended instruction candidates extracted by the extended instruction candidate extracting means to determine a cost function; Optimization means for optimizing the application code to extract optimized application code; Profiling means for profiling a predetermined basic instruction set and application code optimized by the optimization means; And diffusion instruction selecting means for performing a simulated annealing on the cost function from the synthesizing means and the profiling results from the profiling means to select a diffusion instruction set.

4. 발명의 중요한 용도4. Important uses of the invention

본 발명은 가변 명령어셋 프로세서 등에 이용됨.The present invention is used in a variable instruction set processor.

가변 명령어셋 프로세서, 확장 인스트럭션 선택, 데이터 플로우, 프로파일링, 시뮬레이티드 어닐링Variable Instruction Set Processor, Extended Instruction Selection, Data Flow, Profiling, Simulated Annealing

Description

확장 인스트럭션 선택 장치 및 그 방법{Apparatus for Selecting Extended Instruction and Method Thereof} Apparatus for Selecting Extended Instruction and Method Thereof}             

도 1은 본 발명에 따른 확장 인스트럭션 선택 장치의 일실시예 구성도.1 is a block diagram of an embodiment of an extended instruction selection device according to the present invention;

도 2는 상기 도 1의 확장 인스트럭션 후보 추출부가 확장 인스트럭션 후보를 추출하는 과정을 설명하기 위한 일예시도.FIG. 2 is an exemplary view for explaining a process of extracting an extended instruction candidate by the extended instruction candidate extractor of FIG. 1; FIG.

도 3은 본 발명에 따른 확장 인스트럭션 선택 방법에 대한 일실시예 흐름도.3 is a flowchart of an embodiment of a method for selecting an extended instruction according to the present invention;

도 4는 본 발명에 따른 확장 인스트럭션 선택 방법의 알고리즘을 설명하기 위한 일예시도.Figure 4 is an example for explaining the algorithm of the extended instruction selection method according to the present invention.

* 도면의 주요 부분에 대한 부호의 설명* Explanation of symbols for the main parts of the drawings

110 : 어플리케이션 코드 생성부 120 : 데이터 플로우 그래프 추출부110: application code generation unit 120: data flow graph extraction unit

130 : 확장 인스트럭션 후보 추출부 140 : 합성부130: extended instruction candidate extracting unit 140: synthesis unit

150 : 최적화부 160 : 프로파일링부150: optimizer 160: profiling unit

170 : 확장 인스트럭션 선택부170: extended instruction selection unit

본 발명은 가변 명령어셋 프로세서 등에 이용되는 확장 인스트럭션 선택 장치 및 그 방법에 관한 것으로서, 더욱 상세하게는 멀티미디어 이동통신, 영상 압축, 암호 등의 분야에서 가변 명령어셋 프로세서(Configurable Processor) 등에 이용되는, 확장 인스트럭션 선택 장치 및 그 방법에 관한 것이다.The present invention relates to an apparatus for selecting an extended instruction used in a variable instruction set processor and the like, and more particularly, to an apparatus used in a variable instruction set processor for configuring a multimedia mobile communication, video compression, encryption, and the like. An instruction selection apparatus and method are provided.

일반적으로 멀티미디어 이동통신, 영상 압축, 암호 분야 등의 임베디드 프로세서(Embedded Processor)에서 수행되는 어플리케이션(Application)에서, 각각 고유의 알고리즘을 가지고 있으며 어플리케이션에 고유한 인스트럭션을 가지는 가변 명령어셋 프로세서의 효용성이 증대되고 있다. In general, in applications executed in embedded processors such as multimedia mobile communication, video compression, and cryptography, the availability of a variable instruction set processor having a unique algorithm and instructions unique to the application is increased. It is becoming.

이러한 가변 명령어셋 프로세서의 개발에 있어 가장 중요한 것은 어플리케이션의 성능을 가장 많이 향상시킬 수 있는 확장 인스트럭션 셋을 추출하는 기술이다. The most important thing in the development of such a variable instruction set processor is a technique for extracting an extended instruction set that can most improve the performance of an application.

가변 명령어셋 프로세서의 확장 인스트럭션 설계를 위해서는, 해당하는 어플리케이션의 C 소스 파일을 수행하여 프로파일링(Profiling)을 수행한 후에, 자주 사용되거나 병목이 되는 지점의 코드 블록을 분석하여 새로운 확장 인스트럭션으로 정의하여, 프로세서의 하드웨어에 추가하고 어플리케이션 소스코드를 수정하여야 한다. 그리고, 어플리케이션 코드를 실행하기 위해서는 새로운 확장 인스트럭션을 이용하여 다시 매핑을 하여야 한다.In order to design the extended instruction of the variable instruction set processor, after profiling by executing the C source file of the corresponding application, the code block at the frequently used or bottlenecked point is analyzed and defined as a new extension instruction. In addition, you must add to the processor hardware and modify the application source code. And to execute the application code, you have to remap using the new extension instruction.

이와 같이 확장 인스트럭션을 추출하기 위한 개발 환경을 제시하고 있는 상 용 툴이 존재한다. 그러나, 상기 툴은 확장 인스트럭션을 정의할 수 있는 기술언어와 툴 체인을 제공할 뿐, 어떠한 자동화된 절차나 근사 알고리즘을 제공하고 있지 못하다. 따라서, 확장 인스트럭션의 설계와 구현은 전적으로 설계자가 하여야 하는 문제점이 있다.As such, there are commercial tools that provide a development environment for extracting extension instructions. However, the tool does not provide any automated procedures or approximation algorithms, but only provides a technical language and tool chain to define extension instructions. Therefore, there is a problem that the design and implementation of the extended instructions must be entirely up to the designer.

상기와 같은 문제점을 해결하기 위한 종래 기술이, 논문[A.Alippi, "Determining the Optimum Extended Instruction-Set Architecture for Application-Specific Reconfigurable VLIW CPUs", 12th IEEE International Workshop on Rapid System Prototyping, June 25-27, 2001]에 개시되어 있다.Conventional techniques for solving the above problems are described in A.Alippi, "Determining the Optimum Extended Instruction-Set Architecture for Application-Specific Reconfigurable VLIW CPUs", 12th IEEE International Workshop on Rapid System Prototyping , June 25-27, 2001].

상기 논문에 개시된 종래 기술은, 기존의 확장 인스트럭션 추출을 위한 근사 알고리즘에 대한 연구로서, 분석된 데이터 플로우 그래프 상에서 다중입력 단일출력(Multiple Input Single Output; MISO) 형태의 확장 인스트럭션을 찾아내는 방법에 관한 것이다.The prior art disclosed in the paper relates to a method for finding an extension instruction in the form of multiple input single output (MISO) on an analyzed data flow graph as a study on an approximation algorithm for extracting an existing extension instruction. .

그러나, 상기 논문에 개시된 종래 기술도 역시 제한적인 근사 알고리즘(Approximation Algorithm)만을 제시할 뿐, 자동으로 확장 인스트럭션을 찾아낼 수는 없는 문제점이 있다.However, the prior art disclosed in the above paper also presents only a limited approximation algorithm, and there is a problem in that it cannot automatically find an extension instruction.

상기한 바와 같이, 현재 확장 인스트럭션을 선택하는 기술로는 자동화된 방법이 없을 뿐만 아니라, 그 알고리즘은 존재하나 문제의 복잡도가 지수적으로 증가함에 따라서 단순한 근사 알고리즘만이 존재한다. 그러나, 이러한 단순 근사 알고리즘으로는 정확한 확장 인스트럭션 셋을 추출하는 것이 어려운 문제점이 있다.As mentioned above, there are currently no automated methods for selecting extension instructions, the algorithms exist, but as the complexity of the problem increases exponentially, only simple approximation algorithms exist. However, it is difficult to extract the correct set of extension instructions with this simple approximation algorithm.

본 발명은 상기한 바와 같은 문제점을 해결하기 위하여 제안된 것으로, 어플리케이션의 성능 향상을 위해 확장 인스트럭션 셋을 추출하기 위한 확장 인스트럭션 선택 장치 및 그 방법을 제공하는데 그 목적이 있다.
The present invention has been proposed to solve the above problems, and an object thereof is to provide an extended instruction selection apparatus and method for extracting an extended instruction set for improving performance of an application.

상기 목적을 달성하기 위한 본 발명의 장치는, 확장 인스트럭션 선택 장치에 있어서, 어플리케이션 코드의 데이터 플로우를 분석하여 데이터 플로우 그래프를 추출하기 위한 데이터 플로우 그래프 추출 수단; 상기 데이터 플로우 그래프 추출 수단에서 추출한 데이터 플로우 그래프에서 확장 인스트럭션 후보를 추출하기 위한 확장 인스트럭션 후보 추출 수단; 상기 확장 인스트럭션 후보 추출 수단에서 추출한 확장 인스트럭션 후보를 합성하여 비용함수를 결정하기 위한 합성 수단; 상기 어플리케이션 코드를 최적화하여 최적화된 어플리케이션 코드를 추출하기 위한 최적화 수단; 기 정해진 기본 인스트럭션 셋과 상기 최적화 수단에서 최적화된 어플리케이션 코드를 프로파일링하기 위한 프로파일링 수단; 및 상기 합성 수단으로부터의 비용함수와 상기 프로파일링 수단으로부터의 프로파일링 결과에 대하여 시뮬레이티드 어닐링을 수행하여 확산 인스트럭션 셋을 선택하기 위한 확산 인스트럭션 선택 수단을 포함하는 것을 특징으로 한다.An apparatus of the present invention for achieving the above object comprises: an extended instruction selecting apparatus, comprising: data flow graph extracting means for analyzing a data flow of an application code to extract a data flow graph; Extension instruction candidate extraction means for extracting an extension instruction candidate from the data flow graph extracted by the data flow graph extraction means; Synthesizing means for synthesizing the extended instruction candidates extracted by the extended instruction candidate extracting means to determine a cost function; Optimization means for optimizing the application code to extract optimized application code; Profiling means for profiling a predetermined basic instruction set and application code optimized by the optimization means; And diffusion instruction selecting means for selecting a diffusion instruction set by performing simulated annealing on the cost function from the synthesizing means and the profiling result from the profiling means.

한편, 본 발명의 방법은, 확장 인스트럭션 선택 방법에 있어서, 어플리케이션 코드의 데이터 플로우를 분석하여 데이터 플로우 그래프를 추출하는 데이터 플 로우 그래프 추출 단계; 상기 추출한 데이터 플로우 그래프에서 확장 인스트럭션 후보를 추출하는 확장 인스트럭션 후보 추출 단계; 상기 추출한 확장 인스트럭션 후보를 합성하여 비용함수를 결정하는 비용함수 결정 단계; 상기 어플리케이션 코드를 최적화하여 최적화된 어플리케이션 코드를 추출하는 최적화된 어플리케이션 코드 추출 단계; 기 정해진 기본 인스트럭션 셋과 상기 추출한 최적화된 어플리케이션 코드를 프로파일링하는 프로파일링 단계; 및 상기 결정한 비용함수와 상기 프로파일링 결과에 대하여 시뮬레이티드 어닐링을 수행하여 확산 인스트럭션 셋을 선택하는 확산 인스트럭션 선택 단계를 포함하는 것을 특징으로 한다.On the other hand, the method of the present invention, extended instruction selection method, data flow graph extraction step of extracting a data flow graph by analyzing the data flow of the application code; An extension instruction candidate extraction step of extracting an extension instruction candidate from the extracted data flow graph; A cost function determining step of synthesizing the extracted extended instruction candidates to determine a cost function; An optimized application code extraction step of extracting an optimized application code by optimizing the application code; A profiling step of profiling a predetermined basic instruction set and the extracted optimized application code; And a diffusion instruction selecting step of performing a simulated annealing on the determined cost function and the profiling result to select a diffusion instruction set.

상술한 목적, 특징들 및 장점은 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 보다 분명해 질 것이다. 우선 각 도면의 구성요소들에 참조 번호를 부가함에 있어서, 동일한 구성요소들에 한해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 번호를 가지도록 하고 있음에 유의하여야 한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일실시예를 상세히 설명한다.The above objects, features and advantages will become more apparent from the following detailed description taken in conjunction with the accompanying drawings. First of all, in adding reference numerals to the components of each drawing, it should be noted that the same components have the same number as much as possible even if displayed on different drawings. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에 따른 확장 인스트럭션 선택 장치의 일실시예 구성도이다.1 is a configuration diagram of an extension instruction selection device according to an embodiment of the present invention.

도면에 도시된 바와 같이, 본 발명에 따른 확장 인스트럭션 선택 장치는, 외부의 어플리케이션 코드 생성부(110), 데이터 플로우 그래프 추출부(120), 확장 인스트럭션 후보 추출부(130), 합성부(140), 최적화부(150), 프로파일링부(160) 및 확장 인스트럭션 선택부(170)를 포함한다.As shown in the figure, the apparatus for selecting an extended instruction according to the present invention includes an external application code generator 110, a data flow graph extractor 120, an extended instruction candidate extractor 130, and a synthesizer 140. , An optimization unit 150, a profiling unit 160, and an extension instruction selecting unit 170.

본 발명의 외부에 위치하는 상기 어플리케이션 코드 생성부(110)는 소정의 프로그래밍 언어(예를 들어, C언어 등)로 어플리케이션 코드를 생성하는 기능을 담 당한다.The application code generator 110 located outside of the present invention is responsible for generating an application code in a predetermined programming language (for example, C language).

상기 데이터 플로우 그래프 추출부(120)는 상기 어플리케이션 코드를 읽어서 데이터 플로우를 분석하여 데이터 플로우 그래프를 추출하는 기능을 담당한다. 즉, 어플리케이션 코드의 베이직 블록에 대해서 데이터 플로우 그래프를 추출해 낼 수 있다. The data flow graph extractor 120 reads the application code and analyzes the data flow to extract a data flow graph. In other words, a data flow graph can be extracted for a basic block of application code.

상기 확장 인스트럭션 후보 추출부(130)는 상기 데이터 플로우 그래프 추출부(120)에서 추출한 데이터 플로우 그래프에서 확장 인스트럭션 후보를 추출하는 기능을 담당한다. 즉, 확장 인스트럭션 후보를 추출하기 위하여 상기 데이터 플로우 그래프를 계층적으로 잘라 가면서 노드들의 위치를 할당한다. 이때, 어플리케이션 코드의 베이직 블록은 루트(root)를 이루고 각 인스트럭션이 리프(leaf)를 이루는 트리를 형성한다. 따라서, 임의의 모든 인스트럭션 조합이 표현 가능하다. 이를 도 2를 참조로 상세히 설명하면 다음과 같다.The extended instruction candidate extractor 130 is responsible for extracting the extended instruction candidate from the data flow graph extracted by the data flow graph extractor 120. That is, the positions of nodes are allocated while hierarchically cutting the data flow graph to extract the extended instruction candidates. At this time, the basic block of the application code forms a root, and each instruction forms a tree. Thus, any and all instruction combinations can be represented. This will be described in detail with reference to FIG. 2 as follows.

도 2는 상기 도 1의 확장 인스트럭션 후보 추출부가 확장 인스트럭션 후보를 추출하는 과정을 설명하기 위한 일예시도이다.FIG. 2 is an exemplary view for explaining a process of extracting an extended instruction candidate by the extended instruction candidate extractor of FIG. 1.

도면에 도시된 바와 같이, 본 발명에 따른 상기 도 1의 확장 인스트럭션 후보 추출부(130)는, 데이터 플로우 그래프에서 입출력 제약 조건을 만족하는 서브 그래프를 추출해서 확장 인스트럭션의 후보로 할 수 있다.As shown in the figure, the extended instruction candidate extractor 130 of FIG. 1 according to the present invention may extract a subgraph satisfying an input / output constraint from a data flow graph to be a candidate for the extended instruction.

이때, 입출력 제약 조건은 데이터 플로우 그래프 G의 서브 그래프를 S라 할 때 IN(S) = Nin 과 OUT(S) = Nout을 만족해야 한다. 여기서, Nin과 N out은 각각 가변 명령어셋 프로세서의 레지스터 파일의 읽기와 쓰기 포트의 개수이다.At this time, the input / output constraints must satisfy IN (S) = N in and OUT (S) = N out when the subgraph of the data flow graph G is S. Where N in and N out are the number of read and write ports of the register file of the variable instruction set processor, respectively.

상기 합성부(140)는 상기 확장 인스트럭션 후보 추출부(130)에서 추출한 확장 인스트럭션 후보들을 합성하여, 하드웨어의 비용함수를 결정하는 기능을 담당한다. 가능한 해의 범위를 탐색하기 위하여 비용함수는 다음의 [수학식 1]과 같이 설정할 수 있다.The synthesis unit 140 is responsible for a function of determining a cost function of hardware by synthesizing the extension instruction candidates extracted by the extension instruction candidate extraction unit 130. To explore the range of possible solutions, the cost function can be set as in Equation 1 below.

Ctotal = αhwChw + αcycleCcycle C total = α hw C hw + α cycle C cycle

이때, Chw=Σ(인스트럭션 하드웨어의 비용), Ccycle=Σ(인스트럭션 사이클)이고, αhw는 인스트럭션 하드웨어 가중치이며, αcycle는 인스트럭션 사이클 가중치이다.At this time, C hw = Σ (cost of instruction hardware), C cycle = Σ (instruction cycle), α hw is instruction hardware weight, and α cycle is instruction cycle weight.

한편, 상기 최적화부(150)는 상기 어플리케이션 코드 생성부(110)가 생성한 어플리케이션 코드를 최적화하여 최적화된 어플리케이션 코드를 추출하는 기능을 담당하며, 상기 프로파일링부(160)는 기 정해진 기본 인스트럭션 셋과 상기 최적화부(150)로부터 수신한 최적화된 어플리케이션 코드를 프로파일링하는 기능을 담당한다.On the other hand, the optimizer 150 is responsible for the function of extracting the optimized application code by optimizing the application code generated by the application code generator 110, the profiling unit 160 and the predetermined basic instruction set It is responsible for profiling the optimized application code received from the optimizer 150.

이후, 상기 확장 인스트럭션 선택부(170)는 상기 합성부(140) 및 상기 프로파일링부(170)로부터 수신한 비용함수와 프로파일링 결과에 대하여 시뮬레이티드 어닐링(Simulated Annealing)을 수행하여 확산 인스트럭션 셋을 자동으로 선택하는 기능을 담당한다. Thereafter, the extended instruction selector 170 performs a simulated annealing on the cost function and the profiling result received from the synthesis unit 140 and the profiling unit 170 to perform a diffusion instruction set. It is in charge of selecting automatically.

확장 인스트럭션을 선택하기 위해서, 비용함수는 하드웨어 비용과 전체 수행 사이클로 평가되며 서브그래프의 스트링을 조작하여 최적의 확장 인스트럭션 셋을 얻을 수 있다. 본 발명은 대상 어플리케이션 코드에 대해서 프로파일링을 수행하고 수행시 병목이 되는 코드의 블록에 대해서 자동으로 확장 인스트럭션을 추출하고, 가변 명령어셋 프로세서에 기능 유닛(Functional Unit; FU)의 형태로 삽입할 수 있다.To select an extension instruction, the cost function is evaluated in terms of hardware cost and overall performance cycle, and the string of subgraphs can be manipulated to obtain an optimal set of extension instructions. The present invention can perform the profiling of the target application code, and automatically extract the extension instruction for the block of code that is the bottleneck when performing, and insert it into the variable instruction set processor in the form of a functional unit (FU). have.

도 3은 본 발명에 따른 확장 인스트럭션 선택 방법에 대한 일실시예 흐름도이다.3 is a flowchart illustrating an example of a method for selecting an extended instruction according to the present invention.

먼저, 소정의 프로그래밍 언어(예를 들어, C언어 등)로 어플리케이션 코드를 생성한다(310). 다음으로, 상기 생성한 어플리케이션 코드를 읽어서 데이터 플로우를 분석하여 데이터 플로우 그래프를 추출한다(320).First, an application code is generated 310 in a predetermined programming language (eg, C language). Next, the data flow graph is extracted by reading the generated application code to extract a data flow graph (320).

이후, 상기 추출한 데이터 플로우 그래프에서 확장 인스트럭션 후보를 추출하고(330), 이 추출한 확장 인스트럭션 후보를 합성하여 하드웨어 비용함수를 결정한다(340).Subsequently, the extended instruction candidate is extracted from the extracted data flow graph (330), and the extracted extended instruction candidate is synthesized to determine a hardware cost function (340).

한편, 상기 생성한 어플리케이션 코드를 최적화하여 최적화된 어플리케이션 코드를 추출하고(350), 가변 명령어셋 프로세서의 기본 인스트럭션 셋과 상기 최적화된 어플리케이션 코드에 대하여 프로파일링을 수행한다(360). Meanwhile, the optimized application code is extracted by optimizing the generated application code (350), and the basic instruction set of the variable instruction set processor and the optimized application code are profiled (360).

이후, 상기 결정된 하드웨어의 비용함수와 상기 프로파일링 결과에 대하여 시뮬레이티드 어닐링을 수행하여 확산 인스트럭션 셋을 자동으로 선택한다(370). 이후, 종료시까지 '330' 과정부터 반복 수행한다(380).Thereafter, simulated annealing is performed on the determined cost function of the hardware and the profiling result to automatically select a spread instruction set (370). Thereafter, the process is repeated from 330 until the end (380).

즉, 본 발명에서, 초기 상태에는 데이터 플로우 그래프 상에서 임의의 베이직 인스트럭션 셋을 선택하고 그 주위의 인접한 해(확장 인스트럭션 셋을 선택적으로 적용)들의 비용을 평가하여 더 낮은 비용의 해가 발견되면 그 해를 새로운 해로 선택할 수 있다. 이를 주위에 더 이상 낮은 비용을 갖는 해가 발견되지 않을 때까지 반복적으로 수행한다.That is, in the present invention, in the initial state, any basic instruction set is selected on the data flow graph, and the cost of adjacent solutions (optionally applying the extended instruction set) around it is evaluated to find a solution of lower cost. Can be chosen as the new year. Do this repeatedly until no more low cost solutions are found around it.

이는, 임의의 데이터 플로우 그래프 G에서 시작하며 볼츠만 확률 값에 따라 높은 비용을 가질 수 있다. 내부의 루프가 반복됨에 따라 데이터 플로우 그래프 G는 제어변수인 T가 낮아지면서 새로운 확장 인스트럭션으로 이루어진 해의 이동은 점점 비용이 낮아지는 방향으로 수렴하며, 제어변수인 T가 충분히 낮은 값에 이르면 그때의 상태는 확률적으로 최저에 가까운 낮은 비용의 상태에 머물러 있게 된다. 이것이 외부 루프의 중단 조건이 된다. This starts at any data flow graph G and can have a high cost depending on the Boltzmann probability value. As the inner loop repeats, the data flow graph G lowers the control variable T, and the movement of the solution with the new extended instructions converges in the direction of lower cost, and when the control variable T reaches a sufficiently low value, The state is likely to remain in a state of low cost, close to the lowest. This is the stop condition of the outer loop.

그때까지 이동되어진 확장 인스트럭션 셋을 최저 비용을 갖는 해로 선택할 수 있다.The extension instruction set that has been moved until then can be selected as the solution with the lowest cost.

도 4는 본 발명에 따른 확장 인스트럭션 선택 방법의 알고리즘을 설명하기 위한 일예시도이다.4 is an exemplary view for explaining an algorithm of the extended instruction selection method according to the present invention.

도면에 도시된 바와 같이, 본 발명에 따른 확장 인스트럭션 선택 방법은, 상기와 같은 알고리즘에 의해 최적화된 확장 알고리즘을 선택할 수 있다.As shown in the figure, the extension instruction selection method according to the present invention may select an extension algorithm optimized by the above algorithm.

상기와 같이 본 발명은, 원시 코드를 읽어서 데이터 플로우 분석을 수행하고, 데이터 플로우 분석 후 확장 인스트럭션으로 적당한 인스트럭션 후보들을 선택하고 이들을 합성하여 하드웨어 비용을 계산한다. 최적화된 어플리케이션 코드에서 나온 프로파일 정보와 함께 변형된 시뮬레이티드 어닐링을 이용하여 새로운 인스트럭션을 선택할 수 있다. 본 발명에서 제안한 방식을 이용하여 확장 인스트럭션을 자동으로 찾아낼 수 있으며, 확장 인스트럭션은 가변 명령어셋 프로세서의 기능 유닛으로 삽입될 수 있다.As described above, the present invention performs data flow analysis by reading the source code, selects appropriate instruction candidates as extended instructions after data flow analysis, and synthesizes them to calculate hardware costs. Modified simulated annealing with profile information from the optimized application code allows new instructions to be selected. By using the method proposed in the present invention, an extension instruction can be found automatically, and the extension instruction can be inserted into a functional unit of a variable instruction set processor.

상술한 바와 같은 본 발명의 방법은 프로그램으로 구현되어 컴퓨터로 읽을 수 있는 기록매체(씨디롬, 램, 롬, 플로피 디스크, 하드 디스크, 광자기 디스크 등)에 저장될 수 있다.The method of the present invention as described above may be implemented as a program and stored in a computer-readable recording medium (CD-ROM, RAM, ROM, floppy disk, hard disk, magneto-optical disk, etc.).

이상에서 설명한 본 발명은 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니고, 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하다는 것이 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 명백할 것이다.The present invention described above is not limited to the above-described embodiments and the accompanying drawings, and various substitutions, modifications, and changes are possible in the art without departing from the technical spirit of the present invention. It will be clear to those of ordinary knowledge.

상기한 바와 같은 본 발명은, 하드웨어 비용 및 수행 사이클에 기반한 최적화된 확장 인스트럭션 셋을 선택함으로써, 가변 명령어셋 프로세서의 확장 인스트럭션 설계를 자동화할 수 있는 효과가 있으며, 근사 알고리즘이 아닌 최적의 해를 구할 수 있도록 하는 효과가 있다.As described above, the present invention has the effect of automating the extended instruction design of the variable instruction set processor by selecting an optimized extended instruction set based on hardware cost and execution cycle, and obtaining an optimal solution rather than an approximation algorithm. It has the effect of making it possible.

또한, 본 발명은 가변 명령어셋 프로세서의 확장 인스트럭션 설계를 자동화함으로써, 이를 포함한 가변 명령어셋 프로세서 설계를 자동화할 수 있는 효과가 있다. In addition, the present invention has the effect of automating the design of the variable instruction set processor by automating the extended instruction design of the variable instruction set processor.                     

또한, 본 발명은 확장 인스트럭션 셋을 추가하는데 필요한 제약 조건이 바뀌더라도 손쉽게 대응할 수 있으며, 보다 빠른 가변 명령어셋 프로세서의 설계를 실현할 수 있는 효과가 있다.In addition, the present invention can easily respond even if the constraints required to add the extended instruction set is changed, it is possible to realize the design of a faster variable instruction set processor.

Claims (5)

확장 인스트럭션 선택 장치에 있어서,In the extended instruction selector, 어플리케이션 코드의 데이터 플로우를 분석하여 데이터 플로우 그래프를 추출하기 위한 데이터 플로우 그래프 추출 수단;Data flow graph extraction means for analyzing a data flow of the application code to extract a data flow graph; 상기 데이터 플로우 그래프 추출 수단에서 추출한 데이터 플로우 그래프에서 확장 인스트럭션 후보를 추출하기 위한 확장 인스트럭션 후보 추출 수단;Extension instruction candidate extraction means for extracting an extension instruction candidate from the data flow graph extracted by the data flow graph extraction means; 상기 확장 인스트럭션 후보 추출 수단에서 추출한 확장 인스트럭션 후보를 합성하여 비용함수를 결정하기 위한 합성 수단;Synthesizing means for synthesizing the extended instruction candidates extracted by the extended instruction candidate extracting means to determine a cost function; 상기 어플리케이션 코드를 최적화하여 최적화된 어플리케이션 코드를 추출하기 위한 최적화 수단;Optimization means for optimizing the application code to extract optimized application code; 기 정해진 기본 인스트럭션 셋과 상기 최적화 수단에서 최적화된 어플리케이션 코드를 프로파일링하기 위한 프로파일링 수단; 및Profiling means for profiling a predetermined basic instruction set and application code optimized by the optimization means; And 상기 합성 수단으로부터의 비용함수와 상기 프로파일링 수단으로부터의 프로파일링 결과에 대하여 시뮬레이티드 어닐링을 수행하여 확산 인스트럭션 셋을 선택하기 위한 확산 인스트럭션 선택 수단Diffusion instruction selecting means for selecting a diffusion instruction set by performing simulated annealing on the cost function from the synthesizing means and the profiling result from the profiling means 을 포함하는 확장 인스트럭션 선택 장치.Extended instruction selection device comprising a. 제 1 항에 있어서,The method of claim 1, 상기 확장 인스트럭션 후보 추출 수단은,The extended instruction candidate extracting means, 상기 데이터 플로우 그래프 추출 수단에서 추출한 데이터 플로우 그래프로부터 입출력 제약 조건을 만족하는 서브 그래프를 추출하여 확장 인스트럭션 후보로 추출하는 것을 특징으로 하는 확장 인스트럭션 선택 장치.And a subgraph satisfying an input / output constraint from the data flow graph extracted by the data flow graph extracting means and extracting the subgraph as an extension instruction candidate. 제 2 항에 있어서,The method of claim 2, 상기 입출력 제약 조건은,The input and output constraints, IN(S) = Nin 과 OUT(S) = Nout인 것(단, S는 서브 그래프이고, Nin과 N out은 각각 가변 명령어셋 프로세서의 레지스터 파일의 읽기와 쓰기 포트의 개수임)IN (S) = N in and OUT (S) = N out (where S is a subgraph and N in and N out are the number of read and write ports in the register file of the variable instruction set processor, respectively) 을 특징으로 하는 확장 인스트럭션 선택 장치.Extended instruction selection device, characterized in that. 제 1 항 내지 제 3 항 중 어느 한 항에 있어서,The method according to any one of claims 1 to 3, 상기 비용함수는,The cost function is 다음의 수학식을 이용하여 결정하는 것을 특징으로 하는 확장 인스트럭션 선택 장치.Extended instruction selection device, characterized in that determined using the following equation. [수학식][Equation] Ctotal = αhwChw + αcycleCcycle C total = α hw C hw + α cycle C cycle (단, Chw=Σ(인스트럭션 하드웨어의 비용), Ccycle=Σ(인스트럭션 사이클)이고, αhw는 인스트럭션 하드웨어 가중치이며, αcycle는 인스트럭션 사이클 가중치임) (Where C hw = Σ (cost of instruction hardware), C cycle = Σ (instruction cycle), α hw is instruction hardware weight, and α cycle is instruction cycle weight) 확장 인스트럭션 선택 방법에 있어서,In the extended instruction selection method, 어플리케이션 코드의 데이터 플로우를 분석하여 데이터 플로우 그래프를 추출하는 데이터 플로우 그래프 추출 단계;A data flow graph extraction step of extracting a data flow graph by analyzing a data flow of the application code; 상기 추출한 데이터 플로우 그래프에서 확장 인스트럭션 후보를 추출하는 확장 인스트럭션 후보 추출 단계;An extension instruction candidate extraction step of extracting an extension instruction candidate from the extracted data flow graph; 상기 추출한 확장 인스트럭션 후보를 합성하여 비용함수를 결정하는 비용함수 결정 단계;A cost function determining step of synthesizing the extracted extended instruction candidates to determine a cost function; 상기 어플리케이션 코드를 최적화하여 최적화된 어플리케이션 코드를 추출하는 최적화된 어플리케이션 코드 추출 단계;An optimized application code extraction step of extracting an optimized application code by optimizing the application code; 기 정해진 기본 인스트럭션 셋과 상기 추출한 최적화된 어플리케이션 코드를 프로파일링하는 프로파일링 단계; 및A profiling step of profiling a predetermined basic instruction set and the extracted optimized application code; And 상기 결정한 비용함수와 상기 프로파일링 결과에 대하여 시뮬레이티드 어닐링을 수행하여 확산 인스트럭션 셋을 선택하는 확산 인스트럭션 선택 단계A diffusion instruction selecting step of performing a simulated annealing on the determined cost function and the profiling result to select a diffusion instruction set. 를 포함하는 확장 인스트럭션 선택 방법.Extended instruction selection method comprising a.
KR1020030097858A 2003-12-26 2003-12-26 Apparatus for Selecting Extended Instruction and Method Thereof KR100552675B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020030097858A KR100552675B1 (en) 2003-12-26 2003-12-26 Apparatus for Selecting Extended Instruction and Method Thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020030097858A KR100552675B1 (en) 2003-12-26 2003-12-26 Apparatus for Selecting Extended Instruction and Method Thereof

Publications (2)

Publication Number Publication Date
KR20050066555A KR20050066555A (en) 2005-06-30
KR100552675B1 true KR100552675B1 (en) 2006-02-20

Family

ID=37257620

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020030097858A KR100552675B1 (en) 2003-12-26 2003-12-26 Apparatus for Selecting Extended Instruction and Method Thereof

Country Status (1)

Country Link
KR (1) KR100552675B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5418959A (en) 1992-11-30 1995-05-23 Intel Corporation Instruction operation size optimization
KR19990047339A (en) * 1997-12-03 1999-07-05 정선종 Automatic object extraction method
KR20010020544A (en) * 1997-06-27 2001-03-15 카멜레온 시스템즈, 인크 Method for compiling high level programming languages

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5418959A (en) 1992-11-30 1995-05-23 Intel Corporation Instruction operation size optimization
KR20010020544A (en) * 1997-06-27 2001-03-15 카멜레온 시스템즈, 인크 Method for compiling high level programming languages
KR19990047339A (en) * 1997-12-03 1999-07-05 정선종 Automatic object extraction method

Also Published As

Publication number Publication date
KR20050066555A (en) 2005-06-30

Similar Documents

Publication Publication Date Title
US6421815B1 (en) Method and apparatus for optimized partitioning of finite state machines synthesized from hierarchical high-level descriptions
US11221834B2 (en) Method and system of intelligent iterative compiler optimizations based on static and dynamic feedback
Peymandoust et al. Automatic instruction set extension and utilization for embedded processors
Zuo et al. Improving high level synthesis optimization opportunity through polyhedral transformations
US7895552B1 (en) Extracting, visualizing, and acting on inconsistencies between a circuit design and its abstraction
CA2708116C (en) Integrated circuit analysis systems and methods
US8276107B2 (en) Integrated data model based framework for driving design convergence from architecture optimization to physical design closure
US8352505B1 (en) Identification of resource sharing patterns through isomorphic subtree enumeration
Sanches et al. Identifying merge-beneficial software kernels for hardware implementation
JP2009129179A (en) Program parallelization support device and program parallelization support method
US20070011664A1 (en) Device and method for generating an instruction set simulator
JP5450840B2 (en) Test data generation method for program execution performance evaluation
Schafer et al. Design space exploration acceleration through operation clustering
US7111278B1 (en) Automated translation of a microprocessor opcode summary table to an architecture description language
KR101432710B1 (en) Method for mining frequent sub-graphs with support affinities
KR100552675B1 (en) Apparatus for Selecting Extended Instruction and Method Thereof
Le Moullec et al. Multi-granularity metrics for the era of strongly personalized SOCs
González-Álvarez et al. Automatic design of domain-specific instructions for low-power processors
JP5151722B2 (en) Data processing apparatus and method, and program
CN114385180A (en) Data processing method, device and equipment and computer storage medium
CN108573059B (en) Time sequence classification method and device based on feature sampling
EP3989059B1 (en) Interactive code optimizer
JP5514682B2 (en) Batch processing program analysis method and apparatus
Gonzalez-Alvarez et al. MInGLE: an efficient framework for domain acceleration using low-power specialized functional units
US20050278154A1 (en) Systems and methods for high level simulator control

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20090202

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee