KR19990068872A - Data cache memory controller - Google Patents

Data cache memory controller Download PDF

Info

Publication number
KR19990068872A
KR19990068872A KR1019980002768A KR19980002768A KR19990068872A KR 19990068872 A KR19990068872 A KR 19990068872A KR 1019980002768 A KR1019980002768 A KR 1019980002768A KR 19980002768 A KR19980002768 A KR 19980002768A KR 19990068872 A KR19990068872 A KR 19990068872A
Authority
KR
South Korea
Prior art keywords
cache memory
data
command
data cache
instruction
Prior art date
Application number
KR1019980002768A
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 KR1019980002768A priority Critical patent/KR19990068872A/en
Publication of KR19990068872A publication Critical patent/KR19990068872A/en

Links

Abstract

본 발명은 데이타 캐쉬 메모리의 제어장치에 관한 것으로, 메인 메모리 또는 명령어 캐쉬 메모리에서 이후 수행하게될 명령어를 인출하여 보관하는 명령어 전치인출 버퍼와, 명령어 전치인출 버퍼에 보관되어 있는 명령어 가운데 다음에 실행할 명령어를 인출하여 출력하는 명령어 인출부, 명령어 인출부에 의해 인출된 명령어를 실행하는 명령어 실행부, 명령어 전치인출 버퍼에 보관되어 있는 명령어를 수행하는데 필요한 데이타가 데이타 캐쉬 메모리에 존재하는지를 판단하고 필요한 데이타가 데이타 캐쉬 메모리에 존재하지 않는 경우에는 메인 메모리에서 필요한 데이타를 인출하여 데이타 캐쉬 메모리에 보관하도록 제어하는 데이타 캐쉬 메모리 제어부를 포함하여 이루어진다. 특히 본 발명에 따른 데이타 캐쉬 메모리 제어부는 명령어 전치인출 버퍼에서 대기중인 명령어와 명령어 실행부에 입력되어 즉시 실행되어야 하는 명령을 모두 분석하고, 각각의 명령어를 실행하는데 필요한 데이타가 데이타 캐쉬 메모리에 존재하는 판단하여 필요한 데이타를 확보함으로써 데이타 캐쉬 메모리의 캐쉬 미스 발생확률을 감소시킨다. 따라서 명령어 전치인출 버퍼에서 대기중이던 명령어가 이후 명령어 실행부에 전달되어 실제로 실행될 때 데이타 캐쉬 메모리에 미리 확보되어 있는 데이타를 이용하여 즉시 실행될 수 있도록 함으로써 명령어 실행부의 불필요한 대기시간을 감소시키고, 이는 곧 전체 동작속도를 크게 향상시키는 것이다.The present invention relates to a control device of a data cache memory, and includes an instruction prefetch buffer for extracting and storing instructions to be executed later from the main memory or the instruction cache memory, and a command to be executed next among instructions stored in the instruction prefetch buffer. The command fetcher that retrieves and outputs the command, the command executor that executes the command fetched by the command fetcher, determines whether the data necessary to execute the instructions stored in the command prefetch buffer exists in the data cache memory, If it does not exist in the data cache memory, it comprises a data cache memory control unit for controlling to retrieve the necessary data from the main memory to store in the data cache memory. In particular, the data cache memory controller according to the present invention analyzes all of the instructions waiting in the instruction prefetch buffer and the instructions to be executed immediately after being input to the instruction execution unit, and the data necessary to execute each instruction is present in the data cache memory. By determining and securing necessary data, the probability of occurrence of cache misses in the data cache memory is reduced. Therefore, the instruction waiting in the instruction prefetch buffer is passed to the instruction execution unit later to be executed immediately by using the data already secured in the data cache memory when it is actually executed, thereby reducing unnecessary waiting time of the instruction execution unit. It is to greatly improve the operation speed.

Description

데이타 캐쉬 메모리의 제어장치Data cache memory controller

본 발명은 컴퓨터 시스템의 데이타 캐쉬 메모리의 제어장치에 관한 것으로, 특히 명령어 캐쉬 메모리와 데이타 캐쉬 메모리를 구비하고 중앙처리장치의 명령어 실행에 필요한 데이타가 데이타 캐쉬 메모리에 존재하는지를 판단하여 존재하지 않는 경우에는 메인 메모리에서 필요한 데이타를 인출하여 데이타 캐쉬 메모리에 보관하는 데이타 캐쉬 메모리의 제어장치에 관한 것이다.The present invention relates to an apparatus for controlling a data cache memory of a computer system. In particular, the present invention relates to an instruction cache memory and a data cache memory, and to determine whether or not data necessary for executing an instruction of a central processing unit exists in the data cache memory. The present invention relates to a control device of a data cache memory that retrieves necessary data from main memory and stores the data in a data cache memory.

캐쉬 메모리는 컴퓨터 시스템의 성능을 향상시키는 매우 중요한 구성요소이다. 일반적으로 컴퓨터 시스템은 기본 구성요소로서 메모리를 구비하는데, 이 메모리는 그 특성에 따라 여러 가지 레벨로 나뉘어진다. 이와 같은 레벨을 구분하는 기준으로는 데이타의 저장용량과 처리속도가 있는데, 속도가 빠를수록 레벨이 높다. 저장용량과 처리속도를 반비례하기 때문에 높은 레벨의 메모리는 비교적 작은 저장용량을 갖는다. 대형 컴퓨터를 제외한 일반 퍼스널 컴퓨터나 워크스테이션급의 컴퓨터에서는 메인 메모리로 디램(DRAM)을 사용한다. 디램은 에스램(SRAM)과 비교하여 제작이 용이하고 집적도가 높아서 용량에 비해 가격이 저렴한 편이다. 이것이 디램을 메인 메모리로 사용하는 가장 큰 이유이다. 이와는 달리 에스램은 집적도가 낮고 제작이 비교적 용이하지 않기 때문에 디램보다는 가격이 비싸다. 그러나 동작속도 면에서는 디램보다 훨씬 뛰어난 특성을 갖기 때문에 대형 컴퓨터 등에서는 이 에스램을 메인 메모리로 사용하는 경우가 많다.Cache memory is a very important component that improves the performance of a computer system. Generally, computer systems have a memory as a basic component, which is divided into various levels according to its characteristics. The criteria for classifying these levels are data storage capacity and processing speed. The higher the speed, the higher the level. Higher levels of memory have relatively little storage capacity because the storage capacity is inversely proportional to the processing speed. In general personal computer or workstation class computer except large computer, use DRAM as main memory. DRAM is easier to manufacture and higher density than SRAM, so it is cheaper than capacity. This is the biggest reason for using DRAM as main memory. SRAM, on the other hand, is more expensive than DRAM because of its low density and relatively low fabrication. However, in terms of operation speed, it is much better than DRAM, so large computers use this SRAM as main memory.

그러나 디램을 메인 메모리로 구비한 컴퓨터 시스템에서도 에스램을 메모리로서 사용하는데, 이 때는 메인 메모리가 아닌 캐쉬 메모리로 사용한다. 캐쉬 메모리는 중앙처리장치와 메인 메모리 사이에 구비되는 메모리로서 메인 메모리에 저장되어 있는 데이타 가운데 일부 상호 관련성이 높은 데이타를 보관한다. 중앙처리장치는 데이타를 인출할 때 먼저 캐쉬 메모리를 검사하여 인출하고자 하는 데이타가 캐쉬 메모리에 존재하는지를 확인한 다음, 존재하지 않는 경우에 비로소 메인 메모리에 접근한다. 따라서 중앙처리장치는 디램으로 이루어진 메인 메모리보다 상대적으로 동작속도가 빠른 에스램으로 이루어진 캐쉬 메모리를 상대로 데이타를 인출하기 때문에 그만큼 빠른 데이타 처리가 가능한 것이다.However, computer systems equipped with DRAM as main memory use SRAM as memory, but cache memory is used instead of main memory. The cache memory is a memory provided between the CPU and the main memory to store some highly correlated data among the data stored in the main memory. When the CPU retrieves data, the CPU first checks the cache memory to determine whether the data to be retrieved exists in the cache memory, and then accesses the main memory when the CPU does not exist. Therefore, the central processing unit withdraws data to the cache memory made of SRAM relatively faster than the main memory made of DRAM, it is possible to process the data as fast.

캐쉬 메모리는 언급한 바와 같이 메인 메모리보다 데이타 저장용량이 작은 특징은 갖는다. 만약 메인 메모리와 거의 동일한 저장용량의 캐쉬 메모리를 구비한다면, 이 때의 메인 메모리는 더 이상 존재해야 할 의미를 갖지 못하기 때문이다. 왜냐하면 메인 메모리 외에 캐쉬 메모리를 사용하는 것은 빠른 동작속도와 높은 가격의 에스램을 작은 용량의 캐쉬 메모리로 사용하고, 상대적으로 느린 동작속도와 낮은 가격의 디램을 대용량의 메인 메모리로 사용하여 상호 보완을 목적으로 하기 때문이다. 이와 같이 캐쉬 메모리는 메인 메모리보다 작은 용량을 갖기 때문에 항상 메인 메모리의 데이타 가운데 일부분만을 수용할 수 있다. 따라서 중앙처리장치에서 데이타를 인출하기 위하여 캐쉬 메모리에 접근할 때 중앙처리장치가 인출하고자 하는 데이타가 캐쉬 메모리에 존재하지 않을 수도 있다. 중앙처리장치가 인출하고자 하는 데이타가 캐쉬 메모리에 존재하는 경우를 히트(hit)라고 하며, 존재하지 않는 경우를 미스(miss)라고 한다.As mentioned, cache memory has a feature of smaller data storage capacity than main memory. If you have a cache memory of almost the same storage capacity as the main memory, the main memory at this time is no longer meant to exist. Because the use of cache memory in addition to main memory uses fast operation speed and high price of SRAM as small capacity cache memory, and relatively slow operation speed and low price DRAM as large capacity main memory to complement each other. This is because it is intended. As such, the cache memory has a smaller capacity than the main memory so that only a part of the data of the main memory can be accommodated. Therefore, when the CPU accesses the cache memory to retrieve data, the data that the CPU intends to retrieve may not exist in the cache memory. A case in which the data to be fetched by the CPU exists in the cache memory is called a hit, and a case in which the CPU does not exist is called a miss.

캐쉬 메모리를 데이타 기록 방식을 기준으로 구분하면 라이트 쓰루(wright through) 방식과 라이트 백(wright back) 방식이 있다. 라이트 쓰루 방식은 데이타를 캐쉬 메모리와 메인 메모리에 동시에 기록하는데 반하여, 라이트 백 방식은 먼저 캐쉬 메모리에 기록했다가 캐쉬 메모리의 해당 블록의 데이타를 대체해야 하는 경우에 기존의 데이타를 메인 메모리로 옮긴 다음 캐쉬 메모리의 해당 블록을 새로운 데이타로 대체한다.When cache memory is classified based on a data recording method, there are a wright through and a wright back method. The write-through method writes data to cache memory and main memory at the same time, whereas the write-back method first writes to cache memory and then moves the existing data to main memory when it needs to replace the data in the corresponding block of cache memory. Replace the corresponding block in cache memory with new data.

이 가운데 라이트 백 방식의 캐쉬 메모리에서 캐쉬 히트가 발생하면 캐쉬 메모리의 해당 블록의 데이타를 인출하면 되지만, 캐쉬 미스가 발생하면 캐쉬 메모리의 해당 블록의 데이타를 메인 메모리의 새로운 데이타로 대체하기 때문에 중앙처리장치는 메인 메모리가 아닌 캐쉬 메모리의 대체된 데이타를 인출한다. 따라서 캐쉬 히트의 경우보다는 캐쉬 미스의 경우에 중앙처리장치가 필요한 데이타를 인출하는데 훨씬 많은 시간이 소요된다. 이와 같은 캐쉬 미스 발생시의 시간적 손실을 미스 페널티(miss penalty)라고 하는데, 메인 메모리의 데이타를 캐쉬 메모리에 대체하는데 소요되는 시간과 중앙처리장치가 캐쉬 메모리의 대체된 데이타를 인출하는데 소요되는 시간을 더한 것이다.If a cache hit occurs in the writeback cache memory, the data of the corresponding block of the cache memory can be fetched. However, if a cache miss occurs, the data of the corresponding block of the cache memory is replaced with the new data of the main memory. The device fetches replaced data in cache memory rather than main memory. Therefore, it takes much longer for the CPU to fetch the necessary data in case of cache miss than in case of cache hit. This loss of time when a cache miss occurs is called a miss penalty, plus the time it takes to replace data in main memory with cache memory plus the time it takes for the central processing unit to fetch the replaced data from cache memory. will be.

캐쉬 메모리를 사용하는 목적이 메인 메모리의 느린 동작속도를 보상하기 위한 것이므로, 캐쉬 메모리의 이와 같은 목적을 충분히 달성하기 위해서는 캐쉬 미스 발생율을 감소시켜야 하지만, 용량의 한계로 인하여 캐쉬 미스의 발생이 불가피한 경우가 있다. 그러나 캐쉬 미스가 발생하더라도 그에 따른 미스 페널티를 감소시킨다면 캐쉬 미스에 의한 동작속도의 손실을 보상할 수 있으므로 미스 페널티를 감소시킬 수 있는 수단이 절실히 요구된다.Since the purpose of using the cache memory is to compensate for the slow operation speed of the main memory, the cache miss rate must be reduced in order to fully achieve such a purpose of the cache memory. However, if the cache miss is inevitable due to the capacity limitation, There is. However, even if a cache miss occurs, reducing the miss penalty accordingly can compensate for the loss of operating speed due to the cache miss. Therefore, a means for reducing the miss penalty is urgently required.

도 1은 컴퓨터 시스템에서 중앙처리장치와 명령어 캐쉬 메모리 및 데이타 캐쉬 메모리, 메인 메모리의 연결관계를 나타낸 블록도이다. 중앙처리장치(1)와 메인 메모리(4) 사이에는 명령어 캐쉬 메모리(2)와 데이타 캐쉬 메모리(3)가 연결된다. 명령어 캐쉬 메모리(2)는 중앙처리장치(1)와 메인 메모리(4) 사이에서 명령어만을 대상으로 캐쉬 메모리의 본래의 기능을 수행하고, 데이타 캐쉬 메모리(3) 역시 중앙처리장치(1)아 메인 메모리(4) 사이에서 데이타만을 대상으로 캐쉬 메모리의 본래의 기능을 수행한다. 이와 같이 명령어와 데이타를 별도로 취급하도록 한 것은 보다 빠른 동작속도를 구현하기 위한 것이다.1 is a block diagram illustrating a connection relationship between a central processing unit, an instruction cache memory, a data cache memory, and a main memory in a computer system. An instruction cache memory 2 and a data cache memory 3 are connected between the central processing unit 1 and the main memory 4. The instruction cache memory 2 performs the original function of the cache memory only between the central processing unit 1 and the main memory 4, and the data cache memory 3 also performs the central processing unit 1 main memory. The memory 4 performs the original function of the cache memory only for data. In this way, the instruction and data are handled separately to achieve a faster operation speed.

도 2는 도 1에 나타낸 중앙처리장치의 데이타 캐쉬 메모리의 제어에 관련된 구성요소와 데이타 캐쉬 메모리의 상호 연결관계를 나타낸 블록도이다. 중앙처리장치(1) 내부에는 내부에 명령어 전치인출 버퍼(5)와 명령어 인출부(6), 디코더(7), 명령어 실행부(8), 라이트 백 제어부(9) 및 데이타 캐쉬 메모리 제어부(10) 등이 구비된다. 명령어 실행부(8)는 인출된 명령어를 실제로 실행하는 부분이다. 데이타 캐쉬 메모리 제어부(10)는 명령어 실행부(8)에서 실행하고자 하는 명령어를 분석하여 필요한 데이타를 데이타 캐쉬 메모리(3)에서 인출하여 명령어 실행부(8)에 제공한다.FIG. 2 is a block diagram showing an interconnection relationship between components related to control of the data cache memory of the central processing unit shown in FIG. 1 and the data cache memory. In the CPU 1, there is an instruction prefetch buffer 5, an instruction extractor 6, a decoder 7, an instruction execution unit 8, a write back controller 9, and a data cache memory controller 10. ) And the like. The command execution unit 8 is a part that actually executes the retrieved command. The data cache memory control unit 10 analyzes a command to be executed in the command execution unit 8, extracts necessary data from the data cache memory 3, and provides the data to the command execution unit 8.

그러나 데이타 캐쉬 메모리(3)에서 캐쉬 미스가 발생하면 라이트 백 제어부(9)를 통해 메인 메모리와 데이타 캐쉬 메모리(3) 사이에 라이트 백을 실시한다. 라이트 백이 실시됨으로써 데이타 캐쉬 메모리(3)에는 명령어 실행부(8)의 동작에 필요한 데이타가 확보되지만, 데이타 캐쉬 메모리(3)가 필요한 데이타를 확보하는 동안, 즉 라이트 백 동작이 실시되는 동안 명령어 실행부(8)는 다음 명령어를 실행하지 못하고 대기해야 하기 때문에 중앙처리장치(1)의 동작속도를 떨어뜨리는 커다란 원인이 된다.However, if a cache miss occurs in the data cache memory 3, the write back control unit 9 performs a write back between the main memory and the data cache memory 3. Although data necessary for the operation of the instruction execution unit 8 is secured in the data cache memory 3 by the write back, the instruction execution is executed while the data cache memory 3 secures the data necessary, that is, while the write back operation is performed. The unit 8 is a large cause of slowing down the operation speed of the central processing unit 1 because it must wait without executing the next command.

따라서 본 발명은 명령어가 명령어 실행부에 전달되기 이전 단계에서 미리 다음에 수행될 명령어를 분석한 다음, 분석 결과에 따라 필요한 데이타가 데이타 캐쉬 메모리에 존재하는지를 검사하고, 존재하지 않는 경우에는 메인 메모리에서 필요한 데이타를 인출하여 미리 데이타 캐쉬 메모리에 확보함으로써 데이타 캐쉬 메모리의 캐쉬 미스 발생확률을 감소시키고, 명령어 실행부에서 명령어가 실행될 때 필요한 데이타를 즉시 제공하도록 하여 명령어 실행부의 불필요한 대기시간을 감소시키는 데이타 캐쉬 메모리의 제어장치를 제공하는데 그 목적이 있다.Therefore, the present invention analyzes the instruction to be executed next in advance before the instruction is transferred to the instruction execution unit, and then checks whether the required data exists in the data cache memory according to the analysis result, and if not, in the main memory. By retrieving necessary data and securing it in the data cache memory in advance, the probability of occurrence of cache misses in the data cache memory is reduced, and the data cache reduces unnecessary waiting time by providing the necessary data immediately when the instruction is executed in the instruction execution unit. Its purpose is to provide a control device for a memory.

도 1은 중앙처리장치와 명령어 캐쉬 메모리 및 데이타 캐쉬 메모리, 메인 메모리의 연결관계를 나타낸 블록도.1 is a block diagram showing a connection relationship between a central processing unit, an instruction cache memory, a data cache memory, and a main memory;

도 2는 도 1에 나타낸 중앙처리장치의 데이타 캐쉬 메모리의 제어에 관련된 구성요소와 데이타 캐쉬 메모리의 상호 연결관계를 나타낸 블록도.FIG. 2 is a block diagram showing an interconnection relationship between components related to control of the data cache memory of the central processing unit shown in FIG. 1 and the data cache memory; FIG.

도 3은 본 발명에 따른 데이타 캐쉬 메모리의 제어장치와 데이타 캐쉬 메모리의 상호 연결관계를 나타낸 블록도.3 is a block diagram showing an interconnection relationship between a data cache memory control apparatus and a data cache memory according to the present invention;

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

1, 11 : 중앙처리장치 2 : 명령어 캐쉬 메모리1, 11: central processing unit 2: instruction cache memory

3 : 데이타 캐쉬 메모리 4 : 메인 메모리3: data cache memory 4: main memory

5 : 명령어 전치인출 버퍼 6 : 명령어 인출부5: instruction prefetch buffer 6: instruction fetch unit

7, 12 : 디코더 8 : 명령어 실행부7, 12: decoder 8: instruction execution unit

9 : 라이트 백 제어부 10, 13 : 데이타 캐쉬 메모리 제어부9: write back control unit 10, 13: data cache memory control unit

이와 같은 목적의 본 발명은 메인 메모리 또는 명령어 캐쉬 메모리에서 이후 수행하게될 명령어를 인출하여 보관하는 명령어 전치인출 버퍼와, 명령어 전치인출 버퍼에 보관되어 있는 명령어 가운데 다음에 실행할 명령어를 인출하여 출력하는 명령어 인출부, 명령어 인출부에 의해 인출된 명령어를 실행하는 명령어 실행부, 명령어 전치인출 버퍼에 보관되어 있는 명령어를 수행하는데 필요한 데이타가 데이타 캐쉬 메모리에 존재하는지를 판단하고 필요한 데이타가 데이타 캐쉬 메모리에 존재하지 않는 경우에는 메인 메모리에서 필요한 데이타를 인출하여 데이타 캐쉬 메모리에 보관하도록 제어하는 데이타 캐쉬 메모리 제어부를 포함하여 이루어진다.The present invention for this purpose is a command prefetch buffer for retrieving and storing instructions to be executed later in the main memory or the instruction cache memory, and instructions for retrieving and outputting the next instruction to be executed among the instructions stored in the instruction prefetch buffer. The fetcher, the instruction executor that executes the instructions fetched by the instruction fetcher, determines whether the data needed to execute the instructions stored in the instruction prefetch buffer exists in the data cache memory, and the necessary data does not exist in the data cache memory. If not, it comprises a data cache memory control unit for controlling to retrieve the necessary data from the main memory to store in the data cache memory.

도 3은 본 발명의 바람직한 실시예를 나타낸 도면으로서, 중앙처리장치의 데이타 캐쉬 메모리의 제어에 관련된 구성요소와 데이타 캐쉬 메모리의 상호 연결관계를 나타내었다. 도 3에서 명령어 전치인출 버퍼(5)는 메인 메모리 또는 명령어 캐쉬 메모리에서 다음에 수행해야 할 명령어들을 인출하여 보관한다. 이때 명령어 전치인출 버퍼(5)는 특정 동작을 수행하는데 필요한 하나 또는 그 이상의 상호 관련된 명령어를 인출하여 보관하는데, 이는 특정 동작을 수행하기 위한 명령어를 미리 인출하여 놓음으로써 보다 빠르게 일련의 동작을 수행하기 위한 것이다. 명령어 인출부(6)는 명령어 전치인출 버퍼(5)에 보관되어 있는 명령어를 실행 순서대로 인출하여 다음 단의 디코더(7)에 전달한다. 디코더(7)는 명령어 인출부(6)에서 출력되는 명령어를 디코딩하여 다음단의 명령어 실행부(8)로 출력함으로써, 명령어 실행부(8)가 디코딩된 명령어를 실행할 수 있도록 한다.3 is a view showing a preferred embodiment of the present invention, showing the interconnection relationship between the components related to the control of the data cache memory of the central processing unit and the data cache memory. In FIG. 3, the instruction prefetch buffer 5 retrieves and stores instructions to be executed next from the main memory or the instruction cache memory. In this case, the instruction prefetch buffer 5 retrieves and stores one or more related instructions necessary to perform a specific operation, which is a faster way to perform a series of operations by prefetching an instruction to perform a specific operation. It is for. The instruction fetcher 6 retrieves the instructions stored in the instruction prefetch buffer 5 in the order of execution and transfers the instructions to the decoder 7 of the next stage. The decoder 7 decodes the command output from the command extractor 6 and outputs the command to the next command execution unit 8 so that the command execution unit 8 can execute the decoded command.

도 3에서 명령어 실행부(8)와 상호 데이타를 주고받거나, 또는 명령어 실행부(8)의 제어대상으로는 라이트 백 제어부(9)와 데이타 캐쉬 메모리(3), 데이타 캐쉬 메모리 제어부(13)가 있다. 라이트 백 제어부(9)는 데이타 캐쉬 메모리(3)에 캐쉬 미스가 발생했을 때 데이타 캐쉬 메모리(3)와 메인 메모리 사이에서 이루어지는 라이트 백 동작을 제어한다. 데이타 캐쉬 메모리(3)는 명령어 실행부(8)에서 소정의 명령어를 실행하는데 필요한 데이타를 제공한다.In FIG. 3, the write back control unit 9, the data cache memory 3, and the data cache memory control unit 13 exchange data with the command execution unit 8 or control objects of the command execution unit 8. have. The writeback control unit 9 controls the writeback operation performed between the data cache memory 3 and the main memory when a cache miss occurs in the data cache memory 3. The data cache memory 3 provides data necessary for executing a predetermined instruction in the instruction execution section 8.

특히 데이타 캐쉬 메모리 제어부(13)는 명령어 실행부(8)에 입력되어 있는 명령어를 분석하여, 명령어의 실행에 필요한 데이타가 데이타 캐쉬 메모리(3)에 존재하는지를 판단하여 필요한 데이타를 확보하는 기존의 기능과 함께, 명령어 전치인출 버퍼(5)에 보관되어 있는 명령어를 분석하여 명령어 전치인출 버퍼(5)에 대기중인 명령어의 실행에 필요한 데이타를 데이타 캐쉬 메모리(3)에 확보하는 기능을 가지고 있다.In particular, the data cache memory control unit 13 analyzes the commands input to the command execution unit 8, and determines whether the data necessary for the execution of the command exists in the data cache memory 3 to secure the necessary data. In addition, the data stored in the command prefetch buffer 5 is analyzed to analyze the commands stored in the command prefetch buffer 5 so as to secure data necessary for the execution of the instructions waiting in the data cache memory 3.

명령어 전치인출 버퍼(5)에 보관되어 있는 명령어는 즉시 실행되어야 할 명령어가 아니기 때문에 실제로 명령어 실행부(8)에 의해 실행되기까지는 다소의 시간적 여유를 갖는다. 이 시간적 여유 동안에 데이타 캐쉬 메모리 제어부(13)는 현재 명령어 전치인출 버퍼(5)에 보관되어 있는 명령어를 분석하여 명령어의 실행에 필요한 데이타가 데이타 캐쉬 메모리(3)에 존재하는지를 판단한다. 이때 명령어 전치인출 버퍼(5)를 명령어를 분석하기 위하여 디코더(12)가 사용된다. 필요한 데이타가 데이타 캐시 메모리(3)에 존재하지 않는 경우에는(캐쉬 미스) 메인 메모리에서 필요한 데이타를 인출하여 데이타 캐쉬 메모리(3)에 보관한다. 이 동안에 명령어 전치인출 버퍼(5)에 대기중이던 명령어가 명령어 실행부(8)에 의해 실행될 순서가 되면 데이타 캐쉬 메모리(3)에는 이미 필요한 데이타가 확보되어 있으므로 명령어 실행부(8)는 즉시 명령을 실행할 수 있다.Since the instruction stored in the instruction prefetch buffer 5 is not an instruction to be executed immediately, it has some time to actually be executed by the instruction execution section 8. During this time margin, the data cache memory control unit 13 analyzes the instructions currently stored in the instruction prefetch buffer 5 to determine whether data necessary for the execution of the instructions exists in the data cache memory 3. At this time, the decoder 12 is used to analyze the instruction prefetch buffer 5. If the required data does not exist in the data cache memory 3 (cache miss), the required data is extracted from the main memory and stored in the data cache memory 3. In the meantime, if the instruction waiting in the instruction prefetch buffer 5 is in the order to be executed by the instruction execution section 8, the data execution memory 8 already secures the necessary data, so that the instruction execution section 8 immediately executes the instruction. You can run

만약 필요한 데이타가 데이타 캐쉬 메모리(3)에 존재한다면(캐쉬 히트) 데이타 캐쉬 메모리 제어부(13)는 기존과 같은 일반적인 동작을 수행한다. 즉, 데이타 캐쉬 메모리 제어부(13)는 명령어 실행부(8)에 입력되어 있는 명령어를 분석하고, 분석 결과에 따라 필요한 데이타가 데이타 캐쉬 메모리(3)에 존재하는지를 판단한다. 만약 존재한다면 데이타를 인출하여 명령어 실행부(8)에 데이타를 제공함으로써 명령어 실행부(8)는 정상적으로 명령어를 실행한다. 그러나 데이타 캐쉬 메모리(3)에 필요한 데이타가 존재하지 않아 캐쉬 미스가 발생하면 라이트 백 제어부(9)를 통하여 메인 메모리에서 필요한 데이타를 인출하여 데이타 캐쉬 메모리(3)에 보관한다. 명령어 실행부(8)는 데이타 캐쉬 메모리(3)에 확보된 데이타를 이용하여 명령을 수행한다.If necessary data exists in the data cache memory 3 (cache hit), the data cache memory control unit 13 performs the same general operation as before. That is, the data cache memory control unit 13 analyzes the command input to the instruction execution unit 8 and determines whether necessary data exists in the data cache memory 3 according to the analysis result. If present, the instruction execution section 8 executes the instruction normally by retrieving the data and providing the data to the instruction execution section 8. However, if a cache miss occurs because data necessary for the data cache memory 3 does not exist, the necessary data is extracted from the main memory through the writeback control unit 9 and stored in the data cache memory 3. The instruction execution unit 8 executes a command using the data secured in the data cache memory 3.

이상 설명한 바와 같이 본 발명에 따른 데이타 캐쉬 메모리 제어부(13)는 명령어 전치인출 버퍼(5)에서 대기중인 명령어와 명령어 실행부(8)에 입력되어 즉시 실행되어야 하는 명령을 모두 분석하여 각각의 명령어를 실행하는데 필요한 데이타가 데이타 캐쉬 메모리(3)에 존재하는 판단하여 필요한 데이타를 확보함으로써, 현재 명령어 전치인출 버퍼(5)에서 대기중인 명령어가 이후 명령어 실행부(8)에 전달되어 실제로 실행될 때 데이타 캐쉬 메모리(3)에 미리 확보되어 있는 데이타를 이용하여 즉시 실행될 수 있도록 하는 것이다.As described above, the data cache memory controller 13 analyzes all of the instructions waiting in the instruction prefetch buffer 5 and the instructions inputted to the instruction execution unit 8 to be executed immediately and analyzes each instruction. By determining that the data required for execution exists in the data cache memory 3 and securing the necessary data, the data waiting when the instruction currently waiting in the instruction prefetch buffer 5 is subsequently transferred to the instruction execution section 8 and actually executed. The data secured in the memory 3 can be immediately executed.

본 발명에 따른 데이타 캐쉬 메모리 제어부는 명령어 전치인출 버퍼에서 대기중인 명령어와 명령어 실행부에 입력되어 즉시 실행되어야 하는 명령을 모두 분석하고, 각각의 명령어를 실행하는데 필요한 데이타가 데이타 캐쉬 메모리에 존재하는 판단하여 필요한 데이타를 확보함으로써 데이타 캐쉬 메모리의 캐쉬 미스 발생확률을 감소시킨다. 따라서 명령어 전치인출 버퍼에서 대기중이던 명령어가 이후 명령어 실행부에 전달되어 실제로 실행될 때 데이타 캐쉬 메모리에 미리 확보되어 있는 데이타를 이용하여 즉시 실행될 수 있도록 함으로써 명령어 실행부의 불필요한 대기시간을 감소시키고, 이는 곧 전체 동작속도를 크게 향상시키는 것이다.The data cache memory controller according to the present invention analyzes all of the instructions waiting in the instruction prefetch buffer and instructions to be executed immediately after being input to the instruction execution unit, and determines whether data necessary to execute each instruction exists in the data cache memory. Therefore, the probability of occurrence of cache misses in the data cache memory is reduced by securing necessary data. Therefore, the instruction waiting in the instruction prefetch buffer is passed to the instruction execution unit later to be executed immediately by using the data already secured in the data cache memory when it is actually executed, thereby reducing unnecessary waiting time of the instruction execution unit. It is to greatly improve the operation speed.

Claims (5)

데이타 캐쉬 메모리의 제어장치에 있어서,In the controller of the data cache memory, 메인 메모리 또는 명령어 캐쉬 메모리에서 이후 수행해야 할 명령어를 인출하여 보관하는 명령어 전치인출 버퍼와;An instruction prefetch buffer that retrieves and stores instructions to be executed later in the main memory or the instruction cache memory; 상기 명령어 전치인출 버퍼에 보관되어 있는 상기 명령어 가운데 다음에 실행할 명령어를 인출하여 출력하는 명령어 인출부와;A command fetch unit for fetching and outputting a command to be executed next among the commands stored in the command prefetch buffer; 상기 명령어 인출부에 의해 인출된 명령어를 실행하는 명령어 실행부와;A command execution unit for executing a command fetched by the command extracting unit; 상기 명령어 전치인출 버퍼에 보관되어 있는 상기 명령어를 수행하는데 필요한 데이타가 상기 데이타 캐쉬 메모리에 존재하는지를 판단하고, 필요한 데이타가 상기 데이타 캐쉬 메모리에 존재하지 않는 경우에는 상기 메인 메모리에서 필요한 데이타를 인출하여 상기 데이타 캐쉬 메모리에 보관하도록 제어하는 데이타 캐쉬 메모리 제어부를 포함하는 데이타 캐쉬 메모리의 제어장치.It is determined whether the data required to execute the command stored in the command prefetch buffer exists in the data cache memory. If the necessary data does not exist in the data cache memory, the required data is fetched from the main memory. And a data cache memory control unit for controlling the data cache memory to be stored in the data cache memory. 청구항 1에 있어서, 상기 명령어 전치인출 버퍼에 보관되어 있는 상기 명령어가 상기 데이타 캐쉬 메모리 제어부에 디코딩되어 입력되는 데이타 캐쉬 메모리의 제어장치.The apparatus of claim 1, wherein the instructions stored in the instruction prefetch buffer are decoded and input to the data cache memory controller. 청구항 1에 있어서, 상기 명령어 인출부에서 출력되는 명령어가 상기 명령어 실행부에 디코딩되어 입력되는 데이타 캐쉬 메모리의 제어장치.The apparatus of claim 1, wherein the command output from the command extracting unit is decoded and input to the command executing unit. 청구항 1에 있어서, 상기 데이타 캐쉬 메모리 제어부는 상기 명령어 실행부에 입력되는 명령어를 실행하는데 필요한 데이타가 상기 데이타 캐쉬 메모리에 존재하는지를 판단하고, 상기 명령어 실행부에 입력되는 명령어를 실행하는데 필요한 데이타가 상기 데이타 캐쉬 메모리에 존재하지 않는 경우에는 상기 메인 메모리에서 필요한 데이타를 인출하여 상기 데이타 캐쉬 메모리에 보관하도록 제어하는 캐쉬 메모리의 제어장치.The data cache memory control unit of claim 1, wherein the data cache memory controller determines whether data necessary for executing the command input to the command execution unit exists in the data cache memory, and the data required to execute the command input to the command execution unit is determined. The controller of the cache memory which controls to retrieve necessary data from the main memory and to store it in the data cache memory when it does not exist in the data cache memory. 청구항 1에 있어서, 상기 명령어 전치인출 버퍼와 상기 명령어 인출부, 상기 명령어 실행부와 상기 데이타 캐쉬 메모리 제어부가 중앙처리장치의 구성요소인 데이타 캐쉬 메모리의 제어장치.The apparatus of claim 1, wherein the instruction prefetch buffer, the instruction extracting unit, the instruction execution unit, and the data cache memory control unit are components of a central processing unit.
KR1019980002768A 1998-02-02 1998-02-02 Data cache memory controller KR19990068872A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980002768A KR19990068872A (en) 1998-02-02 1998-02-02 Data cache memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980002768A KR19990068872A (en) 1998-02-02 1998-02-02 Data cache memory controller

Publications (1)

Publication Number Publication Date
KR19990068872A true KR19990068872A (en) 1999-09-06

Family

ID=65893016

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980002768A KR19990068872A (en) 1998-02-02 1998-02-02 Data cache memory controller

Country Status (1)

Country Link
KR (1) KR19990068872A (en)

Similar Documents

Publication Publication Date Title
US5948095A (en) Method and apparatus for prefetching data in a computer system
US5838945A (en) Tunable software control of harvard architecture cache memories using prefetch instructions
EP0810517B1 (en) Hardware mechanism for optimizing instruction and data prefetching
US6578130B2 (en) Programmable data prefetch pacing
JP3549079B2 (en) Instruction prefetch method of cache control
US6487639B1 (en) Data cache miss lookaside buffer and method thereof
US9483406B2 (en) Communicating prefetchers that throttle one another
TW201351145A (en) Instruction cache power reduction
KR20180090284A (en) Event-initiated programmable prefetchers
US20080140934A1 (en) Store-Through L2 Cache Mode
US6581138B2 (en) Branch-prediction driven instruction prefetch
JPS6356731A (en) Data processor
US6922753B2 (en) Cache prefetching
US6446143B1 (en) Methods and apparatus for minimizing the impact of excessive instruction retrieval
JPH0816394A (en) Apparatus and method for prefetch for prefetching of instruction code from system memory
JP2007272280A (en) Data processor
US5715425A (en) Apparatus and method for prefetching data into an external cache
CN112148366A (en) FLASH acceleration method for reducing power consumption and improving performance of chip
US7007137B2 (en) Method and architecture capable of accessing data and instructions using store and forward
KR100282225B1 (en) Data cache memory controller
KR19990068872A (en) Data cache memory controller
JP5116275B2 (en) Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus
US8458407B2 (en) Device and method for generating cache user initiated pre-fetch requests
JPH0477344B2 (en)
JPH0651982A (en) Arithmetic processing unit

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application