KR100546295B1 - 2-level cache memory system reduces data transfer time - Google Patents
2-level cache memory system reduces data transfer time Download PDFInfo
- Publication number
- KR100546295B1 KR100546295B1 KR1019990030555A KR19990030555A KR100546295B1 KR 100546295 B1 KR100546295 B1 KR 100546295B1 KR 1019990030555 A KR1019990030555 A KR 1019990030555A KR 19990030555 A KR19990030555 A KR 19990030555A KR 100546295 B1 KR100546295 B1 KR 100546295B1
- Authority
- KR
- South Korea
- Prior art keywords
- cache
- level
- data
- tag
- instruction
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0893—Caches characterised by their organisation or structure
- G06F12/0897—Caches characterised by their organisation or structure with two or more cache hierarchy levels
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0804—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0811—Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/3004—Arrangements for executing specific machine instructions to perform operations on memory
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
본 발명에 따른 데이타 전송 시간을 줄인 2-레벨 캐쉬 메모리 시스템은, 태그 및 태그와 연결된 다수의 명령어를 저장하는 제1레벨 명령어 캐쉬, 태그 및 태그와 연결된 다수의 데이타를 저장하는 제1레벨 데이타 캐쉬, 제1선택 신호에 응답하여 제1레벨 명령어 캐쉬의 태그 또는 제1레벨 데이타 캐쉬의 태그를 선택적으로 출력하는 제1멀티플렉서, 제1선택 신호에 응답하여 제1레벨 명령어 캐쉬에 저장된 명령어 또는 제1레벨 데이타 캐쉬에 저장된 데이타를 선택적으로 출력하는 제2멀티플렉서, 태그 및 태그와 연결된 다수의 명령어 또는 데이타를 저장하는 제2레벨 캐쉬, 태그 및 태그와 연결되어 제1레벨 명령어/데이타 캐쉬 또는 제2레벨 캐쉬에서 생성된 다수의 빅팀 명령어 또는 데이타를 버퍼링하는 빅팀 버퍼, 제1레벨 명령어/데이타 캐쉬 또는 제2레벨 캐쉬의 상태 비트를 비교하여 빅팀을 발생시키고, 빅팀 버퍼에 버퍼링된 빅팀 데이타를 제2레벨 캐쉬 또는 메인 메모리로 전송하는 빅팀 제어부 및 제2레벨 캐쉬와 메인 메모리에서 독출되는 데이타 또는 명령어를 입력받아, 제2선택 신호에 응답하여 선택적으로 제1레벨 명령어 캐쉬 또는 제1레벨 데이타 캐쉬로 출력하는 제3멀티플렉서를 구비하는 것을 특징으로 한다. A two-level cache memory system having reduced data transfer time according to the present invention includes a first level instruction cache storing a tag and a plurality of instructions associated with the tag, and a first level data cache storing a plurality of data associated with the tag and the tags. A first multiplexer for selectively outputting a tag of the first level instruction cache or a tag of the first level data cache in response to the first selection signal, an instruction stored in the first level instruction cache in response to the first selection signal, or a first A second multiplexer for selectively outputting data stored in the level data cache, a tag and a plurality of instructions associated with the tag, or a second level cache for storing data, a tag and a tag, and a first level instruction / data cache or a second level Big Buffer, First Level Instruction / Data Cache, or Second Level, which buffers a number of BigTek instructions or data generated by the cache. Compares the status bits of the cache to generate the Victim, and receives the Victim controller that transmits the Victim data buffered in the Victim buffer to the second level cache or main memory, and receives data or instructions read from the second level cache and the main memory. And a third multiplexer selectively outputting the first level instruction cache or the first level data cache in response to the second selection signal.
Description
도 1은 종래의 2-레벨 캐쉬 메모리 시스템을 설명하기 위한 블럭도이다. 1 is a block diagram illustrating a conventional two-level cache memory system.
도 2는 종래의 2-레벨 캐쉬 메모리 시스템을 설명하기 위한 다른 블럭도이다. 2 is another block diagram illustrating a conventional two-level cache memory system.
도 3은 본 발명에 따른 데이타 전송 시간을 줄인 2-레벨 캐쉬 메모리 시스템을 설명하기 위한 실시예의 블럭도이다. Figure 3 is a block diagram of an embodiment for explaining a two-level cache memory system with reduced data transfer time in accordance with the present invention.
도 4는 도 3에 도시된 캐쉬 메모리 시스템에서 캐쉬 메모리의 태그 영역을 설명하기 위한 도면이다. FIG. 4 is a diagram for describing a tag area of a cache memory in the cache memory system shown in FIG. 3.
도 5a 및 도 5b는 도 3에 도시된 캐쉬 메모리 시스템에서 수행되는 메모리 액세스 방법을 설명하기 위한 플로우차트이다. 5A and 5B are flowcharts for describing a memory access method performed in the cache memory system illustrated in FIG. 3.
본 발명은 캐쉬 메모리 시스템에 관한 것으로서, 특히, 데이타 전송 시간을 줄인 2-레벨 캐쉬 메모리 시스템에 관한 것이다. The present invention relates to a cache memory system, and more particularly, to a two-level cache memory system with reduced data transfer time.
도 1은 종래의 2-레벨 캐쉬 메모리 시스템을 설명하기 위한 블럭도로서, 프 로세서(100), 레벨1 명령어 캐쉬(110), 레벨 1 데이타 캐쉬(120), 멀티플렉서들(130, 140, 150) 및 레벨 2캐쉬(160)를 포함한다. 1 is a block diagram illustrating a conventional two-level cache memory system, including a
레벨 1명령어 캐쉬(110)는 태그(TAGS)와, 상기 태그와 연결된 다수의 명령어를 저장하는 캐쉬 블럭으로 구성된다. 여기에서, 태그(TAG)는 프로세서 (100)에서 출력되는 명령어 어드레스(INS_ADD)의 일부를 나타낸다. 또한, 레벨 1 데이타 캐쉬(120)는 태그와, 태그와 연결된 다수의 데이타를 저장하는 캐쉬 블럭으로 구성된다. 멀티플렉서(130)는 제1선택 신호(S1)에 응답하여 명령어 어드레스(INS_ADD) 또는 데이타 어드레스(DT_ADD)를 선택적으로 출력한다. Level 1
레벨2 캐쉬(160)는 태그와, 태그와 연결된 다수의 명령어 또는 데이타를 저장하는 캐쉬 블럭으로 구성된다. 여기에서, 각각의 캐쉬 블럭은 메인 메모리 (미도시)에서 인가된 데이타 또는 명령을 저장하거나, 레벨1 데이타 캐쉬(120)에서 전송된 데이타를 저장한다. Level 2
즉, 도 1에 도시된 프로세서(100)와 같이, 2-레벨 캐쉬 메모리를 이용하는 프로세서는 메모리 명령에 의해 데이타가 요구될 때, 레벨 1 데이타 캐쉬 메모리(120)를 검색하고, 만일 원하는 데이타가 존재하지 않는 경우에 레벨 2 캐쉬(160)를 검색한다. 이 때, 레벨 2캐쉬(160)에 데이타가 존재하지 않는 경우에는 외부의 메인 메모리에서 데이타를 독출하고, 독출된 데이타를 레벨 2캐쉬(160)와 레벨 1캐쉬(120)를 통하여 읽어오게 된다. 이러한 방식으로 데이타를 읽어오는 경우에, 레벨 1 명령어 캐쉬(110)와 레벨 1데이타 캐쉬(120)에 저장된 데이타들은 레벨 2캐쉬(160)에 포함되는 관계가 성립된다. 따라서, 여러 개의 프로세서가 캐쉬 메모리를 공유하는 멀티 프로세서의 시스템 구성이 간단해질 수 있다. 그러나, 외부 메인 메모리에서 인가되는 데이타는 항상 레벨 2캐쉬(160)를 거쳐서 레벨 1캐쉬(120)에 기입되고, 레벨 1캐쉬(120)를 통하여 프로세서(100)로 출력되도록 구현되어 있기 때문에, 데이타의 전송 시간이 길어진다는 단점이 있다. That is, a processor using a two-level cache memory, such as the
도 2는 종래의 2-레벨 캐쉬 메모리 시스템을 설명하기 위한 다른 블럭도로서, 프로세서(200), 레벨 1 명령어 캐쉬(210), 레벨 1데이타 캐쉬(220), 멀티플렉서들(230~260) 및 레벨 2캐쉬(270)를 포함한다. 2 is another block diagram illustrating a conventional two-level cache memory system, which includes a
즉, 도 2의 캐쉬 메모리 시스템에서 프로세서(200), 레벨 1명령어 캐쉬(210) 및 레벨 1데이타 캐쉬(220)는 도 1에 도시된 동일한 명칭을 갖는 블럭과 기능이 같다고 할 수 있다. 다만, 메모리에서 인가되는 데이타 또는 명령어는 레벨 2캐쉬(270)에 저장되지 않고, 직접 레벨 1 명령어 캐쉬 또는 레벨 1데이타 캐쉬에 저장된다는 특징이 있다. 즉, 멀티플렉서(260)는 데이타 선택 신호(S3)에 응답하여 레벨 2 캐쉬(270)에 저장된 데이타 또는 메모리(미도시)에서 독출된 데이타 (RD_DATA)를 선택적으로 레벨 1캐쉬로 출력한다. 이러한 방식으로 캐쉬 메모리 시스템을 구현하게 되면, 프로세서(200)에서 요구하는 데이타를 메모리에서 독출할 때 레벨 2캐쉬(270)를 거치지 않기 때문에 데이타의 전송 속도를 빠르게 할 수 있다는 장점이 있다. 그러나, 레벨 1 캐쉬(210, 220)의 모든 데이타 내용이 레벨 2캐쉬(270)에 포함되어 있어야 한다는 관계가 성립되지 않을 수 있다. 이렇게 되면, 멀티프로세서 시스템 구성 시에 외부 프로세서와의 캐쉬 동기 (COHERENCY)를 이루기 위해 레벨 2캐쉬 뿐 아니라, 레벨 1캐쉬도 액세스해야 하기 때문에 성능이 저하 되고, 이를 방지하기 위해 외부에 DTS(DUPLICATE TAG STORE) 즉, 중복된 태그 저장부를 구현하는 것도 어려워진다는 문제점이 있다. 따라서, 데이타 전송 속도를 빠르게 하면서도 레벨 1캐쉬와 레벨 2캐쉬 간에 포함관계가 성립되어 DTS를 구현할 수 있는 새로운 캐쉬 메모리 시스템이 요구된다. That is, in the cache memory system of FIG. 2, the
본 발명이 이루고자하는 기술적 과제는, 레벨 1 캐쉬와 레벨 2캐쉬 사이의 포함 관계를 만족시키면서, 데이타 전송 시간을 줄일 수 있는 2-레벨 캐쉬 메모리 시스템을 제공하는데 있다.An object of the present invention is to provide a two-level cache memory system capable of reducing data transfer time while satisfying an inclusion relationship between a level 1 cache and a level 2 cache.
상기 과제를 이루기위해, 본 발명에 따른 데이타 전송 시간을 줄인 2-레벨 캐쉬 메모리 시스템은, 태그 및 태그와 연결된 다수의 명령어를 저장하는 제1레벨 명령어 캐쉬, 태그 및 태그와 연결된 다수의 데이타를 저장하는 제1레벨 데이타 캐쉬, 제1선택 신호에 응답하여 제1레벨 명령어 캐쉬의 태그 또는 제1레벨 데이타 캐쉬의 태그를 선택적으로 출력하는 제1멀티플렉서, 제1선택 신호에 응답하여 제1레벨 명령어 캐쉬에 저장된 명령어 또는 제1레벨 데이타 캐쉬에 저장된 데이타를 선택적으로 출력하는 제2멀티플렉서, 태그 및 태그와 연결된 다수의 명령어 또는 데이타를 저장하는 제2레벨 캐쉬, 태그 및 태그와 연결되어 제1레벨 명령어/데이타 캐쉬 또는 제2레벨 캐쉬에서 생성된 다수의 빅팀 명령어 또는 데이타를 버퍼링하는 빅팀 버퍼, 제1레벨 명령어/데이타 캐쉬 또는 제2레벨 캐쉬의 상태 비트를 비교하여 빅팀을 발생시키고, 빅팀 버퍼에 버퍼링된 빅팀 데이타를 제2레벨 캐쉬 또는 메 인 메모리로 전송하는 빅팀 제어부 및 제2레벨 캐쉬와 메인 메모리에서 독출되는 데이타 또는 명령어를 입력받아, 제2선택 신호에 응답하여 선택적으로 제1레벨 명령어 캐쉬 또는 제1레벨 데이타 캐쉬로 출력하는 제3멀티플렉서로 구성되는 것이 바람직하다. In order to achieve the above object, a two-level cache memory system having reduced data transmission time according to the present invention stores a first level instruction cache, a plurality of data associated with a tag and a tag, and a plurality of instructions associated with a tag, and a tag. A first multiplexer selectively outputting a tag of the first level instruction cache or a tag of the first level data cache in response to the first selection signal and a first level instruction cache in response to the first selection signal A second multiplexer for selectively outputting the data stored in the first level data cache or the instruction stored in the second multiplexer, the tag and the tag associated with the second level cache, the tag and the tag for storing the data; Victim buffer, first-level instruction that buffers a number of Victim instructions or data generated from a data cache or second-level cache Victims are generated by comparing the status bits of the data cache or the second level cache, and the Victim controller which transfers the buffered buffer data to the second level cache or the main memory to the second level cache or the main memory and reads from the second level cache and the main memory. A third multiplexer may be configured to receive data or instructions to be output and selectively output the first level instruction cache or the first level data cache in response to the second selection signal.
이하, 본 발명에 따른 데이타 전송 시간을 줄인 2-레벨 캐쉬 메모리 시스템에 관하여 첨부된 도면을 참조하여 다음과 같이 설명한다. Hereinafter, a two-level cache memory system having a reduced data transfer time according to the present invention will be described with reference to the accompanying drawings.
도 3은 본 발명에 따른 데이타 전송 시간을 줄인 2-레벨 캐쉬 메모리 시스템을 설명하기 위한 실시예의 블럭도이다. 도 3을 참조하면, 캐쉬 메모리 시스템은, 레벨 1명령어 캐쉬(310), 레벨 1 데이타 캐쉬(320), 멀티플렉서들(330, 335, 440), 빅팀 버퍼(360), 멀티플렉서(350), 레벨 1 캐쉬 태그 저장부(380), 빅팀 제어부(390) 및 레벨 2캐쉬(370)를 포함한다. 설명의 편의를 위해서 도 3에는 프로세서(300)가 함께 도시된다. Figure 3 is a block diagram of an embodiment for explaining a two-level cache memory system with reduced data transfer time in accordance with the present invention. Referring to FIG. 3, the cache memory system includes a level 1
도 3의 프로세서(300)는 소정의 프로그램을 실행 및 처리하는 블럭으로서, 필요한 명령어 또는 데이타를 얻기 위해, 명령어 어드레스(INS_ADD) 또는 데이타 어드레스(DT_ADD)를 출력하여 레벨 1, 2캐쉬 또는 외부의 메인 메모리(미도시)를 액세스한다. The
레벨 1 명령어 캐쉬(310)는 태그 및 상기 태그와 연결된 다수의 명령어를 저장하도록 구성되며, 프로세서(300)에서 인가되는 명령어 어드레스(INS_ADD)의 태그에 상응하는 명령어를 프로세서(300)로 출력하고, 레벨 2 캐쉬(370)에서 수신된 명령어 또는 메인 메모리에서 독출된 명령어를 저장한다. 여기에서, 태그는 명령어 어드레스 버스(318)와 연결되고, 명령어는 명령어 버스(315)와 연결된다. The level 1
레벨 1 데이타 캐쉬(320)는 태그 및 상기 태그와 연결된 다수의 데이타를 저장하도록 구성되며, 프로세서(300)에서 인가되는 데이타 어드레스(DT_ADD)의 태그에 상응하는 데이타를 프로세서(300)로 출력하고, 레벨 2 캐쉬(370) 또는 메인 메모리에서 독출된 데이타를 저장한다. 여기에서, 태그는 데이타 어드레스 버스(328)와 연결되고, 데이타는 데이타 버스(325)와 연결된다. The level 1
멀티플렉서(330)는 제1선택 신호(S1)에 응답하여 레벨 1 명령어 캐쉬(310)의 태그 또는 레벨 1데이타 캐쉬(320)의 태그를 선택적으로 빅팀 버퍼(360)의 태그 영역으로 출력한다. The
멀티플렉서(335)는 제3선택 신호(S3)에 응답하여 프로세서(300)로부터 인가되는 명령어 어드레스(INS_ADD) 또는 데이타 어드레스(DT_ADD)를 선택적으로 출력하고, 출력된 결과는 빅팀 제어부(390)와 레벨 2캐쉬(370)로 인가되며 레벨 1캐쉬와 레벨 2캐쉬에서 캐쉬 미스(cache miss)가 발생되는 경우에 메모리 독출 어드레스(MEM_R_ADD)로서 출력된다. The
레벨 2캐쉬(370)는 태그 및 상기 태그와 연결된 다수의 명령어 또는 데이타를 저장하고, 메모리 어드레스에 명령어 또는 데이타를 레벨1 캐쉬를 통하여 프로세서(300)로 출력한다. The level 2 cache 370 stores a tag and a plurality of instructions or data connected to the tag, and outputs the instruction or data to the
빅팀 버퍼(360)는 태그 및 상기 태그와 연결되어 제1레벨 명령어/데이타 캐쉬(310/320) 또는 제2레벨 캐쉬(370)에서 생성된 다수의 빅팀 명령어 또는 데이타를 버퍼링한다. The Victim
레벨 1캐쉬 태그 저장부(380)는 레벨 1, 2캐쉬에서 발생되는 빅팀을 효율적으로 제어하기 위해, 레벨 1데이타 캐쉬(320)의 태그를 중복하여 저장한다. 이와 같이, 레벨 1 데이타 캐쉬(320)의 태그를 별도로 중복하여 저장함으로써 프로세서(300)와 레벨 1데이타 캐쉬(320) 사이에서 이루어지는 데이타 독출/기입 동작이 방해되지 않도록 구현한다. The level 1 cache
빅팀 제어부(390)는 레벨 1데이타 캐쉬(320) 또는 레벨 2 캐쉬(370)의 상태 비트를 비교하여 빅팀을 발생시키거나 무효화시키고, 빅팀 버퍼(360)에 버퍼링된 빅팀 데이타를 레벨 2 캐쉬(370) 또는 메인 메모리로 전송한다. The Victim
멀티플렉서(350)는 제2선택 신호(S2)에 응답하여 레벨 2캐쉬(370)에 저장된 데이타 또는 메인 메모리에서 독출된 데이타(RD_DATA)를 레벨 1 명령어 캐쉬(310) 또는 레벨 1 데이타 캐쉬로 선택적으로 출력한다. The
도 4는 도 3에 도시된 2-레벨 캐쉬 메모리 시스템의 레벨 1, 2캐쉬의 태그 영역을 설명하기 위한 도면이다. 도 4를 참조하면, 레벨 1, 레벨 2캐쉬의 태그 영역은 실제 태그 부분 이외에 유효 비트(VALID BIT), 백업 비트(BACK UP BIT), 더티 비트(DIRTY BIT) 및 공유 비트(SHARED BIT)로 구성되는 상태 비트를 포함한다. FIG. 4 is a diagram for describing tag areas of level 1 and 2 caches of the two-level cache memory system shown in FIG. 3. Referring to FIG. 4, the tag area of the level 1 and level 2 caches includes a valid bit, a back up bit, a dirty bit, and a shared bit in addition to the actual tag part. Contains the status bits.
도 4에 있어서 유효 비트(VALID BIT)는 레벨 1캐쉬 또는 레벨 2캐쉬의 각 캐쉬 블럭 즉, 각각의 데이타 저장 영역이 유효한가를 나타내는 정보 비트로서, 0면 무효(invalid)라는 것을 나타내고, 1이면 유효(valid)하다는 것을 나타낸다. In FIG. 4, the valid bit is an information bit indicating whether each cache block of the level 1 cache or the level 2 cache, that is, each data storage area is valid. A valid bit indicates that 0 is invalid and 1 is valid. (valid).
백업 비트(BACK UP BIT)는 레벨 1캐쉬의 각 캐쉬 블럭이 레벨 2 캐쉬에 백업되어있는지의 여부를 나타낸다. 예를 들어, 레벨 1캐쉬(320)의 백업 비트는 소정의 데이타 블럭이 레벨 2캐쉬(370)에 백업되어 있는지의 여부를 나타내는 비트로서, 메인 메모리에서 데이타를 읽어오는 경우에는 0로 기록되고, 레벨 2 캐쉬(370)에서 데이타를 독출한 경우에는 레벨 2캐쉬(370)에 백업되어 있다는 것을 나타내므로 1로 설정된다. The BACK UP BIT indicates whether each cache block of the level 1 cache is backed up to the level 2 cache. For example, the backup bit of the level 1
또한, 레벨 2캐쉬(370)의 백업 비트는 레벨 2캐쉬(370)의 각 데이타 블럭이 레벨 1캐쉬에 존재하는지의 여부를 나타낸다. 따라서, 레벨 1캐쉬(310 또는 320)로부터 데이타가 인가된 경우에는 백업 비트가 0로 기록되고, 레벨 1캐쉬로 데이타가 전송되는 경우에는 1로 설정된다. 여기에서, 프로세서(300)가 메모리를 액세스하여 레벨 1캐쉬(310,320)의 데이타 블럭을 갱신하는 경우 즉, 데이타 기입 동작 시에는 레벨 1캐쉬의 백업 비트를 체크하여 1이면 레벨 2캐쉬(370)의 해당 데이타 블럭을 무효화(invalidate)시키고, 레벨 1캐쉬의 백업 비트를 0로 설정한다. 그러나, 레벨 1 캐쉬의 백업 비트가 0인 경우에는 데이타 블럭을 그대로 갱신한다. In addition, the backup bit of the level 2
만일, 캐쉬 메모리의 세트(set) 수가 1이상인 경우, 즉, 세트 조합 수가 1보가 큰 경우에는 보다 효율적인 캐쉬 액세스를 위해 LRU(Least Recently Used) 비트가 부가될 수 있다. 여기에서, LRU 비트는 세트의 데이타 저장 영역 중에서 최근에 사용되지 않은 블럭이 어떤 블럭인가를 나타내는 상태 비트라 할 수 있다. If the number of sets of cache memories is one or more, that is, if the number of set combinations is larger than one, a Least Recently Used (LRU) bit may be added for more efficient cache access. Here, the LRU bit may be referred to as a status bit indicating which block has not been used recently in the set of data storage areas.
또한, 더티 비트(DIRTY BIT)는 해당 데이타 블럭에 저장된 데이타가, 같은 어드레스의 메모리 블럭에 저장되어 있는 데이타와 다르다는 것을 나타내는 정보이다. 즉, 더티 비트가 1이면 메모리 블럭의 데이타와 다르다는 것을 나타내고, 0면 메모리 블럭의 데이타와 같다(CLEAN)는 것을 나타낸다. Also, the DIRTY BIT is information indicating that the data stored in the data block is different from the data stored in the memory block of the same address. That is, a dirty bit of 1 indicates that the data is different from the data in the memory block, and a zero bit indicates the same as the data in the memory block (CLEAN).
또한, 공유 비트(SHARED BIT)는 멀티프로세서 시스템에서 다른 프로세서들이 캐쉬를 공유하고 있는가를 나타내는 정보로서, 1이면 공유하고 있다는 것을 나타내고 0면 공유하지 않는다는 것을 나타낸다. In addition, SHARED BIT is information indicating whether other processors are sharing a cache in a multiprocessor system. A shared bit indicates that the shared bit is 0, and 0 is not shared.
이와 같이, 본 발명에서는 캐쉬의 상태를 나타내는 상태 비트에 백업 비트를 추가하여 구현함으로써, 레벨 1캐쉬 또는 레벨 2 캐쉬 간에 데이타가 백업되어 있는가의 여부를 판단할 수 있다. 즉, 이러한 판단 결과에 의해, 레벨 1 캐쉬(310, 320) 또는 레벨 2캐쉬(370)에서 발생된 빅팀을 효율적으로 제어하는 것이 가능하며, 결과적으로 레벨 1캐쉬와 레벨 2캐쉬에 저장된 데이타의 합이 종래의 방법을 사용하는 레벨 2캐쉬의 데이타와 일치하도록 구현될 수 있다. As described above, in the present invention, by adding the backup bit to the status bit indicating the cache state, it is possible to determine whether data is backed up between the level 1 cache or the level 2 cache. That is, based on the determination result, it is possible to efficiently control the Victim generated in the level 1
도 5a 및 도 5b는 본 발명에 따른 2-레벨 캐쉬 메모리 시스템에서 수행되는 캐쉬 액세스 방법을 나타내는 플로우차트이다. 도 5a~도 5b를 참조하면, 캐쉬 액세스 방법은 레벨 1캐쉬의 캐쉬 히트 발생 여부에 따라서 레벨 1캐쉬의 데이타를 프로세서로 전송하거나, 레벨 2캐쉬를 액세스하여 히트가 발생하였는가를 판단하는 단계(제500~510단계), 레벨 2캐쉬에서 히트가 발생하였으면 레벨 1캐쉬의 빅팀을 처리하고 레벨 2캐쉬의 데이타를 프로세서로 전송하는 단계(제520~530단계), 레벨 2캐쉬에서 히트가 발생하지 않으면 레벨 1캐쉬 및 레벨 2캐쉬에서 발생되는 빅팀을 처리하고, 메인 메모리를 액세스하여 독출된 데이타를 레벨 1캐쉬를 통하여 프로세서로 출력하는 단계(제550~560단계)를 포함한다. 5A and 5B are flowcharts illustrating a cache access method performed in a two-level cache memory system according to the present invention. 5A to 5B, the cache access method may include determining whether a hit has occurred by transmitting data of a level 1 cache to a processor or accessing a level 2 cache according to whether a level 1 cache cache hit occurs. Step 500 to 510), if a hit occurs in the level 2 cache, processing the big team of the level 1 cache and transmitting data of the level 2 cache to the processor (
이하에서 도 3 및 도 5를 참조하여 본 발명에 따른 데이타 전송 시간을 줄인 2-레벨 캐쉬 메모리 시스템의 동작 및 캐쉬 액세스 방법에 관하여 상세히 설명한 다. 여기에서, 데이타를 독출하기 위한 캐쉬 액세스의 경우라 가정하고 설명한다. Hereinafter, an operation and a cache access method of a two-level cache memory system having reduced data transfer time according to the present invention will be described in detail with reference to FIGS. 3 and 5. Here, it is assumed that it is the case of cache access for reading data.
우선, 프로세서(300)에서 인가되는 데이타 어드레스(DT_ADD)에 의해 캐쉬 히트가 발생하였는가를 판단한다(제500단계). 이 때, 캐쉬 히트가 발생되는가를 판단하는 것은 프로세서(300)로부터 인가되는 데이타 어드레스(DT_ADD)의 태그와 레벨 1 데이타 캐쉬(320)에서 읽은 캐쉬 블럭의 태그가 일치하는가를 판단함으로써 이루어진다. 제500단계에서 캐쉬 히트가 발생하는 것으로 판단되면, 레벨 1 데이타 캐쉬(320) 의 일치된 태그와 연결된 데이타를 프로세서(300)로 전송한다(제508단계). First, it is determined whether a cache hit has occurred by the data address DT_ADD applied by the processor 300 (operation 500). In this case, determining whether a cache hit is generated is performed by determining whether a tag of the data address DT_ADD applied from the
한편, 레벨 1 캐쉬(320)에서 히트가 발생되지 않으면, 레벨 2캐쉬(370)를 액세스한다(제505단계). 이 때, 데이타 어드레스(DT_ADD)의 태그와 레벨 2캐쉬(370)에서 읽은 데이타 블럭의 태그를 비교하여 일치하는가를 판단함으로써 레벨 2캐쉬(370)에서 히트가 발생하였는가를 판단한다(제510단계). 제510단계에서 캐쉬 히트가 발생하는 것으로 판단되면, 레벨 1캐쉬(320)에서 빅팀(VICTIM)이 발생되는가를 판단하여 발생되는 빅팀을 처리한다(제520단계). 즉, 레벨 1캐쉬(320)에서 빅팀이 발생되는가를 판단하고(제522단계), 만일 빅팀이 발생되는 것으로 판단되면, 제522단계에서 발생된 빅팀을 빅팀 버퍼(360)에 버퍼링한 후 레벨 2캐쉬(370)에 저장한다(제524단계). 여기에서, 빅팀을 발생시키거나 처리하는 것은 빅팀 제어부(390)에서 이루어진다. 빅팀 제어부(390)는 레벨 1캐쉬 태그 저장부(380)에 저장된 태그 영역의 상태 비트와, 백업 비트를 이용하여 새로운 블럭이 위치하게 될 데이타 블럭에 존재하는 이전의 데이타 블럭이 유효하고 백업 비트가 0인 경우에 빅팀을 생성한다. 제524단계에서 빅팀이 처리되면, 일치된 태그와 연결되는 데 이타를 레벨 2캐쉬(370)에서 레벨 1캐쉬(320)로 전송하고, 레벨 2캐쉬(370)의 백업 비트를 1로 설정한다(제532단계). 이후에, 레벨 1 캐쉬(300) 에서 받아들인 데이타를 데이타 라인(325)을 통하여 프로세서(300)로 전송한다 (제534단계). 또한, 제522단계에 의해 레벨 1캐쉬(320)에서 빅팀이 발생되지 않은 경우에는 제532단계로 진입한다. On the other hand, if a hit does not occur in the level 1
한편, 제510단계에서 레벨 2캐쉬(370)에서 캐쉬 히트가 발생되지 않은 것으로 판단되면, 레벨 1캐쉬(320)와 레벨 2캐쉬(360)에서 발생되는 빅팀을 각각 처리한다(제550단계). 구체적으로, 레벨 1캐쉬(320)에서 빅팀이 발생되는가를 판단한다(제552단계). 이 때, 레벨 1캐쉬(320)에서 빅팀이 발생되는 것으로 판단되면, 발생되는 빅팀을 빅팀 버퍼(360)에 버퍼링하여 레벨 2캐쉬(370) 또는 메인 메모리의 해당 데이타 블럭에 저장한다(제554단계). 이와 같이, 레벨 1캐쉬 (320)에서 발생되는 빅팀을 처리하였으면, 레벨 2캐쉬(370)에서 빅팀이 발생되는가를 판단한다(제556단계). 만일, 레벨 2캐쉬(370)에서 빅팀이 발생되면, 발생된 빅팀을 빅팀 버퍼(360)에 버퍼링하여 메인 메모리(미도시)에 저장한다(제558단계). 상술한 바와 같이, 레벨 1 데이타 캐쉬(320) 또는 레벨 2캐쉬(370)에서 발생된 빅팀은 빅팀 제어부(390)에 의해 버퍼링되어 처리된다. 이 때, 빅팀 처리가 완료되면, 요구되는 데이타를 얻기 위해 메인 메모리를 액세스한다(제560단계). 이와 같이, 프로세서(300)는 메인 메모리를 액세스하여 원하는 데이타를 독출한다. 메모리에서 독출된 데이타는 레벨 1 캐쉬(320)에 저장된다. On the other hand, if it is determined in
이와 같이, 본 발명에서는 메인 메모리에서 독출되는 데이타가 레벨 2캐쉬(370)를 거치지 않고 직접 레벨 1 캐쉬에 전송되므로, 데이타 전송 시간이 짧아진다는 장점이 있다. 게다가, 빅팀 제어부(390)는 레벨 1캐쉬(320)와 레벨 2캐쉬(370) 사이의 데이타 백업 여부를 판단하여 캐쉬 간의 포함 관계가 성립되어 지도록 빅팀을 제어한다. As described above, in the present invention, since data read from the main memory is directly transferred to the level 1 cache without passing through the level 2
상기 캐쉬 액세스 방법을 참조하여 도 3에 도시된 빅팀 제어부(390)에서 수행되는 동작을 보다 구체적으로 설명한다. 이 방법은 캐쉬의 세트 수와 관계없이 적용 가능하고, 그 중 한 예로서, 레벨 1캐쉬(320)와 레벨 2캐쉬(370)가 각각 2개의 세트(set)로 조합되는 2 way 캐쉬로 구현되는 경우의 동작을 설명한다. 종래의 캐쉬와 다른 새로운 기능은 레벨 1, 2캐쉬에서 모두 캐쉬 미스(miss)가 발생되어 메인 메모리(미도시)를 액세스하는 경우에 해당된다. An operation performed by the
우선, 레벨 1 캐쉬(320) 블럭의 2세트가 모두 인밸리드(invalid)하고, 레벨 2캐쉬(370)가 모두 밸리드(valid)한 경우에는, 레벨 2캐쉬(370)의 LRU 블럭 즉, 최근에 사용되지 않은 하나의 데이타 블럭을 선택한다. 이 때, 선택된 LRU 블럭이 더티(DIRTY) 즉, 상태 비트의 더티 비트가 1이면, 상기 LRU 블럭을 메모리로 빅티마이즈시키고 클리인일 때는 무효화시킨다. First, if both sets of Level 1
또한, 레벨 1 캐쉬(320)의 두 블럭이 모두 밸리드이고, 현재 읽으려는 어드레스와 레벨 2 캐쉬(370)의 인덱스가 하나의 블럭은 같고, 다른 하나의 블럭은 다른 경우를 설명하면 다음과 같다. 즉, 레벨 1캐쉬(320)의 데이타 블럭 중에서 레벨 2캐쉬 인덱스가 다른 블럭이 있을 때, 백업 비트가 0이면 레벨 2캐쉬(370)로 빅티마이즈시키고, 백업 비트가 1이면 무효화시킨다. 또한, 현재 읽으려는 어드레스와 레벨2 캐쉬 인덱스가 같을 때, 레벨 2캐쉬 블럭 중에서 밸리드이고, 백업 비트가 0인 것이 있을 경우에는, 상기 백업 비트가 0인 블럭이 더티일 때 메모리로 빅티마이즈시키고, 클리인이면 무효화시킨다. In addition, if both blocks of the level 1
반면, 레벨 1 캐쉬(320)의 두 블럭이 모두 밸리드이고, 현재 읽으려는 어드레스와 레벨 2캐쉬(370)의 인덱스가 모두 같은 경우에, 레벨 1캐쉬 블럭 중에서 LRU블럭을 선택하여 더티이면 메모리로 빅티마이즈시키고, 클리인이면 무효화시킨다. 또한, 레벨 1캐쉬(320)에서 빅티마이즈/무효화된 블럭이 레벨 2캐쉬(370)에 존재하는 경우에는 상기 블럭을 무효화시킨다. 이 때, 레벨 1캐쉬(320)에서 빅티마이즈/무효화된 블럭이 레벨 2캐쉬(370)에 존재하는가를 판단하는 것은 백업 비트가 1인가를 판단함으로써 이루어진다.On the other hand, if both blocks of the level 1
이와 같은 방법으로 빅팀을 생성하면, 레벨 1캐쉬의 데이타와 레벨 2캐쉬의 데이타의 합이 레벨 2인덱스에 대해 최대 두 세트만이 존재하게 된다. 또한, 이를 확장하면 레벨 2캐쉬를 n way로 구현하는 것도 가능해지며, 멀티프로세서 시스템에서 캐쉬 동기를 맞추기 위한 DTS를 구현할 수 있다. When creating a big team in this way, there is only a maximum of two sets of level 1 indexes for the sum of the level 1 cache data and the level 2 cache data. In addition, it is possible to implement the level 2 cache in an n way, and to implement a DTS for cache synchronization in a multiprocessor system.
본 발명에 따르면, 레벨 2캐쉬가 가상적으로 레벨 1캐쉬를 포함할 수 있도록 2-레벨 캐쉬 메모리 시스템을 구현함으로써 멀티프로세서 시스템에서 시스템 구성을 간단하게 하면서도 데이타 전송 시간을 줄일 수 있다는 효과가 있다. 또한, 레벨 1캐쉬와 레벨 2캐쉬 간에 가상적인 포함 관계가 성립되기 때문에, 레벨 2캐쉬를 n way로 구현할 수 있으며, 멀티프로세서 시스템에서 캐쉬 동기를 맞추기 위한 DTS 를 구현할 수 있다. According to the present invention, a two-level cache memory system can be implemented such that a level 2 cache can virtually include a level 1 cache, thereby simplifying system configuration and reducing data transfer time in a multiprocessor system. In addition, since a virtual inclusion relationship is established between the level 1 cache and the level 2 cache, the level 2 cache can be implemented in an n way and a DTS for cache synchronization in a multiprocessor system can be implemented.
Claims (3)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1019990030555A KR100546295B1 (en) | 1999-07-27 | 1999-07-27 | 2-level cache memory system reduces data transfer time |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1019990030555A KR100546295B1 (en) | 1999-07-27 | 1999-07-27 | 2-level cache memory system reduces data transfer time |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| KR20010011260A KR20010011260A (en) | 2001-02-15 |
| KR100546295B1 true KR100546295B1 (en) | 2006-01-26 |
Family
ID=19604902
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| KR1019990030555A Expired - Fee Related KR100546295B1 (en) | 1999-07-27 | 1999-07-27 | 2-level cache memory system reduces data transfer time |
Country Status (1)
| Country | Link |
|---|---|
| KR (1) | KR100546295B1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100395768B1 (en) * | 2001-06-16 | 2003-08-21 | 삼성전자주식회사 | Multi-level cache system |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR930014039A (en) * | 1991-12-24 | 1993-07-22 | 빈센트 비. 인그라시아 | Secondary Cache Controller in Hierarchical Cache System |
| US5564035A (en) * | 1994-03-23 | 1996-10-08 | Intel Corporation | Exclusive and/or partially inclusive extension cache system and method to minimize swapping therein |
| JPH10133947A (en) * | 1996-07-01 | 1998-05-22 | Sun Microsyst Inc | Integrated processor and memory device |
| US5822755A (en) * | 1996-01-25 | 1998-10-13 | International Business Machines Corporation | Dual usage memory selectively behaving as a victim cache for L1 cache or as a tag array for L2 cache |
-
1999
- 1999-07-27 KR KR1019990030555A patent/KR100546295B1/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR930014039A (en) * | 1991-12-24 | 1993-07-22 | 빈센트 비. 인그라시아 | Secondary Cache Controller in Hierarchical Cache System |
| US5564035A (en) * | 1994-03-23 | 1996-10-08 | Intel Corporation | Exclusive and/or partially inclusive extension cache system and method to minimize swapping therein |
| US5822755A (en) * | 1996-01-25 | 1998-10-13 | International Business Machines Corporation | Dual usage memory selectively behaving as a victim cache for L1 cache or as a tag array for L2 cache |
| JPH10133947A (en) * | 1996-07-01 | 1998-05-22 | Sun Microsyst Inc | Integrated processor and memory device |
Also Published As
| Publication number | Publication date |
|---|---|
| KR20010011260A (en) | 2001-02-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6542965B2 (en) | Cache line replacement using cable status to bias way selection | |
| US5689679A (en) | Memory system and method for selective multi-level caching using a cache level code | |
| US5067078A (en) | Cache which provides status information | |
| US7827354B2 (en) | Victim cache using direct intervention | |
| US4410944A (en) | Apparatus and method for maintaining cache memory integrity in a shared memory environment | |
| US7305523B2 (en) | Cache memory direct intervention | |
| US6871267B2 (en) | Method for increasing efficiency in a multi-processor system and multi-processor system with increased efficiency | |
| US20030177317A1 (en) | Snoop filter line replacement for reduction of back invalidates in multi-node architectures | |
| US20070136535A1 (en) | System and Method for Reducing Unnecessary Cache Operations | |
| JPS6135584B2 (en) | ||
| US8621152B1 (en) | Transparent level 2 cache that uses independent tag and valid random access memory arrays for cache access | |
| US20030110356A1 (en) | Merging cache linefill | |
| US5269009A (en) | Processor system with improved memory transfer means | |
| EP0470739B1 (en) | Method for managing a cache memory system | |
| JP2004199677A (en) | System for and method of operating cache | |
| KR100546295B1 (en) | 2-level cache memory system reduces data transfer time | |
| GB2307319A (en) | Dual-directory virtual cache | |
| US5737753A (en) | Least recently used block replacement for four block cache logic system | |
| US6931510B1 (en) | Method and system for translation lookaside buffer coherence in multiprocessor systems | |
| US11847062B2 (en) | Re-fetching data for L3 cache data evictions into a last-level cache | |
| CA1299767C (en) | Cache memory control system | |
| US7685372B1 (en) | Transparent level 2 cache controller | |
| US7328313B2 (en) | Methods to perform cache coherency in multiprocessor system using reserve signals and control bits | |
| JP3078303B2 (en) | Cache memory control circuit | |
| JP2963257B2 (en) | Processing equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PA0109 | Patent application |
St.27 status event code: A-0-1-A10-A12-nap-PA0109 |
|
| PN2301 | Change of applicant |
St.27 status event code: A-3-3-R10-R13-asn-PN2301 St.27 status event code: A-3-3-R10-R11-asn-PN2301 |
|
| R18-X000 | Changes to party contact information recorded |
St.27 status event code: A-3-3-R10-R18-oth-X000 |
|
| PG1501 | Laying open of application |
St.27 status event code: A-1-1-Q10-Q12-nap-PG1501 |
|
| PN2301 | Change of applicant |
St.27 status event code: A-3-3-R10-R13-asn-PN2301 St.27 status event code: A-3-3-R10-R11-asn-PN2301 |
|
| R18-X000 | Changes to party contact information recorded |
St.27 status event code: A-3-3-R10-R18-oth-X000 |
|
| R18-X000 | Changes to party contact information recorded |
St.27 status event code: A-3-3-R10-R18-oth-X000 |
|
| R18-X000 | Changes to party contact information recorded |
St.27 status event code: A-3-3-R10-R18-oth-X000 |
|
| R17-X000 | Change to representative recorded |
St.27 status event code: A-3-3-R10-R17-oth-X000 |
|
| R17-X000 | Change to representative recorded |
St.27 status event code: A-3-3-R10-R17-oth-X000 |
|
| A201 | Request for examination | ||
| PA0201 | Request for examination |
St.27 status event code: A-1-2-D10-D11-exm-PA0201 |
|
| R17-X000 | Change to representative recorded |
St.27 status event code: A-3-3-R10-R17-oth-X000 |
|
| D13-X000 | Search requested |
St.27 status event code: A-1-2-D10-D13-srh-X000 |
|
| PN2301 | Change of applicant |
St.27 status event code: A-3-3-R10-R13-asn-PN2301 St.27 status event code: A-3-3-R10-R11-asn-PN2301 |
|
| PN2301 | Change of applicant |
St.27 status event code: A-3-3-R10-R13-asn-PN2301 St.27 status event code: A-3-3-R10-R11-asn-PN2301 |
|
| D14-X000 | Search report completed |
St.27 status event code: A-1-2-D10-D14-srh-X000 |
|
| E701 | Decision to grant or registration of patent right | ||
| PE0701 | Decision of registration |
St.27 status event code: A-1-2-D10-D22-exm-PE0701 |
|
| GRNT | Written decision to grant | ||
| PR0701 | Registration of establishment |
St.27 status event code: A-2-4-F10-F11-exm-PR0701 |
|
| PR1002 | Payment of registration fee |
St.27 status event code: A-2-2-U10-U11-oth-PR1002 Fee payment year number: 1 |
|
| PG1601 | Publication of registration |
St.27 status event code: A-4-4-Q10-Q13-nap-PG1601 |
|
| PR1001 | Payment of annual fee |
St.27 status event code: A-4-4-U10-U11-oth-PR1001 Fee payment year number: 4 |
|
| FPAY | Annual fee payment |
Payment date: 20100114 Year of fee payment: 5 |
|
| PR1001 | Payment of annual fee |
St.27 status event code: A-4-4-U10-U11-oth-PR1001 Fee payment year number: 5 |
|
| LAPS | Lapse due to unpaid annual fee | ||
| PC1903 | Unpaid annual fee |
St.27 status event code: A-4-4-U10-U13-oth-PC1903 Not in force date: 20110120 Payment event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE |
|
| PC1903 | Unpaid annual fee |
St.27 status event code: N-4-6-H10-H13-oth-PC1903 Ip right cessation event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE Not in force date: 20110120 |
|
| R18-X000 | Changes to party contact information recorded |
St.27 status event code: A-5-5-R10-R18-oth-X000 |
|
| P22-X000 | Classification modified |
St.27 status event code: A-4-4-P10-P22-nap-X000 |