KR20020033224A - Method for software pre-test using device emulator - Google Patents

Method for software pre-test using device emulator Download PDF

Info

Publication number
KR20020033224A
KR20020033224A KR1020000063840A KR20000063840A KR20020033224A KR 20020033224 A KR20020033224 A KR 20020033224A KR 1020000063840 A KR1020000063840 A KR 1020000063840A KR 20000063840 A KR20000063840 A KR 20000063840A KR 20020033224 A KR20020033224 A KR 20020033224A
Authority
KR
South Korea
Prior art keywords
register
device driver
virtual
emulator
function
Prior art date
Application number
KR1020000063840A
Other languages
Korean (ko)
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 KR1020000063840A priority Critical patent/KR20020033224A/en
Publication of KR20020033224A publication Critical patent/KR20020033224A/en

Links

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/3664Environments for testing or debugging software
    • 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
    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Abstract

PURPOSE: A method for previously checking a software using a device emulator is provided to enable an application program developer to check the operation of a virtual device by emulating an undeveloped device, by enabling an emulator to monitor a register area in case that the virtual device and the register area are generated, and by outputting messages to a display. CONSTITUTION: All sorts of modules are generated and initialized(ST11). In case that each module is initialized, an application module calls a device driver for checking the operation of the device driver and requests the access to the device(ST12). The device driver calls a register reading function or a register writing function instead of returning error values(ST13). The register reading function and the register writing function access to a virtual device control register instead of a real control register(ST14). Each function stores an address value in case of accessing to the virtual register(ST15). In case that the address value is received, an area of the virtual register relevant to the address value is read(ST16). In case that an operation the device emulator will perform is determined, a routine for the operation is called(ST17). The routine outputs fixed messages to a display(ST18). It is judged whether the device driver is normally operated(S19).

Description

디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법 {Method for software pre-test using device emulator}Method for software pre-test using device emulator

본 발명은 입출력 디바이스의 디바이스 드라이버(Device Driver) 및 그 응용프로그램의 개발단계에서 수행되는 소프트웨어 검사에 관한 것으로, 특히 통신을 위한 내장형 시스템에서 하드웨어의 개발이 완료되기 전에 호스트 컴퓨터상에서 응용 프로그램의 동작상태를 검사하는 경우에 있어서, 미개발된 디바이스를 에뮬레이팅하도록 하여 가상의 디바이스 및 그 디바이스를 제어하는 레지스터 영역이 생성되면 에뮬레이터가 그 영역을 모니터링하여 실제 입출력 디바이스가 아닌 디스플레이 장치 등에 메시지를 출력하도록 함으로써, 응용 프로그램의 개발자가 현재 가상 디바이스의 동작을 검사할 수 있도록 하기에 적당한 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention [0001] The present invention relates to a software test performed in a device driver of an input / output device and its application program. In particular, an operating state of an application program on a host computer before hardware development is completed in an embedded system for communication In the case of checking, by emulating an undeveloped device to generate a virtual device and a register area for controlling the device, the emulator monitors the area and outputs a message to a display device rather than an actual input / output device. The present invention relates to a method for pre-inspecting software using a device emulator suitable for allowing a developer of an application to examine the operation of a current virtual device.

일반적으로 일정한 기능을 위한 시스템의 개발에는 많은 시간과 노력이 필요하다. 특히, 하드웨어의 개발과 상기 개발되는 하드웨어의 운용에 필요한 소프트웨어의 개발이 모두 요구되는 경우가 있다.In general, developing a system for a certain function requires a lot of time and effort. In particular, there are cases where both the development of hardware and the development of software necessary for operating the developed hardware are required.

하드웨어 개발과 소프트웨어의 개발을 동시에 진행하게 되면, 시스템 개발기간을 단축시킬 수 있는 바 상기 각 개발 대상을 분리하여 연구를 진행하기도 한다. 그래서 전문화된 영역에서 각각 개발을 진행하여 조기에 시스템 개발을 완료할 수 있도록 한다.If the development of hardware and software is carried out at the same time, the development period of the system can be shortened. Therefore, each development is carried out in a specialized area so that system development can be completed early.

그런데 개발되는 하드웨어와 소프트웨어간은 서로 연동하여 동작하여야 하는데, 상기 설명한 바와 같이 각각 분리된 경로를 통하여 연구가 진행되는 동안에는 상호간 연동상태를 검사하기가 용이하지 않다.By the way, the hardware and software to be developed must operate in conjunction with each other, as described above, it is not easy to check the interworking state between each other while the study is progressing through separate paths.

예를 들어 하드웨어에 비해 그 운용을 위한 소프트웨어가 먼저 개발된 경우, 해당 소프트웨어의 동작상태를 진단하려면 하드웨어의 개발이 완료되기를 기다려야만 하는 것이 일반적이다.For example, if the software for operation is developed before the hardware, it is common to wait for the development of the hardware to be completed to diagnose the operation state of the software.

이때 상기 조건에서 검사 대상 소프트웨어에게 하드웨어와 연동되어 있는 것과 동일한 조건을 제공하게 되면, 실체의 하드웨어가 없는 상태에서도 소프트웨어의 동작상태를 진단할 수 있을 것이다.In this case, if the test target software is provided with the same condition as the hardware, the operating state of the software may be diagnosed even without the hardware of the entity.

이처럼 특정 하드웨어 또는 특정 기능을 위한 모듈의 부재에도 불구하고 해당 하드웨어에 접근하도록 프로그램된 소프트웨어에게 해당 하드웨어가 실재하는 것과 유사한 조건을 제공하는 소프트웨어적인 모듈을 에뮬레이터(Emulator)라 한다.Thus, an emulator is a software module that gives software programmed to access the hardware in spite of the absence of a module for a specific hardware or a specific function.

본 발명은 이러한 에뮬레이터를 이용하여 하드웨어가 실재하지 않는 환경에서도 소프트웨어의 동작진단을 가능케 하고자 하는 것으로, 이에 대비되는 종래기술을 설명하면 다음과 같다.The present invention is intended to enable the operation diagnosis of the software even in the environment where the hardware does not exist using such an emulator.

먼저, 도1은 종래기술에 의한 디바이스 에뮬레이터를 이용한 소프트웨어 사전 검사의 개념도이다.First, Fig. 1 is a conceptual diagram of software precheck using a device emulator according to the prior art.

상기 도1에 도시된 바와 같이 종래에는 응용 프로그램에 응용모듈들이 다수 구비되면, 상기 각 모듈간에 이루어지는 데이터 교환할 뿐만 아니라 상기 응용모듈들과 디바이스 드라이버간의 데이터 교환이 수행된다.As shown in FIG. 1, when a plurality of application modules are provided in an application program, not only data exchange between the modules is performed but also data exchange between the application modules and the device driver is performed.

이때 디바이스의 개발이 완료되지 않았거나 특정한 조건하에서 디바이스의 부재에도 상기 각 응용모듈들의 동작상태를 진단하고자 하는 경우에는 디바이스 드라이버의 에뮬레이터를 이용하게 된다.In this case, when the development of the device is not completed or when there is no device under a specific condition and wants to diagnose the operation state of each of the application modules, an emulator of the device driver is used.

보다 구체적으로 설명하면, 입출력 디바이스(I/O Device)에의 접근을 필요로 하는 응용 프로그램의 경우에 있어서 상기 입출력 디바이스에 비의존적인 응용모듈과 상기 디바이스의 직접적인 구동을 위한 디바이스 드라이버는 각각 따로 개발된다.More specifically, in the case of an application program requiring access to an I / O device, an application module independent of the I / O device and a device driver for direct driving of the device are developed separately.

이러한 환경에서 하드웨어의 개발이 완료되기 전에 기 존재하는 소프트웨어의 통합 테스트를 수행하는 경우가 있다. 상기 소프트웨어의 통합테스트는 개발된 디바이스 드라이버와는 별도로 의사 디바이스 드라이버(Dummy Device Driver)를 이용함으로써, 실제의 하드웨어에 접근하지 않고도 제한적인 범위 내에서 각 모듈간의 통합시험을 수행하게 된다.Under these circumstances, integration testing of existing software may be performed before hardware development is completed. In the integrated test of the software, a dummy device driver is used separately from the developed device driver, and thus the integrated test of each module is performed within a limited range without accessing the actual hardware.

상기 의사 디바이스 드라이버가 실제의 디바이스 드라이버를 대신하여 소프트웨어 통합테스트에 이용되는 것이다. 이때의 의사 디바이스 드라이버가 디바이스 드라이버의 에뮬레이터가 되는 것이다.The pseudo device driver is used for software integration test in place of the actual device driver. At this point, the pseudo device driver becomes an emulator of the device driver.

에뮬레이터를 사용해야 하는 이유는 응용 프로그램이 입출력 디바이스에 접근하기 위하여 디바이스 드라이버를 직접 호출하게 되면, 해당 디바이스 드라이버는 구동대상 디바이스의 부재에 따른 오류값만을 반환할 뿐으로 기대한 동작을 수행하지 않기 때문이다.The reason for using an emulator is that when an application program directly calls a device driver to access an input / output device, the device driver only returns an error value due to the absence of the target device and does not perform the expected operation.

그래서 호스트 컴퓨터상에서 개발된 응용 프로그램이 있고, 이 응용 프로그램이 디바이스에 접근할 때는 모조 함수(Dummy Function)로 작성된 디바이스 드라이버 API(Application Program Interface)를 호출하게 된다.Thus, there is an application program developed on a host computer, and when the application program accesses a device, it calls a device driver application program interface (API) written as a dummy function.

이때 모조 함수들은 아무런 작업도 수행하지 않거나 필요한 경우에 의사 반환코드(Dummy Return Code)를 반환하게 된다. 상기 반환값은 응용 프로그램에 있어 각 함수가 다른 함수를 호출함에 있어 해당 함수의 정상동작 여부를 판단하는 기준값이 될 수 있다.The dummy functions either do nothing or return a dummy return code if necessary. The return value may be a reference value for determining whether the function normally operates when each function calls another function in the application program.

상기 동작으로 응용모듈들을 하나로 연결할 때 발생될 수 있는 각종의 오류를 진단하고 통합된 프로그램의 전체적인 동작상태를 진단할 수 있는 것이다. 상기진단에 따라 오류가 발생한 모듈에 대한 디버깅을 수행하는 등의 추가적인 조치가 더 이루어진다.By the above operation, it is possible to diagnose various errors that may occur when connecting the application modules together and to diagnose the overall operating state of the integrated program. According to the above diagnosis, additional measures, such as debugging of a module in which an error occurs, are further performed.

이처럼 종래에는 디바이스의 개발이전에도 의사 디바이스 드라이버를 이용하여 응용 프로그램의 통합 테스트를 진행함으로써, 각 응용모듈간의 참조 오류(Referencing Error)를 방지하고 디바이스에 의존적인 모듈들간의 상호작용에 대한 진단을 수행할 수 있게 되는 것이다.As such, prior to device development, an integrated test of an application program is performed by using a pseudo device driver, thereby preventing referencing errors between each application module and performing diagnosis on interaction between modules depending on the device. You can do it.

그런데 상기 설명한 종래기술은, 하드웨어의 개발이 완료될 때까지 입출력 디바이스를 이용한 응용프로그램은 제한적인 범위내의 진단만을 수행할 수 있을 뿐이다.However, in the above-described prior art, an application program using an input / output device can only perform diagnosis within a limited range until the development of hardware is completed.

즉, 응용 프로그램의 통합테스트를 수행함에 있어서 실제의 디바이스 드라이버를 배제하고 의사 디바이스 드라이버를 이용하는데, 상기 의사 디바이스 드라이버를 단순한 모조함수(Dummy Function)만으로 구현하기 때문에 디바이스 드라이버 모듈이 디바이스를 제대로 구동시킬 수 있는지에 대한 진단은 불가능하였던 것이다.In other words, in performing the integrated test of the application program, the pseudo device driver is used without the actual device driver. Since the pseudo device driver is implemented with only a dummy function, the device driver module can operate the device properly. Diagnosis of whether it could be done was impossible.

이와 같이 실제의 디바이스 드라이버 API의 진단이 불가능한 단점은 전체적인 시스템 개발과정의 일관성과 효율성을 저하시키는 원인이 될 수도 있었다.This disadvantage of not being able to diagnose the actual device driver API could be a cause of lowering the consistency and efficiency of the overall system development process.

이에 본 발명은 상기와 같은 종래의 제반 문제점을 해소하기 위해 제안된 것으로, 본 발명의 목적은 통신을 위한 내장형 시스템에서 하드웨어의 개발이 완료되기 전에 호스트 컴퓨터상에서 응용 프로그램의 동작상태를 검사하는 경우에 있어서, 미개발된 디바이스를 에뮬레이팅하도록 하여 가상의 디바이스 및 그 디바이스를 제어하는 레지스터 영역이 생성되면 에뮬레이터가 그 영역을 모니터링하여 실제 입출력 디바이스가 아닌 디스플레이 장치 등에 메시지를 출력하도록 함으로써, 응용 프로그램의 개발자가 현재 가상 디바이스의 동작을 검사할 수 있도록 하기에 적당한 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법을 제공하는 데 있다.Accordingly, the present invention has been proposed to solve the conventional problems as described above, and an object of the present invention is to check the operation state of an application program on a host computer before the development of hardware is completed in an embedded system for communication. By emulating an undeveloped device, when a virtual device and a register area for controlling the device are generated, the emulator monitors the area and outputs a message to a display device rather than an actual input / output device, thereby allowing the developer of the application program to The present invention provides a method for pre-inspecting software using a device emulator suitable for checking the operation of a virtual device.

상기와 같은 목적을 달성하기 위하여 본 발명에 의한 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법은, 소프트웨어의 통합 테스트를 위한 각 모듈의 생성 및 초기화가 수행된 후 응용 모듈이 디바이스 드라이버를 호출하는 단계와; 응용 모듈에 호출된 디바이스 드라이버는 가상 레지스터 영역에 엑세스하는 함수를 호출하고, 상기 엑세스되는 가상 레지스터의 어드레스를 큐에 저장하는 단계와; 디바이스 에뮬레이터가 상기 엑세스되는 가상 레지스터를 읽어 상기 디바이스 드라이버에 의해 요구된 동작을 수행하기 위한 루틴을 호출하여 해당 동작을 수행하도록 하는 단계를 수행함을 그 기술적 구성상의 특징으로 한다.In order to achieve the above object, the software pre-checking method using the device emulator according to the present invention includes the steps of: an application module calling a device driver after generation and initialization of each module for the integrated test of the software; A device driver called to an application module, calling a function to access a virtual register area, and storing the address of the accessed virtual register in a queue; The technical configuration is characterized in that the device emulator reads the accessed virtual register and calls a routine for performing the operation requested by the device driver to perform the operation.

도1은 종래기술에 의한 디바이스 에뮬레이터를 이용한 소프트웨어 사전 검사의 개념도이며,1 is a conceptual diagram of a software pretest using a device emulator according to the prior art,

도2는 본 발명의 일실시예에 의한 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법에 따른 소프트웨어 블록도이며,2 is a software block diagram of a software pre-checking method using a device emulator according to an embodiment of the present invention.

도3은 도2에 적용되는 검사방법의 흐름도이다.3 is a flowchart of an inspection method applied to FIG. 2.

이하, 상기와 같은 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법의 기술적 사상에 따른 실시예에 의거 본 발명의 구성 및 동작을 설명한다.Hereinafter, the configuration and operation of the present invention will be described based on embodiments according to the technical idea of the software pre-checking method using the device emulator as described above.

먼저, 도2는 본 발명의 일실시예에 의한 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법에 따른 소프트웨어 블록도이며, 도3은 도2에 적용되는 검사방법의 흐름도이다.First, FIG. 2 is a software block diagram illustrating a software pretest method using a device emulator according to an embodiment of the present invention, and FIG. 3 is a flowchart of a test method applied to FIG.

상기 도3에 도시된 바와 같이 본 발명의 적절한 실시예는, 소프트웨어의 통합 테스트를 위해 각 응용모듈, 레지스터 및 디바이스 에뮬레이터를 생성하여 초기화한 후 응용 모듈이 디바이스 드라이버를 호출하는 단계(ST11~ST12)와; 응용 모듈이 디바이스 드라이버를 호출하면 가상 디바이스 제어 레지스터에 대한 읽기/쓰기 함수를 호출하여 레지스터에 접근하면서 해당 가상 레지스터의 어드레스를 큐에 저장하는 단계(ST13~ST15)와; 디바이스 에뮬레이터가 디바이스 드라이버에 의해 엑세스된 가상 레지스터의 어드레스 정보를 큐로부터 읽어 상기 어드레스가 가리키는 가상 레지스터의 해당 영역을 엑세스하여 요구된 동작을 확인한 후 그 동작을 수행하기 위한 루틴을 호출하게 되면, 상기 호출된 루틴이 호스트 컴퓨터상에 일정한 메시지를 디스플레이하는 단계(ST16~ST19)를 수행한다.As shown in FIG. 3, a suitable embodiment of the present invention includes generating and initializing respective application modules, registers, and device emulators for the integrated test of software, and then calling the device drivers with the device modules (ST11 to ST12). Wow; When the application module calls the device driver, calling a read / write function for the virtual device control register to access the register and storing the address of the corresponding virtual register in a queue (ST13 to ST15); If the device emulator reads the address information of the virtual register accessed by the device driver from the queue, accesses the corresponding region of the virtual register indicated by the address, checks the requested operation, and calls a routine to perform the operation. The specified routine performs the steps ST16 to ST19 of displaying a constant message on the host computer.

이와 같이 구성되는 방법의 동작을 설명하면 다음과 같다.The operation of the method configured as described above is as follows.

본 발명에 제시하는 방법은 소프트웨어 통합 테스트시 디바이스 드라이버의 동작상태를 진단할 수 있도록 하기 위하여 디바이스 드라이버의 에뮬레이터가 아닌 디바이스의 에뮬레이터를 이용한다.The method proposed in the present invention uses an emulator of a device rather than an emulator of the device driver in order to be able to diagnose an operating state of the device driver in a software integration test.

그러므로 본 발명에서는 디바이스 드라이버를 배제하지 않고 포함시킨 상태에서 소프트웨어 통합 테스트를 진행할 수 있도록 하는 것이다.Therefore, in the present invention, it is possible to proceed the software integration test in the state of including the device driver without exclusion.

도2에는 상기 기능의 구현을 위한 본 발명의 전체적인 소프트웨어 블록이 도시되어 있다.Figure 2 shows the overall software block of the present invention for the implementation of the functionality.

도2에 도시된 바에 따라, 본 발명은 실제의 디바이스를 에뮬레이션하는 모듈인 deviceEmulateTask()와; 호스트 컴퓨터상의 메모리 위에 있으면서 실제 디바이스의 레지스터 역할을 담당하는 가상 디바이스 제어 레지스터(Virtual Device Control Register)와; 디바이스 드라이버에 의해 호출되어 가상 디바이스 제어 레지스터에 접근할 수 있게 해 주는 루틴인 readRegister 및 writeRegister를 포함하여 모듈을 구성한다.As shown in Fig. 2, the present invention provides a deviceEmulateTask () which is a module that emulates an actual device; A Virtual Device Control Register, which resides in memory on the host computer and serves as a register of the actual device; The module consists of readRegister and writeRegister, routines that are called by the device driver to access virtual device control registers.

그리고 디바이스 에뮬레이터의 내부에는 가상 디바이스 제어 레지스터의 변화에 따라 실제 디바이스의 동작을 에뮬레이팅(Emulating)하는 variousRoutines()와 각 루틴으로의 분기를 담당하는 selectAction()으로 모듈이 구성된다.Inside the device emulator, the module is composed of variousRoutines () that emulates the actual device operation according to the change of the virtual device control register and selectAction () which is responsible for branching to each routine.

또한, 디바이스에의 접근을 위한 루틴과 디바이스 에뮬레이터간의 통신을 위해 TO_DEVICE_Q라는 별도의 메시지 큐(Message Queue)를 포함한다.It also includes a separate message queue called TO_DEVICE_Q for communication between the device emulator and the routine for access to the device.

본 발명에 의한 방법을 도3은 참조하여 보다 구체적으로 설명하면, 개발단계에 있는 응용 프로그램을 통합 테스트 하고자 하는 경우에는 통합 테스트를 위한 각종의 모듈을 생성하고 적절하게 초기화하여야 한다(ST1).Referring to the method according to the present invention in more detail with reference to Figure 3, when the integrated test of the application program in the development stage, it is necessary to generate a variety of modules for the integrated test and initialize appropriately (ST1).

우선 운영체제의 시스템 호출을 이용하여 메시지 큐를 생성한다. 그리고 가상의 디바이스 역할을 담당하는 디바이스 에뮬레이터인 deviceEmulatorTask()를 생성한다.First, a message queue is created using the system calls of the operating system. It creates a deviceEmulatorTask (), which is a device emulator that acts as a virtual device.

또한, 호스트 컴퓨터의 메모리 영역에 실제 디바이스 레지스터를 대신할 가상의 디바이스 제어 레지스터 영역을 할당받는다. 상기 가상의 디바이스 레지스터는 디바이스 드라이버에게 실제의 디바이스를 엑세스(Access)하고 있는 것과 같은 환경을 제공하게 된다.In addition, a virtual device control register area is allocated to the memory area of the host computer to replace the actual device register. The virtual device registers provide the device driver with an environment as if the device is being accessed.

이때 디바이스 드라이버를 새로 작성하는 경우에는 디바이스의 내부 제어 레지스터를 엑세스하는 부분을 모두 readRegister(), writeRegister()의 두 함수를 이용하여 구현한다. 한편, 칩 제조자가 제공하는 디바이스 드라이버의 경우에는 가상 레지스터에 엑세스하는 부분을 상기 두 함수로 수정하면 된다.In this case, when writing a new device driver, all the parts that access the internal control register of the device are implemented by using the readRegister () and writeRegister () functions. On the other hand, in the case of the device driver provided by the chip manufacturer, the part that accesses the virtual register may be modified by the above two functions.

통합 테스트를 위하여 각 모듈의 초기화 등이 이루어진 상태에서 디바이스 드라이버의 동작상태를 진단하기 위해 응용 모듈이 디바이스 드라이버를 호출하여 디바이스에의 엑세스를 요구하게 된다(ST12). 해당 디바이스에 대한 일정한 데이터의 읽기 또는 쓰기 요구가 그것이다.In order to diagnose the operation state of the device driver while the initialization of each module is performed for the integrated test, the application module calls the device driver and requests access to the device (ST12). This is a constant read or write request to the device.

디바이스에 대한 엑세스를 요구받은 디바이스 드라이버는 테스트 환경의 특수성으로 인해 해당 디바이스의 부재에 따른 오류값을 반환하는 것이 아니라, 레지스터 읽기함수(readRegister()) 또는 레지스터 쓰기함수(writeRegister())를 호출하게 된다(ST13).A device driver that is requested to access a device should call the register read function (readRegister ()) or register write function (writeRegister ()), rather than returning an error value due to the absence of the device due to the uniqueness of the test environment. (ST13).

즉, 디바이스 드라이버는 디바이스 읽기를 요청받으면 레지스터 읽기함수인 readRegister()를 호출하고 디바이스 쓰기가 요구되면 레지스터 쓰기함수인 writeRegister()를 호출하게 되는 것이다.That is, when a device driver is requested to read a device, the device driver calls readRegister (), a register read function, and writeRegister (), a register write function, when a device write is requested.

디바이스 드라이버가 상기 각 함수들을 호출하게 되면, 상기 함수들은 실제 제어 레지스터 대신에 메모리상의 가상 레지스터에 접근하면서 동시에 앞에서 생성한 큐에 접근한 가상 레지스터의 어드레스를 포스트(Post)시킨다.When the device driver calls each of these functions, they access the virtual registers in memory instead of the actual control registers, while at the same time posting the address of the virtual register that accessed the previously created queue.

즉, 상기 readRegister()와 writeRegister()는 실제의 디바이스가 아닌 호스트 컴퓨터상의 가상 디바이스 제어 레지스터(Virtual Device Control Register)를엑세스하게 된다(ST14).That is, the readRegister () and writeRegister () access a virtual device control register on a host computer, not an actual device (ST14).

그리고 상기 각 함수는 가상 레지스터에의 엑세스시 그 어드레스 값을 메시지 큐에 해당하는 TO_DEVICE_Q에 저장한다(ST15).Each function stores its address value in TO_DEVICE_Q corresponding to the message queue when accessing the virtual register (ST15).

TO_DEVICE_Q에 저장되는 어드레스 값은 디바이스 에뮬레이터(deviceEmulatorTask())에 의해 읽혀지게 된다. 그리하여 상기 큐에 pend 하고 있던 디바이스 에뮬레이터는 메시지를 받고 가상 레지스터 영역에 접근하여 접근한 레지스터 영역의 값을 읽고 이 값에 따라 해당 동작을 에뮬레이팅 해주는 각 루틴으로 분기한다.The address value stored in TO_DEVICE_Q is read by the device emulator (deviceEmulatorTask ()). Thus, the device emulator pending to the queue receives a message, accesses the virtual register area, reads the value of the accessed register area, and branches to each routine that emulates the operation according to this value.

즉, 디바이스 에뮬레이터는 최초 기동된 이후 pendQueue() 함수를 이용해 TO_DEVICE_Q를 감시하다가 상기 큐로 어드레스 값이 수신되면, 상기 어드레스 값이 가리키는 가상 레지스터의 영역을 읽어 어떤 동작을 수행할 것인지를 선택하게 된다(ST16).That is, the device emulator monitors TO_DEVICE_Q using the pendQueue () function after the first startup, and when an address value is received in the queue, the device emulator reads the area of the virtual register indicated by the address value and selects an operation to be performed (ST16). ).

상기 동작선택은 selectAction()과 같은 함수에 의해 수행되며, 이때 선택되는 동작은 에뮬레이팅하는 디바이스에 요구되는 다수의 동작들 중의 하나이어야 한다. 상기 선택의 기준은 디바이스 드라이버가 가상 레지스터를 엑세스하는 메시지이다.The action selection is performed by a function such as selectAction (), where the action selected should be one of a number of actions required for the emulating device. The criterion of the selection is a message for the device driver to access the virtual register.

selectAction() 함수에 의해 디바이스 에뮬레이터가 수행할 동작이 결정되면, 상기 동작의 구체적인 수행을 위한 루틴이 호출된다. 디바이스 에뮬레이터에 요구되는 동작에 대응하는 수만큼의 루틴이 필요한데, 상기 루틴의 처리를 위한 함수는 variousRoutines()와 같다(ST17).When an action to be performed by the device emulator is determined by the selectAction () function, a routine for performing the specific action is called. As many routines as necessary for the operation required by the device emulator are required, and the functions for processing the routines are the same as those of variousRoutines () (ST17).

상기 각 루틴은 테스트를 위한 목적으로 구현된 것이므로, 그에 적절한 처리를 수행하게 된다. 호출된 특정 루틴의 동작예로는 호스트 컴퓨터상의 디스플레이 장치로 일정한 메시지를 출력하는 것 등이다(ST18).Since each of the above routines is implemented for testing purposes, the appropriate processing is performed. An example of the operation of the called routine is to output a constant message to the display device on the host computer (ST18).

상기 예시의 경우 메시지의 출력과 함께 해당 루틴이 종료되는데, 출력의 분석을 통해 해당 디바이스 드라이버의 정상동작 여부를 판단할 수 있다.In the above example, the routine is terminated with the output of the message. The output can be analyzed to determine whether the corresponding device driver is operating normally.

이러한 일련의 단계가 수행된 후 테스트는 지속되거나 중단될 수 있다.After this series of steps is performed, the test can be continued or stopped.

이처럼 본 발명에서, 소프트웨어 통합 테스트시 디바이스를 에뮬레이션하는 디바이스 에뮬레이터를 구현함으로써, 디바이스 에뮬레이터에 구비된 각 에뮬레이션 루틴들이 호스트 컴퓨터의 디스플레이 장치에 메시지를 출력하도록 하는 등의 방식으로 실제 디바이스의 역할을 대신하고, 개발자가 해당 디바이스 드라이버의 동작상태를 모니터링할 수 있도록 하는 것이다.As such, in the present invention, by implementing a device emulator that emulates a device during software integration test, each emulation routine included in the device emulator takes the role of the actual device in such a manner as to output a message to the display device of the host computer. In other words, the developer can monitor the operation status of the device driver.

이상에서 본 발명의 바람직한 실시예를 설명하였으나, 본 발명은 다양한 변화와 변경 및 균등물을 사용할 수 있다. 본 발명은 상기 실시예를 적절히 변형하여 동일하게 응용할 수 있음이 명확하다. 따라서 상기 기재 내용은 하기 특허청구범위의 한계에 의해 정해지는 본 발명의 범위를 한정하는 것이 아니다.Although the preferred embodiment of the present invention has been described above, the present invention may use various changes, modifications, and equivalents. It is clear that the present invention can be applied in the same manner by appropriately modifying the above embodiments. Accordingly, the above description does not limit the scope of the invention as defined by the limitations of the following claims.

이상에서 살펴본 바와 같이 본 발명에 의한 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법은, 실제 하드웨어의 개발이 완료되기 전에 최대한 실제에 가까운 테스트 환경에서 입출력 디바이스에 엑세스하는 응용 프로그램에 대한통합 테스트를 가능케 하는 장점이 있다.As described above, the software pre-inspection method using the device emulator according to the present invention has an advantage of enabling an integrated test for an application program that accesses an input / output device in a test environment as close as possible before the actual hardware development is completed. have.

그리고 실제의 디바이스가 부재한 상태에서도 실제의 운용환경에 동일한 조건에서 디바이스 드라이버의 개발 및 진단이 가능하며, 칩 제조자가 제공한 디바이스 드라이버의 테스트도 가능하게 되는 효과가 있다.In the absence of an actual device, device drivers can be developed and diagnosed under the same conditions as in an actual operating environment, and a device driver provided by a chip manufacturer can be tested.

또한, 디바이스 에뮬레이터로 하여금 패킷 데이터를 루프백(Loopback) 하도록 함으로써, 입출력 디바이스에서의 패킷 송수신 테스트도 가능케 하는 효과를 갖는다.In addition, by allowing the device emulator to loop back packet data, it is possible to test packet transmission and reception at the input / output device.

Claims (6)

소프트웨어의 통합 테스트를 위한 각 모듈의 생성 및 초기화가 수행된 후 응용 모듈이 디바이스 드라이버를 호출하는 단계와;Invoking the device driver by the application module after the generation and initialization of each module for the integrated test of the software is performed; 응용 모듈에 호출된 디바이스 드라이버는 가상 레지스터 영역에 엑세스하기 위한 함수를 호출하고, 상기 엑세스되는 가상 레지스터의 어드레스를 저장하는 단계와;A device driver called to an application module, calling a function for accessing a virtual register area, and storing an address of the accessed virtual register; 디바이스 에뮬레이터가 상기 엑세스되는 가상 레지스터를 읽어 상기 디바이스 드라이버에 의해 요구된 동작을 수행하기 위한 루틴을 호출하여 해당 동작을 수행하도록 하는 단계를 수행하는 것을 특징으로 하는 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법.And a step of causing a device emulator to read the accessed virtual register to call a routine for performing an operation required by the device driver to perform a corresponding operation. 제 1항에 있어서, 상기 각 모듈의 생성 및 초기화 단계는,The method of claim 1, wherein the generating and initializing of each module comprises: 호스트 컴퓨터상의 메모리내에 가상 디바이스 제어 레지스터를 할당하여 상기 디바이스 드라이버가 엑세스하는 가상 레지스터 영역이 되도록 하고,Allocates a virtual device control register in memory on the host computer to be a virtual register area accessed by the device driver, 시스템 호출로 메시지 큐를 생성하여 상기 엑세스되는 가상 레지스터의 어드레스가 저장될 수 있도록 하며,Create a message queue with a system call so that the address of the accessed virtual register can be stored, 디바이스 에뮬레이터를 초기화하여 상기 메시지 큐에 가상 레지스터의 어드레스가 저장되는지를 감시하도록 하는 단계를 포함하여 구성되는 것을 특징으로 하는 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법.And initializing a device emulator to monitor whether an address of a virtual register is stored in the message queue. 제 1항에 있어서, 상기 디바이스 드라이버가 호출하는 함수는,The method of claim 1, wherein the function called by the device driver is 실제의 디바이스의 레지스터 영역을 대신하여 호스트 컴퓨터상에 할당된 가상 레지스터 영역을 엑세스하여 메시지를 읽기 위한 함수와; 상기 엑세스된 영역에 데이터를 쓰기 위한 함수를 포함하여 구성되는 것을 특징으로 하는 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법.A function for reading a message by accessing a virtual register area allocated on the host computer in place of the register area of the actual device; And a function for writing data in the accessed area. 제 1항에 있어서, 상기 디바이스 에뮬레이터는,The device of claim 1, wherein the device emulator comprises: 상기 초기화시에 기동되어 상기 디바이스 드라이버의 가상 레지스터에 대한 엑세스 어드레스가 저장되는 공간을 감시하기 위한 함수와;A function for monitoring the space in which the access address for the virtual register of the device driver is stored at startup upon initialization; 상기 함수가 어드레스 값의 도착을 감지한 경우에는 해당 어드레스가 지시하는 위치의 가상 레지스터에서 값을 읽어 어떤 동작이 요구되는지를 확인하기 위한 함수와;If the function detects the arrival of an address value, reads a value from a virtual register at a location indicated by the address to determine what operation is required; 상기 가상 레지스터를 읽어 확인된 요구 동작을 수행하기 위한 다수의 루틴을 호출하는 함수를 포함하여 구성되는 것을 특징으로 하는 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법.And a function of calling a plurality of routines for reading the virtual register to perform a checked operation. 제 1항에 있어서, 상기 디바이스 에뮬레이터에 의해 호출된 루틴은,The routine of claim 1 wherein the routine called by the device emulator comprises: 호스트 컴퓨터의 디스플레이 장치에 일정한 메시지를 출력하여 상기 메시지의 출력결과 분석을 통해 해당 디바이스 드라이버의 동작상태를 모니터링할 수 있도록 하는 것을 특징으로 하는 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법.And outputting a predetermined message to a display device of a host computer to monitor an operation state of a corresponding device driver by analyzing the output result of the message. 제 1항에 있어서,The method of claim 1, 상기 디바이스 드라이버는 일정한 데이터를 송신하고 해당 데이터를 다시 수신받기를 요구하면, 디바이스 에뮬레이터가 가상 레지스터 영역에 쓰기되는 데이터를 반향하여 출력하는 루틴을 기동함으로써 입출력 디바이스의 패킷 송수신 테스트가 이루어지도록 하는 것을 특징으로 하는 디바이스 에뮬레이터를 이용한 소프트웨어 사전검사 방법.When the device driver transmits certain data and receives the data again, the device emulator starts a routine for echoing and writing data written to the virtual register area to perform packet transmission / reception test of the input / output device. Software pre-testing method using a device emulator.
KR1020000063840A 2000-10-30 2000-10-30 Method for software pre-test using device emulator KR20020033224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020000063840A KR20020033224A (en) 2000-10-30 2000-10-30 Method for software pre-test using device emulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020000063840A KR20020033224A (en) 2000-10-30 2000-10-30 Method for software pre-test using device emulator

Publications (1)

Publication Number Publication Date
KR20020033224A true KR20020033224A (en) 2002-05-06

Family

ID=19696026

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020000063840A KR20020033224A (en) 2000-10-30 2000-10-30 Method for software pre-test using device emulator

Country Status (1)

Country Link
KR (1) KR20020033224A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100904961B1 (en) * 2007-09-28 2009-06-26 주식회사 아카넷티비 System for monitoring operation of data broadcasting application in cable broadcasting environment
KR101248821B1 (en) * 2010-12-22 2013-04-03 주식회사 케이티 System and method of providing emulator for widget using iptv terminal
CN112988322A (en) * 2019-12-17 2021-06-18 菜鸟智能物流控股有限公司 Analog hardware driving method and device
CN113904945A (en) * 2021-10-15 2022-01-07 杭州安恒信息技术股份有限公司 Internet of things equipment simulation debugging method and device, electronic device and storage medium
CN114610557A (en) * 2022-05-11 2022-06-10 宏晶微电子科技股份有限公司 Method and device for testing equipment driving unit

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100904961B1 (en) * 2007-09-28 2009-06-26 주식회사 아카넷티비 System for monitoring operation of data broadcasting application in cable broadcasting environment
KR101248821B1 (en) * 2010-12-22 2013-04-03 주식회사 케이티 System and method of providing emulator for widget using iptv terminal
CN112988322A (en) * 2019-12-17 2021-06-18 菜鸟智能物流控股有限公司 Analog hardware driving method and device
CN113904945A (en) * 2021-10-15 2022-01-07 杭州安恒信息技术股份有限公司 Internet of things equipment simulation debugging method and device, electronic device and storage medium
CN113904945B (en) * 2021-10-15 2024-04-09 杭州安恒信息技术股份有限公司 Internet of things equipment simulation debugging method and device, electronic device and storage medium
CN114610557A (en) * 2022-05-11 2022-06-10 宏晶微电子科技股份有限公司 Method and device for testing equipment driving unit
CN114610557B (en) * 2022-05-11 2022-08-26 宏晶微电子科技股份有限公司 Method and device for testing equipment driving unit

Similar Documents

Publication Publication Date Title
KR101246967B1 (en) Method and apparatus for executing unit tests in application host environment
US5771370A (en) Method and apparatus for optimizing hardware and software co-simulation
US6212489B1 (en) Optimizing hardware and software co-verification system
US5652869A (en) System for executing and debugging multiple codes in a multi-architecture environment using jacketing means for jacketing the cross-domain calls
EP1086423B1 (en) Testing device driver reliability
EP1269322B1 (en) Multi-channel, multi-service debug on a pipelined cpu architecture
JP2753500B2 (en) An improved software debugging system and method for debugging code specifically in a multi-architecture environment
US5339422A (en) System and method for jacketing cross-domain calls in a multi-code execution and debugging system within a multi-architecture environment
US7730492B1 (en) Method and system for running multiple virtual machines in a single process
US5680584A (en) Simulator system for code execution and debugging within a multi-architecture environment
US7318174B2 (en) Systems, methods, and computer readable medium for analyzing memory
US5363501A (en) Method for computer system development verification and testing using portable diagnostic/testing programs
US5574894A (en) Integrated circuit data processor which provides external sensibility of internal signals during reset
KR20020033224A (en) Method for software pre-test using device emulator
US6374399B1 (en) Apparatus and method for providing list and read list capability for a host computer system
EP3435229B1 (en) System integration using virtualization
US6370589B1 (en) Process for performing at least one test on at least one of the objects of an object-oriented program capable of running in parallel on a computer
US7464044B2 (en) Method and system for using emulation objects for developing point of sale
US6775814B1 (en) Dynamic system configuration for functional design verification
US7512956B1 (en) System and method for supporting non-standard procedure calls
JP2728002B2 (en) Embedded software debug support device
JP2000010820A (en) Method and device for testing one process of multiprocess system
CN116048999A (en) Embedded software data access method, device, terminal and storage medium
KR20030053675A (en) Hardware address map emulator for system software test
CN116860589A (en) Register verification method and device, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
N231 Notification of change of applicant
WITN Withdrawal due to no request for examination