Data request processing circuit, method, cache circuit and processor thereof
Patent Information
- Application Number
- CN202211733347.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-12-30
Smart Images

Figure CN116010293B
Abstract
Description
Technical Field
[0001] The present application relates to the field of processor technology, and in particular to a data request processing circuit, method, cache circuit and processor thereof. Background Art
[0002] The cache circuit of the current processor will have a large overhead when the cache misses. In order to avoid blocking the upstream to continue running in the case of a cache miss, the cache circuit introduces the Miss Status Handling Registers (MSHR) circuit to complete the implementation of non-blocking cache.
[0003] In a traditional MSHR circuit, when downstream data is returned, the MSHR circuit first writes the downstream data into the cached data random access memory (Data RAM), and then reads the stored downstream data from the Data RAM and returns it to the upstream to respond to the corresponding data request.
[0004] However, the above method requires that the returned downstream data be written into the Data RAM and read out from the Data RAM, and the reading and writing process takes a long time, thus causing the problem of low data request efficiency. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a data request processing circuit, method, cache circuit and processor thereof, so as to solve the problem of low efficiency existing in the traditional MSHR circuit.
[0006] In a first aspect, the present invention provides a data request processing circuit, which includes: a downstream data processing module, a data request management module and an upstream management module; the downstream data processing module is used to transmit the acquired target downstream data to the upstream management module; wherein the target downstream data is read in the downstream memory through the target data request missed by the cache; the data request management module is used to transmit the target data request information associated with the target downstream data to the upstream management module; the upstream management module is used to transmit the target downstream data and the associated target data request information to the upstream device to respond to the target data request.
[0007] The data request processing circuit designed above, when obtaining the target downstream data, this scheme directly transmits the obtained target downstream data to the upstream management module through the downstream data processing module, and transmits the target data request information associated with the target downstream data to the upstream management module through the data request management module, and transmits the obtained target downstream data and the associated target data request information to the upstream device through the upstream management module, thereby responding to the target data request. Since this scheme directly transmits the target downstream data to the upstream, the data request processing circuit designed in this scheme does not need to write and read the Data RAM, thereby improving the response time and power consumption of data requests that miss the cache.
[0008] In an optional implementation of the first aspect, the downstream data processing module is electrically connected to the upstream management module, the data request management module is electrically connected to the upstream management module, and the upstream management module is used to be electrically connected to the upstream device.
[0009] In an optional implementation of the first aspect, the circuit further includes a cache module, and the downstream data processing module is electrically connected to the cache module; the downstream data processing module is also used to write the target downstream data into the cache module. In this implementation, the target downstream data is written into the cache module 40 for storage, so that the target data request achieves a cache hit when it is accessed next time, and is directly read from the cache, thereby improving access efficiency and reducing power consumption.
[0010] In an optional implementation of the first aspect, the data request management module stores multiple cache-missing data requests; the data request module is also used to determine the target data request associated with the target downstream data among the multiple cache-missing data requests to obtain target data request information of the target data request.
[0011] In an optional implementation of the first aspect, the downstream data processing module is electrically connected to the data request management module; the downstream data processing module is also used to transmit the target request identifier corresponding to the acquired target downstream data to the data request management module; the data request management module is also used to search for data requests with the same request identifier in multiple cache-missed data requests according to the target request identifier corresponding to the target downstream data transmitted by the downstream data processing module, and obtain the target data request associated with the target downstream data. In this implementation, the information of all target data requests associated with the target downstream data is sent to the upstream management module through the data request management module, so that all data requests associated with the target downstream data are processed at one time, and there is no need to access them multiple times, thereby reducing access power consumption.
[0012] In an optional implementation of the first aspect, the downstream data processing module is also used to obtain the target data request information of cache misses transmitted by the data request management module; and read the corresponding data in the downstream memory according to the target identifier to obtain the target downstream data; wherein the target data request information includes the target request identifier.
[0013] In an optional implementation manner of the first aspect, the target request identifier includes at least one of a target request address and a unique identifier carried by the target request.
[0014] In a second aspect, the present invention provides a cache circuit, wherein the cache circuit comprises the data request processing circuit described in any one of the implementations of the first aspect.
[0015] The cache circuit designed above includes the data request processing circuit of any of the aforementioned optional implementation modes. Therefore, when a data request cache misses, the cache circuit directly transmits the target downstream data and the target data request information associated with the target downstream data to the upstream without writing and reading the Data RAM, thereby improving the response time and power consumption of the data request that misses the cache.
[0016] In a third aspect, the present invention provides a processor, wherein the processor comprises the cache circuit described in the second aspect.
[0017] The processor designed as above includes the aforementioned cache circuit. Therefore, when a data request cache misses, the processor directly transmits the target downstream data and the target data request information associated with the target downstream data to the upstream without writing and reading the Data RAM, thereby improving the response time and power consumption of the data request that misses the cache.
[0018] In a fourth aspect, the present invention provides a data request processing method, the method comprising: when target downstream data is read in a downstream memory according to target data request information, directly transmitting the target downstream data and target data request information associated with the target downstream data to an upstream device to respond to the target data request.
[0019] The data request processing method designed above directly transmits the returned downstream data to the upstream, and also returns the target data request information associated with the downstream data to the upstream, so as to respond to the target data request of the cache miss, thereby eliminating the need to write and read the Data RAM, thereby improving the response time and power consumption of the data request of the cache miss.
[0020] In an optional implementation of the fourth aspect, before transmitting the target downstream data and the target data request information associated with the target downstream data to the upstream device, the method also includes: searching for a data request with the same request identifier among multiple cache-missing data requests according to the target request identifier corresponding to the target downstream data, and obtaining the target data request associated with the target downstream data.
[0021] In an optional implementation of the fourth aspect, the method further includes: writing the target downstream data into a cache module.
[0022] 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
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 A first structural diagram of a data request processing circuit provided in an embodiment of the present application;
[0025] Figure 2 A second structural diagram of a data request processing circuit provided in an embodiment of the present application;
[0026] Figure 3 A third structural diagram of a data request processing circuit provided in an embodiment of the present application;
[0027] Figure 4 A flowchart of a data request processing method provided in an embodiment of the present application;
[0028] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0029] Icons: 10 - downstream data processing module; 20 - data request management module; 30 - upstream management module; 40 - cache module; A - upstream device; 5 - electronic device; 501 - processor; 502 - memory; 503 - communication bus. DETAILED DESCRIPTION
[0030] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0032] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0033] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0034] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0035] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0036] In the description of the embodiments of the present application, the technical terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the embodiments of the present application.
[0037] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0038] At present, the data access method of the processor is generally to first look for the data of the corresponding address in the cache according to the access address. If the cache has the corresponding address and the specific data corresponding to the address, it is called a cache hit. In the case of a cache hit, the data request / data access response can generally be realized by directly reading the corresponding specific data in the cache; if the cache does not have the corresponding address and specific data (hereinafter referred to as primary miss) or the cache has the corresponding address but does not have the specific data of the corresponding address (secondary miss), it is necessary to go to the memory to obtain the specific data of the corresponding address. This situation is called a cache miss.
[0039] In the event of a cache miss, the cache circuit needs to read the specific data of the corresponding address from the memory, and reading from the upstream to the downstream memory takes a long time and consumes a lot of power. At the same time, the long data reading process will cause the next access request to be blocked. Therefore, there will be a large overhead in the event of a cache miss.
[0040] In order to prevent the upstream from being blocked from continuing to run in the event of a cache miss, currently, the cache circuit introduces a miss status handling register (MSHR) circuit to implement a non-blocking cache.
[0041] In a traditional MSHR circuit, when downstream data is returned, the MSHR circuit first writes the downstream data into the cached data random access memory (Data RAM), and then reads the stored downstream data from the Data RAM and returns it to the upstream to respond to the corresponding data request.
[0042] The inventors have found that the traditional MSHR circuit needs to write the downstream data into the Data RAM first and then read it from the Data RAM, and data reading and writing will consume a long time and a lot of power consumption, resulting in low data request response efficiency and increased power consumption; furthermore, when all cache miss requests corresponding to a certain address access the cache, the address is not allowed to be replaced in the cache, so the cache needs to consume additional capacity to record the status of all requests corresponding to the address, thereby reducing the cache capacity of the time period; in addition, when data at the same address is accessed by different devices at the same time, that is, when there are multiple requests with the same address in the MSHR circuit, the traditional method needs to access the DataRAM multiple times, resulting in a waste of power consumption; finally, the existing MSHR circuit manages primary miss and secondary miss separately. For example, hardware resources for 3 primary miss and 7 secondary miss are opened in the MSHR circuit, which may cause performance loss in certain scenarios due to insufficient flexibility of hardware resources.
[0043] Based on the above problems, the inventors have designed a data request processing circuit, method, cache circuit and processor thereof. When downstream data is returned, the present solution directly transmits the returned downstream data to the upstream, and also returns the target data request information associated with the downstream data to the upstream, so as to respond to the target data request of the cache miss, thereby eliminating the need to write and read the Data RAM, thereby improving the response time and power consumption of the data request of the cache miss; since in the process of responding to the target data request, it is not necessary to write the downstream data into the cached Data RAM, therefore, the additional capacity of the cache will not be consumed; since the present solution returns the target data request information associated with the downstream data to the upstream at the same time, therefore, all data requests associated with the downstream data are processed at one time, thereby eliminating the need to access multiple times, thereby reducing the access power consumption; in addition, since the present solution does not require the separate management of primary miss and secondary miss, therefore, it can better utilize the flexibility of the hardware.
[0044] Based on the above ideas, the present application provides a data request processing circuit, such as Figure 1 As shown, the data request processing circuit includes a downstream data processing module 10, a data request management module 20 and an upstream management module 30, please refer to Figure 1In the circuit connection mode of the present solution illustrated, the downstream data processing module 10 is electrically connected to the upstream management module 30, the data request management module 20 is electrically connected to the upstream management module 30, and the upstream management module 30 can be electrically connected to the upstream device A. The upstream and downstream devices are distinguished based on the information flow direction. For example, in a data request process, the upstream device initiates a data request, and then accesses the cache according to the data request. If the cache does not hit, the memory is accessed, and the memory returns the data corresponding to the data request. In this process, the memory is called downstream, and the data returned by the memory based on the data request / data access is called downstream data. The device that initiates the data request / data access is called the upstream device, and the upstream device can be specifically: user terminal, server, computer, etc.
[0045] The data request processing circuit designed above, the downstream data processing module 10 is used to directly transmit the acquired target downstream data to the upstream management module 30 when the target downstream data is obtained, and the target downstream data refers to the data corresponding to the target data request obtained from the memory when the target data request misses the cache, wherein the target data request can be a target address access request, etc.
[0046] In the above case, the data request management module 20 is used to transmit the target data request information associated with the target downstream data to the upstream management module 30, wherein, generally, there may be multiple cache-missed data requests in the data request management module 20 at the same time, therefore, when the target downstream data is returned, the data request management module 20 needs to find the data request corresponding to the target downstream data based on the returned target downstream data in the multiple cache-missed data requests, thereby obtaining the target data request information associated with the target downstream data, and then transmitting the target data request information associated with the target downstream data to the upstream management module 30. For example, there are multiple cache-missed data requests in the data request management module 20: request 1, request 2, request 3, and request 4, assuming that the corresponding data request found based on the returned target downstream data in the multiple cache-missed data requests is request 4, then the relevant request information of request 4 is sent to the upstream management module 30.
[0047] The upstream management module 30 transmits the obtained target downstream data and the associated target data request information to the upstream device A, thereby responding to the target data request initiated by the upstream device. As a possible implementation method, the target downstream data and the target data request information associated with the target downstream data can be sent to the upstream management module 30 at the same time, and the upstream management module 30 can transmit the target downstream data and the target data request information associated with the target downstream data to the upstream device A after receiving them; as another possible implementation method, since the data request management module 20 needs to determine the target data request first and then send the target data request information, the target downstream data may be received by the upstream management module 30 first. In this case, the upstream management module 30 can temporarily store the target downstream data and wait until the target data request information associated with the target downstream data is received before transmitting the target downstream data and the target data request information associated with the target downstream data to the upstream device A together.
[0048] The data request processing circuit designed as above, when the target downstream data is obtained, the downstream data processing module 10 directly transmits the obtained target downstream data to the upstream management module 30, and transmits the target data request information associated with the target downstream data to the upstream management module 30 through the data request management module 20, and transmits the obtained target downstream data and the associated target data request information to the upstream device A through the upstream management module 30, thereby responding to the target data request. Since the present scheme directly transmits the target downstream data to the upstream, the data request processing circuit designed in the present scheme does not need to write and read the Data RAM, thereby improving the response time and power consumption of the data request of the cache miss.
[0049] In an optional implementation of this embodiment, the data request management module 20 described above can determine the target data request associated with the target downstream data according to multiple cache miss (cache miss) data requests. As a possible implementation, Figure 2 As shown, the downstream data processing module 10 can be electrically connected to the data request management module 20. On this basis, the downstream data processing module 10 can obtain the target request identifier of the target downstream data, and then transmit the target request identifier of the target downstream data to the data request management module 20. The data request management module 20 can search for data requests with the same request identifier among multiple cache-missing data requests based on the target request identifier of the target downstream data, thereby obtaining the target data request associated with the target downstream data.
[0050] For example, according to the above example, assuming that the request identifier corresponding to request 1 is A1, the request identifier corresponding to request 2 is A2, the request identifier corresponding to request 3 is A3, and the request identifier corresponding to request 4 is A4, and the target request identifier of the target downstream data obtained by the downstream data processing module 10 is A4, then the data request management module 20 can find request 4 with the same request identifier A4 based on the target request identifier A4, thereby obtaining request 4 associated with the target downstream data.
[0051] As a possible implementation, the target request identifier may include a unique identifier carried by the target request. For example, A1, A2, A3 and A4 described above may be unique identifiers of corresponding requests. As another possible implementation, since the access data has the characteristic information of the corresponding access address, the target request identifier may also be the target request address. The data request management module 20 can search for data requests with the same request address in multiple cache-missing data requests based on the target request address of the target downstream data, thereby obtaining the target data request associated with the target downstream data.
[0052] Furthermore, in some cases, data at the same address may be accessed by different devices at the same time. In this case, there may be multiple requests with the same request address in the data request management module 20 at the same time. The data request management module 20 may find multiple data requests with the same request address from multiple cache-missed data requests according to the target request address of the target downstream data. On this basis, the data request management module 20 may use the multiple data requests with the same request address as the target downstream data as the target data requests, and send them to the upstream management module 30. For example, there are request 1, request 2, request 3 and request 4 in the data request management module 20, the address corresponding to request 1 is 00, the addresses corresponding to requests 2 and 3 are both 11, the address corresponding to request 4 is 01, and the target request address corresponding to the acquired target downstream data is 11, then it can be determined that the target data requests associated with the target downstream data are request 2 and request 3.
[0053] In the implementation method of the above design, this scheme sends the information of all target data requests associated with the target downstream data to the upstream management module 30 through the data request management module 20, so that all data requests associated with the target downstream data can be processed at one time, and there is no need to access them multiple times, thereby reducing access power consumption.
[0054] It should be noted here that after the data request management module 20 transmits the target data request information associated with the target downstream data to the upstream management module 30, the data request management module 20 may update the status of the data requests stored in itself. For example, the data request management module 20 may delete the target data request information stored in itself, thereby releasing the capacity of the data request management module 20, and then preparing to receive other cache miss data requests.
[0055] In an optional implementation of this embodiment, as a possible implementation, the target downstream data can be accessed and read from the memory based on the target request address of the target downstream data through a dedicated memory access module, and then sent to the downstream data processing module 10. After obtaining the target downstream data, the downstream data processing module 10 directly sends it to the upstream management module 30.
[0056] As another possible implementation, the downstream data processing module 10 can access the memory by itself, so as to read the memory to obtain the target downstream data. Specifically, the data request management module 20 can send the target request identifier (such as the target request address) of the target downstream data to be read to the downstream data processing module 10, and the downstream data processing module 10 can read the corresponding target downstream data in the memory according to the target request identifier (such as the target request address). After reading and obtaining the target downstream data, the downstream data processing module 10 directly sends the target downstream data to the upstream management module 30.
[0057] It should be noted here that when the target downstream data is obtained by reading the target downstream data in the memory by the downstream data processing module 10 itself, the downstream data processing module 10 will still feedback the target request identifier of the target downstream data to the data request management module 20, thereby triggering the data request management module 20 to find the target data request associated with the target downstream data.
[0058] In an optional implementation of this embodiment, if Figure 3 As shown, the data request processing circuit may further include a cache module 40 , which is electrically connected to the downstream data processing module 10 .
[0059] In the above-designed data request processing circuit, the downstream data processing module 10 can also write the target downstream data into the cache module 40. The cache module 40 can be specifically a data random access memory (Data RAM).
[0060] As a possible implementation, the downstream data processing module 10 may write the target downstream data into the cache module 40 after sending the target downstream data to the upstream management module 30. As another possible implementation, the downstream data processing module 10 may write the target downstream data into the cache module 40 while sending the target downstream data to the upstream management module 30. The specific writing time is not limited in this solution and can be adaptively adjusted according to the actual scenario needs.
[0061] It should be noted here that although the present solution writes the target downstream data into the cache module 40, in the case of a cache miss, the target downstream data obtained by the upstream management module 30 is not read from the cache module 40, but is directly sent from the downstream data processing module 10. The present solution uses the downstream data processing module 10 to write the target downstream data into the cache module 40 for storage. The purpose is to take into account the next access to the target request corresponding to the target downstream data. In order to avoid the cache miss again for the target data request, which results in memory reading power consumption and low efficiency, the present solution writes the target downstream data into the cache module 40 for storage, so that the target data request can achieve a cache hit the next time it is accessed, and can be directly read from the cache, thereby improving access efficiency and reducing power consumption.
[0062] In addition, since there is no need to access the cache module 40 to obtain the target downstream data, after the target downstream data is written to the cache module 40, the cache module 40 does not need to occupy capacity to record whether the corresponding data can be replaced, thereby reducing the capacity loss of the cache module 40.
[0063] The data request processing circuit designed above, this scheme first sends the target downstream data directly to the upstream management module 30 through the downstream data processing module 10, and the downstream data processing module 10 transmits the target request identifier corresponding to the target downstream data to the data request management module 20, so that the data request management module 20 searches for the data request with the same target request identifier among multiple cache miss data requests, and obtains the target data request associated with the target downstream data, and then the data request management module 20 transmits the target data request information associated with the target downstream data to the upstream management module 30, so that the target downstream data and the target data request information are returned to the upstream device A through the upstream management module 30, thereby responding to the target request of the upstream device A, so that the upstream device A can obtain the access data corresponding to the target data request.
[0064] Based on the data request processing circuit designed in this scheme, this scheme directly transmits the target downstream data to the upstream. Therefore, the data request processing circuit designed in this scheme does not need to write and read the Data RAM, thereby improving the response time and power consumption of the data request that does not hit the cache; furthermore, the information of all target data requests associated with the target downstream data is sent to the upstream management module 30 through the data request management module 20, so that all data requests associated with the target downstream data are processed at one time, and there is no need to access them multiple times, thereby reducing the access power consumption; in addition, since there is no need to access the cache module 40 to obtain the target downstream data, after the target downstream data is written to the cache module 40, the cache module 40 does not need to occupy capacity to record whether the corresponding data can be replaced, thereby reducing the capacity loss of the cache module 40.
[0065] In an optional implementation manner of this embodiment, the present application further provides a cache circuit, which includes the data request processing circuit described in any of the aforementioned optional implementation manners.
[0066] The cache circuit designed above includes the data request processing circuit of any of the aforementioned optional implementation modes. Therefore, when a data request cache misses, the cache circuit directly transmits the target downstream data and the target data request information associated with the target downstream data to the upstream without writing and reading the Data RAM, thereby improving the response time and power consumption of the data request that misses the cache.
[0067] In an optional implementation manner of this embodiment, the present application also provides a processor, which includes the cache circuit described above.
[0068] The processor designed as above includes the aforementioned cache circuit. Therefore, when a data request cache misses, the processor directly transmits the target downstream data and the target data request information associated with the target downstream data to the upstream without writing and reading the Data RAM, thereby improving the response time and power consumption of the data request that misses the cache.
[0069] In an optional implementation manner of this embodiment, the present application further provides a data request processing method, which can be applied to a computing device, including but not limited to the cache circuit described above, a processor including the cache circuit, a chip including the processor, a computer, a server, etc., such as Figure 4 As shown, the data request processing method can be implemented in the following ways, including:
[0070] Step S400: when target downstream data is obtained by reading in the downstream memory according to the target data request information, the target downstream data and the target data request information associated with the target downstream data are directly transmitted to the upstream device.
[0071] In the above embodiment, the target data request information may include an access address, an access identifier, etc. of the target data request. The target data request refers to a data request that does not hit the cache. In the case of a cache miss, the access data required for the data request needs to be read from the downstream memory, wherein the method of reading from the downstream memory can be based on the dedicated memory reading module described above, or can be obtained by reading through the downstream data processing module described above.
[0072] When the target downstream data is obtained by reading the target downstream data in the downstream memory according to the target data request information, the solution directly transmits the target downstream data obtained from the downstream memory and the target data request information associated with the target downstream data to the upstream device, thereby responding to the target data request of the upstream device. Wherein, directly means that when the target downstream data is obtained from the downstream memory, the target downstream data is immediately transmitted to the upstream device without being cached or stored.
[0073] The data request processing method designed above directly transmits the returned downstream data to the upstream, and also returns the target data request information associated with the downstream data to the upstream, so as to respond to the target data request of the cache miss, thereby eliminating the need to write and read the Data RAM, thereby improving the response time and power consumption of the data request of the cache miss.
[0074] In an optional implementation of this embodiment, before directly transmitting the target downstream data and the target data request information associated with the target downstream data to the upstream device, this solution can obtain the target request identifier corresponding to the target downstream data, and then search for a data request with the same target request identifier among multiple cache miss data requests according to the target request identifier, thereby determining the target data request and then obtaining the target data request information. The target data request information may include a target data request address, a target data requester, and the like.
[0075] In an optional implementation of this embodiment, this solution may also store the target downstream data in a cache module.
[0076] According to some embodiments of the present application, Figure 5As shown, the present application provides an electronic device 5, including: a processor 501 and a memory 502, the processor 501 and the memory 502 are interconnected and communicate with each other through a communication bus 503 and / or other forms of connection mechanisms (not marked), the memory 502 stores a computer program executable by the processor 501, and when the computing device is running, the processor 501 executes the computer program to execute the method executed in the aforementioned implementation, for example, step S400: when the target downstream data is read in the downstream memory according to the target data request information, the target downstream data and the target data request information associated with the target downstream data are directly transmitted to the upstream device to respond to the target data request.
[0077] The present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the aforementioned execution method is executed.
[0078] Among them, the storage medium 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 red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0079] The present application provides a computer program product, which enables the computer to execute the aforementioned method when it is run on a computer.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application. In particular, as long as there is no structural conflict, the various technical features mentioned in the various embodiments can be combined in any way. The present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions that fall within the scope of the claims.
Claims
1. A data request processing circuit, characterized in that: The circuit comprises: a downstream data processing module, a data request management module and an upstream management module; The downstream data processing module is used to transmit the acquired target downstream data to the upstream management module; wherein the target downstream data is obtained by reading in the downstream memory through the target data request missing from the cache; The data request management module is used for transmitting the target data request information associated with the target downstream data to the upstream management module; The upstream management module is used to transmit the target downstream data and the associated target data request information to the upstream device in response to the target data request; The circuit further comprises a cache module, and the downstream data processing module is electrically connected to the cache module; The downstream data processing module is also used to write the target downstream data into the cache module.
2. The circuit according to claim 1, characterized in that The downstream data processing module is electrically connected to the upstream management module, the data request management module is electrically connected to the upstream management module, and the upstream management module is used to be electrically connected to an upstream device.
3. The circuit according to claim 1, characterized in that The data request management module stores a plurality of cache-missed data requests; The data request management module is further configured to determine, among a plurality of cache-missed data requests, a target data request associated with the target downstream data, to obtain target data request information of the target data request.
4. The circuit according to claim 3, characterized in that The downstream data processing module is electrically connected to the data request management module; The downstream data processing module is also used to transmit the target request identifier corresponding to the acquired target downstream data to the data request management module; The data request management module is also used to search for data requests with the same request identifier among multiple cache-missing data requests according to the target request identifier corresponding to the target downstream data transmitted by the downstream data processing module, and obtain the target data request associated with the target downstream data.
5. The circuit according to claim 3, characterized in that The downstream data processing module is also used to obtain the target data request information of cache miss transmitted by the data request management module; and read the corresponding data in the downstream memory according to the target request identifier to obtain the target downstream data; Wherein, the target data request information includes a target request identifier.
6. The circuit according to claim 4 or 5, characterized in that in, The target request identifier includes at least one of a target request address and a unique identifier carried by the target request.
7. A cache circuit, characterized in that: The cache circuit includes the data request processing circuit according to any one of claims 1-6.
8. A processor, characterized in that: The processor comprises the cache circuit of claim 7.
9. A data request processing method, characterized in that: The method comprises: When target downstream data is obtained by reading in the downstream memory according to the target data request information, directly transmitting the target downstream data and the target data request information associated with the target downstream data to the upstream device to respond to the target data request; The method further includes: writing the target downstream data into a cache module.
10. The method according to claim 9, characterized in that Before transmitting the target downstream data and the target data request information associated with the target downstream data to the upstream device, the method further includes: According to the target request identifier corresponding to the target downstream data, a data request with the same request identifier is searched among multiple cache-missed data requests to obtain a target data request associated with the target downstream data.
Citation Information
Patent Citations
Storage apparatus comprising read-write cache and cache implementation method
CN101149668A
Data transmission method and device
CN113905097A
Processor, data reading and writing method and device and storage medium
CN115061972A
Data writing method and device, data obtaining method and device, electronic equipment and computer medium
CN115328406A
Method and system for prefetching information
CN1272189A
