KR0128219Y1 - Program execution time measure circuit - Google Patents
Program execution time measure circuit Download PDFInfo
- Publication number
- KR0128219Y1 KR0128219Y1 KR2019930008713U KR930008713U KR0128219Y1 KR 0128219 Y1 KR0128219 Y1 KR 0128219Y1 KR 2019930008713 U KR2019930008713 U KR 2019930008713U KR 930008713 U KR930008713 U KR 930008713U KR 0128219 Y1 KR0128219 Y1 KR 0128219Y1
- Authority
- KR
- South Korea
- Prior art keywords
- program
- execution time
- clock
- emulator
- output
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
본 고안은 롬 프로그램의 수행시간 측정에 관한 것으로, 종래에는 롬에 내장된 프로그램의 실행시간을 측정하는데 있어서 각 모듈의 실행시간을 측정하기 위하여 에뮬레이터하는 계측장비를 이용하게 되는데, 이러한 장치는 테스트하려는 씨피유에 에뮬레이터가 연결된 상태에서 에뮬레이터의 제어 프로그램이 실장된 피씨를 실행시키면 에뮬레이터에 관련된 여러 명령어를 수행할 수 있다. 그러나, 이러한 방법은 씨피유의 종류에 따라서 각각의 하드웨어를 에뮬레이터에 장착해야 하며 해당 하드웨어와 에뮬레이터의 가격이 고가이므로 쉽게 사용할 수 없는 문제가 있다. 이에 따라, 본 고안의 목적은 상기와 같은 종래의 프로그램 실행시간 측정회로에 따르는 결함을 해결하기 위하여 범용 마이크로 프로세서에 모두 적용할 수 있는 저가형의 프로그램 실행시간 측정장치를 제공하는데 있다.The present invention relates to the measurement of the execution time of a ROM program, and in the related art, in order to measure the execution time of a program embedded in a ROM, an instrument that emulates to measure the execution time of each module is used. If you run the PC with the emulator's control program loaded with the emulator connected to CPI, you can execute various commands related to the emulator. However, this method requires that each hardware be mounted on the emulator according to the type of CPI, and there is a problem in that the hardware and the emulator are expensive, and thus cannot be easily used. Accordingly, an object of the present invention is to provide a low-cost program execution time measuring apparatus that can be applied to all the general purpose microprocessor to solve the defects caused by the conventional program execution time measuring circuit as described above.
Description
제1도는 종래의 프로그램 실행시간 측정회로도.1 is a conventional program execution time measurement circuit diagram.
제2도는 본 고안의 프로그램 실행시간 측정회로도.2 is a program execution time measurement circuit diagram of the present invention.
* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings
1 : 씨피유 보드 2 : 에뮬레이터1: CPI board 2: emulator
3 : 모니터 4 : 피씨3: monitor 4: PC
10,11 : 비교기 12 : 카운터10,11: comparator 12: counter
13 : 디코더 14 : 세그먼트13: decoder 14: segment
15 : 클럭 발생부15: clock generator
본 고안은 롬 프로그램의 수행시간 측정에 관한 것으로, 특히 실시간 처리 프로그램에서 각 모듈의 수행시간측정에 적당하도록 한 프로그램 실행시간 측정회로에 관한 것이다.The present invention relates to measurement of the execution time of a ROM program, and more particularly, to a program execution time measurement circuit adapted to measure the execution time of each module in a real-time processing program.
일반적으로 롬(ROM)화된 프로그램의 수행시간을 각 모듈별로 측정하는데 있어서 실시간을 요하는 프로그램은 프로그램의 실행시간이 매우 중요하다.In general, in order to measure the execution time of a ROM-programmed program for each module, the execution time of the program is very important.
과거의 실시간 처리 프로그램은 각 모듈이 순차적으로 실행되는 구조이므로 프로그램의 스텝수를 계산하여 각각의 실행시간을 측정하기가 쉬웠다.In the past, since the real-time processing program is a structure in which each module is executed sequentially, it is easy to measure the execution time by calculating the number of steps of the program.
그러나, 현재의 실시간 처리 프로그램은 멀티-태스킹 구조를 갖기 때문에 각 모듈의 실행시간을 측정하기가 어려운 단점이 있다.However, the current real-time processing program has a disadvantage in that it is difficult to measure the execution time of each module because it has a multi-tasking structure.
종래에는 이러한 프로그램의 실행시간을 측정하기 위하여 에뮬레이터(2)라는 계측장비를 이용하게 되는데, 이 구성은 제1도와 같이 테스트하려는 마이크로 프로세서(1)에 맞는 에뮬레이터(2)를 마이크로 프로세서(1)의 소켓에 연결하며 상기 에뮬레이터(2)는 에뮬레이터 제어 소프트웨어가 인스톨(install)된 피씨(4)에 직렬 또는 병렬로 연결된다.Conventionally, a measuring device called an emulator 2 is used to measure the execution time of such a program. The configuration of the microprocessor 1 includes an emulator 2 suitable for the microprocessor 1 to be tested as shown in FIG. The emulator 2 is connected in series or in parallel with the PC 4 on which the emulator control software is installed.
이러한 장치는 테스트하려는 씨피유(1)에 에뮬레이터(2)가 연결된 상태에서 에뮬레이터(2)의 제어 프로그램이 실장된 피씨(4)를 실행시키면 에뮬레이터(2)에 관련된 여러 명령어를 수행할 수 있다.Such a device can execute various commands related to the emulator 2 by executing the PC 4 in which the control program of the emulator 2 is mounted while the emulator 2 is connected to the CPI 1 to be tested.
이때, 프로그램의 시작과 끝 어드레스를 입력하고 해당 명령어를 수행하면 그 결과가 피씨(4)의 모니터(3)로 출력된다.At this time, when the start and end addresses of the program are input and the corresponding command is executed, the result is output to the monitor 3 of the PC 4.
그러나, 이러한 방법은 씨피유(1)의 종류에 따라서 각각의 하드웨어를 에뮬레이터(2)에 장착해야 하며, 해당 하드웨어와 에뮬레이터(2)의 가격이 고가이므로 쉽게 사용할 수 없는 문제가 있다.However, this method requires mounting each hardware to the emulator 2 according to the type of CPI 1, and there is a problem in that the hardware and the emulator 2 are expensive and cannot be easily used.
이에 따라, 본 고안의 목적은 상기와 같은 종래의 프로그램 실행시간 측정회로에 따르는 결함을 해결하기 위하여 범용 마이크로 프로세서에 모두 적용할 수 있는 저가형의 프로그램 실행시간 측정회로를 제공하는데 있다.Accordingly, an object of the present invention is to provide a low-cost program execution time measurement circuit that can be applied to all of the general purpose microprocessor to solve the defects caused by the conventional program execution time measurement circuit as described above.
제2도는 본 고안에 따른 프로그램 실행시간 측정장치에 대한 구성도로서 이에 도시한 바와 같이, 롬에 억세스시 씨피유(도면 미표시)로부터 롬 어드레스(A0∼A15)를 입력받아 이를 측정 시작 어드레스와 비교하는 비교기(11)의 일측 입력에 프로그램 시작 어드레스를 세팅하기 위한 스위치(SW1)가 연결되고, 롬에 억세스시 씨피유로부터 롬 어드레스(A0∼A15)를 입력받아 이를 측정 종료 어드레스와 비교하는 비교기(10)의 일측 입력단에 측정종료 어드레스를 세팅하기 위한 스위치(SW2)가 연결되며, 상기 비교기(10,11)의 출력(A=B)은 각기 앤드 게이트(AD10,AD11)에서 논리조합되어 플립플롭(FF10,FF11)으로 입력된다.2 is a block diagram of a program execution time measuring apparatus according to the present invention, as shown therein, when ROM accesses ROM addresses A0 to A15 from CPI (not shown), and compares them with the measurement start address. A switch SW1 for setting a program start address is connected to an input of the comparator 11, and a comparator 10 which receives a ROM address A0 to A15 from CPI when the ROM is accessed and compares it with a measurement end address. A switch SW2 for setting a measurement end address is connected to one input terminal of the output terminal, and the outputs A = B of the comparators 10 and 11 are logically combined at the AND gates AD10 and AD11, respectively, to flip-flop FF10. , FF11).
플립플롭(FF10,FF11)과 배타적 오아게이트(XOR10) 및 앤드 게이트(AD12)로 구성되는 클럭 발생부(15)의 출력이 프로그램의 시작과 종료사이의 경과시간을 카운트하는 카운터(12)에 입력되고 상기 카운터(12)의 출력신호를 10진 데이타로 디코딩하는 디코더(13)가 프로그램의 경과시간을 표시하기 위한 세그먼트(14)에 결합된다.The output of the clock generator 15, which is composed of the flip-flops FF10 and FF11, the exclusive oragate XOR10 and the AND gate AD12, is input to the counter 12 which counts the elapsed time between the start and end of the program. And a decoder 13 for decoding the output signal of the counter 12 into decimal data is coupled to a segment 14 for indicating the elapsed time of the program.
상기와 같이 구성한 본 고안의 프로그램 실행시간 측정회로에 대하여 그 작용과 효과를 상세히 설명하면 다음과 같다.Referring to the operation and effects of the program execution time measurement circuit of the present invention configured as described above in detail as follows.
먼저, 측정하려는 프로그램의 시작 어드레스와 종료 어드레스를 스위치(SW1,SW2)에 각각 세팅한다. 실행중인 씨피유는 어드레스 라인에 시작 어드레스(A0∼A15)를 싣고 동시에 *RD와 *CS 신호를 출력하면, 비교기(11)의 비교 입력 데이타가 서로 같기 때문에 상기 비교기(11)의 출력(A=B)은 로우에서 하이가 되며, *RD와 *CS는 노아 게이트(NR10)에 입력되어 하이를 출력하고 이 신호는 상기 비교기(11)의 출력(A=B)과 조합되어 앤드 게이트(AD11)에서 하이의 신호가 발생한다.First, the start address and the end address of the program to be measured are set in the switches SW1 and SW2, respectively. The CPI being executed puts the start addresses A0 to A15 on the address line and simultaneously outputs the * RD and * CS signals, so that the comparison input data of the comparator 11 are the same, so that the output of the comparator 11 (A = B ) Goes from low to high, and * RD and * CS are inputted to the NOR gate NR10 to output high, and this signal is combined with the output of the comparator 11 (A = B) to produce an AND gate AD11. A high signal is generated.
이 신호는 플립플롭(FF10)의 클럭단(CLK)에 입력되어 그 출력(Q)을 하이로 만든다.This signal is input to the clock stage CLK of the flip-flop FF10 to make its output Q high.
이때, 상기 플립플롭(FF10)의 반전출력(/Q)은 로우를 출력하며 이 데이타는 플립플롭(FF11)의 클리어 단자(CLEAR)에 입력되어 그 출력(Q)을 로우로 만든다.At this time, the inverted output / Q of the flip-flop FF10 outputs a low and this data is input to the clear terminal CLEAR of the flip-flop FF11 to make the output Q low.
플립플롭(FF10)의 출력(Q)과 플립플롭(FF11)의 출력(Q)이 각각 하이와 로우인 상태이므로 배타적 오아 게이트(XOR10)의 출력은 하이가 되어 기준클럭(REF-CLOCK)과 앤드 게이트(AD12)에 입력된다.Since the output Q of the flip-flop FF10 and the output Q of the flip-flop FF11 are high and low, respectively, the output of the exclusive OR gate XOR10 becomes high so that the reference clock REF-CLOCK and It is input to the gate AD12.
따라서, 카운터(12)의 클럭(CLK)에 기준클럭(REF-CLOCK)이 입력되어 카운트가 시작된다.Accordingly, the reference clock REF-CLOCK is input to the clock CLK of the counter 12 and the counting starts.
계속 카운트가 진행되는 중에 종료 어드레스가 비교기(10)의 입력단으로 입력되면, 시작 어드레스가 체크되었을 때와 마찬가지로 비교기(10)는 그 입력단(A,B)의 두 신호가 하이이므로 그 출력이 하이가 되며, 결과적으로 플립플롭(FF11)의 출력(Q)이 하이가 되어 배타적 오아 게이트(XOR10)의 출력은 로우가 된다.If the end address is input to the input of the comparator 10 while the count continues, the comparator 10 has a high output because the two signals of the input terminals A and B are high, similar to when the start address is checked. As a result, the output Q of the flip-flop FF11 becomes high and the output of the exclusive OR gate XOR10 becomes low.
그리고 앤드 게이트(AD12)의 출력은 기준클럭(REF-CLOCK)과 무관하게 로우의 신호를 출력하게 되며, 카운터(12)는 더이상 카운트를 하지 않게 된다.The output of the AND gate AD12 outputs a low signal regardless of the reference clock REF-CLOCK, and the counter 12 no longer counts.
이때, 상기 카운터(12)의 출력(Q0∼Q19)은 10진 디코더(13)로 입력되어 세그먼트(14)에 숫자를 표시하기 위한 데이타로 디코딩되어 7-세그먼트(14)를 통해 현재의 카운트값을 표시하게 된다.At this time, the outputs Q0 to Q19 of the counter 12 are input to the decimal decoder 13 and decoded into data for displaying a number in the segment 14, and thus the current count value through the 7-segment 14. Will be displayed.
이때, 표시된 값을 기준클럭(REF-CLOCK)의 주파수로 나누면 프로그램의 시작 어드레스와 종료 어드레스 사이의 실행시간이 된다. 측정이 끝난 후 다시 실행할 때에는 리세트 스위치(SW3)를 동작시켜 플립플롭(FF10)을 클리어시키고 카운터(12)의 리세트 입력(RESET)에 로우의 펄스를 인가하여 리세트시키게 된다.At this time, dividing the displayed value by the frequency of the reference clock (REF-CLOCK) is the execution time between the start address and the end address of the program. When the measurement is executed again after the measurement is completed, the reset switch SW3 is operated to clear the flip-flop FF10 and reset by applying a low pulse to the reset input RESET of the counter 12.
따라서, 종래에는 마이크로 프로세서의 종류에 따라 각각의 에뮬레이터를 필요로 하지만 본 고안에서는 마이크로 프로세서와 메모리의 사이의 어드레스 라인을 이용하여 측정하려는 프로그램의 시작 어드레스와 종료 어드레스를 찾아서 시간을 카운트함으로써 어떠한 범용 마이크로 프로세서에 적용할 수 있게 된다.Therefore, conventionally, each emulator is required according to the type of microprocessor, but in the present invention, by using the address line between the microprocessor and the memory, the start address and end address of the program to be measured are counted and counted. Applicable to the processor.
이상에서와 같이 본 고안은 범용 마이크로 프로세서에 모두 적용할 수 있는 저가형의 프로그램 시간 측정장치를 제공하는 효과가 있다.As described above, the present invention has an effect of providing a low-cost program time measuring apparatus that can be applied to all general-purpose microprocessors.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR2019930008713U KR0128219Y1 (en) | 1993-05-21 | 1993-05-21 | Program execution time measure circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR2019930008713U KR0128219Y1 (en) | 1993-05-21 | 1993-05-21 | Program execution time measure circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
KR940027365U KR940027365U (en) | 1994-12-10 |
KR0128219Y1 true KR0128219Y1 (en) | 1998-12-15 |
Family
ID=19355723
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR2019930008713U KR0128219Y1 (en) | 1993-05-21 | 1993-05-21 | Program execution time measure circuit |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR0128219Y1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR19980013834A (en) * | 1996-08-03 | 1998-05-15 | 구자홍 | The program execution time detection circuit of the microprocessor |
-
1993
- 1993-05-21 KR KR2019930008713U patent/KR0128219Y1/en not_active IP Right Cessation
Also Published As
Publication number | Publication date |
---|---|
KR940027365U (en) | 1994-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0530816A2 (en) | Microprocessor with cache memory and trace analyzer therefor | |
KR0128219Y1 (en) | Program execution time measure circuit | |
US4346346A (en) | Instrument for measuring true-RMS A.C. voltage and A.C. voltage fluctuations | |
US7076418B1 (en) | Method and device for system simulation of microcontrollers/microprocessors and corresponding peripheral modules | |
JP2760228B2 (en) | Microprocessor with built-in cache memory and its trace analyzer | |
JPS594051B2 (en) | One-chip microprocessor test processing method | |
JP2563204B2 (en) | Dynamic bus size detection circuit | |
US20040107388A1 (en) | Microcomputer | |
JPH11102306A (en) | Emulator | |
SU1275452A1 (en) | Device for debugging programs | |
JPH04178840A (en) | Performance measuring system | |
SU1363218A1 (en) | Program-debugging device | |
JPH10171678A (en) | Emulator | |
SU1654981A2 (en) | "1 from n" code controller | |
SU1589078A1 (en) | Device for measuring temperature | |
JPH0357970A (en) | Pulse input apparatus | |
SU1591015A1 (en) | Device for monitoring electronic units | |
JPS6284348A (en) | Microcomputer | |
KR950013602B1 (en) | Frequency measuring device | |
SU1366964A1 (en) | Harmonic factor digital meter | |
JP2786033B2 (en) | Time measuring device | |
JP2775830B2 (en) | Instruction frequency measurement method | |
JPS6211748B2 (en) | ||
JPS6248865B2 (en) | ||
JPS63181045A (en) | Data processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E701 | Decision to grant or registration of patent right | ||
REGI | Registration of establishment | ||
LAPS | Lapse due to unpaid annual fee |