KR102007881B1 - Method and system for fast and accurate cycle estimation through hybrid instruction set simulation - Google Patents

Method and system for fast and accurate cycle estimation through hybrid instruction set simulation Download PDF

Info

Publication number
KR102007881B1
KR102007881B1 KR1020170054209A KR20170054209A KR102007881B1 KR 102007881 B1 KR102007881 B1 KR 102007881B1 KR 1020170054209 A KR1020170054209 A KR 1020170054209A KR 20170054209 A KR20170054209 A KR 20170054209A KR 102007881 B1 KR102007881 B1 KR 102007881B1
Authority
KR
South Korea
Prior art keywords
target binary
instruction set
execution time
processor
code
Prior art date
Application number
KR1020170054209A
Other languages
Korean (ko)
Other versions
KR20180120380A (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 KR1020170054209A priority Critical patent/KR102007881B1/en
Publication of KR20180120380A publication Critical patent/KR20180120380A/en
Application granted granted Critical
Publication of KR102007881B1 publication Critical patent/KR102007881B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

본 발명은 시뮬레이션 기술에 관한 것으로서, 더 상세하게는 임베디드 시스템에서 작동하는 소프트웨어의 실행 시간을 시뮬레이션을 통해 예측하는 하이브리드 명령어 집합 시뮬레이션 방법 및 시스템에 대한 것이다.
본 발명에 따르면, 다양한 하드웨어를 사용하는 복잡한 소프트웨어의 경우에도 QEMU(Quick Emulator)의 확장을 사용하여 프로세서에서의 실행 시간을 계산하고, OVPsim(Open Virtual Platform simulator)의 확장을 사용하여 기타 하드웨어에의 사용에 필요한 실행 시간을 계산한 후, 둘의 결과를 결합하여 보다 정확한 실행 시간 예측 결과를 얻을 수 있다.
The present invention relates to a simulation technique, and more particularly, to a hybrid instruction set simulation method and system for predicting through the simulation the execution time of software operating in an embedded system.
According to the present invention, even for complex software using various hardware, the execution time of the processor is calculated using the extension of the Quick Emulator (QEMU), and the extension to the other hardware using the extension of the Open Virtual Platform simulator (OVPsim). After calculating the execution time required for use, you can combine the two results to get more accurate execution time predictions.

Description

빠르고 정확한 실행 시간 예측을 위한 하이브리드 명령어 집합 시뮬레이션 방법 및 시스템{METHOD AND SYSTEM FOR FAST AND ACCURATE CYCLE ESTIMATION THROUGH HYBRID INSTRUCTION SET SIMULATION}Hybrid Instruction Set Simulation Method and System for Fast and Accurate Execution Time Estimation {METHOD AND SYSTEM FOR FAST AND ACCURATE CYCLE ESTIMATION THROUGH HYBRID INSTRUCTION SET SIMULATION}

본 발명은 시뮬레이션 기술에 관한 것으로서, 더 상세하게는 임베디드 시스템에서 작동하는 소프트웨어의 실행 시간을 시뮬레이션을 통해 예측하는 하이브리드 명령어 집합 시뮬레이션 방법 및 시스템에 대한 것이다.The present invention relates to a simulation technique, and more particularly, to a hybrid instruction set simulation method and system for predicting through the simulation the execution time of software operating in an embedded system.

실시간 시스템(Real-time system)은 각 소프트웨어가 정해진 제한 시간 이내에 실행이 완료되는 시스템을 일컫는다. 실시간 시스템에서 소프트웨어의 실행 시간은 시스템 성능 보장에 매우 중요한 요소이다. Real-time system refers to a system in which each software is executed within a predetermined time limit. In a real-time system, the execution time of the software is a very important factor in ensuring system performance.

소프트웨어 실행 시간은 시스템을 구성하는 하드웨어에 따라 매우 다르게 나타나기 때문에, 소프트웨어와 하드웨어를 함께 사용하여 실행 시간을 측정해야 정확한 결과를 얻을 수 있다. 하지만 실제 하드웨어로 시스템을 구축하고 소프트웨어 성능을 분석하는 일은 매우 큰 시간과 비용이 소모된다. 시간과 비용을 절감하기 위해 하드웨어의 동작을 모사하는 시뮬레이터를 통해 소프트웨어 성능을 분석하는 기술들이 널리 사용된다. Since software execution time is very different depending on the hardware that makes up the system, you should measure the execution time by using both software and hardware together to get accurate results. But building systems with real hardware and analyzing software performance can be very time consuming and expensive. Techniques for analyzing software performance through simulators that simulate the behavior of hardware are widely used to save time and money.

대표적인 시뮬레이터는 명령어 집합 시뮬레이션(Instruction Set Simulation)기술을 활용한다. 이는 특정 하드웨어의 각 명령어(Instruction) 기능을 소프트웨어적으로 모사하여 실제 하드웨어 없이도 해당 하드웨어에서 작동하도록 만들어진 소프트웨어의 실행을 가능하게 한다. Representative simulators utilize Instruction Set Simulation technology. This simulates each instruction function of a specific hardware in software, enabling the execution of software designed to operate on that hardware without the actual hardware.

이는 사이클-정확한 시뮬레이션 (Cycle Accurate Simulation) 에 비해 매우 빠른 실행 속도를 가지며, 프로세서 이외의 메모리, 디스크, 네트워크 등의 하드웨어들도 모사하여 시스템 단위 시뮬레이션 (Full System Simulation)을 가능하게 한다. It has much faster execution speed than Cycle Accurate Simulation, and enables full system simulation by simulating hardware other than processor, such as memory, disk, and network.

최근에 이러한 명령어 집합 시뮬레이션에 기반한 소프트웨어 실행 시간 예측 기술들이 제시되었다. 이러한 기술들은 프로세서 모델을 기반으로 캐시를 함께 고려하거나, 프로세서 모델과 최악 실행 시간 (Worst-Case Execution Time) 분석 기법을 결합하는 등의 방법으로 실행 시간 예측의 정확도를 높이는 방향으로 발전하고 있다. Recently, software execution time estimation techniques based on such instruction set simulation have been proposed. These technologies are evolving toward higher accuracy of runtime prediction, such as considering caches based on processor models, or combining processor models with worst-case execution time analysis techniques.

그런데, 이러한 시도에도 불구하고 여전히 소프트웨어 실행 시간 분석에서 높은 정확도를 얻기란 쉽지 않다. 이는 소프트웨어가 캐시, 버스, 메모리, 디스크 등의 다양한 하드웨어 자원을 사용하는데 반해 시뮬레이션 기반 성능 분석 기법들은 이에 대한 분석이 충분하지 않기 때문이다. However, despite these attempts, it is still difficult to achieve high accuracy in software runtime analysis. This is because software uses a variety of hardware resources such as cache, bus, memory, and disk, whereas simulation-based performance analysis techniques are not sufficient.

소프트웨어 실행 시간에 영향을 주는 하드웨어 자원들의 동작을 모사하고, 각 자원들의 동작이 실행 시간에 어떠한 영향을 주는지 모델링하고, 이를 바탕으로 실행 시간을 예측하는 일은 하드웨어 자원의 다양성 및/또는 복잡성으로 인해 매우 어려운 일이 된다. Simulating the behavior of hardware resources that affect software execution time, modeling how each resource's behavior affects execution time, and estimating execution time based on the diversity and / or complexity of hardware resources It is difficult.

1. 한국공개특허번호 제10-2014-0140789호1. Korean Patent Publication No. 10-2014-0140789

1. 김은혜외, "병렬 프로그램 로그 군집화 기반 작업 실행 시간 예측모형 연구"산업경영시스템학회지 v.38 n.3 (2015. 9) pp.56-631. Eun Hye Kim, "A Study on the Prediction Model of Job Execution Time Based on Parallel Program Log Clustering" v.38 n.3 (2015. 9) pp.56-63 2. 양수현외, "OVPsim을 이용한 모바일 컴퓨터의 성능 평가 연구" 한국정보처리학회 2011년 2. Soo-Hyun Yang et al., "A Study on the Performance Evaluation of Mobile Computers Using OVPsim" Korea Information Processing Society, 2011

본 발명은 위 배경기술에 따른 문제점을 해소하기 위해 제안된 것으로서, 명령어 집합 시뮬레이션에 기반한 소프트웨어 실행 시간 예측 기술을 개발하는 하이브리드 명령어 집합 시뮬레이션 방법 및 시스템을 제공하는 데 그 목적이 있다.The present invention has been proposed to solve the problems according to the above background, and an object thereof is to provide a hybrid instruction set simulation method and system for developing a software execution time prediction technique based on instruction set simulation.

또한, 본 발명은 소프트웨어가 다양한 하드웨어 자원을 사용하는 복잡한 경우에도 빠르고 정확한 실행 시간 예측 결과를 얻을 수 있는 하이브리드 명령어 집합 시뮬레이션 방법 및 시스템을 제공하는 데 다른 목적이 있다. In addition, another object of the present invention is to provide a hybrid instruction set simulation method and system capable of obtaining fast and accurate execution time prediction results even when a software uses various hardware resources.

본 발명은 위에서 제시된 과제를 달성하기 위해, 명령어 집합 시뮬레이션에 기반한 소프트웨어 실행 시간 예측 기술을 개발하는 하이브리드 명령어 집합 시뮬레이션 방법을 제공한다.The present invention provides a hybrid instruction set simulation method for developing a software execution time prediction technique based on the instruction set simulation to achieve the above problems.

상기 하이브리드 명령어 집합 시뮬레이션 방법은,The hybrid instruction set simulation method,

(a) 타깃 바이너리 입력기가 타깃 바이너리 코드를 입력받는 단계;(a) receiving, by the target binary input unit, the target binary code;

(b) 확장 QEMU(Quick Emulator) 모듈이 상기 타깃 바이너리 코드를 제 1 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 프로세서용 요구 사이클을 산출하는 단계;(b) an extended Quick Emulator (QEMU) module converting the target binary code into a first machine instruction to execute an instruction set simulator to calculate a request cycle for a processor;

(c) 확장 OVPsim(Open Virtual Platform simulator) 모듈이 상기 타깃 바이너리 코드를 제 2 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 주변 하드웨어에 대한 이벤트 통계를 산출하는 단계; 및(c) an expanded Open Virtual Platform simulator (OVPsim) module converting the target binary code into a second machine instruction to execute an instruction set simulator to calculate event statistics for surrounding hardware; And

(d) 사이클 평가 엔진이 상기 프로세서용 요구 사이클 및 이벤트 통계를 이용하여 실행 시간 예측을 산출하는 단계;를 포함하는 것을 특징으로 한다.and (d) a cycle evaluation engine calculating execution time prediction using the request cycles and event statistics for the processor.

이때, 상기 (b) 단계에서, 상기 프로세서용 요구 사이클은 프로세서 파이프라인 모델을 이용하여 산출되는 상기 타깃 바이너리 코드의 각 코드 블럭에 대한 요구 사이클 및 상기 타깃 바이너리 코드에서 1회 이상 실행되는 각 코드 블록의 실행 횟수를 통해 최종 산출되는 것을 특징으로 할 수 있다. At this time, in the step (b), the request cycle for the processor is a request cycle for each code block of the target binary code calculated using a processor pipeline model and each code block executed at least once in the target binary code. It may be characterized in that the final calculation through the number of times of execution.

또한, 상기 (c) 단계에서, 상기 이벤트 통계는 하드웨어 동작 모델을 이용하여 산출되며, 상기 하드웨어 동작 모델은 주변 하드웨어 모델링 API(Application Programming Interface)들로 구성되는 것을 특징으로 할 수 있다. In addition, in the step (c), the event statistics may be calculated using a hardware operation model, and the hardware operation model may be configured with peripheral hardware modeling APIs.

또한, 상기 주변 하드웨어 모델링 API는 BHM(Behavioral Hardware Modeling) API, PPM(Peripheral Programming Model) API를 포함하는 것을 특징으로 할 수 있다.In addition, the peripheral hardware modeling API may be characterized by including a behavioral hardware modeling (BHM) API, a Peripheral Programming Model (PPM) API.

또한, 상기 (b) 단계는, 재사용을 위해 상기 제 1 머신 명령어를 캐시에 저장하는 단계;를 더 포함하는 것을 특징으로 할 수 있다. The step (b) may further include storing the first machine instruction in a cache for reuse.

또한, 상기 타깃 바이너리 코드로부터 상기 머신 명령어 코드로의 변환은 JIT (Just-In-Time) 컴파일 방식 또는 다이나믹 바이너리 변환 기술에 의해 이루어지며, 명령어가 실행되는 순간에 변환이 이루어지는 것을 특징으로 할 수 있다.In addition, the conversion from the target binary code to the machine instruction code is performed by a Just-In-Time (JIT) compilation method or a dynamic binary conversion technique, and may be characterized in that the conversion is performed at the moment the instruction is executed. .

또한, 상기 명령어 집합 시뮬레이터는 호스트 머신에서 실행되는 것을 특징으로 할 수 있다.The instruction set simulator may be executed on a host machine.

다른 한편으로, 본 발명의 다른 일실시예는, 타깃 바이너리 코드를 입력받는 타깃 바이너리 입력기; 상기 타깃 바이너리 코드를 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 프로세서용 요구 사이클을 산출하는 확장 QEMU(Quick Emulator) 모듈; 상기 타깃 바이너리 코드를 제 2 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 주변 하드웨어에 대한 이벤트 통계를 산출하는 확장 OVPsim(Open Virtual Platform simulator) 모듈; 및 상기 프로세서용 요구 사이클 및 상기 이벤트 통계를 이용하여 실행 시간 예측을 산출하는 사이클 평가 엔진;을 포함하는 것을 특징으로 하는 빠르고 정확한 실행 시간 예측을 위한 하이브리드 명령어 집합 시뮬레이션 시스템을 제공할 수 있다.On the other hand, another embodiment of the present invention, a target binary input unit for receiving a target binary code; An extended QEMU (Quick Emulator) module for converting the target binary code into machine instructions to execute an instruction set simulator to calculate a request cycle for a processor; An extended OVPsim (Open Virtual Platform simulator) module for converting the target binary code into a second machine instruction to execute an instruction set simulator to calculate event statistics for peripheral hardware; And a cycle evaluation engine configured to calculate an execution time prediction using the request cycle for the processor and the event statistic.

본 발명에 따르면, 다양한 하드웨어를 사용하는 복잡한 소프트웨어의 경우에도 QEMU(Quick Emulator)의 확장을 사용하여 프로세서에서의 실행 시간을 계산하고, OVPsim(Open Virtual Platform simulator)의 확장을 사용하여 기타 하드웨어에의 사용에 필요한 실행 시간을 계산한 후, 둘의 결과를 결합하여 보다 정확한 실행 시간 예측 결과를 얻을 수 있다.  According to the present invention, even for complex software using various hardware, the execution time of the processor is calculated using the extension of the Quick Emulator (QEMU), and the extension to the other hardware using the extension of the Open Virtual Platform simulator (OVPsim). After calculating the execution time required for use, you can combine the two results to get more accurate execution time predictions.

또한, 본 발명의 다른 효과로서는 QEMU의 경우 오픈-소스(Open-source)이므로 확장이 자유로워 복잡한 프로세서 모델 및 실행 시간 측정 기술을 구현하는데 용이하며, OVPsim의 경우 소프트웨어 실행 시간에 영향을 주는 다양한 하드웨어 자원에 대한 모사를 이미 제공하고 있기 때문에, 기타 하드웨어의 사용에 필요한 실행 시간 측정 기술을 구현하는데 용이하다는 점을 들 수 있다.In addition, the QEMU is open-source in the case of QEMU, so it is free to expand, making it easy to implement complex processor models and execution time measurement techniques, and in the case of OVPsim, various hardware affecting software execution time Because we already provide simulations of resources, it is easy to implement the runtime measurement techniques required for the use of other hardware.

또한, 본 발명의 또 다른 효과로서는 현재 기술에 비해 보다 정확한 결과를 보이며, 다양한 하드웨어에 대하여 확장이 용이한 장점을 가진다는 점을 들 수 있다.In addition, another effect of the present invention is that it shows a more accurate result than the current technology, and has the advantage that it is easy to expand for various hardware.

또한, 본 발명의 또 다른 효과로서는 기존에 존재하였던 명령어 집합 시뮬레이터(Instruction Set Simulator)들을 확장 및/또는 조합하여 다양한 자원을 요구하는 복잡한 소프트웨어의 실행시간을 빠르고 정확하게 예측하도록 함으로써, 소프트웨어 및 하드웨어 설계에 필요한 시간과 비용 절감에 큰 효과를 보일 것으로 기대된다는 점을 들 수 있다. In addition, another effect of the present invention is to extend and / or combine existing instruction set simulators to quickly and accurately predict execution time of complex software requiring various resources, thereby improving software and hardware design. This is expected to have a significant effect on the time and cost required.

도 1은 QEMU(Quick Emulator)의 개념을 보여주는 도면이다.
도 2는 OVPsim(Open Virtual Platform simulator)의 개념을 보여주는 도면이다.
도 3은 본 발명의 일실시예에 따른 하이브리드 명령어 집합 시뮬레이션 시스템(300)의 구성도이다.
도 4는 본 발명의 일실시예에 따른 하이브리드 명령어 집합 시뮬레이션 과정을 보여주는 흐름도이다.
도 5는 QEMU만을 사용한 경우와 본 발명의 일실시예에 따른 하이브리드 방식에 따른 피보나치 수(Fibonacci number)의 측정 결과를 비교하는 그래프이다.
도 6은 QEMU만을 사용한 경우와 본 발명의 일실시예에 따른 하이브리드 방식에 따른 매트릭스 곱셈(Matrix multiplication)의 측정 결과를 비교하는 그래프이다.
1 is a diagram illustrating the concept of a quick emulator (QEMU).
2 is a view showing the concept of OVPsim (Open Virtual Platform simulator).
3 is a block diagram of a hybrid instruction set simulation system 300 according to an embodiment of the present invention.
4 is a flowchart illustrating a hybrid instruction set simulation process according to an embodiment of the present invention.
5 is a graph comparing measurement results of Fibonacci numbers using only the QEMU and the hybrid method according to an embodiment of the present invention.
FIG. 6 is a graph comparing measurement results of matrix multiplication according to a hybrid method according to an embodiment of the present invention with only QEMU.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는바, 특정 실시예들을 도면에 예시하고 상세한 설명에 구체적으로 설명하고자 한다. 그러나 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.As the invention allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the written description. However, this is not intended to limit the present invention to specific embodiments, it should be understood to include all changes, equivalents, and substitutes included in the spirit and scope of the present invention.

각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용한다.In describing each drawing, like reference numerals are used for like elements.

제 1, 제 2등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Terms such as first and second may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.

예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제 1 구성요소는 제 2 구성요소로 명명될 수 있고, 유사하게 제 2 구성요소도 제 1 구성요소로 명명될 수 있다. "및/또는" 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. The term “and / or” includes any combination of a plurality of related items or any item of a plurality of related items.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미가 있다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art.

일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않아야 한다.Terms such as those defined in the commonly used dictionaries should be construed as having meanings consistent with the meanings in the context of the related art, and are not construed in ideal or excessively formal meanings unless expressly defined in this application. Should not.

이하 첨부된 도면을 참조하여 본 발명의 일실시예에 따른 빠르고 정확한 실행 시간 예측을 위한 하이브리드 명령어 집합 시뮬레이션 방법 및 시스템을 상세하게 설명하기로 한다.Hereinafter, a hybrid instruction set simulation method and system for fast and accurate execution time prediction according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

본 발명의 일실시예에서 제시하는 하이브리드 명령어 집합 시뮬레이션 방법은 1) QEMU(Quick Emulator)를 확장한 프로세서 파이프라인 모델 및 실행 시간 측정 기법; 2) OVPsim(Open Virtual Platform simulator)을 확장한 기타 하드웨어 모델 및 실행 시간 측정 기법; 3) QEMU(Quick Emulator)와 OVPsim(Open Virtual Platform simulator)을 결합한 전체 시스템 실행 시간 측정 기법을 포함하는 것을 특징으로 한다. In one embodiment of the present invention, the hybrid instruction set simulation method includes: 1) a processor pipeline model and an execution time measurement technique that extends a Quick Emulator (QEMU); 2) other hardware models and runtime measurement techniques that extend the Open Virtual Platform simulator (OVPsim); 3) It includes total system execution time measurement technique combining QEMU (Quick Emulator) and OVPsim (Open Virtual Platform simulator).

도 1은 QEMU(Quick Emulator)의 개념을 보여주는 도면이다. 도 1을 참조하면, QEMU 시스템(100)은 타깃 바이너리 입력기(110), 타깃 바이너리 코드를 변환하여 실행하는 변환 실행 모듈(120), 변환된 타깃 바이너리 코드의 실행 결과를 출력하는 실행 결과 출력 모듈(130) 등으로 포함하여 구성될 수 있다. 1 is a diagram illustrating the concept of a quick emulator (QEMU). Referring to FIG. 1, the QEMU system 100 includes a target binary input unit 110, a conversion execution module 120 for converting and executing a target binary code, and an execution result output module for outputting an execution result of the converted target binary code ( 130) and the like.

타깃 바이너리 입력기(110)는 시험할 프로세서를 위한 타깃 바이너리 코드(즉 파일)를 입력받는 기능을 수행한다.The target binary input unit 110 receives a target binary code (ie, a file) for a processor to be tested.

변환 실행 모듈(120)은 이 타깃 바이너리 코드가 호스트 머신상에서 실행되도록 타깃 바이너리를 호스트 프로세서 명령어로 변환하여 실행하는 기능을 수행한다. The conversion execution module 120 converts the target binary into host processor instructions so that the target binary code is executed on the host machine.

이를 위해, 변환 실행 모듈(120)은 변환된 코드 블록을 가져와 호스트 머신에서 실행하는 코드 실행기 (212), 타겟 바이너리 코드로부터 가져온 코드 블록을 호스트 머신 명령어 코드로 변환하는 다이나믹 바이너리 변환기(214), 변환된 코드 블록 재사용을 위해 변환된 코드 블록을 저장하는 코드 캐시부 (213) 등을 포함하여 구성될 수 있다. To this end, the conversion execution module 120 takes the converted code block and executes it on the host machine, the code executor 212, the dynamic binary converter 214 for converting the code block taken from the target binary code into the host machine instruction code, conversion And a code cache unit 213 for storing the converted code block for reuse of the used code block.

코드 실행기(212)는 타겟 바이너리 코드로부터 다음에 실행해야할 명령어 집합인 타겟 코드 블록을 파악한다. 이 때, 상기 코드 블록이 이미 변환되어 코드 캐시부(213)에 저장되어 있을 경우 코드 캐시부에 저장되어 있는 변환된 코드 블록을 실행한다. 이 때, 코드 캐시부에 변환된 코드 블록이 저장되어 있지 않을 경우 코드 변환을 위하여 다이나믹 바이너리 변환기(214)를 호출한다. The code executor 212 identifies the target code block, which is the next set of instructions to execute from the target binary code. At this time, if the code block is already converted and stored in the code cache unit 213, the converted code block stored in the code cache unit is executed. At this time, if the converted code block is not stored in the code cache unit, the dynamic binary converter 214 is called for code conversion.

다이나믹 바이너리 변환기(214)는 대상 타겟 코드 블록을 호스트 머신 명령어 코드 블록으로 변환하고, 시뮬레이션 속도를 증가시키기 위해 모든 변환된 머신 명령어 코드를 코드 캐시부(213)에 저장한다.The dynamic binary converter 214 converts the target target code block into a host machine instruction code block, and stores all the converted machine instruction code in the code cache unit 213 to increase the simulation speed.

타겟 바이너리 입력기(110) 로부터 입력받은 모든 타겟 바이너리의 실행이 종료되면 호스트 머신(미도시)에서 타겟 바이너리 실행 결과를 얻을 수 있다. 호스트 머신은 임베디드 프로그램 개발 과정에서 사용되는 기기를 지칭하는 의미로서 프로세서를 시뮬레이션(모의)한다. When execution of all target binaries input from the target binary input unit 110 is finished, a target binary execution result may be obtained from a host machine (not shown). The host machine refers to a device used in the embedded program development process to simulate (simulate) a processor.

이를 위해 다이나믹 바이너리 변환(dynamic binary translation) 기술 또는 JIT(Just-In-Time) 컴파일 방식 등이 사용된다. 다이나믹 바이너리 변환 또는 JIT (Just-In-Time) 컴파일은 2단계로 수행되는데, 먼저 타깃 바이너리 코드는 기본 블럭(Basic Block)단위로 변환되며, 기본 블럭 내부에 있는 명령어들은 중간 코드(Intermediate Representation, IR)인 여러 개의 마이크로 오퍼레이션(micro operation)으로 변환된다. 변환된 IR은 호스트 명령어로 변환되고 레지스터 할당을 하여 머신 명령어 코드로 생성된다. For this purpose, dynamic binary translation technology or just-in-time compilation method is used. Dynamic binary conversion or just-in-time compilation is performed in two stages. First, the target binary code is converted into basic block units, and the instructions inside the basic block are converted to intermediate code (Intermediate Representation, IR). Are converted to multiple micro operations. The converted IR is converted into host instructions and registers are generated by machine instruction code.

도 2는 OVPsim(Open Virtual Platform simulator)의 개념을 보여주는 도면이다. 도 2를 참조하면, OVPsim 시스템(200)은 타깃 바이너리 입력기(210), 타깃 바이너리 코드에 따라 주변 모의 엔진을 생성하고 실행 하는 엔진 생성 모듈 (220), 주변 모의 엔진에서 타깃 바이너리 코드의 실행 결과를 출력하는 실행 결과 출력 모듈(230) 등으로 포함하여 구성될 수 있다.2 is a view showing the concept of OVPsim (Open Virtual Platform simulator). Referring to FIG. 2, the OVPsim system 200 generates a target binary input unit 210, an engine generation module 220 that generates and executes a peripheral simulation engine according to the target binary code, and executes execution results of the target binary code in the peripheral simulation engine. It may be configured to include a running result output module 230 to output.

타깃 바이너리 입력기(210)는 시험할 프로세서를 위한 타깃 바이너리 코드(즉 파일)를 입력받는 기능을 수행한다.The target binary input unit 210 performs a function of receiving a target binary code (ie, a file) for a processor to be tested.

엔진 생성 모듈(220)은 이 타깃 바이너리 코드를 실행하기 위해 플랫폼 제작기(222)를 통해 가상 머신 런타임(221)을 생성하고, 주변 모의 엔진(223)을 통해 이 가상 머신 런타임(221)에서 주변 장치의 동작을 모사할 수 있게 한다. Engine generation module 220 generates virtual machine runtime 221 via platform builder 222 to execute this target binary code, and peripheral device in this virtual machine runtime 221 via peripheral simulation engine 223. Allows you to simulate the behavior of.

이를 위해, 엔진 생성 모듈(220)은 타깃 머신에 장착되어 있는 하드웨어들의 하드웨어 모델 기반으로 타깃 머신을 모방하는 가상 머신 런타임부(221), 가상 머신 런타임을 위한 가상 플랫폼을 생성하는 플랫폼 제작기(222), 및 다양한 주변 하드웨어의 동작을 모방하는 주변 모의 엔진(223) 등을 포함하여 구성될 수 있다.To this end, the engine generation module 220 includes a virtual machine runtime unit 221 that mimics the target machine based on a hardware model of hardware mounted on the target machine, and a platform maker 222 that generates a virtual platform for the virtual machine runtime. And a peripheral simulation engine 223 that mimics the operation of various peripheral hardware.

타깃 바이너리 입력기(210)를 통해 입력된 타깃 바이너리는 엔진 생성 모듈(220)의 가상 머신 런타임(221)에 의해 호스트 머신 명령어로 변환되어 실행된다.The target binary input through the target binary inputter 210 is converted into a host machine instruction by the virtual machine runtime 221 of the engine generation module 220 and executed.

이 때, 주변 모의 엔진(223)은 임베디드 하드웨어에서 사용되는 주변 기기 (예를 들면, 메모리, 저장 장치, 오디오/비디오, 네트워크 등을 들 수 있음) 를 모의한다. At this time, the peripheral simulation engine 223 simulates peripheral devices (eg, memory, storage, audio / video, network, etc.) used in the embedded hardware.

이 때, 주변 모의 엔진은 주변 기기 모의를 위해 BHM (Behavioral Hardware Modeling) API, PPM (Peripheral Programming Model) API 등의 하드웨어 모델링 API를 사용한다. At this time, the peripheral simulation engine uses hardware modeling APIs such as behavioral hardware modeling (BHM) API and peripheral programming model (PPM) API to simulate peripheral devices.

이 때, 변환된 타깃 바이너리에서 주변 기기를 사용하려고 하면, 변환된 타깃 바이너리는 주변 모의 엔진 (223)에 의해 모의된 주변 기기를 사용하게 된다. At this time, if a peripheral device is used in the converted target binary, the converted target binary uses the peripheral device simulated by the peripheral simulation engine 223.

도 3은 본 발명의 일실시예에 따른 하이브리드 명령어 집합 시뮬레이션 시스템(300)의 구성도이다. 도 3을 참조하면, 전체 시스템의 다양한 하드웨어를 활용하는 소프트웨어의 실행 시간을 정확하게 분석하기 위하여 여러 개의 시뮬레이터(320a,320b)를 동시에 활용하여 실행 시간을 예측한다. 3 is a block diagram of a hybrid instruction set simulation system 300 according to an embodiment of the present invention. Referring to FIG. 3, in order to accurately analyze execution time of software utilizing various hardware of the entire system, multiple simulators 320a and 320b are simultaneously used to predict execution time.

도 3을 참조하면, 하이브리드 명령어 집합 시뮬레이션 시스템(300)은, 타깃 바이너리 코드를 입력받는 타깃 바이너리 입력기(310), 상기 타깃 바이너리 코드를 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 프로세서용 요구 사이클을 산출하는 확장 QEMU 모듈(320a), 상기 타깃 바이너리 코드를 제 2 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 주변 하드웨어에 대한 이벤트 통계를 산출하는 확장 OVPsim(Open Virtual Platform simulator) 모듈(320b), 및 프로세서용 요구 사이클에 따른 제 1 실행 시간 및 상기 이벤트 통계에 따른 제 2 실행 시간을 합산하여 실행 시간 예측을 수행하는 사이클 평가 엔진(330) 등을 포함하여 구성될 수 있다.Referring to FIG. 3, the hybrid instruction set simulation system 300 executes a request cycle for a processor by executing a instruction set simulator by converting the target binary code into a target binary input unit 310 that receives a target binary code, and converting the target binary code into a machine instruction. An extended QEMU module 320a for calculating, an extended OVPsim module 320b for converting the target binary code into a second machine instruction, and executing an instruction set simulator to calculate event statistics about peripheral hardware; and And a cycle evaluation engine 330 for performing execution time prediction by adding up a first execution time according to a request cycle for a processor and a second execution time according to the event statistics.

하드웨어 자원의 종류에 따라 하드웨어 실행 시간 측정에 용이한 시뮬레이터를 활용한다. 도 3에 도시된 바와 같이, 복잡한 동작 특성을 가진 프로세서를 정교하게 모델링하기 위하여 오픈 소스(Open-source)인 확장 QEMU 모듈(320a)을 활용하여 프로세서 사용 시간을 측정하고, 이외의 하드웨어 자원 사용에 소모되는 시간 측정을 위해서는 다양한 하드웨어 자원 모델을 내부적으로 제공하는 확장 OVPsim 모듈(320b)을 활용한다.Depending on the type of hardware resources, the simulator is used to measure the hardware execution time. As shown in FIG. 3, in order to precisely model a processor having a complex operating characteristic, an open-source extended QEMU module 320a is used to measure processor usage time, and to use other hardware resources. In order to measure time consumption, the extended OVPsim module 320b that provides various hardware resource models internally is used.

명령어 집합 시뮬레이터는 호스트 머신에서 실행되며, 타겟 머신용으로 컴파일된 소프트웨어를 읽어 들여 소프트웨어의 타겟 머신 명령어를 호스트 머신 명령어로 변환하여 실행한다. The instruction set simulator is run on the host machine, which reads software compiled for the target machine and converts the target machine instructions from the software into host machine instructions.

확장 QEMU 모듈(320a)로 대표되는 JIT 또는 동적 변환 기반 시뮬레이터는 효율성을 위하여 명령어가 실행되는 순간에 변환이 이루어지고, 변환된 변환 명령어는 코드 캐시(323)에 저장되어 재사용된다. The JIT or dynamic transformation based simulator, represented by the extended QEMU module 320a, is transformed at the moment the instruction is executed for efficiency, and the transformed transformation instruction is stored and reused in the code cache 323.

부연하면, 확장 QEMU 모듈(320a)은 타깃 바이너리 입력기(310)는 시험할 프로세서를 위한 타깃 바이너리 코드(즉 파일)를 입력받는 기능을 수행한다.In other words, the extended QEMU module 320a performs a function of receiving a target binary code (ie, a file) for the processor to be tested by the target binary inputter 310.

따라서, 확장 QEMU 모듈(320a)은 타깃 바이너리 입력기(310)로부터 입력되는 타깃 바이너리가 호스트 머신상에서 실행되도록 호스트 프로세서 명령어로 변환을 수행하는 기능을 수행한다. 이를 위해, 확장 QEMU 모듈(320a)은 코드 실행기(321), 코드 캐시부(323), 및 다이나믹 바이너리 변환기(324) 등을 포함하여 구성될 수 있다.Accordingly, the extended QEMU module 320a performs a function of performing conversion into host processor instructions so that the target binary input from the target binary input unit 310 is executed on the host machine. To this end, the extended QEMU module 320a may include a code executor 321, a code cache unit 323, a dynamic binary converter 324, and the like.

이때, 코드 실행기(321)는 사이클 횟수를 카운팅하기 위한 사이클 카운터(321-1)를 포함한다.In this case, the code executor 321 includes a cycle counter 321-1 for counting the number of cycles.

또한, 다이나믹 바이너리 변환기(324)는 프로세서 파이프라인 모델(324-1)을 포함한다.Dynamic binary converter 324 also includes a processor pipeline model 324-1.

즉, 확장 QEMU 모듈(320a)은 2가지 추가적인 구성요소를 갖는다. 부연하면, 하나는 프로세서 파이프라인 모델(324-1)이고, 둘은 사이클 카운터(321-1)이다. 다이나믹 바이너리 변환기(324)는 프로세서 파이프라인 모델(324-1)을 통해 타깃 바이너리 코드의 각 코드 블럭에 대한 요구 사이클을 산출한다. 즉, 각 타깃 명령어에 대해 요구되는 사이클을 산출하며, 결과적으로 타깃 바이너리 코드의 각 코드 블럭에 대한 요구 사이클이 된다.That is, the extended QEMU module 320a has two additional components. In other words, one is processor pipeline model 324-1 and two are cycle counters 321-1. The dynamic binary converter 324 calculates a request cycle for each code block of the target binary code through the processor pipeline model 324-1. In other words, the required cycle for each target instruction is calculated, resulting in a required cycle for each code block of the target binary code.

코드 실행기(321)는 사이클 카운터(321-1)를 통해 각 코드 블럭에 대한 실행 횟수를 카운팅한다. 각 코드 블럭에 대한 요구 사이클이 프로세서 파이프라인 모델(324-1)에 의해 산출되므로, 사이클 카운터(321-1)를 통해 각 코드 블록의 실행 횟수를 산출하면 전체 타깃 바이너리가 실행 되었을 때의 총 사이클 수를 산출 할 수 있다. 이 때, 각 코드 블록은 반복문 등의 영향으로 인하여 1회 이상 실행 될 수 있다. The code executor 321 counts the number of executions for each code block through the cycle counter 321-1. Since the request cycles for each code block are calculated by the processor pipeline model 324-1, calculating the number of executions of each code block through the cycle counter 321-1, the total cycles when the entire target binary is executed. Can calculate the number At this time, each block of code may be executed one or more times due to the effects of the loop statement.

부연하면, 본 발명의 일실시예에서는 도 1에 도시된 QEMU의 구조를 확장하여 프로세서가 소프트웨어의 실행을 완료하는데 필요한 프로세서 실행 사이클을 계산한다. 즉, 시뮬레이터의 코드 변환 부분에 타겟 머신 프로세서 파이프라인 모델(324-1)을 추가하여 각 타겟 머신 명령어들의 실행에 필요한 실행 사이클을 계산하고 저장해둔다. 이후 호스트 머신 명령어들로 변환된 머신 명령어 코드들이 실행될 때마다 각 코드들의 실행 횟수를 측정한다. 이후 각 코드별 필요 실행 사이클 및 실행 횟수를 바탕으로 전체 소프트웨어(즉 타깃 바이너리 코드)의 총 실행 사이클을 추정한다. In other words, in one embodiment of the present invention, the structure of the QEMU shown in FIG. 1 is extended to calculate processor execution cycles required for the processor to complete execution of software. That is, the target machine processor pipeline model 324-1 is added to the code conversion portion of the simulator to calculate and store execution cycles required for execution of each target machine instruction. After that, each time the machine instruction codes converted into host machine instructions are executed, the number of executions of each code is measured. Then, the total execution cycle of the entire software (ie, target binary code) is estimated based on the required execution cycle and the number of execution for each code.

이 때, 프로세서마다 단위 시간당 수행 가능한 사이클의 수는 고정되어 있기 때문에, 총 실행 사이클을 바탕으로 타깃 바이너리의 총 실행 시간을 산출 할 수 있다. At this time, since the number of cycles that can be executed per unit time for each processor is fixed, the total execution time of the target binary can be calculated based on the total execution cycles.

시스템 단위 시뮬레이터(Full-System Simulator)는 소프트웨어가 사용하는 각종 자원들에 대한 모사를 통해 실제 하드웨어가 없어도 해당 하드웨어를 사용하는 소프트웨어의 구동을 가능하게 한다. OVPsim으로 대표되는 시스템 단위 시뮬레이터는 실행 시간에 영향을 주는 캐시, TLB(Translation look aside buffer), 메모리, 디스크 등 다양한 하드웨어 자원에 대한 동작 모델을 제공한다. The full-system simulator enables the operation of software using the hardware without the actual hardware through simulation of various resources used by the software. The system unit simulator, represented by OVPsim, provides an operation model for various hardware resources such as cache, translation look aside buffer (TLB), memory, and disk, which affects execution time.

이를 위해, 본 발명의 일실시예에서는 확장 OVPsim 모듈(320b)을 구성한다. 확장 OVPsim 모듈(320b)은 도 2에 도시된 구성보다 2개의 추가적인 구성요소를 구비한다. 즉, 캐시/TLB 이벤트 카운터(32-1) 및 주변 이벤트 카운터(34-1)가 추가적으로 구성된다.To this end, in an embodiment of the present invention, the extended OVPsim module 320b is configured. The extended OVPsim module 320b has two additional components than the configuration shown in FIG. That is, the cache / TLB event counter 32-1 and the peripheral event counter 34-1 are further configured.

캐시/TLB 이벤트 카운터(32-1)는 가사 머신 런타임부(32)에 구성되며, 캐시 히트/미스(hit/miss) 및 TLB 히트/미스 등과 같은 중요 이벤트를 포착하는 기능을 수행한다. 특히, 가상 머신 인터페이스(VMI: Virtual Machine Interface)를 통해 메모리 컴포넌트 모델링이 이루어진다. 특히, 캐시/TLB 이벤트 카운터(32-1)는 가상 머신 런타임부(32)의 가상 머신 런타임 내부에서 수행되며, 캐시 및 TLB로부터 이벤트를 포착하며, 이러한 이벤트 통계를 생성하여 사이클 평가 엔진(330)에 전송한다.The cache / TLB event counter 32-1 is configured in the housekeeping machine runtime unit 32 and performs a function of capturing important events such as cache hit / miss and TLB hit / miss. In particular, memory component modeling is performed through a virtual machine interface (VMI). In particular, the cache / TLB event counter 32-1 is performed inside the virtual machine runtime of the virtual machine runtime unit 32, captures events from the cache and the TLB, and generates these event statistics to generate the cycle evaluation engine 330. To transmit.

또한, 주변 이벤트 카운터(34-1)는 주변 하드웨어로부터 발생한 이벤트를 포착하며 이벤트 통계를 생성하여 사이클 평가 엔진(330)에 전송한다. 또한, 주변 이벤트 카운터(34-1)는 하드웨어 동작 모델을 이용하여 이러한 이벤트를 포착한다. In addition, the peripheral event counter 34-1 captures events generated from the peripheral hardware, generates event statistics, and sends them to the cycle evaluation engine 330. The peripheral event counter 34-1 also captures these events using a hardware behavior model.

하드웨어 동작 모델은 주변 하드웨어 모델링 API(Application Programming Interface)로 구현된다. 이러한 주변 하드웨어 모델링 API로는 BHM(Behavioral Hardware Modeling) API, PPM(Peripheral Programming Model) API 등을 들 수 있다. 주변 이벤트 카운터(34-1)는 주변 모의 엔진(34)의 내부에서 수행된다.The hardware behavior model is implemented with a peripheral hardware modeling application programming interface (API). Such peripheral hardware modeling APIs include behavioral hardware modeling (BHM) APIs and peripheral programming model (PPM) APIs. The ambient event counter 34-1 is performed inside the ambient simulation engine 34.

부연하면, 시스템 단위 시뮬레이터에서 제공하는 하드웨어 동작 모델을 활용해 소프트웨어가 하드웨어 자원을 사용할 때 필요한 실행 시간을 계산할 수 있다이를 위해 시스템 단위 시뮬레이터에서 타겟 머신용 소프트웨어를 실행할 때, 각각의 하드웨어 모델에 발생하는 이벤트 (예: cache hit/miss) 횟수를 저장하고, 미리 알려진 각 이벤트별 필요 실행 사이클을 곱하는 방법으로 각각의 하드웨어 사용에 필요한 실행 시간을 계산한다.In other words, the hardware behavior model provided by the system unit simulator can be used to calculate the execution time required when the software uses hardware resources. The execution time required for each hardware is calculated by storing the number of events (eg cache hit / miss) and multiplying the required execution cycle for each known event.

사이클 평가 엔진(330)은 확장 QEMU 모듈(320a)로부터 확장 QEMU 모듈(320a) 및 확장 OVPsim 모듈(320b)로부터 각각 프로세서용 요구 사이클(331) 및 이벤트 통계(332)를 수집하여 실행 시간 예측을 산출한다. The cycle evaluation engine 330 collects the request cycles 331 and event statistics 332 for the processor from the extended QEMU module 320a and the extended OVPsim module 320b from the extended QEMU module 320a, respectively, to calculate the execution time prediction. do.

이 때, 사이클 평가 엔진(33)은 이벤트 통계 및 각 하드웨어 사양 (Specification)에 기반한 이벤트 별 실행 사이클 요구량을 바탕으로 주변 장치 사용에 필요한 실행 시간을 산출한다. At this time, the cycle evaluation engine 33 calculates the execution time required for using the peripheral device based on the event cycle and the execution cycle requirement for each event based on each hardware specification.

도 4는 본 발명의 일실시예에 따른 하이브리드 명령어 집합 시뮬레이션 과정을 보여주는 흐름도이다. 도 4를 참조하면, 타깃 바이너리 입력기(310)가 타깃 바이너리 코드를 입력받는다(단계 S410).4 is a flowchart illustrating a hybrid instruction set simulation process according to an embodiment of the present invention. Referring to FIG. 4, the target binary input unit 310 receives a target binary code (step S410).

이후, 프로세서 사용시간을 측정하는 과정(단계 S420 내지 S423) 및 그 밖의 하드웨어 자원 사용시간을 측정하는 과정(단계 S430 내지 S435)이 동시에 수행된다.Thereafter, the process of measuring the processor usage time (steps S420 to S423) and the process of measuring other hardware resource usage time (steps S430 to S435) are simultaneously performed.

프로세서 사용시간을 측정하는 과정을 먼저 보면, 확장 QEMU(Quick Emulator) 모듈(320a)이 상기 타깃 바이너리 코드를 코드를 실행하고, 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 프로세서용 요구 사이클을 산출한다(단계 S420,S421,S423).First, the process of measuring the processor usage time, the extended QEMU (Quick Emulator) module 320a executes the target binary code code, converts the target binary code into a machine instruction to execute the instruction set simulator to calculate the request cycle for the processor (Steps S420, S421, S423).

그 밖의 하드웨어 자원 사용시간을 측정하는 과정을 보면, 확장 OVPsim(Open Virtual Platform simulator) 모듈(320b)이 타깃 바이너리 코드를 가상 머신을 실행하고, 가상 플랫폼을 생성하며, 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 주변 하드웨어에 대한 이벤트 통계를 산출한다(단계 S430,S431,S433,S435).In the process of measuring other hardware resource usage time, the extended Open Virtual Platform Simulator (OVPsim) module 320b executes the target binary code on the virtual machine, creates the virtual platform, and converts it into machine instructions. Event statistics are calculated for the peripheral hardware by executing (steps S430, S431, S433, S435).

이후, 사이클 평가 엔진(330)이 상기 프로세서용 요구 사이클 및 이벤트 통계를 이용하여 실행 시간 예측을 산출한다(단계 S440).Thereafter, the cycle evaluation engine 330 calculates an execution time prediction using the request cycle for the processor and event statistics (step S440).

도 5는 QEMU만을 사용한 경우와 본 발명의 일실시예에 따른 하이브리드 방식에 따른 피보나치 수(Fibonacci number)의 측정 결과를 비교하는 그래프이다. 도 5를 참조하면, 단독 QEUM의 결과가 매우 정확한 사이클 추정을 나타내며, 본 발명의 일실시예에 따른 하이브리드 방식의 결과와 유사함을 보여준다. 5 is a graph comparing measurement results of Fibonacci numbers using only the QEMU and the hybrid method according to an embodiment of the present invention. Referring to FIG. 5, the results of the sole QEUM represent a very accurate cycle estimate, and are similar to the results of the hybrid scheme according to an embodiment of the present invention.

피보나치 수 벤치마크에 대한 단독 QEUM의 정확한 결과가 제안된 프로세서 파이프라인 모델이 프로세서에 요구되는 사이클을 정확하게 추정할 수 있다는 점을 보여준다.The exact result of a single QEUM on Fibonacci number benchmarks shows that the proposed processor pipeline model can accurately estimate the cycles required for a processor.

도 6는 QEMU만을 사용한 경우와 본 발명의 일실시예에 따른 하이브리드 방식에 따른 매트릭스 곱셈(Matrix multiplication)의 측정 결과를 비교하는 그래프이다. 도 6을 참조하면, 단독 QEMU의 추정 정확도가 매트릭스 사이즈가 증가함에 따라 감소된다. 이와 달리, 본 발명의 일실시예에 따른 하이브리드 방식은 더 정확한 사이클 추정을 보여준다. FIG. 6 is a graph comparing measurement results of matrix multiplication according to a hybrid method according to an embodiment of the present invention with only QEMU. Referring to FIG. 6, the estimation accuracy of a single QEMU is reduced as the matrix size increases. In contrast, the hybrid scheme according to one embodiment of the present invention shows more accurate cycle estimation.

100: QEMU(Quick Emulator) 시스템
110,210,310: 타깃 바이너리 입력기
120,220: 변환 실행 모듈
130,230: 실행 결과 출력 모듈
200: OVPsim(Open Virtual Platform simulator) 시스템
320a: 확장 QEMU(Quick Emulator) 모듈
320b: 확장 OVPsim(Open Virtual Platform simulator) 모듈
330: 사이클 평가 엔진
100: QEMU (Quick Emulator) system
110,210,310: Target Binary Input Method
120,220: Transform Execution Module
130,230: execution result output module
200: Open Virtual Platform simulator (OVPsim) system
320a: extended QEMU (Quick Emulator) module
320b: Extended Open Virtual Platform simulator (OVPsim) module
330 cycle evaluation engine

Claims (8)

(a) 타깃 바이너리 입력기가 타깃 바이너리 코드를 입력받는 단계;
(b) 확장 QEMU(Quick Emulator) 모듈이 상기 타깃 바이너리 코드를 제 1 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 프로세서용 요구 사이클을 산출하는 단계;
(c) 확장 OVPsim(Open Virtual Platform simulator) 모듈이 상기 타깃 바이너리 코드를 제 2 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 주변 하드웨어에 대한 이벤트 통계를 산출하는 단계; 및
(d) 사이클 평가 엔진이 상기 프로세서용 요구 사이클 및 이벤트 통계를 이용하여 실행 시간 예측을 산출하는 단계;를 포함하며,
상기 (b) 단계에서, 상기 프로세서용 요구 사이클은 프로세서 파이프라인 모델을 이용하여 산출되는 상기 타깃 바이너리 코드의 각 코드 블럭에 대한 요구 사이클 및 상기 타깃 바이너리 코드에서 1회 이상 실행되는 각 코드 블록의 실행 횟수를 통해 최종 산출되는 것을 특징으로 하는 빠르고 정확한 실행 시간 예측을 위한 하이브리드 명령어 집합 시뮬레이션 방법.
(a) receiving, by the target binary input unit, the target binary code;
(b) an extended Quick Emulator (QEMU) module converting the target binary code into a first machine instruction to execute an instruction set simulator to calculate a request cycle for a processor;
(c) an expanded Open Virtual Platform simulator (OVPsim) module converting the target binary code into a second machine instruction to execute an instruction set simulator to calculate event statistics for surrounding hardware; And
(d) a cycle evaluation engine calculating execution time prediction using the demand cycles and event statistics for the processor;
In step (b), the request cycle for the processor is a request cycle for each code block of the target binary code calculated using a processor pipeline model and execution of each code block executed at least once in the target binary code. Hybrid instruction set simulation method for fast and accurate execution time estimation, characterized in that the final calculation through the count.
삭제delete 제 1 항에 있어서,
상기 (c) 단계에서, 상기 이벤트 통계는 하드웨어 동작 모델을 이용하여 산출되며, 상기 하드웨어 동작 모델은 주변 하드웨어 모델링 API(Application Programming Interface) 로 구성되는 것을 특징으로 하는 빠르고 정확한 실행 시간 예측을 위한 하이브리드 명령어 집합 시뮬레이션 방법.
The method of claim 1,
In the step (c), the event statistics are calculated using a hardware operation model, the hardware operation model is a hybrid command for fast and accurate execution time prediction, characterized in that consisting of a hardware modeling API (Application Programming Interface) Set simulation method.
제 3 항에 있어서,
상기 주변 하드웨어 모델링 API는 BHM(Behavioral Hardware Modeling) API, PPM(Peripheral Programming Model) API들로 구성되는 것을 특징으로 하는 빠르고 정확한 실행 시간 예측을 위한 하이브리드 명령어 집합 시뮬레이션 방법.
The method of claim 3, wherein
The peripheral hardware modeling API is a hybrid instruction set simulation method for fast and accurate execution time prediction, characterized in that consisting of Behavioral Hardware Modeling (BHM) API, Peripheral Programming Model (PPM) API.
제 1 항에 있어서,
상기 (b) 단계는, 재사용을 위해 상기 제 1 머신 명령어를 캐시에 저장하는 단계;를 더 포함하는 것을 특징으로 하는 빠르고 정확한 실행 시간 예측을 위한 하이브리드 명령어 집합 시뮬레이션 방법.
The method of claim 1,
The step (b) further comprises the step of storing the first machine instructions in the cache for reuse; hybrid instruction set simulation method for fast and accurate execution time prediction, characterized in that it further comprises.
제 1 항에 있어서,
상기 타깃 바이너리 코드로부터 상기 머신 명령어 코드로의 변환은 JIT (Just-In-Time) 컴파일 방식 또는 다이나믹 바이너리 변환 기술에 의해 이루어지며, 명령어가 실행되는 순간에 변환이 이루어지는 것을 특징으로 하는 빠르고 정확한 실행 시간 예측을 위한 하이브리드 명령어 집합 시뮬레이션 방법.
The method of claim 1,
The conversion from the target binary code to the machine instruction code is performed by a Just-In-Time (JIT) compilation method or a dynamic binary conversion technique. Hybrid instruction set simulation method for prediction.
제 1 항에 있어서,
상기 명령어 집합 시뮬레이터는 호스트 머신에서 실행되는 것을 특징으로 하는 빠르고 정확한 실행 시간 예측을 위한 하이브리드 명령어 집합 시뮬레이션 방법.
The method of claim 1,
And the instruction set simulator is executed on a host machine.
타깃 바이너리 코드를 입력받는 타깃 바이너리 입력기;
상기 타깃 바이너리 코드를 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 프로세서용 요구 사이클을 산출하는 확장 QEMU(Quick Emulator) 모듈;
상기 타깃 바이너리 코드를 제 2 머신 명령어로 변환하여 명령어 집합 시뮬레이터를 실행함으로써 주변 하드웨어에 대한 이벤트 통계를 산출하는 확장 OVPsim(Open Virtual Platform simulator) 모듈; 및
상기 프로세서용 요구 사이클 및 상기 이벤트 통계를 이용하여 실행 시간 예측을 산출하는 사이클 평가 엔진;을 포함하며,
상기 프로세서용 요구 사이클은 프로세서 파이프라인 모델을 이용하여 산출되는 상기 타깃 바이너리 코드의 각 코드 블럭에 대한 요구 사이클 및 상기 타깃 바이너리 코드에서 1회 이상 실행되는 각 코드 블록의 실행 횟수를 통해 최종 산출되는 것을 특징으로 하는 빠르고 정확한 실행 시간 예측을 위한 하이브리드 명령어 집합 시뮬레이션 시스템.
A target binary input unit for receiving a target binary code;
An extended QEMU (Quick Emulator) module for converting the target binary code into machine instructions to execute an instruction set simulator to calculate a request cycle for a processor;
An extended OVPsim (Open Virtual Platform simulator) module for converting the target binary code into a second machine instruction to execute an instruction set simulator to calculate event statistics for peripheral hardware; And
And a cycle evaluation engine configured to calculate execution time prediction using the request cycles for the processor and the event statistics.
The request cycle for the processor is finally calculated through a request cycle for each code block of the target binary code calculated using a processor pipeline model and the number of executions of each code block executed at least once in the target binary code. Features a hybrid instruction set simulation system for fast and accurate execution time prediction.
KR1020170054209A 2017-04-27 2017-04-27 Method and system for fast and accurate cycle estimation through hybrid instruction set simulation KR102007881B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170054209A KR102007881B1 (en) 2017-04-27 2017-04-27 Method and system for fast and accurate cycle estimation through hybrid instruction set simulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170054209A KR102007881B1 (en) 2017-04-27 2017-04-27 Method and system for fast and accurate cycle estimation through hybrid instruction set simulation

Publications (2)

Publication Number Publication Date
KR20180120380A KR20180120380A (en) 2018-11-06
KR102007881B1 true KR102007881B1 (en) 2019-08-06

Family

ID=64329768

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170054209A KR102007881B1 (en) 2017-04-27 2017-04-27 Method and system for fast and accurate cycle estimation through hybrid instruction set simulation

Country Status (1)

Country Link
KR (1) KR102007881B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024034841A1 (en) * 2022-08-12 2024-02-15 삼성전자주식회사 Electronic device for compiling files on basis of designated events, and method therefor

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009026113A (en) * 2007-07-20 2009-02-05 Fujitsu Microelectronics Ltd Simulation apparatus and program
JP2011258045A (en) * 2010-06-10 2011-12-22 Toshiba Corp Simulation device, simulation program, and simulation method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140140789A (en) 2013-05-30 2014-12-10 엠디에스테크놀로지 주식회사 Method for run-time synchronization for hardware-software co-simulation of real-time systems

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009026113A (en) * 2007-07-20 2009-02-05 Fujitsu Microelectronics Ltd Simulation apparatus and program
JP2011258045A (en) * 2010-06-10 2011-12-22 Toshiba Corp Simulation device, simulation program, and simulation method

Also Published As

Publication number Publication date
KR20180120380A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
Song et al. A simplified and accurate model of power-performance efficiency on emergent GPU architectures
Berezovskyi et al. Measurement-based probabilistic timing analysis for graphics processor units
Wang et al. An efficient approach for system-level timing simulation of compiler-optimized embedded software
Rosa et al. Instruction-driven timing CPU model for efficient embedded software development using OVP
Thach et al. Fast cycle estimation methodology for instruction-level emulator
Wang et al. Fast and accurate cache modeling in source-level simulation of embedded software
Shah et al. Quick execution time predictions for spark applications
Rosa et al. Fast energy evaluation of embedded applications for many-core systems
US10564992B2 (en) Simulation apparatus and storage medium
Kang et al. TQSIM: A fast cycle-approximate processor simulator based on QEMU
US7684971B1 (en) Method and system for improving simulation performance
Schreiner et al. A quasi-cycle accurate timing model for binary translation based instruction set simulators
KR102007881B1 (en) Method and system for fast and accurate cycle estimation through hybrid instruction set simulation
Metz et al. Hybrid PTX analysis for GPU accelerated CNN inferencing aiding computer architecture design
JP6218645B2 (en) Program analysis apparatus, program analysis method, and program
Stattelmann et al. Combining instruction set simulation and wcet analysis for embedded software performance estimation
Zhang et al. A performance prediction scheme for computation-intensive applications on cloud
Nilakantan et al. Metrics for early-stage modeling of many-accelerator architectures
Bhargava et al. Accurately modeling speculative instruction fetching in trace-driven simulation
Rajan et al. A study on the influence of software and hardware features on program energy
US20120185231A1 (en) Cycle-Count-Accurate (CCA) Processor Modeling for System-Level Simulation
Rudenko et al. Application of balanced scorecard for managing university development projects
Zhang et al. ANN-based performance estimation of embedded software for risc-v processors
Zhao et al. Host-compiled reliability modeling for fast estimation of architectural vulnerabilities
Sartor et al. The impact of virtual machines on embedded systems

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant