CN118689596A - Method, device, equipment and storage medium for processing cache miss state transactions - Google Patents
Method, device, equipment and storage medium for processing cache miss state transactions Download PDFInfo
- Publication number
- CN118689596A CN118689596A CN202410742964.7A CN202410742964A CN118689596A CN 118689596 A CN118689596 A CN 118689596A CN 202410742964 A CN202410742964 A CN 202410742964A CN 118689596 A CN118689596 A CN 118689596A
- Authority
- CN
- China
- Prior art keywords
- register
- cache
- target
- request
- message
- 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.)
- Pending
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
本申请提供了一种缓存缺失状态事务的处理方法、装置、电子设备及计算机可读存储介质,包括:接收针对目标请求的请求报文;请求报文是针对目标请求产生的缺失状态事务所生成的报文;缺失状态事务表征目标请求未被缓存流水线成功执行;解析请求报文,并根据解析结果确定缺失状态的恢复流程;根据恢复流程对等待寄存器、准备寄存器和信息寄存器分别进行操作,并通过等待寄存器、准备寄存器和信息寄存器各自的寄存器值,完成恢复流程,从而消除缓存中导致缺失状态事务产生的原因,使得目标请求被缓存流水线成功执行。本申请使得缺失状态寄存器可以高效、准确且低功耗的实现对缓存缺失状态事务的处理。
The present application provides a method, device, electronic device and computer-readable storage medium for processing a cache missing state transaction, including: receiving a request message for a target request; the request message is a message generated by a missing state transaction generated by the target request; the missing state transaction indicates that the target request has not been successfully executed by the cache pipeline; parsing the request message, and determining the recovery process of the missing state according to the parsing result; operating the waiting register, the preparation register and the information register respectively according to the recovery process, and completing the recovery process through the register values of the waiting register, the preparation register and the information register, thereby eliminating the cause of the missing state transaction in the cache, so that the target request is successfully executed by the cache pipeline. The present application enables the missing state register to efficiently, accurately and with low power consumption to process cache missing state transactions.
Description
技术领域Technical Field
本申请涉及计算机技术领域,尤其涉及一种缓存缺失状态事务的处理方法、装置、电子设备及计算机可读存储介质。The present application relates to the field of computer technology, and in particular to a method, device, electronic device and computer-readable storage medium for processing cache miss state transactions.
背景技术Background Art
对缓存缺失状态事务的处理方式,是一种在缓存一致性设计上被广泛使用的,非阻塞并行处理事务流程的设计思路。The way of handling transactions in cache miss state is a design idea of non-blocking parallel transaction flow that is widely used in cache consistency design.
目前,在对缓存缺失状态事务的处理流程中,为了实现基于缓存一致性的缺失状态事务处理,往往会导致相关电路设计低效、能耗较高且准确度较差。Currently, in the process of processing cache miss state transactions, in order to implement miss state transaction processing based on cache consistency, it often leads to inefficient related circuit design, high energy consumption and poor accuracy.
发明内容Summary of the invention
本申请实施例提供一种缓存缺失状态事务的处理方法、装置、电子设备及计算机可读存储介质,以解决现有技术中的问题。Embodiments of the present application provide a method, device, electronic device, and computer-readable storage medium for processing cache miss state transactions to solve the problems in the prior art.
第一方面,本申请实施例提供了一种缓存缺失状态事务的处理方法,所述方法包括:In a first aspect, an embodiment of the present application provides a method for processing a cache miss state transaction, the method comprising:
接收针对目标请求的请求报文;所述请求报文是针对目标请求产生的缺失状态事务所生成的报文;所述缺失状态事务表征所述目标请求未被缓存流水线成功执行;Receive a request message for a target request; the request message is a message generated by a missing state transaction generated for the target request; the missing state transaction indicates that the target request is not successfully executed by the cache pipeline;
解析所述请求报文,并根据解析结果确定缺失状态的恢复流程;Parsing the request message, and determining a recovery process for the missing state according to the parsing result;
根据所述恢复流程对等待寄存器、准备寄存器和信息寄存器分别进行操作,并通过所述等待寄存器、所述准备寄存器和所述信息寄存器各自的寄存器值,完成所述恢复流程,从而消除缓存中导致所述缺失状态事务产生的原因,使得所述目标请求被缓存流水线成功执行;The waiting register, the preparation register and the information register are operated respectively according to the recovery process, and the recovery process is completed through the register values of the waiting register, the preparation register and the information register, thereby eliminating the cause of the missing state transaction in the cache, so that the target request is successfully executed by the cache pipeline;
其中,所述等待寄存器的寄存器值用于表征当前是否需要等待未完成执行的第一操作执行完毕,所述准备寄存器中的寄存器值用于表征当前是否需要立即执行第二操作;所述信息寄存器中的寄存器值用于记录所述解析结果以及所述恢复流程中的执行信息。Among them, the register value of the waiting register is used to indicate whether it is necessary to wait for the unfinished first operation to be completed, and the register value in the preparation register is used to indicate whether it is necessary to execute the second operation immediately; the register value in the information register is used to record the analysis result and the execution information in the recovery process.
第二方面,本申请实施例提供了一种缓存缺失状态事务的处理装置,所述装置包括:In a second aspect, an embodiment of the present application provides a device for processing a cache miss state transaction, the device comprising:
获取模块,用于接收针对目标请求的请求报文;所述请求报文是针对目标请求产生的缺失状态事务所生成的报文;所述缺失状态事务表征所述目标请求未被缓存流水线成功执行;An acquisition module, configured to receive a request message for a target request; the request message is a message generated by a missing state transaction generated for the target request; the missing state transaction indicates that the target request has not been successfully executed by the cache pipeline;
解析模块,用于解析所述请求报文,并根据解析结果确定缺失状态的恢复流程;A parsing module, used for parsing the request message and determining a recovery process of the missing state according to the parsing result;
配置模块,用于根据所述恢复流程对等待寄存器、准备寄存器和信息寄存器分别进行操作,并通过所述等待寄存器、所述准备寄存器和所述信息寄存器各自的寄存器值,完成所述恢复流程,从而消除缓存中导致所述缺失状态事务产生的原因,使得所述目标请求被缓存流水线成功执行;a configuration module, configured to respectively operate the waiting register, the preparation register and the information register according to the recovery process, and complete the recovery process through the register values of the waiting register, the preparation register and the information register, thereby eliminating the cause of the missing state transaction in the cache, so that the target request is successfully executed by the cache pipeline;
其中,所述等待寄存器的寄存器值用于表征当前是否需要等待未完成执行的第一操作执行完毕,所述准备寄存器中的寄存器值用于表征当前是否需要立即执行第二操作;所述信息寄存器中的寄存器值用于记录所述解析结果以及所述恢复流程中的执行信息。Among them, the register value of the waiting register is used to indicate whether it is necessary to wait for the unfinished first operation to be completed, and the register value in the preparation register is used to indicate whether it is necessary to execute the second operation immediately; the register value in the information register is used to record the analysis result and the execution information in the recovery process.
第三方面,本申请实施例还提供了一种电子设备,包括处理器;In a third aspect, an embodiment of the present application further provides an electronic device, including a processor;
用于存储所述处理器可执行指令的存储器;a memory for storing instructions executable by the processor;
其中,所述处理器被配置为执行所述指令,以实现所述第一方面的方法。The processor is configured to execute the instructions to implement the method of the first aspect.
第四方面,本申请实施例还提供了一种计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行所述第一方面的方法。In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute the method of the first aspect.
本申请实施例通过对缺失状态事务所对应的请求报文进行解析,获得缺失状态的恢复流程;并根据恢复流程对等待寄存器、准备寄存器和信息寄存器分别进行操作,通过等待寄存器、准备寄存器和信息寄存器各自的寄存器值,完成所述恢复流程。本申请通过对等待寄存器、准备寄存器和信息寄存器分别进行置位和复位,即可高效、准确且低功耗的实现恢复流程。这是因为这三类寄存器的设计无冗余且这三类寄存器可由高速物理电路所实现,执行时的能耗较低且电路占用面积较小,另外,这三类寄存器对寄存器值的维护简单且高效,对这三类寄存器进行置位和复位即可实现对恢复流程的控制,从而使得缺失状态寄存器可以高效、准确且低功耗的实现对缓存缺失状态事务的处理。The embodiment of the present application parses the request message corresponding to the missing state transaction to obtain the recovery process of the missing state; and operates the waiting register, the preparation register and the information register respectively according to the recovery process, and completes the recovery process through the register values of the waiting register, the preparation register and the information register. The present application can realize the recovery process efficiently, accurately and with low power consumption by setting and resetting the waiting register, the preparation register and the information register respectively. This is because the design of these three types of registers is non-redundant and these three types of registers can be implemented by high-speed physical circuits, the energy consumption during execution is low and the circuit occupies a small area. In addition, the maintenance of the register values of these three types of registers is simple and efficient. The control of the recovery process can be realized by setting and resetting these three types of registers, so that the missing state register can realize the processing of cache missing state transactions efficiently, accurately and with low power consumption.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例提供的一种缓存缺失状态事务的处理方法的步骤流程图;FIG1 is a flowchart of a method for processing a cache miss state transaction provided by an embodiment of the present application;
图2是本申请实施例提供的一种缓存缺失状态事务的处理架构示意图;FIG2 is a schematic diagram of a cache miss state transaction processing architecture provided by an embodiment of the present application;
图3是本申请实施例提供的一种缓存缺失状态事务的处理装置框图;FIG3 is a block diagram of a cache miss state transaction processing device provided by an embodiment of the present application;
图4是本申请的一种装置的框图;FIG4 is a block diagram of a device of the present application;
图5是本申请的一些实施例中服务端的结构示意图。FIG5 is a schematic diagram of the structure of the server in some embodiments of the present application.
具体实施方式DETAILED DESCRIPTION
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中的术语“和/或”用于描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。本申请实施例中术语“多个”是指两个或两个以上,其它量词与之类似。The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, the term "and/or" in the specification and claims is used to describe the association relationship of associated objects, indicating that three kinds of relationships can exist, for example, A and/or B can be represented: A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the front and back associated objects are a kind of "or" relationship. In the embodiment of the present application, the term "multiple" refers to two or more, and other quantifiers are similar.
现代处理器为了提升执行效率,减少处理器与内存的交互,可以在处理器上集成多级缓存架构,常见的架构为三级缓存结构,包括:一级缓存L1、二级缓存L2和三级缓存L3。一级缓存L1是最接近处理器的缓存,它容量最小,速度最快;二级缓存L2的容量更大一些,但速度相对一级缓存L1要慢一些,二级缓存L2就是一级缓存L1的缓冲器,二级缓存L2的作用就是存储那些处理器处理时需要用到,但一级缓存L1又无法存储的数据;三级缓存L3的容量最大,同时也是速度最慢的一级,三级缓存L3和内存可以看作是二级缓存L2的缓冲器。In order to improve execution efficiency and reduce the interaction between the processor and memory, modern processors can integrate a multi-level cache architecture on the processor. The common architecture is a three-level cache structure, including: Level 1 cache L1, Level 2 cache L2 and Level 3 cache L3. Level 1 cache L1 is the cache closest to the processor, it has the smallest capacity and the fastest speed; Level 2 cache L2 has a larger capacity, but is slower than Level 1 cache L1. Level 2 cache L2 is the buffer of Level 1 cache L1. The function of Level 2 cache L2 is to store data that is needed for processor processing but cannot be stored by Level 1 cache L1; Level 3 cache L3 has the largest capacity and is also the slowest level. Level 3 cache L3 and memory can be regarded as buffers for Level 2 cache L2.
当处理器运作时,处理器会根据访存指令首先去一级缓存L1寻找所需要的数据,之后去二级缓存L2,之后再去三级缓存L3,如果三级缓存都没找到它需要的数据,则从内存里获取数据。寻找的路径越长,耗时越长,所以如果要非常频繁的获取某些数据,保证这些数据在一级缓存L1里,这样速度将非常快。其中,访存指令是从内存的指定地址读取数据,或往内存中的指定地址写数据的指令。When the processor is running, the processor will first go to the first-level cache L1 to find the required data according to the memory access instruction, then go to the second-level cache L2, and then go to the third-level cache L3. If the third-level cache does not find the data it needs, it will get the data from the memory. The longer the search path, the longer it takes, so if you need to get certain data very frequently, make sure that the data is in the first-level cache L1, so that the speed will be very fast. Among them, the memory access instruction is an instruction to read data from a specified address in the memory, or write data to a specified address in the memory.
在上述过程中,访存指令在一级缓存L1中未命中(指一级缓存L1中未存有访存指令请求的数据),则继续查找访存指令在二级缓存L2中是否命中,若在二级缓存L2中命中,则二级缓存L2将访存指令请求的数据重填入一级缓存L1;若在二级缓存L2中未命中,则继续查找访存指令在三级缓存L3中是否命中,若在三级缓存L3中命中,则三级缓存L3将访存指令请求的数据重填入二级缓存L2,再由二级缓存L2将数据重填入一级缓存L1,若在三级缓存L3中未命中,则需进一步去内存中查找数据。In the above process, if the memory access instruction does not hit in the first-level cache L1 (meaning that the data requested by the memory access instruction is not stored in the first-level cache L1), the memory access instruction will continue to be searched whether it hits in the second-level cache L2. If it hits in the second-level cache L2, the second-level cache L2 will refill the data requested by the memory access instruction into the first-level cache L1; if it does not hit in the second-level cache L2, the memory access instruction will continue to be searched whether it hits in the third-level cache L3. If it hits in the third-level cache L3, the third-level cache L3 will refill the data requested by the memory access instruction into the second-level cache L2, and then the second-level cache L2 will refill the data into the first-level cache L1. If it does not hit in the third-level cache L3, it is necessary to further search for data in the memory.
则访存指令在某一级缓存中出现未命中现象时,表示缓存流水线当前处理的访存指令出现缓存缺失状态事务,即缓存流水线无法成功执行该访存指令时产生的事务,此时需要通过缺失状态寄存器(MSHR,Miss-statusHandlingRegisters)来处理缓存缺失状态事务,缺失状态寄存器是用来记录每一项未完成的事务的寄存器,记录的信息包括失效地址、关键字信息以及未完成执行的指令等。一旦阻止该访存指令成功执行的问题被消除后,缺失状态寄存器中的访存指令即可重新进入流水线队列执行。When a memory access instruction misses in a certain level of cache, it means that the memory access instruction currently processed by the cache pipeline has a cache miss status transaction, that is, a transaction generated when the cache pipeline cannot successfully execute the memory access instruction. At this time, the miss status register (MSHR, Miss-statusHandlingRegisters) is needed to handle the cache miss status transaction. The miss status register is a register used to record each unfinished transaction. The recorded information includes the invalid address, keyword information, and unfinished instructions. Once the problem that prevents the successful execution of the memory access instruction is eliminated, the memory access instruction in the miss status register can re-enter the pipeline queue for execution.
图1,是本申请实施例提供的一种缓存缺失状态事务的处理方法的步骤流程图,如图1所示,该方法可以包括:FIG. 1 is a flowchart of a method for processing a cache miss state transaction provided by an embodiment of the present application. As shown in FIG. 1 , the method may include:
步骤101、接收针对目标请求的请求报文;所述请求报文是针对目标请求产生的缺失状态事务所生成的报文;所述缺失状态事务表征所述目标请求未被缓存流水线成功执行。Step 101, receiving a request message for a target request; the request message is a message generated by a missing state transaction generated for the target request; the missing state transaction indicates that the target request has not been successfully executed by the cache pipeline.
在本申请实施例中,实现的是一种基于一致性总线接口(CHI,CoherentHubInterface)的MSHR设计方案,其旨在通过CHI协议规范MSHR的实现流程。当目标指令在某一级缓存中出现未命中(如目标指令无法在该级缓存中读或写)现象时,表示缓存流水线当前处理的目标指令出现缓存缺失状态事务,即缓存流水线在无法成功执行该目标指令时产生缓存缺失状态事务,此时需要通过缺失状态寄存器(MSHR)来处理缓存缺失状态事务。In the embodiment of the present application, a MSHR design scheme based on a coherent hub interface (CHI) is implemented, which aims to standardize the implementation process of MSHR through the CHI protocol. When a target instruction misses in a certain level of cache (such as the target instruction cannot be read or written in the cache at this level), it means that a cache miss state transaction occurs in the target instruction currently processed by the cache pipeline, that is, the cache pipeline generates a cache miss state transaction when the target instruction cannot be successfully executed. At this time, the cache miss state transaction needs to be processed through the miss state register (MSHR).
进一步的,参照图2,其示出了一种MSHR的架构示意图,包括MSHR、缓存流水线、接收通道和发送通道。MSHR分别与缓存流水线、接收通道和发送通道相连接。Further, referring to Fig. 2, a schematic diagram of the architecture of a MSHR is shown, including a MSHR, a cache pipeline, a receiving channel and a sending channel. The MSHR is connected to the cache pipeline, the receiving channel and the sending channel respectively.
其中,缺失状态寄存器(MSHR)是计算机体系结构中与高速缓存控制相关的一个概念。当指令试图从高速缓存中获取数据,但该数据在缓存未命中时,后续会生成一个缓存未命中的状态(即缓存缺失状态事务),并将相应的信息(如未命中的地址、操作类型、数据块大小等)存储在MSHR中,这允许缓存流水线在等待缓存数据返回时继续执行其他操作,而不必停止。并且缓存后续一旦接收到数据,就可以从MSHR中检索相应信息,并继续执行操作,完成数据获取流程。Among them, the Miss Status Register (MSHR) is a concept related to cache control in computer architecture. When an instruction attempts to obtain data from the cache, but the data does not hit the cache, a cache miss status (i.e., cache miss status transaction) is subsequently generated, and the corresponding information (such as the address of the miss, the type of operation, the size of the data block, etc.) is stored in the MSHR, which allows the cache pipeline to continue to perform other operations while waiting for the cache data to return without having to stop. Once the cache receives the data later, it can retrieve the corresponding information from the MSHR and continue to perform the operation to complete the data acquisition process.
缓存流水线(CLP,CachePipeLine)是计算机体系结构中的一种技术,用于提高缓存访问的吞吐量和性能,缓存流水线可以向MSHR提供高速缓存相关的信息。缓存流水线包括多个顺序排列的数据位,每个数据位对应一个流水线时刻,不同数据位对应的流水线时刻不同,请求用于从缓存流水线的初始数据位进入流水线开始执行,并随着时间的迁移,改变所处的数据位,直至执行结束后离开缓存流水线。基于这种结构,缓存流水线可以高效且准确的执行指令。接收通道是MSHR用于接收外部信息的通道;发送通道则是MSHR用于向外部发送信息的通道。Cache pipeline (CLP, CachePipeLine) is a technology in computer architecture that is used to improve the throughput and performance of cache access. The cache pipeline can provide cache-related information to MSHR. The cache pipeline includes multiple sequentially arranged data bits, each data bit corresponds to a pipeline moment, and different data bits correspond to different pipeline moments. The request is used to enter the pipeline from the initial data bit of the cache pipeline to start execution, and as time passes, the data bit is changed until it leaves the cache pipeline after the execution is completed. Based on this structure, the cache pipeline can execute instructions efficiently and accurately. The receiving channel is the channel used by MSHR to receive external information; the sending channel is the channel used by MSHR to send information to the outside.
在该步骤中,针对产生缺失状态事务的目标请求,表示缓存流水线当前未能成功执行该目标请求,未成功执行的原因可能包括目标请求所请求读/写的目标数据未在目标缓存中存储,这也称为目标请求在目标缓存中未命中,此时目标缓存会针对目标请求的缺失状态事务生成请求报文,并将请求报文通过RXREQ通道发送至MSHR,这称为缓存缺失状态事务的入队。请求报文中包括失效地址、事务类型、关键字信息等内容。请求报文的目的是指示MSHR建立一个找到目标请求所需的目标数据并将目标数据提供给目标缓存的恢复流程并执行,。In this step, for the target request that generates a missing state transaction, it means that the cache pipeline currently fails to successfully execute the target request. The reasons for the unsuccessful execution may include that the target data requested to read/write by the target request is not stored in the target cache, which is also called a target request miss in the target cache. At this time, the target cache will generate a request message for the missing state transaction of the target request and send the request message to MSHR through the RXREQ channel. This is called the enqueueing of the cache missing state transaction. The request message includes the invalid address, transaction type, keyword information, etc. The purpose of the request message is to instruct MSHR to establish a recovery process to find the target data required for the target request and provide the target data to the target cache and execute it.
步骤102、解析所述请求报文,并根据解析结果确定缺失状态的恢复流程。Step 102: parse the request message, and determine the recovery process of the missing state according to the parsing result.
在本申请实施例中,MSHR可以解析请求报文,所获得的解析结果反映了缓存缺失状态事务的产生原因,基于解析结果即可制定用于解决缓存缺失状态事务所对应问题的恢复流程。In an embodiment of the present application, MSHR can parse the request message, and the obtained parsing result reflects the cause of the cache miss state transaction. Based on the parsing result, a recovery process can be formulated to solve the problem corresponding to the cache miss state transaction.
恢复流程旨在解决缓存中阻止目标指令成功执行的问题,使得后续目标指令可重新进入缓存流水线并被成功执行。例如,目标指令是在二级缓存L2中读取目标数据的指令,但由于二级缓存L2中未存储目标数据,所以目标指令在二级缓存L2中未命中,在MSHR找到目标数据并存入二级缓存L2后,阻碍目标指令成功执行的问题即被解决,目标指令即可成功执行。The recovery process is designed to solve the problem in the cache that prevents the target instruction from being successfully executed, so that the subsequent target instruction can re-enter the cache pipeline and be successfully executed. For example, the target instruction is an instruction to read the target data in the L2 cache, but because the target data is not stored in the L2 cache, the target instruction does not hit in the L2 cache. After the MSHR finds the target data and stores it in the L2 cache, the problem that prevents the target instruction from being successfully executed is solved, and the target instruction can be successfully executed.
具体的,恢复流程包括MSHR先与缓存流水线交互,以确定除目标缓存之外,是否存在可能包含有目标数据的目标对象;在确定存在目标对象时,MSHR再与目标对象交互,以控制目标对象将目标数据提供给目标缓存,最后MSHR与目标缓存交互,在确定目标缓存确实接收到目标数据后,完成恢复流程。Specifically, the recovery process includes MSHR first interacting with the cache pipeline to determine whether there is a target object that may contain the target data in addition to the target cache; when it is determined that the target object exists, MSHR interacts with the target object to control the target object to provide the target data to the target cache, and finally MSHR interacts with the target cache to complete the recovery process after determining that the target cache has indeed received the target data.
步骤103、根据所述恢复流程对等待寄存器、准备寄存器和信息寄存器分别进行操作,并通过所述等待寄存器、所述准备寄存器和所述信息寄存器各自的寄存器值,完成所述恢复流程,从而消除缓存中导致所述缺失状态事务产生的原因,使得所述目标请求被缓存流水线成功执行。Step 103, according to the recovery process, the waiting register, the preparation register and the information register are operated respectively, and the recovery process is completed through the register values of the waiting register, the preparation register and the information register, thereby eliminating the cause of the missing state transaction in the cache, so that the target request is successfully executed by the cache pipeline.
其中,所述等待寄存器的寄存器值用于表征当前是否需要等待未完成执行的第一操作执行完毕,所述准备寄存器中的寄存器值用于表征当前是否需要立即执行第二操作;所述信息寄存器中的寄存器值用于记录所述解析结果以及所述恢复流程中的执行信息。Among them, the register value of the waiting register is used to indicate whether it is necessary to wait for the unfinished first operation to be completed, and the register value in the preparation register is used to indicate whether it is necessary to execute the second operation immediately; the register value in the information register is used to record the analysis result and the execution information in the recovery process.
在本申请实施例中,参照图2,MSHR设计思路中,MSHR可以维护有三类寄存器:等待寄存器、准备寄存器和信息寄存器,等待寄存器的寄存器值用于表征当前是否需要等待未完成执行的第一操作执行完毕,准备寄存器中的寄存器值用于表征当前是否需要立即执行第二操作;信息寄存器中的寄存器值用于记录所述解析结果以及所述恢复流程中的执行信息。等待寄存器置位表示MSHR需要等待某个行为的结束,当所有等待寄存器都没有置位就意味着一个缓存缺失状态事务完成所有流程,可以出队(指MSHR中的一项缓存缺失状态事务完成所需的操作,不再占有MSHR资源)。准备类寄存器置位表示MSHR当前存在需要缓存流水线发送的读/写请求或者向各发送通道发送的报文。信息寄存器记录着由MSHR外部传递而来的信息,这些信息或表示收到某个报文,或表示所需要发送报文的内容。In the embodiment of the present application, referring to FIG. 2, in the MSHR design concept, the MSHR can maintain three types of registers: a waiting register, a preparation register, and an information register. The register value of the waiting register is used to indicate whether it is necessary to wait for the unfinished first operation to be completed. The register value in the preparation register is used to indicate whether it is necessary to execute the second operation immediately; the register value in the information register is used to record the parsing result and the execution information in the recovery process. The setting of the waiting register indicates that the MSHR needs to wait for the end of a certain behavior. When all the waiting registers are not set, it means that a cache missing state transaction completes all processes and can be dequeued (referring to a cache missing state transaction in the MSHR to complete the required operations and no longer occupy MSHR resources). The setting of the preparation register indicates that the MSHR currently has a read/write request that needs to be sent by the cache pipeline or a message sent to each sending channel. The information register records information transmitted from the outside of the MSHR. This information either indicates that a certain message has been received or indicates the content of the message that needs to be sent.
例如,一个缓存缺失状态事务对应的恢复流程开始时,MSHR需依次与缓存流水线、目标对象和目标缓存进行交互,则当缓存缺失状态事务进入MSHR时,MSHR可以首先对等待寄存器1、等待寄存器2和等待寄存器3分别置位,等待寄存器1置位后用于表征当前需要等待与缓存流水线的交互执行完毕;等待寄存器2置位后用于表征当前需要等待与目标对象的交互执行完毕;等待寄存器3置位后用于表征当前需要等待与目标缓存的交互执行完毕。另外,当缓存缺失状态事务进入MSHR时,MSHR首先需要向缓存流水线发送请求,则此时MSHR可以对准备寄存器1置位,准备寄存器1置位后用于表征当前需要立即执行向缓存流水线发送请求的操作,缓存缺失状态事务的具体信息和执行过程中的信息可以记录在信息寄存器中,以供执行过程中调取使用。由此可见,通过这三类寄存器对寄存器值的维护,准确且高效的实现了恢复流程的步骤生成和流转,并规范化了恢复流程的实现。For example, when the recovery process corresponding to a cache miss state transaction begins, the MSHR needs to interact with the cache pipeline, the target object, and the target cache in sequence. When the cache miss state transaction enters the MSHR, the MSHR can first set the wait register 1, wait register 2, and wait register 3 respectively. After the wait register 1 is set, it is used to indicate that the current interaction with the cache pipeline needs to be completed; after the wait register 2 is set, it is used to indicate that the current interaction with the target object needs to be completed; after the wait register 3 is set, it is used to indicate that the current interaction with the target cache needs to be completed. In addition, when the cache miss state transaction enters the MSHR, the MSHR first needs to send a request to the cache pipeline. At this time, the MSHR can set the prepare register 1. After the prepare register 1 is set, it is used to indicate that the operation of sending a request to the cache pipeline needs to be executed immediately. The specific information of the cache miss state transaction and the information during the execution process can be recorded in the information register for retrieval and use during the execution process. It can be seen that through the maintenance of register values by these three types of registers, the step generation and flow of the recovery process are accurately and efficiently realized, and the implementation of the recovery process is standardized.
本申请实施例通过向这三类寄存器分别进行置位和复位,即可高效、准确且低功耗的实现恢复流程。这是因为三类寄存器的设计无冗余,且这三类寄存器都由高速物理电路所实现,执行时的能耗较低且电路占用面积较小,并且这三类寄存器对寄存器值的维护简单且高效,对这三类寄存器进行置位和复位即可实现对恢复流程中步骤流转的控制,从而能够高效的实现对缓存缺失状态事务的处理。The embodiment of the present application can realize the recovery process efficiently, accurately and with low power consumption by setting and resetting the three types of registers respectively. This is because the design of the three types of registers is non-redundant, and the three types of registers are implemented by high-speed physical circuits, the energy consumption during execution is low and the circuit occupies a small area, and the maintenance of register values by the three types of registers is simple and efficient. Setting and resetting the three types of registers can realize the control of the flow of steps in the recovery process, so that the cache missing state transaction can be efficiently processed.
具体的,MSHR呈一种二维结构,将MSHR视为包括多个元素的二维数组时,每个元素即对应一个缓存缺失状态事务,对应每个元素都配置有对应的三类寄存器(等待寄存器、准备寄存器和信息寄存器),当MSHR中的多个元素互不相关时,即可通过这些元素各自对应的三类寄存器,实现多个元素各自对应的缓存缺失状态事务的同时并行处理,从而提高MSHR处理缓存缺失状态事务的吞吐率。Specifically, MSHR has a two-dimensional structure. When MSHR is regarded as a two-dimensional array including multiple elements, each element corresponds to a cache miss status transaction, and each element is configured with corresponding three types of registers (wait register, ready register and information register). When multiple elements in MSHR are unrelated to each other, the three types of registers corresponding to these elements can be used to realize simultaneous and parallel processing of cache miss status transactions corresponding to multiple elements, thereby improving the throughput of MSHR in processing cache miss status transactions.
在本申请实施例中,分别对等待寄存器、准备寄存器和信息寄存器各自的具体情况进行枚举:In the embodiment of the present application, the specific situations of the waiting register, the preparation register and the information register are enumerated respectively:
等待寄存器包括但不限于以下8个寄存器:The wait registers include but are not limited to the following 8 registers:
mshr_pipeline_busy:置位表示等待缓存流水线反馈;mshr_pipeline_busy: set to indicate waiting for cache pipeline feedback;
mshr_snp_busy:置位表示等待目标对象的回复;mshr_snp_busy: set to indicate waiting for a reply from the target object;
mshr_mem_rd_busy:置位表示等待SNF(SubordinateNodeFullcoherent,用于接收、处理、回复由MSHR发起的报文的部件)完成读事务请求;mshr_mem_rd_busy: set to wait for SNF (SubordinateNodeFullcoherent, a component used to receive, process, and reply to messages initiated by MSHR) to complete the read transaction request;
mshr_mem_wr_busy:置位表示等待SNF完成写事务请求;mshr_mem_wr_busy: set to wait for SNF to complete the write transaction request;
mshr_compack_busy:置位表示等待接收目标缓存发出的回应报文;mshr_compack_busy: When set, it indicates waiting to receive the response message sent by the target buffer;
mshr_datbuf_rn_busy:置位表示接受到来自缓存流水线或RXDAT通道的数据,需要等待将目标数据传递出去,传递的方向是向目标缓存发送;mshr_datbuf_rn_busy: When set, it indicates that data is received from the cache pipeline or RXDAT channel and needs to wait for the target data to be transmitted. The transmission direction is to send to the target cache.
mshr_datbuf_sn_busy:置位表示接受到来自缓存流水线或RXDAT通道的报文,需要等待将数据传递出去,传递的方向是向SNF发送;mshr_datbuf_sn_busy: When set, it indicates that a message from the cache pipeline or RXDAT channel has been received and it needs to wait for the data to be transmitted. The transmission direction is to send it to SNF.
mshr_rsp_busy:置位表示在等待完成TXRSP报文的发送。这些RSP报文(Response报文,是CHI协议中的一种报文)为DBIDResp,Comp,CompDBIDResp,ReadReceipt等(以上都是CHI协议中规范定义的RSP报文类型)。mshr_rsp_busy: When set, it indicates that the TXRSP message is waiting to be sent. These RSP messages (Response messages, a type of message in the CHI protocol) are DBIDResp, Comp, CompDBIDResp, ReadReceipt, etc. (the above are all RSP message types defined in the CHI protocol).
准备寄存器包括但不限于以下11个寄存器:The preparation registers include but are not limited to the following 11 registers:
mshr_cachepipeline_rd_rdy:置位表示需要向缓存流水线发送读请求;mshr_cachepipeline_rd_rdy: When set, it indicates that a read request needs to be sent to the cache pipeline;
mshr_cachepipeline_fill_rdy:置位表示需要向缓存流水线发送写请求;mshr_cachepipeline_fill_rdy: When set, it indicates that a write request needs to be sent to the cache pipeline;
mshr_txreq_rd_rdy:置位表示需要向TXREQ通道发送读报文。报文具体内容由信息寄存器提供;mshr_txreq_rd_rdy: When set, it indicates that a read message needs to be sent to the TXREQ channel. The specific content of the message is provided by the information register;
mshr_txreq_wr_rdy:置位表示需要向TXREQ通道发送写报文。报文具体内容由信息寄存器提供;mshr_txreq_wr_rdy: When set, it indicates that a write message needs to be sent to the TXREQ channel. The specific content of the message is provided by the information register;
mshr_txrsp_rdy:置位表示需要向TXRSP通道发送RSP报文。报文具体内容由信息寄存器提供;mshr_txrsp_rdy: When set, it indicates that an RSP message needs to be sent to the TXRSP channel. The specific content of the message is provided by the information register;
mshr_txrsp_comp_rdy:置位表示需要向TXRSP通道发送回应(comp)报文。报文具体内容由信息寄存器提供;mshr_txrsp_comp_rdy: When set, it indicates that a response (comp) message needs to be sent to the TXRSP channel. The specific content of the message is provided by the information register;
mshr_txrsp_dbid_rdy:置位表示需要向TXRSP通道发送数据库标识(DBID)报文。报文具体内容由信息寄存器提供;mshr_txrsp_dbid_rdy: When set, it indicates that a database identification (DBID) message needs to be sent to the TXRSP channel. The specific content of the message is provided by the information register;
mshr_txrsp_rdreceipt_rdy:置位表示需要向TXRSP通道发送已读回执(ReadReceipt)报文。报文具体内容由信息寄存器提供;mshr_txrsp_rdreceipt_rdy: When set, it indicates that a ReadReceipt message needs to be sent to the TXRSP channel. The specific content of the message is provided by the information register;
mshr_txsnp_rdy:置位表示需要向TXSNP通道发送SNP(监听,snoop)报文。报文具体内容由信息寄存器提供;mshr_txsnp_rdy: When set, it indicates that a SNP (snoop) message needs to be sent to the TXSNP channel. The specific content of the message is provided by the information register;
mshr_txdat_rn_rdy:置位表示需要向TXDAT通道发送数据报文,其传递方向是向目标缓存发送。报文具体内容由信息寄存器提供;mshr_txdat_rn_rdy: When set, it indicates that a data message needs to be sent to the TXDAT channel, and its transmission direction is to send to the target buffer. The specific content of the message is provided by the information register;
mshr_txdat_sn_rdy:置位表示需要向TXDAT通道发送数据报文,其传递方向是向SNF发送。报文具体内容由信息寄存器提供;mshr_txdat_sn_rdy: When set, it indicates that a data message needs to be sent to the TXDAT channel, and its transmission direction is to send to SNF. The specific content of the message is provided by the information register;
信息寄存器包括但不限于以下36个寄存器:Information registers include but are not limited to the following 36 registers:
mshr_snp_bit:记录SNP报文需要向哪些目标对象发送;mshr_snp_bit: records the target objects to which the SNP message needs to be sent;
mshr_l3hit:记录最后一级缓存(LLC,LastLevelCache,如三级缓存中的L3)是否命中;mshr_l3hit: records whether the last level cache (LLC, LastLevelCache, such as L3 in the third level cache) hits;
mshr_snp_direct:记录是否只需要向一个目标对象发送SNP报文;mshr_snp_direct: records whether the SNP message needs to be sent to only one target object;
mshr_snp_cnt:记录需要发送的SNP报文的数量;mshr_snp_cnt: records the number of SNP messages that need to be sent;
mshr_snp_opcode:记录需要发送的SNP报文的类型;mshr_snp_opcode: records the type of SNP message to be sent;
mshr_rettosrc:记录需要发送的SNP报文的rettosrc字段内容(CHI协议规范中的SNP报文中的内容);mshr_rettosrc: records the rettosrc field content of the SNP message to be sent (the content of the SNP message in the CHI protocol specification);
mshr_l3_resp:记录LLC命中时所需要发送的数据报文中的resp字段内容(CHI协议规范中的DAT报文中的内容);mshr_l3_resp: records the resp field content in the data message that needs to be sent when LLC hits (the content in the DAT message in the CHI protocol specification);
mshr_opcode:记录从RXREQ通道接收的Request报文中的opcode字段内容(CHI协议规范中的REQ报文中的内容);mshr_opcode: records the opcode field content in the Request message received from the RXREQ channel (the content in the REQ message in the CHI protocol specification);
mshr_qos:记录从RXREQ通道接收的Request报文中的qos字段内容(CHI协议规范中的REQ报文中的内容);mshr_qos: records the qos field content in the Request message received from the RXREQ channel (the content in the REQ message in the CHI protocol specification);
mshr_memattr:记录从RXREQ通道接收的Request报文中的memattr字段内容(CHI协议规范中的REQ报文中的内容);mshr_memattr: records the memattr field content in the Request message received from the RXREQ channel (the content in the REQ message in the CHI protocol specification);
mshr_srcid:记录从RXREQ通道接收的Request报文中的srcid字段内容(CHI协议规范中的REQ报文中的内容);mshr_srcid: records the srcid field content in the Request message received from the RXREQ channel (the content in the REQ message in the CHI protocol specification);
mshr_txnid:记录从RXREQ通道接收的Request报文中的txnid字段内容(CHI协议规范中的REQ报文中的内容);mshr_txnid: records the txnid field content in the Request message received from the RXREQ channel (the content in the REQ message in the CHI protocol specification);
mshr_excl:记录从RXREQ通道接收的Request报文中的excl字段内容(CHI协议规范中的REQ报文中的内容);mshr_excl: records the excl field content in the Request message received from the RXREQ channel (the content in the REQ message in the CHI protocol specification);
mshr_ne:记录从RXREQ通道接收的Request报文中的ne字段内容(CHI协议规范中的REQ报文中的内容);mshr_ne: records the ne field content in the Request message received from the RXREQ channel (the content in the REQ message in the CHI protocol specification);
mshr_order:记录从RXREQ通道接收的Request报文中的order字段内容(CHI协议规范中的REQ报文中的内容);mshr_order: records the order field content in the Request message received from the RXREQ channel (the content in the REQ message in the CHI protocol specification);
mshr_rdnosnp:记录从RXREQ通道接收的Request报文类型为readnosnp(CHI协议规范中的REQ报文类型)。本申请不一一列出所有类似的寄存器,CHI协议规范中的Request报文类型都可以这种形式体现,如mshr_readunique等等;mshr_rdnosnp: records that the Request message type received from the RXREQ channel is readnosnp (REQ message type in the CHI protocol specification). This application does not list all similar registers one by one. The Request message type in the CHI protocol specification can be reflected in this form, such as mshr_readunique, etc.;
mshr_snp_dirty:记录从RXDAT通道接收来自目标对象的脏数据;mshr_snp_dirty: records the dirty data received from the target object through the RXDAT channel;
mshr_snp_getid:记录从RXDAT通道接收来自目标对象的数据报文中的dataid字段内容(CHI协议规范中的数据报文类型);mshr_snp_getid: records the dataid field content in the data message received from the target object through the RXDAT channel (data message type in the CHI protocol specification);
mshr_snpdat_getone:记录从RXDAT通道接收到来自目标对象的数据报文。每次收到就翻转一次;mshr_snpdat_getone: records the data packets received from the target object through the RXDAT channel. It flips once each time it is received;
mshr_snp_getnum:记录收到目标对象回复情况。每次收齐一个目标对象回复就加一;mshr_snp_getnum: records the responses received from the target object. It increases by one each time a response from the target object is received;
mshr_snpfwd:记录是否收到snpfwd类型的报文;mshr_snpfwd: records whether a snpfwd type message is received;
mshr_rn_dat_gat_d:记录是否收到来自请求方的脏数据;mshr_rn_dat_gat_d: records whether dirty data is received from the requester;
mshr_dat_rngetone:记录从RXDAT通道接收到来自请求方的数据报文。每次收到一个该数据报文就翻转一次;mshr_dat_rngetone: records the data packets received from the requester through the RXDAT channel. Each time a data packet is received, it is flipped once;
mshr_dat_memgetone:记录从RXDAT通道接收到来自SNF的数据报文。每次收到一个该数据报文就翻转一次;mshr_dat_memgetone: records the data packets received from SNF through the RXDAT channel. Each time a data packet is received, it is flipped once;
mshr_dat_old_get:记录是否获取来自目标对象或SNF的完整数据(一个缓存流水线);mshr_dat_old_get: records whether to obtain complete data from the target object or SNF (a cache pipeline);
mshr_dat_new_get:记录是否获取来自请求方的完整数据(一个缓存流水线);mshr_dat_new_get: records whether to obtain complete data from the requester (a cache pipeline);
mshr_dat_stop_cb:记录是否收到状态为无效或者干净共享的CopyBackWrData(CHI协议规范中的数据报文类型);mshr_dat_stop_cb: records whether a CopyBackWrData (data message type in the CHI protocol specification) with an invalid or clean shared status is received;
mshr_cb_wr_mem:记录收到来自requesterdirty数据之后是否需要向SNF发送Request报文;mshr_cb_wr_mem: records whether it is necessary to send a Request message to SNF after receiving data from requesterdirty;
mshr_get_compack:记录是否收到回应报文;mshr_get_compack: records whether a response message is received;
mshr_dbid:记录从RXRSP通道收到的DBIDResp或CompDBIDResp(CHI协议规范中的response报文类型)中的DBID字段内容;mshr_dbid: records the content of the DBID field in the DBIDResp or CompDBIDResp (response message type in the CHI protocol specification) received from the RXRSP channel;
mshr_get_dbid:记录是否收到DBIDResp或CompDBIDResp报文;mshr_get_dbid: records whether a DBIDResp or CompDBIDResp message is received;
mshr_get_comp:记录是否收到回应报文或CompDBIDResp报文;mshr_get_comp: records whether a response message or CompDBIDResp message is received;
mshr_get_rd_receipt:记录是否收到ReadReceipt报文;mshr_get_rd_receipt: records whether the ReadReceipt message is received;
mshr_get_retry:记录是否收到RetryAck报文;mshr_get_retry: records whether the RetryAck message is received;
mshr_pcrdtype:记录从RXRSP通道接收到的RetryAck报文中的pcrdtype字段内容;mshr_pcrdtype: records the content of the pcrdtype field in the RetryAck message received from the RXRSP channel;
mshr_resent:记录是否都收到了报文字段pcrdtype内容一致的RetryAck报文及pcrdgnt报文。mshr_resent: records whether all RetryAck and pcrdgnt messages with the same content in the message field pcrdtype have been received.
可选的,所述目标请求用于对目标数据进行处理,所述目标请求在目标缓存中未命中,步骤102所确定的恢复流程包括:Optionally, the target request is used to process target data, and the target request does not hit in the target cache. The recovery process determined in step 102 includes:
步骤A1、与缓存流水线交互,确定是否存在可能存储有所述目标数据的目标对象;所述目标对象为除所述目标缓存之外的其他缓存对象或内存对象。Step A1, interacting with the cache pipeline to determine whether there is a target object that may store the target data; the target object is a cache object or memory object other than the target cache.
步骤A2、在确定存在所述目标对象时,与所述目标对象交互,以使得所述目标数据被提供给所述目标缓存。Step A2: When it is determined that the target object exists, interact with the target object so that the target data is provided to the target cache.
步骤A3、与所述目标缓存交互,在确定所述目标缓存接收到所述目标数据后,完成所述恢复流程。Step A3: interact with the target cache, and complete the recovery process after determining that the target cache has received the target data.
在本申请实施例中,基于步骤A1-A3,一个指令试图从高速缓存中获取数据,但该数据在缓存未命中时,后续会生成一个缓存未命中的状态(即缓存缺失状态事务)。未命中的缓存后续一旦接收到数据,就消除了缓存缺失状态事务的产生原因,此时可以从MSHR中检索相应信息,并继续执行操作,完成数据获取流程。In the embodiment of the present application, based on steps A1-A3, an instruction attempts to obtain data from the cache, but when the data does not hit the cache, a cache miss state (i.e., cache miss state transaction) will be generated later. Once the cache that missed the data receives the data later, the cause of the cache miss state transaction is eliminated, and the corresponding information can be retrieved from the MSHR, and the operation can be continued to complete the data acquisition process.
因此,本申请实施例可以基于解析请求报文所获得的结果,构建恢复流程。具体的,请求报文包括了失效地址、事务类型、关键字信息等内容,这些信息对缓存缺失状态事务的具体情况和产生原因进行了描述,基于这些信息构建的恢复流程旨在找到存储有目标数据的目标对象,并将目标数据提供给需要该数据的目标缓存,从而解决目标指令在目标缓存中未命中的问题。Therefore, the embodiment of the present application can construct a recovery process based on the results obtained by parsing the request message. Specifically, the request message includes the invalid address, transaction type, keyword information, etc., which describes the specific situation and cause of the cache missing state transaction. The recovery process constructed based on this information aims to find the target object storing the target data and provide the target data to the target cache that needs the data, thereby solving the problem of the target instruction not hitting the target cache.
例如,目标指令是在二级缓存L2中读取目标数据的指令,但由于二级缓存L2中未存储目标数据,所以目标指令在二级缓存L2中未命中,根据这些信息指定的恢复流程包括:MSHR与缓存流水线交互,确定若干可能存储有目标数据的目标对象,之后MSHR与目标对象交互,以控制确实存储有目标数据的目标对象将目标数据提供给二级缓存L2,最后MSHR与二级缓存L2交互,在确定二级缓存L2确实接收到目标数据后,完成恢复流程。在目标数据并存入二级缓存L2后,阻碍目标指令成功执行的问题即被解决,目标指令即可成功执行。For example, the target instruction is an instruction to read the target data in the L2 cache, but since the target data is not stored in the L2 cache, the target instruction does not hit in the L2 cache. The recovery process specified based on this information includes: MSHR interacts with the cache pipeline to determine a number of target objects that may store the target data, then MSHR interacts with the target object to control the target object that actually stores the target data to provide the target data to the L2 cache, and finally MSHR interacts with the L2 cache to complete the recovery process after determining that the L2 cache has actually received the target data. After the target data is stored in the L2 cache, the problem that hinders the successful execution of the target instruction is solved, and the target instruction can be successfully executed.
可选的,所述目标请求用于对目标数据进行处理,所述目标请求在目标缓存中未命中,步骤103具体可以包括:Optionally, the target request is used to process target data, and the target request does not hit in the target cache. Step 103 may specifically include:
子步骤1031、分别置位第一等待寄存器、第二等待寄存器、第三等待寄存器和第一准备寄存器,从而向缓存流水线发起读请求,并将所述解析结果保存至所述信息寄存器中。可选的,在确定缓存流水线接收了所述读请求时,还包括:步骤B1、复位所述第一准备寄存器的寄存器值。Sub-step 1031, respectively setting the first waiting register, the second waiting register, the third waiting register and the first preparation register, thereby initiating a read request to the cache pipeline, and saving the parsing result to the information register. Optionally, when it is determined that the cache pipeline has received the read request, it also includes: step B1, resetting the register value of the first preparation register.
子步骤1032、接收所述缓存流水线发送的读取结果,根据所述读取结果确定可能存储有所述目标数据的目标对象,并分别置位第四等待寄存器和第二准备寄存器,从而向所述目标对象发送监听报文,以供所述目标对象将所述目标数据提供给所述目标缓存。可选的,在接收到所述缓存流水线发送的读取结果时,还包括:步骤B2、复位所述第一等待寄存器和所述第二等待寄存器的寄存器值。可选的,在成功向所述目标对象发送了监听报文时,还包括:步骤B3、复位所述第二准备寄存器的寄存器值。可选的,在向所述目标缓存提供目标数据的过程中,还包括:步骤B4、复位所述第四等待寄存器的寄存器值。Sub-step 1032, receiving the read result sent by the cache pipeline, determining the target object that may store the target data based on the read result, and setting the fourth wait register and the second preparation register respectively, thereby sending a monitoring message to the target object, so that the target object can provide the target data to the target cache. Optionally, when receiving the read result sent by the cache pipeline, it also includes: step B2, resetting the register values of the first wait register and the second wait register. Optionally, when the monitoring message is successfully sent to the target object, it also includes: step B3, resetting the register value of the second preparation register. Optionally, in the process of providing target data to the target cache, it also includes: step B4, resetting the register value of the fourth wait register.
子步骤1033、在接收到所述目标缓存发送的回应报文时,确定所述目标缓存接收到所述目标数据,并完成所述恢复流程。可选的,在接收到所述目标缓存发送的回应报文时,还包括:步骤B5、复位所述第三等待寄存器的寄存器值。Sub-step 1033: upon receiving the response message sent by the target cache, determining that the target cache has received the target data and completing the recovery process. Optionally, upon receiving the response message sent by the target cache, the process further includes: step B5: resetting the register value of the third waiting register.
可选的,所述第一等待寄存器置位后的寄存器值用于表征等待所述缓存流水线的反馈;所述第二等待寄存器置位后的寄存器值用于表征等待针对所述监听报文的响应;所述第三等待寄存器置位后的寄存器值用于表征等待所述目标缓存的回应报文;所述第一准备寄存器置位后的寄存器值用于表征需向所述缓存流水线发起读请求;所述第四等待寄存器置位后的寄存器值用于表征等待目标对象完成所述目标数据的提供事务;所述第二准备寄存器置位后的寄存器值用于表征需向所述目标对象发送监听报文。需要说明的是,本申请实施例中的等待寄存器和准备寄存器的寄存器值可以为布尔分布值,如寄存器值可以为1或0。置位后的寄存器值可以为1,复位后的寄存器值可以为0.Optionally, the register value after the first wait register is set is used to represent waiting for feedback from the cache pipeline; the register value after the second wait register is set is used to represent waiting for a response to the monitoring message; the register value after the third wait register is set is used to represent waiting for a response message from the target cache; the register value after the first preparation register is set is used to represent the need to initiate a read request to the cache pipeline; the register value after the fourth wait register is set is used to represent waiting for the target object to complete the target data provision transaction; the register value after the second preparation register is set is used to represent the need to send a monitoring message to the target object. It should be noted that the register values of the wait register and the preparation register in the embodiment of the present application can be Boolean distribution values, such as register values can be 1 or 0. The register value after setting can be 1, and the register value after resetting can be 0.
在本申请实施例中,针对子步骤1031-1033,恢复流程开始执行时,首先需确定总体步骤流程以及当前需立即执行的操作。具体的,本申请实施例可以通过分别置位第一等待寄存器(mshr_pipeline_busy)、第二等待寄存器(mshr_snp_busy)、第三等待寄存器(mshr_compack_busy)来实现总体步骤流程的确立,即第一等待寄存器反映了MSHR需等待完成与缓存流水线的交互,从而确定可能存储有目标数据的目标对象;第二等待寄存器反映了MSHR需等待完成与目标对象的交互,从而以使得目标数据被提供给目标缓存;第三等待寄存器反映了MSHR需等待完成与目标缓存的交互,从而以确定目标缓存确实接收到目标数据。In the embodiment of the present application, for sub-steps 1031-1033, when the recovery process starts to execute, it is first necessary to determine the overall step process and the operation that needs to be executed immediately. Specifically, the embodiment of the present application can establish the overall step process by setting the first wait register (mshr_pipeline_busy), the second wait register (mshr_snp_busy), and the third wait register (mshr_compack_busy) respectively, that is, the first wait register reflects that MSHR needs to wait for the interaction with the cache pipeline to complete, so as to determine the target object that may store the target data; the second wait register reflects that MSHR needs to wait for the interaction with the target object to complete, so that the target data is provided to the target cache; the third wait register reflects that MSHR needs to wait for the interaction with the target cache to complete, so as to determine that the target cache has indeed received the target data.
本申请实施例可以通过置位第一准备寄存器(mshr_cachepipeline_rd_rdy)来实现当前需立即执行的操作的确立,即恢复流程开始执行时,MSHR需要立即向缓存流水线发起读请求,置位第一准备寄存器即可控制MSHR立即向缓存流水线发起读请求。另外,在MSHR确定缓存流水线接收了读请求时,可以复位第一准备寄存器的寄存器值,这表示第一准备寄存器(mshr_cachepipeline_rd_rdy)表征的操作事项已完成执行。In the embodiment of the present application, the establishment of the operation that needs to be executed immediately can be achieved by setting the first preparation register (mshr_cachepipeline_rd_rdy), that is, when the recovery process starts to execute, the MSHR needs to immediately initiate a read request to the cache pipeline, and setting the first preparation register can control the MSHR to immediately initiate a read request to the cache pipeline. In addition, when the MSHR determines that the cache pipeline has received the read request, the register value of the first preparation register can be reset, which indicates that the operation represented by the first preparation register (mshr_cachepipeline_rd_rdy) has been completed.
进一步的,缓存流水线在历史运行过程中,记录了各个缓存对象对数据的执行信息,因此,MSHR通过向缓存流水线发送读请求,即可根据缓存流水线响应于读请求返回的读取结果,确定有哪些目标对象可能存储有目标数据,并且MSHR与缓存流水线的交互还用于确定三级缓存L3针对目标数据是否也是未命中(L3未命中则需从内存中找目标数据)。确定了目标对象后,MSHR需立即向目标对象发送监听报文,监听报文用于供目标对象将目标数据提供给目标缓存。因此,MSHR可以在根据缓存流水线发送的读取结果,确定了可能存储有目标数据的目标对象时,置位第四等待寄存器(mshr_mem_rd_busy),从而新增等待目标对象完成目标数据的提供事务的等待事项:并且MSHR还可以同时置位第二准备寄存器(mshr_txsnp_rdy),从而控制MSHR立即向目标对象发送监听报文(snoop报文)。Furthermore, the cache pipeline records the execution information of each cache object on the data during its historical operation. Therefore, by sending a read request to the cache pipeline, MSHR can determine which target objects may store the target data based on the read result returned by the cache pipeline in response to the read request, and the interaction between MSHR and the cache pipeline is also used to determine whether the third-level cache L3 also misses the target data (if L3 misses, the target data needs to be found from the memory). After determining the target object, MSHR needs to immediately send a snoop message to the target object, and the snoop message is used for the target object to provide the target data to the target cache. Therefore, when MSHR determines the target object that may store the target data based on the read result sent by the cache pipeline, it can set the fourth wait register (mshr_mem_rd_busy), thereby adding a waiting item for the target object to complete the target data provision transaction: and MSHR can also set the second preparation register (mshr_txsnp_rdy) at the same time, thereby controlling MSHR to immediately send a snoop message (snoop message) to the target object.
另外,在MSHR确定接收到缓存流水线发送的读取结果时,还可以复位第一等待寄存器和第二等待寄存器的寄存器值,这表示第一等待寄存器(mshr_pipeline_busy)表征的等待与缓存流水线的交互事项已完成,以及第二等待寄存器(mshr_snp_busy)表征的等待与目标对象的交互事项已完成。进一步的,在MSHR成功向目标对象发送了监听报文时,还可以复位第二准备寄存器(mshr_txsnp_rdy)的寄存器值,这表示向目标对象发送监听报文的事项已完成执行。进一步的,在目标对象向所述目标缓存提供目标数据的过程中,还可以复位所述第四等待寄存器的寄存器值,这表示第四等待寄存器(mshr_mem_rd_busy)表征的等待目标对象完成目标数据的提供事务已完成。In addition, when MSHR determines that it has received the read result sent by the cache pipeline, the register values of the first wait register and the second wait register can also be reset, which indicates that the wait represented by the first wait register (mshr_pipeline_busy) for interaction with the cache pipeline has been completed, and the wait represented by the second wait register (mshr_snp_busy) for interaction with the target object has been completed. Further, when MSHR successfully sends a monitoring message to the target object, the register value of the second preparation register (mshr_txsnp_rdy) can also be reset, which indicates that the matter of sending the monitoring message to the target object has been completed. Further, in the process of the target object providing target data to the target cache, the register value of the fourth wait register can also be reset, which indicates that the transaction of waiting for the target object to complete the provision of target data represented by the fourth wait register (mshr_mem_rd_busy) has been completed.
最后,在MSHR接收到目标缓存发送的回应报文时,可以复位第三等待寄存器(mshr_compack_busy)的寄存器值,这表示MSHR确定目标缓存已接收到了目标数据,并完成了第三等待寄存器(mshr_compack_busy)表征的等待目标缓存的回应报文的事项,此时MSHR可以完成恢复流程。另外,解析请求报文获得的解析结果,以及整个恢复流程中产生的执行信息都可存储在信息寄存器中,以供恢复流程中的各个环节调用使用。Finally, when MSHR receives the response message sent by the target cache, the register value of the third waiting register (mshr_compack_busy) can be reset, which means that MSHR determines that the target cache has received the target data and has completed the matter of waiting for the response message of the target cache represented by the third waiting register (mshr_compack_busy). At this time, MSHR can complete the recovery process. In addition, the parsing results obtained by parsing the request message and the execution information generated in the entire recovery process can be stored in the information register for use by each link in the recovery process.
可见,通过上述对三类寄存器(等待寄存器、准备寄存器、信息寄存器)的置位、复位和信息记录,可以快速的确定恢复流程中的步骤以及步骤流转,并且精确的实现了对恢复流程中步骤的控制。It can be seen that through the above-mentioned setting, resetting and information recording of the three types of registers (wait register, preparation register, information register), the steps in the recovery process and the step flow can be quickly determined, and the control of the steps in the recovery process can be accurately achieved.
可选的,子步骤1033具体可以包括:Optionally, sub-step 1033 may specifically include:
子步骤10331、在接收到所述目标缓存发送的回应报文,且所有的等待寄存器都不存在置位情况时,确定所述目标缓存接收到所述目标数据,并完成所述恢复流程。Sub-step 10331: When a response message sent by the target cache is received and all wait registers are not set, it is determined that the target cache has received the target data and the recovery process is completed.
在本申请实施例中,恢复流程的执行终止条件是所有的等待寄存器都不存在置位情况时,即不存在还未完成的等待事项,此时可以确定恢复流程执行完毕。In the embodiment of the present application, the termination condition of the recovery process is when all the waiting registers are not set, that is, there are no unfinished waiting items, and at this time it can be determined that the recovery process is completed.
可选的,子步骤1032具体可以包括:Optionally, sub-step 1032 may specifically include:
子步骤10321、向所述目标对象发送监听报文,所述监听报文用于供所述目标对象将所述目标数据直接发送给所述目标缓存。Sub-step 10321: Send a monitoring message to the target object, where the monitoring message is used for the target object to send the target data directly to the target cache.
或,子步骤10322、向所述目标对象发送监听报文,并接收所述目标对象响应于所述监听报文后发送的目标数据,再将所述目标数据转发至所述目标缓存。Or, sub-step 10322, sending a monitoring message to the target object, receiving target data sent by the target object in response to the monitoring message, and then forwarding the target data to the target cache.
在本申请实施例中,目标对象向目标缓存提供目标数据的方式有两种,方式1为子步骤10321所示方案,即目标对象直接将目标数据发送给目标缓存。例如,假设包括多个处理器,每个处理器具有对应的二级缓存,则场景中存在多个二级缓存,且目标指令在二级缓存1中未命中,经MSHR与缓存流水线的交互,确定了二级缓存2中可能存储有目标数据,则在二级缓存2确实存储有目标数据的情况下,二级缓存2可以直接将目标数据发送至二级缓存1。In the embodiment of the present application, there are two ways for the target object to provide the target data to the target cache. Way 1 is the scheme shown in sub-step 10321, that is, the target object directly sends the target data to the target cache. For example, assuming that there are multiple processors, each processor has a corresponding L2 cache, there are multiple L2 caches in the scenario, and the target instruction does not hit in L2 cache 1. After the interaction between MSHR and the cache pipeline, it is determined that the target data may be stored in L2 cache 2. In the case that L2 cache 2 does store the target data, L2 cache 2 can directly send the target data to L2 cache 1.
方式2则为步骤10322所示方案,即目标对象直接先将目标数据发送给MSHR,再由MSHR将目标数据转发至目标缓存。例如,假设包括多个处理器,每个处理器具有对应的二级缓存,则场景中存在多个二级缓存,且目标指令在二级缓存1中未命中,经MSHR与缓存流水线的交互,确定了二级缓存2中可能存储有目标数据,则在二级缓存2确实存储有目标数据的情况下,二级缓存2可以直接将目标数据发送至MSHR,再由MSHR将目标数据转发至二级缓存1。Mode 2 is the scheme shown in step 10322, that is, the target object directly sends the target data to MSHR first, and then MSHR forwards the target data to the target cache. For example, assuming that there are multiple processors, each processor has a corresponding L2 cache, there are multiple L2 caches in the scenario, and the target instruction does not hit in L2 cache 1. After the interaction between MSHR and the cache pipeline, it is determined that the target data may be stored in L2 cache 2. In the case that L2 cache 2 does store the target data, L2 cache 2 can directly send the target data to MSHR, and then MSHR forwards the target data to L2 cache 1.
需要说明的是,假设包括多个处理器,每个处理器具有对应的二级缓存,则场景中存在多个二级缓存,目标请求在二级缓存1中未命中,针对目标请求为读请求的情况,在MSHR向多个可能存在目标数据的二级缓存(不包括二级缓存1)发送snoop报文后,若这些接收到snoop报文的二级缓存确实存储有目标数据,则确实存有目标数据的二级缓存可以直接将目标数据发送至二级缓存1,或确实存有目标数据的二级缓存先将目标数据发送至MSHR,再由MSHR转发至二级缓存1。It should be noted that, assuming that there are multiple processors, each processor has a corresponding secondary cache, there are multiple secondary caches in the scenario, and the target request does not hit in the secondary cache 1. In the case where the target request is a read request, after MSHR sends a snoop message to multiple secondary caches (excluding secondary cache 1) that may contain target data, if these secondary caches that receive the snoop message do store the target data, the secondary cache that does store the target data can directly send the target data to the secondary cache 1, or the secondary cache that does store the target data can first send the target data to MSHR, and then MSHR forwards it to the secondary cache 1.
针对目标请求为写请求的情况,在MSHR向多个可能存在目标数据的二级缓存(不包括二级缓存1)发送snoop报文后,snoop报文会供接收到的二级缓存清空自己存储的目标数据,并将目标数据提供给二级缓存1。In the case where the target request is a write request, after MSHR sends a snoop message to multiple secondary caches (excluding secondary cache 1) where the target data may exist, the snoop message will enable the received secondary cache to clear the target data stored in it and provide the target data to secondary cache 1.
另外,若二级缓存和三级缓存都不存在目标数据,则MSHR通过TXREQ通道向内存发送request报文;request报文告知内存所需哪些目标数据。针对目标请求为读请求的情况,内存可以反馈数据报文给MSHR,数据报文包括所需的目标数据,MSHR可以进一步将目标数据转发给未命中的二级缓存,或,内存可以直接反馈数据报文给未命中的二级缓存,以供未命中的二级缓存获得目标数据。针对目标请求为写请求的情况,内存可以反馈包括目标数据的response报文给MSHR,之后MSHR可以发送包括目标数据的数据报文给未命中的二级缓存,数据报文包括要写的数据。In addition, if the target data does not exist in both the L2 cache and the L3 cache, the MSHR sends a request message to the memory through the TXREQ channel; the request message informs the memory which target data is required. In the case where the target request is a read request, the memory can feedback a data message to the MSHR, and the data message includes the required target data. The MSHR can further forward the target data to the missed L2 cache, or the memory can directly feedback the data message to the missed L2 cache so that the missed L2 cache can obtain the target data. In the case where the target request is a write request, the memory can feedback a response message including the target data to the MSHR, and then the MSHR can send a data message including the target data to the missed L2 cache, and the data message includes the data to be written.
可选的,在所述目标请求为写请求的情况下,子步骤1033具体可以包括:Optionally, when the target request is a write request, sub-step 1033 may specifically include:
子步骤10323、向所述目标对象发送监听报文,所述监听报文用于供所述目标对象在存储有所述目标数据的情况下,将所述目标数据提供给所述目标缓存以使所述写请求成功执行,以及清除所述目标对象所存储的目标数据以保证数据一致性。Sub-step 10323, sending a monitoring message to the target object, wherein the monitoring message is used for the target object to provide the target data to the target cache when the target data is stored so that the write request can be successfully executed, and to clear the target data stored by the target object to ensure data consistency.
在本申请实施例中,CHI协议规范了缓存处理过程中的数据一致性问题,数据一致性问题主要产生于目标请求为写请求的情况,例如,假设包括多个处理器,每个处理器具有对应的二级缓存,则场景中存在多个二级缓存,每个二级缓存都包括10个缓存块,目标请求要对二级缓存1的缓存块5中的目标数据进行写操作,但是由于二级缓存1的缓存块5未存储目标数据,则目标请求在二级缓存1未命中,但是二级缓存2和二级缓存3各自的缓冲块5中都存储有目标数据,则后续通过缓存缺失状态事务的恢复流程,找到目标数据(从二级缓存2、二级缓存3、三级缓存或内存)并存入二级缓存1的缓存块5后,目标请求即可成功执行,实现对二级缓存1的缓存块5中的目标数据的写入操作,但是,基于数据一致性要求,若二级缓存2和二级缓存3各自的缓存块5中不清除所存储的目标数据(除二级缓存1之外的其他存储了目标数据的存储对象都需清除所存储的目标数据),则会引发数据不一致问题,即出现脏数据。这是因为目标请求对二级缓存1的缓存块5中的目标数据进行写操作后,目标数据发生了变化,而除二级缓存1之外的其他存储了目标数据的存储对象所存储的目标数据并未接收到写操作,即这些存储对象存储的目标数据和二级缓存1的缓存块5中经过写操作的目标数据不一致,这就导致同一数据在不同存储对象中出现不一致,这就意味着同一个地址的数据在不同的二级缓存中不相同,导致计算错误,进而影响程序正确运行。In the embodiment of the present application, the CHI protocol standardizes the data consistency problem in the cache processing process. The data consistency problem mainly occurs when the target request is a write request. For example, assuming that there are multiple processors, each processor has a corresponding secondary cache, then there are multiple secondary caches in the scenario, each secondary cache includes 10 cache blocks, and the target request is to write the target data in cache block 5 of secondary cache 1, but because cache block 5 of secondary cache 1 does not store the target data, the target request misses in secondary cache 1, but the cache blocks 5 of secondary cache 2 and secondary cache 3 each store the target data. Target data, then through the recovery process of cache missing state transactions, after finding the target data (from L2 cache 2, L2 cache 3, L3 cache or memory) and storing it in cache block 5 of L2 cache 1, the target request can be successfully executed, and the write operation of the target data in cache block 5 of L2 cache 1 is realized. However, based on the data consistency requirement, if the stored target data is not cleared in the cache blocks 5 of L2 cache 2 and L2 cache 3 (the stored target data must be cleared in other storage objects other than L2 cache 1), data inconsistency problem will be caused, that is, dirty data will appear. This is because after the target request writes the target data in cache block 5 of L2 cache 1, the target data changes, while the target data stored in other storage objects other than L2 cache 1 that store the target data do not receive the write operation, that is, the target data stored in these storage objects are inconsistent with the target data in cache block 5 of L2 cache 1 after the write operation, which leads to inconsistency of the same data in different storage objects, which means that the data of the same address is different in different L2 caches, resulting in calculation errors, which in turn affects the correct operation of the program.
具体的,若目标请求是向目标缓存的目标缓存块进行写操作的请求,则首先判断该目标缓存块是否存储有数据,若目标缓存的目标缓存块未存储数据,则需保证其他平级的目标缓存的相同目标缓存块也未存储数据再进行写操作,从而保证数据一致性。若目标缓存的目标缓存块存储有数据,则需清除除目标缓存之外的其他存储对象所存储的目标数据,保证对目标缓存重填后,目标数据仅在目标缓存的目标缓存块中存储,之后再进行写操作,从而保证数据一致性。Specifically, if the target request is a request to write to the target cache block of the target cache, it is first determined whether the target cache block stores data. If the target cache block of the target cache does not store data, it is necessary to ensure that the same target cache block of other target caches at the same level also does not store data before performing the write operation, thereby ensuring data consistency. If the target cache block of the target cache stores data, it is necessary to clear the target data stored in other storage objects except the target cache, to ensure that after the target cache is refilled, the target data is only stored in the target cache block of the target cache, and then perform the write operation, thereby ensuring data consistency.
从而在该步骤中,接收到监听报文的目标对象,可以在存储有目标数据的情况下,既将目标数据提供给目标缓存以使写请求成功执行,又同时除目标对象所存储的目标数据,这样全局仅有目标缓存存储有唯一的目标数据,针对目标数据的写操作发生后,更新后的目标数据也唯一在目标缓存中存在,不会有其他存储对象存储有未发生写操作的目标数据,这保证了目标数据在全局中的一致性。Therefore, in this step, the target object that receives the monitoring message can provide the target data to the target cache to successfully execute the write request if the target data is stored, and at the same time delete the target data stored in the target object. In this way, only the target cache stores the unique target data globally. After the write operation on the target data occurs, the updated target data also exists only in the target cache, and no other storage object will store the target data on which the write operation has not occurred, which ensures the consistency of the target data globally.
在本申请实施例中,现提供一个缓存缺失状态事务的处理的具体示例:In the embodiment of the present application, a specific example of processing a cache missing state transaction is now provided:
假设目标请求为ReadUnique请求,ReadUnique请求用于在二级缓存1的缓存块1中执行写操作,并且处理器的其他二级缓存和三级缓存都未存储写操作所针对的目标数据,缓存块的大小为64字节,数据报文的data字段宽度为32字节。ReadUnique请求在二级缓存1的缓存块1未命中。Assume that the target request is a ReadUnique request, which is used to perform a write operation in cache block 1 of L2 cache 1, and the other L2 caches and L3 caches of the processor do not store the target data for the write operation, the size of the cache block is 64 bytes, and the width of the data field of the data message is 32 bytes. The ReadUnique request misses cache block 1 of L2 cache 1.
S1、ReadUnique请求对应的缓存缺失状态事务入队MSHR,同时置位mshr_pipeline_busy、mshr_snp_busy、mshr_compack_busy和mshr_cachepipeline_rd_rdy寄存器,并保存相关信息至信息寄存器。S1. The cache miss status transaction corresponding to the ReadUnique request is queued in MSHR, and the mshr_pipeline_busy, mshr_snp_busy, mshr_compack_busy, and mshr_cachepipeline_rd_rdy registers are set, and the relevant information is saved in the information register.
S2、MSHR向缓存流水线发起读请求,在确定缓存流水线接收到读请求后,复位mshr_cachepipeline_rd_rdy寄存器。S2. MSHR initiates a read request to the cache pipeline. After confirming that the cache pipeline has received the read request, it resets the mshr_cachepipeline_rd_rdy register.
S3、缓存流水线向MSHR反馈读请求结果,MSHR根据读请求结果,置位mshr_txreq_rd_rdy、mshr_mem_rd_busy寄存器,同时复位mshr_snp_busy、mshr_pipeline_busy寄存器。S3. The cache pipeline feeds back the read request result to MSHR. MSHR sets the mshr_txreq_rd_rdy and mshr_mem_rd_busy registers according to the read request result, and resets the mshr_snp_busy and mshr_pipeline_busy registers at the same time.
S4、MSHR通过TXREQ通道向内存发送request报文,发送成功可复位mshr_txreq_rd_rdy寄存器。S4. MSHR sends a request message to the memory through the TXREQ channel. If the message is sent successfully, the mshr_txreq_rd_rdy register can be reset.
S5、MSHR接收来自内存的第一个数据报文,置位mshr_dat_memgetone、mshr_datbuf_rn_busy寄存器,复位mshr_mem_rd_busy寄存器。S5. MSHR receives the first data message from the memory, sets the mshr_dat_memgetone and mshr_datbuf_rn_busy registers, and resets the mshr_mem_rd_busy register.
S6、MSHR接收来自内存的第二个数据报文,置位mshr_txdat_rn_rdy寄存器。S6. MSHR receives the second data message from the memory and sets the mshr_txdat_rn_rdy register.
S7、MSHR通过TXDAT通道向二级缓存1发送数据报文,成功发送报文可复位mshr_txdat_rn_rdy、mshr_datbuf_rn_busy寄存器。S7, MSHR sends a data message to the secondary cache 1 through the TXDAT channel. Successful message transmission can reset the mshr_txdat_rn_rdy and mshr_datbuf_rn_busy registers.
S8、MSHR在接收到二级缓存1发送的回应报文时,复位mshr_compack_busy寄存器。S8. When receiving the response message sent by the L2 cache 1, the MSHR resets the mshr_compack_busy register.
S9、在所有等待寄存器都没有置位情况时,结束当前缓存缺失状态事务的恢复流程。S9. When all the waiting registers are not set, the recovery process of the current cache miss state transaction ends.
综上,本申请实施例可以通过对缺失状态事务所对应的请求报文进行解析,获得缺失状态的恢复流程;并根据恢复流程对等待寄存器、准备寄存器和信息寄存器分别进行操作,通过等待寄存器、准备寄存器和信息寄存器各自的寄存器值,完成所述恢复流程。本申请通过对等待寄存器、准备寄存器和信息寄存器分别进行置位和复位,即可高效、准确且低功耗的实现恢复流程。这是因为这三类寄存器的设计无冗余且这三类寄存器可由高速物理电路所实现,执行时的能耗较低且电路占用面积较小,另外,这三类寄存器对寄存器值的维护简单且精准,对这三类寄存器进行置位和复位即可实现对恢复流程的控制,从而使得缺失状态寄存器可以高效、准确且低功耗的实现对缓存缺失状态事务的处理。In summary, the embodiment of the present application can parse the request message corresponding to the missing state transaction to obtain the recovery process of the missing state; and operate the waiting register, the preparation register and the information register respectively according to the recovery process, and complete the recovery process through the register values of the waiting register, the preparation register and the information register. The present application can realize the recovery process efficiently, accurately and with low power consumption by setting and resetting the waiting register, the preparation register and the information register respectively. This is because the design of these three types of registers is non-redundant and these three types of registers can be implemented by high-speed physical circuits, the energy consumption during execution is low and the circuit occupies a small area. In addition, the maintenance of the register values of these three types of registers is simple and accurate. Setting and resetting these three types of registers can realize the control of the recovery process, so that the missing state register can realize the processing of cache missing state transactions efficiently, accurately and with low power consumption.
图3是本申请实施例提供的一种缓存缺失状态事务的处理装置的框图,该装置包括:FIG3 is a block diagram of a cache miss state transaction processing device provided by an embodiment of the present application, the device comprising:
获取模块301,用于接收针对目标请求的请求报文;所述请求报文是针对目标请求产生的缺失状态事务所生成的报文;所述缺失状态事务表征所述目标请求未被缓存流水线成功执行;The acquisition module 301 is used to receive a request message for a target request; the request message is a message generated by a missing state transaction generated for the target request; the missing state transaction indicates that the target request has not been successfully executed by the cache pipeline;
解析模块302,用于解析所述请求报文,并根据解析结果确定缺失状态的恢复流程;The parsing module 302 is used to parse the request message and determine the recovery process of the missing state according to the parsing result;
配置模块303,用于根据所述恢复流程对等待寄存器、准备寄存器和信息寄存器分别进行操作,并通过所述等待寄存器、所述准备寄存器和所述信息寄存器各自的寄存器值,完成所述恢复流程,从而消除缓存中导致所述缺失状态事务产生的原因,使得所述目标请求被缓存流水线成功执行;The configuration module 303 is used to operate the waiting register, the preparation register and the information register respectively according to the recovery process, and complete the recovery process through the register values of the waiting register, the preparation register and the information register, so as to eliminate the cause of the missing state transaction in the cache, so that the target request is successfully executed by the cache pipeline;
其中,所述等待寄存器的寄存器值用于表征当前是否需要等待未完成执行的第一操作执行完毕,所述准备寄存器中的寄存器值用于表征当前是否需要立即执行第二操作;所述信息寄存器中的寄存器值用于记录所述解析结果以及所述恢复流程中的执行信息。Among them, the register value of the waiting register is used to indicate whether it is necessary to wait for the unfinished first operation to be completed, and the register value in the preparation register is used to indicate whether it is necessary to execute the second operation immediately; the register value in the information register is used to record the analysis result and the execution information in the recovery process.
可选的,所述目标请求用于对目标数据进行处理,所述目标请求在目标缓存中未命中,所述恢复流程包括:Optionally, the target request is used to process target data, and the target request does not hit in the target cache, and the recovery process includes:
与缓存流水线交互,确定是否存在可能存储有所述目标数据的目标对象;所述目标对象为除所述目标缓存之外的其他缓存对象或内存对象;Interacting with the cache pipeline to determine whether there is a target object that may store the target data; the target object is a cache object or a memory object other than the target cache;
在确定存在所述目标对象时,与所述目标对象交互,以使得所述目标数据被提供给所述目标缓存;When it is determined that the target object exists, interacting with the target object so that the target data is provided to the target cache;
与所述目标缓存交互,在确定所述目标缓存接收到所述目标数据后,完成所述恢复流程。The device interacts with the target cache and completes the recovery process after determining that the target cache has received the target data.
可选的,所述目标请求用于对目标数据进行处理,所述目标请求在目标缓存中未命中,所述配置模块303,包括:Optionally, the target request is used to process target data, and the target request does not hit in the target cache. The configuration module 303 includes:
第一交互子模块,用于分别置位第一等待寄存器、第二等待寄存器、第三等待寄存器和第一准备寄存器,从而向缓存流水线发起读请求,并将所述解析结果保存至所述信息寄存器中;A first interaction submodule, used for respectively setting a first waiting register, a second waiting register, a third waiting register and a first preparation register, so as to initiate a read request to the cache pipeline, and save the parsing result to the information register;
第二交互子模块,用于接收所述缓存流水线发送的读取结果,根据所述读取结果确定可能存储有所述目标数据的目标对象,并分别置位第四等待寄存器和第二准备寄存器,从而向所述目标对象发送监听报文,以供所述目标对象将所述目标数据提供给所述目标缓存;a second interaction submodule, configured to receive a read result sent by the cache pipeline, determine a target object that may store the target data according to the read result, and respectively set a fourth wait register and a second prepare register, thereby sending a monitoring message to the target object, so that the target object provides the target data to the target cache;
第三交互子模块,用于在接收到所述目标缓存发送的回应报文时,确定所述目标缓存接收到所述目标数据,并完成所述恢复流程。The third interaction submodule is used to determine that the target cache has received the target data and complete the recovery process when receiving a response message sent by the target cache.
可选的,所述第一等待寄存器置位后的寄存器值用于表征等待所述缓存流水线的反馈;所述第二等待寄存器置位后的寄存器值用于表征等待针对所述监听报文的响应;所述第三等待寄存器置位后的寄存器值用于表征等待所述目标缓存的回应报文;所述第一准备寄存器置位后的寄存器值用于表征需向所述缓存流水线发起读请求;所述第四等待寄存器置位后的寄存器值用于表征等待目标对象完成所述目标数据的提供事务;所述第二准备寄存器置位后的寄存器值用于表征需向所述目标对象发送监听报文。Optionally, the register value after the first wait register is set is used to represent waiting for feedback from the cache pipeline; the register value after the second wait register is set is used to represent waiting for a response to the monitoring message; the register value after the third wait register is set is used to represent waiting for a response message from the target cache; the register value after the first preparation register is set is used to represent the need to initiate a read request to the cache pipeline; the register value after the fourth wait register is set is used to represent waiting for the target object to complete the transaction of providing the target data; the register value after the second preparation register is set is used to represent the need to send a monitoring message to the target object.
可选的,所述装置还包括:Optionally, the device further comprises:
第一复位模块,用于在确定所述缓存流水线接收了所述读请求时,复位所述第一准备寄存器的寄存器值;A first reset module, configured to reset the register value of the first preparation register when it is determined that the cache pipeline has received the read request;
第二复位模块,用于在接收到所述缓存流水线发送的读取结果时,复位所述第一等待寄存器和所述第二等待寄存器的寄存器值;A second reset module, configured to reset register values of the first wait register and the second wait register upon receiving a read result sent by the cache pipeline;
第三复位模块,用于在成功向所述目标对象发送了监听报文时,复位所述第二准备寄存器的寄存器值;A third resetting module, configured to reset the register value of the second preparation register when the monitoring message is successfully sent to the target object;
第四复位模块,用于在向所述目标缓存提供目标数据的过程中,复位所述第四等待寄存器的寄存器值;a fourth resetting module, configured to reset the register value of the fourth waiting register in the process of providing the target data to the target cache;
第五复位模块,用于在接收到所述目标缓存发送的回应报文时,复位所述第三等待寄存器的寄存器值。The fifth resetting module is used to reset the register value of the third waiting register when receiving the response message sent by the target cache.
可选的,所述第三交互子模块,包括:Optionally, the third interaction submodule includes:
检查单元,用于在接收到所述目标缓存发送的回应报文,且所有的等待寄存器都不存在置位情况时,确定所述目标缓存接收到所述目标数据,并完成所述恢复流程。The checking unit is used to determine that the target cache has received the target data and complete the recovery process when a response message sent by the target cache is received and all the waiting registers are not set.
可选的,所述第二交互子模块,包括:Optionally, the second interaction submodule includes:
第一发送单元,用于向所述目标对象发送监听报文,所述监听报文用于供所述目标对象将所述目标数据直接发送给所述目标缓存;A first sending unit, configured to send a monitoring message to the target object, wherein the monitoring message is used for the target object to directly send the target data to the target cache;
或,第二发送单元,用于向所述目标对象发送监听报文,并接收所述目标对象响应于所述监听报文后发送的目标数据,再将所述目标数据转发至所述目标缓存。Or, a second sending unit is used to send a monitoring message to the target object, receive target data sent by the target object in response to the monitoring message, and then forward the target data to the target cache.
可选的,在所述目标请求为写请求的情况下,所述第二交互子模块,包括:Optionally, when the target request is a write request, the second interaction submodule includes:
一致性单元,用于向所述目标对象发送监听报文,所述监听报文用于供所述目标对象在存储有所述目标数据的情况下,将所述目标数据提供给所述目标缓存以使所述写请求成功执行,以及清除所述目标对象所存储的目标数据以保证数据一致性。A consistency unit is used to send a monitoring message to the target object, and the monitoring message is used for the target object to provide the target data to the target cache when the target data is stored so that the write request can be successfully executed, and to clear the target data stored by the target object to ensure data consistency.
综上,本申请实施例可以通过对缺失状态事务所对应的请求报文进行解析,获得缺失状态的恢复流程;并根据恢复流程对等待寄存器、准备寄存器和信息寄存器分别进行操作,通过等待寄存器、准备寄存器和信息寄存器各自的寄存器值,完成所述恢复流程。本申请通过对等待寄存器、准备寄存器和信息寄存器分别进行置位和复位,即可高效、准确且低功耗的实现恢复流程。这是因为这三类寄存器的设计无冗余且这三类寄存器可由高速物理电路所实现,执行时的能耗较低且电路占用面积较小,另外,这三类寄存器对寄存器值的维护简单且精准,对这三类寄存器进行置位和复位即可实现对恢复流程的控制,从而使得缺失状态寄存器可以高效、准确且低功耗的实现对缓存缺失状态事务的处理。In summary, the embodiment of the present application can parse the request message corresponding to the missing state transaction to obtain the recovery process of the missing state; and operate the waiting register, the preparation register and the information register respectively according to the recovery process, and complete the recovery process through the register values of the waiting register, the preparation register and the information register. The present application can realize the recovery process efficiently, accurately and with low power consumption by setting and resetting the waiting register, the preparation register and the information register respectively. This is because the design of these three types of registers is non-redundant and these three types of registers can be implemented by high-speed physical circuits, the energy consumption during execution is low and the circuit occupies a small area. In addition, the maintenance of the register values of these three types of registers is simple and accurate. Setting and resetting these three types of registers can realize the control of the recovery process, so that the missing state register can realize the processing of cache missing state transactions efficiently, accurately and with low power consumption.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
本申请实施例提供了一种缓存缺失状态事务的处理装置,包括有存储器,以及一个以上的程序,其中一个以上程序存储于存储器中,且经配置以由一个以上处理器执行所述一个以上程序包含用于进行上述一个或多个实施例中所述的方法。An embodiment of the present application provides a processing device for cache miss status transactions, including a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors to include methods for performing one or more of the methods described in the above-mentioned embodiments.
图4是根据一示例性实施例示出的一种缓存缺失状态事务的处理装置800的框图。例如,装置800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 4 is a block diagram of a cache miss state transaction processing device 800 according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
参照图4,装置800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。4 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input/output (I/O) interface 812 , a sensor component 814 , and a communication component 816 .
处理组件802通常控制装置800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理元件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
存储器804被配置为存储各种类型的数据以支持在设备800的操作。这些数据的示例包括用于在装置800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
电源组件806为装置800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为装置800生成、管理和分配电力相关联的组件。The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
多媒体组件808包括在所述装置800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当装置800处于操作模式,如呼叫模式、记录模式和语音信息处理模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a voice information processing mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。I/O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为装置800提供各个方面的状态评估。例如,传感器组件814可以检测到设备800的打开/关闭状态,组件的相对定位,例如所述组件为装置800的显示器和小键盘,传感器组件814还可以搜索装置800或装置800一个组件的位置改变,用户与装置800接触的存在或不存在,装置800方位或加速/减速和装置800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open/closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also search for changes in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件816被配置为便于装置800和其他设备之间有线或无线方式的通信。装置800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频信息处理(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency information processing (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,装置800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器804,上述指令可由装置800的处理器820执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
图5是本申请的一些实施例中服务端的结构示意图。该服务端1900可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(centralprocessingunits,CPU)1922(例如,一个或一个以上处理器)和存储器1932,一个或一个以上存储应用程序1942或数据1944的存储介质1930(例如一个或一个以上海量存储设备)。其中,存储器1932和存储介质1930可以是短暂存储或持久存储。存储在存储介质1930的程序可以包括一个或一个以上模块(图5示没标出),每个模块可以包括对服务端中的一系列指令操作。更进一步地,中央处理器1922可以设置为与存储介质1930通信,在服务端1900上执行存储介质1930中的一系列指令操作。FIG5 is a schematic diagram of the structure of the server in some embodiments of the present application. The server 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1922 (for example, one or more processors) and memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944. Among them, the memory 1932 and the storage medium 1930 can be short-term storage or permanent storage. The program stored in the storage medium 1930 may include one or more modules (not shown in FIG5), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1922 can be configured to communicate with the storage medium 1930 and execute a series of instruction operations in the storage medium 1930 on the server 1900.
服务端1900还可以包括一个或一个以上电源1926,一个或一个以上有线或无线网络接口1950,一个或一个以上输入输出接口1958,一个或一个以上键盘1956,和/或,一个或一个以上操作系统1941,例如WindowsServerTM,MacOSXTM,UnixTM,LinuxTM,FreeBSDTM等等。The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, FreeBSD TM, etc.
一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置(服务端或者终端)的处理器执行时,使得装置能够执行上述实施例方法。A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device (server or terminal), enables the device to execute the above-mentioned embodiment method.
一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置(服务端或者终端)的处理器执行时,使得装置能够执行上述实施例方法的描述,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的计算机程序产品或者计算机程序实施例中未披露的技术细节,请参照本申请方法实施例的描述。A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the device (server or terminal), enables the device to perform the description of the method of the above embodiment, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.
此外,需要说明的是:本申请实施例还提供了一种计算机程序产品或计算机程序,该计算机程序产品或者计算机程序可以包括计算机指令,该计算机指令可以存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器可以执行该计算机指令,使得该计算机设备执行上述实施例方法的描述,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的计算机程序产品或者计算机程序实施例中未披露的技术细节,请参照本申请方法实施例的描述。In addition, it should be noted that: the embodiment of the present application also provides a computer program product or a computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions so that the computer device performs the description of the method of the above embodiment, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.
本领域技术人员在考虑说明书及实践这里公开的申请后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
以上对本申请所提供的一种缓存缺失状态事务的处理方法、装置、电子设备及计算机可读存储介质,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The above is a detailed introduction to a method, device, electronic device and computer-readable storage medium for processing cache miss state transactions provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410742964.7A CN118689596A (en) | 2024-06-07 | 2024-06-07 | Method, device, equipment and storage medium for processing cache miss state transactions |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410742964.7A CN118689596A (en) | 2024-06-07 | 2024-06-07 | Method, device, equipment and storage medium for processing cache miss state transactions |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118689596A true CN118689596A (en) | 2024-09-24 |
Family
ID=92769775
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410742964.7A Pending CN118689596A (en) | 2024-06-07 | 2024-06-07 | Method, device, equipment and storage medium for processing cache miss state transactions |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118689596A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4370710A (en) * | 1980-08-26 | 1983-01-25 | Control Data Corporation | Cache memory organization utilizing miss information holding registers to prevent lockup from cache misses |
US6438650B1 (en) * | 1998-12-16 | 2002-08-20 | Intel Corporation | Method and apparatus for processing cache misses |
CN115048142A (en) * | 2022-03-22 | 2022-09-13 | 深圳云豹智能有限公司 | Cache access command processing system, method, device, equipment and storage medium |
CN117573573A (en) * | 2024-01-15 | 2024-02-20 | 北京开源芯片研究院 | Processing method, device, equipment and storage medium for cache request |
CN117609110A (en) * | 2023-12-19 | 2024-02-27 | 北京开源芯片研究院 | Caching method, cache, electronic device and readable storage medium |
-
2024
- 2024-06-07 CN CN202410742964.7A patent/CN118689596A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4370710A (en) * | 1980-08-26 | 1983-01-25 | Control Data Corporation | Cache memory organization utilizing miss information holding registers to prevent lockup from cache misses |
US6438650B1 (en) * | 1998-12-16 | 2002-08-20 | Intel Corporation | Method and apparatus for processing cache misses |
CN115048142A (en) * | 2022-03-22 | 2022-09-13 | 深圳云豹智能有限公司 | Cache access command processing system, method, device, equipment and storage medium |
CN117609110A (en) * | 2023-12-19 | 2024-02-27 | 北京开源芯片研究院 | Caching method, cache, electronic device and readable storage medium |
CN117573573A (en) * | 2024-01-15 | 2024-02-20 | 北京开源芯片研究院 | Processing method, device, equipment and storage medium for cache request |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103543988B (en) | Method for processing array information, method and device of controlling information to enter arrays | |
CN107092628B (en) | Method and device for processing time series data | |
CN110134550B (en) | A data processing method, device and computer readable storage medium | |
JP2017500669A (en) | Remote direct memory access (RDMA) high performance producer consumer message processing | |
CN115208810A (en) | Forwarding flow table accelerating method and device, electronic equipment and storage medium | |
US11921683B2 (en) | Use of time to live value during database compaction | |
US20160019100A1 (en) | Method, Apparatus, and Chip for Implementing Mutually-Exclusive Operation of Multiple Threads | |
CN111831618A (en) | Data writing method, data reading method, apparatus, device and storage medium | |
CN108415861B (en) | Apparatus and method for cache content management | |
WO2021238011A1 (en) | Data processing method and apparatus, and electronic device | |
WO2023165188A1 (en) | Sequential read prefetching method and apparatus, device, and medium | |
CN118656342A (en) | Cache method, device, electronic device and readable storage medium | |
TW201734842A (en) | Message management method and device, and message pre-reading method and device | |
CN118689596A (en) | Method, device, equipment and storage medium for processing cache miss state transactions | |
CN114579480A (en) | Page missing processing method, device and system, electronic equipment and storage medium | |
CN117453435B (en) | Cache data reading method, device, equipment and storage medium | |
CN116643849A (en) | Service logic processing method, device, computer equipment and storage medium | |
CN118819282A (en) | Asynchronous IO processing method, device, system and storage medium | |
KR102692838B1 (en) | Enhanced read-ahead capability for storage devices | |
WO2022001133A1 (en) | Method and system for improving soft copy read performance, terminal, and storage medium | |
CN114816566A (en) | Instruction moving method, system, equipment and medium | |
WO2019223667A1 (en) | Information query method for terminal, and terminal | |
US10848554B2 (en) | Memory efficient asynchronous high availability replication | |
CN116912079B (en) | Data processing system, electronic component, electronic device and data processing method | |
CN117573572B (en) | Method, device, equipment and storage medium for processing refill data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |