KR200190099Y1 - A combined cache with memory - Google Patents

A combined cache with memory Download PDF

Info

Publication number
KR200190099Y1
KR200190099Y1 KR2019970032595U KR19970032595U KR200190099Y1 KR 200190099 Y1 KR200190099 Y1 KR 200190099Y1 KR 2019970032595 U KR2019970032595 U KR 2019970032595U KR 19970032595 U KR19970032595 U KR 19970032595U KR 200190099 Y1 KR200190099 Y1 KR 200190099Y1
Authority
KR
South Korea
Prior art keywords
cache
memory
tag
value
mapping
Prior art date
Application number
KR2019970032595U
Other languages
Korean (ko)
Other versions
KR19990019298U (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 KR2019970032595U priority Critical patent/KR200190099Y1/en
Priority to US09/192,541 priority patent/US6334173B1/en
Priority to TW087119393A priority patent/TW420870B/en
Publication of KR19990019298U publication Critical patent/KR19990019298U/en
Application granted granted Critical
Publication of KR200190099Y1 publication Critical patent/KR200190099Y1/en

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/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0804Addressing 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
    • 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/30098Register arrangements
    • 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/30181Instruction operation extension or modification
    • G06F9/30185Instruction operation extension or modification according to one or more bits in the instruction, e.g. prefix, sub-opcode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/25Using a specific main memory architecture
    • G06F2212/251Local memory within processor subsystem
    • G06F2212/2515Local memory within processor subsystem being configurable for different purposes, e.g. as cache or non-cache memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

본 고안은 연관 사상 캐시 구조에서 최소한의 제어 회로만을 추가하여 캐시를 메인 메모리로도 이용할 수 있어, 캐시의 활용을 극대화할 수 있는 연관 사상 캐시 구조의 메모리 겸용 캐시를 제공하기 위한 것으로, 이를 위해 본 고안은 종래의 연관 사상 캐시 구조에 마이크로프로세서 자체 하드웨어를 제어하기 위한 시스템 플래그의 저장수단에 저장되어 있는 마이크로프로세서의 캐시 수행 동작을 나타내는 캐시/메모리 비트에 응답하여, 캐시가 메인 메모리로서 동작할때는 미리 세팅된 캐시 메모리 매핑 영역의 주소값을 선택하여 태그 레지스터를 세팅하고, 캐시가 캐시 자체로서 동작할 때는 주소 버스에 실린 값을 선택하여 태그 레지스터를 세팅하는 다수개의 선택 수단을 더 포함하여 구성되며, 캐시가 메인 메모리로서 동작할 때 상기 각 유효 비트 레지스터를 모두 유효한 것으로 세팅하여 내부 캐시를 메인 메모리로서 활용할 수 있도록 한다.The present invention is to provide a memory combined cache of associative mapping cache structure that can use the cache as main memory by adding only a minimum control circuit in the associative mapping cache structure. The present invention responds in advance to the cache / memory bits representing the cache performance operation of the microprocessor stored in the storage means of the system flag for controlling the microprocessor itself hardware in the conventional associated mapping cache structure, when the cache operates as main memory in advance. It further comprises a plurality of selection means for setting the tag register by selecting the address value of the set cache memory mapping area, and setting the tag register by selecting the value loaded on the address bus when the cache operates as the cache itself, Each of the above validity when the cache operates as main memory Set all the bit registers to valid so that the internal cache can be used as main memory.

Description

메모리 겸용 캐시Memory Combination Cache

본 고안은 마이크로프로세서의 내부 캐시를 메인 메모리로 활용할 수 있도록 고안한 장치로서, 특히 완전 연관 사상 방식(Full associative mapped)의 메모리 겸용 캐시에 관한 것이다.The present invention is a device designed to utilize the microprocessor's internal cache as main memory, and more particularly relates to a full associative mapped memory combined cache.

고성능 마이크로프로세서의 경우, 프로세서의 성능 향상을 위해 프로세서 내부에 대용량의 캐시(cache)를 포함하고 있다. 캐시란 억세스 속도가 느린 저장 매체(즉, 메인 메모리)에 존재하는 데이터들 중 자주 쓰는 데이터를 억세스 속도가 보다 빠른 저장 매체인 캐시에 저장해 놓고 필요한 데이터를 보다 빠르게 마이크로프로세서로 전달하여 시스템의 성능 향상을 꾀한 것으로서, 대부분의 컴퓨터 시스템에서 메인 메모리는 값이 싸면서도 대용량으로 구현하기 용이한 디램(Dynamic Random Access Memory, DRAM)을 사용하고, 캐시 메모리로는 값은 비싸지만 억세스 속도가 빠른 에스램(Static Random Access Memory,SRAM)을 사용한다. 퍼스널컴퓨터(Personal Computer, 이하 PC라 함)의 경우 성능 발달로 펜티엄(Pentium) 등의 고성능 PC는 대용량의 캐시 메모리를 마이크로프로세서 내부에 탑재하고 있으며, 펜티엄의 경우 16K바이트, 펜티엄-프로의 경우는 16K바이트 내부 캐시 외에도 512K바이트의 에스램 캐시까지 내장하고 있다.High-performance microprocessors include a large cache inside the processor to improve processor performance. The cache improves the performance of the system by storing frequently used data in the slow access media (ie, main memory) in the cache, which is a faster access media, and delivering the necessary data to the microprocessor faster. In most computer systems, main memory uses DRAM (Dynamic Random Access Memory (DRAM)), which is inexpensive and easy to implement, and cache memory, which is expensive, but has fast access speed. Static Random Access Memory (SRAM). In the case of personal computers (PCs), high-performance PCs such as Pentium have large cache memory inside the microprocessor, 16K bytes for Pentium, and Pentium-Pro. In addition to the internal 16K byte cache, it also has a 512K byte SRAM cache.

메모리에서 어떤 데이터를 가져올 때, 그 데이터가 캐시에 올라와 있어 메인 메모리의 억세스 없이 그 데이터를 이용할 수 있을 때 이것을 캐시 히트(cache hit)라 하고, 캐시에서 바로 데이터를 가져온다. 캐시 미스(cache miss, 어떤 데이터가 캐시에 올라와 있지 않은 경우)인 경우에는 메인 메모리(외부 메모리 모듈)를 억세스하여 데이터를 가져온다. 이때, 캐시에 빈자리가 있으면 현재 억세스한 데이터 근처의 데이터를 적당한 양만큼 읽어와 캐시에 저장한다.(프로세스의 지역성을 고려하여) 그때, 캐시에 빈자리가 없으면 교체 알고리듬(새로운 블록이 메인 메모리로부터 복사되어 캐시 메모리로 올라오는 경우 그 위치에 원래 있던 내용은 없어지는 데 이때 어떤 블록이 없어지는 것이 가장 좋은 지 선택하는 것, 예를 들면, random, LRU-Least Recently Used-, FIFO-First In First Out- 등과 같은)에 의해 필요 없다고 생각되는 데이터 블록을 교체하여 해당 블록에 로딩한다.When you fetch some data from memory, it is called a cache hit when the data is in the cache and can be used without access to main memory. This is called a cache hit. In the case of a cache miss (if no data is in the cache), the main memory (external memory module) is accessed to retrieve data. At this time, if there is a free space in the cache, the data near the currently accessed data is read and stored in the cache as appropriate (in consideration of the locality of the process). Then, if there is no free space in the cache, a replacement algorithm (a new block is copied from main memory). When it comes up into cache memory, the content that originally existed at that location is lost, choosing which block is best to be lost, for example random, LRU-Least Recently Used-, FIFO-First In First Out. Replace blocks of data deemed unnecessary by such a method and load them into the block.

완전 연관 사상(fully associative mapped) 캐시 구조는 주소 비트 전체를 모두 태그(Tag)로 사용하는 캐시 구조로서, 캐시에 데이터를 로딩할 때 데이터의 어드레스를 캐시의 태그 레지스터에 저장한다. 설명의 편리함을 위해 주소는 16비트, 데이터 버스는 8비트, 캐시의 용량은 2바이트라고 가정한다.The fully associative mapped cache structure is a cache structure that uses all of the address bits as a tag, and stores the address of the data in the tag register of the cache when loading the data into the cache. For convenience of explanation, it is assumed that the address is 16 bits, the data bus is 8 bits, and the cache capacity is 2 bytes.

도1은 캐시 기능으로서만 사용되는 종래의 완전 연관 사상 캐시 구조를 도시한 것으로서, 주소 버스를 통해 입력된 주소는 각 태그 레지스터들(태그 레지스터0,1 - 도면부호 10,11)에 저장된 값과 제1 비교기(12) 및 제2 비교기(13)를 통해 비교되어져, 입력된 주소와 같은 값이 태그 레지스터들 중 하나에 존재할 때 태그 히트를 나타내는 태그 히트 래치(14)가 셋(set)된다. 그리고, 태그 히트를 발생한 태그 레지스터에 대응하는 1비트 유효 비트(Valid bit) 레지스터(각 데이터 레지스터에 저장된 데이터 값이 유용한 값임을 나타내는)의 유효 비트를 확인하여 그 비트가 "유효함(Valid)"으로 셋되어 있는가를 검사한다. 태그 히트 래치(14)가 "1"이고, 유효 비트가 "1"이면 캐시 히트를 발생하고, 데이터 버스에는 데이터 레지스터 중에서 태그 히트를 발생한 데이터 레지스터의 값이 실리거나 읽혀진다.Fig. 1 shows a conventional fully associative mapping cache structure used only as a cache function, in which an address input via an address bus is associated with a value stored in each tag register (tag registers 0,1-10,11). Compared via the first comparator 12 and the second comparator 13, a tag hit latch 14 is set which indicates a tag hit when a value equal to the input address is present in one of the tag registers. Then, the valid bit of the 1-bit valid bit register (indicating that the data value stored in each data register is a useful value) corresponding to the tag register that generated the tag hit is checked, and the bit is " valid ". Check if it is set. If the tag hit latch 14 is " 1 " and the valid bit is " 1 ", a cache hit is generated, and the value of the data register that caused the tag hit in the data register is loaded or read on the data bus.

상기와 같은 구조의 종래 완전 연관 캐시를, 캐시의 용량이 점차 커지고 있고, 마이크로프로세서 및 마이크로컨트롤러의 동작에는 반드시 데이터 저장을 위한 램, 즉 읽고 쓰는 것이 가능한 메모리 모듈이 필요하다는 점에서, 대용량의 캐시를 내장한 마이크로프로세서가 컴퓨터 시스템에서(즉, 매우 큰 메모리 용량을 필요로하는 시스템) 범용 중앙처리장치(Central Process Unit,CPU)로 사용될 때는 캐시를 캐시 고유의 용도로 사용하고, 작은 메모리 용량과 고속처리를 요하는 시스템 제어용으로 사용될 때는 대용량의 캐시를 메모리로 할당하여 사용함으로써, 시스템의 처리 속도를 개선하고, 캐시의 활용을 극대화하고자 한다.In the conventional fully associative cache having the above structure, the capacity of the cache is gradually increasing, and the operation of the microprocessor and the microcontroller requires a RAM for storing data, that is, a memory module capable of reading and writing. When a microprocessor with built-in memory is used as a central processing unit (CPU) in a computer system (that is, a system that requires very large memory capacity), the cache is used for cache-specific purposes. When used for system control that requires high-speed processing, a large cache is allocated and used to improve the processing speed of the system and maximize the utilization of the cache.

본 고안은 상기의 제반 요구사항에 기반하여 안출된 것으로서, 완전 연관 사상 캐시 구조에서 최소한의 제어 회로만을 추가하여 캐시를 메인 메모리로도 이용할 수 있어, 캐시의 활용을 극대화할 수 있는 완전 연관 사상 캐시 구조의 메모리 겸용 캐시를 제공하는데 그 목적이 있다.The present invention has been devised based on the above requirements. In the fully associative mapping cache structure, the cache can be used as the main memory by adding only a minimum control circuit, so that the fully associative mapping cache can maximize the utilization of the cache. Its purpose is to provide a memory-compatible cache.

도1은 캐시 기능으로서만 사용되는 종래의 완전 연관 사상 캐시 구조를 도시한 블록도.Is a block diagram illustrating a conventional fully associative mapping cache structure used only as a cache function.

도2는 메모리 겸용 캐시의 개념도.2 is a conceptual diagram of a memory combined cache.

도3은 본 고안의 개념이 되는 알고리듬을 도시한 도면.3 is a diagram illustrating an algorithm that is a concept of the present invention.

도4는 본 고안의 일실시예로서, 완전 연관 사상 캐시 구조를 도시한 블록도.4 is a block diagram showing a fully associated mapping cache structure as an embodiment of the present invention.

상기 목적을 달성하기 위한 본 고안은 다수개의 태그 레지스터, 다수개의 데이터 레지스터, 주소 버스의 태그 값과 상기 각 태그 레지스터의 값을 비교하는 다수개의 비교기, 및 상기 각 데이터 레지스터의 유효함을 나타내는 다수개의 유효 비트 레지스터를 포함하는 완전 연관 사상 방식의 캐시에 있어서, 마이크로프로세서 자체 하드웨어를 제어하기 위한 시스템 플래그의 저장수단에 저장되어 있는 상기 마이크로프로세서의 캐시 수행 동작을 나타내는 캐시/메모리 비트에 응답하여, 상기 캐시가 메인 메모리로서 동작할때는 미리 세팅된 캐시 메모리 매핑 영역의 주소값을 선택하여 상기 태그 레지스터를 세팅하고, 상기 캐시가 캐시 자체로서 동작할 때는 상기 주소 버스에 실린 값을 선택하여 상기 태그 레지스터를 세팅하는 다수개의 선택 수단을 더 포함하여 이루어지고, 상기 캐시가 메인 메모리로서 동작할 때 상기 각 유효 비트 레지스터를 모두 유효한 것으로 세팅하는 메모리를 겸용하는 완전 연관 사상 방식의 캐시를 포함하여 이루어진다.The present invention for achieving the above object is a plurality of tag registers, a plurality of data registers, a plurality of comparators for comparing the tag value of the address bus and the value of each tag register, and a plurality of indicating the validity of each data register A fully associative mapping scheme comprising a valid bit register, the cache in response to a cache / memory bit indicating a cache performing operation of the microprocessor stored in a storage unit of a system flag for controlling the microprocessor itself hardware. When the cache operates as the main memory, the tag register is set by selecting an address value of a preset cache memory mapping region, and when the cache operates as the cache itself, the tag register is set by selecting a value loaded on the address bus. Multiple selection means And a cache of fully associative mapping scheme that combines memory that sets each valid bit register as all valid when the cache operates as main memory.

이하, 첨부된 도면을 참조하여 본 고안을 상세히 살펴본다.Hereinafter, with reference to the accompanying drawings looks at the present invention in detail.

도2는 메모리 겸용 캐시를 개념적으로 도시한 것으로서, X바이트 크기의 내부 캐시(20) 및 마이크로프로세서 자체 하드웨어를 제어하기 위한 시스템 제어 레지스터(21)를 포함하는 마이크로프로세서(22)와, S바이트 크기의 마이크로프로세서가 억세스할 수 있는 메모리 영역(24)으로 구성된다. 종래의 시스템 제어 레지스터(21)의 각 비트는 마이크로프로세서를 구성하는 하드웨어 중 해당 비트로 제어가능한 부분을 제어하도록 설계되어 있는데, 본 고안에서 이러한 시스템 제어 레지스터 중 사용되지 않던 비트(reserved bit) 중에 적당한 비트를 하나 골라 캐시/메모리 비트(23)로 설정한다. 이 캐시/메모리 비트(23)에 셋팅(setting)된 값에 따라 캐시 메모리를 캐시로 쓸 것인지 메인 메모리로 쓸 것인지를 결정한다. 그 값이 "1"이면 메인 메모리로 사용하고, "0"이면 캐시로 사용한다고 가정한다. 그리고, 캐시 메모리(20)의 크기 X바이트의 X값은 마이크로프로세서 설계시 마이크로프로세서가 가장 효율적으로 동작할 수 있다고 판단되는 값으로 결정되고, 억세스할 수 있는 메모리 영역의 크기 S바이트의 값은 마이크로프로세서의 주소 버스의 비트 수로 결정된다. 가령 주소 비트 수가 10비트라면 S의 값은 2의 10승 즉 1024가 된다.Fig. 2 conceptually illustrates a memory-compatible cache, which includes a microprocessor 22 comprising an X-byte sized internal cache 20 and a system control register 21 for controlling the microprocessor itself hardware. Is composed of a memory area 24 accessible by a microprocessor. Each bit of the conventional system control register 21 is designed to control the controllable portion of the hardware constituting the microprocessor, the appropriate bit among the unused bits of the system control register in the present invention. Select one to set the cache / memory bit 23. The cache memory is written into the cache or the main memory according to the value set in the cache / memory bit 23. If the value is "1", it is assumed to be used as main memory, and if it is "0", it is used as a cache. The X value of the size X bytes of the cache memory 20 is determined as a value that the microprocessor can most efficiently operate when designing the microprocessor, and the value of the size S bytes of the accessible memory area is micro. This is determined by the number of bits in the processor's address bus. For example, if the number of address bits is 10 bits, the value of S is 10 power of 2, that is, 1024.

빗금친 캐시 메모리 영역이 캐시가 메모리로 사용될 때 억세스 가능한 주소 영역 중에서 캐시 메모리가 존재하는 영역을 말하며, 도면에서 도시된 것과 같이 캐시 메모리 영역은 캐시 메모리 매핑 시작점으로부터 캐시 메모리 크기만큼이 된다. 즉, 캐시 메모리 매핑 시작점이 "0"일 때 0번지부터 (X-1)번지까지가 캐시 매핑 영역이 된다.The hatched cache memory area refers to the area where the cache memory exists among the accessible address areas when the cache is used as the memory. As shown in the drawing, the cache memory area becomes the cache memory size from the cache memory mapping start point. That is, when the cache memory mapping start point is "0", addresses 0 to (X-1) become cache mapping areas.

또한, 마이크로프로세서가 시스템 제어용으로 사용될 경우 마이크로프로세서 내부 캐시를 메인 메모리로 활용할 수 있기 위해서는 메모리 컨트롤러의 동작 알고리듬이 도3에 도시된 알고리듬과 같이 변화되는데, 도3은 메모리로부터 데이터를 가져오는 알고리듬을 도시한 것으로서, 블록(BL) 내에 도시한 것이 본 고안의 개념이 되는 알고리듬이다. 도3을 참조하여 구체적으로 살펴보면, 마이크로프로세서 내 시스템 제어 레지스터(21)의 캐시/메모리 비트(23)를 확인하는 제1 단계(31), 캐시/메모리 비트(23)가 "1"인 경우 즉 캐시를 메모리로 사용하는 경우 주소가 캐시 메모리 영역 내에 존재하는지를 확인하는 제2 단계(32), 메모리 영역 내에 존재하지 않는 경우에는 외부 메모리 모듈에서 데이터를 가져오고(34), 주소가 캐시 메모리 영역 내에 존재하는 경우에는 캐시 메모리에서 데이터를 가져오는(33) 제3 단계로 이루어진다. 제1 단계에서, 캐시/메모리 비트(23)가 "0"인 경우 즉 캐시 메모리를 캐시로 사용하는 경우는 캐시의 히트 발생여부를 확인하는(35) 통상의 캐시 메모리가 캐시로서 사용되어지는 알고리듬으로 이어지고, 캐시/메모리 비트(23)의 값이 "0"인 경우는 캐시 메모리를 캐시로 사용하는 종래 기술로서 널리 알려져 있기에 여기서는 상세한 설명을 생략한다.In addition, when the microprocessor is used for system control, in order to utilize the microprocessor internal cache as main memory, the operation algorithm of the memory controller is changed to the algorithm shown in FIG. 3, and FIG. 3 illustrates an algorithm for obtaining data from the memory. As shown, what is shown in the block BL is an algorithm that becomes the concept of the present invention. Specifically, referring to FIG. 3, the first step 31 of checking the cache / memory bit 23 of the system control register 21 in the microprocessor, that is, the cache / memory bit 23 is “1”, namely, A second step (32) of checking if an address exists in the cache memory area if the cache is used as memory, fetching data from an external memory module (34) if it does not exist in the memory area, and the address in the cache memory area If present, the third step is to fetch 33 data from the cache memory. In the first step, when the cache / memory bit 23 is " 0 ", i.e., when the cache memory is used as a cache, an algorithm for checking whether a cache hit has occurred (35) is used. In the case where the value of the cache / memory bit 23 is " 0 ", since the cache memory is widely known as a conventional technology using the cache memory as a cache, the detailed description is omitted here.

본 고안은 전술한 알고리듬을 기초로하여, 마이크로프로세서가 시스템 제어용으로 사용될 경우 마이크로프로세서 내부 캐시를 메인 메모리로 활용할 수 있기 위해서, 캐시 메모리 매핑 영역 내에 존재하는 데이터를 억세스할 때는 캐시 메모리에서 데이터를 억세스하도록 하고, 캐시 메모리 매핑 영역밖에 있는 데이터를 억세스할 때는 외부 메인 메모리에서 데이터를 억세스하도록 종래의 완전 연관 사상 방식의 캐시 하드웨어에 약간의 제어 회로만 덧붙여서 완전 연관 사상 방식의 메인 메모리 겸용 캐시 구조를 구현한다.The present invention is based on the algorithm described above, in order to use the microprocessor internal cache as main memory when the microprocessor is used for system control, the data is accessed from the cache memory when the data existing in the cache memory mapping area is accessed. When accessing data outside of the cache memory mapping area, the memory structure of the fully associated mapping method is implemented by adding only a few control circuits to the conventional fully associated mapping hardware to access the data from the external main memory. do.

도4는 본 고안의 완전 연관 사상 캐시 구조를 도시한 것으로서, 종래의 완전 연관 사상 캐시 구조에 태그 레지스터를 셋팅하기 위해, 제1,제2 2×1멀티플렉서(45,46)를 추가로 구성한다. 제1 멀티플렉서(45)는, 캐시/메모리 비트를 선택신호로 받아 캐시로 동작하는 경우(캐시/메모리 비트가 "0"인 경우)에는 종래와 마찬가지로 주소 버스를 통해 입력된 주소를 선택하여 태그 레지스터0(40)으로 입력하고, 메인 메모리로 동작하는 경우(캐시/메모리 비트가 "1"인 경우)에는 "0"의 값으로 셋팅된 값을 선택하여 태그 레지스터0(40)에 입력한다. 이때, "0"은 캐시 메모리 매핑 영역의 시작점에 해당하는 주소값이다. 제2 멀티플렉서(46)는, 캐시/메모리 비트를 선택신호로 받아 캐시로 동작하는 경우(캐시/메모리 비트가 "0"인 경우)에는 종래와 마찬가지로 주소 버스를 통해 입력된 주소를 선택하여 태그 레지스터1(41)로 입력하고, 메인 메모리로 동작하는 경우(캐시/메모리 비트가 "1"인 경우)에는 "1"의 값으로 셋팅된 값을 선택하여 태그 레지스터1(41)에 입력한다. 이때, "1"은 2번째 캐시 메모리 매핑 영역에 해당하는 주소값이다. 매핑 주소 시작점을 0번지가 아닌 다른 번지로 하고 싶으면, 메인 메모리로 동작할 경우 각 태그 레지스터에 저장되는 값을 적당히 바꾸어주면 된다. 예를 들어, 16진수 1000H번지부터 1001H번지까지 매핑하고 싶다면 태그 레지스터0의 값을 "1000H"로, 태그 레지스터1의 값을 "1001H"로 세팅하면 된다.FIG. 4 illustrates the fully associative mapping cache structure of the present invention, and further includes first and second 2x1 multiplexers 45 and 46 to set a tag register in a conventional fully associative mapping cache structure. . When the first multiplexer 45 receives a cache / memory bit as a selection signal and operates as a cache (when the cache / memory bit is “0”), the first multiplexer 45 selects an address input through an address bus as in the prior art and uses a tag register. When inputting to 0 (40) and operating as main memory (when the cache / memory bit is "1"), a value set to a value of "0" is selected and input to the tag register 0 (40). At this time, "0" is an address value corresponding to the start point of the cache memory mapping area. When the second multiplexer 46 receives a cache / memory bit as a selection signal and operates as a cache (when the cache / memory bit is “0”), the second multiplexer 46 selects an address input through an address bus as in the prior art and uses a tag register. When inputting to 1 (41) and operating as main memory (when the cache / memory bit is "1"), a value set to a value of "1" is selected and input to the tag register 1 (41). At this time, "1" is an address value corresponding to the second cache memory mapping area. If you want to set the starting address of the mapping address to something other than 0, change the value stored in each tag register properly when operating as main memory. For example, if you want to map from hexadecimal 1000H to 1001H, set the value of tag register 0 to "1000H" and the value of tag register 1 to "1001H".

그리고, 캐시/메모리 비트를 참조하여 캐시/메모리 비트가 "1"인경우에 항상 1비트 유효 비트 레지스터0,1(47,48)은 "1"의 값을 갖도록 한다. "1"의 값을 갖도록 레지스터를 세팅하는 회로는 공지의 기술로서 쉽게 구현하므로 여기서의 설명은 생략한다.In addition, the 1-bit valid bit registers 0, 1 (47, 48) always have a value of "1" when the cache / memory bit is "1" with reference to the cache / memory bit. The circuit for setting the register to have a value of "1" is easily implemented as a known technique, and thus the description thereof is omitted.

도면을 참조하여 본 고안의 캐시 메모리가 메인 메모리로서 동작할 경우 일실시예의 동작을 설명한다.Referring to the drawings will be described the operation of one embodiment when the cache memory of the present invention operates as the main memory.

캐시 메모리 매핑 영역 내의 1번지에 존재하는 데이터를 억세스할 경우를 살펴보면, 캐시/메모리 비트가 "1"이고 태그 레지스터0에는 "0"의 태그 값이, 태그 레지스터1에는 "1"의 태그 값이 셋되며, 제1 비교기(42) 및 제2 비교기(43)를 통해 입력된 주소 버스(1번지)와 비교되어 태그 레지스터1의 태그 값과 일치하여 제2 비교기(43)를 통해 "1"의 값을 출력한 후 논리합 게이트(49)를 통과하여 태그 히트 래치(44)에 "1"의 값을 저장한다. 이때, 제2 비교기(43)로부터 출력되는 신호를 입력받아 제3 멀티플렉서(50)를 통해 데이터 버스에 데이터 레지스터1(51)의 값을 출력한다. 그리고, 캐시가 메인 메모리로 동작할 경우 각 1비트 유효 비트 레지스터(47,48)는 모두 "1"로 셋팅되므로, 제4 멀티플렉서(52)를 통해 "1"의 값이 출력되어 상기 태그 히트 래치(44)에 래치된 "1"의 값과 논리곱하여 캐시 히트를 발생한다.In the case of accessing data existing in address 1 of the cache memory mapping area, the cache / memory bit is "1", the tag value of "0" in tag register 0, and the tag value of "1" in tag register 1 The first bus is compared with the address bus (address 1) input through the first comparator 42 and the second comparator 43 so as to match the tag value of the tag register 1 to the value of "1" through the second comparator 43. After outputting the value, the value is passed through the OR gate 49 and stored in the tag hit latch 44. In this case, the signal output from the second comparator 43 is input and the value of the data register 1 51 is output to the data bus through the third multiplexer 50. When the cache operates as the main memory, each of the 1-bit valid bit registers 47 and 48 is set to "1". Therefore, a value of "1" is output through the fourth multiplexer 52, so that the tag hit latches. A cache hit is generated by logically multiplying by the value of " 1 "

캐시 메모리 매핑 영역 밖의 100H번지에 존재하는 데이터를 억세스할 경우를 살펴보면, 100H번지의 태그는 미리 세팅해 놓은 어떤 태그 값과도 일치하지 않는다. 따라서, 캐시 히트는 발생하지 않고 마이크로프로세서는 외부 메모리 모듈로부터 데이터를 읽거나 쓰게 된다.In the case of accessing data existing in the 100H address outside the cache memory mapping area, the tag of the 100H address does not match any preset tag value. Thus, no cache hit occurs and the microprocessor reads or writes data from the external memory module.

본 고안은 일실시예로 든 16비트 주소 버스, 8비트 데이터 버스, 2바이트 용량의 캐시 메모리에 한정되지 않고, n비트 주소 버스, m비트 데이터 버스, k바이트 용량의 캐쉬로 확장가능하다.The present invention is not limited to the 16-bit address bus, the 8-bit data bus, and the two-byte cache memory, but is scalable to the n-bit address bus, the m-bit data bus, and the k-byte cache.

이상에서 설명한 본 고안은 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니고, 본 고안의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하다는 것이 본 고안이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 명백할 것이다.The present invention described above is not limited to the above-described embodiment and the accompanying drawings, and various substitutions, modifications, and changes are possible in the art without departing from the technical spirit of the present invention. It will be clear to those of ordinary knowledge.

상기와 같이 이루어지는 본 고안은 종래의 완전 연관 사상 캐시에 최소한의 제어 회로를 추가함으로써 대용량의 완전 연관 사상 캐시를 탑재한 마이크로프로세서가 컴퓨터 시스템에서 범용 중앙처리장치로 사용될 때는 캐시를 캐시 고유의 용도로 사용하고, 시스템 제어용으로 사용될 때는 대용량의 캐시를 메모리로 할당하여 사용하게 함으로써 캐시의 활용도를 극대화하고 시스템 제어보드 구성시 가격을 낮출 수 있는 효과가 있으며, 또한 마이크로프로세서 내부에 탑재된 캐시 용량이 충분히 크면 별도의 메모리 모듈없이 시스템 제어 보드를 구성할 수 있을 것이며, 캐시의 용량이 필요한 메모리 크기보다 작다고 하더라도 별도로 구성해야 할 메모리의 크기를 크게 줄일 수 있기 때문에 비용면에서 큰 효과를 얻을 수 있다.The present invention, as described above, adds a minimum control circuit to a conventional fully associated mapping cache, so that when a microprocessor equipped with a large, fully associated mapping cache is used as a general-purpose central processing unit in a computer system, the cache is used for cache-specific purposes. When used for system control, a large amount of cache is allocated and used for memory control, which maximizes the utilization of the cache and lowers the price when configuring the system control board. Also, the capacity of the cache inside the microprocessor is sufficient. If it is large, the system control board can be configured without a separate memory module. Even if the capacity of the cache is smaller than the required memory size, the size of the memory to be separately configured can be greatly reduced, which can bring a great effect in terms of cost.

Claims (3)

다수개의 태그 레지스터, 다수개의 데이터 레지스터, 주소 버스의 태그 값과 상기 각 태그 레지스터의 값을 비교하는 다수개의 비교기, 및 상기 각 데이터 레지스터의 유효함을 나타내는 다수개의 유효 비트 레지스터를 포함하는 완전 연관 사상 방식의 캐시에 있어서,Fully associative mapping comprising a plurality of tag registers, a plurality of data registers, a plurality of comparators for comparing the tag values of the address bus and the value of each tag register, and a plurality of valid bit registers indicating the validity of each data register In the cache, 마이크로프로세서 자체 하드웨어를 제어하기 위한 시스템 플래그의 저장수단에 저장되어 있는 상기 마이크로프로세서의 캐시 수행 동작을 나타내는 캐시/메모리 비트에 응답하여, 상기 캐시가 메인 메모리로서 동작할때는 캐시 메모리 매핑 영역의 시작 주소값을 선택하여 상기 태그 레지스터를 세팅하고, 상기 캐시가 캐시 자체로서 동작할 때는 상기 주소 버스에 실린 값을 선택하여 상기 태그 레지스터를 세팅하는 다수개의 선택 수단을 더 포함하여 이루어지고,In response to a cache / memory bit indicating a cache performing operation of the microprocessor stored in a storage unit of a system flag for controlling the hardware of the microprocessor itself, the start address value of the cache memory mapping area when the cache operates as main memory. Selects the tag register and sets the tag register, and when the cache operates as the cache itself, a plurality of selection means for selecting the value loaded on the address bus to set the tag register, 상기 캐시가 메인 메모리로서 동작할 때 상기 각 유효 비트 레지스터를 모두 유효한 것으로 세팅하는 메모리를 겸용하는 완전 연관 사상 방식의 캐시.A fully associative mapping scheme that combines memory that sets each valid bit register as valid when the cache operates as main memory. 제 1 항에 있어서,The method of claim 1, 상기 캐시 메모리 매핑 영역의 시작 주소값을 임의로 변경할 수 있는 메모리를 겸용하는 완전 연관 사상 방식의 캐시.A cache of a fully associative mapping scheme that uses a memory capable of arbitrarily changing a start address value of the cache memory mapping region. 제 2 항에 있어서,The method of claim 2, 상기 캐시 메모리 매핑 영역의 시작 주소값은The start address value of the cache memory mapping area is 최소한의 하드웨어 추가를 위하여 "0"으로 하는 메모리를 겸용하는 완전 연관 사상 방식의 캐시.A fully associative mapping cache that combines memory with "0" for minimal hardware additions.
KR2019970032595U 1997-11-17 1997-11-18 A combined cache with memory KR200190099Y1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
KR2019970032595U KR200190099Y1 (en) 1997-11-18 1997-11-18 A combined cache with memory
US09/192,541 US6334173B1 (en) 1997-11-17 1998-11-17 Combined cache with main memory and a control method thereof
TW087119393A TW420870B (en) 1997-11-17 1998-11-23 A combined cache with main memory and a control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR2019970032595U KR200190099Y1 (en) 1997-11-18 1997-11-18 A combined cache with memory

Publications (2)

Publication Number Publication Date
KR19990019298U KR19990019298U (en) 1999-06-15
KR200190099Y1 true KR200190099Y1 (en) 2000-08-01

Family

ID=19514355

Family Applications (1)

Application Number Title Priority Date Filing Date
KR2019970032595U KR200190099Y1 (en) 1997-11-17 1997-11-18 A combined cache with memory

Country Status (1)

Country Link
KR (1) KR200190099Y1 (en)

Also Published As

Publication number Publication date
KR19990019298U (en) 1999-06-15

Similar Documents

Publication Publication Date Title
JP6505132B2 (en) Memory controller utilizing memory capacity compression and associated processor based system and method
US9384134B2 (en) Persistent memory for processor main memory
US4426682A (en) Fast cache flush mechanism
US5694567A (en) Direct-mapped cache with cache locking allowing expanded contiguous memory storage by swapping one or more tag bits with one or more index bits
US6640283B2 (en) Apparatus for cache compression engine for data compression of on-chip caches to increase effective cache size
US7493445B2 (en) Cache memory system and control method of the cache memory system
JPH11161547A (en) Storage device for data processor and method for accessing storage place
US6334173B1 (en) Combined cache with main memory and a control method thereof
JPH1055307A (en) Computer system
US5956752A (en) Method and apparatus for accessing a cache using index prediction
US6678790B1 (en) Microprocessor chip having a memory that is reconfigurable to function as on-chip main memory or an on-chip cache
CN109219804B (en) Nonvolatile memory access method apparatus and system
US20100011165A1 (en) Cache management systems and methods
US5161219A (en) Computer system with input/output cache
KR100326989B1 (en) Method and system for pre-fetch cache interrogation using snoop port
US20020116581A1 (en) Memory aliasing in a processor system
JPH09325913A (en) Semiconductor memory
JP5745200B2 (en) Cache memory system and operation method capable of controlling number of blocks stored in cache memory
KR200190099Y1 (en) A combined cache with memory
US6766435B1 (en) Processor with a general register set that includes address translation registers
EP0474356A1 (en) Cache memory and operating method
KR960008320B1 (en) System equipped with processor and method of converting addresses in the said system
KR200182184Y1 (en) A combined cache with memory
KR100257750B1 (en) A combined cache with memory
JP2008511882A (en) Virtual address cache and method for sharing data using unique task identifiers

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
REGI Registration of establishment
FPAY Annual fee payment

Payment date: 20050422

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee