KR20210072599A - I/o port emulating system and method using virtual hardware - Google Patents

I/o port emulating system and method using virtual hardware Download PDF

Info

Publication number
KR20210072599A
KR20210072599A KR1020190163047A KR20190163047A KR20210072599A KR 20210072599 A KR20210072599 A KR 20210072599A KR 1020190163047 A KR1020190163047 A KR 1020190163047A KR 20190163047 A KR20190163047 A KR 20190163047A KR 20210072599 A KR20210072599 A KR 20210072599A
Authority
KR
South Korea
Prior art keywords
virtual
port
specific
input
output
Prior art date
Application number
KR1020190163047A
Other languages
Korean (ko)
Other versions
KR102325428B1 (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 KR1020190163047A priority Critical patent/KR102325428B1/en
Publication of KR20210072599A publication Critical patent/KR20210072599A/en
Application granted granted Critical
Publication of KR102325428B1 publication Critical patent/KR102325428B1/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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/105Program control for peripheral devices where the programme performs an input/output emulation function
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage

Landscapes

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

Abstract

An emulation system for emulating a virtual hardware just like a real hardware on an operating system according to the present invention comprises: a virtual I/O device comprising a plurality of virtual registers; a device driver that controls an input/output signal of the virtual I/O device, accesses a register of the virtual I/O device, sets an input/output direction to a specific I/O port, and reads or writes data from the input/output port; and an application that controls the virtual I/O device.

Description

가상 하드웨어를 이용한 I/O 포트 에뮬레이팅 시스템 및 방법{I/O PORT EMULATING SYSTEM AND METHOD USING VIRTUAL HARDWARE}I/O PORT EMULATING SYSTEM AND METHOD USING VIRTUAL HARDWARE

본 발명은 가상 하드웨어를 이용한 I/O 포트 에뮬레이팅 시스템 및 방법에 관한 것으로서, 보다 구체적으로는 운영체제 상에서 가상 하드웨어를 실제 하드웨어와 같이 에뮬레이팅하기 위한 시스템 및 방법에 관한 것이다.The present invention relates to a system and method for emulating an I/O port using virtual hardware, and more particularly, to a system and method for emulating virtual hardware on an operating system like real hardware.

도 1은 종래 기술에 따른 실제 하드웨어의 제어 흐름을 설명하기 위한 도면이다.1 is a diagram for explaining the control flow of actual hardware according to the prior art.

일반적으로 운영체제 상에서 동작하는 어플리케이션(13)이 하드웨어인 I/O 디바이스(11)를 제어하기 위해서는 운영체제에서 동작하는 디바이스 드라이버(12)가 필요하다.In general, in order for the application 13 operating on the operating system to control the I/O device 11 , which is hardware, a device driver 12 operating on the operating system is required.

디바이스 드라이버(12)는 운영체제에서 미리 정의된 동일한 인터페이스를 어플리케이션(13)에 제공하고, I/O 디바이스(11)가 하드웨어에 종속적인 인터페이스로 연결됨에 따라 어플리케이션(13)과 I/O 디바이스(11) 사이에 중계자 역할을 한다.The device driver 12 provides the same interface predefined in the operating system to the application 13 , and as the I/O device 11 is connected as a hardware-dependent interface, the application 13 and the I/O device 11 ) as an intermediary between

이때, 만약 I/O 디바이스(11)가 존재하지 않을 경우에는 어플리케이션(13)에서 디바이스 드라이버(12)가 존재하더라도 I/O 디바이스(11)를 제어할 수 없다는 문제점이 있다. In this case, if the I/O device 11 does not exist, there is a problem in that the application 13 cannot control the I/O device 11 even if the device driver 12 exists.

본 발명의 실시예는 전술한 문제점을 해결하기 위하여, 실제 하드웨어인 I/O 디바이스처럼 동작하는 가상의 I/O 디바이스를 운영체제의 메모리 상에서 소프트웨어 형태로 구동되도록 하면서 드라이버 디바이스와 연동할 수 있는 가상 하드웨어를 이용한 I/O 포트 에뮬레이팅 시스템 및 방법을 제공한다.In order to solve the above-described problem, an embodiment of the present invention provides a virtual hardware capable of interworking with a driver device while driving a virtual I/O device that operates like an I/O device that is real hardware in the form of software in the memory of the operating system. Provides an I/O port emulation system and method using

다만, 본 실시예가 이루고자 하는 기술적 과제는 상기된 바와 같은 기술적 과제로 한정되지 않으며, 또 다른 기술적 과제들이 존재할 수 있다.However, the technical task to be achieved by the present embodiment is not limited to the technical task as described above, and other technical tasks may exist.

상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 본 발명의 제 1 측면에 따른 운영체제 상에서 가상 하드웨어를 실제 하드웨어와 같이 에뮬레이팅하기 위한 에뮬레이션 시스템은 복수의 가상 레지스터를 포함하는 가상 I/O 디바이스, 상기 가상 I/O 디바이스의 입출력 신호를 제어하되, 상기 가상 I/O 디바이스의 레지스터에 접근하여 특정 I/O 포트에 입출력 방향을 설정하고, 입출력 포트에서 데이터를 독출 또는 기록하는 디바이스 드라이버 및 상기 가상 I/O 디바이스를 제어하는 어플리케이션을 포함한다.As a technical means for achieving the above-described technical problem, the emulation system for emulating virtual hardware on an operating system according to the first aspect of the present invention like real hardware is a virtual I/O device including a plurality of virtual registers, the A device driver that controls input/output signals of a virtual I/O device, accesses a register of the virtual I/O device, sets an input/output direction to a specific I/O port, and reads or writes data from an input/output port, and the virtual I /O Contains the application that controls the device.

일 실시예로, 상기 가상 I/O 디바이스는 상기 운영체제의 커널 상에서 소프트웨어 형태로 동작할 수 있다.In an embodiment, the virtual I/O device may operate in software form on a kernel of the operating system.

일 실시예로, 상기 복수의 가상 레지스터는, 상기 특정 I/O 포트를 입력 또는 출력으로 설정하기 위한 제 1 가상 레지스터, 상기 특정 I/O 포트가 입력으로 설정되었을 경우 입력값을 독출하는 제 2 가상 레지스터 및 상기 특정 I/O 포트가 출력으로 설정되었을 경우 출력값을 기록하는 제 3 가상 레지스터를 포함할 수 있다.In one embodiment, the plurality of virtual registers include a first virtual register for setting the specific I/O port as an input or an output, and a first virtual register for reading an input value when the specific I/O port is set as an input. It may include two virtual registers and a third virtual register for writing an output value when the specific I/O port is set as an output.

일 실시예로, 상기 복수의 가상 레지스터는 상기 특정 I/O 포트의 크기에 따라 매핑될 수 있다.In an embodiment, the plurality of virtual registers may be mapped according to the size of the specific I/O port.

또한, 본 발명의 제 2 측면에 따른, 복수의 제 1 내지 제 3 가상 레지스터를 포함하는 가상 I/O 디바이스, 상기 가상 I/O 디바이스의 입출력 신호를 제어하는 디바이스 드라이버 및 상기 가상 I/O 디바이스를 제어하는 어플리케이션을 포함하는 에뮬레이션 시스템을 통해 운영체제 상에서 가상 하드웨어를 실제 하드웨어와 같이 에뮬레이팅하는 방법은 상기 가상 I/O 디바이스의 제 1 가상 레지스터를 통해 특정 I/O 포트에 대한 입출력 상태를 확인하는 단계; 상기 확인 결과 출력 상태로 설정된 경우 출력값을 독출하기 위한 제 2 가상 레지스터의 이전값과 현재값을 비교하여 출력값의 변화 유무를 확인하는 단계; 상기 확인 결과 출력값에 변화가 있는 경우 상기 특정 I/O 포트에 출력값이 변경되었음을 기록하는 단계; 및 상기 특정 I/O 포트를 포함한 모든 포트를 대상으로 반복하는 단계를 포함한다.In addition, according to the second aspect of the present invention, a virtual I/O device including a plurality of first to third virtual registers, a device driver for controlling input/output signals of the virtual I/O device, and the virtual I/O device A method of emulating virtual hardware like real hardware in an operating system through an emulation system including an application that controls the step; checking whether an output value has changed by comparing a previous value and a current value of a second virtual register for reading an output value when the output state is set as an output state as a result of the check; if there is a change in the output value as a result of the check, recording that the output value is changed in the specific I/O port; and repeating for all ports including the specific I/O port.

일 실시예로, 상기 복수의 제 1 내지 제 3 가상 레지스터는, 상기 특정 I/O 포트를 입력 또는 출력으로 설정하기 위한 제 1 가상 레지스터, 상기 특정 I/O 포트가 입력으로 설정되었을 경우 입력값을 독출하는 제 2 가상 레지스터 및 상기 특정 I/O 포트가 출력으로 설정되었을 경우 출력값을 기록하는 제 3 가상 레지스터를 포함할 수 있다.In one embodiment, the plurality of first to third virtual registers include a first virtual register for setting the specific I/O port as an input or output, and an input value when the specific I/O port is set as an input. It may include a second virtual register for reading , and a third virtual register for writing an output value when the specific I/O port is set as an output.

본 발명에 따른 에뮬레이팅 방법은 일 실시예로, 상기 확인 결과 입력 상태로 설정된 경우 미리 설정된 랜덤 시간이 경과하였는지 여부를 판단하는 단계; 및 상기 판단 결과 미리 설정된 랜덤 시간이 경과한 경우 상기 특정 I/O 포트가 랜덤한 입력값을 수신할 준비가 되었음을 기록하는 단계를 더 포함할 수 있다.In an embodiment, the emulation method according to the present invention includes the steps of: determining whether a preset random time has elapsed when the check result is set to the input state; and recording that the specific I/O port is ready to receive a random input value when a preset random time has elapsed as a result of the determination.

본 발명에 따른 에뮬레이팅 방법은 일 실시예로, 상기 특정 I/O 포트를 포함한 모든 포트를 대상으로 반복하는 단계 이후에, 상기 출력값이 변경된 특정 I/O 포트에서의 변화된 부분을 출력하는 단계; 상기 특정 I/O 포트가 랜덤한 입력값을 수신할 준비가 되어 기록된 경우, 특정 범위 내에 들어오는 랜덤값을 생성하는 단계; 및 상기 랜덤값을 현재 포트의 입력값으로 적용하는 단계를 더 포함할 수 있다.In one embodiment, the emulation method according to the present invention includes: after repeating for all ports including the specific I/O port, outputting a changed part in the specific I/O port in which the output value is changed; generating a random value coming within a specific range when the specific I/O port is ready to receive a random input value and recorded; and applying the random value as an input value of the current port.

이 외에도, 본 발명을 구현하기 위한 다른 방법, 다른 시스템 및 상기 방법을 실행하기 위한 컴퓨터 프로그램을 기록하는 컴퓨터 판독 가능한 기록 매체가 더 제공될 수 있다.In addition to this, another method for implementing the present invention, another system, and a computer-readable recording medium for recording a computer program for executing the method may be further provided.

전술한 본 발명의 과제 해결 수단 중 어느 하나에 의하면, 임베디드 시스템 또는 컴퓨터 상에서 동작하는 어플리케이션에서 실제 I/O 디바이스 없이 하드웨어의 입출력 제어에 대한 에뮬레이션 기능을 수행할 수 있다.According to any one of the above-described problem solving means of the present invention, an emulation function for input/output control of hardware can be performed without an actual I/O device in an embedded system or an application operating on a computer.

본 발명의 효과들은 이상에서 언급된 효과로 제한되지 않으며, 언급되지 않은 또 다른 효과들은 아래의 기재로부터 통상의 기술자에게 명확하게 이해될 수 있을 것이다.Effects of the present invention are not limited to the effects mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art from the following description.

도 1은 종래 기술에 따른 실제 하드웨어의 제어 흐름을 설명하기 위한 도면이다.
도 2는 본 발명이 일 실시예에 따른 에뮬레이팅 시스템을 설명하기 위한 도면이다.
도 3은 가상 I/O 디바이스의 구조를 설명하기 위한 도면이다.
도 4는 본 발명의 일 실시예에 따른 에뮬레이팅 방법을 설명하기 위한 도면이다.
1 is a diagram for explaining the control flow of actual hardware according to the prior art.
2 is a diagram for explaining an emulation system according to an embodiment of the present invention.
3 is a diagram for explaining the structure of a virtual I/O device.
4 is a diagram for explaining an emulation method according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. However, the present invention may be embodied in many different forms and is not limited to the embodiments described herein. And in order to clearly explain the present invention in the drawings, parts irrelevant to the description are omitted.

명세서 전체에서 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.In the entire specification, when a part "includes" a certain element, it means that other elements may be further included, rather than excluding other elements, unless otherwise stated.

본원은 가상 하드웨어 기반의 에뮬레이팅 시스템(1) 및 방법에 관한 것이다.The present application relates to a virtual hardware-based emulation system (1) and a method.

종래에는 운영체제 상에서 동작하는 어플리케이션에서 I/O 디바이스를 제어하기 위해서는 실제 하드웨어가 운영체제 외부에 존재하면서 디바이스 드라이버와 연동되어 동작하였으나, 본 발명의 일 실시예는 실제 하드웨어인 I/O 디바이스처럼 동작하는 가상의 I/O 디바이스를 운영체제의 메모리 상에서 소프트웨어 형태로 구동되도록 하면서 드라이버 디바이스와 연동할 수 있다.Conventionally, in order to control an I/O device in an application operating on an operating system, real hardware exists outside the operating system and operates in conjunction with a device driver. However, an embodiment of the present invention provides a virtual device operating like an I/O device that is real hardware. I/O devices of the operating system can be operated in the form of software in the memory of the operating system while interworking with the driver device.

이에 따라, 본 발명의 일 실시예는 실제 I/O 디바이스를 대체할 수 있는 소프트웨어 기반의 가상 I/O 디바이스 설치를 통해, 어플리케이션에서 마치 실제 하드웨어를 제어하는 것과 같이 동작시킬 수 있다.Accordingly, an embodiment of the present invention can operate as if controlling real hardware in an application by installing a software-based virtual I/O device that can replace the real I/O device.

도 2는 본 발명이 일 실시예에 따른 에뮬레이팅 시스템(1)을 설명하기 위한 도면이다. 도 3은 가상 I/O 디바이스(100)의 구조를 설명하기 위한 도면이다.2 is a diagram for explaining an emulating system 1 according to an embodiment of the present invention. 3 is a diagram for explaining the structure of the virtual I/O device 100 .

본 발명의 일 실시예에 따른 에뮬레이팅 시스템(1)은 가상 I/O 디바이스(100), 디바이스 드라이버(200) 및 어플리케이션(300)을 포함한다.The emulating system 1 according to an embodiment of the present invention includes a virtual I/O device 100 , a device driver 200 , and an application 300 .

가상 I/O 디바이스(100)는 복수의 가상 레지스터(110~130)를 포함하며,이러한 가상 I/O 디바이스(100)는 실제 하드웨어 제어구조와 달리 운영체제의 커널 상에서 소프트웨어 형태로 동작할 수 있다.The virtual I/O device 100 includes a plurality of virtual registers 110 to 130, and the virtual I/O device 100 may operate in the form of software on the kernel of the operating system, unlike an actual hardware control structure.

즉, 가상 I/O 디바이스(100)는 커널 상에서 동작하는 소프트웨어 모듈일 수 있으나 기존 디바이스 드라이버와의 연동을 고려하여 도 3과 같이 논리적으로는 실제 하드웨어와 유사한 형태의 구조를 가질 수 있다.That is, the virtual I/O device 100 may be a software module operating on a kernel, but may have a logically similar structure to actual hardware as shown in FIG. 3 in consideration of interworking with an existing device driver.

일 실시예로, 복수의 가상 레지스터(110~130)는 특정 I/O 포트를 제어하기 위한 것으로 커널 상에 존재하는 제 1 내지 제 3의 가상 레지스(110~130)를 포함할 수 있다.In one embodiment, the plurality of virtual registers 110 to 130 are for controlling a specific I/O port and may include first to third virtual registers 110 to 130 existing in the kernel.

제 1 가상 레지스터(110)는 GPIO_OE 레지스터로, 특정 I/O 포트를 입력 또는 출력으로 설정할 때 사용하는 레지스터이다.The first virtual register 110 is a GPIO_OE register, which is used to set a specific I/O port as an input or output.

제 2 가상 레지스터(120)는 GPIO_IN 레지스터로 특정 I/O 포트가 입력으로 설정되었을 경우 입력값을 독출하기 위해 사용하는 레지스터이다.The second virtual register 120 is a GPIO_IN register and is used to read an input value when a specific I/O port is set as an input.

제 3 가상 레지스터(130)는 GPIO_OUT 레지스터로 특정 I/O 포트가 출력으로 설정되었을 경우 출력값을 기록하기 위해 사용하는 레지스터이다.The third virtual register 130 is a GPIO_OUT register and is used to write an output value when a specific I/O port is set as an output.

여기에서 복수의 가상 레지스터(110~130)는 특정 I/O 포트의 크기에 따라 매핑될 수 있다. 예를 들어, 특정 I/O 포트의 크기가 8bit, 16bit, 32bit 등의 크기에 따라 가변적인 크기를 가질 수 있다.Here, the plurality of virtual registers 110 to 130 may be mapped according to the size of a specific I/O port. For example, the size of a specific I/O port may have a variable size according to the size of 8-bit, 16-bit, 32-bit, and the like.

디바이스 드라이버(200)는 가상 I/O 디바이스(100)의 입출력 신호를 제어한다.The device driver 200 controls input/output signals of the virtual I/O device 100 .

일 실시예로, 디바이스 드라이버(200)는 가상 I/O 디바이스(100)의 가상 레지스터(110~130)에 접근하여 특정 I/O 포트에 입출력 방향을 설정하고, 입출력 포트에서 데이터를 독출 또는 기록한다.In one embodiment, the device driver 200 accesses the virtual registers 110 to 130 of the virtual I/O device 100 to set an input/output direction to a specific I/O port, and reads or writes data from the input/output port. do.

즉, 디바이스 드라이버(200)는 가상 I/O 디바이스(100)에 존재하는 제 1 내지 제 3 가상 레지스터(110~130)에 접근하여 특정 I/O 포트에 입출력 방향을 설정하고, 입력 포트에서는 디지털 데이터를 독출하거나 출력 포트에서는 디지털 데이터를 출력할 수 있다.That is, the device driver 200 accesses the first to third virtual registers 110 to 130 existing in the virtual I/O device 100 to set the input/output direction to a specific I/O port, and the digital input port Data can be read out or digital data can be output from the output port.

이와 같은 디바이스 드라이버(200)에서 가상 I/O 디바이스(100)의 입출력 신호를 제어할 수 있는 별도의 레지스터(GPIO_IN, GPIO_OUT, GPIO_OE)에 대한 정보는 아래 표 1과 같다.Table 1 below shows information on separate registers (GPIO_IN, GPIO_OUT, GPIO_OE) capable of controlling the input/output signals of the virtual I/O device 100 in the device driver 200 as described above.

가상 레지스터virtual register 설명Explanation GPIO_IN[0:N]GPIO_IN[0:N] 특정 I/O 포트가 입력으로 설정되어 있으면 해당 포트에서의 값을 독출할 수 있다.If a specific I/O port is set as an input, the value from the corresponding port can be read. GPIO_OUT[0:N]GPIO_OUT[0:N] 특정 I/O 포트가 출력으로 설정되어 있으면 해당 포트에 값을 기록할 수 있다.If a specific I/O port is configured as an output, you can write a value to that port. GPIO_OE[0:N]GPIO_OE[0:N] 특정 포트가 1일 경우 출력으로 동작하고, 특정 포트가 0일 경우 입력으로 동작한다.When a specific port is 1, it operates as an output, and when a specific port is 0, it operates as an input.

마지막으로 어플리케이션(300)은 가상 I/O 디바이스(100)를 제어한다.Finally, the application 300 controls the virtual I/O device 100 .

참고로, 본 발명의 실시예에 따른 도 2 내지 도 3에 도시된 구성 요소들은 소프트웨어 또는 FPGA(Field Programmable Gate Array) 또는 ASIC(Application Specific Integrated Circuit)와 같은 하드웨어 형태로 구현될 수 있으며, 소정의 역할들을 수행할 수 있다.For reference, the components shown in FIGS. 2 to 3 according to an embodiment of the present invention may be implemented in the form of software or hardware such as a Field Programmable Gate Array (FPGA) or Application Specific Integrated Circuit (ASIC). can perform roles.

그렇지만 '구성 요소들'은 소프트웨어 또는 하드웨어에 한정되는 의미는 아니며, 각 구성 요소는 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 재생시키도록 구성될 수도 있다.However, 'components' are not limited to software or hardware, and each component may be configured to reside in an addressable storage medium or to reproduce one or more processors.

따라서, 일 예로서 구성 요소는 소프트웨어 구성 요소들, 객체지향 소프트웨어 구성 요소들, 클래스 구성 요소들 및 태스크 구성 요소들과 같은 구성 요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램 코드의 세그먼트들, 드라이버들, 펌웨어, 마이크로 코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들 및 변수들을 포함한다.Thus, as an example, a component includes components such as software components, object-oriented software components, class components and task components, and processes, functions, properties, procedures, sub It includes routines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables.

구성 요소들과 해당 구성 요소들 안에서 제공되는 기능은 더 작은 수의 구성 요소들로 결합되거나 추가적인 구성 요소들로 더 분리될 수 있다.Components and functions provided within the components may be combined into a smaller number of components or further divided into additional components.

이하에서는 도 4를 참조하여, 본 발명의 일 실시예에 따른 에뮬레이팅 시스템(1)에서 수행되는 방법에 대하여 설명하도록 한다.Hereinafter, a method performed in the emulating system 1 according to an embodiment of the present invention will be described with reference to FIG. 4 .

도 4는 본 발명의 일 실시예에 따른 에뮬레이팅 방법을 설명하기 위한 도면이다.4 is a diagram for explaining an emulation method according to an embodiment of the present invention.

본 발명의 일 실시예는 먼저 가상 I/O 디바이스(100)의 제 1 가상 레지스터(GPIO_OE, 110)를 통해 특정 I/O 포트에 대한 입출력 상태를 확인한다(S111).An embodiment of the present invention first checks the input/output state for a specific I/O port through the first virtual register GPIO_OE 110 of the virtual I/O device 100 ( S111 ).

만약, 확인 결과 출력 상태로 설정된 경우 출력값을 독출하기 위한 제 2 가상 레지스터(GPIO_OUT, 120)의 이전값과 현재값을 비교하여 출력값의 변화 유무를 확인한다(S113).If it is set to the output state as a result of the check, it is checked whether the output value has changed by comparing the current value with the previous value of the second virtual register GPIO_OUT 120 for reading the output value ( S113 ).

다음으로, 확인 결과 출력값에 변화가 있는 경우 특정 I/O 포트에 출력값이 변경되었음을 기록한다(S115).Next, if there is a change in the output value as a result of checking, it is recorded that the output value is changed in a specific I/O port (S115).

위와 달리 제 1 가상 레지스터(110)를 통해 확인한 결과, 특정 I/O 포트가 입력 상태로 설정된 경우 미리 설정된 랜덤한 시간이 경과하였는지 여부를 판단한다(S121).Contrary to the above, as a result of checking through the first virtual register 110, when a specific I/O port is set to the input state, it is determined whether a preset random time has elapsed (S121).

그리고 판단 결과 미리 설정된 랜덤 시간이 경과한 경우 특정 I/O 포트가 랜덤한 입력값을 수신할 준비가 되었음을 기록한다(S123).And when the predetermined random time has elapsed as a result of the determination, it is recorded that a specific I/O port is ready to receive a random input value (S123).

이와 같은 과정은 특정 I/O 포트를 포함한 모든 포트를 대상으로 반복된다.This process is repeated for all ports including a specific I/O port.

즉, I/O 디바이스(100)에서 입력 포트와 출력 포트에 대한 처리절차는 0번째 포트부터 시작하여 N번째 포트까지 순차적으로 접근하면서, 모든 포트를 대상으로 동일한 처리 과정을 계속 반복하면서 진행한다(S101~S107).That is, in the I/O device 100, the processing procedure for the input port and the output port proceeds while continuously repeating the same processing process for all ports while sequentially accessing from the 0th port to the Nth port ( S101 to S107).

모든 포트에 대한 순차적인 처리과정이 완료되면, 출력포트 변경에 대한 기록이 있을 경우(S131), 출력값이 변경된 특정 I/O 포트에서의 변화된 부분을 출력한다(S133).When the sequential processing process for all ports is completed, if there is a record of the output port change (S131), the changed part in the specific I/O port in which the output value is changed is output (S133).

이후, 특정 I/O 포트가 랜덤한 입력값을 수신할 준비가 되어 기록된 경우(S135), 특정 범위 내에 들어오는 랜덤값을 생성하고, 이를 현재 포트의 입력값으로 적용한다(S137).Thereafter, when a specific I/O port is ready to receive a random input value and recorded (S135), a random value coming within a specific range is generated and applied as the input value of the current port (S137).

이와 같이 모든 포트 처리과정과 입출력 기록 처리과정이 완료되면, 전술한 과정을 처음부터 반복하여 수행하게 된다.As described above, when all port processing and input/output recording processing are completed, the above-described process is repeated from the beginning.

이러한 반복과정을 빠르게 처리함으로써, 본 발명의 일 실시예는 디바이스 드라이버(200)에서 출력 포트에 특정값을 기록하게 되면 가상 I/O 디바이스(100)에서 출력포트의 변화값을 빠르게 인지할 수 있으며, 반대로, 랜덤한 시간에 랜덤한 입력값을 입력 포트에 입력하고 디바이스 드라이버(200)에서 독출하여 어플리케이션(300)에 전달할 수 있다.By quickly processing such an iterative process, in an embodiment of the present invention, when a specific value is recorded in the output port in the device driver 200, the virtual I/O device 100 can quickly recognize the change value of the output port, , conversely, a random input value may be input to the input port at a random time, read from the device driver 200 , and transmitted to the application 300 .

상술한 설명에서, 단계 S101 내지 단계 S137는 본 발명의 구현예에 따라서, 추가적인 단계들로 더 분할되거나, 더 적은 단계들로 조합될 수 있다. 또한, 일부 단계는 필요에 따라 생략될 수도 있고, 단계 간의 순서가 변경될 수도 있다. 아울러, 기타 생략된 내용이라 하더라도 도 2 내지 도 3에서의 에뮬레이팅 시스템(1)에 관하여 이미 기술된 내용은 도 4에서의 에뮬레이팅 방법에도 적용된다.In the above description, steps S101 to S137 may be further divided into additional steps or combined into fewer steps, according to an embodiment of the present invention. In addition, some steps may be omitted as necessary, and the order between steps may be changed. In addition, the contents already described with respect to the emulating system 1 in FIGS. 2 to 3 are also applied to the emulating method in FIG.

이상에서 전술한 본 발명의 일 실시예에 따른 이전 작업의 반려율을 활용한 샘플링 검수 방법은, 하드웨어인 컴퓨터와 결합되어 실행되기 위해 프로그램(또는 어플리케이션)으로 구현되어 매체에 저장될 수 있다.The sampling inspection method using the rejection rate of a previous job according to an embodiment of the present invention described above may be implemented as a program (or application) and stored in a medium in order to be executed in combination with a computer, which is hardware.

상기 전술한 프로그램은, 상기 컴퓨터가 프로그램을 읽어 들여 프로그램으로 구현된 상기 방법들을 실행시키기 위하여, 상기 컴퓨터의 프로세서(CPU)가 상기 컴퓨터의 장치 인터페이스를 통해 읽힐 수 있는 C, C++, JAVA, Ruby, 기계어 등의 컴퓨터 언어로 코드화된 코드(Code)를 포함할 수 있다. 이러한 코드는 상기 방법들을 실행하는 필요한 기능들을 정의한 함수 등과 관련된 기능적인 코드(Functional Code)를 포함할 수 있고, 상기 기능들을 상기 컴퓨터의 프로세서가 소정의 절차대로 실행시키는데 필요한 실행 절차 관련 제어 코드를 포함할 수 있다. 또한, 이러한 코드는 상기 기능들을 상기 컴퓨터의 프로세서가 실행시키는데 필요한 추가 정보나 미디어가 상기 컴퓨터의 내부 또는 외부 메모리의 어느 위치(주소 번지)에서 참조되어야 하는지에 대한 메모리 참조관련 코드를 더 포함할 수 있다. 또한, 상기 컴퓨터의 프로세서가 상기 기능들을 실행시키기 위하여 원격(Remote)에 있는 어떠한 다른 컴퓨터나 서버 등과 통신이 필요한 경우, 코드는 상기 컴퓨터의 통신 모듈을 이용하여 원격에 있는 어떠한 다른 컴퓨터나 서버 등과 어떻게 통신해야 하는지, 통신 시 어떠한 정보나 미디어를 송수신해야 하는지 등에 대한 통신 관련 코드를 더 포함할 수 있다.The above-mentioned program, in order for the computer to read the program and execute the methods implemented as a program, C, C++, JAVA, Ruby, which the processor (CPU) of the computer can read through the device interface of the computer; It may include code coded in a computer language such as machine language. Such code may include functional code related to a function defining functions necessary for executing the methods, etc., and includes an execution procedure related control code necessary for the processor of the computer to execute the functions according to a predetermined procedure. can do. In addition, the code may further include additional information necessary for the processor of the computer to execute the functions or code related to memory reference for which location (address address) in the internal or external memory of the computer to be referenced. have. In addition, when the processor of the computer needs to communicate with any other computer or server located remotely in order to execute the above functions, the code uses the communication module of the computer to determine how to communicate with any other computer or server remotely. It may further include a communication-related code for whether to communicate and what information or media to transmit and receive during communication.

상기 저장되는 매체는, 레지스터, 캐쉬, 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라 반영구적으로 데이터를 저장하며, 기기에 의해 판독(reading)이 가능한 매체를 의미한다. 구체적으로는, 상기 저장되는 매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등이 있지만, 이에 제한되지 않는다. 즉, 상기 프로그램은 상기 컴퓨터가 접속할 수 있는 다양한 서버 상의 다양한 기록매체 또는 사용자의 상기 컴퓨터상의 다양한 기록매체에 저장될 수 있다. 또한, 상기 매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장될 수 있다.The storage medium is not a medium that stores data for a short moment, such as a register, a cache, a memory, etc., but a medium that stores data semi-permanently and can be read by a device. Specifically, examples of the storage medium include, but are not limited to, ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage device. That is, the program may be stored in various recording media on various servers that the computer can access or in various recording media on the computer of the user. In addition, the medium may be distributed in a computer system connected by a network, and a computer readable code may be stored in a distributed manner.

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.The above description of the present invention is for illustration, and those of ordinary skill in the art to which the present invention pertains can understand that it can be easily modified into other specific forms without changing the technical spirit or essential features of the present invention. will be. Therefore, it should be understood that the embodiments described above are illustrative in all respects and not restrictive. For example, each component described as a single type may be implemented in a dispersed form, and likewise components described as distributed may be implemented in a combined form.

본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is indicated by the following claims rather than the above detailed description, and all changes or modifications derived from the meaning and scope of the claims and their equivalent concepts should be interpreted as being included in the scope of the present invention. do.

1: 에뮬레이팅 시스템
100: 가상 I/O 디바이스
110: 제 1 가상 레지스터
120: 제 2 가상 레지스터
130: 제 3 가상 레지스터
200: 디바이스 드라이버
300: 어플리케이션
1: emulating system
100: virtual I/O device
110: first virtual register
120: second virtual register
130: third virtual register
200: device driver
300: application

Claims (8)

운영체제 상에서 가상 하드웨어를 실제 하드웨어와 같이 에뮬레이팅하기 위한 에뮬레이션 시스템에 있어서,
복수의 가상 레지스터를 포함하는 가상 I/O 디바이스,
상기 가상 I/O 디바이스의 입출력 신호를 제어하되, 상기 가상 I/O 디바이스의 레지스터에 접근하여 특정 I/O 포트에 입출력 방향을 설정하고, 입출력 포트에서 데이터를 독출 또는 기록하는 디바이스 드라이버 및
상기 가상 I/O 디바이스를 제어하는 어플리케이션을 포함하는 에뮬레이션 시스템.
In an emulation system for emulating virtual hardware like real hardware on an operating system,
a virtual I/O device comprising a plurality of virtual registers;
A device driver that controls the input/output signals of the virtual I/O device, accesses a register of the virtual I/O device, sets an input/output direction to a specific I/O port, and reads or writes data from the input/output port; and
An emulation system comprising an application controlling the virtual I/O device.
제 1 항에 있어서,
상기 가상 I/O 디바이스는 상기 운영체제의 커널 상에서 소프트웨어 형태로 동작하는 것인 에뮬레이션 시스템.
The method of claim 1,
The virtual I/O device is an emulation system that operates in the form of software on the kernel of the operating system.
제 1 항에 있어서,
상기 복수의 가상 레지스터는, 상기 특정 I/O 포트를 입력 또는 출력으로 설정하기 위한 제 1 가상 레지스터, 상기 특정 I/O 포트가 입력으로 설정되었을 경우 입력값을 독출하는 제 2 가상 레지스터 및 상기 특정 I/O 포트가 출력으로 설정되었을 경우 출력값을 기록하는 제 3 가상 레지스터를 포함하는 것인 에뮬레이션 시스템.
The method of claim 1,
The plurality of virtual registers may include a first virtual register for setting the specific I/O port as an input or an output, a second virtual register for reading an input value when the specific I/O port is set as an input, and the An emulation system comprising a third virtual register that writes an output value when a specific I/O port is configured as an output.
제 3 항에 있어서,
상기 복수의 가상 레지스터는 상기 특정 I/O 포트의 크기에 따라 매핑되는 것인 에뮬레이션 시스템.
4. The method of claim 3,
and the plurality of virtual registers are mapped according to the size of the specific I/O port.
복수의 제 1 내지 제 3 가상 레지스터를 포함하는 가상 I/O 디바이스, 상기 가상 I/O 디바이스의 입출력 신호를 제어하는 디바이스 드라이버 및 상기 가상 I/O 디바이스를 제어하는 어플리케이션을 포함하는 에뮬레이션 시스템을 통해 운영체제 상에서 가상 하드웨어를 실제 하드웨어와 같이 에뮬레이팅하는 방법에 있어서,
상기 가상 I/O 디바이스의 제 1 가상 레지스터를 통해 특정 I/O 포트에 대한 입출력 상태를 확인하는 단계;
상기 확인 결과 출력 상태로 설정된 경우 출력값을 독출하기 위한 제 2 가상 레지스터의 이전값과 현재값을 비교하여 출력값의 변화 유무를 확인하는 단계;
상기 확인 결과 출력값에 변화가 있는 경우 상기 특정 I/O 포트에 출력값이 변경되었음을 기록하는 단계; 및
상기 특정 I/O 포트를 포함한 모든 포트를 대상으로 반복하는 단계를 포함하는 에뮬레이팅 방법.
Through an emulation system including a virtual I/O device including a plurality of first to third virtual registers, a device driver for controlling input/output signals of the virtual I/O device, and an application for controlling the virtual I/O device In a method for emulating virtual hardware like real hardware on an operating system,
checking an input/output state for a specific I/O port through a first virtual register of the virtual I/O device;
checking whether an output value has changed by comparing a previous value and a current value of a second virtual register for reading an output value when the output state is set as an output state as a result of the check;
if there is a change in the output value as a result of the check, recording that the output value is changed in the specific I/O port; and
An emulation method comprising repeating for all ports including the specific I/O port.
제 5 항에 있어서,
상기 복수의 제 1 내지 제 3 가상 레지스터는, 상기 특정 I/O 포트를 입력 또는 출력으로 설정하기 위한 제 1 가상 레지스터, 상기 특정 I/O 포트가 입력으로 설정되었을 경우 입력값을 독출하는 제 2 가상 레지스터 및 상기 특정 I/O 포트가 출력으로 설정되었을 경우 출력값을 기록하는 제 3 가상 레지스터를 포함하는 것인 에뮬레이팅 방법.
6. The method of claim 5,
The plurality of first to third virtual registers include a first virtual register for setting the specific I/O port as an input or an output, and a first virtual register for reading an input value when the specific I/O port is set as an input. and a second virtual register and a third virtual register for writing an output value when the specific I/O port is configured as an output.
제 5 항에 있어서,
상기 확인 결과 입력 상태로 설정된 경우 미리 설정된 랜덤 시간이 경과하였는지 여부를 판단하는 단계; 및
상기 판단 결과 미리 설정된 랜덤 시간이 경과한 경우 상기 특정 I/O 포트가 랜덤한 입력값을 수신할 준비가 되었음을 기록하는 단계를 더 포함하는 에뮬레이팅 방법.
6. The method of claim 5,
determining whether a preset random time has elapsed when the check result is set to the input state; and
The emulation method further comprising the step of recording that the specific I/O port is ready to receive a random input value when the predetermined random time has elapsed as a result of the determination.
제 7 항에 있어서,
상기 특정 I/O 포트를 포함한 모든 포트를 대상으로 반복하는 단계 이후에,
상기 출력값이 변경된 특정 I/O 포트에서의 변화된 부분을 출력하는 단계;
상기 특정 I/O 포트가 랜덤한 입력값을 수신할 준비가 되어 기록된 경우, 특정 범위 내에 들어오는 랜덤값을 생성하는 단계; 및
상기 랜덤값을 현재 포트의 입력값으로 적용하는 단계를 더 포함하는 에뮬레이팅 방법.
8. The method of claim 7,
After the step of repeating for all ports including the specific I/O port,
outputting a changed part in a specific I/O port in which the output value is changed;
generating a random value that falls within a specific range when the specific I/O port is ready to receive a random input value and recorded; and
The emulation method further comprising the step of applying the random value as an input value of the current port.
KR1020190163047A 2019-12-09 2019-12-09 I/o port emulating system and method using virtual hardware KR102325428B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190163047A KR102325428B1 (en) 2019-12-09 2019-12-09 I/o port emulating system and method using virtual hardware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190163047A KR102325428B1 (en) 2019-12-09 2019-12-09 I/o port emulating system and method using virtual hardware

Publications (2)

Publication Number Publication Date
KR20210072599A true KR20210072599A (en) 2021-06-17
KR102325428B1 KR102325428B1 (en) 2021-11-12

Family

ID=76603809

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190163047A KR102325428B1 (en) 2019-12-09 2019-12-09 I/o port emulating system and method using virtual hardware

Country Status (1)

Country Link
KR (1) KR102325428B1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19980050668A (en) * 1996-12-21 1998-09-15 구자홍 Method and device for specific mode dialing of portable communication device
KR19980050668U (en) * 1996-12-30 1998-10-07 구자홍 Bit I / O control circuit of the I / O control device
JP2005321933A (en) * 2004-05-07 2005-11-17 Fuji Xerox Co Ltd Data input and output device and data input and output method
JP2008047052A (en) * 2006-08-21 2008-02-28 Toshiba Corp Control device having high-speed input/output function and its control method of control data
KR20110139130A (en) * 2010-06-21 2011-12-28 인텔 코오퍼레이션 Uniform storage device by partial virtualization machine
US20130080677A1 (en) * 2011-09-27 2013-03-28 Microchip Technology Incorporated Virtual General Purpose Input/Output for a Microcontroller

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19980050668A (en) * 1996-12-21 1998-09-15 구자홍 Method and device for specific mode dialing of portable communication device
KR19980050668U (en) * 1996-12-30 1998-10-07 구자홍 Bit I / O control circuit of the I / O control device
JP2005321933A (en) * 2004-05-07 2005-11-17 Fuji Xerox Co Ltd Data input and output device and data input and output method
JP2008047052A (en) * 2006-08-21 2008-02-28 Toshiba Corp Control device having high-speed input/output function and its control method of control data
KR20110139130A (en) * 2010-06-21 2011-12-28 인텔 코오퍼레이션 Uniform storage device by partial virtualization machine
US20130080677A1 (en) * 2011-09-27 2013-03-28 Microchip Technology Incorporated Virtual General Purpose Input/Output for a Microcontroller

Also Published As

Publication number Publication date
KR102325428B1 (en) 2021-11-12

Similar Documents

Publication Publication Date Title
US6237091B1 (en) Method of updating firmware without affecting initialization information
EP1086423B1 (en) Testing device driver reliability
US5978584A (en) Debugging apparatus for debugging a program by changing hardware environments without changing program operation state
US20080021693A1 (en) Storage Device Simulator
US20200279348A1 (en) Methods and apparatus to emulate graphics processing unit instructions
US7716642B1 (en) Techniques for detecting coding incompatibilities
US20090198770A1 (en) System and method of updating codes in controller
US10552190B2 (en) Precise error injection for driver testing
US10261844B2 (en) Generic language application programming interface interpreter
US5794013A (en) System and method for testing computer components in development environments
US9824000B1 (en) Testing calling code dynamically with random error injection based on user-specified configuration
US20220358270A1 (en) Chip verification system and verification method therefor
US20230195994A1 (en) Chip design verification system, chip design verification method, and computer readable recording media with stored program
CN112328305B (en) Eye pattern testing method and device, electronic equipment and readable storage medium
CN115756984A (en) Memory test method, device, equipment and storage medium
US8250545B2 (en) Associated apparatus and method for supporting development of semiconductor device
CN113032246B (en) SSD firmware operation method and device, readable storage medium and electronic equipment
KR102325428B1 (en) I/o port emulating system and method using virtual hardware
US10445218B2 (en) Execution of graphic workloads on a simulated hardware environment
CN114912396A (en) Method and equipment for realizing physical interface of logic system design based on virtual interface
US20200349304A1 (en) Method, apparatus, device, and medium for implementing simulator
US20210064712A1 (en) System and method for simulating field device in industrial plant
CN114846451A (en) Method, apparatus and system for replacing values in a device
CN110990252A (en) Method for testing quality and efficiency of embedded flight control software
US20060218529A1 (en) Systems and methods for common workspace interface

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right