[go: up one dir, main page]

KR100505633B1 - Data reading apparatus and method for cache memory - Google Patents

Data reading apparatus and method for cache memory Download PDF

Info

Publication number
KR100505633B1
KR100505633B1 KR10-1999-0010077A KR19990010077A KR100505633B1 KR 100505633 B1 KR100505633 B1 KR 100505633B1 KR 19990010077 A KR19990010077 A KR 19990010077A KR 100505633 B1 KR100505633 B1 KR 100505633B1
Authority
KR
South Korea
Prior art keywords
address
determined
tag
cache memory
data
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
Application number
KR10-1999-0010077A
Other languages
Korean (ko)
Other versions
KR20000061195A (en
Inventor
곽진호
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR10-1999-0010077A priority Critical patent/KR100505633B1/en
Publication of KR20000061195A publication Critical patent/KR20000061195A/en
Application granted granted Critical
Publication of KR100505633B1 publication Critical patent/KR100505633B1/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0864Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using pseudo-associative means, e.g. set-associative or hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements 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

캐시 메모리의 데이터 독출 장치 및 방법이 공개된다. 본 발명에 의한 캐시 메모리의 데이터 독출 장치는, 캐시 메모리는 입력되는 인덱스에 의해 셋 어드레스와 태그 어드레스가 결정되며, 결정된 셋 어드레스와는 상관없이 결정된 태그 어드레스에 해당하는 소정 개수의 셋 데이터들을 모두 액세스하여 출력하고, 소정 개수의 셋 데이터들을 각각 저장하는 소정 개수의 레지스터들, 소정 개수의 레지스터들에 각각 저장된 셋 데이터를 셋 선택 어드레스에 응답하여 선택적으로 출력하는 선택기, 및 결정된 셋 어드레스 및 결정된 태그 어드레스와 프로그램 어드레스를 비교하고, 비교 결과에 따라 셋 선택 신호를 출력하여 선택기에 의해 선택된 셋 데이터를 출력하거나 또는 결정된 태그 및 셋 어드레스를 갱신하고 캥신된 태그 및 셋 어드레스에 상응하여 캐시 메모리를 다시 액세스하도록 제어하는 비교 수단을 구비하는 것을 특징으로 하고, CPU가 캐시 메모리를 액세스할 때, 태그 어드레스에 해당하는 셋 데이터들을 모두 액세스하여 레지스터들에 저장시켜 놓음으로써,셋 어드레스만 미스된 경우 캐시 메모리를 다시 액세스할 필요없이 히트/미스 로직에서 발생하는 셋 선택 어드레스에 상응하여 레지스터들에 저장된 셋 데이터를 선택적으로 독출함으로써 CPU의 성능을 향상시킬 수 있다는 효과가 있다. An apparatus and method for reading data from a cache memory are disclosed. In the data reading apparatus of the cache memory according to the present invention, the cache memory has a set address and a tag address determined by an input index, and accesses a predetermined number of set data corresponding to the determined tag address regardless of the determined set address. A predetermined number of registers for storing a predetermined number of set data, a selector for selectively outputting set data stored in the predetermined number of registers in response to a set selection address, and a determined set address and a determined tag address. Compare the program address with the program address, output a set select signal according to the result of the comparison, output the set data selected by the selector, or update the determined tag and set address and access the cache memory again in correspondence with the kinexin tag and set address. Controlled Comparison When the CPU accesses the cache memory, all the set data corresponding to the tag address are accessed and stored in the registers so that the cache memory needs to be accessed again when only the set address is missed. There is an effect that the performance of the CPU can be improved by selectively reading the set data stored in the registers corresponding to the set select address generated in the hit / miss logic.

Description

캐시 메모리의 데이터 독출 장치 및 방법{Data reading apparatus and method for cache memory}Data reading apparatus and method for cache memory

본 발명은 캐시 메모리에 관한 것으로, 특히, n-웨이 셋 상관(way set association) 방식의 캐시 메모리에서 데이터를 독출하는 캐시 메모리의 데이터 독출 장치 및 방법에 관한 것이다. The present invention relates to a cache memory, and more particularly, to an apparatus and method for reading data of a cache memory for reading data from a cache memory of an n-way set association method.

일반적으로, 고속의 중앙 처리 장치(Central Processing Unit:CPU)에서는 성능 향상을 위하여 디램(DRAM)과 같은 외부 메모리의 내용중 빈번하게 사용하는 데이터를 CPU 내부에 있는 상대적으로 소형의 메모리인 캐시 메모리에 저장한다. 한편, 캐시 메모리는 명령을 저장하는 명령 캐시와 연산 결과를 저장하는 데이터 캐시로 크게 나누어진다. In general, a high-speed central processing unit (CPU) transfers frequently used data from external memory, such as DRAM, to cache memory, a relatively small memory inside the CPU, to improve performance. Save it. On the other hand, the cache memory is largely divided into an instruction cache for storing instructions and a data cache for storing operation results.

이들 캐시 메모리들은 CPU가 명령수행중 액세스(access)되고 만약 캐시 메모리에 원하는 데이타가 존재하지 않을 때에는 일정한 과정(소정의 미스 플로우)을 거친후 CPU는 외부 메모리에서 필요한 데이터를 가져온다. 이에 따라 원하는 데이터가 캐시에 있다면(히트된 경우) 외부 메모리를 액세스할 필요가 없으므로 CPU의 성능이 향상되지만, 원하는 데이터가 캐시에 없다면(미스된 경우) CPU가 외부 메모리를 액세스해야 함으로 CPU의 성능은 저하된다. 따라서, 캐시의 히트율을 높이는 것은 CPU의 성능을 향상시키기 위해 매우 중요하다. 한편, 캐시의 성능은 CPU의 성능에 직접적인 영향을 주며, 이러한 캐시의 성능을 결정하는 성분으로는 크기, 웨이(way), 속도등이 있다. These cache memories are accessed by the CPU during instruction execution and if the desired data does not exist in the cache memory, the CPU retrieves the necessary data from the external memory after a certain process (a certain miss flow). This improves CPU performance if the desired data is in the cache (when it is hit) without the need to access external memory, but if the desired data is not in the cache (when it is missed), the CPU needs to access the external memory. Is degraded. Therefore, increasing the hit ratio of the cache is very important to improve the performance of the CPU. On the other hand, the performance of the cache has a direct impact on the performance of the CPU, the size, way, speed, etc. that determine the performance of the cache.

현재는 캐시의 성능과 속도가 적절히 보상되는 n-way 셋 연관 방식을 많이 사용하며, 이중 2-way 및 4-way가 주로 많이 사용된다. 이중, 2-way 셋 상관방식에 대해 보면, 캐시의 소정 라인을 액세스하기 위한 인덱스 필드(index field)와 이들 라인의 태그 어드레스부분 및 셋을 결정하는 셋 어드레스부분으로 이루어진다. 캐시 메모리내에 CPU가 원하는 데이타가 있는지 여부는 태그 어드레스와 프로그램에서 지정하는 어드레스를 변환하는 변환기에서 나오는 어드레스를 비교하여, 두 어드레스가 같으면 캐시 히트(hit)되었다고 하며, 어드레스가 서로 다르면 캐시 미스(miss)라고 판단하게 된다. 셋 어드레스는 이때 태그 어드레스에 포함되어 비교할 때 이용된다. 따라서 셋 어드레스가 미스되면 캐시 미스로 판정되어 CPU내의 소정의 미스 플로우에 따라 캐시의 태그 어드레스 및 셋 어드레스를 교정한 후 다시 캐시 메모리를 액세스한다. Currently, many ways of associating n-way sets with proper compensation for cache performance and speed are used. In the two-way set correlation method, an index field for accessing a predetermined line of a cache and a tag address portion for determining the set and the tag address portion of the line are determined. Whether or not there is data desired by the CPU in the cache memory is compared with the address from the translator that translates the tag address and the address specified by the program.If the two addresses are the same, the cache hit is said, and if the addresses are different, the cache miss Will be judged. The set address is then included in the tag address and used for comparison. Therefore, if the set address is missed, it is determined to be a cache miss, and the cache memory is accessed again after correcting the tag address and the set address of the cache according to a predetermined miss flow in the CPU.

도 1은 종래 기술에 의한 캐시 메모리의 독출 장치를 설명하기 위한 개략적인 블록도로서, 제1셋 영역(10), 제2셋 영역(20) 및 태그 영역(30)을 갖는 캐시 메모리(40), 비교기(60) 및 히트/미스 로직(70)을 포함한다. FIG. 1 is a schematic block diagram illustrating an apparatus for reading a cache memory according to the prior art, and includes a cache memory 40 having a first set region 10, a second set region 20, and a tag region 30. , Comparator 60 and hit / miss logic 70.

도 1을 참조하면, 캐시 메모리(40)로 입력되는 인덱스(ID)에 의해 소정 라인의 셋과 태그의 어드레스가 결정된다. 즉, 캐시 메모리(40)는 인덱스(ID)에 의해 결정된 태그 어드레스(TADD)와 태그 어드레스(TADD)에 해당하는 제1 및 제2셋 데이터중 셋 어드레스(SADD)에 의해 선택적으로 독출한다. 이때, 셋 어드레스(SADD)는 이전에 제1셋 데이터가 선택되었다면 현재는 제2셋 데이터가 출력될 것으로 예측하고, 이러한 예측에 상응하여 셋 어드레스(SADD)가 결정된다. 인덱스(ID)에 의해 결정된 태그 어드레스(TADD)는 비교기(60)로 입력된다. Referring to FIG. 1, a set of a predetermined line and an address of a tag are determined by an index ID input to the cache memory 40. That is, the cache memory 40 selectively reads the tag address TADD determined by the index ID and the set address SADD among the first and second set data corresponding to the tag address TADD. At this time, the set address SADD predicts that the second set data is currently output if the first set data has been previously selected, and the set address SADD is determined according to the prediction. The tag address TADD determined by the index ID is input to the comparator 60.

비교기(60)는 도시하지는 않았지만 프로세스 코어(미도시)에서 지정하는 어드레스를 변환하는 어드레스 변환기(미도시)에서 발생되는 프로그램 어드레스(PADD)와 비교하고, 비교 결과를 히트/미스 로직(70)으로 출력한다. 히트/미스 로직(70)은 비교기(60)로부터의 비교 결과에 따라, 두 데이터가 일치하면 캐시는 히트되었다고 판단하여 인덱스(ID)에 의해 결정된 셋 어드레스(SADD)에 상응하는 셋 데이터를 프로세스 코어(미도시)가 원하는 데이터로서 독출되도록 제어하는 제어신호를 출력단자 OUT으로 출력한다. 그러나, 비교되는 두 데이터가 다르면 미스되었다고 판단하고, 소정의 미스 플로우(flow)에 따라 캐시의 태그 및 셋 어드레스(TADD 및 SADD)를 교정한 후 다시 캐시 메모리를 액세스하도록 제어신호를 출력단자 OUT으로 출력한다. Although not shown, the comparator 60 compares the program address PADD generated by an address translator (not shown) that converts an address designated by a process core (not shown), and compares the result to the hit / miss logic 70. Output According to the comparison result from the comparator 60, the hit / miss logic 70 determines that the cache is a hit when the two data match, and sets the process data corresponding to the set address SADD determined by the index ID. A control signal for controlling (not shown) to be read as desired data is output to the output terminal OUT. However, if the two data to be compared are different, it is determined to be missed, and after correcting the tag and set address (TADD and SADD) of the cache according to a predetermined miss flow, the control signal is returned to the output terminal OUT to access the cache memory again. Output

한편, 캐시 메모리(40)의 셋 어드레스(SADD)는 태그 어드레스(TADD)에 포함되어 비교기(60)에서 프로그램 어드레스(PADD)와 비교될 때, 함께 비교된다. 따라서, 태그 어드레스(TADD)는 히트되었지만 셋 어드레스가 미스되면 캐시 미스로 판정되어 소정의 플로우에 따라 캐시 액세스를 다시 시도하게 되며, 이로인해 CPU의 성능은 떨어지게 된다는 문제점이 발생한다. On the other hand, the set address SADD of the cache memory 40 is included in the tag address TADD and compared with the program address PADD in the comparator 60. Therefore, when the tag address TADD is hit but the set address is missed, it is determined to be a cache miss and attempts to access the cache again according to a predetermined flow, which causes a problem that the performance of the CPU is degraded.

본 발명이 이루고자 하는 기술적 과제는 태그 어드레스는 히트되고 셋 어드레스가 미스된 경우, 캐시 메모리를 다시 액세스하지 않고도 원하는 셋 어드레스의 데이터를 액세스할 수 있는 캐시 메모리의 데이터 독출 장치를 제공하는 데 있다. An object of the present invention is to provide a data read device of a cache memory that can access data of a desired set address without re-accessing the cache memory when the tag address is hit and the set address is missed.

본 발명이 이루고자 하는 다른 기술적 과제는 상기 캐시 메모리의 데이터 독출 장치에서 수행되는 데이터 독출 방법을 제공하는 데 있다. Another object of the present invention is to provide a data reading method performed by the data reading apparatus of the cache memory.

상기 과제를 이루기 위해, 데이터를 저장하고 있는 소정 개수의 셋 영역과, 태그 어드레스를 저장하고 있는 태그 영역을 갖는 캐시 메모리에 저장된 상기 데이터를 독출하는 본 발명에 의한 캐시 메모리의 데이터 독출 장치는, 캐시 메모리는 입력되는 인덱스에 의해 셋 어드레스와 태그 어드레스가 결정되며, 결정된 셋 어드레스와는 상관없이 결정된 태그 어드레스에 해당하는 소정 개수의 셋 데이터들을 모두 액세스하여 출력하고, 소정 개수의 셋 데이터들을 각각 저장하는 소정 개수의 레지스터들, 소정 개수의 레지스터들에 각각 저장된 셋 데이터를 셋 선택 어드레스에 응답하여 선택적으로 출력하는 선택기, 및 결정된 셋 어드레스 및 결정된 태그 어드레스와 프로그램 어드레스를 비교하고, 비교 결과에 따라 셋 선택 신호를 출력하여 선택기에 의해 선택된 셋 데이터를 출력하거나 또는 결정된 태그 및 셋 어드레스를 갱신하고 캥신된 태그 및 셋 어드레스에 상응하여 캐시 메모리를 다시 액세스하도록 제어하는 비교 수단을 구비하는 것을 특징으로 한다. In order to achieve the above object, a data read device of a cache memory according to the present invention for reading the data stored in a cache memory having a predetermined number of set areas storing data and a tag area storing a tag address, The set memory and the tag address are determined by an index to be input, and the cache memory accesses and outputs a predetermined number of set data corresponding to the determined tag address regardless of the determined set address, and stores the predetermined number of set data, respectively. A predetermined number of registers, a selector for selectively outputting set data respectively stored in the predetermined number of registers in response to the set selection address, and a determined set address and a determined tag address and a program address are compared and set according to a comparison result. Outputs a selection signal to the selector It is characterized in that outputs the selected set of data or determined to update the tag and set address corresponds to the tag and set address kaengsin comprising a comparison means for controlling access to a cache memory.

상기 다른 과제를 이루기 위해, 데이터를 저장하고 있는 소정 개수의 셋 영역과, 태그 어드레스를 저장하고 있는 태그 영역을 갖는 캐시 메모리를 포함하고, 캐시 메모리로 입력되는 인덱스에 의해 결정된 셋 어드레스 및 태그 어드레스에 해당되는 셋 데이터를 독출하는 본 발명에 의한 캐시 메모리의 데이터 독출 방법은, 결정된 태그 어드레스가 미스되었는 가를 판단하는 (a)단계, (a)단계에서 결정된 태그 어드레스가 미스되었으면 소정의 미스 플로우에 따라 태그 어드레스 및 셋 어드레스를 갱신하고, (a)단계로 진행하는 (b)단계, (a)단계에서 태그 어드레스가 히트되었다면 결정된 셋 어드레스가 미스되었는 가를 판단하는 (c)단계, (c)단계에서 결정된 셋 어드레스가 미스되었다면, 결정된 태그 어드레스에 해당하는 다른 셋 어드레스를 선택하는 (d)단계, 선택된 셋 어드레스에 해당되는 셋 데이터를 독출하는 (e)단계 및 (c)단계에서 결정된 셋 어드레스가 히트되었다면, 결정된 셋 어드레스에 해당되는 셋 데이터를 독출하는 (f)단계로 이루어지는 것을 특징으로 한다. In order to achieve the above object, a cache memory having a predetermined number of set areas for storing data and a tag area for storing tag addresses is included, and the set addresses and tag addresses determined by an index input to the cache memory are provided. The method of reading data of the cache memory according to the present invention, which reads the corresponding set data, includes determining whether the determined tag address has been missed. If the tag address determined in the steps (a) and (a) is missed, The tag address and the set address are updated accordingly, and if the tag address is hit in steps (b) and (a), the method determines whether the determined set address has been missed. If the set address determined in step 2 is missed, step (d) of selecting another set address corresponding to the determined tag address If the set address determined in steps (e) and (c) of reading the set data corresponding to the selected set address is hit, the step (f) of reading set data corresponding to the determined set address is performed. It features.

이제, 본 발명에 의한 캐시 메모리의 데이터 독출 장치 및 방법을 첨부한 도면들을 참조하여 다음과 같이 설명한다. Now, an apparatus and method for reading data of a cache memory according to the present invention will be described with reference to the accompanying drawings.

도 2는 본 발명에 의한 캐시 메모리의 데이터 독출 장치를 설명하기 위한 개략적인 블록도로서, 제1 및 제2셋 영역(105)과 태그 영역(115)을 포함하는 캐시 메모리(100), 제1 및 제2레지스터(120 및 125), 선택기(130), 비교기(135) 및 히트/미스 로직(140)을 포함한다. FIG. 2 is a schematic block diagram illustrating an apparatus for reading data of a cache memory according to an exemplary embodiment of the present invention. The cache memory 100 including a first and second set regions 105 and a tag region 115 may be described. And second registers 120 and 125, selector 130, comparator 135, and hit / miss logic 140.

도 2에 도시된 장치는 2-way 셋 연관 방식에 의한 캐시 메모리의 데이터 독출 장치로, 하나의 태그 어드레스에 두 개의 셋 데이터가 해당되며, 두 개의 셋 데이터는 셋 어드레스에 의해 각각 선택된다. The apparatus illustrated in FIG. 2 is a data reading apparatus of a cache memory using a 2-way set association method. Two set data correspond to one tag address, and the two set data are selected by the set address, respectively.

도 3은 본 발명에 의한 캐시 메모리의 데이터 독출 방법을 설명하기 위한 플로우 챠트로서, 태그 어드레스가 미스되었으면 소정의 미스플로우에 따라 태그 어드레스 및 셋 어드레스를 교정후 다시 태그 어드레스의 미스 여부를 판단하는 단계들(제200~205단계), 태그 어드레스가 히트되었으면 셋 어드레스의 히트/미스 여부에 따라 셋 데이터를 선택하여 출력하는 단계들(제210~225단계)로 이루어진다. 3 is a flowchart illustrating a data reading method of a cache memory according to an embodiment of the present invention. If a tag address is missed, the method further includes determining whether the tag address is missed after correcting the tag address and set address according to a predetermined misflow. If the tag address is hit (steps 200 to 205), the set data are selected and output (steps 210 to 225) according to whether or not the set address is hit or missed.

도 2에 도시된 캐시 메모리(100)는 입력되는 인덱스(ID)에 따라 셋 어드레스와 태그 어드레스가 결정된다. 이때, 캐시 메모리(100)는 결정된 셋 어드레스에 상관없이 결정된 태그 어드레스(TADD)에 해당하는 제1셋 데이터 및 제2셋 데이터를 모두 액세스하여 출력한다. In the cache memory 100 illustrated in FIG. 2, a set address and a tag address are determined according to an input index ID. At this time, the cache memory 100 accesses and outputs both the first set data and the second set data corresponding to the determined tag address TADD regardless of the determined set address.

제1 및 제2레지스터(120 및 125)는 캐시 메모리(100)에서 각각 출력되는 제1 및 제2셋 데이터를 각각 저장한다. 선택기(130)는 히트/미스 로직(140)에서 발생되는 셋 선택 어드레스(ADD_SEL)에 응답하여 제1 또는 제2셋 데이터를 선택하여 출력한다. The first and second registers 120 and 125 store first and second set data respectively output from the cache memory 100. The selector 130 selects and outputs first or second set data in response to the set selection address ADD_SEL generated by the hit / miss logic 140.

비교기(135)는 캐시 메모리(100)로부터 결정된 태그 어드레스(TADD) 및 결정된 셋 어드레스(SADD)와, 도시하지는 않았지만 프로세스 코어(미도시)에서 지정하는 어드레스를 변환하는 어드레스 변환기(미도시)에서 발생되는 프로그램 어드레스(PADD)를 입력하여 비교하고, 비교 결과를 히트/미스 로직(140)으로 출력한다. 히트/미스 로직(70)은 비교기(135)로부터의 비교 결과에 의해 히트/미스를 판단하고 그에 따라 캐시 메모리를 제어하게 된다. The comparator 135 is generated by an address translator (not shown) that translates a tag address TADD and a set set address SADD determined from the cache memory 100 and an address designated by a process core (not shown), although not shown. The program address PADD is input and compared, and the comparison result is output to the hit / miss logic 140. The hit / miss logic 70 determines the hit / miss based on the comparison result from the comparator 135 and controls the cache memory accordingly.

먼저, 결정된 태그 어드레스(TADD)가 미스되었는가를 판단하여(제200단계), 결정된 태그 어드레스(TADD)가 미스되었으면 소정의 미스 플로우에 따라 태그 어드레스(TADD) 및 셋 어드레스(SADD)를 교정한 다음 다시 제200단계로 진행한다(제205단계). 반면, 제200단계에서 결정된 태그 어드레스(TADD)가 히트되었다면 결정된 셋 어드레스(SADD)가 미스되었는 가를 판단하고(제210단계). 결정된 셋 어드레스가 미스되었다면 결정된 태그 어드레스(TADD)에 해당하는 다른 셋 어드레스를 셋 선택 어드레스(SADD_SEL)로서 선택기(130)로 출력한다(제215단계). 제215단계 후에, 선택기(130)는 셋 선택 어드레스(SADD_SEL)에 해당되는 셋 데이터를 제1 또는 제2레지스터(120 및 125)로부터 선택적으로 독출하여 출력한다. First, it is determined whether the determined tag address TADD is missed (step 200). If the determined tag address TADD is missed, the tag address TADD and the set address SADD are corrected according to a predetermined miss flow. The process proceeds to step 200 again (step 205). In contrast, if the tag address TADD determined in operation 200 is hit, it is determined whether the determined set address SADD is missed (operation 210). If the determined set address is missed, another set address corresponding to the determined tag address TADD is output to the selector 130 as the set selection address SADD_SEL (step 215). After operation 215, the selector 130 selectively reads and outputs set data corresponding to the set selection address SADD_SEL from the first or second registers 120 and 125.

예컨대, 인덱스(ID)에 의해 결정된 셋 어드레스(SADD)가 제1셋 데이터에 해당되고, 프로그램 어드레스(PADD)가 제2셋 데이터에 해당하는 셋 어드레스를 지정하여 셋 어드레스에 미스가 발생했다고 하자. 그러면, 히트/미스 로직(140)은 제2셋 데이터에 해당하는 셋 어드레스를 셋 선택 어드레스(SADD_SEL)로서 선택기(130)로 출력하고, 선택기(130)는 제2셋 데이터를 선택적으로 출력하게 된다. 즉, 캐시 메모리(100)로 입력되는 인덱스(ID)에 의해 결정된 셋 어드레스(SADD)는 제1셋 데이터에 해당하는 것이었지만 최종적으로 선택기(130)에 의해 출력되는 데이터는 프로세스 코어가 원하는 제2셋 데이터가 출력된다. For example, it is assumed that a set address SADD determined by the index ID corresponds to the first set data, and a program address PADD specifies a set address corresponding to the second set data so that a miss occurs in the set address. Then, the hit / miss logic 140 outputs the set address corresponding to the second set data to the selector 130 as the set selection address SADD_SEL, and the selector 130 selectively outputs the second set data. . That is, although the set address SADD determined by the index ID input to the cache memory 100 corresponds to the first set data, the data output by the selector 130 is finally the second desired by the process core. The set data is output.

한편, 제210단계에서 결정된 셋 어드레스(SADD)가 히트되었다면, 히트/미스 로직(140)은 결정된 셋 어드레스(SADD)를 셀 선택 어드레스(SADD_SEL)로서 선택기(130)로 출력하고, 선택기(130)는 셀 선택 어드레스(SADD_ADD)에 상응하는 셋 데이터를 제1 또는 제2레지스터(120 또는 125)로부터 선택적으로 독출한다(제225단계). If the set address SADD determined in operation 210 is hit, the hit / miss logic 140 outputs the determined set address SADD to the selector 130 as the cell selection address SADD_SEL and selector 130. In operation 225, the set data corresponding to the cell selection address SADD_ADD may be selectively read from the first or second register 120 or 125.

예컨대, 인덱스(ID)에 의해 결정된 셋 어드레스(SADD)가 제1셋 데이터에 해당되고, 프로그램 어드레스(PADD)도 제1셋 데이터에 해당하는 셋 어드레스를 지정했다고 하자. 그러면, 히트/미스 로직(140)은 제1셋 데이터에 해당하는 셋 어드레스를 셋 선택 어드레스(SADD_SEL)로서 선택기(130)로 출력하고, 선택기(130)는 제1셋 데이터를 선택적으로 출력하게 된다. 즉, 캐시 메모리(100)로 입력되는 인덱스(ID)에 의해 결정된 셋 어드레스(SADD)에 의한 제1셋 데이터가 프로세스 코어가 원하는 데이터로서 최종 출력된다. For example, it is assumed that the set address SADD determined by the index ID corresponds to the first set data, and the program address PADD also specifies a set address corresponding to the first set data. Then, the hit / miss logic 140 outputs the set address corresponding to the first set data to the selector 130 as the set selection address SADD_SEL, and the selector 130 selectively outputs the first set data. . That is, the first set data by the set address SADD determined by the index ID input to the cache memory 100 is finally output as the data desired by the process core.

이상에서는 2-way 셋 연관 방식에 대한 설명이며, 4-way 셋 연관 방식의 경우 레지스터를 4개를 사용하면 된다. In the above description, the 2-way set association method is described. In the 4-way set association method, four registers are used.

결과적으로, 본 발명에 의한 캐시 메모리의 데이터 독출 장치 및 방법은 CPU가 캐시 메모리를 액세스할 때, 태그 어드레스에 해당하는 셋 데이터들을 모두 액세스하여 레지스터들에 저장시켜 놓고, 히트/미스 로직(140)에서 발생하는 셋 선택 어드레스(SADD_SEL)에 상응하여 레지스터들에 저장된 셋 데이터를 선택적으로 독출하도록 한다. 이로인해, 태그 어드레스는 히트되었으나 셋 어드레스가 미스된 경우 종래와 같이 캐시 메모리를 다시 액세스할 필요없이 히트/미스 로직(140)에서 간단히 셀 선택 어드레스(SADD_SEL)를 변화시킴으로써 CPU가 원하는 셋 데이터를 액세스할 수 있게 된다. As a result, when the CPU accesses the cache memory, the apparatus and method for reading data from the cache memory according to the present invention access all the set data corresponding to the tag address and store them in the registers, and the hit / miss logic 140 The set data stored in the registers may be selectively read in correspondence to the set select address SADD_SEL generated at. As a result, when the tag address is hit but the set address is missed, the CPU accesses the set data desired by simply changing the cell select address SADD_SEL in the hit / miss logic 140 without having to access the cache memory again. You can do it.

상술한 바와 같이, 본 발명에 이한 캐시 메모리의 데이터 독출 장치 및 방법은 CPU가 캐시 메모리를 액세스할 때, 태그 어드레스에 해당하는 셋 데이터들을 모두 액세스하여 레지스터들에 저장시켜 놓음으로써, 태그 어드레스는 히트되었으나 셋 어드레스가 미스된 경우 캐시 메모리를 다시 액세스할 필요없이 히트/미스 로직에서 발생하는 셋 선택 어드레스에 상응하여 레지스터들에 저장된 셋 데이터를 선택적으로 독출함으로써 CPU의 성능을 향상시킬 수 있다는 효과가 있다. As described above, the apparatus and method for reading data of the cache memory according to the present invention accesses and stores all set data corresponding to the tag address in the registers when the CPU accesses the cache memory, so that the tag address is a hit. However, if the set address is missed, the CPU performance can be improved by selectively reading the set data stored in the registers corresponding to the set select address generated by the hit / miss logic without having to access the cache memory again. .

도 1은 종래 기술에 의한 캐시 메모리의 독출 장치를 설명하기 위한 개략적인 블록도이다. FIG. 1 is a schematic block diagram illustrating an apparatus for reading a cache memory according to the prior art.

도 2는 본 발명에 의한 캐시 메모리의 데이터 독출 장치를 설명하기 위한 개략적인 블록도이다. 2 is a schematic block diagram illustrating a data reading apparatus of a cache memory according to the present invention.

도 3은 본 발명에 의한 캐시 메모리의 데이터 독출 방법을 설명하기 위한 플로우 챠트이다. 3 is a flowchart illustrating a data reading method of a cache memory according to the present invention.

Claims (3)

데이터를 저장하고 있는 소정 개수의 셋 영역과, 태그 어드레스를 저장하고 있는 태그 영역을 갖는 캐시 메모리에 저장된 상기 데이터를 독출하는 캐시 메모리의 데이터 독출 장치에 있어서, A data reading apparatus of a cache memory for reading out the data stored in a cache memory having a predetermined number of set areas storing data and a tag area storing tag addresses, 상기 캐시 메모리는 입력되는 인덱스에 의해 셋 어드레스와 태그 어드레스가 결정되며, 결정된 셋 어드레스와는 상관없이 결정된 태그 어드레스에 해당하는 상기 소정 개수의 셋 데이터들을 모두 액세스하여 출력하고, The cache memory determines a set address and a tag address by an input index, and accesses and outputs all the predetermined number of set data corresponding to the determined tag address regardless of the determined set address. 상기 소정 개수의 셋 데이터들을 각각 저장하는 소정 개수의 레지스터들;A predetermined number of registers respectively storing the predetermined number of set data; 상기 소정 개수의 레지스터들에 각각 저장된 상기 셋 데이터를 셋 선택 어드레스에 응답하여 선택적으로 출력하는 선택기; 및 A selector for selectively outputting the set data respectively stored in the predetermined number of registers in response to a set selection address; And 상기 결정된 셋 어드레스 및 상기 결정된 태그 어드레스와 프로그램 어드레스를 비교하고, 비교 결과에 따라 상기 셋 선택 신호를 출력하여 선택기에 의해 선택된 셋 데이터를 출력하거나 또는 상기 결정된 태그 및 셋 어드레스를 갱신하고 캥신된 상기 태그 및 셋 어드레스에 상응하여 상기 캐시 메모리를 다시 액세스하도록 제어하는 비교 수단을 구비하는 것을 특징으로 하는 캐시 메모리의 데이터 독출 장치. Comparing the determined set address and the determined tag address with a program address, and outputting the set selection signal according to a result of the comparison to output the set data selected by the selector, or updating the determined tag and the set address and performing the kinexin tag. And comparison means for controlling the cache memory to be accessed again in correspondence with a set address. 제1항에 있어서, 상기 비교 수단은 The method of claim 1, wherein the comparing means 상기 결정된 셋 어드레스 및 상기 결정된 태그 어드레스가 상기 프로그램 어드레스에 각각 히트되었는 가를 비교하는 비교기; 및 A comparator for comparing whether the determined set address and the determined tag address are hit to the program address, respectively; And 상기 비교기에서 상기 결정된 셋 어드레스와 상기 결정된 태그 어드레스가 모두 히트되었으면, 상기 결정된 셋 어드레스를 상기 선택 셋 어드레스로 출력하고, 상기 결정된 태그 어드레스는 히트되었으나, 상기 결정된 셋 어드레스가 미스되었으면 상기 결정된 태그 어드레스에 해당되는 다른 셋 어드레스를 상기 선택 셋 어드레스로 출력하고, 상기 결정된 셋 어드레스와 상기 결정된 태그 어드레스가 모두 미스되었으면 소정의 미스 플로우에 따라 캐시 메모리를 다시 액세스하도록 제어하는 히트/미스 로직을 포함하는 것을 특징으로 하는 캐시 메모리의 데이터 독출 장치. If the determined set address and the determined tag address are both hit by the comparator, the determined set address is output as the selected set address, and if the determined tag address is hit, but the determined set address is missed, the determined tag address is output to the determined tag address. And a hit / miss logic for outputting another corresponding set address to the selected set address, and controlling to access the cache memory again according to a predetermined miss flow when both the set set address and the determined tag address are missed. The data reading device of the cache memory. 데이터를 저장하고 있는 소정 개수의 셋 영역과, 태그 어드레스를 저장하고 있는 태그 영역을 갖는 캐시 메모리를 포함하고, 상기 캐시 메모리로 입력되는 인덱스에 의해 결정된 셋 어드레스 및 상기 태그 어드레스에 해당되는 셋 데이터를 독출하는 캐시 메모리의 데이터 독출 방법에 있어서, A cache memory having a predetermined number of set areas storing data and a tag area storing tag addresses, wherein the set address determined by an index input to the cache memory and set data corresponding to the tag addresses are stored. In the data read method of the cache memory to read, (a)상기 결정된 태그 어드레스가 미스되었는 가를 판단하는 단계;(a) determining whether the determined tag address has been missed; (b)상기 (a)단계에서 상기 결정된 태그 어드레스가 미스되었으면 소정의 미스 플로우에 따라 태그 어드레스 및 셋 어드레스를 갱신하고, 상기 (a)단계로 진행하는 단계;(b) if the determined tag address is missed in step (a), updating the tag address and the set address according to a predetermined miss flow, and proceeding to step (a); (c)상기 (a)단계에서 태그 어드레스가 히트되었다면 상기 결정된 셋 어드레스가 미스되었는 가를 판단하는 단계;(c) determining whether the determined set address is missed if the tag address is hit in step (a); (d)상기 (c)단계에서 상기 결정된 셋 어드레스가 미스되었다면, 상기 결정된 태그 어드레스에 해당하는 다른 셋 어드레스를 선택하는 단계;(d) if the determined set address is missed in step (c), selecting another set address corresponding to the determined tag address; (e)상기 선택된 셋 어드레스에 해당되는 셋 데이터를 독출하는 단계; 및 (e) reading set data corresponding to the selected set address; And (f)상기 (c)단계에서 상기 결정된 셋 어드레스가 히트되었다면, 상기 결정된 셋 어드레스에 해당되는 셋 데이터를 독출하는 단계로 이루어지는 것을 특징으로 하는 캐시 메모리의 데이터 독출 방법. (f) if the determined set address is hit in step (c), reading the set data corresponding to the determined set address.
KR10-1999-0010077A 1999-03-24 1999-03-24 Data reading apparatus and method for cache memory Expired - Fee Related KR100505633B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-1999-0010077A KR100505633B1 (en) 1999-03-24 1999-03-24 Data reading apparatus and method for cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-1999-0010077A KR100505633B1 (en) 1999-03-24 1999-03-24 Data reading apparatus and method for cache memory

Publications (2)

Publication Number Publication Date
KR20000061195A KR20000061195A (en) 2000-10-16
KR100505633B1 true KR100505633B1 (en) 2005-08-03

Family

ID=19577563

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-1999-0010077A Expired - Fee Related KR100505633B1 (en) 1999-03-24 1999-03-24 Data reading apparatus and method for cache memory

Country Status (1)

Country Link
KR (1) KR100505633B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR910001549A (en) * 1989-06-20 1991-01-31 다니이 아끼오 A cache memory device that simultaneously updates miss hits and determines miss hits at the next address.
KR930022210A (en) * 1992-04-29 1993-11-23 마이클 에이치. 모리스 Cache miss buffer
KR19990003292A (en) * 1997-06-25 1999-01-15 문정환 How to Retrieve Data from Cache Memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR910001549A (en) * 1989-06-20 1991-01-31 다니이 아끼오 A cache memory device that simultaneously updates miss hits and determines miss hits at the next address.
KR930022210A (en) * 1992-04-29 1993-11-23 마이클 에이치. 모리스 Cache miss buffer
KR19990003292A (en) * 1997-06-25 1999-01-15 문정환 How to Retrieve Data from Cache Memory

Also Published As

Publication number Publication date
KR20000061195A (en) 2000-10-16

Similar Documents

Publication Publication Date Title
US6356990B1 (en) Set-associative cache memory having a built-in set prediction array
US6560679B2 (en) Method and apparatus for reducing power consumption by skipping second accesses to previously accessed cache lines
US5317704A (en) Storage relocating method and hierarchy storage system utilizing a cache memory
US6122708A (en) Data cache for use with streaming data
GB2293672A (en) Virtual page memory buffer
EP0167089B1 (en) Memory access control system and method for an information processing apparatus
JP2002196981A (en) Data processing device
JPH08221324A (en) Access to cache memory
WO2005050454A1 (en) Cache memory and control method thereof
KR100505633B1 (en) Data reading apparatus and method for cache memory
US5724548A (en) System including processor and cache memory and method of controlling the cache memory
JP2008009857A (en) Cache control circuit and processor system
KR100314001B1 (en) Chche memory having variable line size
US5537553A (en) Method of and apparatus for bus control and data processor
JP2000099399A (en) Way predictive cache memory and access method therefor
US6279082B1 (en) System and method for efficient use of cache to improve access to memory of page type
US4733367A (en) Swap control apparatus for hierarchical memory system
JPH0659977A (en) Cache memory capable of executing indicative line substituting operation and its control method
JPH0477344B2 (en)
JP3284508B2 (en) Data prefetch control device
KR0158487B1 (en) Semiconductor memory cache memory controller and method
US10599364B2 (en) Command processing method and storage controller
KR100564560B1 (en) High Speed Memory Controller Using Synchronous DRAM
KR200205164Y1 (en) Cache control unit with multiple cache line processing
JPH0612331A (en) Cache memory controller

Legal Events

Date Code Title Description
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 19990324

PG1501 Laying open of application
A201 Request for examination
PA0201 Request for examination

Patent event code: PA02012R01D

Patent event date: 20031027

Comment text: Request for Examination of Application

Patent event code: PA02011R01I

Patent event date: 19990324

Comment text: Patent Application

E701 Decision to grant or registration of patent right
PE0701 Decision of registration

Patent event code: PE07011S01D

Comment text: Decision to Grant Registration

Patent event date: 20050627

GRNT Written decision to grant
PR0701 Registration of establishment

Comment text: Registration of Establishment

Patent event date: 20050726

Patent event code: PR07011E01D

PR1002 Payment of registration fee

Payment date: 20050727

End annual number: 3

Start annual number: 1

PG1601 Publication of registration
LAPS Lapse due to unpaid annual fee
PC1903 Unpaid annual fee