Data processing method, processor and electronic device

By detecting the cache status and using a small line request cache, the problem of slow data acquisition speed of the central processor and excessive CPU area is solved, deadlock is avoided, and the processor performance is optimized.

CN115129617BActive Publication Date: 2024-10-22ARM TECH CHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210897134.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-28
Publication Date
2024-10-22
Estimated Expiration
2042-07-28

AI Technical Summary

Technical Problem

When the central processor is processing data, the data acquisition speed is slow due to the long distance of the external memory, and multiple line-fill buffers occupy a large amount of CPU area, resulting in an overall area that is too large and a deadlock problem.

Method used

By detecting the status of the line fill buffer and the eviction buffer, the data read request is temporarily stored until the buffer is free, and a smaller line request buffer is used to replace part of the line fill buffer, thereby reducing the CPU area and executing the data read request. The data status of the location to be stored is judged in advance to decide whether to evict, and the data transmission channel is optimized to avoid deadlock.

Benefits of technology

It effectively reduces the processor area, avoids deadlock problems caused by failure to receive data read requests, and ensures the number of data read requests and processor performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115129617B_ABST
    Figure CN115129617B_ABST
Patent Text Reader

Abstract

The present application relates to the field of processor technology, and discloses a data processing method, a processor, and an electronic device. The electronic device includes a processor and a memory, and the processor includes a row fill buffer, a row request buffer, and an eviction buffer; the method includes: the processor detects a data read request; the processor determines the working status of the current row fill buffer and the eviction buffer; corresponding to the situation where the working status of the row fill buffer and the eviction buffer are both the first type of state, the processor temporarily stores the data read request, wherein the first type of state is a non-idle state; corresponding to the situation where the working status of the row fill buffer or the eviction buffer is the second type of state, the processor sends a data read request to the memory, wherein the second type of state is an idle state. Based on the above scheme, the deadlock problem caused by the failure to receive the returned data after sending the data read request can be effectively avoided, and the processor area can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of processor technology, and in particular to a data processing method, a processor and an electronic device. Background Art

[0002] At present, when the central processing unit (CPU) processes data, it generally needs to read data from various memories first. It can be understood that since the external memory is far away from the CPU, the speed at which the CPU obtains data from the external memory will be slow. Therefore, a cache memory (cache) and a line fill buffer (LFB) are generally set up inside the CPU. When the CPU processes data, it can send requests to the outside through the LFB, and pre-store the data in the external memory in the cache memory in units of cache lines through the LFB. When the CPU needs to read data, it can read it directly from the cache memory, thereby improving the data processing speed of the CPU.

[0003] Currently, the CPU will send multiple row fill requests to the external memory in a short period of time to obtain the corresponding data, and the CPU generally sets multiple LFBs to store the data corresponding to different row fill requests in the high-speed memory. However, since each LFB will occupy a large CPU area, multiple LFBs will occupy an even larger CPU area, resulting in the overall CPU area being too large. Summary of the invention

[0004] To solve the above problems, embodiments of the present application provide a data processing method, a processor, and an electronic device.

[0005] In a first aspect, an embodiment of the present application provides a data processing method for an electronic device, the electronic device comprising a processor and a memory, the processor comprising a line fill buffer, a line request buffer and an eviction buffer; the method comprising: the processor detecting a data read request; the processor determining the current working states of the line fill buffer and the eviction buffer; corresponding to a situation where the working states of the line fill buffer and the eviction buffer are both first-class states, the processor temporarily storing the data read request, wherein the first-class state is a non-idle state; corresponding to a situation where the working state of the line fill buffer or the eviction buffer is a second-class state, the processor sending the data read request to the memory, wherein the second-class state is an idle state.

[0006] It can be understood that in the embodiment of the present application, the status of the row fill buffer and the eviction buffer can be detected before sending the data read request. In this way, when both the row fill buffer and the eviction buffer are in a non-idle state, it is determined that the row fill buffer cannot receive data. At this time, the temporary data read request is not sent to the outside, and the requested data may not be returned, which can effectively avoid the deadlock problem caused by the return data not being received after the data read request is sent.

[0007] Furthermore, based on the data reading method provided in the embodiment of the present application, a row request buffer with a smaller area can be used in the processor to replace part of the row fill buffer, thereby reducing the area of ​​the processor while ensuring that the number of data read requests that the processor can send simultaneously is not reduced.

[0008] In a possible implementation of the present application, the processor includes a cache memory, and the method includes: the processor determines a first to-be-stored location of return data corresponding to the data read request in the cache memory; the processor obtains a state of first data currently stored in the first to-be-stored location; when the state of the first data is a modified state, the processor sends an eviction application corresponding to the data read request to the eviction cache; the eviction cache receives the eviction application and evicts the first data from the processor.

[0009] In a possible implementation of the present application, the memory further includes receiving the data read request, and sending the second data corresponding to the data read request to the line fill buffer;

[0010] The linefill buffer sends the second data to the first to-be-stored location of the cache memory.

[0011] In a possible implementation of the present application, the eviction buffer performs eviction operations corresponding to each eviction application based on the priority of each eviction application corresponding to each data read request.

[0012] In a possible implementation of the present application, among the eviction applications corresponding to the data read requests, the priority of the eviction application corresponding to the data read request sent by the processor is higher than the priority of the eviction application corresponding to the data read request not sent by the processor.

[0013] In a second aspect, the present application provides a processor, comprising a row fill buffer, a row request buffer, an eviction buffer and a control unit; the row fill buffer and the row request buffer are used to send a data read request; the control unit is used to detect the data read request; the control unit is used to determine the current working status of the row fill buffer and the eviction buffer; the control unit is used to temporarily store the data read request in response to the situation that the working status of the row fill buffer and the eviction buffer are both in a first-class state, wherein the first-class state is a non-idle state; the control unit is used to control the row fill buffer and the row request buffer to send the data read request to the memory in response to the existence of the row fill buffer or the working status of the eviction buffer is in a second-class state, wherein the second-class state is an idle state.

[0014] It can be understood that the processor provided in the embodiment of the present application can effectively reduce the area of ​​the processor by reducing the number of row fill buffers and increasing a corresponding number of row request buffers with smaller areas to replace the row fill buffers.

[0015] In a third aspect, the present application provides an electronic device, comprising a memory and the processor mentioned in the embodiments of the present application.

[0016] In a fourth aspect, an embodiment of the present application provides a data processing method for an electronic device, the electronic device comprising a processor and a memory, the data transmission channel between the processor and the memory being a single channel, the processor comprising a row fill buffer, a row request buffer, and an eviction buffer; the method comprising: the processor detecting a data read request; the processor determining a current working state of the eviction buffer; corresponding to a situation where the working state of the eviction buffer is a first-class state, the processor temporarily storing the data read request, wherein the first-class state is a non-idle state; corresponding to a situation where the working state of the eviction buffer is a second-class state, the processor sending the data read request to the memory, wherein the second-class state is an idle state.

[0017] It can be understood that if the eviction buffer is in a non-idle state, that is, the eviction buffer is evicting data, then the data storage request is temporarily stored until the eviction buffer is in an idle state and a data read request is sent. In this way, after sending a request to the outside, when the external memory returns data, the deadlock problem caused by the eviction data and the returned data being in the channel at the same time can be effectively avoided because the data channel is a single channel.

[0018] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein a data transmission channel between the processor and the memory is a single channel, and the processor comprises a row fill buffer, a row request buffer, an eviction buffer, and a control unit; the row fill buffer and the row request buffer are used to send a data read request; the control unit is used to detect a data read request; the control unit is used to determine a current working state of the eviction buffer; the control unit is used to temporarily store the data read request corresponding to a case where the working state of the eviction buffer is a first-class state, wherein the first-class state is a non-idle state; corresponding to a case where the working state of the eviction buffer is a second-class state, control the row fill buffer and the row request buffer to send the data read request to the memory, wherein the second-class state is an idle state.

[0019] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device, and the processor, which is one of the one or more processors of the electronic device, for executing the data processing method mentioned in the embodiment of the present application.

[0020] In a seventh aspect, an embodiment of the present application provides a readable storage medium, on which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the data processing method mentioned in the embodiment of the present application.

[0021] In an eighth aspect, an embodiment of the present application provides a computer program product, comprising execution instructions, which, when executed on an electronic device, enable the electronic device to execute the data processing method mentioned in the embodiment of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 According to some embodiments of the present application, a schematic diagram of a process flow of a processor reading data is shown;

[0023] Figure 2 According to some embodiments of the present application, a schematic diagram of a process flow of a processor reading data is shown;

[0024] Figure 3 According to some embodiments of the present application, a schematic diagram of the structure of a processor is shown;

[0025] Figure 4 According to some embodiments of the present application, a schematic diagram of a data processing flow is shown;

[0026] Figure 5 According to some embodiments of the present application, a schematic structural diagram of an electronic device is shown. DETAILED DESCRIPTION

[0027] The illustrative embodiments of the present application include, but are not limited to, a data processing method, a processor, and an electronic device.

[0028] In order to more clearly understand the solution of the present application, the process of the processor reading data in the embodiment of the present application is first briefly introduced.

[0029] like Figure 1 As shown, the processor may include a line fill buffer, a cache memory, an eviction buffer (EVB) and an AXI bus interface.

[0030] When the processor needs to read data, the processor can send a data read request to the AXI bus interface through the line fill buffer, send the data read request to the external memory through the AXI bus interface, and the external memory can send the corresponding request data with the data read request, and return it to the line fill buffer through the AXI bus interface, and the line fill buffer sends the request data to the corresponding position of the cache memory. The eviction buffer is used to evict the existing data at the storage location of the requested data from the cache memory. Among them, the storage form in the cache memory is stored in units of cache lines. Therefore, storing data in the cache memory can be called filling cache lines.

[0031] It can be understood that since the request data corresponding to each data read request has a set storage location in the cache memory, before the data read request is sent, the processor needs to determine whether the currently stored data needs to be evicted from the cache memory according to the state of the currently stored data in the storage location. If the currently stored data needs to be evicted from the cache memory, an eviction request is issued to the eviction buffer. If the data does not need to be evicted, that is, the current data can be directly overwritten, there is no need to issue an eviction request to the eviction buffer.

[0032] The processor determines whether it is necessary to evict the currently stored data from the cache memory according to the state of the currently stored data at the to-be-stored location in the manner that: if the currently stored data is modified data, it is determined that the currently stored data is data that has been processed by the processor and needs to be sent to the outside, and it is determined that the currently stored data needs to be evicted from the cache memory. If the currently stored data is original data that has not been modified, it is determined that the currently stored data is data that needs to be overwritten by new data, and it is not necessary to evict the currently stored data from the cache memory, and the data can be directly overwritten after subsequent new data arrives at the cache memory. If no data is stored at the to-be-stored location, it is determined that it is not necessary to send an eviction application to the eviction buffer.

[0033] For example, Figure 2 As shown, if the request data is CL1, and it is determined that the storage location set for the request data CL1 in the cache memory is the location where the data CL3 is located, and it is determined that CL3 is the modified data, then it is determined that the data CL3 is the data processed by the processor and needs to be sent to the outside, and the current stored data needs to be evicted from the cache memory. Therefore, at this time, the processor can send an eviction application to the eviction buffer, so that the eviction buffer evicts the data CL3 from the cache memory, that is, caches the data CL3 from the cache memory to the eviction buffer, and sends the data CL3 to the corresponding location outside the processor through the AXI bus interface through the eviction buffer.

[0034] As mentioned above, the CPU generally sets up multiple row fill buffers to store the request data corresponding to different row fill requests in the high-speed memory. However, since each row fill buffer will occupy a large CPU area, multiple row fill buffers will occupy an even larger CPU area, resulting in the overall CPU area being too large.

[0035] To solve the above problem, an embodiment of the present application provides a processor, which reduces the number of line fill buffers and increases a corresponding number of line request buffers (LRBs) with smaller areas to replace the line fill buffers.

[0036] For example, the processor mentioned in the embodiment of the present application includes a row fill buffer and a row request buffer.

[0037] It can be understood that the area of ​​the row request buffer is much smaller than that of the row fill buffer, and the row request buffer has the function of sending data read requests consistent with the row fill buffer. Therefore, in the embodiment of the present application, a row request buffer with a smaller area is used to replace part of the row fill buffer. While reducing the area of ​​the processor, it is possible to ensure that the number of data read requests that the processor can send simultaneously is not reduced.

[0038] It can be understood that for each data read request issued by the processor to the external memory, the external memory will return a corresponding set of data. However, since the row request buffer only has the function of sending data read requests consistent with the row fill buffer, it does not have the function of receiving returned data like the row fill buffer. That is, the row request buffer cannot receive returned data, and each row fill buffer can only receive and process one set of data at a time.

[0039] Therefore, when the number of data read requests that the processor can send simultaneously is greater than the number of row fill buffers, it is possible that when the returned data is returned, all row fill buffers are in an occupied state, resulting in the returned data being unable to be received by the row fill buffers, causing the processor to deadlock.

[0040] For example, in the embodiment of the present application, the initial two row fill buffers are reduced to one row fill buffer, and a row request buffer is added to replace the row fill buffer, that is, the processor mentioned in the embodiment of the present application includes a row fill buffer and a row request buffer. This scheme may result in the row fill buffer and the row request buffer of the processor both sending a request out, that is, sending a total of two requests; when the request data corresponding to the first request comes back, the row fill buffer can receive the request data, but when the request data corresponding to the second request comes back, because the row request buffer cannot receive data, the request data corresponding to the first request still occupies the row fill buffer, and the data corresponding to the second request cannot be received, resulting in a deadlock problem in the processor.

[0041] To solve the above problem, the embodiment of the present application provides a data processing method, which is applied to the above processor, and the method includes: after detecting a data read request (i.e., a row fill request), the processor determines whether the current row fill buffer and the eviction buffer are both in a non-idle state, and if both are in a non-idle state, the data read request is temporarily stored, that is, the data read request is not sent to the external memory temporarily. The state of the row fill buffer and the eviction buffer is detected in real time, and the data read request is sent to the external memory when at least one of the row fill buffer and the eviction buffer is in an idle state.

[0042] It can be understood that in the embodiment of the present application, the status of the row fill buffer and the eviction buffer can be detected before sending the data read request. In this way, when both the row fill buffer and the eviction buffer are in a non-idle state, it is determined that the row fill buffer cannot receive data. At this time, the temporary data read request is not sent to the outside, and the requested data may not be returned, which can effectively avoid the deadlock problem caused by the return data not being received after the data read request is sent.

[0043] It can be understood that when either the eviction buffer or the line fill buffer is in an idle state, the line fill buffer can receive the request data corresponding to the current data read request, so the data read request can be sent to the outside of the processor at this time.

[0044] For example, if the linefill buffer is in an idle state, the linefill buffer can certainly receive the request data corresponding to the current data read request.

[0045] If the line fill buffer is not in an idle state, but the eviction buffer is in an idle state, it can be inferred that the line fill memory may have just received data corresponding to a previous request. Since the eviction buffer is in an idle state at this time, if existing data at a to-be-stored position in the cache memory corresponding to the previous request needs to be evicted, the eviction buffer can directly evict the existing data at the to-be-stored position, so that the line fill memory can send the data corresponding to the previous request to the cache memory for corresponding storage, thereby releasing the occupation of the line fill memory, so that the line fill memory is in an idle state and can receive the requested data.

[0046] If the existing data at the to-be-stored location in the cache memory corresponding to the previous request does not need to be evicted, the line fill memory sends the data corresponding to the previous request to the cache memory to cover the existing data at the to-be-stored location, which can also make the line fill memory idle and able to receive the requested data.

[0047] Therefore, if the row fill buffer is not idle and the eviction buffer is idle, the request data can be received when the request data is returned, regardless of whether the existing data at the to-be-stored location where the request data corresponding to the previous request and the current request are located needs to be evicted.

[0048] It can be understood that in the embodiment of the present application, the processor can determine whether it is necessary to evict the currently stored data from the cache memory according to the storage location of the requested data corresponding to the data read request and the state of the currently stored data before sending the data read request. If it is necessary to evict the currently stored data from the cache memory, an eviction request is sent to the eviction buffer. If not, it is not necessary to send an eviction request to the eviction buffer.

[0049] It is understood that in some embodiments, the eviction buffer executes the eviction instruction according to the priority of the eviction application, wherein the priority of the eviction application corresponding to the sent data read request is greater than the priority of the eviction application corresponding to the unsent data read request.

[0050] The structure of the processor mentioned in this application is introduced below. Figure 3 As shown, an embodiment of the present application provides a structural schematic diagram of a processor.

[0051] The processor includes a line fill buffer, a line request buffer, a cache memory and an eviction buffer and an AXI bus interface, a store buffer (STB), an eviction-finite-state machine (EV-FSM) unit and a control unit.

[0052] The line fill buffer is used to send a data read request to the AXI bus interface, receive the request data returned by the AXI bus, and send the request data to a corresponding position of the cache memory.

[0053] For example, Figure 3 As shown in , the row fill buffer can receive the storage request from the storage buffer and the load request from the load / store unit (Load / Store Unit, LSU), and the row fill request corresponding to the request from the PREF, and send the corresponding row fill request to the AXI bus interface. And the row fill buffer can receive the request data from the AXI bus interface, such as CL2, and send CL2 to the corresponding position of the cache memory, such as the position where the data CL1 is located.

[0054] It can be understood that the embodiments of the present application may include a row fill buffer.

[0055] The row request buffer is used to send a data read request to the AXI bus interface. It can be understood that the embodiment of the present application may include a row request buffer.

[0056] For example, Figure 3 As shown in , the row request buffer can receive storage requests from the storage buffer and load requests from the load / store unit (LSU), as well as row fill requests corresponding to requests from PREF, and send the corresponding row fill requests to the AXI bus interface.

[0057] The cache memory is used to store the request data sent by the line request buffer.

[0058] For example, Figure 3 As shown in , the cache memory can be used to store the request data CL2 sent by the line request buffer.

[0059] The eviction buffer is used to evict data at corresponding positions in the cache memory from outside the processor according to actual needs.

[0060] For example, Figure 3 As shown, the eviction buffer is used to evict the existing data CL1 to the outside of the processor when it is determined that the existing data CL1 at the to-be-stored location of the request data CL2 corresponding to the line fill request needs to be evicted.

[0061] The EV-FSM is used to detect the state of the eviction buffer, such as an idle state and a non-idle state, and send the state of the eviction buffer to the control unit.

[0062] The AXI bus interface is used to send a data read request to an external AHB interface through an AAB channel between the AXI bus interface and the AHB interface, and receive request data from the AHB, and send the request data from the AHB to a line fill buffer. It can be understood that the above-mentioned AAB channel can be a single channel or a dual channel.

[0063] The control unit may be a control logic for executing the cache line filling method of the present application, and the control unit is used to execute the data processing method mentioned in the embodiment of the present application.

[0064] The present application provides an electronic device, including a memory and the processor mentioned in the embodiments of the present application.

[0065] The data processing method mentioned in the embodiment of the present application is described below in conjunction with the above processor. Figure 4 , which is a schematic diagram of a data processing method in an embodiment of the present application, Figure 4 The data processing method shown in can be executed by a processor, and in some embodiments, can be executed by a control unit of the processor. Figure 4 As shown, the data processing method includes:

[0066] 401: A data read request was detected.

[0067] It is understood that in the embodiment of the present application, the data read request may also be referred to as a row fill request. The row fill request may be a storage request from the storage buffer, a load request from the load / store unit, and a row fill request corresponding to a request from a PREF.

[0068] 402: Get the status of the current row fill buffer and eviction buffer.

[0069] It can be understood that in the embodiment of the present application, the processor can determine the state of the eviction buffer through the EV-FSM. And the processor can directly determine the state of the line fill buffer. The states of the line fill buffer and the eviction buffer can both include an idle state and a non-idle state.

[0070] 403: Determine whether the status of the row fill buffer and the eviction buffer are both non-idle. If the determination result is yes, go to 404 and temporarily store the data read request; if the determination result is no, go to 405 and send the data read request.

[0071] It can be understood that in the embodiment of the present application, the status of the row fill buffer and the eviction buffer are detected before sending the data read request. When both the row fill buffer and the eviction buffer are in a non-idle state, the data read request is temporarily stored, which can effectively avoid the deadlock problem caused by the return data cannot be received after the data read request is sent.

[0072] It can be understood that when either the eviction buffer or the line fill buffer is in an idle state, the line fill buffer can receive the request data corresponding to the current data read request, so the data read request can be sent to the outside of the processor at this time.

[0073] For example, if the linefill buffer is in an idle state, the linefill buffer can certainly receive the request data corresponding to the current data read request.

[0074] If the line fill buffer is not in an idle state, but the eviction buffer is in an idle state, it can be inferred that the line fill memory may have just received data corresponding to a previous request. Since the eviction buffer is in an idle state at this time, if existing data at a to-be-stored position in the cache memory corresponding to the previous request needs to be evicted, the eviction buffer can directly evict the existing data at the to-be-stored position, so that the line fill memory can send the data corresponding to the previous request to the cache memory for corresponding storage, and the line fill memory is in an idle state to receive the requested data.

[0075] If the existing data of the request corresponding to the previous request at the to-be-stored location in the cache memory does not need to be evicted, the line fill memory sends the data corresponding to the previous request to the cache memory to cover the existing data at the to-be-stored location, and makes the line fill memory idle so that it can receive the requested data.

[0076] 404: Temporary data read request.

[0077] In the embodiment of the present application, when the processor determines that the states of the fill buffer and the eviction buffer are both in a non-idle state, the data read request is not sent to the external memory temporarily, and the states of the line fill buffer and the eviction buffer are detected in real time until at least one of the line fill buffer and the eviction buffer is in an idle state, and then the data read request is sent to the external memory.

[0078] 405: Send data read request.

[0079] It can be understood that in an embodiment of the present application, a data read request can be sent to the AXI bus interface through a row fill buffer, and the data read request can be sent to the AXI bus interface through the AXI bus interface.

[0080] It can be understood that in the embodiment of the present application, the status of the row fill buffer and the eviction buffer can be detected before sending the data read request. In this way, when both the row fill buffer and the eviction buffer are in a non-idle state, it is determined that the row fill buffer cannot receive data. At this time, the temporary data read request is not sent to the outside, and the requested data may not be returned, which can effectively avoid the deadlock problem caused by the return data not being received after the data read request is sent.

[0081] Furthermore, based on the data reading method provided in the embodiment of the present application, a row request buffer with a smaller area can be used in the processor to replace part of the row fill buffer, thereby reducing the area of ​​the processor while ensuring that the number of data read requests that the processor can send simultaneously is not reduced.

[0082] It can be understood that in the embodiment of the present application, the processor can determine whether it is necessary to evict the currently stored data from the cache memory according to the state of the currently stored data at the to-be-stored location before sending the data read request. If it is necessary to evict the currently stored data from the cache memory, an eviction request is sent to the eviction buffer. If it is not necessary, there is no need to send an eviction request to the eviction buffer.

[0083] The processor determines whether it is necessary to evict the currently stored data from the cache memory according to the state of the currently stored data at the to-be-stored location in the manner that: if the currently stored data is modified data, it is determined that the currently stored data is data that has been processed by the processor and needs to be sent to the outside, and it is determined that the currently stored data needs to be evicted from the cache memory. If the currently stored data is original data that has not been modified, it is determined that the currently stored data is data that needs to be overwritten by new data, and it is not necessary to evict the currently stored data from the cache memory, and the data can be directly overwritten after subsequent new data arrives at the cache memory. If no data is stored at the to-be-stored location, it is determined that it is not necessary to send an eviction application to the eviction buffer.

[0084] For example, as mentioned above Figure 2 As shown, if the request data is CL1, and it is determined that the storage location of the request data CL1 in the cache memory is the first cache line 001, and it is determined that the data CL3 currently stored in the first cache line 001 is modified data, then it is determined that the data CL3 is data that has been processed by the processor and needs to be sent to the outside, and it is determined that the current stored data needs to be evicted from the cache memory. Therefore, at this time, the processor can send an eviction application to the eviction buffer, so that the eviction buffer evicts the data CL3 from the cache memory, that is, caches the data CL3 from the cache memory to the eviction buffer, and sends the data CL3 to the corresponding position outside the processor through the AXI bus interface through the eviction buffer.

[0085] It is understood that in some embodiments, the eviction buffer executes the eviction instruction according to the priority of the eviction application, wherein the priority of the eviction application corresponding to the sent data read request is greater than the priority of the eviction application corresponding to the unsent data read request.

[0086] In some embodiments, when the channel AAB between the AXI bus interface and the AHB is a single channel, after the processor detects a data read request, it can first determine whether the eviction buffer in the processor is in an idle state; if the eviction buffer is in an idle state, the data read request is sent to the external memory.

[0087] If the eviction buffer is in a non-idle state, that is, the eviction buffer is evicting data, then the data storage request is temporarily stored until the eviction buffer is in an idle state and a data read request is sent. In this way, after sending a request to the outside, when the external memory returns data, the deadlock problem caused by the eviction data and the returned data being in the channel at the same time can be effectively avoided because the data channel is a single channel.

[0088] It can be understood that the processor provided in the embodiment of the present application can be used in various electronic devices. The electronic device provided in the embodiment of the present application is described below using mobile phone 1 as an example.

[0089] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the data transmission channel between the processor and the memory is a single channel, and the processor includes a row fill buffer, a row request buffer, an eviction buffer, and a control unit; the row fill buffer and the row request buffer are used to send data read requests; the control unit is used to detect the data read request; the control unit is used to determine the current working state of the eviction buffer; the control unit is used to temporarily store the data read request in response to the situation where the working state of the eviction buffer is a first-class state, wherein the first-class state is a non-idle state; and in response to the situation where the working state of the eviction buffer is a second-class state, control the row fill buffer and the row request buffer to send a data read request to the memory, wherein the second-class state is an idle state.

[0090] An embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device, and a processor, which is one of the one or more processors of the electronic device, for executing the data processing method mentioned in the embodiment of the present application.

[0091] An embodiment of the present application provides a readable storage medium, on which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the data processing method mentioned in the embodiment of the present application.

[0092] An embodiment of the present application provides a computer program product, including execution instructions, which, when executed on an electronic device, enable the electronic device to execute the data processing method mentioned in the embodiment of the present application.

[0093] like Figure 5 As shown, the mobile phone 10 may include a processor 110, a power module 140, a memory 180, a mobile communication module 130, a wireless communication module 120, a sensor module 190, an audio module 150, a camera 170, an interface module 160, a button 101 and a display screen 102, etc.

[0094] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the mobile phone 10. In other embodiments of the present application, the mobile phone 10 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0095] The processor 110 may be the processor mentioned above in the embodiment of the present application. The processor 110 may include one or more processing units, for example, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor DSP, a microprocessor (MCU), an artificial intelligence (AI) processor or a programmable logic device (Field Programmable Gate Array, FPGA) and the like processing module or processing circuit. Among them, different processing units may be independent devices or integrated in one or more processors. A storage unit may be provided in the processor 110 for storing instructions and data. In some embodiments, the storage unit in the processor 110 is a cache memory 180.

[0096] The processor 110 can execute the data processing method mentioned in the embodiments of the present application.

[0097] The power module 140 may include a power source, a power management component, etc. The power source may be a battery. The power management component is used to manage the charging of the power source and the power supply of the power source to other modules. In some embodiments, the power management component includes a charging management module and a power management module. The charging management module is used to receive charging input from the charger; the power management module is used to connect the power source, the charging management module and the processor 110. The power management module receives input from the power source and / or the charging management module, and supplies power to the processor 110, the display screen 102, the camera 170, and the wireless communication module 120.

[0098] The mobile communication module 130 may include, but is not limited to, an antenna, a power amplifier, a filter, an LNA (Low noise amplifier), etc. The mobile communication module 130 may provide a solution for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the mobile phone 10. The mobile communication module 130 may receive electromagnetic waves through an antenna, and perform filtering, amplification, and other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 130 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be arranged in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be arranged in the same device as at least some of the modules of the processor 110. Wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), Bluetooth (BT), global navigation satellite system (GNSS), wireless local area networks (WLAN), near field communication (NFC), frequency modulation (FM), infrared (IR) technology, etc.The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite-based augmentation system (SBAS).

[0099] The wireless communication module 120 may include an antenna, and transmit and receive electromagnetic waves via the antenna. The wireless communication module 120 may provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc., which are applied to the mobile phone 10. The mobile phone 10 can communicate with the network and other devices through wireless communication technology.

[0100] In some embodiments, the mobile communication module 130 and the wireless communication module 120 of the mobile phone 10 may also be located in the same module.

[0101] The display screen 102 is used to display a human-computer interaction interface, images, videos, etc. The display screen 102 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc.

[0102] The sensor module 190 may include a proximity light sensor, a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.

[0103] The audio module 150 is used to convert digital audio information into analog audio signal output, or convert analog audio input into digital audio signal. The audio module 150 can also be used to encode and decode audio signals. In some embodiments, the audio module 150 can be arranged in the processor 110, or some functional modules of the audio module 150 can be arranged in the processor 110. In some embodiments, the audio module 150 can include a speaker, an earpiece, a microphone, and an earphone interface.

[0104] The camera 170 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP (Image Signal Processing) to convert it into a digital image signal. The mobile phone 10 can realize the shooting function through the ISP, the camera 170, the video codec, the GPU (Graphic Processing Unit), the display screen 102 and the application processor.

[0105] The interface module 160 includes an external memory interface, a universal serial bus (USB) interface, and a subscriber identification module (SIM) card interface. The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 10. The external memory card communicates with the processor 110 through the external memory interface to implement a data storage function. The universal serial bus interface is used for the mobile phone 10 to communicate with other electronic devices. The subscriber identification module card interface is used to communicate with a SIM card installed in the mobile phone 1010, for example, to read a phone number stored in the SIM card, or to write a phone number into the SIM card.

[0106] In some embodiments, the mobile phone 10 further includes a button 101, a motor, and an indicator. The button 101 may include a volume button, a power on / off button, etc. The motor is used to make the mobile phone 10 vibrate, for example, vibrate when the user's mobile phone 10 is called to prompt the user to answer the call. The indicator may include a laser indicator, a radio frequency indicator, an LED indicator, etc.

[0107] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0108] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0109] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0110] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.

[0111] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0112] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0113] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0114] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.

Claims

1. A data processing method, characterized in that: For an electronic device, the electronic device includes a processor and a memory, the processor includes a line fill buffer, a line request buffer and an eviction buffer; the method includes: The processor detects a data read request; The processor determines the current working status of the line fill buffer and the eviction buffer; Corresponding to the case where the working states of the line fill buffer and the eviction buffer are both in the first-type state, the processor temporarily stores the data read request, wherein the first-type state is a non-idle state; Corresponding to the situation that the working state of the line fill buffer or the eviction buffer is a second-type state, the processor sends the data read request to the memory, wherein the second-type state is an idle state.

2. The data processing method according to claim 1, characterized in that: The processor includes a cache memory, and the method includes: The processor determines a first to-be-stored location of the returned data corresponding to the data read request in the cache memory; The processor obtains a state of first data currently stored in the first to-be-stored location; When the state corresponding to the first data is a modified state, the processor sends an eviction application corresponding to the data read request to the eviction buffer; The eviction buffer receives the eviction request and evicts the first data from the processor.

3. The data processing method according to claim 2, characterized in that: The memory also includes receiving the data read request and sending second data corresponding to the data read request to the line fill buffer; The linefill buffer sends the second data to the first to-be-stored location of the cache memory.

4. The data processing method according to any one of claims 1 to 3, characterized in that: The eviction buffer performs eviction operations corresponding to each eviction application based on the priority of each eviction application corresponding to each data read request.

5. The data processing method according to claim 4, characterized in that: Among the eviction applications corresponding to the data read requests, the priority of the eviction application corresponding to the data read request sent by the processor is higher than the priority of the eviction application corresponding to the data read request not sent by the processor.

6. A processor, characterized in that: It includes a row fill buffer, a row request buffer, an eviction buffer and a control unit; The row fill buffer and the row request buffer are used to send data read requests; The control unit is used to detect the data reading request; The control unit is used to determine the current working status of the line fill buffer and the eviction buffer; The control unit is used for temporarily storing the data read request in response to the situation that the working states of the line fill buffer and the eviction buffer are both in the first type of state, wherein the first type of state is a non-idle state; The control unit is used to control the line fill buffer and the line request buffer to send the data read request to the memory in response to the presence of the line fill buffer or the working state of the eviction buffer being a second type of state, wherein the second type of state is an idle state.

7. An electronic device comprising a memory and the processor according to claim 6.

8. A data processing method, characterized in that: For an electronic device, the electronic device comprises a processor and a memory, the data transmission channel between the processor and the memory is a single channel, the processor comprises a row fill buffer, a row request buffer and an eviction buffer; the method comprises: The processor detects a data read request; The processor determines the current working state of the eviction buffer; Corresponding to the case where the working state of the eviction buffer is a first-type state, the processor temporarily stores the data read request, wherein the first-type state is a non-idle state; Corresponding to the situation that the working state of the eviction buffer is a second-type state, the processor sends the data read request to the memory, wherein the second-type state is an idle state.

9. An electronic device, characterized in that: It includes a memory and a processor, the data transmission channel between the processor and the memory is a single channel, and the processor includes a row fill buffer, a row request buffer, an eviction buffer and a control unit; The row fill buffer and the row request buffer are used to send data read requests; The control unit is used to detect the data reading request; The control unit is used to determine the current working state of the eviction buffer; The control unit is used for temporarily storing the data read request in response to the situation where the working state of the eviction buffer is a first type of state, wherein the first type of state is a non-idle state; In response to the fact that the working state of the eviction buffer is a second-type state, the line fill buffer and the line request buffer are controlled to send the data read request to the memory, wherein the second-type state is an idle state.

10. An electronic device, characterized in that: include: A memory for storing instructions executed by one or more processors of the electronic device, and the processor, which is one of the one or more processors of the electronic device, is used to execute the data processing method described in any one of claims 1 to 5 or 8.

11. A readable storage medium, characterized in that: The readable medium stores instructions, and when the instructions are executed on an electronic device, the electronic device executes the data processing method according to any one of claims 1 to 5 or 8.

12. A computer program product, characterized in that It comprises execution instructions, which, when executed on an electronic device, enable the electronic device to execute the data processing method according to any one of claims 1-5 or 8.