KR960003052B1 - Microprocessor having cashe memory unit - Google Patents

Microprocessor having cashe memory unit Download PDF

Info

Publication number
KR960003052B1
KR960003052B1 KR1019920009281A KR920009281A KR960003052B1 KR 960003052 B1 KR960003052 B1 KR 960003052B1 KR 1019920009281 A KR1019920009281 A KR 1019920009281A KR 920009281 A KR920009281 A KR 920009281A KR 960003052 B1 KR960003052 B1 KR 960003052B1
Authority
KR
South Korea
Prior art keywords
cache memory
interruption
data
entry
microprocessor
Prior art date
Application number
KR1019920009281A
Other languages
Korean (ko)
Other versions
KR920022105A (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 니뽄 덴끼 가부시끼가이샤
Publication of KR920022105A publication Critical patent/KR920022105A/en
Application granted granted Critical
Publication of KR960003052B1 publication Critical patent/KR960003052B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/28Error detection; Error correction; Monitoring by checking the correct order of processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

내용 없음.No content.

Description

내장된 캐쉬 메모리 유니트를 가진 마이크로프로세서Microprocessor with Internal Cache Memory Unit

제1도는 본 발명의 마이크로프로세서에 내장된 메모리 캐쉬 유니트의 구조를 나타내는 블럭 다이어그램.1 is a block diagram showing the structure of a memory cache unit embedded in a microprocessor of the present invention.

제2도는 본 발명의 마이크로프로세서의 전체 구조를 나타내는 블럭 다이어그램.2 is a block diagram showing the overall structure of a microprocessor of the present invention.

제3도는 본 발명의 마이크로프로세서를 사용하는 프로그램 디버깅 시스템의 구조를 나타내는 블럭 다이어그램.3 is a block diagram showing the structure of a program debugging system using the microprocessor of the present invention.

제4도는 본 발명의 마이크로프로세서에 내장된 메모리 캐쉬 유니트의 제2구조예를 나타낸 블럭 다이어그램.4 is a block diagram showing a second structural example of a memory cache unit built in the microprocessor of the present invention.

제5도는 본 발명의 마이크로프로세서의 메모리 캐쉬 유니트의 동작을 설명하는 플로챠트도.5 is a flowchart for explaining the operation of the memory cache unit of the microprocessor of the present invention.

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

150 : 인터럽트 제어회로 200 : 마이크로프로세서150: interrupt control circuit 200: microprocessor

210 : 프리페치 유니트 220 : 디코딩 유니트210: prefetch unit 220: decoding unit

230 : 프로세싱 실행 유니트 240 : 유효 어드레스 계산 유니트230: processing execution unit 240: valid address calculation unit

250 : 버스 사이클 제어 유니트 260 : 명령 캐쉬 메모리 유니트250: bus cycle control unit 260: instruction cache memory unit

270 : 데이타 캐쉬 메모리 유니트 310 : 메모리 장치270: data cache memory unit 310: memory device

320 : 디버깅 장치320: debugging device

본 발명은 명령 코드 또는 메모리 오퍼랜드를 나타내는 데이타를 캐쉬화 하는 캐쉬 메모리 유니트가 내장된 마이크로프로세서에 관한 것으로, 특히 프로그램을 디버깅하는 동안 캐쉬 메모리 유니트에 저장된 데이타의 트랩 인터럽션(trap interruption)을 가능케 하는 마이크로프로세서에 관한 것이다.The present invention relates to a microprocessor incorporating a cache memory unit for caching data representing instruction code or memory operands, and in particular to enabling trap interruption of data stored in the cache memory unit while debugging a program. It relates to a microprocessor.

[종래기술][Private Technology]

다음은 마이크로프로세서로 프로그램을 개발하는 동안이나 또는 다소의 문제가 시스템안에서 발견될때 사용되는 분리된 디버깅 방법이 기술된다.The following describes a separate debugging method used during program development with a microprocessor or when some problem is found in the system.

제1방법은 추적 기법(Tracing)이다. 이 추적 기법으로, 프로그램 실행 위치를 나타내는 데이타 또는 메모리/오퍼랜드로의 액세스에 관련된 데이타를 수집하고 이러한 데이타를 어셈블링하므로써 명령어 실행 또는 오퍼랜드/액세스의 시퀀스(순서)를 찾아내는 것이 가능하다. 전술된 데이타는 일반적으로 외부 마이크로프로세서 단자에서 관측할 수 있는 버스/사이클 어드레스, 데이타, 및 상태(status)로 구성된다.The first method is tracing. With this tracing technique, it is possible to find out the sequence (order) of instruction execution or operand / access by gathering data representing program execution locations or data related to access to memory / operland and assembling such data. The data described above generally consists of bus / cycle addresses, data, and statuses that can be observed at external microprocessor terminals.

이런 프로세스는 데이타가 단지 외부적으로만 수집된다는 사실로 인해 어떠한 특별한 마이크로프로세서 기능도 필요로 하지 않고 마이크로프로세서의 동작과도 아무런 관련도 없이 가능하다. 게다가, 디버깅되야할 프로그램의 실행과 관련하여, 인터럽션/예외(exception)를 유발하거나 또는 버스/사이클을 기다릴 필요가 없기 때문에, 그 타이밍이 디버깅 상태와 비디버깅 상태 사이에서 다르지 않다는 사실의 결점이 존재한다. 이것은, 디버깅되는 프로그램과 관련하여, 단순히 특별한 상황 검출에 의해 초래되는 어떠한 인터럽션(중단)도 존재하지 않기 때문에 프로그램의 상태를 단순히 조사하는 수동적인 방법이다.This process does not require any special microprocessor functionality due to the fact that data is collected only externally and is not related to the operation of the microprocessor. In addition, with respect to the execution of the program to be debugged, there is no need to cause interruptions / exceptions or wait for the bus / cycle, so that the timing is not different between the debugging state and the non-debugging state. exist. This is a passive way of simply examining the state of a program as there is no interruption caused by a particular situation detection, simply with respect to the program being debugged.

제2방법은 트래핑 방식(Trapping)이다. 트래핑 방식에 있어서, 제어는 디버깅 프로그램(이후에서 “디버깅”으로 지칭됨)으로 전해지고, 매우 정밀한 디버깅이 실행되며, 이것은 모두 앞서 결정된 특별한 어드레스 명령 코드 또는 메모리/오퍼랜드에 대한 액세스가 존재한다는 사실로부터 가능하다.The second method is Trapping. In the trapping scheme, control is passed to the debugging program (hereinafter referred to as “debugging”), and very precise debugging is performed, all from the fact that there is access to a special address instruction code or memory / operland determined previously. Do.

추적 기법과 다른 점은, 이 방법이 필요한 시기에 제어를 디버깅으로 전송시키므로써 디버깅을 실행할 수 있다는 장점을 갖는다는 것이다. 그러나, 결정된 어드레스와 관련하여 정확하게 인터럽션 예외를 발생시키기 위해서는 (예컨대, 세트 어드레스로 명령 코드를 실행한 후 즉시 또는 실행 바로전에) 디버깅을 제어로 전송시키는 하드웨어 타입의 메카니즘(통상적으로 트래핑 인터럽션으로 불림)이 요구된다.게다가, 상기 방법은 다음과 같은 결점을 갖는다. 즉, 정확한 프로그램 실행 시퀀스를 알 필요가 있고, 상기 트래핑 과정이 예정된 대로 세트될 수 없을 때 프로그램 실행을 인터럽트 할 수 없다는 것이다.The difference with the tracing technique is that it has the advantage of enabling debugging by transferring control to debugging when it is needed. However, in order to correctly generate an interruption exception with respect to the determined address (e.g. immediately after or immediately after execution of the instruction code with the set address) a hardware type of mechanism (usually trapping interruption) that transfers debugging to control. In addition, the method has the following drawbacks. In other words, it is necessary to know the exact program execution sequence and cannot interrupt program execution when the trapping process cannot be set as scheduled.

제3방법은 단일 단계이다. 이 단일 단계에서, 각 명령의 실행시에 제어가 디버거(debugger)로 전송되어 마이크로프로세서의 내부 상태(범용 레지스터, 프로세서/상태(status)/워드(PSW), 프로그램/카운터(PC),등) 가 종종 디스플레이되며, 그에 따라 내용의 일부가 동시에 변경되면서 프로그램의 실행이 행해진다.The third method is a single step. In this single step, control is transferred to the debugger at the execution of each instruction so that the microprocessor's internal state (general purpose registers, processor / status / word (PSW), program / counter (PC), etc.) Is often displayed so that the execution of the program is done while some of the content is changed at the same time.

마이크로프로세서의 내부 상태가 명령 실행시 이해될 수 있다는 사실로 인해 실행 진행을 매우 상세히 포착할 수 있다. 한편, 마이크로프로세서 자체내에서 단일 명령이 실행되는 시점에서 인터럽션/예외를 발생시키고, 제어를 디버거로 전송하기 위한 하드웨어형 메카니즘(일반적으로 단일 단계 인터럽션으로 불림)이 요구되며, 이때 마이크로프로세서는 전혀 실행될 수 없다. 게다가, 이 방법은 각 명령마다 제어가 디버거로 시프트되는 사실로 인해 실행 효율이 저하되며, 타이밍 그리티컬 처리(예를들면 ; 타이머/루틴, 등)가 디버깅으로 실행될 수 없다는 사실과, 내부 동작 타이밍이 디버깅과 비디버깅 시간 사이에서 완전히 다르다는 사실의 결점들을 갖는다.The fact that the internal state of the microprocessor can be understood at the time of instruction execution allows us to capture execution progress in great detail. On the other hand, a hardware type mechanism (generally called single-step interruption) is required to generate interruptions / exceptions and transfer control to the debugger when a single instruction is executed within the microprocessor itself. It can't be run at all. In addition, this method reduces execution efficiency due to the fact that control is shifted into the debugger for each instruction, the fact that timing critical processing (eg; timers / routines, etc.) cannot be executed by debugging, and internal operation timing. It has the drawbacks of being completely different between this debugging and non-debugging time.

각각의 디버깅 방법은 위에서 언급된 바와같은 장점과 약점을 가지기 때문에, 상기 방법은 통상적으로 이하의 방식과 같이 조합된다. 1) 추적 모드를 사용함에 의해 명령이 실행되는 실제의 시퀀스를 결정하는 방식. 2) 트랩 기능에 의해 문제점이 발생되는 영역에서 제어를 디버거로 전송하는 방식. 3) 상기 단일 단계 기능을 통해 한번에 한 명령씩 상기 명령 실행 상황을 주의 깊게 추적하는 단계.Since each debugging method has the advantages and disadvantages as mentioned above, the methods are usually combined as follows. 1) A way of determining the actual sequence in which the instruction is executed by using the tracking mode. 2) Transfer of control to the debugger in the area where the problem occurs due to the trap function. 3) carefully tracking the instruction execution status one instruction at a time through the single step function.

그러므로, 상기 트랩 기능은 효과적인 프로그램 디버깅을 행하는데 필수적인 기능이다.Therefore, the trap function is an essential function for effective program debugging.

위에서 언급된 바와같이, 상기 트랩 기능을 실현시키기 위해 특별한 하드웨어가 마이크로프로세서 안에서 요구되지만, 단일 단계와 상기 디버거안에서의 소프트웨어 처리를 통해 서브로게이션(subrogation)이 달성된다.As mentioned above, special hardware is required in the microprocessor to realize the trap function, but subrogation is achieved through a single step and software processing in the debugger.

트랩 기능이 지정될 때, 단일 단계 인터럽션이 설정되며, 디버거가 디버깅 될 프로그램의 단일 명령이 실행될때 제어로 복귀된다. 그때 마이크로프로세서의 내부의 이베큐에이션(evacuation)과 동시에, 미리 설정된 트랩 상태가 이행되는지 여부에 대한 체크가 이루어진다. 예컨대, 특별한 어드레스 명령 코드와 관련하여 트랩이 설정되는 경우, 상기 이베큐에이션된 프로그램 카운터 내용을 통해 비교가 행해진다. 게다가, 특정 어드레스의 메모리 엑세스와 관련하여 트랩이 설정되는 경우, 상기 이베큐에이션된 프로그램 카운터에 의해 드러난 상기 명령 코드가 분석되며, 이 명령이 메모리 액세스를 수반하는 경우, 상기 이베큐에이션된 범용 레지스터 값 등을 사용하여 상기 대상 메모리 어드레스를 계산하므로써 비교가 행해진다.When the trap function is specified, single-level interruption is set, and the debugger returns to control when a single command of the program to be debugged is executed. At the same time, at the same time as evacuation of the microprocessor, a check is made as to whether a preset trap state is implemented. For example, when a trap is set in connection with a special address command code, a comparison is made through the contents of the evolved program counter. In addition, when a trap is established in connection with memory access of a particular address, the instruction code revealed by the evolved program counter is analyzed and, if the instruction entails memory access, the evolved general purpose register. The comparison is performed by calculating the target memory address using a value or the like.

미리 설정된(preset) 트랩 조건을 만족하고 있지 않으면, 제어가 최초 프로그램으로 옮겨지며 동시에 상기 이베큐에이션된 내부를 복귀시킨다. 이때 디버깅되는 프로그램은, 상기 디버거가 유저에 디버깅 상태(status)의 어떠한 것도 출력(예를들면, 메시지)시키지 않기 때문에 어떠한 방식의 영향도 받지 않는다고 인식된다. 한편, 상기 미리 설정된 트랩 조건이 만족되고 있는 경우, 상기 디버거는 유저에게 상기 트랩이 발생된 사실을 출력하고, 단일 단계 인터럽션의 차후 발생이 해제된다.If the preset trap condition is not met, control transfers to the original program and at the same time returns the evolved interior. The program to be debugged at this time is recognized to be unaffected in any way because the debugger does not output (eg, message) any of the debugging status to the user. On the other hand, when the preset trap condition is satisfied, the debugger outputs the fact that the trap is generated to the user, and subsequent generation of single-step interruption is canceled.

위에서 기술된 바와같이, 마이크로프로세서 자체내에서 트랩 인터럽션 기능이 존재하지 않는 경우에도 유사적인 트랩 기능을 실현할 수 있다. 그러나, 단일 단계 인터럽션이 하나씩, 각각의 명령에 대해 사용되기 때문에, 트랩 조건이 실현될 때까지, 효율은 매우 불량하다.As described above, a similar trap function can be realized even when there is no trap interruption function in the microprocessor itself. However, since a single step interruption is used for each instruction, one by one, the efficiency is very poor until the trap condition is realized.

프로그래밍 디버깅 시스템에서 트랩 기능의 구체적인 설명은 다음과 같다. 한편에 외부 메모리 장치 및 다른편에 마이크로프로세서와 디버깅 장치가 버스를 경유해 접속되는 시스템을 전제로 한다.The following is a detailed description of the trap function in a programming debugging system. On the other hand, it is assumed that a system in which an external memory device and a microprocessor and a debugging device on the other side are connected via a bus.

디버깅 장치에는, 트랩 인터럽션을 발생시키는 어드레스를 설정하는 트랩 어드레스 레지스터, 트랩 인터럽션을 발생시키는 버스/사이클 종류를 설정하는 트랩 사이클 레지스터, 어드레스 값 및 트랩 어드레스 레지스터의 내용을 비교하고 그들이 동등한지를 결정하는 어드레스 비교기, 상태 데이타 및 트랩 사이클 레지스터의 내용을 비교하고 그들이 동등한지를 결정하는 상태 비교기, 및 상기 어드레스 비교기 및 상기 상태 비교기로부터의 출력을 경유해 트랩 인터럽션 요구 신호를 발생시키는 트랩 신호 발생 회로가 모두 설치된다.The debugging device compares the contents of the trap address register setting the address causing the trap interruption, the trap cycle register setting the bus / cycle type causing the trap interruption, the address value and the trap address register and determines whether they are equivalent. A state comparator that compares the contents of the address comparator, the state data and the trap cycle register and determines whether they are equivalent, and a trap signal generation circuit for generating a trap interruption request signal via outputs from the address comparator and the state comparator. All are installed.

디버깅 장치로부터 나오는 트랩 인터럽션 요구 신호는 마이크로프로세서 트랩 인터럽션 요구 단자에 접속된다. 마이크로프로세서가 신호를 발생할 때, 어드레스 및 상태 신호값과 디버깅 장치에 의해 미리 설정된 어드레스 및 상태는 비교된다. 비교가 동등하다고 할 때, 트랩 인터럽션 단자에 트랩 인터럽션 요구 신호를 통지하며 상기 요구 신호는 버스 사이클의 종료시에 마이크로프로세서내에 저장된다. 상기 버스 사이클이 마이크로프로세서 내에서 사용될 때, 트랩 인터럽션이 발생되고, 마이크로프로세서는 제어를 디버거(debugger)로 전송한다.The trap interruption request signal from the debugging device is connected to the microprocessor trap interruption request terminal. When the microprocessor generates a signal, the address and status signal values are compared with the address and status preset by the debugging device. When the comparisons are equivalent, a trap interruption request signal is sent to the trap interruption terminal and the request signal is stored in the microprocessor at the end of the bus cycle. When the bus cycle is used within a microprocessor, a trap interruption occurs and the microprocessor transfers control to a debugger.

전술한 바와 같이, 트랩 가능을 기능하게 하기 위해, 디버깅 장치는 마이크로프로세서에서 나온 버스 사이클에 동기해서 출력된 어드레스 및 상태를 연속적으로 비교해야 한다.As mentioned above, to enable trapping, the debugging device must continuously compare the address and state output in synchronization with the bus cycle from the microprocessor.

프로세싱 성능을 개선시키기 위해, 마이크로프로세서는 명령 코드를 캐쉬화 하는 명령 캐쉬 메모리와 메모리 오퍼랜드를 캐쉬화하는 데이타 캐쉬 메모리를 내장하는 것이 고려되고 있다. 내장된 캐쉬 메모리에서, 마이크로프로세서에 의해 요구된 메모리 데이타(명령 코드 및 메모리 오퍼랜드의 양자)가 캐쉬 메모리에 기입될 때(데이타가 기록될때), 저속의 외부 메모리에 액세스하기 위한 버스 사이클을 발생시킬 필요가 없다는 사실때문에 고속의 프로세싱이 얻어질 수 있다.To improve processing performance, it is contemplated that microprocessors include an instruction cache memory that caches instruction code and a data cache memory that caches memory operands. In the built-in cache memory, when memory data (both instruction code and memory operands) requested by the microprocessor is written to the cache memory (when data is written), it may generate a bus cycle to access the low speed external memory. Due to the fact that it is not necessary, high speed processing can be obtained.

그 구조를 갖는 마이크로프로세서에서, 외부 메모리에 액세스하기 위한 버스 사이클은 다음과 같이 제한된다.In the microprocessor having the structure, the bus cycle for accessing the external memory is limited as follows.

명령 캐쉬 메모리내에 기입되지 않은 명령 코드를 액세스한 경우 (즉, 미스히트(miss-hit)의 경우)에 발생되는 대체 버스 사이클, 데이타 캐쉬 메모리의 판독 중에 기입되지 않은 오퍼랜드 데이타를 액세스한 경우에 발생되는 대체 버스 사이클, 데이타 캐쉬 메모리의 판독동안 외부 메모리와 관련해 일관성을 유지시키는데 필요한 라이트 사이클(light cycle). 따라서, 마이크로프로세서 내부의 프로세싱이 진행된다 할지라도, 트랩 기능을 가능케 하는 디버깅 장치는 버스 사이클이 외부적으로 나타나지 않는다는 사실때문에 실현될 수 없다. 예를 들어, 국소의 프로그램 영역에 대응하는 모든 명령 코드가 상기 명령 캐쉬 메모리에 의해 캐쉬되는 경우에 명령 코드 페치에 대응하는 버스 사이클이 발생되지 못하는 사실때문에 상기 영역의 프로세싱 기간동안 그 영역에 대응하는 어드레스에 대해 트랩 인터럽션이 행해질 수 없다.Alternate bus cycles that occur when an instruction code that is not written in the instruction cache memory is accessed (i.e., miss-hit), or when an operand data that is not written during data cache memory read is accessed. Alternate bus cycles, which are the light cycles required to maintain consistency with external memory during reading of the data cache memory. Thus, even if processing inside the microprocessor proceeds, the debugging device that enables the trap function cannot be realized due to the fact that the bus cycle does not appear externally. For example, if all instruction codes corresponding to a local program region are cached by the instruction cache memory, the bus cycle corresponding to instruction code fetch does not occur due to the fact that the region corresponds to that region during processing of the region. Trap interruption cannot be done for addresses.

전술한 문제를 피하기 위해, 디버깅 동안 명령 캐쉬 메모리 동작을 불허가 상태로 전환하는 대응 방법이 제안된다. 그러나, 상기의 경우 마이크로프로세서의 동작이 디버깅시와 캐쉬화 기능을 허가 상태로 하는 실제 프로세싱시에 서로 상이하기 때문에, 정확한 디버깅을 행할 수 없는 문제가 존재한다.In order to avoid the above-mentioned problem, a countermeasure is proposed to switch the instruction cache memory operation to an unallowed state during debugging. However, in the above case, since the operation of the microprocessor is different from each other at the time of debugging and the actual processing in which the caching function is allowed, there is a problem that accurate debugging cannot be performed.

[발명의 개요][Overview of invention]

본 발명의 목적은 캐쉬 메모리와 충돌하는 메모리 데이타에 대해서도 정확한 트랩 인터럽션을 가능케 하며, 이에 따라 프로그램의 국소성 또는 다른 특성에도 불구하고, 모든 명령 코드 및 메모리 오퍼랜드에 대한 트랩 인터럽션을 적용할 수 있기 때문에 단순하고 효율있는 프로그램 디버깅을 할 수 있는 내장된 캐쉬 메모리 유니트를 갖는 마이크로프로세서를 제공하는데 있다.An object of the present invention is to enable accurate trap interruption even for memory data that collides with cache memory, so that trap interruption for all instruction codes and memory operands can be applied, despite locality or other characteristics of the program. It is therefore to provide a microprocessor with a built-in cache memory unit for simple and efficient program debugging.

다른 목적은 인터럽션 데이타를 상기 캐쉬 메모리에 전달하여 트랩 인터럽션 제어를 행하며, 본래의 프로그램 실행과 같은 프로세싱 시간으로 트랩 기능을 가능케 하는 내장된 캐쉬 메모리 유니트를 갖는 마이크로 프로세서를 제공하는데 있다.Another object is to provide a microprocessor with an integrated cache memory unit that delivers interruption data to the cache memory to perform trap interruption control and enable a trap function at the same processing time as the original program execution.

상기 목적을 이루기 위한 본 발명의 양호한 실시예에 따라, 내장된 캐쉬 메모리 유니트를 갖는 마이크로프로세서는 데이타 처리를 위한 프로세싱 실행 장치, 외부 메모리로 액세스하는 버스 사이클을 구동하는 버스 사이클 제어장치, 상기 프로세싱 실행 장치에 의해 프로세스된 데이타를 캐쉬화하는 캐쉬 메모리 유니트를 포함하고, 상기 캐쉬 메모리 유니트는 어드레스 및 데이타를 저장하는 다수의 엔트리를 가진 캐쉬 메모리와, 인터럽션을 제어하는 인터럽션 제어 장치를 포함하며, 상기 캐쉬 메모리는 각 엔트리에 대해 적절한 엔트리가 인터럽션의 대상인지의 여부를 나타내는 인터럽션 데이타 영역을 가지며, 상기 인터럽션 제어 장치는 캐쉬 메모리 엔트리의 대체시에 인터럽션 요구 신호가 상기 버스 사이클에 동기하여 입력되는 경우 상기 캐쉬 메모리 엔트리의 상기 인터럽션 데이타 영역내에 인터럽션 할당 데이타를 레지스터하는 기능과, 상기 캐쉬 메모리 엔트리에 관련된 데이타 요구시에 상기 인터럽션 데이타 영역내에 인터럽션 할당 데이타가 있는지 여부를 판별한 후에 인터럽션 신호를 출력하는 기능을 갖는다.According to a preferred embodiment of the present invention for achieving the above object, a microprocessor having a built-in cache memory unit includes a processing execution device for data processing, a bus cycle control device for driving a bus cycle to access an external memory, the processing execution A cache memory unit for caching data processed by the device, the cache memory unit including a cache memory having a plurality of entries for storing addresses and data, and an interruption control device for controlling interruption, The cache memory has an interruption data area for each entry indicating whether an appropriate entry is the object of interruption, and the interruption control device synchronizes the interrupt request signal with the bus cycle upon replacement of the cache memory entry. If input by A function of registering interruption allocation data in the interruption data area of a memory entry, and determining whether there is interruption allocation data in the interruption data area when a data request relating to the cache memory entry is made; It has a function to output.

본 발명의 다른 양호한 실시예에 따라, 내장된 캐쉬 메모리 유니트를 갖는 마이크로프로세서는 명령 코드를 캐쉬화하는 제1캐쉬 메모리 유니트, 및 데이타를 캐쉬화하는 제2캐쉬 메모리 유니트를 포함한다.According to another preferred embodiment of the present invention, a microprocessor having an embedded cache memory unit includes a first cache memory unit for caching instruction code, and a second cache memory unit for caching data.

본 발명의 다른 양호한 실시예에 따라, 캐쉬 메모리 유니트의 캐쉬 메모리는 어드레스 저장 메모리 및 데이타 저장 메모리를 포함하고, 상기 어드레스 저장 메모리는 각 엔트리에 대한 인터럽션 데이타 영역을 갖는다.According to another preferred embodiment of the present invention, the cache memory of the cache memory unit includes an address storage memory and a data storage memory, wherein the address storage memory has an interruption data area for each entry.

본 발명의 또다른 양호한 실시예에 따라, 캐쉬 메모리 유니트의 캐쉬 메모리는 어드레스 저장 메모리 및 데이타 저장 메모리를 포함하며, 데이타 저장 메모리는 각 엔트리에 대해 인터럽션 데이타 영역을 가진다.According to another preferred embodiment of the present invention, the cache memory of the cache memory unit includes an address storage memory and a data storage memory, wherein the data storage memory has an interruption data area for each entry.

본 발명의 또다른 양호한 실시예에 따라 캐쉬 메모리 유니트는 캐쉬 메모리 엔트리 대체 시간동안에, 각 엔트리의 히스테리틱 데이타에 기초하여 대체에 필요한 엔트리를 선택하는 선택 장치를 갖는다.According to another preferred embodiment of the present invention, the cache memory unit has a selection device for selecting an entry required for replacement based on the hysteretic data of each entry during the cache memory entry replacement time.

본 발명의 또다른 양호한 실시예에 따라, 캐쉬 메모리는 엔트리가 각 엔트리에 대하여 유효한지 아닌지를 나타내는 데이타 저장 영역을 가진다.According to another preferred embodiment of the present invention, the cache memory has a data storage area indicating whether an entry is valid for each entry.

다음의 상세한 기술은 본 발명의 다른 목적, 특징 및 효과를 명확하게 할 것이다.The following detailed description will clarify other objects, features and effects of the present invention.

다음은 제1도 내지 제5도를 사용하여, 본 발명의 이상적인 예를 설명한다.The following describes an ideal example of the present invention using FIGS. 1 to 5.

먼저, 본 발명의 마이크로프로세서 전체구조는 제 2도의 활용을 통하여 나타난다. 제 2도에서처럼, 마이크로프로세서(200)는 프리페치 유니트(210), 디코딩 유니트(220), 프로세싱 실행 유니트(230), 유효 어드레스 계산 유니트(240), 버스 사이클 제어 유니트(250), 명령 캐쉬 메모리 유니트(260) 및, 데이타 캐쉬 메모리 유니트(270)로 구성된다. 명령 캐쉬 메모리 유니트(260)는 명령 코드 캐슁을 수행하며, 데이타 캐쉬 메모리 유니트(270)는 데이타(메모리 오퍼랜드)캐슁을 수행한다.First, the overall microprocessor structure of the present invention is shown through the use of FIG. As shown in FIG. 2, the microprocessor 200 includes a prefetch unit 210, a decoding unit 220, a processing execution unit 230, a valid address calculation unit 240, a bus cycle control unit 250, an instruction cache memory. A unit 260 and a data cache memory unit 270. The instruction cache memory unit 260 performs instruction code caching, and the data cache memory unit 270 performs data (memory operand) caching.

프리페치 유니트(210)에 데이타 단자(DBT)를 통해 프로페치된 명령 코드는 명령 캐쉬 메모리 유니트(260)에 의해 일단 캐쉬되고, 다음에 기억된다. 명령 캐쉬 메모리 유니트(260) 에 기억된 명령 코드는 디코딩 유니트로부터의 요구에 따라 디코딩 유니트(220)로 전달되며, 계속해서 명령 유니트의 제어 신호를 발생한다. 프로세싱 실행 유니트(230)는 범용 레지스터, 프로세싱 장치, 제어회로 등을 가지며, 상기 유니트는 디코딩 유니트(220)에 의해 발생하는 제어 신호에 관련하여 각 명령에 대하여 실행 프로세싱을 수행한다. 명령 코드에 상응하는 명령 기능에 부가하여, 실행 프로세싱에는 예외 및 인터럽션의 처리가 포함된다. 디코딩 유니트(220)의 요구에 대한 명령 코드가 명령 캐쉬 메모리 유니트(260)에 기억되어 있지 않을때, 프리페치 유니트(210)는 버스 사이클 제어 유니트(250)에 그 사실을 통보한다.The instruction code prefetched to the prefetch unit 210 via the data terminal DBT is once cached by the instruction cache memory unit 260 and then stored. The instruction code stored in the instruction cache memory unit 260 is transferred to the decoding unit 220 in response to a request from the decoding unit, and subsequently generates a control signal of the instruction unit. The processing execution unit 230 has a general purpose register, a processing device, a control circuit, and the like, which performs execution processing for each instruction in relation to the control signal generated by the decoding unit 220. In addition to the instruction function corresponding to the instruction code, execution processing includes handling exceptions and interruptions. When the instruction code for the request of the decoding unit 220 is not stored in the instruction cache memory unit 260, the prefetch unit 210 notifies the bus cycle control unit 250 of that fact.

데이타 캐쉬 메모리 유니트(270)는 버스 사이클 제어 유니트(250)와 병렬로 배치되며, 집적 처리 실행 유니트(230)와 캐쉬된 메모리 오퍼랜드 사이의 전송이 행해지게 된다. 프로세싱 실행 유니트(230)에 의해 요구되는 메모리/오퍼랜드가 데이타 캐쉬 메모리 유니트(270)에 없는 경우에, 메모리 어드레스는 유효 어드레스 계산 유니트(240)에 의해 계산되며, 버스 사이클 제어 유니트(250)에 통지된다.The data cache memory unit 270 is disposed in parallel with the bus cycle control unit 250, and transfer between the integrated processing execution unit 230 and the cached memory operand is performed. If the memory / operand required by the processing execution unit 230 is not in the data cache memory unit 270, the memory address is calculated by the valid address calculation unit 240 and notified to the bus cycle control unit 250. do.

버스 사이클 제어 유니트(250)는 통지 어드레스 및 요구의 종류에 따라 버스 사이클을 구동하며, 외부 메모리 장치로의 액세스가 얻어진다. 프리페치 유니트(210)로부터 나오는 요구가 있는 경우, 그 결과는 명령코드에 따른 명령페치 버스 사이클이다. 프로세싱 실행 유니트(230)로부터의 요구의 경우에 있어서, 그 결과는 메모리 데이타에 따른 판독 및 기록 버스 사이클이다.The bus cycle control unit 250 drives a bus cycle in accordance with the notification address and the type of request, and access to an external memory device is obtained. If there is a request coming from the prefetch unit 210, the result is an instruction fetch bus cycle according to the instruction code. In the case of a request from the processing execution unit 230, the result is a read and write bus cycle according to the memory data.

버스 사이클은 어드레스 단자(ABT)로부터의 어드레스 출력신호, 데이타 단자(DBT)로부터 나오는 출력 또는 입력 데이타 신호, 버스 사이클의 종류를 나타내는 상태 신호(이 신호는 상태 단자(STT)로부터 나온다) 및, 버스 사이클 타이밍을 나타내는 타이밍 신호로 구성된다.The bus cycle includes an address output signal from the address terminal ABT, an output or input data signal from the data terminal DBT, a status signal indicating the type of bus cycle (this signal comes from the status terminal STT), and a bus It consists of a timing signal indicative of cycle timing.

프로세싱 실행 유니트(230), 유효 어드레스 계산 유니트(240) 및 버스 사이클 제어 유니트(250)는 내부 데이타 버스(ID) 및 내부 어드레스 버스(IA)를 통해 상호 연결된다. 트랩 인터럽션 요구 단자(ETRAP)는 버스 사이클 제어 유니트(250)에 의해 발생된 버스 사이클의 종료시에 트랩 인터럽션 요구를 샘플하는 단자이다.The processing execution unit 230, the valid address calculation unit 240 and the bus cycle control unit 250 are interconnected via an internal data bus ID and an internal address bus IA. The trap interruption request terminal ETRAP is a terminal for sampling the trap interruption request at the end of the bus cycle generated by the bus cycle control unit 250.

제3도는 마이크로프로세서를 활용하는 본 발명의 프로그램 디버깅 시스템의 예를 도시한다. 제3도에서, 외부 메모리 장치(310)는 마이크로프로세서(200)에 의해 액세스되는 메모리이며, 상기 장치는 데이타 버스(DB), 어드레스 버스(AB) 및, 상태 버스(ST)를 통하여 연결된다.3 shows an example of the program debugging system of the present invention utilizing a microprocessor. In FIG. 3, the external memory device 310 is a memory accessed by the microprocessor 200, which is connected via a data bus DB, an address bus AB, and a status bus ST.

디버깅 장치(320)는 어드레스 버스(AB)와 상태 버스(ST)를 통해 마이크로프로세서(200)에 접속되어 있다.The debugging device 320 is connected to the microprocessor 200 via an address bus AB and a state bus ST.

아래에는 디버깅 장치(320)의 구조가 설명되어 있다. 트랩 어드레스 레지스터(321)는 트랩 인터럽션을 발생하는 어드레스를 설정하는 레지스터이고, 트랩 사이클 레지스터(322)는 트랩 인터럽션을 발생하기 위한 버스 사이클 종류를 설정하는 레지스터이고, 어드레스 비교기(323)는 어드레스 버스(AB)로부터의 어드레스 값과 트랩 어드레스 레지스터(321)의 내용을 비교하여 그들이 일치하는지를 판정하는 비교기이고, 상태 비교기(324)는 상태 버스(ST)로부터의 상태 데이타와 트랩 사이클 레지스터(322)의 내용을 비교하여 그들이 일치하는지를 판정하는 비교기이고, 트랩 신호 발생 회로(325)는 어드레스 비교기(323)와 상태 비교기(324)로부터의 출력에 따라 트랩 인터럽션 요구 신호(ETRAPREQ)를 발생하는 회로이다.The structure of the debugging device 320 is described below. The trap address register 321 is a register for setting an address for generating a trap interruption, the trap cycle register 322 is a register for setting a bus cycle type for generating a trap interruption, and the address comparator 323 is an address. A comparator that compares the address value from the bus AB with the contents of the trap address register 321 to determine whether they match, and the state comparator 324 is a state data from the state bus ST and a trap cycle register 322. Is a comparator that compares the contents of the signals and determines whether they match, and the trap signal generation circuit 325 generates a trap interruption request signal ETRAPREQ according to the outputs from the address comparator 323 and the state comparator 324. .

디버깅 장치(320)로부터 나오는 트랩 인터럽션 요구신호(ETRAPREQ)는 마이크로프로세서(200)의 트랩인터럽션 요구 단자(ETRAP)에 접속된다. 상기 마이크로프로세서(200)가 버스/사이클을 발생할 때, 어드레스 버스(AB)와 상태 버스(ST)로부터의 어드레스 및 상태 신호의 값과, 미리 설정된 어드레스와 상태와의 비교가 행해진다. 상기 비교의 결과, 일치가 검출되면, 인터럽션 요구신호(ETRAPREQ)가 트랩 인터럽션 요구 단자에 통지되고, 상기 버스/사이클 종료시에 마이크로프로세서(200)내에 기입된다. 상기 버스/사이클이 마이크로프로세서(200) 내부에서 사용될 때 트랩 인터럽션이 발생되며, 마이크로프로세서는 디버거에 제어를 전달한다.The trap interruption request signal ETRAPREQ coming from the debugging device 320 is connected to the trap interruption request terminal ETRAP of the microprocessor 200. When the microprocessor 200 generates a bus / cycle, a comparison is made between the values of the address and status signals from the address bus AB and the status bus ST, and the preset addresses and states. As a result of the comparison, if a match is detected, the interruption request signal ETRAPREQ is notified to the trap interruption request terminal and written into the microprocessor 200 at the end of the bus / cycle. Trap interruption occurs when the bus / cycle is used inside microprocessor 200, which transfers control to the debugger.

아래에는 제2도에 도시된 마이크로프로세서(200)의 명령 데이타 캐쉬 메모리 유니트(270)의 구체적 구성이 제1도를 참고하여 설명되고 있다. 제1도에서, 일예로서 캐쉬 메모리 유니트는 1K 바이트의 메모리 데이타를 캐쉬화하는 것이 가능하다. 이 메모리 데이타는 명령 코드와 메모리 오퍼랜드 둘다를 포함한다. 즉, 상기 명령 코드 캐슁 형태, 데이타 캐슁 형태, 명령 코드와 데이타의 캐슁 형태 모두가 허용 가능해진다. 데이타 케슁을 행하는 경우, 기록 제어 방식 시스템으로서 스토아 쓰루(store through) 시스템이 사용될 수 있게 취해진다.Hereinafter, a detailed configuration of the instruction data cache memory unit 270 of the microprocessor 200 illustrated in FIG. 2 will be described with reference to FIG. 1. In FIG. 1, as an example, the cache memory unit is capable of caching 1K bytes of memory data. This memory data includes both instruction code and memory operands. That is, the command code caching type, the data caching type, and the command code and data caching type are all acceptable. In case of performing data caching, a store through system can be used as the recording control system.

이들 캐쉬 메모리 유니트(260,270)는 태그 메모리부(110), 데이타 메모리부(120), 대체 엔트리 선택 회로(140), 인터럽션 제어회로부(150)를 포함한다.These cache memory units 260 and 270 include a tag memory unit 110, a data memory unit 120, a replacement entry selection circuit 140, and an interruption control circuit unit 150.

태그 메모리부(110)는 256세트의 엔트리 W0-W255로 이루어진다. 각각의 엔트리 W0-W255는 각각의 대응 엔트리가 유효로 사용되는지 아닌지를 표시하는 유효 비트부(111), 엔트리 어드레스부가 트랩 인터럽션의 대상인지 아닌지를 표시하는 트랩 비트부(112), 어드레스 데이타의 28비트 폭 어드레스 데이타를 기억하는 어드레스부(113)로 구성된다. 데이타 메모리(120)는 태크 메모리부(110)내의 256세트의 각 엔트리에 대응하는 4바이트 단위의 (32비트=1워드) 데이타부(121)로 구성된다. 선택된 데이타부(121)는 출력을 내부 데이타 버스(ID)(데이타 캐슁의 경우)또는 디코드 유니트(220)(명령 캐슁의 경우)중 하나에 출력한다.The tag memory section 110 is composed of 256 sets of entries W0-W255. Each entry W0-W255 has a valid bit section 111 indicating whether or not each corresponding entry is validly used, a trap bit section 112 indicating whether or not the entry address section is a target of trap interruption, and address data. The address section 113 stores 28-bit wide address data. The data memory 120 is composed of a data unit 121 (32 bits = 1 word) in units of 4 bytes corresponding to 256 sets of entries in the tag memory unit 110. The selected data section 121 outputs the output to either the internal data bus ID (in the case of data caching) or the decode unit 220 (in the case of instruction caching).

내부 어드레스 버스(IA)(데이타 캐슁) 또는 프리페치 유니트(210)(명령 캐슁)로부터 32비트 폭 어드레스 데이타의 상위 28비트(후에는 “메모리 어드레스”)가 캐쉬 메모리 유니트에 전달될 때, 그 메모리 어드레스와 동일한 내용을 유지하는 어드레스부(113)에 대응하는 엔트리가 선택된다.When the upper 28 bits (32 " memory addresses ") of 32-bit wide address data from the internal address bus IA (data caching) or prefetch unit 210 (command caching) are transferred to the cache memory unit, that memory An entry corresponding to the address portion 113 holding the same contents as the address is selected.

대응 엔트리가 존재하지 않는 경우에, 에러 신호(MISS)가 발생된다. 상기 마이크로프로세서(200)는 새로운 엔트리를 선택하므로서, 선택된 엔트리의 데이타 메모리(120)중 특정 데이타부(121)에 버스 사이클의 구동을 통해 얻어진 워드 데이타를 기억하기 위해 버스 사이클 제어 유니트(250)를 사용한다. 이러한 일련의 동작을 대체라 칭한다.If no corresponding entry exists, an error signal MISS is generated. The microprocessor 200 selects a new entry, thereby causing the bus cycle control unit 250 to store word data obtained by driving a bus cycle in a specific data portion 121 of the data memory 120 of the selected entry. use. This series of operations is called replacement.

대체 엔트리 선택회로(140)는 대체가 필요한 엔트리를 선택하는 회로이다. 대체 엔트리 선택 회로(140)는 각각의 엔트리에 대해 히스테리틱 데이타를 보유하며, 대체를 통한 새로운 엔트리 선택시에, 그 히스테리틱 데이타에 기초하여 안전하게 제거할 수 있는 엔트리를 선택한다. 일반적으로, LRU(Least Recently Used) 방법에 의한 제어가 행해진다. 유니트 LRU 방법은 히스테리틱 데이타를 참고한 후, 가장 과거에 사용된 엔트리를 선택하는 방법이다.The replacement entry selection circuit 140 is a circuit for selecting an entry requiring replacement. The replacement entry selection circuit 140 retains hysteretic data for each entry and, upon selecting a new entry through replacement, selects entries that can be safely removed based on the hysteretic data. In general, control is performed by a Least Recently Used (LRU) method. The unit LRU method is a method of selecting the most recently used entry after referring to hysteretic data.

인터럽션 제어회로(150)는 트랩 비트(112) 제어를 목적으로, 지정(할당)표시된 신호(TIN), 제어 신호(TSET), 제어 신호(TCLR)을 발생한다. 게다가, 상기는 트랩 비트(112)의 상태에 기초하여, 트랩 인터럽션 요구의 검출을 표시한 검출 신호(TRAPDET)를 발생한다. 또한, 트랩 인터럽션 요구 신호는 트랩 인터럽션 요구 단자(ETRAP)를 통해 인터럽션 제어회로(150)에 입력되며, 또한 버스 사이클 신호(BCYC)가 입력된다.The interruption control circuit 150 generates a designated (assigned) indicated signal TIN, a control signal TSET, and a control signal TCLR for the purpose of controlling the trap bit 112. In addition, the above generates a detection signal TRAPET indicating detection of a trap interruption request based on the state of the trap bit 112. The trap interruption request signal is input to the interruption control circuit 150 via the trap interruption request terminal ETRAP, and the bus cycle signal BCYC is also input.

상기 할당(지정) 신호(TIN)는 제어 신호(TSET)를 통해 트랩 인터럽션 할당을 실행하며, 메모리 어드레스 또는 대체 엔트리 선택회로(140)에 의해 선택된 엔트리용으로 태그 메모리부(110)의 트랩 비트(112)에서 선택적으로 설정되고, 필요할 때마다 상기 할당 신호(TIN)는 제어 신호(TCLR)에 의해서 클리어된다.The assignment (designation) signal TIN executes trap interruption assignment via the control signal TSET, and trap bits of the tag memory section 110 for entries selected by the memory address or alternative entry selection circuit 140. Optionally set at 112, the allocation signal TIN is cleared by the control signal TCLR whenever necessary.

아래에는 제5도의 플로챠트를 기초로 하여, 전술된 캐쉬 메모리 유니트의 동작을 설명한다. 트랩 인터럽션 요구의 흐름은 제2도에 점선으로 표시되고 있다.The operation of the above-described cache memory unit will be described below based on the flowchart of FIG. The flow of the trap interruption request is indicated by a dashed line in FIG.

먼저, 메모리 데이타의 요구가 있는지 없는지를 판정하며 (단계 500), 메모리 데이타의 요구가 있으면, 내부 어드레스 버스(IA) 또는 프리페치 유니트(210)로부터의 메모리 어드레스와 일치하는 어드레스부(113)를 유지하는 엔트리가 있는지 없는지를 판정한다.(단계 501)First, it is determined whether there is a request for memory data or not (step 500). If there is a request for memory data, the address portion 113 matching the memory address from the internal address bus IA or the prefetch unit 210 is determined. It is determined whether there is an entry to be retained. (Step 501)

메모리 어드레스와 일치하는 엔트리가 없는 경우, 상기 결과는 미스 히트(a miss-hit)로 된다. 그런 경우, 아래의 대체 동작이 수행된다. 첫번째로, 대체될 엔트리는 위에서 설명한 바와같이, 대체 엔트리 선택회로(140)를 통해 선택적으로 결정된다(단계 502).다음에, 선택된 엔트리에 대해 대체 동작이 행해진다. 버스 사이클은 버스 사이클 제어 유니트(250)에 의해 구동된다(단계 503). 이런 버스 사이클에서, 메모리 어드레스와 일치하는 어드레스 값이 어드레스 버스(AB)로 출력된다.If no entry matches the memory address, the result is a miss-hit. In such a case, the following replacement operation is performed. First, an entry to be replaced is optionally determined through the replacement entry selection circuit 140, as described above (step 502). Next, a replacement operation is performed on the selected entry. The bus cycle is driven by the bus cycle control unit 250 (step 503). In this bus cycle, an address value matching the memory address is output to the address bus AB.

상기 대체 버스 사이클에 의해 획득된 메모리 데이타는 선택된 엔트리의 데이타 메모리부(120)의 데이타부(121)내에 저장된다. 또한, 트랩 인터럽션 요구가 상기 언급된 대체 버스 사이클에 의해 트랩 인터럽션 단자(ETRAP)로 입력될시, 인터럽션 제어회로(150)는 버스 사이클 신호(BCYC)에 동기된 할당 신호(TIN)와, 타이밍 제어 신호(TSET)를 발생시킨다. 그 결과, 대체 엔트리 선택 회로부(140)에 의해 선택된 태그 메모리부(110)의 엔트리에 대한 트랩 비트(112)는 설정된 할당 신호(TIN)를 갖는다(단계 504). 트랩 인터럽션 요구는 명령 캐쉬 메모리 유니트(260)에서는 프리페치 유니트(210)으로부터 통지되며, 데이타 캐쉬 메모리 유니트(270)에서는 직접 트랩 인터럽션 요구 단자(the direct trap interruption requistion terminal ; ETRAP)로부터 통지된다.The memory data obtained by the replacement bus cycle is stored in the data portion 121 of the data memory portion 120 of the selected entry. In addition, when a trap interruption request is input to the trap interruption terminal ETRAP by the above-mentioned alternative bus cycle, the interruption control circuit 150 is coupled with the assignment signal TIN synchronized to the bus cycle signal BCYC. The timing control signal TSET is generated. As a result, the trap bit 112 for the entry of the tag memory section 110 selected by the replacement entry selection circuit section 140 has a set assignment signal TIN (step 504). The trap interruption request is notified from the prefetch unit 210 in the instruction cache memory unit 260 and from the direct trap interruption requistion terminal (ETRAP) in the data cache memory unit 270. .

또한, 메모리 어드레스는 엔트리의 어드레스부(113)내에 저장되고(단계 505), 유효비트(111)느 선택된 엔트리내에 설정(set)된다(단계 506). 곧이어, 데이타부(121)내의 메모리 데이타의 저장과 동시에, 같은 메모리 데이타가 요구원인 내부 데이타 버스(ID) 또는 디코딩 유니트(220)로 전송된다(단계 508).Further, the memory address is stored in the address portion 113 of the entry (step 505), and the valid bit 111 is set in the selected entry (step 506). Immediately following the storage of the memory data in the data portion 121, the same memory data is transferred to the internal data bus ID or decoding unit 220 which is the request source (step 508).

단계 501에서, 메모리 어드레스에 일치하는 엔트리가 존재하는 경우에, 제1임무는 엔트리의 유효비트(111)가 설정되어 있는지 아닌지를 검사하는 것이다(단계 507). 유효비트(111)가 설정되어 있지 않는 경우, 단계 502에서 시작하는 대체 동작은 비록 문제의 엔트리가 메모리 어드레스에 일치할지라도 수행되며, 그 이유는 상기 엔트리가 본질적으로 무효하기 때문이다.In step 501, if there is an entry that matches the memory address, the first task is to check whether the valid bit 111 of the entry is set or not (step 507). If the valid bit 111 is not set, the replacement operation starting at step 502 is performed even if the entry in question matches the memory address, because the entry is essentially invalid.

스텝 507에서, 유효비트(111)가 설정될때, 관련된 엔트리의 데이타부(121)내에 저장된 메모리 데이타가 요구원인 내부 데이타 버스(ID), 또는 디코드 유니트(220)로 전성되되(단계 508), 이러한 전송은 데이타부(121)내의 저장과 동시에 일어난다.In step 507, when the valid bit 111 is set, the memory data stored in the data portion 121 of the associated entry is transferred to the internal data bus (ID), or decode unit 220, which is the requesting source (step 508). The transmission takes place simultaneously with storage in the data portion 121.

데이타부(121)내에 저장된 메모리 데이타를 요구원인 내부 데이타 버스(ID) 또는 디코딩 유니트(220)로 전송한 후 메모리 어드레스내에 선택된 엔트리의 트랩 비트(112)내의 할당 신호(TIN)가 설정되어 있는지 않는지에 대한 검사가 행해진다(단계 509). 만약 설정되어 있지 않으면, 프로세싱은 종결된다. 할당 신호(TIN)가 설정되어 있는 경우, 인터럽션 제어회로(150)쪽으로 신호의 출력(TOUT)이 발생한다. 이런 출력신호(TOUT)는 관련된 메모리 어드레스의 트랩 인터렵션의 할당을 검출(확인)하는데 사용되며(상기 검출은 인터럽션 제어회로(150)에 의해 행해진다), 상기 회로는 트랩 인터럽션 검출 신호(TRAPDET)를 전송한다(단계 510).Whether the allocation signal TIN in the trap bit 112 of the entry selected in the memory address is set after transferring the memory data stored in the data portion 121 to the internal data bus (ID) or the decoding unit 220 as a request source. Is checked (step 509). If not set, processing terminates. When the allocation signal TIN is set, the signal output TOUT is generated toward the interruption control circuit 150. This output signal TOUT is used to detect (confirm) the allocation of the trap interaction of the associated memory address (the detection is done by the interruption control circuit 150), and the circuit is a trap interruption detection signal ( TRAPDET) (step 510).

그후, 캐쉬 메모리 데이타가 명령 코드인 경우, 마이크로프로세서(200)의 디코딩 유니트(220)로 트랩 인터럽션 검출 신호(TRAPDET)가 통지되며, 캐쉬 메모리 데이타가 본질적으로 데이타인 경우, 직접 프로세싱 실행 유니트(230)로 상기 검출 신호(TRAPDET)가 통지된다.Then, if the cache memory data is an instruction code, the trap interruption detection signal TRAPET is notified to the decoding unit 220 of the microprocessor 200, and if the cache memory data is essentially data, the direct processing execution unit ( 230, the detection signal TRAPET is notified.

트랩 인터럽션 검출 신호(TRAPDET)를 수신하고, 명령 실행 프로세싱의 종결 이후에, 프로세싱 실행 유니트(230)는 다음 프로세싱 동작을 수행하지 않고 인터럽션 프로세싱을 수행한다. 인터럽션 요구단자(INT)로부터 유출된 보통의 인터럽션 요구의 경우와 비슷하게, 트랩 인터럽션 프로세싱은 현재의 프로그램 카운터(PC) 및 프로그램 상태 워드(PSW)의 내용을 외부 메모리 장치(310)의 스택 영역에 대피시키고, 인터럽션 요구의 종류에 따라, 상기 프로세싱은 예약된 번지로 분기한다.Receiving a trap interruption detection signal TRAPET, and after terminating the instruction execution processing, the processing execution unit 230 performs interruption processing without performing the next processing operation. Similar to the case of the normal interruption request from the interruption request terminal (INT), trap interruption processing loads the contents of the current program counter (PC) and program status word (PSW) into the stack of the external memory device 310. Evacuate the area and, depending on the type of interruption request, the processing branches to the reserved address.

트랩 인터럽션 검출 신호(TRAPDET)의 발생후의 동작으로서는 다음의 3가지 다른 동작이 있다는 사실에 유의해야 한다. 제1동작은 이어지는(follow) 관련된 메모리 어드레스에 대해서도, 적절한 트랩 비트(112)를 바꾸지 않고 트랩 인터럽션을 발생하는 것이다. 이것은 상기 플로우챠트에서 기술된 동작이다.It should be noted that there are three different operations as the operation after generation of the trap interruption detection signal TRAPET. The first operation is to generate a trap interruption for the associated associated memory address without changing the appropriate trap bit 112. This is the operation described in the flowchart above.

제2동작은 적당한 트랩 비트(112) 및 유효비트(111)를 클리어하고, 이어지는(follow) 적당한 메모리 어드레스에 대한 강제 대체 동작(forcible replacement opration)을 행하며, 트랩 인터렵션을 재할당(reassign)시키는 것이다. 제3동작에서, 적당한 트랩 비트(112)는 클리어되고, 이어지는 적당한 메모리 어드레스의 트랩 인터럽션이 발생되지 않는다.The second operation clears the appropriate trap bit 112 and the valid bit 111, follows a forcible replacement opration to the appropriate memory address, and reassigns the trap interaction. will be. In a third operation, the appropriate trap bit 112 is cleared and no subsequent trap interruption of the appropriate memory address occurs.

이런 동작은 디버깅(debugging) 목적에 따라 선택적으로 이용되고, 인터럽션 제어회로부(150)는 선택적으로 제어를 쉽게 한다. 그러나, 적당한 트랩 비트(112)는 제어 신호(TCLR)에 의해 쉽게 클리어된다.This operation is selectively used according to the debugging purpose, and the interruption control circuit unit 150 facilitates the control selectively. However, the appropriate trap bit 112 is easily cleared by the control signal TCLR.

제4도는 제2실시예를 통해 본 발명의 캐쉬 메모리 유니트의 구조를 도시한 것이다.4 shows the structure of the cache memory unit of the present invention through the second embodiment.

이 실시예에서, 트랩 비트(412)는 태크 메모리(410)보다는 오히려 데이타 메모리(420)가 설정되는 구조로 구성된다. 모든 다른 구조적인 특성은 제1도에 도시된 것과 전체적으로 동일하다. 게다가, 이런 실시예의 캐쉬 메모리 유니트 동작은 제1도의 캐쉬 메모리 유니트에 도시된 동작과 동일하며, 같은 효과를 갖는다.In this embodiment, the trap bits 412 are organized in a structure in which the data memory 420 is set rather than the tag memory 410. All other structural characteristics are generally the same as those shown in FIG. In addition, the cache memory unit operation of this embodiment is the same as that shown in the cache memory unit of FIG. 1, and has the same effect.

본 발명의 마이크로프로세서에 의하면, 캐쉬 메모리에 히트(hit)된 메모리 데이타에 대해서도 트랩 인터럽션이 정확히 실현된다. 그 결과, 트랩 인터럽션이 프로그램의 국소성(localization)등과 무관하게 모든 명령 코드 및 메모리 오퍼랜드에 적용될 수 있으므로, 간단하고 효율적인 프로그램 디버깅이 가능하다.According to the microprocessor of the present invention, trap interruption is accurately realized even for memory data hit in the cache memory. As a result, trap interruption can be applied to all instruction code and memory operands regardless of the localization of the program, thereby enabling simple and efficient program debugging.

일반적으로, 트랩 기능이 단일 단계 인터럽션 기능을 통해 실현될시에, 소정의 조건의 대피 및 복원(avoidance and restoration)과 소프트웨어 트랩을 위해 대략 10 내지 20개의 명령이 필요하다. 디버깅될 프로그램에서 각 특정 명령 실행에 오버헤드(overhead)가 필요하며, 트랩 기능 동안 처리 속도는 종래 프로그램 수행의 속도보다 10배 이상 느리다. 따라서 캐쉬 메모리에 인터럽션 데이타를 유지시켜 트랩 인터럽션 제어를 행하므로 상기 오버헤드를 0으로 하여 본래의 프로그램의 수행 시간과 같은 처리 시간으로 트랩 기능을 실현할 수 있다.In general, when the trap function is realized through a single step interruption function, approximately 10-20 instructions are required for evacuation and restoration of certain conditions and software traps. The overhead to execute each specific instruction in the program to be debugged is required, and the processing speed during the trap function is more than 10 times slower than that of conventional program execution. Therefore, trap interruption control is performed by retaining interruption data in the cache memory, and the trap function can be realized at the same processing time as the execution time of the original program by setting the overhead to 0.

전술된 실시예 이외에 본 발명의 범주내에서 다양하게 변형될 수 있다.Various modifications can be made within the scope of the present invention in addition to the above-described embodiments.

Claims (6)

내장된 캐쉬 메모리 유니트를 가진 마이크로프로세서로서, 데이타를 처리하는 프로세싱 실행 장치와 ; 외부 메모리로 액세스하는 버스 사이클을 구동하는 버스 사이클 제어 장치와 ; 상기 프로세싱 실행 장치에 의해 처리된 데이타를 캐쉬화하는 캐쉬 메모리 유니트를 포함하되, 상기 캐쉬 메모리 유니트는 어드레스 및데이타를 저장하는 다수의 엔트리를 가진 캐쉬 메모리와, 트랩 인터럽션을 제어하는 인터럽션 제어 장치를 포함하며, 상기 캐쉬 메모리는 각 엔트리에 대해 관련 엔트리가 트랩 인터럽션의 대상인지의 여부를 나타내는 인터럽션 데이타 영역을 가지며, 상기 인터럽션 제어 장치는, 캐쉬 메모리 엔트리의 대체시에 트랩 인터럽션 요구 신호가 상기 버스 사이클에 동기하여 입력되는 경우 상기 캐쉬 메모리 엔트리의 상기 인터럽션 데이타 영역내에 인터럽션 할당 신호를 레지스터하는 기능과, 상기 캐쉬 메모리 엔트리에 관련된 데이타 요구시에 상기 인터럽션 데이타 영역내의 인터럽션 할당 신호가 있는지 여부를 판별한 후에 인터럽션 검출 신호를 출력하는 기능을 갖는 것을 특징으로 하는 내장된 캐쉬 메모리 유니트를 가진 마이크로프로세서.A microprocessor having a built-in cache memory unit, comprising: a processing execution unit for processing data; A bus cycle control device for driving a bus cycle to access an external memory; A cache memory unit for caching data processed by the processing execution device, wherein the cache memory unit includes a cache memory having a plurality of entries for storing addresses and data, and an interruption control device for controlling trap interruption; Wherein the cache memory has an interruption data area for each entry indicating whether or not the associated entry is the subject of a trap interruption, and the interruption control device requests a trap interruption upon replacement of the cache memory entry. A function of registering an interruption allocation signal in the interruption data area of the cache memory entry when a signal is input in synchronization with the bus cycle, and an interruption in the interruption data area when a data request relating to the cache memory entry is requested. Whether there is an allocation signal After a built-in cache memory unit with a microprocessor which has a function of outputting an interruption detection signal. 제1항에 있어서, 명령 코드를 캐쉬화하는 제1캐쉬 메모리 유니트와, 데이타를 캐쉬화하는 제2캐쉬 메모리 유니트를 포함하는 것을 특징으로 하는 내장된 캐쉬 메모리 유니트를 가진 마이크로프로세서.2. The microprocessor of claim 1, comprising a first cache memory unit for caching instruction code and a second cache memory unit for caching data. 제1항에 있어서, 상기 캐쉬 메모리 유니트의 상기 캐쉬 메모리는 어드레스 저장 메모리 및 데이타 저장 메모리를 포함하며, 상기 어드레스 저장 메모리는 각 엔트리에 대한 상기 인터럽션 데이타 영역을 갖는 것을 특징으로 하는 내장된 캐쉬 메모리 유니트를 가진 마이크로프로세서.2. The built-in cache memory of claim 1, wherein the cache memory of the cache memory unit includes an address storage memory and a data storage memory, wherein the address storage memory has the interruption data area for each entry. Microprocessor with unit. 제1항에 있어서, 상기 캐쉬 메모리 유니트의 상기 캐쉬 메모리는 어드레스 저장 메모리 및 데이타 저장 메모리를 포함하며, 상기 데이타 저장 메모리는 각 엔트리에 대한 상기 인터럽션 데이타 영역을 갖는 것을 특징으로 내장된 캐쉬 메모리 유니트를 가진 마이크로프로세서.2. The built-in cache memory unit of claim 1, wherein the cache memory of the cache memory unit includes an address storage memory and a data storage memory, wherein the data storage memory has the interruption data area for each entry. Microprocessor with. 제1항에 있어서, 상기 캐쉬 메모리 유니트는 캐쉬 메모리 엔트리 대체 시간 동안 각 엔트리의 히스테리틱(hysteretic) 데이타에 의해 대체에 필요한 엔트리를 선택하는 선택 장치를 갖는 것을 특징으로 하는 내장된 캐쉬 메모리 유니트를 가진 마이크로프로세서.2. The cache memory unit of claim 1, wherein the cache memory unit has a selection device for selecting an entry required for replacement by hysteretic data of each entry during a cache memory entry replacement time. Microprocessor. 제1항에 있어서, 상기 캐쉬 메모리는 엔트리가 각 엔트리에 대해 유효 또는 무효한지를 나타내는 데이타 저장 영역을 갖는 것을 특징으로 하는 내장된 캐쉬 메모리 유니트를 가진 마이크로프로세서.2. The microprocessor of claim 1, wherein the cache memory has a data storage area that indicates whether an entry is valid or invalid for each entry.
KR1019920009281A 1991-05-29 1992-05-29 Microprocessor having cashe memory unit KR960003052B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP91-124250 1991-05-29
JP3124250A JPH04350735A (en) 1991-05-29 1991-05-29 Microprocessor

Publications (2)

Publication Number Publication Date
KR920022105A KR920022105A (en) 1992-12-19
KR960003052B1 true KR960003052B1 (en) 1996-03-04

Family

ID=14880689

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019920009281A KR960003052B1 (en) 1991-05-29 1992-05-29 Microprocessor having cashe memory unit

Country Status (2)

Country Link
JP (1) JPH04350735A (en)
KR (1) KR960003052B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100486259B1 (en) * 2002-09-09 2005-05-03 삼성전자주식회사 Processor having cache structure and Cache management method for elevating operation speed

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS595931B2 (en) * 1979-06-30 1984-02-08 株式会社東芝 Address stop method for arithmetic processing system
JPS573143A (en) * 1980-06-05 1982-01-08 Matsushita Electric Ind Co Ltd Instruction prefetching system
JPS619743A (en) * 1984-06-26 1986-01-17 Fujitsu Ltd Logging control method
JPS62133532A (en) * 1985-12-05 1987-06-16 Nec Corp Microprocessor
JPH01240941A (en) * 1988-03-23 1989-09-26 Nec Corp Information processor
JPH01284938A (en) * 1988-05-12 1989-11-16 Fujitsu Ltd Detecting system for execution instruction address
JPH0795288B2 (en) * 1988-08-25 1995-10-11 日本電気株式会社 Microcomputer
JPH07117910B2 (en) * 1988-09-01 1995-12-18 富士通株式会社 Address compare stop method

Also Published As

Publication number Publication date
KR920022105A (en) 1992-12-19
JPH04350735A (en) 1992-12-04

Similar Documents

Publication Publication Date Title
EP0118828B1 (en) Instruction fetch apparatus and method of operating same
EP0730230B1 (en) Method for prioritizing and handling errors in a computer system
US4701844A (en) Dual cache for independent prefetch and execution units
Hsu et al. Prefetching in supercomputer instruction caches
EP0381447B1 (en) Method and apparatus for controlling the conversion of virtual to physical memory addresses in a digital computer system
JP6138142B2 (en) Hardware-based runtime instrumentation for managed runtimes
US7711988B2 (en) Architecture support system and method for memory monitoring
US7296137B2 (en) Memory management circuitry translation information retrieval during debugging
EP0381470A2 (en) Processing of memory access exceptions along with prefetched instructions within the instruction pipeline of a virtual memory system-based digital computer
US5347636A (en) Data processor which efficiently accesses main memory and input/output devices
US6266768B1 (en) System and method for permitting out-of-order execution of load instructions
US9280346B2 (en) Run-time instrumentation reporting
US20030135719A1 (en) Method and system using hardware assistance for tracing instruction disposition information
KR100421749B1 (en) Method and apparatus for implementing non-faulting load instruction
JPH0619793A (en) History table of virtual address conversion estimation for cache access
US6901540B1 (en) TLB parity error recovery
JP2015513376A (en) Runtime instrumentation indirect sampling with instruction operation code
US20030135718A1 (en) Method and system using hardware assistance for instruction tracing by revealing executed opcode or instruction
US20080141002A1 (en) Instruction pipeline monitoring device and method thereof
KR960003052B1 (en) Microprocessor having cashe memory unit
EP0156307A2 (en) Pipelined processor having dual cache memories
US20080140993A1 (en) Fetch engine monitoring device and method thereof
JP2646957B2 (en) Microprocessor with built-in cache and its trace system
JPS60207935A (en) Detecting system of illegal instruction
EP0569987A1 (en) Microprocessor incorporating cache memory enabling efficient debugging

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
G160 Decision to publish patent application
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20020227

Year of fee payment: 7

LAPS Lapse due to unpaid annual fee