KR20110092014A - Method for managing coherence, coherence management unit, cache device and semiconductor device including the same - Google Patents

Method for managing coherence, coherence management unit, cache device and semiconductor device including the same Download PDF

Info

Publication number
KR20110092014A
KR20110092014A KR1020100011423A KR20100011423A KR20110092014A KR 20110092014 A KR20110092014 A KR 20110092014A KR 1020100011423 A KR1020100011423 A KR 1020100011423A KR 20100011423 A KR20100011423 A KR 20100011423A KR 20110092014 A KR20110092014 A KR 20110092014A
Authority
KR
South Korea
Prior art keywords
cache
data
requested data
stored
cache line
Prior art date
Application number
KR1020100011423A
Other languages
Korean (ko)
Other versions
KR101092929B1 (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 KR20100011423A priority Critical patent/KR101092929B1/en
Publication of KR20110092014A publication Critical patent/KR20110092014A/en
Application granted granted Critical
Publication of KR101092929B1 publication Critical patent/KR101092929B1/en

Links

Images

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/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0815Cache consistency protocols
    • G06F12/0831Cache consistency protocols using a bus scheme, e.g. with bus monitoring or watching means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • G06F13/1652Handling requests for interconnection or transfer for access to memory bus based on arbitration in a multiprocessor architecture
    • G06F13/1657Access to multiple memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/167Interprocessor communication using a common memory, e.g. mailbox

Abstract

PURPOSE: A coherence management method, coherence management circuit, cache device, and semiconductor device are provided to increase response speed by supplying data which is requested based on internal stored data. CONSTITUTION: An internal storage space(1150) stores data stored in a cache line. An arbiter(1110) receives a request signal of a core. A coherence management unit(1130) confirms a first cache line storing requested data corresponding to the request signals. The coherence management unit supplies request data to the arbiter according to a confirming result.

Description

일관성 관리 방법, 일관성 관리 회로, 이를 포함하는 캐시 장치 및 반도체 장치 {Method for managing coherence, coherence management unit, cache device and semiconductor device including the same}Consistency Management Method, Consistency Management Circuit, Cache Device and Semiconductor Device Comprising the Same {Method for managing coherence, coherence management unit, cache device and semiconductor device including the same}

본 발명은 일관성 관리 기술에 관한 것으로, 보다 상세하게는 멀티 코어 환경에서 캐시들의 일관성(coherence)을 관리하는 일관성 관리 방법, 일관성 관리 회로, 이를 포함하는 캐시 장치 및 반도체 장치에 관한 것이다.The present invention relates to a consistency management technique, and more particularly, to a consistency management method for managing coherence of caches in a multi-core environment, a consistency management circuit, a cache device and a semiconductor device including the same.

기술이 발전함에 따라 프로세서의 동작속도가 메인 메모리의 동작속도에 비해 빠르게 되면서, 프로세서와 메인 메모리의 속도 차에 의한 문제를 해결하기 위해 용량은 작지만 고속인 캐시 메모리가 사용되고 있다. 또한 하나의 프로세서 내에 복수의 코어를 구비하여 복수의 코어들이 작업을 분담하여 처리하는 멀티 코어(multi-core) 프로세서들이 개발되었다. 멀티 코어 프로세서 시스템에서는 복수의 코어들이 상응하는 캐시 메모리들과 각각 연결된다. 또한 멀티 코어 환경에서는 각 코어들 사이의 공유 데이터에 대한 일관성(coherence)을 유지하기 위해 일관성 관리 회로(coherence management unit, CMU)를 포함할 수 있다.As technology advances, the operating speed of the processor is faster than that of the main memory, and a small but high speed cache memory is used to solve the problem caused by the speed difference between the processor and the main memory. In addition, multi-core processors have been developed in which a plurality of cores are provided in one processor and a plurality of cores share and process tasks. In a multi-core processor system a plurality of cores are each connected with corresponding cache memories. In addition, in a multi-core environment, a coherence management unit (CMU) may be included to maintain coherence of shared data between cores.

일반적으로 일관성을 유지하기 위해 각 캐시 메모리들 간의 라인 상태 정보를 포함하는 MESI 프로토콜이 채택된다. MESI 프로토콜 하에서 캐시 메모리의 각 라인들은 수정 상태(Modified, M), 배타 상태(Exclusive, E), 공유 상태(Shared, S) 및 무효 상태(Invalid, I)의 네 가지 상태로 표현될 수 있다. 상기의 네 가지 상태 중 수정 상태는 상기 복수의 캐시들 중 하나의 캐시에만 존재한다. 따라서 복수의 코어들이 일관성 관리 회로를 통해 데이터를 요청하는 경우, 수정 상태의 캐시 라인에 대해서는 수정 상태의 캐시 라인에 저장된 상기 요청된 데이터가 한 캐시에서 타 캐시로 전달되는 캐시간 전송(cache-to-cache transfer)이 자주 발생한다. 캐시간 전송을 통해 타 캐시에서 요청된 데이터를 받아오는데 수 사이클 또는 수십 사이클이 소요되기 때문에, 일관성 관리 회로의 성능이 저하되며 또한 코어의 성능이 저하된다.In general, MESI protocols are employed that include line state information between cache memories to maintain consistency. Under the MESI protocol, each line of the cache memory may be represented in four states: modified state (Modified, M), exclusive state (Exclusive, E), shared state (Shared, S), and invalid state (Invalid, I). The modified state of the four states exists only in one of the plurality of caches. Therefore, when a plurality of cores request data through the coherence management circuit, a cache-to-cache transfer in which the requested data stored in the modified cache line is transferred from one cache to another cache for the modified cache line. cache transfers occur frequently. Because it takes several cycles or tens of cycles to receive the data requested from other caches through the cache transfer, the performance of the consistency management circuit is degraded and the core performance is also degraded.

상기와 같은 문제점을 해결하기 위해 타 캐시의 응답을 빠르게 하는 방법이 연구되었으나, 응답 속도를 빠르게 하기 위해서는 캐시는 자신이 하는 프로세스를 멈춰야 하며, 이는 캐시의 성능을 저하시키는 원인이 된다.In order to solve the above problems, a method of speeding up the response of another cache has been studied, but in order to speed up the response, the cache must stop its own process, which causes the performance of the cache.

상기와 같은 문제점을 해결하기 위한 본 발명의 일 목적은 내부 저장공간에 저장된 데이터에 기초하여 요청된 데이터를 제공함으로써 응답 속도가 향상된 일관성 관리 방법을 제공하는 것이다.One object of the present invention for solving the above problems is to provide a consistency management method with improved response speed by providing the requested data based on the data stored in the internal storage space.

본 발명의 다른 목적은 내부 저장공간에 저장된 데이터에 기초하여 요청된 데이터를 제공함으로써 응답 속도가 향상된 일관성 관리 회로를 제공하는 것이다.Another object of the present invention is to provide a consistency management circuit with improved response speed by providing requested data based on data stored in internal storage.

본 발명의 또 다른 목적은 응답 속도가 향상된 일관성 관리 회로를 포함하는 캐시 장치 및 반도체 장치를 제공하는 것이다.It is another object of the present invention to provide a cache device and a semiconductor device including a consistency management circuit with improved response speed.

상술한 본 발명의 일 목적을 달성하기 위하여, 본 발명의 일 실시예에 따른 멀티 코어 반도체 장치에 구비되는 복수의 코어들과 각각 연결되고 데이터가 저장된 복수의 캐시 라인들을 각각 포함하는 복수의 캐시 메모리의 일관성 관리 방법에서는, 상기 복수의 캐시 라인들에 저장된 상기 데이터 중 일부가 저장된 내부 저장공간을 제공하고; 상기 복수의 코어들 중 하나로부터 요청 신호를 수신하며; 상기 복수의 캐시 메모리의 상기 캐시 라인들 중 상기 요청 신호에 대응하는 요청된 데이터가 저장되어 있는 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 상기 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 요청 신호를 제공한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공한다.In order to achieve the above object of the present invention, a plurality of cache memory, each of which comprises a plurality of cache lines each connected to a plurality of cores provided in the multi-core semiconductor device according to an embodiment of the present invention and stored data In the method of coherency management of the data, the method further comprises: providing an internal storage space in which some of the data stored in the plurality of cache lines are stored; Receive a request signal from one of the plurality of cores; Based on whether there is a first cache line in which the requested data corresponding to the request signal exists among the cache lines of the plurality of cache memories and whether the requested data is stored in the internal storage space. Provide the requested data to a second cache line in a cache memory associated with the core that provided the request signal.

일 실시예에서, 상기 캐시 라인들의 상태 정보는 MESI 프로토콜에 기초하여 제공되며, 상기 내부 저장공간에 저장되는 데이터는 수정(Modified) 상태의 캐시 라인에 저장된 데이터일 수 있다. 이 경우, 상기 제2 캐시 라인에 상기 요청된 데이터를 제공함에 있어서, 상기 제1 캐시 라인이 존재하는지 판단하고; 상기 제1 캐시 라인의 상태가 상기 수정 상태인지 판단하며; 상기 요청된 데이터가 상기 내부 저장공간에 존재하는지 판단할 수 있다.In one embodiment, the state information of the cache lines is provided based on a MESI protocol, and the data stored in the internal storage may be data stored in a cache line in a modified state. In this case, in providing the requested data to the second cache line, determining whether the first cache line exists; Determine whether a state of the first cache line is the modified state; It may be determined whether the requested data exists in the internal storage space.

또한, 상기 제2 캐시 라인에 상기 요청된 데이터를 제공함에 있어서, 상기 제1 캐시 라인이 존재하고, 상기 제1 캐시 라인의 상태가 상기 수정 상태이며, 상기 요청된 데이터가 상기 내부 저장공간에 존재하는 경우, 상기 내부 저장공간에서 상기 요청된 데이터를 독출하여 상기 제2 캐시 라인에 저장하고; 상기 제1 및 제2 캐시 라인들의 상태 정보를 공유(Shared) 상태로 변경할 수 있다.Further, in providing the requested data to the second cache line, the first cache line exists, the state of the first cache line is the modified state, and the requested data exists in the internal storage space. Read the requested data from the internal storage and store the read data in the second cache line; The state information of the first and second cache lines may be changed to a shared state.

상기 제2 캐시 라인에 상기 요청된 데이터를 제공함에 있어서, 상기 제1 캐시 라인이 존재하고 상기 제1 캐시 라인의 상태가 상기 수정 상태가 아니거나 또는 상기 요청된 데이터가 상기 내부 저장공간에 존재하지 않는 경우, 캐시간 전송(cache-to-cache transfer)을 통해 상기 제2 캐시 라인에 상기 요청된 데이터를 저장하고; 상기 제1 및 제2 캐시 라인들의 상태 정보를 공유 상태로 변경할 수 있다. 이 경우, 상기 일관성 관리 방법에서는 상기 요청된 데이터를 상기 내부 저장공간에 더 저장할 수 있다.In providing the requested data to the second cache line, the first cache line exists and the state of the first cache line is not the modified state or the requested data does not exist in the internal storage. Otherwise, store the requested data in the second cache line via cache-to-cache transfer; The state information of the first and second cache lines may be changed to a shared state. In this case, the consistency management method may further store the requested data in the internal storage space.

상기 제2 캐시 라인에 상기 요청된 데이터를 제공함에 있어서, 상기 제1 캐시 라인이 존재하지 않는 경우, 외부 메모리에서 상기 요청된 데이터를 독출하여 상기 제2 캐시 라인에 저장하고; 상기 제2 캐시 라인의 상태 정보를 배타(E) 상태로 변경할 수 있다.In providing the requested data to the second cache line, if the first cache line does not exist, reading the requested data from an external memory and storing the requested data in the second cache line; The state information of the second cache line may be changed to an exclusive (E) state.

상술한 본 발명의 일 목적을 달성하기 위하여, 본 발명의 일 실시예에 따른 멀티 코어 반도체 장치에 구비되는 복수의 코어들과 각각 연결되고 데이터가 저장된 복수의 캐시 라인들을 각각 포함하는 복수의 캐시 메모리의 일관성 관리 회로는, 내부 저장공간, 중재부 및 일관성 관리부를 포함한다. 상기 내부 저장공간은 상기 복수의 캐시 라인들에 저장된 상기 데이터 중 일부를 저장한다. 상기 중재부는 상기 복수의 코어들로부터 요청 신호들을 수신하고, 상기 요청 신호들 중 하나를 제공한다. 상기 일관성 관리부는 상기 복수의 캐시 메모리의 상기 캐시 라인들 중 상기 제공된 요청 신호에 대응하는 요청된 데이터가 저장되어 있는 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 상기 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 요청된 데이터를 상기 중재부에 제공하고, 상기 복수의 캐시 메모리들에 저장된 상기 데이터의 일관성을 유지한다. 또한 상기 중재부는 상기 제공된 요청 신호를 발생한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공한다.In order to achieve the above object of the present invention, a plurality of cache memory, each of which comprises a plurality of cache lines each connected to a plurality of cores provided in the multi-core semiconductor device according to an embodiment of the present invention and stored data The coherence management circuit of the internal storage space, the arbitration unit and the consistency management unit. The internal storage stores some of the data stored in the plurality of cache lines. The arbitration unit receives request signals from the plurality of cores and provides one of the request signals. The consistency management unit may include whether a first cache line in which the requested data corresponding to the provided request signal exists among the cache lines of the plurality of cache memories exists and the requested data is stored in the internal storage space. Based on whether there is, provide the requested data to the arbitration unit, and maintain consistency of the data stored in the plurality of cache memories. The arbiter also provides the requested data to a second cache line in a cache memory associated with the core that generated the provided request signal.

일 실시예에서, 상기 캐시 라인들의 상태 정보는 MESI 프로토콜에 기초하여 제공되며, 상기 내부 저장공간에 저장되는 데이터는 수정 상태의 캐시 라인에 저장된 데이터일 수 있다. 이 경우, 상기 일관성 관리부는, 상기 제1 캐시 라인이 존재하는지 판단하고, 상기 제1 캐시 라인의 상태가 상기 수정 상태인지 판단하며, 상기 요청된 데이터가 상기 내부 저장공간에 존재하는지 판단할 수 있다.In one embodiment, the state information of the cache lines is provided based on a MESI protocol, and the data stored in the internal storage may be data stored in the cache line of the modified state. In this case, the consistency manager may determine whether the first cache line exists, determine whether the state of the first cache line is the modified state, and determine whether the requested data exists in the internal storage space. .

또한, 상기 일관성 관리부는, 상기 제1 캐시 라인이 존재하고, 상기 제1 캐시 라인의 상태가 상기 수정 상태이며, 상기 요청된 데이터가 상기 내부 저장공간에 존재하는 경우, 상기 내부 저장공간에서 상기 요청된 데이터를 독출하여 상기 중재부에 제공하며, 상기 제1 및 제2 캐시 라인들의 상태 정보를 공유 상태로 변경하는 변경 신호를 제공할 수 있다.In addition, the consistency management unit, if the first cache line is present, the state of the first cache line is the modified state, and the requested data exists in the internal storage, the request in the internal storage space The read data may be read and provided to the arbitration unit, and a change signal for changing the state information of the first and second cache lines into a shared state may be provided.

상술한 본 발명의 일 목적을 달성하기 위하여, 본 발명의 일 실시예에 따른 복수의 코어들을 가지는 멀티 코어 반도체 장치에 포함된 캐시 장치는 복수의 캐시 메모리들 및 일관성 관리 회로를 포함한다. 상기 복수의 캐시 메모리들은 상기 복수의 코어들과 각각 연결되고 데이터가 저장된 복수의 캐시 라인들을 각각 포함한다. 상기 일관성 관리 회로는 상기 복수의 코어들 중 하나로부터 데이터를 요청받고, 상기 복수의 캐시 메모리들의 상기 캐시 라인들 중 상기 요청된 데이터가 저장되어 있는 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 데이터를 요청한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공하며, 상기 복수의 캐시 메모리들에 저장된 상기 데이터의 일관성을 유지한다.In order to achieve the above object of the present invention, a cache device included in a multi-core semiconductor device having a plurality of cores according to an embodiment of the present invention includes a plurality of cache memories and a consistency management circuit. The plurality of cache memories respectively include a plurality of cache lines connected to the plurality of cores and storing data. The consistency management circuitry receives data from one of the plurality of cores, whether there is a first cache line in which the requested data is stored among the cache lines of the plurality of cache memories, and the requested data. Provide the requested data to a second cache line in a cache memory associated with the core that requested the data, based on whether is stored in internal storage, and maintain consistency of the data stored in the plurality of cache memories. do.

일 실시예에서, 상기 일관성 관리 회로는 내부 저장공간, 중재부 및 일관성 관리부를 포함할 수 있다. 상기 내부 저장공간은 상기 복수의 캐시 라인들에 저장된 상기 데이터 중 일부를 저장한다. 상기 중재부는 상기 복수의 코어들로부터 요청 신호들을 수신하고, 상기 요청 신호들 중 하나를 제공한다. 상기 일관성 관리부는 상기 복수의 캐시 메모리의 상기 캐시 라인들 중 상기 제공된 요청 신호에 대응하는 상기 요청된 데이터가 저장되어 있는 상기 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 상기 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 요청된 데이터를 상기 중재부에 제공하고, 상기 복수의 캐시 메모리들에 저장된 상기 데이터의 일관성을 유지한다. 또한 상기 중재부는 상기 제공된 요청 신호를 발생한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공한다.In one embodiment, the consistency management circuit may include an internal storage, an arbitration unit and a consistency management unit. The internal storage stores some of the data stored in the plurality of cache lines. The arbitration unit receives request signals from the plurality of cores and provides one of the request signals. The consistency management unit may determine whether the first cache line in which the requested data corresponding to the provided request signal exists among the cache lines of the plurality of cache memories exists and the requested data are stored in the internal storage space. Based on whether it is stored, provide the requested data to the arbitration unit, and maintain consistency of the data stored in the plurality of cache memories. The arbiter also provides the requested data to a second cache line in a cache memory associated with the core that generated the provided request signal.

상술한 본 발명의 일 목적을 달성하기 위하여, 본 발명의 일 실시예에 따른 멀티 코어 반도체 장치는 메인 메모리, 캐시 장치 및 프로세서를 포함한다. 상기 캐시 장치는 상기 메인 메모리의 데이터 중 일부를 저장하고, 상기 저장된 데이터의 일관성을 유지한다. 상기 프로세서는 복수의 코어들을 포함하고, 상기 캐시 장치를 통해 상기 메인 메모리와 데이터를 주고받는다. 상기 캐시 장치는 복수의 캐시 메모리들 및 일관성 관리 회로를 포함한다. 상기 복수의 캐시 메모리들은 상기 복수의 코어들과 각각 연결되고 상기 메인 메모리의 데이터 중 일부가 저장된 복수의 캐시 라인들을 각각 포함한다. 상기 일관성 관리 회로는 상기 복수의 코어들 중 하나로부터 데이터를 요청받고, 상기 복수의 캐시 메모리들의 상기 캐시 라인들 중 상기 요청된 데이터가 저장되어 있는 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 데이터를 요청한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공하며, 상기 복수의 캐시 메모리들에 저장된 상기 데이터의 일관성을 유지한다.In order to achieve the above object of the present invention, a multi-core semiconductor device according to an embodiment of the present invention includes a main memory, a cache device, and a processor. The cache device stores some of the data of the main memory and maintains the consistency of the stored data. The processor includes a plurality of cores and exchanges data with the main memory through the cache device. The cache device includes a plurality of cache memories and a consistency management circuit. The plurality of cache memories respectively include a plurality of cache lines connected to the plurality of cores and in which some of the data of the main memory are stored. The consistency management circuitry receives data from one of the plurality of cores, whether there is a first cache line in which the requested data is stored among the cache lines of the plurality of cache memories, and the requested data. Provide the requested data to a second cache line in a cache memory associated with the core that requested the data, based on whether is stored in internal storage, and maintain consistency of the data stored in the plurality of cache memories. do.

일 실시예에서, 상기 일관성 관리 회로는 내부 저장공간, 중재부 및 일관성 관리부를 포함한다. 상기 내부 저장공간은 상기 복수의 캐시 라인들에 저장된 상기 데이터 중 일부를 저장한다. 상기 중재부는 상기 복수의 코어들로부터 요청 신호들을 수신하고, 상기 요청 신호들 중 하나를 제공한다. 상기 일관성 관리부는 상기 복수의 캐시 메모리의 상기 캐시 라인들 중 상기 제공된 요청 신호에 대응하는 상기 요청된 데이터가 저장되어 있는 상기 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 상기 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 요청된 데이터를 상기 중재부에 제공하고, 상기 복수의 캐시 메모리들에 저장된 상기 데이터의 일관성을 유지한다. 또한 상기 중재부는 상기 제공된 요청 신호를 발생한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공한다.In one embodiment, the consistency management circuitry includes an internal storage, an arbitration unit and a consistency management unit. The internal storage stores some of the data stored in the plurality of cache lines. The arbitration unit receives request signals from the plurality of cores and provides one of the request signals. The consistency management unit may determine whether the first cache line in which the requested data corresponding to the provided request signal exists among the cache lines of the plurality of cache memories exists and the requested data are stored in the internal storage space. Based on whether it is stored, provide the requested data to the arbitration unit, and maintain consistency of the data stored in the plurality of cache memories. The arbiter also provides the requested data to a second cache line in a cache memory associated with the core that generated the provided request signal.

상기와 같은 본 발명의 실시예들에 따른 일관성 관리 방법 및 일관성 관리 회로는 내부 저장공간에 데이터를 저장하여 요청된 데이터와 상기 내부 저장공간에 저장된 데이터가 일치하는 경우 캐시간 전송 없이 상기 요청된 데이터를 직접 제공함으로써, 응답 속도를 향상시키고 회로의 성능을 향상시킬 수 있다.The consistency management method and the consistency management circuit according to the embodiments of the present invention store data in an internal storage space, and if the requested data matches the data stored in the internal storage space, the requested data without cache transmission. By directly providing, the response speed can be improved and the performance of the circuit can be improved.

도 1은 본 발명의 일 실시예에 따른 복수의 코어들을 가지는 멀티 코어 반도체 장치에 포함된 캐시 장치를 나타내는 블록도이다.
도 2는 본 발명의 일 실시예에 따른 복수의 코어들을 가지는 멀티 코어 반도체 장치에 포함된 복수의 캐시 메모리의 일관성 관리 방법을 나타내는 순서도이다.
도 3은 도 2의 제2 캐시 라인에 요청된 데이터를 제공하는 단계의 일 예를 나타내는 순서도이다.
도 4는 본 발명의 일 실시예에 따른 멀티 코어 반도체 장치를 나타내는 블록도이다.
1 is a block diagram illustrating a cache device included in a multi-core semiconductor device having a plurality of cores according to an exemplary embodiment of the present invention.
2 is a flowchart illustrating a method of managing a consistency of a plurality of cache memories included in a multi-core semiconductor device having a plurality of cores according to an exemplary embodiment of the present invention.
FIG. 3 is a flowchart illustrating an example of providing data requested to a second cache line of FIG. 2.
4 is a block diagram illustrating a multi-core semiconductor device according to an embodiment of the present invention.

본문에 개시되어 있는 본 발명의 실시예들에 대해서, 특정한 구조적 내지 기능적 설명들은 단지 본 발명의 실시예를 설명하기 위한 목적으로 예시된 것으로, 본 발명의 실시예들은 다양한 형태로 실시될 수 있으며 본문에 설명된 실시예들에 한정되는 것으로 해석되어서는 아니 된다.With respect to the embodiments of the present invention disclosed in the text, specific structural to functional descriptions are merely illustrated for the purpose of describing embodiments of the present invention, embodiments of the present invention may be implemented in various forms and It should not be construed as limited to the embodiments described in.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 형태를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 본문에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 개시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 구성요소에 대해 사용하였다.As the inventive concept allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the text. However, this is not intended to limit the present invention to the specific disclosed form, it should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention. In describing the drawings, similar reference numerals are used for the components.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위로부터 이탈되지 않은 채 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. The terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 구성요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.When a component is said to be "connected" or "connected" to another component, it may be directly connected to or connected to that other component, but it may be understood that another component may exist in between. Should be. On the other hand, when a component is said to be "directly connected" or "directly connected" to another component, it should be understood that there is no other component in between. Other expressions describing the relationship between components, such as "between" and "immediately between," or "neighboring to," and "directly neighboring to" should be interpreted as well.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 설시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, the terms "comprise" or "having" are intended to indicate that there is a feature, number, step, action, component, part, or combination thereof that is described, and that one or more other features or numbers are present. It should be understood that it does not exclude in advance the possibility of the presence or addition of steps, actions, components, parts or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다. Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art. Terms such as those defined in the commonly used dictionaries should be construed as having meanings consistent with the meanings in the context of the related art and shall not be construed in ideal or excessively formal meanings unless expressly defined in this application. Do not.

한편, 어떤 실시예가 달리 구현 가능한 경우에 특정 블록 내에 명기된 기능 또는 동작이 순서도에 명기된 순서와 다르게 일어날 수도 있다. 예를 들어, 연속하는 두 블록이 실제로는 실질적으로 동시에 수행될 수도 있고, 관련된 기능 또는 동작에 따라서는 상기 블록들이 거꾸로 수행될 수도 있다.On the other hand, when an embodiment is otherwise implemented, a function or operation specified in a specific block may occur out of the order specified in the flowchart. For example, two consecutive blocks may actually be performed substantially simultaneously, and the blocks may be performed upside down depending on the function or operation involved.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, with reference to the accompanying drawings, it will be described in detail a preferred embodiment of the present invention. The same reference numerals are used for the same constituent elements in the drawings and redundant explanations for the same constituent elements are omitted.

도 1은 본 발명의 일 실시예에 따른 복수의 코어들을 가지는 멀티 코어 반도체 장치에 포함된 캐시 장치를 나타내는 블록도이다.1 is a block diagram illustrating a cache device included in a multi-core semiconductor device having a plurality of cores according to an exemplary embodiment of the present invention.

도 1을 참조하면, 캐시 장치(1000)는 복수의 캐시 메모리들(1010, 1020, 1030, 1040) 및 일관성 관리 회로(1000)를 포함한다.Referring to FIG. 1, the cache apparatus 1000 includes a plurality of cache memories 1010, 1020, 1030, and 1040 and a consistency management circuit 1000.

복수의 캐시 메모리들(1010, 1020, 1030, 1040)은 상기 복수의 코어들과 각각 연결된다. 복수의 캐시 메모리들(1010, 1020, 1030, 1040)은 데이터가 저장된 복수의 캐시 라인들을 각각 포함한다. 예를 들어 제1 캐시 메모리(1010)는 복수의 캐시 라인들(1010-1, 1010-2, ..., 1010-n)을 포함하고, 데이터(1017)를 저장한다. 또한 제1 캐시 메모리(1010)는 태그 정보(1015)를 저장하고, 캐시 라인들(1010-1, 1010-2, ..., 1010-n)의 상태 정보(이하, 라인 상태 정보)를 나타내는 1비트의 정보들인 더티(dirty, D) 플래그(1011) 및 유효(valid, V) 플래그(1013)를 저장할 수 있다. 일 실시예에서, 제1 캐시 메모리(1010)는 SRAM과 같은 고속 동작이 가능한 메모리로 구현될 수 있다. 또한 제1 캐시 메모리(1010)는 데이터(1017)를 저장하는 캐시 메모리와 태그 정보(1015) 및 상기 라인 상태 정보를 저장하는 태그 메모리로 분리되어 구현될 수 있다.The plurality of cache memories 1010, 1020, 1030, and 1040 are connected to the plurality of cores, respectively. The plurality of cache memories 1010, 1020, 1030, and 1040 each include a plurality of cache lines in which data is stored. For example, the first cache memory 1010 includes a plurality of cache lines 1010-1, 1010-2,..., 1010-n, and stores data 1017. In addition, the first cache memory 1010 stores the tag information 1015 and indicates state information (hereinafter, referred to as line state information) of the cache lines 1010-1, 1010-2,..., 1010-n. The dirty (D) flag 1011 and the valid (V) flag 1013 which are one bit of information may be stored. In one embodiment, the first cache memory 1010 may be implemented as a memory capable of high speed operation, such as SRAM. In addition, the first cache memory 1010 may be implemented by being divided into a cache memory for storing data 1017 and tag information 1015 and a tag memory for storing the line state information.

일 실시예에서, 상기 라인 상태 정보는 MESI 프로토콜에 기초하여 제공될 수 있다. MESI 프로토콜에서는 캐시 라인들(1010-1, 1010-2, ..., 1010-n)이 수정 상태(Modified, M), 배타 상태(Exclusive, E), 공유 상태(Shared, S) 및 무효 상태(Invalid, I)의 네 가지 상태를 가질 수 있다. 상기의 네 가지 상태는 더티 플래그(1011) 및 유효 플래그(1013)의 값에 따라 표현될 수 있다.In one embodiment, the line state information may be provided based on a MESI protocol. In the MESI protocol, cache lines 1010-1, 1010-2, ..., 1010-n are modified state (Modified, M), exclusive state (Exclusive, E), shared state (Shared, S) and invalid state. It can have four states of (Invalid, I). The four states may be expressed according to the values of the dirty flag 1011 and the valid flag 1013.

또한 도시하지는 않았지만, 제1 캐시 메모리(1010)는 데이터 기입, 독출 동작 및 상기 라인 상태 정보의 변경 동작 등을 제어하고 상기 복수의 코어들 및 일관성 관리 회로(1100)와의 통신을 제어하는 제1 캐시 컨트롤러와 함께 제1 캐시 회로의 형태로 구현될 수 있다. 이 경우, 상기 제1 캐시 회로에 포함되는 상기 제1 캐시 컨트롤러는 멀티 코어용 캐시 컨트롤러일 수도 있고, 싱글 캐시용 캐시 컨트롤러와 다른 논리 소자들을 이용하여 구현될 수도 있다.Although not shown, the first cache memory 1010 controls a data writing, reading operation, changing operation of the line state information, and the like, and a first cache controlling communication with the plurality of cores and the consistency management circuit 1100. The controller may be implemented in the form of a first cache circuit together with the controller. In this case, the first cache controller included in the first cache circuit may be a multi-core cache controller, or may be implemented using a single cache cache controller and other logic elements.

도 1에서는 제1 캐시 메모리(1010)가 복수의 캐시 라인들(1010-1, 1010-2, ..., 1010-n)을 포함하고, 데이터(1017), 태그 정보(1015) 및 상기 라인 상태 정보를 저장하도록 도시되었으나, 제2 내지 제4 캐시 메모리(1020, 1030, 1040)들 역시 제1 캐시 메모리(1010)와 동일한 구성을 가질 수 있다. 또한 도 1에서는 4개의 캐시 메모리들(1010, 1020, 1030, 1040)을 포함하는 캐시 장치(1000)를 도시하였지만, 실시예에 따라서 캐시 장치(1000)는 임의의 개수의 캐시 메모리들을 포함할 수 있다.In FIG. 1, the first cache memory 1010 includes a plurality of cache lines 1010-1, 1010-2,..., 1010-n, the data 1017, tag information 1015, and the line. Although illustrated to store state information, the second to fourth cache memories 1020, 1030, and 1040 may also have the same configuration as the first cache memory 1010. In addition, although FIG. 1 illustrates a cache device 1000 including four cache memories 1010, 1020, 1030, and 1040, the cache device 1000 may include any number of cache memories. have.

일관성 관리 회로(1100)는 중재부(1110), 일관성 관리부(1130), 태그 메모리부(1140) 및 내부 저장공간(1150)을 포함한다.The consistency management circuit 1100 includes an arbitration unit 1110, a consistency management unit 1130, a tag memory unit 1140, and an internal storage space 1150.

중재부(1110)는 상기 복수의 코어들 중 적어도 하나로부터 데이터를 요청받는다. 즉, 중재부(1110)는 상기 복수의 코어들로부터 복수의 캐시 메모리들(1010, 1020, 1030, 1040)을 통해 각각 제공된, 데이터를 요청하는 요청 신호들(REQ1, REQ2, REQ3, REQ4)을 수신하고, 요청 신호들(REQ1, REQ2, REQ3, REQ4) 중 하나를 일관성 관리부(1130)에 제공한다. 또한 중재부(1110)는 상기 제공된 요청 신호에 대응하는 요청된 데이터를 일관성 관리부(1130)로부터 수신하여 상기 제공된 요청 신호를 발생한 코어와 연결된 캐시 메모리에 제공한다. 예를 들어, 중재부(1110)는 제1 코어로부터 발생되어 제1 캐시 메모리를 통해 제공된 제1 요청 신호(REQ1)를 선택하여 일관성 관리부(1130)에 제공하고, 일관성 관리부(1130)로부터 제1 요청 신호(REQ1)에 대응하는 요청된 데이터를 수신하여 제1 캐시 메모리(1010)에 제공할 수 있다. 중재부(1110)는 멀티플렉서, 제어부 및 디멀티플렉서를 포함하여 구현될 수 있다.The arbitration unit 1110 is requested data from at least one of the plurality of cores. That is, the arbitration unit 1110 receives the request signals REQ1, REQ2, REQ3, and REQ4, which request data, respectively provided from the plurality of cores through the plurality of cache memories 1010, 1020, 1030, and 1040. Receives and provides one of the request signals REQ1, REQ2, REQ3, and REQ4 to the consistency management unit 1130. In addition, the arbitration unit 1110 receives the requested data corresponding to the provided request signal from the consistency management unit 1130 and provides the provided request signal to the cache memory connected to the generated core. For example, the arbitration unit 1110 selects and provides the first request signal REQ1 generated from the first core and provided through the first cache memory to the consistency management unit 1130, and from the consistency management unit 1130. The requested data corresponding to the request signal REQ1 may be received and provided to the first cache memory 1010. The arbitration unit 1110 may be implemented to include a multiplexer, a controller, and a demultiplexer.

일 실시예에서, 요청 신호들(REQ1, REQ2, REQ3, REQ4)은 복수의 어드레스, Din(data in), Dout(data out), CS(chip select), RW(read/write) 및 BE(bit enable) 신호 등의 조합으로 이루어질 수 있다. 또한 상기 설명한 바와 같이 캐시 메모리들(1010, 1020, 1030, 1040)이 캐시 컨트롤러들을 각각 포함하는 캐시 회로의 형태로 구현된 경우, 요청 신호들(REQ1, REQ2, REQ3, REQ4)은 상기 캐시 컨트롤러를 통해 제공될 수 있다.In one embodiment, the request signals REQ1, REQ2, REQ3, REQ4 may comprise a plurality of addresses, Din (data in), Dout (data out), CS (chip select), RW (read / write) and BE (bit). enable) signal or the like. In addition, as described above, when the cache memories 1010, 1020, 1030, and 1040 are implemented in the form of a cache circuit including the cache controllers, respectively, the request signals REQ1, REQ2, REQ3, and REQ4 may be used as the cache controller. Can be provided through.

일 실시예에서, 중재부(1110)는 복수의 캐시 메모리들(1010, 1020, 1030, 1040)로부터 수신된 데이터(DAT1, DAT2, DAT3, DAT4)들 중 하나를 일관성 관리부(1130)에 제공할 수 있다. 일관성 관리부(1130)는 상기 수신된 데이터(DAT1, DAT2, DAT3, DAT4)들 중 하나를 다른 캐시 메모리들 또는 상기 멀티 코어 반도체 장치에 포함된 메인 메모리에 제공하도록 하여 상기 멀티 코어 반도체 장치에 포함된 복수의 캐시 메모리들(1010, 1020, 1030, 1040)의 데이터의 일관성을 유지하도록 할 수 있다.In one embodiment, the arbitration unit 1110 may provide one of the data DAT1, DAT2, DAT3, and DAT4 received from the plurality of cache memories 1010, 1020, 1030, and 1040 to the consistency management unit 1130. Can be. The consistency management unit 1130 may provide one of the received data DAT1, DAT2, DAT3, and DAT4 to other cache memories or a main memory included in the multicore semiconductor device to be included in the multicore semiconductor device. It is possible to maintain consistency of data of the plurality of cache memories 1010, 1020, 1030, and 1040.

일관성 관리부(1130)는 복수의 캐시 메모리들(1010, 1020, 1030, 1040)에 저장된 데이터의 일관성을 유지한다. 일관성 관리부(1130)는 상기 일관성 유지를 위해 스누핑(snooping) 프로토콜을 이용할 수 있다. 멀티 코어 시스템에서는 일관성 관리에 대한 책임을 멀티 코어와 연결된 모든 캐시들에게 분산하며, 일관성 관리부(1130)는 복수의 캐시 메모리들(1010, 1020, 1030, 1040)이 상기 메인 메모리와 액세스하도록 스누핑한다.The consistency manager 1130 maintains the consistency of data stored in the plurality of cache memories 1010, 1020, 1030, and 1040. The consistency manager 1130 may use a snooping protocol to maintain the consistency. In a multi-core system, responsibility for consistency management is distributed to all caches connected to the multi-core, and the consistency manager 1130 snoops a plurality of cache memories 1010, 1020, 1030, and 1040 to access the main memory. .

일관성 관리부(1130)는 상기 제공된 요청 신호들(REQ1, REQ2, REQ3, REQ4) 중 하나에 기초하여 복수의 캐시 메모리들(1010, 1020, 1030, 1040), 내부 저장공간(1150) 및 상기 메인 메모리 등을 검색하고, 상기 요청된 데이터를 제공한다. 상기 요청된 데이터를 제공하는 프로세스는 도 2 및 도 3을 참조하여 후술하도록 한다.The consistency management unit 1130 may include a plurality of cache memories 1010, 1020, 1030, and 1040, an internal storage space 1150, and the main memory based on one of the provided request signals REQ1, REQ2, REQ3, and REQ4. Search for and the like, and provide the requested data. The process of providing the requested data will be described later with reference to FIGS. 2 and 3.

또한 일관성 관리부(1130)는 복수의 캐시 메모리들(1010, 1020, 1030, 1040)의 상기 복수의 캐시 라인들 중 상기 라인 상태 정보의 변경이 필요한 경우, 복수의 캐시 메모리들(1010, 1020, 1030, 1040) 중 적어도 하나에 대응하는 변경 신호들(CS1, CS2, CS3, CS4)을 제공한다. 예를 들어 무효 상태(I)인 캐시 라인의 데이터를 독출하는 경우, 상기 무효 상태(I)는 배타 상태(E) 또는 공유 상태(S)로 변경될 수 있다. 예를 들어, 제1 캐시 메모리(1010)의 캐시 라인들(1010-1, 1010-2, ..., 1010-n) 중 상기 라인 상태 정보의 변경이 필요한 경우, 일관성 관리부(1130)는 제1 캐시 메모리(1010)에 제1 변경 신호(CS1)를 제공할 수 있다. 일 실시예에서, 변경 신호(CS1, CS2, CS3, CS4)는 복수의 커맨드 신호 및 어드레스 등의 조합으로 이루어질 수 있으며, 라인 무효화(invalidate line), 독출 및 라인 클린화(read & clean line) 및 독출 및 라인 무효화(read & invalidate line) 등의 명령을 전송할 수 있다.In addition, the consistency management unit 1130 may change the line state information among the plurality of cache lines of the plurality of cache memories 1010, 1020, 1030, and 1040. , Change signals CS1, CS2, CS3, and CS4 corresponding to at least one of the reference numerals 1040. For example, when reading data of a cache line that is in an invalid state (I), the invalid state (I) may be changed into an exclusive state (E) or a shared state (S). For example, if the line state information of the cache lines 1010-1, 1010-2,..., 1010-n of the first cache memory 1010 is required to be changed, the consistency manager 1130 may be configured. The first change signal CS1 may be provided to the first cache memory 1010. In one embodiment, the change signal CS1, CS2, CS3, CS4 may be a combination of a plurality of command signals and addresses, and the like, and include invalidate lines, read and clean lines, and Commands such as read and invalidate lines can be sent.

태그 메모리부(1140)는 복수의 태그 메모리들(1141, 1143, 1145, 1147)을 포함한다. 복수의 태그 메모리들(1141, 1143, 1145, 1147)은 복수의 캐시 메모리들(1010, 1020, 1030, 1040)에 각각 대응되며, 대응하는 복수의 캐시 메모리들(1010, 1020, 1030, 1040)에 저장된 상기 태그 정보 및 상기 라인 상태 정보의 복사본을 저장할 수 있다. 예를 들어, 제1 태그 메모리(1141)는 제1 캐시 메모리(1010)에 대응되며, 제1 캐시 메모리(1010)에 저장된 태그 정보(1015) 및 상기 라인 상태 정보의 복사본을 저장한다. 이 경우, 상기 라인 상태 정보의 복사본을 저장하는데 있어서, 더티 플래그(D) 및 유효 플래그(V) 외에 공유(shared, S) 플래그를 더 이용할 수 있다.The tag memory unit 1140 includes a plurality of tag memories 1141, 1143, 1145, and 1147. The plurality of tag memories 1141, 1143, 1145, and 1147 correspond to the plurality of cache memories 1010, 1020, 1030, and 1040, respectively, and the corresponding plurality of cache memories 1010, 1020, 1030, and 1040. The copy of the tag information and the line state information stored in the can be stored. For example, the first tag memory 1141 corresponds to the first cache memory 1010 and stores a copy of the tag information 1015 and the line state information stored in the first cache memory 1010. In this case, in storing a copy of the line state information, a shared (S) flag may be further used in addition to the dirty flag (D) and the valid flag (V).

내부 저장공간(1150)은 복수의 캐시 메모리들(1010, 1020, 1030, 1040)에 저장된 상기 데이터 중 일부를 저장한다. 내부 저장공간(1150)은 데이터가 저장되는 복수의 라인들(1150-1, 1150-2, ..., 1150-n)을 포함할 수 있다. 복수의 캐시 메모리들(1010, 1020, 1030, 1040)에 포함된 상기 캐시 라인들(1010-1, 1010-2, ..., 1010-n)과 내부 저장공간(1150)에 포함된 복수의 라인들(1150-1, 1150-2, ..., 1150-n)은 동일한 크기를 가질 수 있다. 일 실시예에서, 내부 저장공간(1150)은 SRAM과 같은 고속 동작이 가능한 메모리로 구현될 수도 있고, 플립플롭으로 구현된 레지스터일 수도 있다.The internal storage space 1150 stores some of the data stored in the plurality of cache memories 1010, 1020, 1030, and 1040. The internal storage space 1150 may include a plurality of lines 1150-1, 1150-2,..., 1150-n in which data is stored. A plurality of cache lines 1010-1, 1010-2,..., 1010-n included in a plurality of cache memories 1010, 1020, 1030, and 1040 and a plurality of cache lines included in an internal storage space 1150. The lines 1150-1, 1150-2,..., 1150-n may have the same size. In one embodiment, the internal storage space 1150 may be implemented as a memory capable of high-speed operation, such as SRAM, or may be a register implemented as a flip-flop.

일 실시예에서 상기 라인 상태 정보가 MESI 프로토콜을 따르는 경우, 내부 저장공간(1150)에 저장된 상기 데이터는 수정(M) 상태의 캐시 라인에 저장된 데이터일 수 있다. 상기 수정(M) 상태의 캐시 라인에 저장된 데이터에 대해서는 캐시간 전송(cache-to-cache transfer)이 자주 발생하기 때문에, 그 일부를 내부 저장공간(1150)에 별도로 저장하고 필요한 경우 내부 저장공간(1150)에서 바로 독출함으로써 일관성 관리 회로(1100)의 성능을 향상시킬 수 있다.In one embodiment, when the line state information conforms to the MESI protocol, the data stored in the internal storage 1150 may be data stored in a cache line in a modified (M) state. Since cache-to-cache transfer occurs frequently for data stored in the cache line in the modified (M) state, a part of the data is stored separately in the internal storage 1150 and, if necessary, the internal storage space ( The performance of the consistency management circuit 1100 may be improved by directly reading the data at 1150.

도 2는 본 발명의 일 실시예에 따른 복수의 코어들을 가지는 멀티 코어 반도체 장치에 포함된 복수의 캐시 메모리의 일관성 관리 방법을 나타내는 순서도이다.2 is a flowchart illustrating a method of managing a consistency of a plurality of cache memories included in a multi-core semiconductor device having a plurality of cores according to an exemplary embodiment of the present invention.

이하, 도 1 내지 도 2를 참조하여 본 발명의 일 실시예에 따른 일관성 관리 방법을 설명한다.Hereinafter, a consistency management method according to an embodiment of the present invention will be described with reference to FIGS. 1 to 2.

단계 (S1100)에서, 일관성 관리 회로(1100) 내에 내부 저장공간(1150)을 제공한다. 내부 저장공간(1150)은 복수의 캐시 메모리들(1010, 1020, 1030, 1040)의 상기 캐시 라인들에 저장된 데이터 중 일부가 저장되며, 상기 수정(M) 상태의 캐시 라인에 저장된 데이터가 저장될 수 있다.In operation S1100, an internal storage space 1150 is provided in the consistency management circuit 1100. The internal storage space 1150 stores some of the data stored in the cache lines of the plurality of cache memories 1010, 1020, 1030, and 1040, and stores the data stored in the cache line in the modified (M) state. Can be.

단계 (S1200)에서, 중재부(1110)는 상기 복수의 코어들 중 하나로부터 데이터 요청을 수신한다. 즉, 중재부(1110)는 상기 복수의 코어들로부터 복수의 캐시 메모리들(1010, 1020, 1030, 1040)을 통해 각각 제공된 데이터 독출을 위한 요청 신호들(REQ1, REQ2, REQ3, REQ4)을 수신하고, 요청 신호들(REQ1, REQ2, REQ3, REQ4) 중 하나를 일관성 관리부(1130)에 제공한다. 일 실시예에서, 요청 신호들(REQ1, REQ2, REQ3, REQ4)은 상기 캐시 컨트롤러를 통해 제공될 수 있다.In operation S1200, the arbitration unit 1110 receives a data request from one of the plurality of cores. That is, the arbitration unit 1110 receives request signals REQ1, REQ2, REQ3, and REQ4 for reading data provided from the plurality of cores through the plurality of cache memories 1010, 1020, 1030, and 1040, respectively. In addition, one of the request signals REQ1, REQ2, REQ3, and REQ4 is provided to the consistency management unit 1130. In one embodiment, request signals REQ1, REQ2, REQ3, REQ4 may be provided through the cache controller.

단계 (S1300)에서, 일관성 관리부(1130)는 복수의 캐시 메모리들(1010, 1020, 1030, 1040)의 상기 캐시 라인들 중 상기 제공된 요청 신호에 대응하는 요청된 데이터가 저장되어 있는 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 내부 저장공간(1150)에 저장되어 있는지 여부에 기초하여, 상기 복수의 코어들 중 상기 제공된 요청 신호를 발생한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공한다. 상기 요청된 데이터는 중재부(1110)를 통해 상기 제2 캐시 라인에 제공된다. In operation S1300, the consistency manager 1130 may store a first cache line in which requested data corresponding to the provided request signal is stored among the cache lines of the plurality of cache memories 1010, 1020, 1030, and 1040. Is present in the second cache line in the cache memory connected with the core that generated the provided request signal among the plurality of cores based on whether there is an existence and whether the requested data is stored in the internal storage space 1150. The generated data. The requested data is provided to the second cache line through the arbitration unit 1110.

예를 들어, 제1 캐시 메모리(1010)와 연결된 제1 코어가 데이터의 독출을 요청한 경우, 상기 데이터가 복수의 캐시 메모리들(1010, 1020, 1030, 1040) 중 하나에 저장되어 있고 내부 저장공간(1150)에도 저장되어 있다면, 일관성 관리부(1130)는 별도의 대기 또는 지연 없이 내부 저장공간(1150)에서 상기 요청된 데이터를 독출하여 중재부(1110)에 제공하고, 상기 독출 요청에 따라 제1 캐시 메모리(1010)의 캐시 라인들(1010-1, 1010-2, ..., 1010-n) 중 하나에 상기 요청된 데이터를 바로 제공할 수 있다.For example, when a first core connected to the first cache memory 1010 requests reading of data, the data is stored in one of the plurality of cache memories 1010, 1020, 1030, and 1040 and has an internal storage space. If it is also stored at 1150, the consistency management unit 1130 reads the requested data from the internal storage space 1150 to the arbitration unit 1110 without waiting or delay, and according to the read request The requested data may be directly provided to one of the cache lines 1010-1, 1010-2,..., 1010-n of the cache memory 1010.

도 3은 도 2의 제2 캐시 라인에 요청된 데이터를 제공하는 단계의 일 예를 나타내는 순서도이다.FIG. 3 is a flowchart illustrating an example of providing data requested to a second cache line of FIG. 2.

이하, 도 1 내지 도 3을 참조하여 본 발명의 일 실시예에 따른 일관성 관리 방법에서 상기 제2 캐시 라인에 상기 요청된 데이터를 제공하는 방법을 보다 상세히 설명한다.Hereinafter, a method of providing the requested data to the second cache line in a consistency management method according to an embodiment of the present invention will be described in more detail with reference to FIGS. 1 to 3.

단계 (S1305)에서, 일관성 관리부(1130)는 상기 제1 캐시 라인이 존재하는지 판단한다. 태그 메모리부(1140)에는 복수의 캐시 메모리들(1010, 1020, 1030, 1040)에 저장된 상기 데이터의 태그 정보에 대한 복사본이 저장되어 있으므로, 상기 태그 정보의 복사본을 이용하여 상기 제1 캐시 라인의 존재 여부를 빠르게 판단한다. 즉, 상기 요청된 데이터에 대응하는 태그 정보와 상기 태그 메모리부(1140)에 저장된 상기 태그 정보의 복사본들을 비교하여, 일치하는 태그 정보가 있는 경우 상기 제1 캐시 라인이 존재하는 것으로 판단하고 일치하는 태그 정보가 없는 경우 상기 제1 캐시 라인이 존재하지 않는 것으로 판단할 수 있다. 또한 상기 태그 정보를 비교함과 동시에 유효 플래그(V)를 통해 데이터의 유효성을 함께 판단할 수 있다. 상기 제1 캐시 라인이 존재하는 경우 단계 (S1320)을 수행하고, 상기 캐시 라인이 존재하지 않는 경우 단계 (S1310)을 수행한다.In operation S1305, the consistency manager 1130 determines whether the first cache line exists. Since the tag memory unit 1140 stores a copy of the tag information of the data stored in the plurality of cache memories 1010, 1020, 1030, and 1040, the tag memory unit 1140 uses the copy of the tag information to store the first cache line. Quickly determine presence. That is, the tag information corresponding to the requested data is compared with the copies of the tag information stored in the tag memory unit 1140, and when there is a matching tag information, it is determined that the first cache line exists and matches. If there is no tag information, it may be determined that the first cache line does not exist. In addition, it is possible to compare the tag information and determine the validity of the data together through the valid flag (V). If the first cache line exists, step S1320 is performed. If the cache line does not exist, step S1310 is performed.

상기 제1 캐시 라인이 존재하지 않는 경우, 단계 (S1310)에서, 일관성 관리부(1130)는 외부 메모리를 검색하여 상기 요청된 데이터를 독출하여 중재부(1110)에 제공하고, 상기 제2 캐시 라인에 상기 요청된 데이터를 저장한다. 일 실시예에서, 복수의 캐시 메모리들(1010, 1020, 1030, 1040)이 1차 캐시(L1 캐시) 메모리인 경우, 상기 외부 메모리는 2차 캐시(L2 캐시) 메모리 또는 메인 메모리일 수 있다. 또한 단계 (S1315)에서, 일관성 관리부(1130)는 변경 신호들(CS1, CS2, CS3, CS4)을 제공하여 상기 제2 캐시 라인의 상태 정보를 배타(E) 상태로 변경한다. 즉, 상기 제2 캐시 라인에 저장된 상기 요청된 데이터는 주기억장치의 데이터와 동일하며 다른 캐시 메모리에는 존재하지 않음을 나타낸다.If the first cache line does not exist, in step S1310, the consistency manager 1130 searches an external memory, reads out the requested data, provides the requested data to the arbitration unit 1110, and provides the second cache line with the second cache line. Store the requested data. In one embodiment, when the plurality of cache memories 1010, 1020, 1030, and 1040 are primary cache (L1 cache) memories, the external memory may be secondary cache (L2 cache) memory or main memory. In operation S1315, the consistency management unit 1130 may provide change signals CS1, CS2, CS3, and CS4 to change the state information of the second cache line to an exclusive (E) state. That is, the requested data stored in the second cache line is identical to the data of the main memory and does not exist in the other cache memory.

상기 제1 캐시 라인이 존재하는 경우, 단계 (S1320)에서, 일관성 관리부(1130)는 상기 제1 캐시 라인이 상기 수정(M) 상태인지 판단한다. 상기 설명된 것처럼, 상기 수정(M) 상태의 캐시 라인에 저장된 데이터에 대해 캐시간 전송이 자주 발생할 수 있고, 따라서 내부 저장공간(1150)에는 상기 수정(M) 상태의 캐시 라인에 저장된 데이터가 저장될 수 있으므로, 상기 제1 캐시 라인에 저장된 상기 요청된 데이터가 내부 저장공간(1150)에 존재하는지 판단하기에 앞서 상기 제1 캐시 라인의 상태를 먼저 판단하여 전제적인 작업 수행 속도를 향상시킬 수 있다. 상기 제1 캐시 라인이 상기 수정 상태인 경우 단계 (S1325)를 수행하고, 상기 제1 캐시 라인이 상기 수정 상태인 경우 단계 (S1330)를 수행한다.If the first cache line exists, in step S1320, the consistency manager 1130 determines whether the first cache line is in the modified (M) state. As described above, a cache transfer may frequently occur with respect to data stored in the cache line in the modified (M) state, and therefore data stored in the cache line in the modified (M) state may be stored in the internal storage space 1150. Therefore, prior to determining whether the requested data stored in the first cache line exists in the internal storage space 1150, the state of the first cache line may be first determined to improve a predicate work execution speed. . When the first cache line is in the modified state, step S1325 is performed. When the first cache line is in the modified state, step S1330 is performed.

상기 제1 캐시 라인이 존재하고 상기 수정 상태인 경우, 단계 (S1325)에서, 일관성 관리부(1130)는 상기 요청된 데이터가 내부 저장공간(1150)에 존재하는지 판단한다. 상기 요청된 데이터가 내부 저장공간(1150)에 존재하는 경우 단계 (S1345)를 수행하고, 상기 요청된 데이터가 내부 저장공간(1150)에 존재하지 않는 경우 단계 (S1330)을 수행한다. 일 실시예에서, 일관성 관리부(1130)는 상기 요청된 데이터가 내부 저장공간(1150)에 존재하지 않는 경우, 단계 (S1330)을 수행하기에 앞서 WB(write back) 플래그의 값을 인에이블할 수 있다. 상기 WB 플래그의 값을 인에이블함으로써 이후에 상기 요청된 데이터를 상기 외부 메모리 즉, 상기 메인 메모리에 기입(write back)할 수 있다.If the first cache line exists and is in the modified state, in step S1325, the consistency manager 1130 determines whether the requested data exists in the internal storage space 1150. If the requested data exists in the internal storage space 1150, step S1345 is performed. If the requested data does not exist in the internal storage space 1150, step S1330 is performed. In one embodiment, if the requested data does not exist in the internal storage 1150, the consistency management unit 1130 may enable the value of the write back (WB) flag before performing step S1330. have. By enabling the value of the WB flag, the requested data may be later written to the external memory, that is, the main memory.

상기 제1 캐시 라인이 상기 수정 상태이며 상기 요청된 데이터가 내부 저장공간(1150)에 존재하는 경우, 단계 (S1345)에서, 일관성 관리부(1130)는 내부 저장공간(1150)에서 상기 요청된 데이터를 독출하여 중재부(1110)에 제공하고, 상기 제2 캐시 라인에 상기 요청된 데이터를 저장한다. 또한 단계 (S1350)에서, 일관성 관리부(1130)는 상기 제1 및 제2 캐시 라인의 상태 정보를 공유(S) 상태로 변경한다. 즉, 상기 제1 및 제2 캐시 라인에 저장된 상기 요청된 데이터는 주기억장치의 데이터와 동일하며 다른 캐시 메모리에 존재할 수 있음을 나타낸다.If the first cache line is in the modified state and the requested data exists in the internal storage space 1150, in step S1345, the consistency management unit 1130 stores the requested data in the internal storage space 1150. The data is read and provided to the arbitration unit 1110, and the requested data is stored in the second cache line. In operation S1350, the consistency manager 1130 changes the state information of the first and second cache lines to a shared S state. That is, the requested data stored in the first and second cache lines are identical to the data of the main memory and may exist in different cache memories.

상기 제1 캐시 라인이 존재하지만, 상기 제1 캐시 라인이 상기 수정 상태가 아니거나 상기 요청된 데이터가 내부 저장공간(1150)에 존재하지 않는 경우, 단계 (S1330)에서, 상기 요청된 데이터는 상기 제1 캐시 라인에서 독출되어 상기 제2 캐시 라인에 저장된다. 즉, 캐시간 전송을 통해 상기 요청된 데이터를 상기 제2 캐시 라인에 저장한다. 또한 단계 (S1335)에서, 일관성 관리부(1130)는 상기 제1 및 제2 캐시 라인의 상태 정보를 공유(S) 상태로 변경하여, 상기 제1 및 제2 캐시 라인에 저장된 상기 요청된 데이터는 주기억장치의 데이터와 동일하며 다른 캐시 메모리에 존재할 수 있음을 나타낸다. 일 실시예에서, 단계 (S1335)를 수행하면서, 일관성 관리부(1130)는 상기 WB 플래그의 값이 인에이블되었는지 여부를 판단하여 상기 WB 플래그의 값이 인에이블된 경우 상기 요청된 데이터를 상기 메인 메모리에 기입(write back)할 수 있다.If the first cache line exists, but the first cache line is not in the modified state or the requested data does not exist in the internal storage space 1150, in step S1330, the requested data is stored in the Read from the first cache line and store in the second cache line. That is, the requested data is stored in the second cache line through a cache transmission. In operation S1335, the consistency management unit 1130 changes the state information of the first and second cache lines to a shared state, so that the requested data stored in the first and second cache lines is stored in a main memory. It is the same as the device's data and indicates that it may exist in different cache memories. In one embodiment, while performing step S1335, the consistency manager 1130 determines whether the value of the WB flag is enabled, and if the value of the WB flag is enabled, transmits the requested data to the main memory. Write back to

또한 단계 (S1340)에서, 일관성 관리부(1130)는 상기 요청된 데이터를 내부 저장공간(1150)에 저장하여, 이후에 상기 복수의 코어들 중 하나로부터 발생될 데이터 요청에 대해 빠르게 응답할 수 있다.In operation S1340, the consistency manager 1130 may store the requested data in the internal storage space 1150 to quickly respond to a data request to be generated from one of the plurality of cores.

캐시간 전송의 경우 수 사이클 내지 수십 사이클의 지연이 발생하여 일관성 관리 회로(1100)의 성능을 저하시킨다. 따라서 본 발명의 일 실시예와 같이 캐시간 전송이 자주 발생하는 상기 수정(M) 상태의 캐시 라인에 저장된 데이터의 일부를 내부 저장공간(1150)에 저장하면, 데이터 요청이 발생하는 경우 내부 저장공간(1150)에서 상기 데이터를 요청한 코어와 연결된 캐시 메모리에 상기 요청된 데이터를 바로 제공할 수 있다. 내부 저장공간(1150)은 1 사이클 내에 액세스 가능하기 때문에, 본 발명의 일 실시예에 따른 일관성 관리 방법은 1 사이클의 지연이 발생하며, 따라서 일관성 관리 회로(1100)의 성능이 향상될 수 있다. 또한 상기 요청된 데이터를 제공함과 동시에 내부 저장공간(1150)에 저장하여 추가적인 데이터 요청에 대한 응답속도를 향상시킬 수 있다.In the case of the cache transmission, a delay of several cycles to several tens of cycles occurs, which degrades the performance of the consistency management circuit 1100. Therefore, when a part of data stored in the cache line of the modified (M) state in which the cache transmission occurs frequently as in one embodiment of the present invention is stored in the internal storage space 1150, the internal storage space when a data request occurs In operation 1150, the requested data may be directly provided to the cache memory connected to the core that requested the data. Since the internal storage space 1150 is accessible within one cycle, the consistency management method according to an embodiment of the present invention may incur a delay of one cycle, and thus the performance of the consistency management circuit 1100 may be improved. In addition, the requested data may be provided and stored in the internal storage space 1150 to improve the response speed for additional data requests.

도 4는 본 발명의 일 실시예에 따른 멀티 코어 반도체 장치를 나타내는 블록도이다.4 is a block diagram illustrating a multi-core semiconductor device according to an embodiment of the present invention.

도 4를 참조하면, 멀티 코어 반도체 장치(2000)는 프로세서(2100), 캐시 장치(2300) 및 메인 메모리(2500)를 포함한다.Referring to FIG. 4, the multi-core semiconductor device 2000 includes a processor 2100, a cache device 2300, and a main memory 2500.

메인 메모리(2500)는 프로세서(2100)가 데이터를 요청하면 상기 요청된 데이터를 전송하거나 메인 메모리(2500)에 저장된 데이터 중 일부를 캐시 장치(2300)내의 복수의 캐시 메모리들(2310, 2320, 2330, 2340)에 저장한다. 일 실시예에서, 메인 메모리(2500)와 캐시 장치(2300) 사이에 2차 캐시 메모리가 더 포함될 수 있다.When the processor 2100 requests data, the main memory 2500 transmits the requested data or transfers some of the data stored in the main memory 2500 to the plurality of cache memories 2310, 2320, and 2330 in the cache device 2300. 2340). In one embodiment, a secondary cache memory may be further included between the main memory 2500 and the cache device 2300.

프로세서(2100)는 복수의 코어들(2110, 2120, 2130, 2140)을 포함한다. 프로세서(2100)는 상기 요청된 데이터가 캐시 장치(2300)에 있으면 캐시 장치(2300)로부터 데이터를 입력 받고, 상기 요청된 데이터가 캐시 장치(2300)에 없으면 메인 메모리(2500)에 데이터를 요청하여 메인 메모리(2500)로부터 캐시 장치(2300)를 통해 상기 요청된 데이터를 입력 받는다.The processor 2100 includes a plurality of cores 2110, 2120, 2130, and 2140. The processor 2100 receives data from the cache device 2300 when the requested data is in the cache device 2300, and requests data from the main memory 2500 when the requested data is not in the cache device 2300. The requested data is input from the main memory 2500 through the cache device 2300.

캐시 장치(2300)는 도 1의 캐시 장치(1000)일 수 있다. 캐시 장치(2300)는 복수의 캐시 메모리들(2310, 2320, 2330, 2340) 및 일관성 관리 회로(2400)를 포함한다.The cache device 2300 may be the cache device 1000 of FIG. 1. The cache device 2300 includes a plurality of cache memories 2310, 2320, 2330, and 2340 and a consistency management circuit 2400.

복수의 캐시 메모리들(2310, 2320, 2330, 2340)은 복수의 코어들(2110, 2120, 2130, 2140)과 각각 연결되고 데이터가 저장된 복수의 캐시 라인들을 각각 포함한다. 예를 들어, 제1 캐시 메모리(2310)는 제1 코어(2110)와 연결되어 통신을 수행한다. 또한 복수의 캐시 메모리들(2310, 2320, 2330, 2340)은 메인 메모리(2500)의 데이터 중에서 일부 데이터를 저장한다. 일 실시예에서, 복수의 캐시 메모리들(2310, 2320, 2330, 2340)은 캐시 컨트롤러를 각각 포함하는 캐시 장치들의 형태로 구현될 수 있다.The plurality of cache memories 2310, 2320, 2330, and 2340 respectively include a plurality of cache lines connected to the plurality of cores 2110, 2120, 2130, and 2140, respectively, and store data. For example, the first cache memory 2310 is connected to the first core 2110 to perform communication. In addition, the plurality of cache memories 2310, 2320, 2330, and 2340 store some data among data of the main memory 2500. In one embodiment, the plurality of cache memories 2310, 2320, 2330, and 2340 may be implemented in the form of cache devices each including a cache controller.

일관성 관리 회로(2400)는 복수의 캐시 메모리들(2310, 2320, 2330, 2340)에 저장된 상기 데이터의 일관성을 유지한다. 일관성 관리 회로(2400)는 내부 저장공간, 중재부 및 일관성 관리부를 포함할 수 있다. 상기 내부 저장공간에 상기 복수의 캐시 라인들에 저장된 상기 데이터 중 일부를 저장하여, 데이터 요청이 발생하는 경우 상기 내부 저장공간에서 상기 데이터를 요청한 코어와 연결된 캐시 메모리에 상기 요청된 데이터를 바로 제공함으로써 일관성 관리 회로(2400)의 성능이 향상될 수 있다. 일 실시예에서, 상기 캐시 라인들의 상태 정보는 MESI 프로토콜에 기초하여 제공되며, 상기 내부 저장공간에 저장되는 데이터는 수정 상태의 캐시 라인에 저장된 데이터일 수 있다.The consistency management circuit 2400 maintains the consistency of the data stored in the plurality of cache memories 2310, 2320, 2330, and 2340. The consistency management circuit 2400 may include an internal storage space, an arbitration unit, and a consistency management unit. By storing a part of the data stored in the plurality of cache lines in the internal storage space, if the data request occurs by providing the requested data directly to the cache memory connected to the core requesting the data in the internal storage space The performance of the consistency management circuit 2400 may be improved. In one embodiment, the state information of the cache lines is provided based on a MESI protocol, and the data stored in the internal storage may be data stored in the cache line of the modified state.

일관성 관리 회로(2400)의 구성 및 동작에 대해서는 도 1을 참조하여 상세히 설명하였으므로 중복된 설명은 생략한다.Since the configuration and operation of the consistency management circuit 2400 have been described in detail with reference to FIG. 1, redundant descriptions thereof will be omitted.

도 4에서는 4개의 코어들(2110, 2120, 2130, 2140)을 포함하는 멀티 코어 반도체 장치(2000)를 도시하였지만, 실시예에 따라서 멀티 코어 반도체 장치(2000)는 임의의 개수의 코어들을 포함할 수 있다.Although FIG. 4 illustrates a multi-core semiconductor device 2000 including four cores 2110, 2120, 2130, and 2140, the multi-core semiconductor device 2000 may include any number of cores according to an embodiment. Can be.

본 발명에 따르면, 내부 저장공간에 데이터를 저장하여 요청된 데이터와 상기 내부 저장공간에 저장된 데이터가 일치하는 경우 캐시간 전송 없이 상기 요청된 데이터를 직접 제공함으로써, 응답 속도가 향상되고 성능이 향상된 일관성 관리 방법 및 일관성 관리 회로를 제공할 수 있고, 멀티 코어용 캐시 장치 및 반도체 장치의 성능 향상을 가져오며, 멀티 코어로 구현된 CPU, 프로세서 및 이를 포함하는 컴퓨터 등에 활용될 수 있다.According to the present invention, when data is stored in the internal storage space and the requested data and the data stored in the internal storage space are matched, the requested data is directly provided without cache transmission, thereby improving response speed and improving performance. A management method and a consistency management circuit can be provided, and the performance of the cache device and the semiconductor device for the multi-core can be improved, and the CPU, the processor and the computer including the multi-core can be utilized.

상술한 바와 같이, 본 발명의 바람직한 실시예를 참조하여 설명하였지만 해당 기술 분야에서 통상의 지식을 가진 자라면 하기의 특허청구범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.As described above, the present invention has been described with reference to a preferred embodiment of the present invention, but those skilled in the art may vary the present invention without departing from the spirit and scope of the present invention as set forth in the claims below. It will be understood that modifications and changes can be made.

Claims (15)

멀티 코어 반도체 장치에 구비되는 복수의 코어들과 각각 연결되고 데이터가 저장된 복수의 캐시 라인들을 각각 포함하는 복수의 캐시 메모리의 일관성 관리 방법으로서,
상기 복수의 캐시 라인들에 저장된 상기 데이터 중 일부가 저장된 내부 저장공간을 제공하는 단계;
상기 복수의 코어들 중 하나로부터 요청 신호를 수신하는 단계; 및
상기 복수의 캐시 메모리의 상기 캐시 라인들 중 상기 요청 신호에 대응하는 요청된 데이터가 저장되어 있는 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 상기 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 요청 신호를 제공한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공하는 단계를 포함하는 일관성 관리 방법.
A method of managing a consistency of a plurality of cache memories each comprising a plurality of cache lines connected to a plurality of cores included in a multi-core semiconductor device and storing data, respectively.
Providing an internal storage space in which some of the data stored in the plurality of cache lines are stored;
Receiving a request signal from one of the plurality of cores; And
Based on whether there is a first cache line in which the requested data corresponding to the request signal exists among the cache lines of the plurality of cache memories and whether the requested data is stored in the internal storage space. And providing the requested data to a second cache line in a cache memory associated with the core that provided the request signal.
제1항에 있어서, 상기 캐시 라인들의 상태 정보는 MESI 프로토콜에 기초하여 제공되며, 상기 내부 저장공간에 저장되는 데이터는 수정(Modified) 상태의 캐시 라인에 저장된 데이터인 것을 특징으로 하는 일관성 관리 방법.The method of claim 1, wherein the state information of the cache lines is provided based on a MESI protocol, and the data stored in the internal storage is data stored in a cache line in a modified state. 제2항에 있어서, 상기 제2 캐시 라인에 상기 요청된 데이터를 제공하는 단계는,
상기 제1 캐시 라인이 존재하는지 판단하는 단계;
상기 제1 캐시 라인의 상태가 상기 수정 상태인지 판단하는 단계; 및
상기 요청된 데이터가 상기 내부 저장공간에 존재하는지 판단하는 단계를 포함하는 것을 특징으로 하는 일관성 관리 방법.
The method of claim 2, wherein providing the requested data to the second cache line comprises:
Determining whether the first cache line exists;
Determining whether a state of the first cache line is the modified state; And
And determining whether the requested data exists in the internal storage space.
제3항에 있어서, 상기 제2 캐시 라인에 상기 요청된 데이터를 제공하는 단계는,
상기 제1 캐시 라인이 존재하고, 상기 제1 캐시 라인의 상태가 상기 수정 상태이며, 상기 요청된 데이터가 상기 내부 저장공간에 존재하는 경우, 상기 내부 저장공간에서 상기 요청된 데이터를 독출하여 상기 제2 캐시 라인에 저장하는 단계; 및
상기 제1 및 제2 캐시 라인들의 상태 정보를 공유(Shared) 상태로 변경하는 단계를 포함하는 것을 특징으로 하는 일관성 관리 방법.
The method of claim 3, wherein providing the requested data to the second cache line comprises:
If the first cache line exists, the state of the first cache line is the modified state, and the requested data exists in the internal storage space, the requested data is read from the internal storage space and the first cache line is read. Storing in two cache lines; And
And changing the state information of the first and second cache lines to a shared state.
제3항에 있어서, 상기 제2 캐시 라인에 상기 요청된 데이터를 제공하는 단계는,
상기 제1 캐시 라인이 존재하고 상기 제1 캐시 라인의 상태가 상기 수정 상태가 아니거나 또는 상기 요청된 데이터가 상기 내부 저장공간에 존재하지 않는 경우, 캐시간 전송(cache-to-cache transfer)을 통해 상기 제2 캐시 라인에 상기 요청된 데이터를 저장하는 단계; 및
상기 제1 및 제2 캐시 라인들의 상태 정보를 공유 상태로 변경하는 단계를 포함하는 것을 특징으로 하는 일관성 관리 방법.
The method of claim 3, wherein providing the requested data to the second cache line comprises:
If the first cache line exists and the state of the first cache line is not the modified state or the requested data does not exist in the internal storage, cache-to-cache transfer is performed. Storing the requested data in the second cache line via; And
Changing the state information of the first and second cache lines to a shared state.
제5항에 있어서, 상기 요청된 데이터를 상기 내부 저장공간에 저장하는 단계를 더 포함하는 것을 특징으로 하는 일관성 관리 방법.6. The method of claim 5, further comprising storing the requested data in the internal storage. 제3항에 있어서, 상기 제2 캐시 라인에 상기 요청된 데이터를 제공하는 단계는,
상기 제1 캐시 라인이 존재하지 않는 경우, 외부 메모리에서 상기 요청된 데이터를 독출하여 상기 제2 캐시 라인에 저장하는 단계; 및
상기 제2 캐시 라인의 상태 정보를 배타(E) 상태로 변경하는 단계를 포함하는 것을 특징으로 하는 일관성 관리 방법.
The method of claim 3, wherein providing the requested data to the second cache line comprises:
If the first cache line does not exist, reading the requested data from an external memory and storing the requested data in the second cache line; And
Changing the state information of the second cache line to an exclusive (E) state.
멀티 코어 반도체 장치에 구비되는 복수의 코어들과 각각 연결되고 데이터가 저장된 복수의 캐시 라인들을 각각 포함하는 복수의 캐시 메모리의 일관성 관리 회로로서,
상기 복수의 캐시 라인들에 저장된 상기 데이터 중 일부를 저장하는 내부 저장공간;
상기 복수의 코어들로부터 요청 신호들을 수신하고, 상기 요청 신호들 중 하나를 제공하는 중재부; 및
상기 복수의 캐시 메모리의 상기 캐시 라인들 중 상기 제공된 요청 신호에 대응하는 요청된 데이터가 저장되어 있는 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 상기 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 요청된 데이터를 상기 중재부에 제공하고, 상기 복수의 캐시 메모리들에 저장된 상기 데이터의 일관성을 유지하는 일관성 관리부를 포함하며,
상기 중재부는 상기 제공된 요청 신호를 발생한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공하는 일관성 관리 회로.
A consistency management circuit of a plurality of cache memories each comprising a plurality of cache lines connected to a plurality of cores included in a multi-core semiconductor device and storing data, respectively.
An internal storage space for storing some of the data stored in the plurality of cache lines;
An arbitration unit for receiving request signals from the plurality of cores and providing one of the request signals; And
Based on whether there is a first cache line in which the requested data corresponding to the provided request signal exists among the cache lines of the plurality of cache memories, and whether the requested data is stored in the internal storage space. A consistency management unit for providing the requested data to the arbitration unit and maintaining consistency of the data stored in the plurality of cache memories,
And the arbitration section provides the requested data to a second cache line in a cache memory associated with the core that generated the provided request signal.
제8항에 있어서, 상기 캐시 라인들의 상태 정보는 MESI 프로토콜에 기초하여 제공되며, 상기 내부 저장공간에 저장되는 데이터는 수정 상태의 캐시 라인에 저장된 데이터인 것을 특징으로 하는 일관성 관리 회로.The consistency management circuit of claim 8, wherein the state information of the cache lines is provided based on a MESI protocol, and the data stored in the internal storage is data stored in a cache line in a modified state. 제9항에 있어서, 상기 일관성 관리부는,
상기 제1 캐시 라인이 존재하는지 판단하고, 상기 제1 캐시 라인의 상태가 상기 수정 상태인지 판단하며, 상기 요청된 데이터가 상기 내부 저장공간에 존재하는지 판단하는 것을 특징으로 하는 일관성 관리 회로.
The method of claim 9, wherein the consistency management unit,
Determine whether the first cache line exists, determine whether the state of the first cache line is the modified state, and determine whether the requested data exists in the internal storage space.
제10항에 있어서, 상기 일관성 관리부는,
상기 제1 캐시 라인이 존재하고, 상기 제1 캐시 라인의 상태가 상기 수정 상태이며, 상기 요청된 데이터가 상기 내부 저장공간에 존재하는 경우, 상기 내부 저장공간에서 상기 요청된 데이터를 독출하여 상기 중재부에 제공하며,
상기 제1 및 제2 캐시 라인들의 상태 정보를 공유 상태로 변경하는 변경 신호를 제공하는 것을 특징으로 하는 일관성 관리 회로.
The method of claim 10, wherein the consistency management unit,
If the first cache line exists, the state of the first cache line is the modified state, and the requested data exists in the internal storage, the requested data is read from the internal storage and the arbitration is performed. Provided to wealth,
And a change signal for changing the state information of the first and second cache lines into a shared state.
복수의 코어들을 가지는 멀티 코어 반도체 장치에 포함된 캐시 장치로서,
상기 복수의 코어들과 각각 연결되고 데이터가 저장된 복수의 캐시 라인들을 각각 포함하는 복수의 캐시 메모리들; 및
상기 복수의 코어들 중 하나로부터 데이터를 요청받고, 상기 복수의 캐시 메모리들의 상기 캐시 라인들 중 상기 요청된 데이터가 저장되어 있는 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 데이터를 요청한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공하며, 상기 복수의 캐시 메모리들에 저장된 상기 데이터의 일관성을 유지하는 일관성 관리 회로를 포함하는 캐시 장치.
A cache device included in a multi-core semiconductor device having a plurality of cores, the cache device comprising:
A plurality of cache memories each connected to the plurality of cores and each comprising a plurality of cache lines in which data is stored; And
Whether data is requested from one of the plurality of cores, a first cache line in which the requested data is stored among the cache lines of the plurality of cache memories, and the requested data is stored in an internal storage space. A consistency management circuit for providing the requested data to a second cache line in a cache memory associated with the core requesting the data and maintaining the consistency of the data stored in the plurality of cache memories based on whether the data is stored; Cache device that contains.
제12항에 있어서, 상기 일관성 관리 회로는,
상기 복수의 캐시 라인들에 저장된 상기 데이터 중 일부를 저장하는 상기 내부 저장공간;
상기 복수의 코어들로부터 요청 신호들을 수신하고, 상기 요청 신호들 중 하나를 제공하는 중재부; 및
상기 복수의 캐시 메모리의 상기 캐시 라인들 중 상기 제공된 요청 신호에 대응하는 상기 요청된 데이터가 저장되어 있는 상기 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 상기 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 요청된 데이터를 상기 중재부에 제공하고, 상기 복수의 캐시 메모리들에 저장된 상기 데이터의 일관성을 유지하는 일관성 관리부를 포함하며,
상기 중재부는 상기 제공된 요청 신호를 발생한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공하는 캐시 장치.
The method of claim 12, wherein the consistency management circuit,
The internal storage space storing some of the data stored in the plurality of cache lines;
An arbitration unit for receiving request signals from the plurality of cores and providing one of the request signals; And
Whether the first cache line in which the requested data corresponding to the provided request signal exists among the cache lines of the plurality of cache memories exists and whether the requested data is stored in the internal storage space A consistency management unit for providing the requested data to the arbitration unit and maintaining the consistency of the data stored in the plurality of cache memories.
And the arbitration unit provides the requested data to a second cache line in a cache memory associated with the core that generated the provided request signal.
메인 메모리;
상기 메인 메모리의 데이터 중 일부를 저장하고, 상기 저장된 데이터의 일관성을 유지하는 캐시 장치; 및
복수의 코어들을 포함하고, 상기 캐시 장치를 통해 상기 메인 메모리와 데이터를 주고받는 프로세서를 포함하고,
상기 캐시 장치는,
상기 복수의 코어들과 각각 연결되고 상기 메인 메모리의 데이터 중 일부가 저장된 복수의 캐시 라인들을 각각 포함하는 복수의 캐시 메모리들; 및
상기 복수의 코어들 중 하나로부터 데이터를 요청받고, 상기 복수의 캐시 메모리들의 상기 캐시 라인들 중 상기 요청된 데이터가 저장되어 있는 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 데이터를 요청한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공하며, 상기 복수의 캐시 메모리들에 저장된 상기 데이터의 일관성을 유지하는 일관성 관리 회로를 포함하는 멀티 코어 반도체 장치.
Main memory;
A cache device that stores some of the data in the main memory and maintains the consistency of the stored data; And
A processor comprising a plurality of cores, and including a processor for exchanging data with the main memory through the cache device;
The cache device,
A plurality of cache memories each connected to the plurality of cores and each of the plurality of cache lines storing some of data of the main memory; And
Whether data is requested from one of the plurality of cores, a first cache line in which the requested data is stored among the cache lines of the plurality of cache memories, and the requested data is stored in an internal storage space. A consistency management circuit for providing the requested data to a second cache line in a cache memory associated with the core requesting the data and maintaining the consistency of the data stored in the plurality of cache memories based on whether the data is stored; Multi-core semiconductor device comprising.
제14항에 있어서, 상기 일관성 관리 회로는,
상기 복수의 캐시 라인들에 저장된 상기 데이터 중 일부를 저장하는 상기 내부 저장공간;
상기 복수의 코어들로부터 요청 신호들을 수신하고, 상기 요청 신호들 중 하나를 제공하는 중재부; 및
상기 복수의 캐시 메모리의 상기 캐시 라인들 중 상기 제공된 요청 신호에 대응하는 상기 요청된 데이터가 저장되어 있는 상기 제1 캐시 라인이 존재하는지 여부 및 상기 요청된 데이터가 상기 내부 저장공간에 저장되어 있는지 여부에 기초하여, 상기 요청된 데이터를 상기 중재부에 제공하고, 상기 복수의 캐시 메모리들에 저장된 상기 데이터의 일관성을 유지하는 일관성 관리부를 포함하며,
상기 중재부는 상기 제공된 요청 신호를 발생한 코어와 연결된 캐시 메모리 내의 제2 캐시 라인에 상기 요청된 데이터를 제공하는 멀티 코어 반도체 장치.
15. The method of claim 14, wherein the consistency management circuitry,
The internal storage space storing some of the data stored in the plurality of cache lines;
An arbitration unit for receiving request signals from the plurality of cores and providing one of the request signals; And
Whether the first cache line in which the requested data corresponding to the provided request signal exists among the cache lines of the plurality of cache memories exists and whether the requested data is stored in the internal storage space A consistency management unit for providing the requested data to the arbitration unit and maintaining the consistency of the data stored in the plurality of cache memories.
And the arbitration unit provides the requested data to a second cache line in a cache memory connected to a core generating the provided request signal.
KR20100011423A 2010-02-08 2010-02-08 Method for managing coherence, coherence management unit, cache device and semiconductor device including the same KR101092929B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR20100011423A KR101092929B1 (en) 2010-02-08 2010-02-08 Method for managing coherence, coherence management unit, cache device and semiconductor device including the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR20100011423A KR101092929B1 (en) 2010-02-08 2010-02-08 Method for managing coherence, coherence management unit, cache device and semiconductor device including the same

Publications (2)

Publication Number Publication Date
KR20110092014A true KR20110092014A (en) 2011-08-17
KR101092929B1 KR101092929B1 (en) 2011-12-12

Family

ID=44929032

Family Applications (1)

Application Number Title Priority Date Filing Date
KR20100011423A KR101092929B1 (en) 2010-02-08 2010-02-08 Method for managing coherence, coherence management unit, cache device and semiconductor device including the same

Country Status (1)

Country Link
KR (1) KR101092929B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101395025B1 (en) * 2012-06-27 2014-05-15 한국과학기술원 Method for managing coherence, coherence management unit, cache device and semiconductor device including the same
KR101446924B1 (en) * 2013-02-12 2014-10-06 한국과학기술원 Method for managing coherence, coherence management unit, cache device and semiconductor device including the same

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014209401A1 (en) * 2013-06-28 2014-12-31 Intel Corporation Techniques to aggregate compute, memory and input/output resources across devices

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101395025B1 (en) * 2012-06-27 2014-05-15 한국과학기술원 Method for managing coherence, coherence management unit, cache device and semiconductor device including the same
KR101446924B1 (en) * 2013-02-12 2014-10-06 한국과학기술원 Method for managing coherence, coherence management unit, cache device and semiconductor device including the same

Also Published As

Publication number Publication date
KR101092929B1 (en) 2011-12-12

Similar Documents

Publication Publication Date Title
EP3140749B1 (en) In-memory lightweight coherency
JP5348429B2 (en) Cache coherence protocol for persistent memory
US10402327B2 (en) Network-aware cache coherence protocol enhancement
US8037253B2 (en) Method and apparatus for global ordering to insure latency independent coherence
TWI638311B (en) Data processing method and processor
TW484068B (en) Method and system for resolution of transaction collisions to achieve global coherence in a distributed symmetric multiprocessor system
US10152436B2 (en) Mutual exclusion in a non-coherent memory hierarchy
US9213656B2 (en) Flexible arbitration scheme for multi endpoint atomic accesses in multicore systems
US20070038814A1 (en) Systems and methods for selectively inclusive cache
US9304925B2 (en) Distributed data return buffer for coherence system with speculative address support
WO2023121766A1 (en) System, apparatus and methods for direct data reads from memory
US9372796B2 (en) Optimum cache access scheme for multi endpoint atomic access in a multicore system
KR101092929B1 (en) Method for managing coherence, coherence management unit, cache device and semiconductor device including the same
US20220083472A1 (en) Scalable Cache Coherency Protocol
KR101695845B1 (en) Apparatus and method for maintaining cache coherency, and multiprocessor apparatus using the method
US20160328322A1 (en) Processor to memory bypass
JP2006079218A (en) Memory control device and control method
US6990516B2 (en) Distributed shared memory system and data-maintenance method of same
EP4124963A1 (en) System, apparatus and methods for handling consistent memory transactions according to a cxl protocol
CN102902631B (en) Multiprocessor inter-core transmission method for avoiding data back writing during read-miss
US20150067246A1 (en) Coherence processing employing black box duplicate tags
CN114238171A (en) Electronic equipment, data processing method and device and computer system
JP5861496B2 (en) Multiprocessor device and power control method for multiprocessor device
KR101395025B1 (en) Method for managing coherence, coherence management unit, cache device and semiconductor device including the same
KR101043199B1 (en) Multi-core cache circuit using single-core cache controller, cache device and semiconductor device including the same, and method for controlling the cache memory

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20141127

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee