[go: up one dir, main page]

CN105468540B - L2 Cache and its consistency implementation method and data processing system - Google Patents

L2 Cache and its consistency implementation method and data processing system Download PDF

Info

Publication number
CN105468540B
CN105468540B CN201410448635.8A CN201410448635A CN105468540B CN 105468540 B CN105468540 B CN 105468540B CN 201410448635 A CN201410448635 A CN 201410448635A CN 105468540 B CN105468540 B CN 105468540B
Authority
CN
China
Prior art keywords
access
cache
operation data
consistent
ram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410448635.8A
Other languages
Chinese (zh)
Other versions
CN105468540A (en
Inventor
薛长花
赵世凡
孙志文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanechips Technology Co Ltd
Original Assignee
Shenzhen ZTE Microelectronics Technology Co Ltd
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 Shenzhen ZTE Microelectronics Technology Co Ltd filed Critical Shenzhen ZTE Microelectronics Technology Co Ltd
Priority to CN201410448635.8A priority Critical patent/CN105468540B/en
Priority to PCT/CN2015/073046 priority patent/WO2016033949A1/en
Publication of CN105468540A publication Critical patent/CN105468540A/en
Application granted granted Critical
Publication of CN105468540B publication Critical patent/CN105468540B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本发明公开了一种L2 Cache及其一致性实现方法和数据处理系统,所述L2 Cache包括Slave接口、控制器、Master接口以及RAM;Slave接口,用于接收一致性访问指示信号及访问,当接收到一致性访问指示信号时确定访问为一致性访问,及依据一致性访问指示信号及访问对访问进行分类,依据分类结果形成指示信息;控制器,用于接收指示信息,依据指示信息在RAM中查询操作数据,在查询到操作数据后依据指示信息执行一致性操作;Master接口,用于在RAM中未查询操作数据时,依据指示信息向外设输出一致性访问指示信号及一致性访问及在查询到操作数据后依据指示信息将操作数据输出到外部存储器。

The invention discloses an L2 Cache and its consistency realization method and data processing system. The L2 Cache includes a Slave interface, a controller, a Master interface and a RAM; the Slave interface is used for receiving consistent access indication signals and accessing, when When the consistent access indication signal is received, it is determined that the access is a consistent access, and the access is classified according to the consistent access indication signal and the access, and the indication information is formed according to the classification result; the controller is used to receive the indication information, and store the indication information in the RAM Query the operation data in the RAM, and execute consistent operations according to the instruction information after the operation data is queried; the Master interface is used to output consistent access indication signals and consistent access and After the operation data is queried, the operation data is output to the external memory according to the instruction information.

Description

L2 Cache及其一致性实现方法和数据处理系统L2 Cache and its consistency implementation method and data processing system

技术领域technical field

本发明涉及数据处理领域的缓存技术,尤其涉及一种L2 Cache及其一致性实现方法和数据处理系统。The present invention relates to cache technology in the field of data processing, in particular to an L2 Cache and its consistent implementation method and data processing system.

背景技术Background technique

在共享存储的多核处理器中,高速缓冲存储器Cache可以将共享存储空间中的数据缓存在本地,加速多核获取数据的过程。由于每个处理器看到的存储视图都是通过本地Cache得到的,因此对于同一个存储位置的数据而言,不同的处理器可能会获取到不同的数据值。In a multi-core processor with shared storage, the cache memory Cache can cache data in the shared storage space locally, speeding up the process of obtaining data by the multi-core. Since the storage view seen by each processor is obtained through the local cache, different processors may obtain different data values for the data in the same storage location.

目前多核系统中,将与中央处理器CPU集成在同一块电路板上或主板上的缓存,称为一级L1 Cache,而与CPU独立的缓存称为二级L2 Cache。在现有技术中,在处理器的控制下实现与L1 Cache间的Cache一致性;然而为了提高系统处理速率等性能,一个簇Cluster内的多个CPU通常还会共享一个L2 Cache;然而现有的与CPU分离设置的L2 Cache是不支持一致性访问,这将导致L1 Cache与L2 Cache不能实现Cache一致性;L2 Cache不能实现Cache一致性。In the current multi-core system, the cache integrated with the central processing unit CPU on the same circuit board or motherboard is called the first-level L1 cache, and the cache independent of the CPU is called the second-level L2 cache. In the prior art, the Cache coherence between the L1 Cache and the L1 Cache is realized under the control of the processor; however, in order to improve performance such as system processing speed, multiple CPUs in a cluster usually share an L2 Cache; however, the existing The L2 Cache set separately from the CPU does not support consistent access, which will cause the L1 Cache and L2 Cache to fail to achieve Cache consistency; the L2 Cache cannot achieve Cache consistency.

显然不能很好的维护Cache一致性,将会导致数据不一致性导致的处理错误率高及处理效率低等诸多问题。Obviously, failing to maintain Cache consistency well will lead to many problems such as high processing error rate and low processing efficiency caused by data inconsistency.

发明内容Contents of the invention

有鉴于此,本发明实施例期望提供一种能够接收一致性访问实现Cache一致性的L2 Cache和数据处理系统;本发明实施例还同时提供了所述L2 Cache一致性实现方法。In view of this, the embodiment of the present invention expects to provide an L2 Cache and data processing system capable of receiving consistent access to achieve Cache consistency; the embodiment of the present invention also provides the method for implementing the L2 Cache consistency.

为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, technical solution of the present invention is achieved in that way:

本发明实施例第一方面提供一种二级独立高速缓存器L2 Cache,所述L2 Cache包括Slave接口、控制器、Master接口以及RAM;The first aspect of the embodiment of the present invention provides a second-level independent high-speed cache L2 Cache, the L2 Cache includes a Slave interface, a controller, a Master interface, and a RAM;

所述Slave接口,用于接收一致性访问指示信号及访问,当接收到所述一致性访问指示信号时确定所述访问为一致性访问,及依据一致性访问指示信号及所述访问对所述访问进行分类,依据分类结果形成指示信息;The Slave interface is used to receive a consistent access indication signal and access, determine that the access is a consistent access when receiving the consistent access indication signal, and perform a consistent access to the access according to the consistent access indication signal and the access Classify the visits, and form instruction information according to the classification results;

所述控制器,用于接收所述指示信息,依据所述指示信息在所述RAM中查询操作数据,在查询到所述操作数据后依据所述指示信息执行一致性操作;The controller is configured to receive the instruction information, query operation data in the RAM according to the instruction information, and perform a consistent operation according to the instruction information after querying the operation data;

所述Master接口,用于在所述RAM中未查询所述操作数据时,依据所述指示信息向外设输出所述一致性访问指示信号及所述一致性访问,及在查询到所述操作数据后依据所述指示信息将所述操作数据输出到外部存储器。The Master interface is used to output the consistent access indication signal and the consistent access to peripherals according to the indication information when the operation data is not queried in the RAM, and when the operation data is queried, Then output the operation data to the external memory according to the indication information.

优选地,Preferably,

所述一致性访问指示信号包括一致性访问类型指示信号;The consistent access indication signal includes a consistent access type indication signal;

所述Slave接口,用于接收所述一致性访问类型指示信号,依据所述一致性访问类型指示信号确定所述访问为一致性访问。The slave interface is configured to receive the consistent access type indication signal, and determine that the access is consistent access according to the consistent access type indication signal.

优选地,Preferably,

所述一致性访问指示信号还包括所述一致性访问全局信号;The consistent access indication signal also includes the consistent access global signal;

所述Slave接口包括第一读地址通道、第一读数据通道及第一写地址通道;The Slave interface includes a first read address channel, a first read data channel and a first write address channel;

所述Slave接口,用于接收所述一致性访问全局信号,依据所述一致性访问全局信号驱动形成Slave接口控制信号,依据所述Slave接口控制信号驱动所述Slave接口内各个所述通道接收所述一致性访问;The Slave interface is used to receive the consistent access global signal, drive and form a Slave interface control signal according to the consistent access global signal, and drive each of the channels in the Slave interface to receive the received signal according to the Slave interface control signal. consistent access described above;

所述第一读地址通道,用于接收所述一致性访问类型指示信号;The first read address channel is used to receive the consistent access type indication signal;

所述第一读数据通道,用于依据所述查询结果向请求源发送读响应信号;The first read data channel is used to send a read response signal to the request source according to the query result;

所述第一写地址通道,用于接收一致性访问的外部存储器更新信号。The first write address channel is used to receive an external memory update signal for consistent access.

优选地,Preferably,

所述一致性访问全局信号包括所述一致性访问的操作数据在其他Cache中的查询状态以及所述一致性访问的请求源。The coherent access global signal includes the query status of the coherent access operation data in other caches and the coherent access request source.

优选地,Preferably,

所述Master接口包括第二读地址通道、第二读数据通道及第二写地址通道;The Master interface includes a second read address channel, a second read data channel and a second write address channel;

所述第二读地址通道,用于在所述RAM中未查询所述操作数据时,输出所述一致性访问指示信号;The second read address channel is used to output the consistent access indication signal when the operation data is not queried in the RAM;

所述第二读数据通道,用于接收读响应信号及侦听响应信号;The second read data channel is used to receive a read response signal and listen to a response signal;

所述第二写地址通道,用于输出将所述操作数据写到外部存储器并无效Cache内所述操作数据的指示信号。The second write address channel is used to output an indication signal for writing the operation data to the external memory and invalidating the operation data in the Cache.

优选地,Preferably,

所述L2 Cache还包括:The L2 Cache also includes:

第一缓冲区,用于存储访问类型、在其他Cache中的查询状态、在所述L2 Cache中的查询状态及所述一致性访问的请求源,用于为查询所述操作数据及实现Cache一致性提供依据信息。The first buffer is used to store the access type, the query status in other Cache, the query status in the L2 Cache and the request source of the consistent access, and is used for querying the operation data and realizing Cache consistency provide evidence based information.

优选地,Preferably,

所第一述缓冲区,还用于存储无效失败信息,依据所述无效失败信息通知向所述请求源。The first buffer is also used to store invalid failure information, and notify the request source according to the invalid failure information.

优选地,Preferably,

所述RAM包括Data RAM以及Tag RAM;所述Data RAM用于存储操作数据;所述DataRAM包括若干个所述cache存储单元;所述Tag RAM用于存储操作数据的存储地址及所述cache存储单元的状态信息;The RAM includes Data RAM and Tag RAM; the Data RAM is used to store operation data; the DataRAM includes several cache storage units; the Tag RAM is used to store storage addresses of operation data and the cache storage units status information;

所述控制器,具体用于依据所述指示信息,The controller is specifically configured to, according to the indication information,

读取Tag RAM并依据Tag RAM的结果查询更新所述Tag RAM,Read the Tag RAM and query and update the Tag RAM according to the result of the Tag RAM,

or

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器及更新所述Tag RAM,Reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor and updating the Tag RAM,

or

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器,Reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor,

or

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器并将所述操作数据写到外部存储器,reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor and writing the operation data to the external memory,

or

读取Tag RAM,Read Tag RAM,

or

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据写到外部存储器及更新所述Tag RAM;Read the Tag RAM and query the Data RAM according to the result of the Tag RAM and write the query operation data to the external memory and update the Tag RAM;

其中,更新所述Tag RAM包括更新操作地址及所述状态信息的至少其中之一。Wherein, updating the Tag RAM includes updating at least one of an operation address and the state information.

优选地,Preferably,

所述控制器,还具体用于依据所述指示信息,The controller is further specifically configured to, according to the indication information,

在所述Data RAM查询到所述操作数据且所述操作数据的状态为dirty时,将所述操作数据通过所述master接口输出到外部存储器。When the Data RAM finds the operation data and the state of the operation data is dirty, output the operation data to the external memory through the master interface.

优选地,Preferably,

所述控制器包括:The controller includes:

Tag Access fifo队列,用于在查询到所述操作数据后,存储是否要更新所述TagRAM的信息及访问所述Data RAM的指示;The Tag Access fifo queue is used to store information about whether to update the TagRAM and an instruction to access the Data RAM after the operation data is queried;

Tag Write fifo队列,用于在查询到所述操作数据后且确定需要更新所述TagRAM时,存储需要更新所述Tag RAM的操作信息;The Tag Write fifo queue is used to store the operation information that needs to be updated to the Tag RAM when the operation data is queried and the TagRAM needs to be updated;

Data read fifo队列,用于在查询到所述操作数据后,存储需要更新所述Tag RAM且读取Data RAM的操作信息;Data read fifo queue, used for storing operation information that needs to update the Tag RAM and read the Data RAM after the operation data is queried;

控制单元,用于依据所述Tag Access fifo队列、Tag Write fifo队列及Dataread fifo队列执行所述一致性操作。A control unit, configured to execute the consistency operation according to the Tag Access fifo queue, Tag Write fifo queue and Dataread fifo queue.

优选地,Preferably,

所述控制器包括控制单元;The controller includes a control unit;

所述控制单元,用于进行访问冲突检测,在检测到冲突访问时,采用阻塞机制对访问冲突进行处理。The control unit is configured to perform access conflict detection, and when a conflict access is detected, a blocking mechanism is used to process the access conflict.

本发明实施例第二方面提供一种数据处理系统,所述系统包括至少一个簇;The second aspect of the embodiment of the present invention provides a data processing system, the system includes at least one cluster;

所述簇包括至少两个处理器、簇内帧听控制器以及上述权利要求1至9任一项所述的L2 Cache;其中,每一个所述处理器都集成设置有一个L1 Cache;The cluster includes at least two processors, an intra-cluster frame listener controller, and the L2 Cache according to any one of claims 1 to 9; wherein, each of the processors is integrated with an L1 Cache;

所述簇内帧听控制器,分别与所述L1 Cache及所述L2 Cache相连,用于侦听一致性访问,协助任一两个所述L1 Cache以及所述L1 Cache与所述L2 Cache之间实现Cache一致性。The intra-cluster frame monitoring controller is connected to the L1 Cache and the L2 Cache respectively, and is used for monitoring consistent access, assisting any two of the L1 Cache and the connection between the L1 Cache and the L2 Cache To achieve cache coherency.

优选地,Preferably,

所述系统还包括簇间帧听控制器;The system also includes an inter-cluster frame listening controller;

所述簇间帧听控制器,与所述L2 Cache相连用于侦听一致性访问,协助实现簇之间的Cache一致性。The inter-cluster frame monitoring controller is connected to the L2 Cache for monitoring consistent access, and assists in realizing Cache consistency between clusters.

优选地,Preferably,

所L1 Cache,具体用于当接收一致性访问在所述L1 Cache中查询所述一致性访问对应的操作数据;当所述L1 Cache查询到所述操作数据时,响应所述一致性访问,同时在所述簇内缓存帧听控制器的协助下实现所述L1 Cache所在簇的Cache一致性,并在所述簇间缓存帧听控制器的协助下实现簇间的Cache的一致性;The L1 Cache is specifically used to query the operation data corresponding to the consistency access in the L1 Cache when receiving the consistency access; when the L1 Cache queries the operation data, respond to the consistency access, and at the same time Realize the Cache consistency of the cluster where the L1 Cache is located with the assistance of the intra-cluster cache frame controller, and realize the inter-cluster Cache consistency with the assistance of the inter-cluster cache frame controller;

所述簇内缓存帧听控制器,用于在本簇内所述L1 Cache中未查询到所述操作数据时,向所述L2 Cache发送所述一致性访问;The intra-cluster cache frame controller is configured to send the consistent access to the L2 Cache when the operation data is not found in the L1 Cache in the cluster;

所述L2 Cache用于在本簇所述L1 Cache中未查询到一致性访问对应的操作数据时,接收所述一致性访问及其他簇发送的一致性访问,查询所述L2 Cache中是否存储有所述操作数据,当所述L2 Cache未查询到所述一致性访问对应的操作数据时,通过所述簇间缓存帧听控制器到所述L2 Cache所在簇以外的其他簇中查询所述操作数据,在查询到所述操作数据后响应所述一致性访问,并在所述簇间缓存帧听控制器协助下实现簇间的Cache一致性。The L2 Cache is used to receive the consistent access and the consistent access sent by other clusters when the operation data corresponding to the consistent access is not queried in the L1 Cache of the cluster, and query whether the L2 Cache stores any For the operation data, when the L2 Cache does not query the operation data corresponding to the consistent access, query the operation data in a cluster other than the cluster where the L2 Cache is located through the inter-cluster cache frame controller data, responding to the consistent access after querying the operation data, and realizing inter-cluster Cache consistency with the assistance of the inter-cluster cache frame controller.

本发明实施例第三方面提供一种L2 Cache一致性实现方法,所述方法包括:A third aspect of the embodiments of the present invention provides a method for implementing L2 Cache consistency, the method comprising:

接收一致性访问指示信号及访问,当接收到所述一致性访问指示信号时确 定所述访问为一致性访问;Receiving a consistent access indication signal and an access, and determining that the access is a consistent access when receiving the consistent access indication signal;

依据一致性访问指示信号及所述访问对所述访问进行分类,依据分类结果形成指示信息;Classify the access according to the consistent access indication signal and the access, and form indication information according to the classification result;

依据所述指示信息查询操作数据,在查询到所述操作数据后依据所述指示信息执行一致性操作;在未查询所述操作数据时,依据所述指示信息向外设输出所述一致性访问指示信号及所述一致性访问;Querying the operation data according to the instruction information, and performing a consistent operation according to the instruction information after the operation data is queried; when the operation data is not queried, output the consistent access to the peripheral device according to the instruction information indication signal and said coherent access;

当所述访问需要将所述操作数据输出到外部存储器时,则在查询到所述操作数据后,依据所述指示信息将所述操作数据输出到外部存储器。When the access needs to output the operation data to the external memory, output the operation data to the external memory according to the indication information after the operation data is queried.

优选地,Preferably,

所述一致性访问指示信号包括一致性访问类型指示信号;The consistent access indication signal includes a consistent access type indication signal;

所述接收一致性访问指示信号及访问,当接收到所述一致性访问指示信号时确定所述访问为一致性访问,包括:The receiving consistent access indication signal and access, determining that the access is consistent access when receiving the consistent access indication signal, includes:

接收所述一致性访问类型指示信号,依据所述一致性类型指示信号确定所述访问为一致性访问。receiving the consistent access type indication signal, and determining that the access is a consistent access according to the consistency type indication signal.

优选地,Preferably,

所述L2 Cache包括Slave接口;所述Slave接口包括第一读地址通道、第一读数据通道及第一写地址通道;The L2 Cache includes a Slave interface; the Slave interface includes a first read address channel, a first read data channel and a first write address channel;

所述一致性访问指示信号还包括所述一致性访问全局信号;The consistent access indication signal also includes the consistent access global signal;

所述接收一致性访问指示信号及访问,当接收到所述一致性访问指示信号时确定所述访问为一致性访问,包括:The receiving consistent access indication signal and access, determining that the access is consistent access when receiving the consistent access indication signal, includes:

接收所述一致性访问全局信号,依据所述一致性访问全局信号驱动形成Slave接口控制信号,依据所述Slave接口控制信号驱动所述Slave接口内各个所述通道接收所述一致性访问;receiving the consistent access global signal, driving to form a slave interface control signal according to the consistent access global signal, and driving each of the channels in the slave interface to receive the consistent access according to the slave interface control signal;

通过所述第一读地址通道接收所述一致性访问类型指示信号;receiving the consistent access type indication signal through the first read address channel;

所述接收一致性访问指示信号及访问,当接收到所述一致性访问指示信号时确定所述访问为一致性访问,还包括以下至少其中之一:The receiving consistent access indication signal and access, determining that the access is consistent access when receiving the consistent access indication signal, also includes at least one of the following:

通过所述第一读地址通道接收所述一致性访问类型指示信号;receiving the consistent access type indication signal through the first read address channel;

通过所述第一读数据通道依据所述查询结果向请求源发送读响应信号;sending a read response signal to the request source through the first read data channel according to the query result;

通过所述第一写地址通道接收一致性访问的外部存储器更新信号。An external memory update signal for consistent access is received through the first write address channel.

优选地,Preferably,

所述一致性访问全局信号包括所述一致性访问的操作数据在其他Cache中的查询状态以及所述一致性访问的请求源。The coherent access global signal includes the query status of the coherent access operation data in other caches and the coherent access request source.

优选地,Preferably,

所述L2 Cache包括Master接口;所述Master接口包括第二读地址通道、第二读数据通道及第二写地址通道;The L2 Cache includes a Master interface; the Master interface includes a second read address channel, a second read data channel, and a second write address channel;

所述在未查询所述操作数据时,依据所述指示信息向外设输出所述一致性访问指示信号及所述一致性访问,包括:The step of outputting the consistent access indication signal and the consistent access to peripherals according to the indication information when the operation data is not inquired includes:

通过所述第二读地址通道在所述RAM中未查询所述操作数据时,输出所述一致性访问指示信号;Outputting the consistent access indication signal when the operation data is not queried in the RAM through the second read address channel;

所述方法还包括:The method also includes:

通过所述第二读数据通道接收读响应信号及侦听响应信号;receiving a read response signal and a listen response signal through the second read data channel;

通过所述第二写地址通道输出将所述操作数据写到外部存储器并无效Cache内所述操作数据的指示信号。Outputting an indication signal for writing the operation data to the external memory and invalidating the operation data in the Cache through the second write address channel.

优选地,Preferably,

在接收到所述一致性访问指示信号后,所述方法还包括:After receiving the consistent access indication signal, the method further includes:

存储访问类型、在其他Cache中的查询状态、在L2 Cache中的查询状态及所述一致性访问的请求源,用于为查询所述操作数据及实现Cache一致性提供依据信息。Store access type, query status in other Cache, query status in L2 Cache and the request source of the consistent access, which is used to provide basis information for querying the operation data and realizing Cache consistency.

优选地,Preferably,

所述方法还包括:The method also includes:

在L2 Cache中未查询到所述操作数据时,形成并存储无效失败信息,依据所述无效失败信息通知向所述请求源。When the operation data is not found in the L2 Cache, the invalid failure information is formed and stored, and the request source is notified according to the invalid failure information.

优选地,Preferably,

所述Slave接口包括控制器;所述RAM包括Data RAM以及Tag RAM; 所述Data RAM用于存储操作数据;所述Tag RAM用于存储所述操作数据的存储地址及cache存储单元的状态信息;The Slave interface includes a controller; the RAM includes Data RAM and Tag RAM; the Data RAM is used to store operation data; the Tag RAM is used to store the storage address of the operation data and the state information of the cache storage unit;

所述依据所述指示信息查询操作数据,在查询到所述操作数据后依据所述指示信息执行一致性操作包括以下至少其中之一:The querying of the operation data according to the instruction information, and performing a consistent operation according to the instruction information after querying the operation data includes at least one of the following:

通过所述控制器,依据所述指示信息,读取Tag RAM并依据Tag RAM的结果查询更新所述状态信息;Through the controller, read the Tag RAM according to the instruction information, and query and update the state information according to the result of the Tag RAM;

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器及更新所述状态信息;Reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor and updating the state information;

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器;Read the Tag RAM and query the Data RAM according to the result of the Tag RAM and return the query operation data to the processor;

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器并将所述操作数据写到外部存储器;Reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor and writing the operation data to the external memory;

读取Tag RAM;及Read Tag RAM; and

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据写到外部存储器及更新所述状态信息。Read the Tag RAM and query the Data RAM according to the result of the Tag RAM and write the query operation data to the external memory and update the state information.

优选地,Preferably,

所述当所述访问需要将所述操作数据输出到外部存储器时,则在查询到所述操作数据后,依据所述指示信息将所述操作数据输出到外部存储器,包括:When the access needs to output the operation data to the external memory, output the operation data to the external memory according to the instruction information after querying the operation data, including:

依据所述指示信息,在所述Data RAM查询到所述操作数据且所述操作数据的状态为dirty时,将所述操作数据通过所述master接口输出到外部存储器。According to the indication information, when the Data RAM finds the operation data and the state of the operation data is dirty, output the operation data to the external memory through the master interface.

优选地,Preferably,

所述方法还包括:The method also includes:

通过控制单元进行访问冲突检测,在检测到冲突访问时,采用阻塞机制对访问冲突进行处理。本发明实施例所述的L2 Cache及其一致性实现方法和数据处理系统,通过一致性访问指示信号的接收,依据所述一致性访问指示信号能够实现与其他Cache的一致性;独立于CPU的L2 Cache能够执行一致性访问操作,能够实现数据处理系统内L1 Cache与L2Cache之间的一致性以及簇与 簇之间的Cache一致性,扩大了Cache一致性的范围,降低了数据处理过程中因L2 Cache无法实现导致的数据处理差错几率。Access conflict detection is performed by the control unit, and when conflict access is detected, a blocking mechanism is used to process the access conflict. The L2 Cache and its consistency implementation method and data processing system described in the embodiments of the present invention can achieve consistency with other Caches according to the consistency access indication signal through the reception of the consistency access indication signal; independent of the CPU L2 Cache can perform consistent access operations, and can realize the consistency between L1 Cache and L2Cache in the data processing system and the Cache consistency between clusters, which expands the scope of Cache consistency and reduces the data processing process. Data processing error probability caused by L2 Cache failure.

附图说明Description of drawings

图1为本发明实施例所述L2 Cache的结构示意图;FIG. 1 is a schematic structural diagram of an L2 Cache according to an embodiment of the present invention;

图2为本发明实施例所述的数据处理系统的结构示意图之一;Fig. 2 is one of the structural diagrams of the data processing system described in the embodiment of the present invention;

图3为本发明实施例所述的数据处理系统的结构示意图之二;Fig. 3 is the second structural diagram of the data processing system described in the embodiment of the present invention;

图4为本法实施例所述的L2 Cache一致性实现方法的流程示意图。FIG. 4 is a schematic flowchart of the method for implementing L2 Cache consistency described in the embodiment of this method.

具体实施方式Detailed ways

以下结合说明书附图及具体实施例对本发明的技术方案做进一步的详细阐述。The technical solutions of the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

实施例一:Embodiment one:

如1所示、本实施例一种二级高速缓存器L2 Cache,所述L2 Cache包括Slave接口110、控制器120、Master接口130以及RAM 140;所述RAM 140通常又分为Tag RAM和DataRAM。As shown in 1, the present embodiment is a kind of secondary high-speed cache device L2 Cache, and described L2 Cache comprises Slave interface 110, controller 120, Master interface 130 and RAM 140; Described RAM 140 is usually divided into Tag RAM and DataRAM again .

所述Slave接口110,用于接收一致性访问指示信号及访问,当接收到所述一致性访问指示信号时确定所述访问为一致性访问,依据一致性访问指示信号及所述访问对所述访问进行分类,依据分类结果形成指示信息;The Slave interface 110 is configured to receive a consistent access indication signal and access, determine that the access is a consistent access when receiving the consistent access indication signal, and determine the access according to the consistent access indication signal and the access. Classify the visits, and form instruction information according to the classification results;

所述控制器120,用于接收所述指示信息,依据所述指示信息在所述RAM140中查询操作数据,在查询到所述操作数据后依据所述指示信息执行一致性操作;The controller 120 is configured to receive the instruction information, query operation data in the RAM 140 according to the instruction information, and perform a consistent operation according to the instruction information after querying the operation data;

所述Master接口130,用于在所述RAM 140中未查询所述操作数据时,依据所述指示信息向外设输出所述一致性访问指示信号及所述一致性访问及在查询到所述操作数据后依据所述指示信息将所述操作数据输出到外部存储器。The Master interface 130 is configured to output the consistent access indication signal and the consistent access to peripherals according to the indication information when the operation data is not queried in the RAM 140, and when the operation data is queried, the After operating the data, output the operation data to the external memory according to the indication information.

本实施例所述的L2 Cache是相对于与CPU集成在同一块主板上的L1Cache而言的独立Cache。The L2 Cache described in this embodiment is an independent Cache relative to the L1 Cache integrated with the CPU on the same motherboard.

本实施例中所述Slave接口110在接收访问的时候,相对于现有的L2Cache还会接收所述一致性访问指示信号,并根据所述一致性访问指示信号对访问进行判断;将所述访问分为一致性访问和非一致性访问;通常当所述Slave接口接收到访问的同时接收到一致性访问指示信号,则认为接收到所述访问为一致性访问。所述一致性访问为需要保持Cache之间存储数据一致性的访问操作,这种Cache之间数据一致性,也可以称为Cache一致性。若是一致性访问则将生成对应于所述一致性访问的指示信息,以便所述L2 Cache根据所述指示信息执行响应的一致性操作,具体如无效数据等操作。In this embodiment, the Slave interface 110, when receiving access, will also receive the consistent access indication signal relative to the existing L2Cache, and judge the access according to the consistent access indication signal; It is divided into consistent access and non-uniform access; usually when the Slave interface receives the access and receives the consistent access indication signal at the same time, it is considered that the received access is consistent access. The consistent access is an access operation that needs to maintain data consistency between caches, and this kind of data consistency between caches may also be called cache consistency. If it is a consistent access, indication information corresponding to the consistent access will be generated, so that the L2 Cache can perform corresponding consistent operations according to the indication information, specifically operations such as invalid data.

所述依据一致性访问指示信号及所述访问对所述访问进行分类,包括将访问类型分为一致性访问和非一致性访问,响应访问时的操作可包括对RAM执行读操作、写操作或查询操作,为了简化控制器对数据处理,所述Slave接口还将根据具体所需执行的操作进行再次分类,便于控制器能够快速的更具所述指示信息响应所述访问。Classifying the access according to the consistent access indication signal and the access includes classifying the access type into consistent access and non-uniform access, and the operation in response to the access may include performing a read operation, a write operation, or a write operation on the RAM. For query operations, in order to simplify data processing by the controller, the Slave interface will also classify again according to the specific operations to be performed, so that the controller can quickly respond to the access with the instruction information.

优选地,所述一致性访问指示信号包括一致性访问类型指示信号;所述Slave接口110,用于接收所述一致性访问类型指示信号,依据所述一致性访问类型指示信号确定所述访问为一致性访问。Preferably, the consistent access indication signal includes a consistent access type indication signal; the Slave interface 110 is configured to receive the consistent access type indication signal, and determine that the access is consistent access.

在本实施例中具体限定了一致性访问相对于非一致性访问,Slave接口在接收一致性访问时,还将接收到所述一致性访问类型指示信号,从而能确认当前访问为一致性访问。In this embodiment, it is specifically defined that consistent access is relative to non-consistent access. When the Slave interface receives consistent access, it will also receive the consistent access type indication signal, so that the current access can be confirmed as consistent access.

优选地,Preferably,

所述一致性访问指示信号还包括所述一致性访问全局信号;The consistent access indication signal also includes the consistent access global signal;

所述Slave接口包括第一读地址通道、第一读数据通道及第一写地址通道;The Slave interface includes a first read address channel, a first read data channel and a first write address channel;

所述Slave接口,用于接收所述一致性访问全局信号,依据所述一致性访问全局信号驱动形成Slave接口控制信号,依据所述Slave接口控制信号驱动所述Slave接口内各个所述通道接收所述一致性访问;The Slave interface is used to receive the consistent access global signal, drive and form a Slave interface control signal according to the consistent access global signal, and drive each of the channels in the Slave interface to receive the received signal according to the Slave interface control signal. consistent access described above;

所述第一读地址通道,用于接收所述一致性访问类型指示信号;The first read address channel is used to receive the consistent access type indication signal;

所述第一读数据通道,用于依据所述查询结果向请求源发送读响应信号;The first read data channel is used to send a read response signal to the request source according to the query result;

所述第一写地址通道,用于接收一致性访问的外部存储器更新信号。The first write address channel is used to receive an external memory update signal for consistent access.

本实施例所述的Slave接口优选为包括5个通道的接口;在具体的实现过程中,所述Slave接口还将包括上述3个通道以外,还包括第一读数据通道及第一写响应通道。The Slave interface described in this embodiment is preferably an interface comprising 5 channels; in a specific implementation process, the Slave interface will also include the first read data channel and the first write response channel in addition to the above-mentioned 3 channels .

当所述访问为一致性访问时,所述Slave接口会接收访问,具体如的读访问或写访问等;针对如何接收访问及由哪些通道接收访问与现有技术中所述Slave接口接收访问是一致的;为了指示该访问为一致性访问,所述Slave接口还将接收所述一致性访问类型指示信号;为了确定该一致性访问在其他Cache中的状态等信息,所述一致性访问还将接收所述一致性访问全局信号;所述salve接口将综合所述访问以及所述一致性访问全局信号中携带的信息,确定L2 Cache需要执行的操作,进而形成指示信息。所述控制器将根据所述指示信息控制Slave接口、Master接口及RAM执行对应的一致性操作。具体的所述依据所述查询结果向请求源发送读响应信号,为L2 Cache中增加的一种一致性访问Read response。When the access is a consistent access, the Slave interface will receive access, such as read access or write access; how to receive access and which channels receive access is the same as that of the Slave interface in the prior art. Consistent; in order to indicate that the access is a consistent access, the Slave interface will also receive the consistent access type indication signal; in order to determine the status of the consistent access in other Cache and other information, the consistent access will also Receive the consistent access global signal; the salve interface will synthesize the access and the information carried in the consistent access global signal, determine the operation to be performed by the L2 Cache, and then form instruction information. The controller will control the Slave interface, the Master interface and the RAM to perform corresponding consistent operations according to the instruction information. Specifically, sending a read response signal to the request source according to the query result is a consistent access Read response added in the L2 Cache.

优选地,所述一致性访问全局信号包括所述一致性访问的操作数据在其他Cache中的查询状态以及所述一致性访问的请求源。Preferably, the coherent access global signal includes the query status of the coherent access operation data in other caches and the coherent access request source.

所述其他Cache可以是L1 Cache或其他L2 Cache。具体的所述请求源可以是与L1Cache集成设置的CPU、AXI主设备、AXI从设备等设备。The other Cache may be L1 Cache or other L2 Cache. Specifically, the request source may be a CPU integrated with L1Cache, an AXI master device, an AXI slave device, and the like.

当存储所述其他Cache中的查询状态,可以在本L2 Cache中查询不到对应的数据时,去其他Cache获取数据,拷贝到本L2 Cache中执行对应的操作,同时根据操作是读操作还是写操作控制其他Cache执行一致性操作,具体如当本L2 Cache进行写操作时,所述控制器将根据所述一致性访问全局信号输出控制信息以使其他Cache无效其内部存储的数据。When storing the query status in the other Cache, if the corresponding data cannot be queried in this L2 Cache, go to other Cache to obtain the data, copy it to this L2 Cache to perform the corresponding operation, and at the same time, according to whether the operation is a read operation or a write operation The operation controls other Caches to perform consistent operations. Specifically, when the current L2 Cache performs a write operation, the controller will output control information according to the consistent access global signal so that other Caches invalidate their internally stored data.

对应的为了使L2 Cache支持一致性访问,本实施例中不仅对Slave接口进行了改进,同时还对Master接口进行了改进,具体如下:所述Master接口130包括第二读地址通道、第二读数据通道及第二写地址通道;Correspondingly, in order to make the L2 Cache support consistent access, not only the Slave interface has been improved in this embodiment, but also the Master interface has been improved, as follows: the Master interface 130 includes a second read address channel, a second read address channel, and a second read address channel. A data channel and a second write address channel;

所述第二读地址通道,用于在所述RAM中未查询所述操作数据时,输出 所述一致性访问指示信号;所述一致性访问指示信号具体包括所述一致性访问类型指示信号;The second read address channel is used to output the consistent access indication signal when the operation data is not queried in the RAM; the consistent access indication signal specifically includes the consistent access type indication signal;

所述第二读数据通道,用于接收读响应信号及侦听响应信号;所述读响应信号通常为L2 Cache的下游处理结构返回操作数据时输出的信号;所述下游处理结构具体如外部存储器memory。The second read data channel is used to receive a read response signal and listen for a response signal; the read response signal is usually a signal output when the downstream processing structure of the L2 Cache returns operation data; the downstream processing structure is specifically such as an external memory memory.

所述第二写地址通道,用于输出将所述操作数据写到外部存储器并无效Cache内所述操作数据的指示信号。所述外部存储器可以是各种类型的寄存器等。在本实施例中所述Master接口130也优选为5通道的接口,还包括第二写数据通道及第二写响应通道;所述第二写数据通道,用于输出和接收数据写操作相关的信号;所述第二写响应通道,用于接收和输出写响应信号。The second write address channel is used to output an indication signal for writing the operation data to the external memory and invalidating the operation data in the Cache. The external memory may be various types of registers and the like. In this embodiment, the Master interface 130 is also preferably a 5-channel interface, and also includes a second write data channel and a second write response channel; the second write data channel is used to output and receive data related to the write operation signal; the second write response channel is used for receiving and outputting a write response signal.

优选地,所述L2 Cache还包括:Preferably, the L2 Cache also includes:

第一缓冲区,用于存储访问类型、在其他Cache中的查询状态、在所述L2 Cache中的查询状态及所述一致性访问的请求源,用于为查询所述操作数据及实现Cache一致性提供依据信息。The first buffer is used to store the access type, the query status in other Cache, the query status in the L2 Cache and the request source of the consistent access, and is used for querying the operation data and realizing Cache consistency provide evidence based information.

所述第一缓冲区可以为专门设置的buffer;所述访问类型包括访问的类型是一执行访问还是非一致性访问;所述其他Cache包括L1 Cache以及其他L2 Cache等。存储所述L2Cache中的查询状态,方便其他Cache在执行一致性访问时,保持与所述L2 Cache的Cache的一致性。The first buffer may be a specially set buffer; the access type includes whether the access type is one-execution access or non-uniform access; the other Cache includes L1 Cache and other L2 Cache, etc. Storing the query state in the L2 Cache is convenient for other Caches to maintain consistency with the Cache of the L2 Cache when performing consistent access.

所述第一缓冲区,具体用于存储从所述一致性访问全局信号以及侦听信号中做获取的上述信息,以协助所述L2 Cache实现与其他Cache的一致性。The first buffer is specifically used to store the above information obtained from the coherent access global signal and the listening signal, so as to assist the L2 Cache to achieve consistency with other Cache.

所第一述缓冲区,还用于存储无效失败信息,依据所述无效失败信息通知向所述请求源。The first buffer is also used to store invalid failure information, and notify the request source according to the invalid failure information.

优选地,所述RAM包括Data RAM以及Tag RAM;所述Data RAM用于存储操作数据所述Tag RAM用于存储所述操作数据的存储地址及cache存储单元的状态信息;所述Data RAM包括若干个所述cache存储单元;所述cache存储单元具体可以为cache行等,是进行cache读写操作的最小单元。Preferably, the RAM includes Data RAM and Tag RAM; the Data RAM is used to store operation data and the Tag RAM is used to store the storage address of the operation data and the state information of the cache storage unit; the Data RAM includes several The cache storage unit; the cache storage unit may specifically be a cache row, etc., and is the smallest unit for performing cache read and write operations.

所述控制器120,具体用于依据所述指示信息,The controller 120 is specifically configured to, according to the indication information,

读取Tag RAM并依据Tag RAM的结果查询更新所述Tag RAM,Read the Tag RAM and query and update the Tag RAM according to the result of the Tag RAM,

or

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器及更新所述Tag RAM,Reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor and updating the Tag RAM,

or

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器,Reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor,

or

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器并将所述操作数据写到外部存储器,reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor and writing the operation data to the external memory,

or

读取Tag RAM,Read Tag RAM,

or

读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据写到外部存储器及更新所述Tag RAM;Read the Tag RAM and query the Data RAM according to the result of the Tag RAM and write the query operation data to the external memory and update the Tag RAM;

其中,更新所述Tag RAM包括更新操作地址及所述状态信息的至少其中之一。Wherein, updating the Tag RAM includes updating at least one of an operation address and the status information.

在现有的L2 Cache中的控制器的控制逻辑相对简单,对Tag RAM更新仅发生在写操作或读写分配导致的替换的时候,而在本实施例中对所述Tag RAM的更新还发生执行一致性访问的其他操作时,如操作数据查询。具体如;在其他Cache在执行一致性访问中的写操作时,可能需要无效本L2 Cache中的操作数据的副本,可能需要无效对应的Cache单元,则可以所述控制器可能会执行读取Tag RAM并依据Tag RAM的结果查询更新所述Tag RAM的控制逻辑。The control logic of the controller in the existing L2 Cache is relatively simple, and the update to the Tag RAM only occurs when the replacement caused by the write operation or read-write allocation, but in this embodiment, the update to the Tag RAM also occurs When performing other operations for consistent access, such as operating data queries. Specifically, when other Cache is performing a write operation in consistent access, it may need to invalidate the copy of the operation data in this L2 Cache, and may need to invalidate the corresponding Cache unit, then the controller may execute the read Tag The RAM queries and updates the control logic of the Tag RAM according to the result of the Tag RAM.

具体的控制器120采用哪种控制逻辑响应当前访问,依据所述访问指向的操作以及该访问进行类型以及在其他Cache中的查询状态等信息来确定。The specific control logic adopted by the controller 120 to respond to the current access is determined according to the operation pointed to by the access, the type of the access, and the query status in other caches.

所述控制器可以通过新增控制芯片或逻辑控制电路等来实现控制逻辑的增加。The controller can increase the control logic by adding a control chip or a logic control circuit.

优选地,所述控制器120,还具体用于依据所述指示信息,Preferably, the controller 120 is also specifically configured to, according to the indication information,

在所述Data RAM查询到所述操作数据且所述操作数据的状态为dirty时,将所述操作数据通过所述master接口输出到外部存储器。When the Data RAM finds the operation data and the state of the operation data is dirty, output the operation data to the external memory through the master interface.

操作数据的状态为dirty,表示当前时刻Cache中的所述操作数据已经更新了,但是外部存储器中的所述操作数据还未更新的状态。The state of the operation data is dirty, which means that the operation data in the Cache has been updated at the current moment, but the operation data in the external memory has not been updated.

优选地,所述控制器120包括:Preferably, the controller 120 includes:

Tag Access fifo队列,用于在查询到所述操作数据后,存储是否要更新所述TagRAM的信息及访问所述Data RAM的指示;The Tag Access fifo queue is used to store information about whether to update the TagRAM and an instruction to access the Data RAM after the operation data is queried;

Tag Write fifo队列,用于在查询到所述操作数据后且确定需要更新所述TagRAM时,存储需要更新所述Tag RAM的操作信息;The Tag Write fifo queue is used to store the operation information that needs to be updated to the Tag RAM when the operation data is queried and the TagRAM needs to be updated;

Data read fifo队列,用于在查询到所述操作数据后,存储需要更新所述Tag RAM且读取Data RAM的操作信息;Data read fifo queue, used for storing operation information that needs to update the Tag RAM and read the Data RAM after the operation data is queried;

控制单元,用于依据所述Tag Access fifo队列、Tag Write fifo队列及Dataread fifo队列执行所述一致性操作。A control unit, configured to execute the consistency operation according to the Tag Access fifo queue, Tag Write fifo queue and Dataread fifo queue.

本实施例所述的fifo队列为先进先出队列;本实施例所述的控制器120相对于现有的L2 cache有新增4个队列来协助实现新增的控制逻辑。The fifo queue described in this embodiment is a first-in-first-out queue; compared with the existing L2 cache, the controller 120 described in this embodiment has 4 new queues to assist in implementing the newly added control logic.

优选地,所述控制器120包括控制单元;Preferably, the controller 120 includes a control unit;

所述控制单元,用于进行访问冲突检测,在检测到冲突访问时,采用阻塞机制对访问冲突进行处理。The control unit is configured to perform access conflict detection, and when a conflict access is detected, a blocking mechanism is used to process the access conflict.

所述控制单元的具体结构可为处理芯片,分别于上述的fifo相连、所述Slave接口、Master接口及RAM相连。The specific structure of the control unit may be a processing chip, which is respectively connected to the above-mentioned fifo, the Slave interface, the Master interface and RAM.

当所述L2 cache需要实现一致性访问时,可能存在着不同的CPU对同一Cache存储单元进行读写操作,这将导致冲突,此时需要所述控制单元进行访问冲突检测,并采用阻塞机制对访问冲突进行协调处理;所述访问冲突可以为现有Cache一致性访问中所涉及的所有的访问冲突;所述阻塞机制同样也可以采用现有的阻塞机制。When the L2 cache needs to implement consistent access, there may be different CPUs performing read and write operations on the same Cache storage unit, which will cause conflicts. At this time, the control unit needs to perform access conflict detection and use a blocking mechanism to The access conflicts are coordinated and processed; the access conflicts may be all access conflicts involved in the existing Cache consistent access; the blocking mechanism may also adopt the existing blocking mechanism.

综合上述,本实施例提供了一种L2 Cache采用5个通道来实现一致性访问, 具体的现有的L2 Cache包括支持AXI协议的不支持一致性访问的L2 Cache;这种支持AXI协议的L2 Cache的Slave接口通常为5个通道,本实施例所述的L2 Cache可以为在所述支持AXI协议的L2 Cache上改进的L2 Cache,通过Slave接口和Master接口中各通道的复用,在所述控制器中增加控制逻辑(所增加的控制逻辑可具体采用新增的逻辑电路或新增控制芯片来实现)使所述L2 Cache支持一致性访问。当所述L2 Cache应用于数据处理系统中,可以用于与L1 Cache和或L2 Cache实现Cache一致性;且实践证明,本实施例所述的L2 Cache与现有的中的L1 Cache以及侦听控制器等设备有很好的兼容性。Based on the above, this embodiment provides an L2 Cache that uses 5 channels to achieve consistent access. The specific existing L2 Cache includes an L2 Cache that supports the AXI protocol and does not support consistent access; this L2 Cache that supports the AXI protocol The Slave interface of Cache is usually 5 channels, and the L2 Cache described in this embodiment can be the L2 Cache improved on the L2 Cache of described support AXI agreement, through the multiplexing of each channel in the Slave interface and the Master interface, in the Adding control logic to the controller (the added control logic can be realized by adding a new logic circuit or a new control chip) makes the L2 Cache support consistent access. When the L2 Cache is applied to a data processing system, it can be used to achieve Cache consistency with L1 Cache and or L2 Cache; and practice has proved that the L2 Cache described in this embodiment is compatible with the existing L1 Cache and intercept Devices such as controllers have good compatibility.

实施例二:Embodiment two:

如图2所示,本实施例提供一种数据处理系统,所述系统包括至少一个簇;As shown in Figure 2, this embodiment provides a data processing system, the system includes at least one cluster;

所述簇包括至少两个处理器、簇内帧听控制器以及如实施例一中所述的L2Cache;其中,每一个所述处理器都集成设置有一个L1 Cache;The cluster includes at least two processors, an intra-cluster frame listener controller, and an L2Cache as described in Embodiment 1; wherein, each of the processors is integrated with an L1 Cache;

所述簇内帧听控制器L1 Cache Snoop Controller,分别与所述L1 Cache及所述L2 Cache相连,用于侦听一致性访问,协助任一两个所述L1 Cache以及所述L1 Cache与所述L2 Cache之间实现Cache一致性。The intra-cluster frame snooping controller L1 Cache Snoop Controller is connected to the L1 Cache and the L2 Cache respectively, and is used for snooping consistent access, assisting any two of the L1 Cache and the L1 Cache with all Cache coherence is achieved between the above L2 caches.

通常当CPU发起一个访问,首先在该CPU集成的所述L1 Cache中查询是否有对应的操作数据,当没有查询到对应的操作数据时,通过所述簇内侦听控制器到其他L1 Cache中查询,当在其他Cache中查询到所述操作数据,在所述簇内侦听控制器的协助下将查询的所述操作数据返回给对应的L1Cache及CPU;若没有查询到则通过簇内侦听控制器到L2 Cache中进行查询;由L2 Cache响应所述一致性操作。Usually, when a CPU initiates an access, it first inquires whether there is corresponding operation data in the L1 Cache integrated with the CPU. Query, when the operation data is found in other Cache, with the assistance of the in-cluster interception controller, the inquired operation data is returned to the corresponding L1Cache and CPU; The listening controller queries the L2 Cache; the L2 Cache responds to the consistency operation.

本实施例所述的L2 Cache支持一致性访问,从而能够实现与所述L1 Cache实现Cache一致性,能够提高数据访问效率及降低数据处理不一致性的问题。The L2 Cache described in this embodiment supports consistent access, thereby achieving Cache consistency with the L1 Cache, improving data access efficiency and reducing data processing inconsistencies.

如图3所示,所述系统还包括簇间帧听控制器;所述簇间帧听控制器,与所述L2Cache相连用于侦听一致性访问,协助实现簇间的Cache一致性。As shown in FIG. 3 , the system further includes an inter-cluster frame snoop controller; the inter-cluster frame snoop controller is connected to the L2Cache for snooping coherent access, and assists in realizing inter-cluster Cache coherency.

当一致性访问中对应的操作数据在一个簇内的L1 Cache及L2 Cache都未查询到对应的数据的时候,通过所述簇间帧听控制器到其他簇去查询对应的操 作数据,同样的所述L2 Cache及所述L1 Cache也通过所述簇间帧听控制器接收其他簇发送的一致性操作的数据查询操作等操作。When the corresponding operation data in the consistent access is not queried in the L1 Cache and L2 Cache in a cluster, the inter-cluster frame listener controller goes to other clusters to query the corresponding operation data, and the same The L2 Cache and the L1 Cache also receive operations such as data query operations sent by other clusters through the inter-cluster frame monitoring controller.

图3所示的系统中包括多个簇Cluster;图示中显示有Cluster 0和Cluster N;其中,所述N为不小于1的整数。每一个所述簇都包括L1 Cache、L2 Cache及簇内缓存帧听控制器。The system shown in FIG. 3 includes multiple clusters; Cluster 0 and Cluster N are shown in the diagram; wherein, N is an integer not less than 1. Each of the clusters includes L1 Cache, L2 Cache and an intra-cluster cache frame controller.

所L1 Cache,具体用于当接收一致性访问在所述L1 Cache中查询所述一致性访问对应的操作数据;当所述L1 Cache查询到所述操作数据时,响应所述一致性访问,同时在所述簇内缓存帧听控制器的协助下实现所述L1 Cache所在簇的Cache一致性,并在所述簇间缓存帧听控制器的协助下实现簇间的Cache的一致性;The L1 Cache is specifically used to query the operation data corresponding to the consistency access in the L1 Cache when receiving the consistency access; when the L1 Cache queries the operation data, respond to the consistency access, and at the same time Realize the Cache consistency of the cluster where the L1 Cache is located with the assistance of the intra-cluster cache frame controller, and realize the inter-cluster Cache consistency with the assistance of the inter-cluster cache frame controller;

所述簇内缓存帧听控制器,用于在本簇内所述L1 Cache中未查询到所述操作数据时,向所述L2 Cache发送所述一致性访问;The intra-cluster cache frame controller is configured to send the consistent access to the L2 Cache when the operation data is not found in the L1 Cache in the cluster;

所述L2 Cache用于在本簇所述L1 Cache中未查询到一致性访问对应的操作数据时,接收所述一致性访问及其他簇发送的一致性访问,查询所述二级Cache中是否存储有所述操作数据,当所述L2 Cache未查询到所述一致性访问对应的操作数据时,通过所述簇间缓存帧听控制器到所述L2 Cache所在簇以外的其他簇中查询所述操作数据,在查询到所述操作数据后响应所述一致性访问,并在所述簇间缓存帧听控制器协助下实现簇间的Cache一致性。The L2 Cache is used to receive the consistent access and the consistent access sent by other clusters when the operation data corresponding to the consistent access is not found in the L1 Cache of the cluster, and query whether the secondary cache stores With the operation data, when the operation data corresponding to the consistent access is not queried by the L2 Cache, the inter-cluster cache frame listener controller queries the L2 Cache in a cluster other than the cluster where the L2 Cache is located. Operating data, responding to the consistent access after querying the operating data, and realizing inter-cluster Cache consistency with the assistance of the inter-cluster cache frame controller.

在接收一致性访问(如CPU发出的一致性访问)后,将首先到L1 Cache中查询所述一致性访问对应的操作数据;通常一份操作数据会包括多个副本;在CPU对应的L1 Cache中可能存储有所述操作数据的副本,也可能没有。当CPU在其对应的L1 Cache中查询到对应的操作数据后,直接响应所述一致性访问即可;如若在所述L1Cache中没有查找到则需要到L2Cache中去查找;若本簇内的L2 Cache中没有则到其他簇中去查询。After receiving consistent access (such as the consistent access issued by the CPU), the operation data corresponding to the consistent access will first be queried in the L1 Cache; usually an operation data will include multiple copies; in the L1 Cache corresponding to the CPU There may or may not be a copy of the operational data stored in the . When the CPU finds the corresponding operation data in its corresponding L1 Cache, it can directly respond to the consistent access; if it is not found in the L1Cache, it needs to search in the L2Cache; if the L2 in the cluster If there is no cache, go to other clusters to query.

具体如,当操作数据B在Cluster 0中存储有两个副本,分别是位于CPU 0对应的L1Cache中及其所在簇的L2 Cache中,在执行一致性访问时,查询到CPU 0对应的L1 Cache中存储有所述操作数据B,对所述操作数据B进行写操 作,同时在所述簇内缓存帧听控制器的协助下,使L2 Cache无效掉其存储的操作数据。具体的如何无效可以采用Cache的控制器通过将Tag RAM中的存储地址的状态信息由有效状态更新为无效状态。这样就实现簇内的Cache一致性。所述Cache一致性为不同的Cache存储的同一操作数据的信息内容是一致的。Specifically, when the operation data B has two copies stored in Cluster 0, which are located in the L1 Cache corresponding to CPU 0 and the L2 Cache of the cluster where it is located, when performing consistent access, the L1 Cache corresponding to CPU 0 is queried. The operation data B is stored in the L2 Cache, and the operation data B is written, and at the same time, with the assistance of the intra-cluster cache frame controller, the L2 Cache invalidates the stored operation data. Specifically, how to invalidate can use the controller of the Cache to update the state information of the storage address in the Tag RAM from a valid state to an invalid state. This achieves cache consistency within the cluster. The cache consistency means that the information content of the same operation data stored in different caches is consistent.

当操作数据B在Cluster 0及Cluster N中各存储一个副本时,具体是存储在Cluster 0中CPU 0对应的L1 Cache中及Cluster N对应的CPU N对应的L1Cache中。查询到Cluster 0中CPU 0对应的L1 Cache中存储有所述操作数据B,对所述操作数据B进行写操作,同时在所述簇内缓存帧听控制器及所述簇间缓存侦听控制器的协助下,使Cluster N中CPU N对应的L1Cache无效掉其存储的操作数据。具体的如何无效可以采用Cache的控制器通过将Tag RAM中的存储地址进行无效,具体如擦除所述地址等类似的操作。这样就实现簇间的Cache一致性。When the operation data B stores one copy in each of Cluster 0 and Cluster N, it is specifically stored in the L1 Cache corresponding to CPU 0 in Cluster 0 and in the L1 Cache corresponding to CPU N in Cluster N. Querying that the operation data B is stored in the L1 Cache corresponding to CPU 0 in Cluster 0, performing a write operation on the operation data B, and simultaneously caching the frame listener controller and the inter-cluster cache listener control in the cluster With the assistance of the controller, the L1Cache corresponding to CPU N in Cluster N is invalidated to delete the operation data stored therein. Specifically, how to invalidate can use the controller of the Cache to invalidate the storage address in the Tag RAM, such as erasing the address and similar operations. This achieves cache consistency between clusters.

再比如,当操作数据B在Cluster 0中存储有两个副本,分别是位于CPU 0对应的L1Cache中和CPU N对应的L1 Cache中,其中,所述N为不小1的整数;在执行一致性访问时,查询到CPU 0对应的L1 Cache中存储有所述操作数据B,对所述操作数据B进行写操作,同时在所述簇内缓存帧听控制器的协助下,使所述CPU N对应的L1 Cache无效掉其存储的操作数据。具体的如何无效可以采用Cache的控制器通过将Tag RAM中的存储地址进行无效,具体如擦除所述地址等类似的操作。这样就实现簇内的Cache一致性。For another example, when the operation data B has two copies stored in Cluster 0, they are respectively located in the L1 Cache corresponding to CPU 0 and the L1 Cache corresponding to CPU N, where N is an integer not less than 1; During a permanent access, it is found that the operation data B is stored in the L1 Cache corresponding to CPU 0, and the operation data B is written, and at the same time, with the assistance of the cache frame controller in the cluster, the CPU The L1 Cache corresponding to N invalidates the stored operation data. Specifically, how to invalidate can use the controller of the Cache to invalidate the storage address in the Tag RAM, such as erasing the address and similar operations. This achieves cache consistency within the cluster.

同样的所述二级Cache在其自身查找到操作数据B,响应所述写请求时,同样的将在所述簇间缓存侦听控制器的协助下,使其他簇内的操作数据B无效。The same secondary cache finds the operation data B by itself, and when responding to the write request, it will also invalidate the operation data B in other clusters with the assistance of the inter-cluster cache snooping controller.

在本实施例中如何触发Cache无效其内部的操作数据的副本,可以参见现有技术在此就不再一一详细阐述了。In this embodiment, how to trigger the Cache to invalidate the copy of its internal operation data can be referred to the prior art and will not be elaborated here one by one.

所述写访问包括对操作数据进行删除、在所述操作数据中添加新的内容以及对所述操作数据中的内容进行替换修改的操作。The write access includes operations of deleting operation data, adding new content in the operation data, and replacing and modifying content in the operation data.

本实施出所述的系统在进行一致性访问响应时,首先由一级Cache进行查询处理,并依据查询结果进行响应,再有二级Cache进行查询和响应,在不修 改现有技术中保持簇内Cache一致性的基础上,实现了簇间的Cache一致性,与现有技术的兼容性强。When the system described in this implementation performs consistent access response, the first-level Cache performs query processing, and responds according to the query results, and then the second-level Cache performs query and response, and maintains the cluster without modifying the existing technology. On the basis of intra-cache consistency, inter-cluster cache consistency is realized, which is highly compatible with existing technologies.

当所述一致性访问为读访问时,所述一级Cache,具体用于在查询到所述操作数据后对所述操作数据执行读操作;When the consistent access is a read access, the first-level Cache is specifically used to perform a read operation on the operation data after the operation data is queried;

当所述一致性访问为写访问时,所述二级Cache,具体用于在查询到所述操作数据之后对所述操作数据进行读操作。When the consistent access is a write access, the secondary cache is specifically configured to perform a read operation on the operation data after the operation data is queried.

由于一致性访问为读访问,不会对一致性访问对应的操作数据进行修改、添加以及删除等动作,不会产生新的操作数据,从而无需无效操作数据的动作。Since the consistent access is a read access, the operation data corresponding to the consistent access will not be modified, added, or deleted, and no new operation data will be generated, so there is no need to invalidate the operation data.

在本实施例中可以通过能够实现一致性访问的L2 Cache、簇间缓存侦听控制器的引入,实现了系统中簇与簇之间Cache的一致性,避免了簇与簇之间数据不一致导致的数据处理错误的几率。In this embodiment, the L2 Cache that can realize consistent access and the introduction of the inter-cluster cache interception controller can realize the consistency of the Cache between the clusters in the system, and avoid the data inconsistency between the clusters. Chances of data processing errors.

实施例三:Embodiment three:

如图4所示,本实施例提供一种L2 Cache一致性实现方法,所述方法包括:As shown in Figure 4, this embodiment provides a method for implementing L2 Cache consistency, the method comprising:

步骤S110:接收一致性访问指示信号及访问,当接收到所述一致性访问指示信号时确定所述访问为一致性访问;Step S110: receiving a consistent access indication signal and an access, and determining that the access is a consistent access when the consistent access indication signal is received;

步骤S120:依据一致性访问指示信号及所述访问对所述访问进行分类,依据分类结果形成指示信息;Step S120: Classify the access according to the consistent access indication signal and the access, and form indication information according to the classification result;

步骤S130:依据所述指示信息查询操作数据,在查询到所述操作数据后依据所述指示信息执行一致性操作;在未查询所述操作数据时,依据所述指示信息向外设输出所述一致性访问指示信号及所述一致性访问;Step S130: Query the operation data according to the instruction information, and perform a consistent operation according to the instruction information after the operation data is queried; when the operation data is not queried, output the operation data to the peripheral device according to the instruction information consistent access indication signal and the consistent access;

步骤S140:当所述访问需要将所述操作数据输出到外部存储器时,则在查询到所述操作数据后,依据所述指示信息将所述操作数据输出到外部存储器。Step S140: When the access needs to output the operation data to the external memory, output the operation data to the external memory according to the instruction information after the operation data is queried.

本实施例所述的方法应用于实施例一中所述的L2 Cache中,具体提供了L2 Cache如响应一致性访问的实现方法,具有实现简便的优点。The method described in this embodiment is applied to the L2 Cache described in Embodiment 1, and specifically provides an implementation method of the L2 Cache such as response consistent access, which has the advantage of simple implementation.

优选地,Preferably,

所述一致性访问指示信号包括一致性访问类型指示信号;The consistent access indication signal includes a consistent access type indication signal;

所述步骤S110包括:接收所述一致性访问类型指示信号,依据所述一致性 类型指示信号确定所述访问为一致性访问。此处进一步限定了如何确定所述访问为一致性访问。The step S110 includes: receiving the consistent access type indication signal, and determining that the access is a consistent access according to the consistent type indication signal. How to determine that the access is a consistent access is further defined here.

优选地,所述L2 Cache包括Slave接口;所述Slave接口包括第一读地址通道、第一读数据通道及第一写地址通道;Preferably, the L2 Cache includes a Slave interface; the Slave interface includes a first read address channel, a first read data channel and a first write address channel;

所述一致性访问指示信号还包括所述一致性访问全局信号;The consistent access indication signal also includes the consistent access global signal;

所述步骤S110包括:The step S110 includes:

接收所述一致性访问全局信号,依据所述一致性访问全局信号驱动形成Slave接口控制信号,依据所述Slave接口控制信号驱动所述Slave接口内各个所述通道接收所述一致性访问;receiving the consistent access global signal, driving to form a slave interface control signal according to the consistent access global signal, and driving each of the channels in the slave interface to receive the consistent access according to the slave interface control signal;

通过所述第一读地址通道接收所述一致性访问类型指示信号;receiving the consistent access type indication signal through the first read address channel;

所述步骤S110还包括以下至少其中之一:The step S110 also includes at least one of the following:

通过所述第一读地址通道接收所述一致性访问类型指示信号;receiving the consistent access type indication signal through the first read address channel;

通过所述第一读数据通道依据所述查询结果向请求源发送读响应信号;sending a read response signal to the request source through the first read data channel according to the query result;

通过所述第一写地址通道接收一致性访问的外部存储器更新信号。An external memory update signal for consistent access is received through the first write address channel.

本实施例进一步限定了所述slave中各个通道是如何响应所述一致性访问的。所述Slave接口为5通道的接口,在具体的实现过程中,所述Slave接口还包括第一写响应通道及第一写数据通道。This embodiment further defines how each channel in the slave responds to the consistent access. The Slave interface is a 5-channel interface. In a specific implementation process, the Slave interface also includes a first write response channel and a first write data channel.

优选地,所述一致性访问全局信号包括所述一致性访问的操作数据在其他Cache中的查询状态以及所述一致性访问的请求源。Preferably, the coherent access global signal includes the query status of the coherent access operation data in other caches and the coherent access request source.

所述步骤S110包括接收的所述一致性访问全局信号,所述步骤S120中包括依据所述一致性访问全局信号进行分类,形成指示信息。The step S110 includes receiving the consistent access global signal, and the step S120 includes classifying the consistent access global signal to form indication information.

优选地,所述L2 Cache包括Master接口;所述Master接口包括第二读地址通道、第二读数据通道及第二写地址通道;Preferably, the L2 Cache includes a Master interface; the Master interface includes a second read address channel, a second read data channel, and a second write address channel;

所述步骤S130具体包括:通过所述第二读地址通道在所述RAM中未查询所述操作数据时,输出所述一致性访问指示信号;The step S130 specifically includes: outputting the consistent access indication signal when the operation data is not queried in the RAM through the second read address channel;

所述方法还包括:The method also includes:

通过所述第二读数据通道接收读响应信号及侦听响应信号;receiving a read response signal and a listen response signal through the second read data channel;

通过所述第二写地址通道输出将所述操作数据写到外部存储器并无效Cache内所述操作数据的指示信号。Outputting an indication signal for writing the operation data to the external memory and invalidating the operation data in the Cache through the second write address channel.

所述读响应信号通常为来自下游处理结构的信号;所述下游处理结构如memory等。所述侦听响应信号来自实施例二中所述的簇间侦听控制器或簇内侦听控制器等。The read response signal is usually a signal from a downstream processing structure; the downstream processing structure is such as memory and the like. The intercept response signal comes from the inter-cluster intercept controller or the intra-cluster intercept controller described in the second embodiment.

优选地,在步骤S110中接收到所述一致性访问指示信号后,所述方法还包括:Preferably, after receiving the consistent access indication signal in step S110, the method further includes:

存储访问类型、在其他Cache中的查询状态、在L2 Cache中的查询状态及所述一致性访问的请求源,用于为查询所述操作数据及实现Cache一致性提供依据信息。Store access type, query status in other Cache, query status in L2 Cache and the request source of the consistent access, which is used to provide basis information for querying the operation data and realizing Cache consistency.

所述访问类型、在其他Cache中的查询状态、在L2 Cache中的查询状态及所述一致性访问的请求源都可以是访问及所述一致性访问指示信号中获得的。在具体的实现过程中,所述Slave接口解析所述访问及所述一致性访问指示信号,并将所述信息存储在buffer中,便于所述控制器根据所述信息执行所述一致性访问操作。The access type, the query status in other Cache, the query status in the L2 Cache, and the request source of the consistent access may all be obtained from the access and the consistent access indication signal. In a specific implementation process, the Slave interface parses the access and the consistent access indication signal, and stores the information in a buffer, so that the controller can perform the consistent access operation according to the information .

进一步地,所述方法还包括:Further, the method also includes:

在L2 Cache中未查询到所述操作数据时,形成并存储无效失败信息,依据所述无效失败信息通知向所述请求源。When the operation data is not found in the L2 Cache, the invalid failure information is formed and stored, and the request source is notified according to the invalid failure information.

本实施例还进一步规定了L2 Cache如何向请求源反馈存储无效失败信息,以便于所述请求源进行后续处理操作。This embodiment further specifies how the L2 Cache feeds back storage invalidation failure information to the request source, so that the request source can perform subsequent processing operations.

优选地,所述Slave接口包括控制器;所述RAM包括Data RAM以及Tag RAM;所述Data RAM用于存储操作数据;所述Data RAM包括若干个所述cache存储单元;所述Tag RAM用于存储所述操作数据的存储地址及所述cache存储单元的状态信息;Preferably, the Slave interface includes a controller; the RAM includes Data RAM and Tag RAM; the Data RAM is used to store operation data; the Data RAM includes several cache storage units; the Tag RAM is used for storing the storage address of the operation data and the state information of the cache storage unit;

所述步骤S130包括以下至少其中之一:The step S130 includes at least one of the following:

通过所述控制器,依据所述指示信息,读取Tag RAM并依据Tag RAM的结果查询更新所述状态信息,读取Tag RAM并依据Tag RAM的结果查询所述 Data RAM且将查询的操作数据返回给处理器及更新所述状态信息,读取Tag RAM并依据Tag RAM的结果查询所述DataRAM且将查询的操作数据返回给处理器,读取Tag RAM并依据Tag RAM的结果查询所述DataRAM且将查询的操作数据返回给处理器并将所述操作数据写到外部存储器,读取Tag RAM,及读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据写到外部存储器及更新所述状态信息。Through the controller, according to the instruction information, read the Tag RAM and query and update the state information according to the result of the Tag RAM, read the Tag RAM and query the Data RAM according to the result of the Tag RAM and query the operation data Return to the processor and update the state information, read the Tag RAM and query the DataRAM according to the result of the Tag RAM and return the query operation data to the processor, read the Tag RAM and query the DataRAM according to the result of the Tag RAM and return the query operation data to the processor and write the operation data to the external memory, read the Tag RAM, and read the Tag RAM and query the Data RAM according to the result of the Tag RAM and write the query operation data to external memory and update the state information.

在本实施例中所述控制器相对于现有的L2 Cache新增了控制器,具体提供如何所述L2 Cache实现一致性访问的控制逻辑,具有实现简单的优点。Compared with the existing L2 Cache, the controller in this embodiment adds a new controller, and specifically provides control logic for how the L2 Cache implements consistent access, which has the advantage of simple implementation.

优选地,Preferably,

所述步骤S140包括:The step S140 includes:

依据所述指示信息,在所述Data RAM查询到所述操作数据且所述操作数据的状态为dirty时,将所述操作数据通过所述master接口输出到外部存储器。According to the indication information, when the Data RAM finds the operation data and the state of the operation data is dirty, output the operation data to the external memory through the master interface.

具体地,所述控制器包括:Tag Access fifo队列,用于在查询到所述操作数据后,存储是否要所述Tag RAM的更新信息及访问所述Data RAM的指示;Tag Write fifo队列,用于在查询到所述操作数据后且确定需要更新所述Tag RAM时,存储需要更新所述Tag RAM的操作信息;Data read fifo队列,用于在查询到所述操作数据后,存储需要更新所述TagRAM且读取Data RAM的操作信息;控制单元,用于依据所述Tag Access fifo队列、TagWrite fifo队列及Data read fifo队列执行所述一致性操作。Specifically, the controller includes: a Tag Access fifo queue, used to store the update information of the Tag RAM and an indication of access to the Data RAM after the operation data is queried; a Tag Write fifo queue, used After the operation data is queried and it is determined that the Tag RAM needs to be updated, the operation information of the Tag RAM that needs to be updated is stored; the Data read fifo queue is used to store the operation information that needs to be updated after the operation data is queried. The TagRAM and read the operation information of the Data RAM; the control unit is used to execute the consistency operation according to the Tag Access fifo queue, the TagWrite fifo queue and the Data read fifo queue.

所述控制器具体利用上述先进先出的fifo来控制所述L2 Cache实现一致性访问。The controller specifically utilizes the above-mentioned first-in-first-out fifo to control the L2 Cache to implement consistent access.

进一步地,所述方法还包括:Further, the method also includes:

通过控制单元进行访问冲突检测,在检测到冲突访问时,采用阻塞机制对访问冲突进行处理。所述冲突访问包括如对同一cache存储单元的读操作和写操作Access conflict detection is performed by the control unit, and when conflict access is detected, a blocking mechanism is used to process the access conflict. The conflicting access includes, for example, a read operation and a write operation to the same cache storage unit

本实施例所述方法是在实施例一中所述的L2 Cache的基础上提出的方法,能够实现L2 Cache与其他Cache的Cache一致性,包括簇内Cache一致性和簇 间Cache的一致性。The method described in this embodiment is a method proposed on the basis of the L2 Cache described in Embodiment 1, which can realize the Cache consistency between the L2 Cache and other Cache, including intra-cluster Cache consistency and inter-cluster Cache consistency.

在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or May be integrated into another system, or some features may be ignored, or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms of.

上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units; Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention can be integrated into one processing module, or each unit can be used as a single unit, or two or more units can be integrated into one unit; the above-mentioned integration The unit can be realized in the form of hardware or in the form of hardware plus software functional unit.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the Including the steps of the foregoing method embodiments; and the foregoing storage medium includes: a removable storage device, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, etc. A medium on which program code can be stored.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (24)

1.一种二级独立高速缓存器L2 Cache,其特征在于,1. A secondary independent high-speed register L2 Cache, it is characterized in that, 所述L2 Cache包括Slave接口、控制器、Master接口以及RAM;Described L2 Cache comprises Slave interface, controller, Master interface and RAM; 所述Slave接口,用于接收一致性访问指示信号及访问,所述访问包括一致性访问和非一致性访问,当接收到所述一致性访问指示信号时确定所述访问为一致性访问,及依据一致性访问指示信号及所述访问对所述访问进行分类,依据分类结果形成指示信息;The Slave interface is used to receive a consistent access indication signal and access, the access includes consistent access and non-uniform access, and when the consistent access indication signal is received, it is determined that the access is a consistent access, and Classify the access according to the consistent access indication signal and the access, and form indication information according to the classification result; 所述控制器,用于接收所述指示信息,依据所述指示信息在所述RAM中查询操作数据,在所述RAM中查询到所述操作数据后依据所述指示信息执行一致性操作;The controller is configured to receive the indication information, query operation data in the RAM according to the indication information, and perform a consistent operation according to the indication information after the operation data is queried in the RAM; 所述Master接口,用于在所述RAM中未查询所述操作数据时,依据所述指示信息向外设输出所述一致性访问指示信号及所述一致性访问,及在查询到所述操作数据后依据所述指示信息将所述操作数据输出到外部存储器。The Master interface is used to output the consistent access indication signal and the consistent access to peripherals according to the indication information when the operation data is not queried in the RAM, and when the operation data is queried, Then output the operation data to the external memory according to the indication information. 2.根据权利要求1所述的L2 Cache,其特征在于,2. The L2 Cache according to claim 1, characterized in that, 所述一致性访问指示信号包括一致性访问类型指示信号;The consistent access indication signal includes a consistent access type indication signal; 所述Slave接口,用于接收所述一致性访问类型指示信号,依据所述一致性访问类型指示信号确定所述访问为一致性访问。The slave interface is configured to receive the consistent access type indication signal, and determine that the access is consistent access according to the consistent access type indication signal. 3.根据权利要求2所述的L2 Cache,其特征在于,3. The L2 Cache according to claim 2, characterized in that, 所述一致性访问指示信号还包括一致性访问全局信号;The consistent access indication signal also includes a consistent access global signal; 所述Slave接口包括第一读地址通道、第一读数据通道及第一写地址通道;The Slave interface includes a first read address channel, a first read data channel and a first write address channel; 所述Slave接口,用于接收所述一致性访问全局信号,依据所述一致性访问全局信号驱动形成Slave接口控制信号,依据所述Slave接口控制信号驱动所述Slave接口内各个所述通道接收所述一致性访问;The Slave interface is used to receive the consistent access global signal, drive and form a Slave interface control signal according to the consistent access global signal, and drive each of the channels in the Slave interface to receive the received signal according to the Slave interface control signal. consistent access described above; 所述第一读地址通道,用于接收所述一致性访问类型指示信号;The first read address channel is used to receive the consistent access type indication signal; 所述第一读数据通道,用于依据查询结果向请求源发送读响应信号;The first read data channel is used to send a read response signal to the request source according to the query result; 所述第一写地址通道,用于接收一致性访问的外部存储器更新信号。The first write address channel is used to receive an external memory update signal for consistent access. 4.根据权利要求3所述的L2 Cache,其特征在于,4. The L2 Cache according to claim 3, characterized in that, 所述一致性访问全局信号包括所述一致性访问的操作数据在其他Cache中的查询状态以及所述一致性访问的请求源。The coherent access global signal includes the query status of the coherent access operation data in other caches and the coherent access request source. 5.根据权利要求1所述的L2 Cache,其特征在于,5. The L2 Cache according to claim 1, characterized in that, 所述Master接口包括第二读地址通道、第二读数据通道及第二写地址通道;The Master interface includes a second read address channel, a second read data channel and a second write address channel; 所述第二读地址通道,用于在所述RAM中未查询所述操作数据时,输出所述一致性访问指示信号;The second read address channel is used to output the consistent access indication signal when the operation data is not queried in the RAM; 所述第二读数据通道,用于接收读响应信号及侦听响应信号;The second read data channel is used to receive a read response signal and listen to a response signal; 所述第二写地址通道,用于输出将所述操作数据写到外部存储器并无效Cache内所述操作数据的指示信号。The second write address channel is used to output an indication signal for writing the operation data to the external memory and invalidating the operation data in the Cache. 6.根据权利要求1所述的L2 Cache,其特征在于,6. The L2 Cache according to claim 1, characterized in that, 所述L2 Cache还包括:The L2 Cache also includes: 第一缓冲区,用于存储访问类型、在其他Cache中的查询状态、在所述L2Cache中的查询状态及所述一致性访问的请求源,用于为查询所述操作数据及实现Cache一致性提供依据信息。The first buffer is used to store the access type, the query status in other Cache, the query status in the L2Cache and the request source of the consistent access, and is used for querying the operation data and realizing Cache consistency Provide supporting information. 7.根据权利要求6所述的L2 Cache,其特征在于,7. The L2 Cache according to claim 6, characterized in that, 所述第一缓冲区,还用于存储无效失败信息,依据所述无效失败信息通知所述请求源。The first buffer is also used to store invalid failure information, and notify the request source according to the invalid failure information. 8.根据权利要求1所述的L2 Cache,其特征在于,8. The L2 Cache according to claim 1, characterized in that, 所述RAM包括Data RAM以及Tag RAM;所述Data RAM用于存储操作数据;所述Data RAM包括若干个cache存储单元;所述Tag RAM用于存储操作数据的存储地址及cache存储单元的状态信息;The RAM includes Data RAM and Tag RAM; the Data RAM is used to store operation data; the Data RAM includes several cache storage units; the Tag RAM is used to store the storage address of the operation data and the state information of the cache storage unit ; 所述控制器,具体用于依据所述指示信息,The controller is specifically configured to, according to the indication information, 读取Tag RAM并依据Tag RAM的结果查询更新所述Tag RAM,Read the Tag RAM and query and update the Tag RAM according to the result of the Tag RAM, or 读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器及更新所述Tag RAM,Reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor and updating the Tag RAM, or 读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器,Reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor, or 读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器并将所述操作数据写到外部存储器,reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor and writing the operation data to the external memory, or 读取Tag RAM,Read Tag RAM, or 读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据写到外部存储器及更新所述Tag RAM;Read the Tag RAM and query the Data RAM according to the result of the Tag RAM and write the query operation data to the external memory and update the Tag RAM; 其中,更新所述Tag RAM包括更新操作地址及所述状态信息的至少其中之一。Wherein, updating the Tag RAM includes updating at least one of an operation address and the status information. 9.根据权利要求8所述的L2 Cache,其特征在于,9. The L2 Cache according to claim 8, characterized in that, 所述控制器,还具体用于依据所述指示信息,The controller is further specifically configured to, according to the indication information, 在所述Data RAM查询到所述操作数据且所述操作数据的状态为dirty时,将所述操作数据通过所述Master接口输出到外部存储器。When the Data RAM finds the operation data and the state of the operation data is dirty, output the operation data to the external memory through the Master interface. 10.根据权利要求8所述的L2 Cache,其特征在于,10. The L2 Cache according to claim 8, characterized in that, 所述控制器包括:The controller includes: Tag Access fifo队列,用于在查询到所述操作数据后,存储是否要更新所述Tag RAM的信息及访问所述Data RAM的指示;The Tag Access fifo queue is used to store information about whether to update the Tag RAM and an instruction to access the Data RAM after the operation data is queried; Tag Write fifo队列,用于在查询到所述操作数据后且确定需要更新所述Tag RAM时,存储需要更新所述Tag RAM的操作信息;The Tag Write fifo queue is used to store the operation information that needs to be updated in the Tag RAM when the operation data is queried and it is determined that the Tag RAM needs to be updated; Data read fifo队列,用于在查询到所述操作数据后,存储需要更新所述Tag RAM且读取Data RAM的操作信息;Data read fifo queue, used for storing operation information that needs to update the Tag RAM and read the Data RAM after the operation data is queried; 控制单元,用于依据所述Tag Access fifo队列、Tag Write fifo队列及Data readfifo队列执行所述一致性操作。A control unit, configured to execute the consistency operation according to the Tag Access fifo queue, Tag Write fifo queue and Data readfifo queue. 11.根据权利要求1所述的L2 Cache,其特征在于,11. The L2 Cache according to claim 1, characterized in that, 所述控制器包括控制单元;The controller includes a control unit; 所述控制单元,用于进行访问冲突检测,在检测到冲突访问时,采用阻塞机制对访问冲突进行处理。The control unit is configured to perform access conflict detection, and when a conflict access is detected, a blocking mechanism is used to process the access conflict. 12.一种数据处理系统,其特征在于,12. A data processing system, characterized in that, 所述系统包括至少一个簇;The system includes at least one cluster; 所述簇包括至少两个处理器、簇内帧听控制器以及上述权利要求1至9任一项所述的L2Cache;其中,每一个所述处理器都集成设置有一个L1 Cache;The cluster includes at least two processors, an intra-cluster frame listener controller, and the L2Cache according to any one of claims 1 to 9; wherein, each of the processors is integrated with an L1 Cache; 所述簇内帧听控制器,分别与所述L1 Cache及所述L2 Cache相连,用于侦听一致性访问,协助任一两个所述L1 Cache以及所述L1 Cache与所述L2Cache之间实现Cache一致性。The intra-cluster frame monitoring controller is connected to the L1 Cache and the L2 Cache respectively, and is used to monitor consistent access and assist any two of the L1 Cache and between the L1 Cache and the L2 Cache Achieve Cache consistency. 13.根据权利要求12所述的系统,其特征在于,13. The system of claim 12, wherein: 所述系统还包括簇间帧听控制器;The system also includes an inter-cluster frame listening controller; 所述簇间帧听控制器,与所述L2 Cache相连用于侦听一致性访问,协助实现簇之间的Cache一致性。The inter-cluster frame monitoring controller is connected to the L2 Cache for monitoring consistent access, and assists in realizing Cache consistency between clusters. 14.根据权利要求13所述的系统,其特征在于,14. The system of claim 13, wherein: 所L1 Cache,具体用于当接收一致性访问在所述L1 Cache中查询所述一致性访问对应的操作数据;当所述L1 Cache查询到所述操作数据时,响应所述一致性访问,同时在所述簇内缓存帧听控制器的协助下实现所述L1 Cache所在簇的Cache一致性,并在所述簇间缓存帧听控制器的协助下实现簇间的Cache的一致性;The L1 Cache is specifically used to query the operation data corresponding to the consistency access in the L1 Cache when receiving the consistency access; when the L1 Cache queries the operation data, respond to the consistency access, and at the same time Realize the Cache consistency of the cluster where the L1 Cache is located with the assistance of the intra-cluster cache frame controller, and realize the inter-cluster Cache consistency with the assistance of the inter-cluster cache frame controller; 所述簇内缓存帧听控制器,用于在本簇内所述L1 Cache中未查询到所述操作数据时,向所述L2 Cache发送所述一致性访问;The intra-cluster cache frame controller is configured to send the consistent access to the L2 Cache when the operation data is not found in the L1 Cache in the cluster; 所述L2 Cache用于在本簇所述L1 Cache中未查询到一致性访问对应的操作数据时,接收所述一致性访问及其他簇发送的一致性访问,查询所述L2 Cache中是否存储有所述操作数据,当所述L2 Cache未查询到所述一致性访问对应的操作数据时,通过所述簇间缓存帧听控制器到所述L2 Cache所在簇以外的其他簇中查询所述操作数据,在查询到所述操作数据后响应所述一致性访问,并在所述簇间缓存帧听控制器协助下实现簇间的Cache一致性。The L2 Cache is used to receive the consistent access and the consistent access sent by other clusters when the operation data corresponding to the consistent access is not queried in the L1 Cache of the cluster, and query whether the L2 Cache stores any For the operation data, when the L2 Cache does not query the operation data corresponding to the consistent access, query the operation data in a cluster other than the cluster where the L2 Cache is located through the inter-cluster cache frame controller data, responding to the consistent access after querying the operation data, and realizing inter-cluster Cache consistency with the assistance of the inter-cluster cache frame controller. 15.一种L2 Cache一致性实现方法,其特征在于,所述方法包括:15. A method for implementing L2 Cache consistency, characterized in that said method comprises: 接收一致性访问指示信号及访问,所述访问包括一致性访问和非一致性访问,当接收到所述一致性访问指示信号时确定所述访问为一致性访问;receiving a consistent access indication signal and access, the access including consistent access and non-uniform access, and determining that the access is a consistent access when the consistent access indication signal is received; 依据一致性访问指示信号及所述访问对所述访问进行分类,依据分类结果形成指示信息;Classify the access according to the consistent access indication signal and the access, and form indication information according to the classification result; 依据所述指示信息查询操作数据,在查询到所述操作数据后依据所述指示信息执行一致性操作;在未查询所述操作数据时,依据所述指示信息向外设输出所述一致性访问指示信号及所述一致性访问;Querying the operation data according to the instruction information, and performing a consistent operation according to the instruction information after the operation data is queried; when the operation data is not queried, output the consistent access to the peripheral device according to the instruction information indication signal and said coherent access; 当所述访问需要将所述操作数据输出到外部存储器时,则在查询到所述操作数据后,依据所述指示信息将所述操作数据输出到外部存储器。When the access needs to output the operation data to the external memory, output the operation data to the external memory according to the indication information after the operation data is queried. 16.根据权利要求15所述的方法,其特征在于,16. The method of claim 15, wherein, 所述一致性访问指示信号包括一致性访问类型指示信号;The consistent access indication signal includes a consistent access type indication signal; 所述接收一致性访问指示信号及访问,当接收到所述一致性访问指示信号时确定所述访问为一致性访问,包括:The receiving consistent access indication signal and access, determining that the access is consistent access when receiving the consistent access indication signal, includes: 接收所述一致性访问类型指示信号,依据所述一致性访问类型指示信号确定所述访问为一致性访问。receiving the consistent access type indication signal, and determining that the access is a consistent access according to the consistent access type indication signal. 17.根据权利要求15所述的方法,其特征在于,17. The method of claim 15, wherein, 所述L2 Cache包括Slave接口;所述Slave接口包括第一读地址通道、第一读数据通道及第一写地址通道;The L2 Cache includes a Slave interface; the Slave interface includes a first read address channel, a first read data channel and a first write address channel; 所述一致性访问指示信号还包括一致性访问全局信号;The consistent access indication signal also includes a consistent access global signal; 所述接收一致性访问指示信号及访问,当接收到所述一致性访问指示信号时确定所述访问为一致性访问,包括:The receiving consistent access indication signal and access, determining that the access is consistent access when receiving the consistent access indication signal, includes: 接收所述一致性访问全局信号,依据所述一致性访问全局信号驱动形成Slave接口控制信号,依据所述Slave接口控制信号驱动所述Slave接口内各个所述通道接收所述一致性访问;receiving the consistent access global signal, driving to form a slave interface control signal according to the consistent access global signal, and driving each of the channels in the slave interface to receive the consistent access according to the slave interface control signal; 通过所述第一读地址通道接收一致性访问类型指示信号;receiving a consistent access type indication signal through the first read address channel; 所述接收一致性访问指示信号及访问,当接收到所述一致性访问指示信号时确定所述访问为一致性访问,还包括以下至少其中之一:The receiving consistent access indication signal and access, determining that the access is consistent access when receiving the consistent access indication signal, also includes at least one of the following: 通过所述第一读地址通道接收所述一致性访问类型指示信号;receiving the consistent access type indication signal through the first read address channel; 通过所述第一读数据通道依据查询结果向请求源发送读响应信号;sending a read response signal to the request source through the first read data channel according to the query result; 通过所述第一写地址通道接收一致性访问的外部存储器更新信号。An external memory update signal for consistent access is received through the first write address channel. 18.根据权利要求17所述的方法,其特征在于,18. The method of claim 17, wherein, 所述一致性访问全局信号包括所述一致性访问的操作数据在其他Cache中的查询状态以及所述一致性访问的请求源。The coherent access global signal includes the query status of the coherent access operation data in other caches and the coherent access request source. 19.根据权利要求15所述的方法,其特征在于,19. The method of claim 15, wherein, 所述L2 Cache包括Master接口;所述Master接口包括第二读地址通道、第二读数据通道及第二写地址通道;The L2 Cache includes a Master interface; the Master interface includes a second read address channel, a second read data channel, and a second write address channel; 所述在未查询所述操作数据时,依据所述指示信息向外设输出所述一致性访问指示信号及所述一致性访问,包括:The step of outputting the consistent access indication signal and the consistent access to peripherals according to the indication information when the operation data is not inquired includes: 通过所述第二读地址通道在RAM中未查询所述操作数据时,输出所述一致性访问指示信号;Outputting the consistent access indication signal when the operation data is not queried in the RAM through the second read address channel; 所述方法还包括:The method also includes: 通过所述第二读数据通道接收读响应信号及侦听响应信号;receiving a read response signal and a listen response signal through the second read data channel; 通过所述第二写地址通道输出将所述操作数据写到外部存储器并无效Cache内所述操作数据的指示信号。Outputting an indication signal for writing the operation data to the external memory and invalidating the operation data in the Cache through the second write address channel. 20.根据权利要求15所述的方法,其特征在于,20. The method of claim 15, wherein, 在接收到所述一致性访问指示信号后,所述方法还包括:After receiving the consistent access indication signal, the method further includes: 存储访问类型、在其他Cache中的查询状态、在L2 Cache中的查询状态及所述一致性访问的请求源,用于为查询所述操作数据及实现Cache一致性提供依据信息。Store access type, query status in other Cache, query status in L2 Cache and the request source of the consistent access, which is used to provide basis information for querying the operation data and realizing Cache consistency. 21.根据权利要求20所述的方法,其特征在于,21. The method of claim 20, wherein, 所述方法还包括:The method also includes: 在L2 Cache中未查询到所述操作数据时,形成并存储无效失败信息,依据所述无效失败信息通知所述请求源。When the operation data is not found in the L2 Cache, the invalid failure information is formed and stored, and the request source is notified according to the invalid failure information. 22.根据权利要求15所述的方法,其特征在于,22. The method of claim 15, wherein, Slave接口包括控制器;RAM包括Data RAM以及Tag RAM;所述Data RAM用于存储操作数据;所述Tag RAM用于存储所述操作数据的存储地址及cache存储单元的状态信息;Slave interface comprises controller; RAM comprises Data RAM and Tag RAM; Described Data RAM is used for storing operation data; Described Tag RAM is used for storing the storage address of described operation data and the state information of cache storage unit; 所述依据所述指示信息查询操作数据,在查询到所述操作数据后依据所述指示信息执行一致性操作包括以下至少其中之一:The querying of the operation data according to the instruction information, and performing a consistent operation according to the instruction information after querying the operation data includes at least one of the following: 通过所述控制器,依据所述指示信息,读取Tag RAM并依据Tag RAM的结果查询更新所述状态信息;Through the controller, read the Tag RAM according to the instruction information, and query and update the state information according to the result of the Tag RAM; 读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器及更新所述状态信息;Reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor and updating the state information; 读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器;Read the Tag RAM and query the Data RAM according to the result of the Tag RAM and return the query operation data to the processor; 读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据返回给处理器并将所述操作数据写到外部存储器;Reading the Tag RAM and querying the Data RAM according to the result of the Tag RAM and returning the query operation data to the processor and writing the operation data to the external memory; 读取Tag RAM;及Read Tag RAM; and 读取Tag RAM并依据Tag RAM的结果查询所述Data RAM且将查询的操作数据写到外部存储器及更新所述状态信息。Read the Tag RAM and query the Data RAM according to the result of the Tag RAM and write the query operation data to the external memory and update the state information. 23.根据权利要求22所述的方法,其特征在于,23. The method of claim 22, wherein, 所述当所述访问需要将所述操作数据输出到外部存储器时,则在查询到所述操作数据后,依据所述指示信息将所述操作数据输出到外部存储器,包括:When the access needs to output the operation data to the external memory, output the operation data to the external memory according to the instruction information after querying the operation data, including: 依据所述指示信息,在所述Data RAM查询到所述操作数据且所述操作数据的状态为dirty时,将所述操作数据通过Master接口输出到外部存储器。According to the indication information, when the Data RAM finds the operation data and the state of the operation data is dirty, output the operation data to the external memory through the Master interface. 24.根据权利要求15所述的方法,其特征在于,24. The method of claim 15, wherein, 所述方法还包括:The method also includes: 通过控制单元进行访问冲突检测,在检测到冲突访问时,采用阻塞机制对访问冲突进行处理。Access conflict detection is performed by the control unit, and when conflict access is detected, a blocking mechanism is used to process the access conflict.
CN201410448635.8A 2014-09-04 2014-09-04 L2 Cache and its consistency implementation method and data processing system Active CN105468540B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410448635.8A CN105468540B (en) 2014-09-04 2014-09-04 L2 Cache and its consistency implementation method and data processing system
PCT/CN2015/073046 WO2016033949A1 (en) 2014-09-04 2015-02-13 L2 cache and implementation method of consistency thereof, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410448635.8A CN105468540B (en) 2014-09-04 2014-09-04 L2 Cache and its consistency implementation method and data processing system

Publications (2)

Publication Number Publication Date
CN105468540A CN105468540A (en) 2016-04-06
CN105468540B true CN105468540B (en) 2019-11-15

Family

ID=55439078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410448635.8A Active CN105468540B (en) 2014-09-04 2014-09-04 L2 Cache and its consistency implementation method and data processing system

Country Status (2)

Country Link
CN (1) CN105468540B (en)
WO (1) WO2016033949A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083548B (en) * 2018-01-26 2023-01-13 华为技术有限公司 Data processing method and related network element, equipment and system
CN112395244B (en) * 2019-08-16 2023-04-28 上海寒武纪信息科技有限公司 Processor access device and method
CN118939595A (en) * 2024-09-29 2024-11-12 芯来智融半导体科技(上海)有限公司 Multi-core consistent ICB bus transmission method, system, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354682A (en) * 2008-09-12 2009-01-28 中国科学院计算技术研究所 A device and method for solving multiprocessor access directory conflicts
CN101430664A (en) * 2008-09-12 2009-05-13 中国科学院计算技术研究所 Multiprocessor system and Cache consistency message transmission method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8996810B2 (en) * 2012-12-10 2015-03-31 Facebook, Inc. System and method of detecting cache inconsistencies

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354682A (en) * 2008-09-12 2009-01-28 中国科学院计算技术研究所 A device and method for solving multiprocessor access directory conflicts
CN101430664A (en) * 2008-09-12 2009-05-13 中国科学院计算技术研究所 Multiprocessor system and Cache consistency message transmission method

Also Published As

Publication number Publication date
WO2016033949A1 (en) 2016-03-10
CN105468540A (en) 2016-04-06

Similar Documents

Publication Publication Date Title
KR100465583B1 (en) Non-uniform memory access(numa) data processing system that speculatively forwards a read request to a remote processing node and communication method in the system
US9323673B2 (en) Hierarchical cache structure and handling thereof
US9170946B2 (en) Directory cache supporting non-atomic input/output operations
US9208091B2 (en) Coherent attached processor proxy having hybrid directory
CN102567255B (en) Have and monitor the invalid data handling system of request selecting and be used for its method
US12197331B2 (en) Hardware coherence signaling protocol
CN105095254B (en) A method and device for realizing data consistency
US20140250276A1 (en) Selection of post-request action based on combined response and input from the request source
US8423736B2 (en) Maintaining cache coherence in a multi-node, symmetric multiprocessing computer
CN103076992B (en) A kind of internal storage data way to play for time and device
CN108536473A (en) The method and apparatus for reading data
CN104462007A (en) Method and device for achieving cache consistency between multiple cores
KR20240112266A (en) Marshallese data consistency
CN105468540B (en) L2 Cache and its consistency implementation method and data processing system
US7089376B2 (en) Reducing snoop response time for snoopers without copies of requested data via snoop filtering
US9183149B2 (en) Multiprocessor system and method for managing cache memory thereof
JPH10501914A (en) Shared cache memory device
CN108268384A (en) Read the method and device of data
CN109597776B (en) A data manipulation method, memory controller and multiprocessor system
JPH09311820A (en) Multiprocessor system
JP6631317B2 (en) Arithmetic processing device, information processing device, and control method for information processing device
CN119440881A (en) A multi-core consistency processing method, system, device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant