KR100737741B1 - Memory device using multi-dimensional data prefetch cache, and control method for the same - Google Patents
Memory device using multi-dimensional data prefetch cache, and control method for the same Download PDFInfo
- Publication number
- KR100737741B1 KR100737741B1 KR1020060001510A KR20060001510A KR100737741B1 KR 100737741 B1 KR100737741 B1 KR 100737741B1 KR 1020060001510 A KR1020060001510 A KR 1020060001510A KR 20060001510 A KR20060001510 A KR 20060001510A KR 100737741 B1 KR100737741 B1 KR 100737741B1
- Authority
- KR
- South Korea
- Prior art keywords
- data
- cache
- memory
- prefetch
- address
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1668—Details of memory controller
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4204—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
- G06F13/4208—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being a system bus, e.g. VME bus, Futurebus, Multibus
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
도 1은 종래 캐쉬의 구성도,1 is a block diagram of a conventional cache,
도 2는 종래 캐쉬를 이용한 선인출 데이터 적재 과정을 나타낸 개략도,2 is a schematic diagram showing a prefetch data loading process using a conventional cache;
도 3은 시스템 버스와 메모리 사이에 캐쉬를 두어 고속의 데이터 처리 장치들이 접근할 수 있도록 한 메모리 장치의 구조도,3 is a structural diagram of a memory device having a cache between a system bus and a memory so that high-speed data processing devices can access the memory device;
도 4는 본 발명에 따른 다차원 데이터 선인출 캐쉬를 이용한 메모리 장치의 블록 구성도,4 is a block diagram of a memory device using a multi-dimensional data prefetch cache according to the present invention;
도 5는 도 4에 도시된 메모리 접근 판별부의 상세 구성도,FIG. 5 is a detailed configuration diagram of the memory access determining unit shown in FIG. 4;
도 6은 본 발명에 따른 다차원 데이터 선인출 캐쉬의 상세 회로도,6 is a detailed circuit diagram of a multidimensional data prefetch cache according to the present invention;
도 7은 본 발명에 따른 다차원 데이터 선인출 캐쉬을 이용한 메모리 제어 과정을 나타낸 흐름도,7 is a flowchart illustrating a memory control process using a multidimensional data prefetch cache according to the present invention;
도 8은 본 발명에 따른 다차원 데이터의 공간 지역성을 이용한 라인 교체 과정을 나타낸 개략도이다.8 is a schematic diagram illustrating a line replacement process using spatial locality of multidimensional data according to the present invention.
삭제delete
삭제delete
삭제delete
삭제delete
본 발명은 캐쉬를 이용한 메모리 기술에 관한 것으로, 특히 영상 데이터와 같은 다차원 데이터를 선인출 하는 기능이 구비된 캐쉬를 이용한 메모리 장치 및 그 제어 방법에 관한 것이다.The present invention relates to a memory technology using a cache, and more particularly, to a memory device using a cache having a function of prefetching multidimensional data such as image data and a control method thereof.
컴퓨터를 사용할 때, 프로그램이 들어있는 곳은 일반적으로 제2 저장장치, 즉 HDD(Hard Disk Drive)이다. HDD에 저장된 데이터가 실행되면 이때 필요한 코드와 데이터가 부분적으로 메모리에 적재된다. 메모리는 주기억장치를 의미하는 것으로 통상 메인보드(Main Board)에 삽입되어 중앙처리장치에서 연산할 자료를 임시로 저장하는 역할을 수행한다. When using a computer, the place where the program is located is usually a second storage device, or HDD (Hard Disk Drive). When the data stored in the HDD is executed, the necessary code and data are partially loaded into the memory. The memory refers to the main memory, and is usually inserted into the main board to temporarily store data to be calculated in the central processing unit.
중앙처리장치는 고속 장치로서 그 속도는 매우 빠르게 향상되고 있다. 반면, 저장용량 향상에 초점을 두었던 메모리는 속도면에서 중앙처리장치를 따라가지 못하고 있다. 그런데 HDD에 저장된 데이터가 프로세싱되면('프로세스'란 프로그램의 일부분이 동적으로 메모리에 적재되는 것을 의미), 이때 필요한 코드(또는 명령어)와 데이터를 실행하고 연산하는 일은 중앙처리장치가 담당하고 있다. 중앙처리장치 가 명령어와 데이터를 가져올 수 있도록 이것을 건네주는 메모리의 속도는 중앙처리장치의 속도에 훨씬 못 미친다. 그래서 이를 해결하기 위한 방안으로 나온 것이 캐쉬로 고속의 중앙처리장치와 저속의 메모리 사이에 위치하여 둘 간의 속도 차이를 보상하기 위해 사용되는 메모리이다.The central processing unit is a high speed device, and its speed is increasing very quickly. On the other hand, memory that focused on improving storage capacity cannot keep up with the central processing unit in terms of speed. When data stored in the HDD is processed ('process' means that a part of the program is dynamically loaded into the memory), the central processing unit is in charge of executing and computing the necessary code (or instructions) and data. The speed of the memory passed to it so that it can get instructions and data is much less than the speed of the CPU. Therefore, the solution to solve this problem is a cache, which is located between the high speed CPU and the low speed memory and used to compensate for the speed difference between the two.
캐쉬(Cache)는 데이터를 메모리로부터 미리 가져와 중앙처리장치로 넘겨주는역할을 하는데, 이때 캐쉬는 중앙처리장치가 원하는 데이터가 무엇인지를 미리 알고 메모리로부터 가져온다. 즉 캐쉬는 중앙처리장치가 무엇을 원하는지 알고 있는 것이다. 이것이 가능한 것은 캐쉬가 데이터 참조의 지역성(locality of reference)을 이용하기 때문인데, '참조 지역성'은 메모리 참조가 특정 영역에 집중적으로 발생하는 경향이 있다는 것으로, 긴 시간 동안 프로그램이 참조하는 메모리 위치는 변하지만, 짧은 시간 동안을 본다면 프로세서는 주로 일정한 범위 내에서 집중적으로 메모리를 참조하는 특성을 지니고 있음을 의미한다. Cache takes the data from the memory in advance and passes it to the CPU. The cache knows in advance what data the CPU wants and retrieves it from the memory. That is, the cache knows what the CPU wants. This is possible because the cache takes advantage of the locality of reference of data references, which means that memory references tend to concentrate on specific regions. However, in the short term, it means that the processor has a characteristic of intensively referencing memory within a certain range.
참조 지역성은 두 가지로 나타낼 수 있는데, 첫째는 '시간 지역성(temporal locality)'으로 현재 참조된 주소(또는 데이터)가 가까운 미래에도 참조될 가능성이 높다는 것이고, 둘째는 '공간 지역성(spatial locality)'으로 특정 데이터가 참조되면 주변의 데이터들이 계속 참조될 가능성이 높다는 것이다. Reference locality can be expressed in two ways: first, the temporal locality is likely to refer to the address (or data) that is currently referenced in the near future, and second, the spatial locality. In other words, when specific data is referred to, it is likely that surrounding data is continuously referred to.
도 1은 종래 기술에 의한 캐쉬를 나타낸 도면이다. 1 is a view showing a cache according to the prior art.
도 1을 참조하면, 중앙처리장치(110)는 시스템 버스(190)를 통해 메모리(170)에 접근하여 작업 실행에 필요한 데이터를 메모리(170)로부터 캐쉬(130)로 적 재한 후 중앙처리장치(110)에 전달된다. 이와 같이 단계적 데이터 전달 방식은 고속으로 동작하는 중앙처리장치(110)가 저속의 메모리에 적재되어 있는 데이터를 보다 빠른 속도로 접근할 수 있도록 한다. 한편 하드웨어 장치(150)의 경우는 데이터 요청 시에 저속의 메모리(170)에 직접 접근해야 하므로 고속의 데이터 처리에 한계를 가진다.Referring to FIG. 1, the
캐쉬(130)는 고비용, 소용량이므로 메모리(170)로부터 데이터를 읽어 적재할 때, 적재 공간에 한계가 설정되어 있다. 그에 따라 시간 지역성과 공간 지역성에 기초하여 캐쉬 내에 적재되어 있는 데이터와 앞으로 적재될 데이터를 교체하는 동작을 수행하게 된다. 공간 지역성에 따른 교체 방식으로, 접근하려는 데이터를 포함한 근처의 일정 영역의 데이터를 적재하고, 현재 접근하려는 데이터와 공간적으로 가장 먼 거리에 해당하는 데이터를 교체 대상으로 결정하여 다음 교체 동작시 교체시킨다. 한편 시간 지역성에 따른 교체 방식으로, 새로운 라인을 캐쉬에 적재할 때 가장 오랫동안 접근하지 않았던 데이터 블록을 교체 대상으로하여 새로운 블록을 적재하도록 한다.Since the
도 2는 종래기술에 의한 캐쉬를 이용한 선인출 데이터 적재 방법을 나타내는 도면으로 메모리(230)에 저장되어 있는 데이터 블록(250)을 캐쉬(210)로 적재하는 방법을 보여주고 있다. 캐쉬(210)와 메모리(230) 사이의 데이터 전송 단위는 데이터 블록(또는 라인, 이하 데이터 블록이라 칭함)으로서, 이때 데이터 블록은 1차원 공간 데이터이다. FIG. 2 is a diagram illustrating a method of loading prefetch data using a cache according to the related art, and illustrates a method of loading a
1차원 공간 데이터를 처리하는 것은 종래의 캐쉬를 이용하는 것만으로도 좋 은 성능을 얻을 수 있다. 그러나 영상 데이터와 같은 다차원 공간 데이터를 주로 다루는 멀티미디어 데이터의 경우에는, 예를 들어 영상 압축을 위해서 특정 영역의 블록 데이터(예: 16x16 매크로 블록)를 읽어와야 하는 등 각종의 블록 액세스 동작이 필요하므로, 1차원 공간 데이터를 주로 다루는 종래의 캐쉬만으로는 높은 효율을 기대하기 어렵다.Processing one-dimensional spatial data can achieve good performance only by using a conventional cache. However, in the case of multimedia data mainly dealing with multidimensional spatial data such as video data, various block access operations are required, for example, to read block data of a specific region (for example, 16x16 macroblock) for video compression. It is difficult to expect high efficiency only with the conventional cache which mainly deals with one-dimensional spatial data.
이처럼 종래의 캐쉬는 중앙처리장치와 메모리 사이의 속도차로 인해 발생하는 데이터 체증을 해결하기 위한 것으로, 독립적인 데이터 처리를 하는 하드웨어의 경우 저속의 메모리를 직접 접근해야 하므로 데이터 공급의 속도가 메모리 접근 속도에 의해 제한되어 고속 데이터 처리에 한계가 있다. 또한 다차원 데이터에 대해서는 시간 지역성과 공간 지역성을 충분히 활용하지 못함으로써 그 성능이 충분히 발휘되지 못하고 이로 인해 영상 처리 등과 같은 멀티미디어 데이터 처리에 성능저하가 발생하게 된다. As such, the conventional cache is used to solve the data congestion caused by the speed difference between the central processing unit and the memory. In the case of hardware that performs independent data processing, the low speed memory needs to be accessed directly, so the speed of data supply is faster. There is a limit to high speed data processing. In addition, due to insufficient utilization of temporal locality and spatial locality for multidimensional data, its performance is not sufficiently exhibited, resulting in performance degradation in multimedia data processing such as image processing.
따라서 본 발명은 상기와 같은 종래의 문제점을 해결하기 위해 안출된 것으로서, 영상 데이터와 같은 다차원 공간 데이터 특성을 갖는 멀티미디어 데이터를 처리하기 위한 다차원 데이터 선인출 캐쉬를 이용한 메모리 기술을 제공하고, 멀티미디어 데이터의 고속 처리를 위하여 하드웨어 장치의 메모리 접근에 대한 효율을 향상시키며, 캐쉬 라인 교체 동작에서 라인 교체 대상 선정시 공간 지역성을 함께 적용함으로써 캐쉬 히트율을 높이는 것을 목적으로 한다.Accordingly, the present invention has been made to solve the above-mentioned conventional problems, and provides a memory technology using a multidimensional data prefetch cache for processing multimedia data having multidimensional spatial data characteristics such as image data. The purpose of the present invention is to improve the efficiency of memory access of a hardware device for high speed processing and to increase the cache hit rate by applying spatial locality when selecting a line replacement target in a cache line replacement operation.
상기의 목적을 달성하기 위하여, 본 발명은 외부 장치와 인터페이싱되는 시스템 버스 및 각종의 데이터를 저장하는 메모리 사이를 매개하는 메모리 장치로서, 상기 메모리로부터 일차원 데이터를 선인출 적재하여 저장하고, 상기 선인출된 데이터를 요구에 따라 상기 시스템 버스를 통해 외부 장치로 전달하여 데이터 처리되도록 제공하는 데이터 캐쉬; 상기 메모리로부터 다차원 데이터를 선인출 적재하여 저장하고, 상기 선인출된 데이터를 요구에 따라 상기 시스템 버스를 통해 외부 장치로 전달하여 데이터 처리되도록 제공하는 다차원 선인출 캐쉬; 상기 시스템 버스로부터 제공되는 데이터 요구에 대응하여, 상기 데이터 요구의 입력 어드레스와 기설정된 메모리 영역 정보와의 비교를 통해, 상기 데이터 캐쉬와 상기 다차원 선인출 캐쉬 중에서 상기 데이터 요구에 따라 접근할 캐쉬를 선택 제공하는 메모리 접근 판별부; 및 상기 메모리 접근 판별부에 의해 선택된 캐쉬와 상기 메모리를 연결하는 메모리 제어기;를 포함하는 메모리 장치를 개시한다.In order to achieve the above object, the present invention is a memory device that intervenes between a system bus interfaced with an external device and a memory for storing various types of data, and preloading and storing one-dimensional data from the memory. A data cache configured to deliver the processed data to an external device through the system bus as required and to be processed; A multidimensional prefetch cache configured to preload and store multidimensional data from the memory, and to transfer the prefetched data to an external device through the system bus as required to provide data processing; In response to a data request provided from the system bus, a cache to be accessed according to the data request is selected from the data cache and the multidimensional prefetch cache by comparing the input address of the data request with preset memory area information. Providing a memory access determination unit; And a memory controller connecting the cache selected by the memory access determination unit and the memory.
또한, 상기의 목적을 달성하기 위하여, 본 발명은 다차원 선인출 캐쉬를 이용한 메모리 제어 방법으로서, 시스템 버스로부터 메모리 접근 판별부로의 메모리 접근 요청을 수신하는 제1단계; 상기 시스템 버스에서 출력되어 다차원 선인출 캐쉬로 입력되는 어드레스의 인덱스와 태그를 이용하여 캐쉬 내 접근하려는 데이터의 존재 여부를 검사하는 제2단계; 상기 제2단계에서 캐쉬 미스가 발생하여 해당 데이터가 포함된 데이터 블록을 메모리로부터 선인출하여 다차원 선인출 캐쉬에 적재하 는 제3단계; 상기 제3단계 완료 후, 선인출 영역에 대한 어드레스를 생성하는 제4단계; 상기 제4단계에서 생성한 어드레스를 선인출 데이터 검사부로 입력하여 상기 생성 어드레스의 태그와 인덱스를 바탕으로 선인출할 데이터 블록의 캐쉬 내 존재 여부를 검사하는 제5단계; 상기 제5단계에서 선인출 데이터 미스가 발생하면 메모리로부터 데이터 블록을 선인출하여 다차원 선인출 데이터 캐쉬로 적재하는 제6단계; 및 선인출 영역의 모든 데이터에 대한 선인출 작업 완료 여부를 검사하며 완료되지 않은 경우 선인출 어드레스 값을 갱신하여 다음 데이터 블록에 대한 선인출을 수행하는 제7단계;를 포함하는 메모리 제어 방법을 개시한다.In addition, in order to achieve the above object, the present invention provides a memory control method using a multidimensional prefetch cache, comprising: a first step of receiving a memory access request from a system bus to a memory access determination unit; A second step of checking whether there is data to be accessed in the cache by using an index and a tag of an address output from the system bus and input to a multidimensional prefetch cache; A third step of causing a cache miss in the second step to prefetch the data block containing the corresponding data from the memory and to load the data block into the multidimensional prefetch cache; A fourth step of generating an address for the prefetch area after completion of the third step; A fifth step of checking whether a data block to be prefetched exists in the cache based on a tag and an index of the generation address by inputting the address generated in the fourth step to the prefetch data checker; A sixth step of prefetching a data block from a memory and loading it into a multi-dimensional prefetch data cache when a prefetch data miss occurs in the fifth step; And a seventh step of checking whether or not the prefetch operation is completed for all data in the prefetch area, and updating the prefetch address value to perform prefetch for the next data block if it is not completed. do.
이하, 본 발명의 일 실시예에 의한 다차원 데이터 선인출 캐쉬를 이용한 메모리 장치 및 제어 방법에 대하여 첨부된 도면을 참조하여 상세하게 설명하기로 한다.Hereinafter, a memory device and a control method using a multi-dimensional data prefetch cache according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.
일반적으로 캐쉬는 고속의 중앙처리장치와 저속의 메모리 사이에서 발생하는 속도차이를 보완하기 위해 주로 사용되지만, 고속 데이터 처리를 위한 다른 하드웨어 장치와 저속 동작의 메모리 사이에서 둘 간의 속도 차이를 보상하는 기능을 수행할 수도 있다. 도 3은 시스템 버스와 메모리 사이에 캐쉬를 두어 고속의 데이터 처리 장치들이 접근할 수 있도록 한 메모리 장치의 구조를 나타낸 것이다. 고속의 데이터 접근 동작은 중앙처리장치(310)뿐만 아니라 데이터 처리 하드웨어(350, 360)에 의해서도 요구되므로 효율적인 데이터 공급을 위한 메모리 장치은 전체 시스템의 성능을 좌우하게 된다. 또한 접근하는 데이터의 양이 늘어날수록 적은 양의 자원을 사용하면서도 시스템 성능을 저하시키지 않는 효율적인 메모리 장치이 요구된다.In general, the cache is mainly used to compensate for the speed difference between the high speed central processing unit and the low speed memory, but the ability to compensate for the speed difference between the other hardware devices for high speed data processing and the low speed memory You can also do Figure 3 shows the structure of a memory device having a cache between the system bus and the memory so that high-speed data processing devices can access it. Since a high speed data access operation is required not only by the
제2 캐쉬(330)는 시스템 버스(370)와 메모리(340) 사이에 위치하여 고속 데이터 처리 하드웨어(350,360)와 메모리(340) 간의 데이터 교환 장치 역할을 동시에 수행함으로써 메모리(340)를 단독으로 액세스하여 사용할 때보다 빠른 데이터 전달이 가능케 하며, 그에 따른 성능향상은 데이터 처리 하드웨어(350, 360)가 영상 데이터와 같은 멀티미디어 데이터를 처리하는 하드웨어 장치이고 제2 캐쉬(330)가 다차원 데이터 선인출 캐쉬일 때 특히 현저하다.The
본 발명은 제2 캐쉬(330)의 기능을 포함한 다차원 데이터를 적재할 수 있는 캐쉬장치를 이용한 메모리 장치으로서 그 구성의 상세한 내용을 도 4를 참조하여 설명하면 다음과 같다.The present invention is a memory device using a cache device that can load multi-dimensional data including the function of the
도 4에 도시된 바와 같이, 본 발명의 다차원 데이터 선인출 캐쉬를 이용한 메모리 장치(400)는 다차원 데이터 선인출 캐쉬(430)와 종래 기술에 의한 일반적인 개념의 데이터 캐쉬(440)를 시스템 버스(410)와 메모리(460) 사이에 구비함으로써 구성된다.As shown in FIG. 4, the
시스템 버스(410)는 외부의 고속 데이터 처리를 위한 하드웨어 장치 및 중앙처리장치가 메모리에 접근할 수 있도록, 메모리(46)와의 연결을 중재하는 역할을 수행한다. The
시스템 버스(410)로부터 출력된 어드레스와 데이터는 메모리 접근 판별부 (420)로 입력되고, 이를 수신한 메모리 접근 판별부(420)는 기 설정된 메모리 영역 정보와의 비교를 통해 시스템 버스(410)가 접근하고자 하는 데이터가 종래의 데이터 캐쉬(440)에 해당하는지 또는 다차원 데이터 선인출 캐쉬(430)에 해당하는지를 선택함으로써 메모리 접근 경로를 결정하는 역할을 수행한다. 이때, 메모리 접근 판별부(420)는 메모리 설정 정보 저장부, 메모리 영역 판별부 및 영역 설정 정보 선택 출력부를 포함하여 구성되며, 이것은 도 5를 참조하여 상세하게 설명하기로 한다.The address and data output from the
다차원 데이터 선인출 캐쉬(430)는 본 발명의 캐쉬로서, 다차원 공간 데이터, 즉 영상데이터 등과 같은 멀티미디어 데이터를 메모리로부터 가져와 적재하고, 이를 고속의 데이터 처리를 위한 하드웨어 장치로 전달하는 역할을 수행한다. 다차원 데이터 선인출 캐쉬(430)의 구성요소는 도 6을 참조하여 설명하기로 한다.The multi-dimensional
데이터 캐쉬(440)는 종래의 캐쉬 기능을 수행하는 것으로, 1차원 데이터를 메모리로부터 읽어서 이를 적재하고 있는 메모리를 의미한다. The
메모리 제어기(450)는 시스템 버스(410)가 접근하려는 메모리 영역이 다차원 데이터 선인출 캐쉬(430)에서 사용하는 영역에 해당되는지 또는 종래의 데이터 캐쉬(440)에서 사용하는 영역에 해당되는지를 판단하는 상기 메모리 접근 판별부(420)의 판단 결과에 대응하여 해당 캐쉬와 메모리(460) 사이의 경로를 설정하여 이들을 연결하는 역할을 수행한다.The
메모리(460)는 일반적으로 램(RAM : Random Access Memory)이라 부르는 주기억장치 주메모리, 즉 메인보드 메모리 모듈에 삽입하여 사용하는 메모리를 의미하 며 프로세스 실행에 필요한 데이터 및 명령어를 적재한 상태에서, 요청에 따라 캐쉬로 전달하는 역할을 수행한다.The
도 5는 시스템 버스에서 출력되는 어드레스를 기 설정된 메모리 영역 설정 정보에 따라 사용할 캐쉬를 결정하는 메모리 접근 판별부의 구성을 나타낸 것이다. 도 5에 도시된 바와 같이, 메모리 접근 판별부(500)의 메모리 설정 정보 저장부(510)는 다수개의 메모리 영역 범위 즉, 어드레스 범위 정보(515)와 상기 어드레스 영역에 대응하여 설정된 메모리 접근 정보(513)를 저장한다. 이렇게 메모리 설정 정보 저장부(510)에 저장된 정보, 즉 어드레스 범위 정보(515)와 메모리 접근 정보(513)는 다수개의 어드레스 범위 비교기(535)를 구비하고 있는 메모리 영역 판별부(530)로 다수개의 어드레스 영역을 출력하여, 시스템 버스로부터 어드레스를 입력받을 때 해당 입력 어드레스 영역이 어떤 영역에 해당되는지를 판단할 수 있도록 한다. 영역 설정 정보 선택 출력부(550)는 메모리 영역 판별부(530)의 출력으로부터 해당 영역의 설정 정보를 선택 출력하여 시스템 버스가 접근하고자 하는 영역이 다차원 데이터 선인출 캐쉬를 사용하는 영역으로 설정되어 있으면 데이터 입출력 경로를 본 발명의 캐쉬를 통해 메모리와 접근되도록 하는 제어신호를 발생시키고, 영역 설정 정보가 종래의 데이터 캐쉬를 사용하도록 설정되어 있으면, 시스템 버스의 데이터 연결 경로가 종래의 데이터 캐쉬를 통해 메모리에 접근할 수 있도록 하는 제어신호를 발생시킨다.FIG. 5 illustrates a configuration of a memory access determining unit that determines a cache to use an address output from a system bus according to preset memory area setting information. As illustrated in FIG. 5, the memory setting
도 6은 본 발명에 따른 다차원 데이터 선인출 캐쉬에 대한 구성도이다. 6 is a block diagram of a multi-dimensional data prefetch cache according to the present invention.
도 6에 도시된 바와 같이, 다차원 데이터 선인출 캐쉬는 시스템 버스로부터 출력된 어드레스(610)의 인덱스(613)에 의해 다수의 블록데이터(BD1, BD2, ...BDn)들을 저장하는 데이터 저장부(620), 데이터 저장부(620)에 저장되어 있는 각 블록데이터에 대한 태그(T1, T2,...Tn)를 저장하는 태그 저장부(630), 각 블록데이터에 대한 유효 상태를 나타내는 유효 비트(V1, V2,...Vn)가 저장된 유효비트 저장부(640), 시스템 버스에서 출력되는 어드레스의 태그 부분(611)과 시스템 버스에서 출력되는 어드레스의 인덱스 부분(613)에 의해 출력되는 유효 비트를 사용하여 현재 시스템 버스에서 접근하려는 데이터가 캐쉬에 존재할 경우, 캐쉬 히트(Cache Hit) 신호를 발생하고, 그렇지 않으면 캐쉬 미스(Cache Miss) 신호를 발생시키는 캐쉬 데이터 검사부(670)를 포함하여 구성하는데, 이때 캐쉬 데이터 검사부(670)는 시스템 버스로부터 입력되는 어드레스(610)의 인덱스(613)에 따라 태그 저장부(630)에 저장된 태그와 시스템 버스로부터 입력된 어드레스의 태그(611)가 동일한 지를 비교하는 비교부(671)와 비교부의 출력과 유효비트 저장부(640)에 저장된 유효 비트를 논리곱하는 연산부(673)로 구성된다.As shown in FIG. 6, the multi-dimensional data prefetch cache stores a plurality of block data BD1, BD2,... BDn by the
선인출 어드레스 발생부(660)는 선인출 영역 및 선인출 영역 간의 순서를 결정하여 해당 메모리 영역의 어드레스를 생성하는 역할을 수행하고, 선인출 데이터 검사부(680)는 선인출할 데이터가 캐쉬에 존재하는지 여부를 검사하여 선인출할 데이터가 캐쉬에 존재하면 선인출 검사 히트를 발생하고, 그렇지 않으면 선인출 검사 미스를 출력한다. 이때, 선인출 데이터 검사부(680)는 선인출 어드레스 발생부(660)에서 생성된 선인출 어드레스(650)의 인덱스 부분(653)에 의해 추출된 선인출할 블록의 태그와 선인출 어드레스의 태그(651)가 일치하는 지를 검사하는 비교부 (681)와 비교부의 출력과 선인출 어드레스의 인덱스 부분(653)의 입력에 의해 출력되는 블록 유효 비트를 수신하여 이들을 논리곱하는 연산부(683)로 구성된다. The
이 밖에도 다차원 데이터 선인출 캐쉬는, 캐쉬 미스 발생 시 현재 입력되는 어드레스의 인덱스에 의해 출력되어 교체되어야 할 라인을 출력하는 라인 교체 정보를 저장하는 라인 교체 정보 저장부와 캐쉬 히트 시, 같은 인덱스에 의해 출력되는 라인들의 태그 어드레스들과 현재 입력되는 태그 어드레스를 비교하여 현재 입력되는 어드레스와 가장 거리가 먼 블록의 라인 데이터를 다음 라인 교체의 우선 대상으로 설정하는 제어부를 포함하여 구성된다.In addition, the multidimensional data prefetch cache may be output by an index of an address currently input when a cache miss occurs, and a line replacement information storage unit for storing line replacement information for outputting a line to be replaced with the same index during a cache hit. And a control unit which compares the tag addresses of the output lines with the tag addresses currently input and sets the line data of the block farthest from the currently input address as the priority object of the next line replacement.
도 7은 본 발명에 따른 다차원 데이터 선인출 캐쉬를 이용한 메모리 제어 과정을 나타낸 흐름도이다.7 is a flowchart illustrating a memory control process using a multidimensional data prefetch cache according to the present invention.
도 7을 참조하면, 다차원 데이터 선인출 캐쉬를 이용한 메모리 장치을 제어하는 과정은 시스템 버스로부터 메모리 접근 동작이 발생할 경우, 즉 시스템 버스로부터 접근하고자 하는 어드레스를 입력받으면(S10), 메모리 접근 판별부는 기설정된 메모리 접근 제어 정보에 의해 시스템 버스로부터 입력받은 어드레스에 따라 접근할 캐쉬가 무엇인지를 선택하고 해당 입력 어드레스의 경로가 본 발명에 따른 다차원 데이터 선인출 캐쉬인 경우, 캐쉬 데이터 검사부는 시스템 버스로부터 입력되는 어드레스의 인덱스에 따라 태그 저장부에 저장된 태그와 시스템 버스로부터 입력되는 어드레스의 태그가 동일한 지를 비교하고, 비교 결과로서 획득되는 출력값과 유효비트 저장부에 저장된 유효비트와의 논리곱 연산을 통해, 캐쉬 내에 접근하려는 데이터가 있는지 여부를 검사한다(S20).Referring to FIG. 7, in the process of controlling a memory device using the multi-dimensional data prefetch cache, when a memory access operation occurs from the system bus, that is, when an address to be accessed from the system bus is input (S10), the memory access determination unit is preset. If the cache is to be accessed according to the address received from the system bus by the memory access control information, and the path of the corresponding input address is the multi-dimensional data prefetch cache according to the present invention, the cache data check unit is input from the system bus. According to the index of the address, whether the tag stored in the tag storage unit and the tag of the address input from the system bus are the same, and the result of the comparison, the logical value operation and the output value obtained as a comparison result and the valid bit stored in the valid bit storage unit, the cache I have data to access Checks not whether (S20).
제2단계(S20)의 판단 결과, 캐쉬 내에 접근하려는 데이터가 있는 경우, 즉 캐쉬 히트(Cache Hit)이 발생하면 접근하려는 데이터를 캐쉬로부터 출력하고 동작을 완료한다. 만일 캐쉬 내에 접근하려는 데이터가 존재하지 않는 경우에는, 즉 캐쉬 미스(Cache Miss)가 발생하면 현재 캐쉬 미스 블록 어드레스를 선인출 어드레스로 설정하고, 설정된 선인출 어드레스를 메모리 제어기로 출력하여 현재 출력되는 블록 어드레스의 데이터 블록을 다차원 데이터 선인출 캐쉬로 적재한다(S30).As a result of the determination in the second step S20, when there is data to be accessed in the cache, that is, when a cache hit occurs, the data to be accessed is output from the cache and the operation is completed. If there is no data to access in the cache, that is, if a cache miss occurs, the current cache miss block address is set as a prefetch address, and the set prefetch address is output to the memory controller to output the block. The data block of the address is loaded into the multidimensional data prefetch cache (S30).
제3단계(S30)에서 데이터 블록에 대한 적재가 완료되면 선인출 어드레스 발생부에서는 현재의 선인출 어드레스 값에 블록 오프셋(Block Offset) 값을 더하여 새로운 선인출 어드레스를 생성한다(S40). When the loading of the data block is completed in the third step S30, the prefetching address generator generates a new prefetching address by adding a block offset value to the current prefetching address value (S40).
선인출 어드레스 생성부에서 생성한 어드레스는 선인출 데이터 검사부로 입력되어 선인출 어드레스 발생부에서 생성된 선인출 어드레스의 인덱스에 따라 태그 저장부에서 출력된 태그와 선인출 어드레스의 태그가 일치하는지를 비교부를 통해 검사하고, 검사 결과로서 획득되는 출력값과 선인출 어드레스의 인덱스 부분의 입력에 의해 출력되는 블록 유효 비트를 연산부를 통해 논리곱 연산함으로써 선인출할 블록이 캐쉬에 이미 있는지를 검사하게 된다(S50).The address generated by the prefetch address generator is input to the prefetch data inspector to compare whether the tag output from the tag storage unit matches the tag of the prefetch address according to the index of the prefetch address generated by the prefetch address generator. In operation S50, the controller determines whether the block to be prefetched is already present in the cache by performing an AND operation on the block valid bit outputted by the input of the index value of the prefetch address and the output value obtained as the test result. .
제5단계(S50)의 판단 결과, 선인출 검사 미스가 발생하면 생성된 선인출 어드레스의 메모리 블록을 캐쉬로 적재하고(S60), 선인출 검사 히트가 발생하면 해당 데이터 블록에 대한 선인출 동작을 수행하지 않고 다음 데이터 블록 어드레스를 생성하여 해당 데이터 블록 어드레스에 대한 선인출 데이터 검사 단계를 수행한다.As a result of the determination in the fifth step S50, when a prefetch check miss occurs, the memory block of the prefetch address generated is loaded into the cache (S60). The next data block address is generated without performing the prefetch data check step for the data block address.
제6단계(S60)에서 선인출 블록 적재 동작이 완료되면, 해당 선인출 영역에 대한 데이터 선인출 완료 여부를 검사하는데(S70), 검사 결과 선인출할 데이터블록이 남아있다면 상기 제4단계(S40)로 진행하여 새로운 선인출 어드레스를 생성함으로써 선인출 어드레스 값을 갱신하고 해당 선인출 어드레스에 대한 데이터 블록 검사를 수행하여 메모리로부터 해당 데이터 블록를 읽어와 적재할 수 있도록 한다.When the prefetching block stacking operation is completed in the sixth step (S60), it is checked whether data prefetching is completed for the corresponding prefetching area (S70). If the data block for prefetching remains as a result of the inspection, the fourth step (S40). In step 1), a new prefetch address is generated to update the prefetch address value and perform a data block check on the prefetch address so that the data block can be read and loaded from the memory.
또한 제7단계(S70) 수행 후, 현재 데이터 선인출 동작이 진행되고 있는 선인출 영역에 대한 블록 선인출 동작이 완료되면 선인출해야 할 또 다른 영역이 존재하는지 여부를 검사하여 선인출할 또 다른 영역이 존재하는 경우, 캐쉬 미스 블록 어드레스 값과 영역 오프셋 값을 더하여 새로운 선인출 어드레스 값을 생성하고 이 어드레스 값을 이용하여 새로운 영역에 대한 데이터 선인출 동작을 수행한다. 한 영역에 대한 선인출 동작이 종료할 때마다 또 다른 선인출 영역이 존재하는지 여부를 검사하여 또 다른 선인출 영역이 존재하지 않을 때까지 선인출 어드레스 발생 동작을 계속해서 수행한다.In addition, after performing the seventh step (S70), when the block prefetching operation for the prefetching area where the data prefetching operation is currently being performed is completed, it is checked whether another area to be prefetched exists and another to prefetch. If the region exists, the cache miss block address value and the region offset value are added to generate a new prefetch address value, and the data prefetch operation for the new region is performed using this address value. Each time the prefetching operation for one region ends, it is checked whether another prefetching region exists and continues the prefetching address generation operation until another prefetching region does not exist.
도 8은 본 발명에 따른 다차원 데이터의 공간 지역성을 이용한 라인 교체 방법을 나타낸 것이다.8 illustrates a line replacement method using spatial locality of multidimensional data according to the present invention.
도 8에 도시된 바와 같이, 캐쉬가 메모리로부터 데이터를 읽어 적재할 때, 캐쉬는 시간 지역성과 공간지역성과 같은 데이터의 참조 지역성(Locality of Reference)이라는 특성을 이용하여 적재되어 있는 데이터와 적재될 데이터와의 교체 동작을 수행하는데 이러한 참조 지역성 중 데이터의 공간 지역성을 활용하기 위해, 캐쉬의 제어부(820)는 캐쉬 데이터 검사부(830)에 대한 결과로 캐쉬 히트 발생 시, 입력되는 어드레스(810)의 인덱스(813)에 의해 출력되는 태그 저장부(840, 850, 860, 870)의 각 라인의 태그 값(841, 851, 861, 871)과 입력 어드레스의 태그 값(811)을 입력으로 받아 현재 입력 어드레스(810)와 가장 먼 거리의 라인을 결정하여, 가장 먼 거리의 라인이 이후에 캐쉬 교체 동작의 대상이 될 수 있도록 상태 정보를 갱신하고, 캐쉬 라인 교체 정보 저장부(830)는 현재 입력되는 어드레스의 인덱스(813)에 의해 출력되어 교체될 라인에 대한 정보를 저장함으로써 캐쉬 미스 발생 시 해당 라인들이 다중화부(880)를 거쳐 출력될 수 있도록 한다.As shown in Fig. 8, when the cache reads and loads data from memory, the cache is loaded with data to be loaded using characteristics of locality of reference such as temporal locality and spatial locality. In order to use the spatial locality of the data among the reference localities in performing the replacement operation with the cache, the
이상에서와 같이, 본 발명에 의한 다차원 데이터 선인출 캐쉬를 이용한 메모리 장치 및 그 제어 방법에 의하면, 영상 처리 등과 같은 멀티미디어 데이터 처리 시 높은 효율을 얻을 수 있다.As described above, according to the memory device and the control method using the multi-dimensional data prefetch cache according to the present invention, it is possible to obtain high efficiency when processing multimedia data such as image processing.
또한, 중앙처리장치를 위한 종래의 캐쉬 기능에 더불어 독립적인 데이터 처리를 수행하는 하드웨어로 데이터 공급시에 메모리 접근 속도를 향상시킬 수 있다.In addition to the conventional cache function for the central processing unit, hardware that performs independent data processing may improve memory access speed when supplying data.
또한, 시간 지역성에 기반한 캐쉬 라인 교체 동작에서 라인 교체 대상 선정 시, 공간 지역성을 함께 적용하여 수행함으로써, 접근하려는 데이터에 대한 캐쉬 히트율(Cache Hit Ratio)을 높일 수 있다.In addition, when selecting a line replacement target in the cache line replacement operation based on temporal locality, the spatial hitability may be applied together to increase the cache hit ratio of the data to be accessed.
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020060001510A KR100737741B1 (en) | 2006-01-05 | 2006-01-05 | Memory device using multi-dimensional data prefetch cache, and control method for the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020060001510A KR100737741B1 (en) | 2006-01-05 | 2006-01-05 | Memory device using multi-dimensional data prefetch cache, and control method for the same |
Publications (1)
Publication Number | Publication Date |
---|---|
KR100737741B1 true KR100737741B1 (en) | 2007-07-10 |
Family
ID=38503856
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020060001510A KR100737741B1 (en) | 2006-01-05 | 2006-01-05 | Memory device using multi-dimensional data prefetch cache, and control method for the same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100737741B1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101550831B1 (en) | 2013-08-29 | 2015-09-08 | 한국과학기술원 | System for image optimized rolling cache |
CN112445753A (en) * | 2014-12-27 | 2021-03-05 | 英特尔公司 | Hardware apparatus and method for prefetching multidimensional blocks of elements from a multidimensional array |
CN116010310A (en) * | 2023-03-21 | 2023-04-25 | 广东华芯微特集成电路有限公司 | SDR-SDRAM controller and control method thereof |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005034516A1 (en) * | 2003-10-04 | 2005-04-14 | Koninklijke Philips Electronics N.V. | Method and apparatus for processing image data |
WO2005091146A1 (en) * | 2004-03-24 | 2005-09-29 | Matsushita Electric Industrial Co., Ltd. | Cache memory and control method thereof |
-
2006
- 2006-01-05 KR KR1020060001510A patent/KR100737741B1/en active IP Right Grant
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005034516A1 (en) * | 2003-10-04 | 2005-04-14 | Koninklijke Philips Electronics N.V. | Method and apparatus for processing image data |
WO2005091146A1 (en) * | 2004-03-24 | 2005-09-29 | Matsushita Electric Industrial Co., Ltd. | Cache memory and control method thereof |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101550831B1 (en) | 2013-08-29 | 2015-09-08 | 한국과학기술원 | System for image optimized rolling cache |
US9454795B2 (en) | 2013-08-29 | 2016-09-27 | Korea Advanced Institute Of Science And Technology | Image optimized rolling cache system |
CN112445753A (en) * | 2014-12-27 | 2021-03-05 | 英特尔公司 | Hardware apparatus and method for prefetching multidimensional blocks of elements from a multidimensional array |
CN112445753B (en) * | 2014-12-27 | 2024-01-16 | 英特尔公司 | Hardware apparatus and method for prefetching multidimensional blocks of elements from a multidimensional array |
CN116010310A (en) * | 2023-03-21 | 2023-04-25 | 广东华芯微特集成电路有限公司 | SDR-SDRAM controller and control method thereof |
CN116010310B (en) * | 2023-03-21 | 2023-07-04 | 广东华芯微特集成电路有限公司 | SDR-SDRAM controller and control method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6782454B1 (en) | System and method for pre-fetching for pointer linked data structures | |
EP2275939B1 (en) | Processor and address translating method | |
US20090037664A1 (en) | System and method for dynamically selecting the fetch path of data for improving processor performance | |
US8296518B2 (en) | Arithmetic processing apparatus and method | |
US20110231612A1 (en) | Pre-fetching for a sibling cache | |
US20050144399A1 (en) | Multiprocessor system, and consistency control device and consistency control method in multiprocessor system | |
US20100217937A1 (en) | Data processing apparatus and method | |
US20090217004A1 (en) | Cache with prefetch | |
US9582422B2 (en) | Hardware prefetcher for indirect access patterns | |
US20090177842A1 (en) | Data processing system and method for prefetching data and/or instructions | |
WO2023173991A1 (en) | Cache line compression prediction and adaptive compression | |
US11921650B2 (en) | Dedicated cache-related block transfer in a memory system | |
KR101109210B1 (en) | Method and apparatus for detecting a data access violation | |
US20100100684A1 (en) | Set associative cache apparatus, set associative cache method and processor system | |
KR100737741B1 (en) | Memory device using multi-dimensional data prefetch cache, and control method for the same | |
US8667325B2 (en) | Method, apparatus and system for providing memory sparing information | |
WO2023173995A1 (en) | Cache line compression prediction and adaptive compression | |
KR20100005539A (en) | Cache memory system and prefetching method thereof | |
US20160335186A1 (en) | Prefetch tag for eviction promotion | |
US7596661B2 (en) | Processing modules with multilevel cache architecture | |
US20040148464A1 (en) | Cache memory device and method of controlling the cache memory device | |
US11048637B2 (en) | High-frequency and low-power L1 cache and associated access technique | |
US11449428B2 (en) | Enhanced read-ahead capability for storage devices | |
CN115269199A (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
US11176039B2 (en) | Cache and method for managing cache |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20130604 Year of fee payment: 7 |
|
FPAY | Annual fee payment |
Payment date: 20140609 Year of fee payment: 8 |
|
FPAY | Annual fee payment |
Payment date: 20150601 Year of fee payment: 9 |
|
FPAY | Annual fee payment |
Payment date: 20160603 Year of fee payment: 10 |
|
FPAY | Annual fee payment |
Payment date: 20170607 Year of fee payment: 11 |
|
FPAY | Annual fee payment |
Payment date: 20180625 Year of fee payment: 12 |
|
FPAY | Annual fee payment |
Payment date: 20190612 Year of fee payment: 13 |