WO2023005352A1 - 数据处理的装置、方法、计算机设备和存储介质 - Google Patents
数据处理的装置、方法、计算机设备和存储介质 Download PDFInfo
- Publication number
- WO2023005352A1 WO2023005352A1 PCT/CN2022/092813 CN2022092813W WO2023005352A1 WO 2023005352 A1 WO2023005352 A1 WO 2023005352A1 CN 2022092813 W CN2022092813 W CN 2022092813W WO 2023005352 A1 WO2023005352 A1 WO 2023005352A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- write
- target
- address information
- component
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/18—Handling requests for interconnection or transfer for access to memory bus based on priority control
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/28—Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
- G06F13/30—Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal with priority control
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present disclosure relates to the technical field of integrated circuits, and in particular, to a data processing device, method, computer equipment, and computer-readable storage medium.
- AI artificial intelligence
- the data reading module needs to access the random access memory (Random Access Memory, RAM) according to the address information to obtain the data stored in the storage space corresponding to the address information in the RAM.
- RAM Random Access Memory
- Embodiments of the present disclosure at least provide a data processing apparatus, method, computer equipment, and computer-readable storage medium, so as to reduce memory access power consumption.
- an embodiment of the present disclosure provides a data processing device, including: a data reading component, a data cache component, and a data storage component; the data reading component is connected to the data cache component in communication, and the data cache component is connected to The data storage component is connected in communication; the read data component is configured to determine a read data request for the data storage component, and the read data request includes read address information corresponding to the target data to be read; and, based on The read address information determines the storage status of the target data in a preset data cache unit, and responds to the storage status indicating that valid target data is stored in the data cache unit, and from the data cache unit Get the target data in .
- the data cache component Based on the storage state of the target data corresponding to the read address information in the preset data cache component, it can be determined whether valid target data is stored in the data cache component. Because the power consumption of accessing the data cache part is lower than the power consumption of accessing the data storage part (for example, RAM), so when it is determined that the effective target data is stored in the data cache part, the target data can be directly obtained from the data cache part, The target data does not need to be acquired from the data storage unit, thus reducing memory access power consumption for acquiring the target data. In addition, for the situation that it is necessary to repeatedly access the storage space corresponding to the same RAM address information in a short period of time, the data cache component is used to store the target data, and the target data can be directly obtained in the data cache component every time. The target data is obtained from the data storage unit every time, thereby greatly reducing memory access power consumption.
- the data cache component is used to store the target data, and the target data can be directly obtained in the data cache component every time. The target data is obtained from the
- the read data component is further configured to respond to the storage status indicating that there is no valid target data in the data cache component, based on the read data request and the read address information , acquiring the target data from the data storage component.
- the data processing device further includes a data writing component, and the data writing component is communicatively connected to the data cache component and the data storage component; the data writing component is configured to determine the The first write data request of the data storage unit, the first write data request includes the first data to be written and the first write address information corresponding to the first data; and, based on the first write Address information, when it is determined that valid data corresponding to the first write address information is stored in the data cache component, updating the storage status of the data corresponding to the first write address information in the data cache component to Invalid; and based on the first write data request, store the first data at a location corresponding to the first write address information in the data storage component.
- the first write data request further includes first write cache information; the write data component is configured to: determine the data cache component based on the first write address information In the case where valid data corresponding to the first write address information is stored in and the first write cache information indicates that the first data does not need to be cached in the data cache component, the data cache component The storage state of the data corresponding to the first write address information is updated to be invalid; based on the first write address information, it is determined that valid data corresponding to the first write address information is stored in the data cache component, and When the first write cache information indicates that the first data needs to be cached in the data cache component, updating the data corresponding to the first write address information in the data cache component to the first data .
- the data processing device further includes a data writing component, and the data writing component is communicatively connected to the data cache component and the data storage component; the data writing component is configured to determine the The second write data request of the data storage unit, the second write data request includes the second data to be written and the second write address information corresponding to the second data; based on the second write address information, determine When valid data corresponding to the second write address information is stored in the data cache component, update the data corresponding to the second write address information to the second data; based on the second write data request, and store the second data at a location corresponding to the second write address information in the data storage component.
- the data processing device further includes a priority determination component, and the priority determination component is in communication connection with the data cache component and the data storage component; the data access component is configured to determine In the case of multiple data access requests for the data storage component, for each data read request in the data access request, based on the read address information corresponding to the read data request, determine that the target data corresponding to the read data request is in The storage status in the corresponding data cache component; the data access component includes a data read component and/or a data write component; based on the storage status, select a target read data request that meets preset conditions from the read data request; The preset condition includes that there is no valid target data in the data cache component corresponding to the read data request; when the number of target access requests is greater than the preset number, a preset priority determination component is used to determine that each target access Requested access priority; the number of the target access requests is determined according to the number of the target read data requests and/or the number of write data requests in the plurality of data access requests; access
- the data cache component includes a plurality of cache subcomponents respectively corresponding to each data access component.
- the data access component is configured to use a preset priority determination component to set target read data requests with the same read address information as the same access priority.
- the read data request includes additional write cache information; the read data component is further configured to, after obtaining the target data from the data storage component, When the cache information indicates that the target data needs to be cached in the data cache component, store the target data based on the latest address to be written corresponding to the data cache component; store the target data in the data cache component The storage state in is set to valid.
- an embodiment of the present disclosure provides a data processing method, including: determining a read data request for a target memory, where the read data request includes read address information corresponding to the target data to be read; based on the read address information, determining the storage state of the target data in a preset data cache module; in response to the storage state indicating that valid target data is stored in the data cache module, obtaining the target data from the data cache module target data.
- the method further includes: in response to the storage status indicating that there is no valid target data in the data cache module, based on the read data request and the read address information, from the Acquiring the target data from the target memory.
- the method further includes: determining a first write data request for the target memory, where the first write data request includes the first data to be written and the first data corresponding to the first data Write address information; if it is determined based on the first write address information that valid data corresponding to the first write address information is stored in the data cache module, the first write address information in the data cache module The storage state of the data corresponding to the write address information is updated to be invalid; based on the first write data request, the first data is stored in the target memory at a location corresponding to the first write address information.
- the first write data request further includes first write cache information; the method further includes: based on the first write address information, determining that the data cache module stores In the case that the data corresponding to the first write address information is valid and the first write cache information indicates that the first data does not need to be cached in the data cache module, the data cache in the data cache module The storage state of the data corresponding to the write address information is updated to be invalid; based on the first write address information, it is determined that valid data corresponding to the first write address information is stored in the data cache module, and the second When the write cache information indicates that the first data needs to be cached in the data cache module, updating the data corresponding to the first write address information in the data cache module to the first data.
- the method further includes: determining a second data write request for the target memory, where the second data write request includes the second data to be written and the first data corresponding to the second data.
- Two write address information when it is determined based on the second write address information that valid data corresponding to the second write address information is stored in the data cache module, write the data corresponding to the second write address information
- the data is updated to the second data; based on the second write data request, the second data is stored at a location corresponding to the second write address information in the target memory.
- the method further includes: when multiple data access requests for the target memory are determined, for each data read request in the data access requests, based on the read data request Corresponding to the read address information, determine the storage status of the target data corresponding to the read data request in the corresponding data cache module; based on the storage status, filter the target read data requests that meet the preset conditions from the read data requests;
- the preset conditions include that there is no valid target data in the data cache module corresponding to the read data request; when the number of target access requests is greater than the preset number, a preset priority determination module is used to determine that each target access Requested access priority; the number of the target access requests is determined according to the number of the target read data requests and/or the number of write data requests in the plurality of data access requests; access priority based on each target access request level, sequentially accessing the target memory.
- the data cache module includes a plurality of cache submodules respectively corresponding to each data access module; the data access module includes a data read module and a data write module.
- the determining the access priority of each target access request by using a preset priority determination module includes: using the preset priority determination module to read the Data requests are set to the same access priority.
- the read data request includes additional write cache information; after obtaining the target data from the target memory, further includes: after determining that the additional write cache information indicates the target data When it needs to be cached in the data cache module, store the target data based on the latest address to be written corresponding to the data cache module; set the storage status of the target data in the data cache module to valid .
- an optional implementation manner of the present disclosure further provides a computer device, including the first aspect above, or the apparatus in any possible implementation manner of the first aspect.
- an optional implementation manner of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the above-mentioned second aspect, or any of the second aspects may be executed. Steps in one possible implementation.
- FIG. 1 shows a flowchart of a data processing method provided by an embodiment of the present disclosure
- Fig. 2 shows a schematic diagram of a data reading module accessing a data cache module provided by an embodiment of the present disclosure
- FIG. 3 shows a flow chart of a data writing method provided by an embodiment of the present disclosure
- FIG. 4 shows a flow chart of a method for processing determined multiple data access requests provided by an embodiment of the present disclosure
- Fig. 5 shows a schematic diagram of a plurality of read data modules independently accessing target data corresponding to address information in a data cache module provided by an embodiment of the present disclosure
- FIG. 6 shows a schematic diagram of a plurality of read data modules intersecting with each other to access target data corresponding to address information in a data cache module provided by an embodiment of the present disclosure
- FIG. 7 shows a schematic diagram of a data processing device provided by an embodiment of the present disclosure
- Fig. 8 shows a schematic structural diagram of a computer device provided by an embodiment of the present disclosure.
- AI artificial intelligence
- the application of AI chips is becoming more and more extensive.
- PPA performance, power consumption, and area
- the control of power consumption is particularly important.
- the data reading module needs to access the RAM according to the address information, so as to obtain the data stored in the storage space corresponding to the address information in the RAM.
- the increase of read data modules and the number of visits a large amount of memory access power consumption will be generated.
- the present disclosure provides a data processing device, method, computer equipment, and computer-readable storage medium, based on the storage status of the target data to be read corresponding to the read address information in the preset data cache module, which can Determine whether valid target data is stored in the data cache module. Since the power consumption of accessing the data cache module is lower than the power consumption of accessing the target memory (for example, RAM), when it is determined that valid target data is stored in the data cache module, the target data can be directly obtained from the data cache module without The target data needs to be acquired from the target memory, thereby reducing memory access power consumption for acquiring the target data.
- the target memory for example, RAM
- the data cache module is used to store the target data, and the target data can be directly obtained in the data cache module every time, without The target data is acquired from the target memory every time, thereby greatly reducing memory access power consumption.
- the execution subject of the data processing method provided by the embodiments of the present disclosure is generally a computer device with certain computing capabilities.
- the data processing method may be implemented by a processor invoking computer-readable instructions stored in a memory.
- FIG. 1 it is a flowchart of a data processing method provided by an embodiment of the present disclosure, and the method may include the following steps S101 to S103.
- S101 Determine a data read request for a target memory, where the data read request includes read address information corresponding to target data to be read.
- the target memory can be the RAM in the chip (the AI chip is used as an example in the following, other types of chips can also apply the solution provided by the present disclosure, and will not be repeated here), and different address information in the RAM can be used to store different data, and can also be used to write new data.
- the read data request may be a request for obtaining data in the target memory
- the read address information may represent a certain address or address range in the target memory
- the target data may be data stored at a location corresponding to the read address information in the target memory .
- the data read request for the target memory may be determined by any data read module with access requirements based on the read address information corresponding to the target data to be acquired.
- the client needs to obtain the target data corresponding to the read address information, it generates a read data request based on the read address information, and sends the read data request to the read data module in the AI chip, so that the read data module can be based on The received read data request determines a read data request for the read address information. How to determine the data read request is not limited here.
- S102 Based on the read address information, determine a storage state of the target data in a preset data cache module.
- the preset data cache module may be a first-level cache, for example, it may be a Register, or it may be a cache memory Cache, specifically, it may be represented by L0 Cache.
- the data caching module is used for caching address information and corresponding data.
- the data cache module may set a limited storage space for storing limited pieces of address information and data corresponding to the address information.
- the setting of the storage space of the data cache module can be set according to the application scenario.
- the data stored in the data cache module can be updated according to the memory access requirements of different data read modules and the target data to be acquired by the data read module that currently initiates the data read request.
- the target memory is frequently accessed and the accessed address information includes multiple addresses. If the address information for each access is different, the data cached in the data cache module and the corresponding address information will not correspond to the read data request every time because the storage space of the data cache module is limited and the stored data can be updated. match the target data. Therefore, the method provided by the implementation example of the present disclosure can be applied to the situation that the storage space corresponding to the same RAM address information needs to be repeatedly accessed within a specific time, so that it can be guaranteed that the valid data stored in the data cache module can be compared with the read data The target data corresponding to the request matches, thereby reducing memory access power consumption when the data read module accesses the target data.
- the storage state of the data is used to represent whether valid read address information and corresponding data are stored in the preset data cache module.
- the storage status of the data may include: indicating that there is valid read address information and its corresponding data valid state in the data cache module, indicating that there is read address information and its corresponding data in the data cache module but the read address information corresponds The invalid state of the data is invalid, and the state indicating that the read address information and the corresponding data do not exist in the data cache module.
- each read data module may initiate a read data request for different address information in the RAM.
- a data reading module may be provided with a corresponding data cache module, and different data reading modules may be provided with different data cache modules.
- FIG. 2 it is a schematic diagram of a data reading module accessing a data cache module provided by an embodiment of the present disclosure. in,
- Read data module 210 (may be represented as Rd_mdl) is used for initiating a read data request;
- cupen is an identifier representing additional write cache information, and is used to indicate whether the target data read from the target memory 220 needs to be written into the data cache module 210;
- rden represents the read enable of the read data module 210
- raddr indicates the address information included in the read data request, which may also be referred to as read address information in this article;
- rdata represents the read target data, which can be the data read from the data cache module 230, or the data read from the target memory 220;
- the data cache module 230 is used to cache data, which can be expressed as L0 Cache or Register, that is, according to the different types of preset data cache modules, it can be represented by different symbols, but both L0 Cache/Register can be used to represent data Cache module 230;
- ram_rden indicates the read enable of the target memory
- ram_raddr represents the read address information corresponding to the target memory 220 included in the read data request
- ram_rdata represents the target data obtained from the target memory 220
- the target memory 220 may specifically be RAM,
- the write data module 240 in the data processing device can be represented as Wr_mdl,
- wren represents the write enable of the write data module 240
- waddr indicates the address information included in the write data request, which may also be referred to as write address information in this article;
- wdata indicates the data to be written.
- the data-reading module 210 has the ability to read data through enabling rden, and then the read address included in the data-reading request can be determined
- the storage state of the target data corresponding to the information raddr in the data cache module 230 . If the storage status indicates that valid target data rdata is stored in the data cache module 230 , the target data rdata is directly acquired from the data cache module 230 .
- the read data module 210 can be enabled to read data from the target memory 220 by enabling ram_rden, and then the read data request can be
- the included read address information raddr is used as the read address information ram_raddr in the target memory 220, and the target data ram_rdata at the position corresponding to the read address information ram_raddr is read from the target memory 220, so that the read data module 210 can obtain from the target memory 220 Target data ram_rdata.
- the write data module 240 when any write data module 240 with a write data requirement determines the write data request, the write data module 240 can have the ability to write the data wdata into the target memory 220 by enabling wren, after that, it can Write the data wdata in the target memory 220 to the storage space corresponding to the address information waddr included in the write data request. Moreover, after wren is enabled, the write data module 240 also has the ability to write data wdata into the data cache module 230 , for example, it can directly write the data wdata and corresponding address information waddr into the data cache module 230 .
- mapping relationship between the address information stored in the data cache module, the data corresponding to the address information, and the storage state of the data corresponding to the address information.
- the read data module After the read data module obtains the read address information, it can also determine the various address information stored in the data cache module, and then can determine whether there is read address information in the data storage module; if yes, then it can be determined according to the mapping relationship.
- the storage state of the data if not, the storage state can be directly determined as indicating that there is no target data corresponding to the read address information in the data cache module.
- multiple read data modules can also be correspondingly provided with the same data cache module. During specific implementation, it may be set according to the address information of the storage space to be accessed by the data reading module, or may be set based on user requirements, which is not limited here. For example, in the case where each data read module in multiple read data modules can access data in the RAM independently, a corresponding data cache module can be set for each read data module; In the case that each data read module in the data access data in the RAM intersects with each other, the same data cache module can be correspondingly set for multiple data read modules.
- mutual cross access means that multiple data reading modules can access the storage space corresponding to the same address information in the RAM at a specific time interval and/or a certain number of access times, so as to obtain the data corresponding to the address information.
- the data read module may determine the storage state of the target data corresponding to the read address information in the data cache module corresponding to the read data request based on the read address information included in the read data request.
- S103 Obtain the target data from the data cache module in response to the storage status indicating that valid target data is stored in the data cache module.
- the data read module can directly read data from the data cache module. Obtain the target data corresponding to the read address information.
- the data reading module may perform data processing based on the acquired target data, and may also send the acquired target data to the client, so that the client acquires the target data and performs data processing based on the target data.
- the target data can be directly obtained from the data cache module without The target data needs to be acquired from the target memory, thereby reducing memory access power consumption for acquiring the target data.
- the target memory for example, RAM
- the data cache module is used to store the data corresponding to the RAM address information, so that the data corresponding to the RAM address information can be directly accessed each time.
- the data corresponding to the RAM address information obtained in the data cache module does not need to obtain the data corresponding to the RAM address information from the target memory every time, thereby greatly reducing memory access power consumption and effectively avoiding waste of resources.
- the target memory when it is determined based on the storage status that there is no valid target data in the data cache module, for example, it is determined that there is no read address information and its corresponding target data in the data cache module, or it is determined that the data
- the target memory can be accessed directly based on the read data request and the read address information contained therein, and the read address can be directly read from the target memory The target data corresponding to the information, so as to obtain the data corresponding to the read data request.
- the target data stored in the target memory can be obtained by directly accessing the target memory, which ensures that each read data request can be effectively obtained.
- the response to obtain the required target data is not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, the target data stored in the target memory can be obtained by directly accessing the target memory, which ensures that each read data request can be effectively obtained. The response to obtain the required target data.
- the operation request for the target memory may also include a write data request determined by the write data module 240 in FIG. 2 , and the write data module 240 may implement data writing to the target memory based on the write data request.
- data may be written into the target memory according to the steps shown in FIG. 3 .
- FIG. 3 it is a flow chart of a data writing method provided by an embodiment of the present disclosure, and the method may include the following steps S301 to S303 .
- S301 Determine a first write data request for a target memory.
- the first write data request includes the first data to be written and the first write address information corresponding to the first data, wherein the first write address information indicates the data storage address in the target memory, specifically, it may indicate the address in the RAM data storage address.
- the write data module 240 may determine the target memory based on the first data to be written and the first write address information representing the storage space where the first data needs to be written. The first write data request to the target memory.
- the write data module may determine whether the first write address information and corresponding data are cached in the data cache module based on the first write address information. If so, the storage state of the data corresponding to the first write address information in the data cache module may be updated to be invalid. During specific implementation, the storage status of the above data may be updated to an invalid status. Since it is necessary to write new data at the first write address information of the target memory, the data at the position corresponding to the first write address information of the target memory will change, and the first write address stored in the data cache module will The data corresponding to the information is no longer accurate.
- the target memory can be accessed directly based on the first write address information included in the first write data request, and the first data can be written in the target memory corresponding to the first write address information. at the location.
- the first data may be used to update the previously stored data, for example, the data at the position corresponding to the first write address information is updated to the first a data.
- the first data may be directly stored at the location corresponding to the first write address information.
- S303 and S302 may be executed synchronously or asynchronously. Both synchronous execution and asynchronous execution can be used to update the storage state of the data corresponding to the first write address information in the data cache module to invalid but not update the data in the data cache module. For example, the asynchronous execution may be used to firstly update the storage state of the data corresponding to the first write address information in the data cache module, and then write the first data to the location corresponding to the first write address information in the target memory.
- the first write data request may further include first write cache information.
- the first write cache information is used to indicate whether the first data corresponding to the first write data request needs to be used to update the data corresponding to the first write address information stored in the data cache module.
- the data corresponding to the first write address information in the module is updated, that is, it is determined whether the first data needs to be cached in the data cache module; if not, the storage of the data corresponding to the first write address information in the data cache module can be The status update is invalid; if yes, the first data can be directly written in the data cache module as the data corresponding to the first write address information, and there is no need to update the storage status of the data corresponding to the first write address information in the data cache module , that is, to keep the storage state of the data corresponding to the first write address information in the data cache module as valid.
- the data writing to the target memory may also be implemented according to the following steps.
- Step 1 Determine a second data write request for the target memory.
- the second data write request includes the second data to be written and the second write address information corresponding to the second data.
- Step 2 When it is determined based on the second write address information that the data corresponding to the valid second write address information is stored in the data cache module, update the data corresponding to the second write address information in the data cache module to the second data .
- the data corresponding to the second write address information in the data cache module can be updated as second data. In this way, when a new read data request including the second write address information is obtained, the updated second data can be obtained directly from the data cache module without accessing the target memory, thereby reducing memory access power consumption .
- Step 3 Based on the second write data request, store the second data at a location corresponding to the second write address information in the target memory.
- Step 3 For the specific implementation steps of Step 3, reference may be made to S303, which will not be repeated here.
- the first write cache information is information used to indicate whether the data in the write data request needs to be cached in the data cache module.
- the data processing method provided by the embodiments of the present disclosure further includes the step of processing multiple data access requests obtained synchronously, where the data access requests can be data access modules (including at least one read data module) and at least one write data module), and includes a read data request and a write data request.
- the read data request is initiated by the read data module
- the write data request is initiated by the write data module.
- FIG. 4 it is a flow chart of a method for processing multiple data access requests provided by an embodiment of the present disclosure, and the method may include the following steps S401 to S404 .
- Data access requests may include read data requests and write data requests.
- its purpose is to write the data to be written into the target memory, therefore, it is only necessary to determine the number of write data requests for subsequent arbitration, and it is not necessary to determine the write data corresponding to the write data request
- the storage status of the address information and its corresponding data in the data cache module For the read data request, if valid corresponding data is stored in the data cache module, the data can be obtained directly from the data cache module without accessing the target memory. Therefore, in the case that multiple read data requests for the target memory are determined, it is necessary to screen them first, and select the target read data requests that need to access the target memory.
- each read data request based on the read address information in the read data request, determine the storage status of the target data corresponding to the read data request in the corresponding data cache module.
- the data cache module may include multiple cache submodules.
- each cache sub-module corresponds to a data read module, and the specific setting of the cache sub-module can be shown in FIG. 5 .
- a plurality of read data modules 510-0 to 510-n provided by the embodiment of the present disclosure independently access the target data corresponding to the address information in the data cache modules 530-0 to 530-n.
- different read data modules 510-0 to 510-n can be expressed as Rd_mdl0 to Rd_mdln, and can be collectively referred to as read data modules 510.
- FIG. 5 only shows read data modules 510-0 and read data modules 510 -1 and the read data module 510-n, and the remaining read data modules are not shown.
- the preset cache submodule 530-0 corresponding to the read data module 510-0 can be used to cache the data corresponding to the read address information in the read data request determined by the read data module 510-0;
- the cache submodule 530-1 corresponding to 510-1 can be used to cache the data corresponding to the read address information in the read data request determined by the read data module 510-1;
- the preset cache submodule corresponding to the read data module 510-n The module 530-n can be used to cache the data corresponding to the read address information in the read data request determined by the read data module 510-n;
- the cache sub-module 530-i corresponding to the other read data module 510-i is not shown, i It is an integer greater than 1 and less than n.
- the caching submodules 530 - 0 to 530 - n may be collectively referred to as the caching submodule 530 .
- the write data module 540 in Fig. 5 can correspond to each cache submodule 530, and the wren/addr corresponding to each cache submodule 530 indicates that the write data module 540 can write and the data to be written to the cache submodule 530 The address information addr corresponding to the data.
- each write data module may also correspond to a cache sub-module.
- a data-reading module, a data-writing module and a cache sub-module can constitute a module group, and the data-reading module and the data-writing module in the module group correspond to the cache sub-module in the module group, responsible for Read and write data corresponding to a specific range of address information.
- FIG. 6 it is a schematic diagram of a plurality of read data modules 510 - 0 - 510 - n intersecting with each other to access target data corresponding to address information in the data cache module 630 provided by the embodiment of the present disclosure.
- one data cache module 630 (represented as L0 ) is communicatively connected with multiple read data modules 510 - 0 - 510 - n (represented as Rd_md10 - Rd_mdln ) and write data module 540 .
- the corresponding data cache module from each read data request 630 or cache submodules 530-0 to 530-n determine the storage status of the corresponding target data.
- the preset condition includes that there is no effective target data corresponding to the read data request in the data cache module corresponding to the read data request.
- it can be determined based on the storage status of the target data corresponding to the read data request in the corresponding data cache module (or data cache submodule) in the data cache module (or data cache submodule) Whether to store valid target data; if yes, the valid target data stored in the data cache module can be fed back to the read data module corresponding to the read data request, that is, the data cache module responds to the read data request, and the following can It is called "the read data request hits (hit) the data cache module"; if not, the read data request is sent to the target memory as the target read data request for processing, that is, the target memory responds to the read data request, and Hereinafter, it may be referred to as "the read data request misses the data cache module".
- the obtained multiple read data requests may be screened according to the determined storage status, and the target read data requests
- target read data requests that do not have valid target data in the corresponding data cache module (or cache submodule) are screened out from multiple read data requests.
- S403 When the number of target access requests is greater than the preset number, use a preset priority determination module to determine the access priority of each target access request.
- the target access request includes the target read data request and the write data request in the plurality of data access requests; the number of target access requests is based on the number of the target read data request and The number of write data requests is determined.
- the preset priority determination module is used to determine the access priority of each target access request.
- the priority determination module may be an arbiter (Arbiter).
- the number of target read data requests can be determined first, and the number of write data requests in multiple data access requests can be determined, and the sum of the target number of read data requests and the number of write data requests can be used as The number of target access requests. Then, it may be determined whether the number is greater than a preset number. Wherein, the preset number may be 1. It can be seen from the introduction of the above embodiments that the target memory can only meet the requirement of reading or writing data corresponding to one address information at the same time. Therefore, if the number of target access requests for the target memory is greater than 1, two target access requests cannot be processed synchronously. Therefore, it is necessary to separately process multiple target access requests, including determining the access priority of each target access request. A preset number may be used to determine whether the access priority of the target access request needs to be determined.
- the number of target read data requests may be set to 0 by default.
- target read data requests with the same read address information can also be determined based on the read address information in each target read data request. Then, the final number of target data read requests may be determined based on the number of target data read requests with the same read address information and the number of target access requests with different read address information. During specific implementation, regardless of the number of target data read requests with the same read address information, in the process of determining the number of target read data requests, this number is counted as 1 for calculation.
- the target data that needs to be acquired by multiple target read data requests with the same read address information is the same, and in response to one target read data request in the multiple target read data requests, the target data stored in the target After the corresponding target data in the memory is stored, the target data can be sent to the read data modules respectively corresponding to the multiple target data read requests, so that the above multiple read data modules can obtain the required target data synchronously. Therefore, in the process of determining the number of target access requests, the number of target read data requests with the same read address information may be taken as 1 for calculation.
- a pre-set priority determination module ie, an arbiter
- an arbiter can be used to perform arbitration to determine the access priority of each target access request, and then, can Based on the access order corresponding to the determined access priority, respond to each target access request in turn.
- the arbitrator may be used to determine the access priority of each target access request according to the function of the data access module corresponding to each target access request; Two, the arbitrator can be used to determine the access priority of each target access request according to the position of the read address information corresponding to the target read data request in each target access request, and the write address information corresponding to the write data request; The arbitrator is used to determine the access priority of each target access request according to the identifier used to represent the importance carried in each target access request; 4.
- the access priority is preset.
- the priority determination module may set the priorities of multiple target access requests with the same read address information to the same priority.
- ram_rdif0 ⁇ ram_rdifn may represent arbitration request signals requesting arbitration for access requests issued by data access modules (including data read modules 510-1 ⁇ 510-n and data write module 540).
- ram_rdif0 represents an arbitration request signal requesting to arbitrate the target access request (specifically a read data request) from the access target memory 520 of the read data module 510-0
- ram_rdif1 represents a request to arbitrate the access target from the read data module 510-1.
- the arbitration request signal for arbitrating the read data request of the memory 520, ram_rdifn indicates the arbitration request signal for arbitrating the target access request (specifically, the read data request) from the read data module 510-n to access the target memory 520.
- the arbitration request signal for requesting to arbitrate the target access requests (specifically read data requests) from other read data modules 510 to access the target memory 520 is not shown one by one in Fig. 5 and Fig. 6 , but both can be used ram_rdif said.
- the arbitration request signals ram_rdif0 ⁇ ram_rdifn are all input to a preset priority determination module (eg, an arbiter) 550 .
- each data read module 510-0-510-n corresponds to an independent data cache
- the sub-modules 530-0-530-n, and the data-reading modules 510-0-510-n can simultaneously send a data-reading request to the corresponding data cache sub-modules 530-0-530-n.
- the read data request will be converted into an arbitration request signal and sent to, for example, the arbiter’s Priority determination module 550 .
- 550 can determine the access priority of the target access request corresponding to each arbitration request signal (including the read data request not directly responded by the data cache submodules 530-0 ⁇ 530-n) according to the obtained arbitration request signal .
- the data reading modules 510-0 to 510-n can share one data cache module 630.
- the data cache module 630 is constructed by registers or cache memories, the data cache module 630 can theoretically respond to multiple read data requests at the same time.
- the data cache module 630 cannot directly respond to the read data requests (for example, the data cache module 630 does not store the target data corresponding to the read data requests, Or the storage status of the corresponding stored target data is invalid), then the data read request will be converted into a corresponding arbitration request signal, and the arbitration request signal will be sent to the priority determination module 550 . Afterwards, the priority determination module 550 may determine the access priority of the target access request (including the read data request not directly responded by the data cache module 630 ) corresponding to each arbitration request signal according to the obtained arbitration request signal.
- the priority determination module 550 as an arbiter receives multiple arbitration request signals at the same time, that is, according to the received arbitration request signals, determine the access priority of the target access request corresponding to each request arbitration signal; then According to the determined access priority, sequentially connect the data access interface of the target memory 520 to the data access modules 510-0-510-n and 540 corresponding to each target access request; after that, each data access module 510-0-510 -n and 540 can perform data reading or data writing to the target memory 520 based on the connected data access interface.
- the priority determining module 550 receives a new arbitration request signal, then it may follow the newly acquired arbitration request signal to generate Time, store the newly acquired arbitration request signal into the preset arbitration queue; when the priority determination module 550 completes the current arbitration, it will acquire a new arbitration request signal from the arbitration queue for a new arbitration according to the order of generation time. arbitration.
- the arbitration process of the priority determination module 550 such as an arbiter is described. After it is determined that multiple read data modules 510-0-510-n issue multiple read data requests for the target memory 520, and the target data corresponding to the multiple read data requests are in each cache sub-module 530-0-530-n In the case where the storage statuses of all indicate invalid, the read data requests issued by multiple read data modules 510-0 ⁇ 510-n can be converted into arbitration request signals via the corresponding cache submodules 530-0 ⁇ 530-n, and cache The submodules 530 - 0 to 530 - n send arbitration request signals to the arbiter 550 .
- the read data request generated by the read data module 510-0 requests arbitration from the arbitrator via the arbitration request signal ram_rdif0
- the read data request generated by the read data module 510-1 requests arbitration from the arbitrator via the arbitration request signal ram_rdif1
- the read data module 510 The read data request generated by -n requests arbitration from the arbitrator through the arbitration request signal ram_rdifn, and the process of initiating arbitration for the read data requests generated by the data read modules 510-2 ⁇ 510-n-1 is similar and will not be repeated here.
- the arbiter 550 can receive a plurality of arbitration request signals ram_rdif0 ⁇ ram_rdifn, and then, the arbiter 550 arbitrates the read data request corresponding to each arbitration request signal, and determines the access priority of each read data request. Afterwards, each data read request may sequentially obtain target data from the target memory 520 according to the determined access priority.
- S404 Based on the access priority of each target access request, sequentially access the target memory.
- the priority determination module can sequentially establish the read data module and target memory corresponding to each target read data request according to the determined access priority of each target read data request Furthermore, each read data module can use the data access interface to access the target memory based on the read address information of its corresponding target read data request, thereby realizing sequentially obtaining each The target data corresponding to the target read data request.
- any target read data request establish the connection between the read data module corresponding to the target read data request and the target data access interface, and then, the read data module can use the data read address information corresponding to the target read data request
- the access interface accesses the target memory, and acquires the target data at the location corresponding to the read address information in the target memory.
- the connection between the write data module corresponding to each write data request and the data access interface can be established sequentially, so that each The data writing module uses the data access interface to write the data to be written corresponding to the data writing request into the target memory.
- an arbitrator may be used to first determine the access priority corresponding to the write data request, and then the access priority corresponding to the write data request may be sequentially The data to be written is written into the target memory, and then based on the determined access priority of the read data request, the target data corresponding to the read data request is sequentially acquired from the target memory.
- the arbitrator can be directly used to determine the overall access priority of each read data request and each write data request, and based on the determined access priority, complete reading target data from the target memory and writing data to be written operations into target memory.
- the read data request may further include additional write cache information, where the additional write cache information is used to indicate whether the target data obtained from the target memory needs to be cached in the data cache module.
- the additional write cache information may be identified by cupen in FIG. 2 , FIG. 5 and FIG. 6 .
- cupen when cupen is set to 1, it means that the acquired target data can be cached in the data cache modules 230, 530-0-530-n, and 630; when cupen is set to 0, it means that the acquired target data does not need to be cached in In the data cache modules 230, 530-0-530-n, 630.
- the value corresponding to the cupen identifier can be determined by the data reading module 210, 510-0-510-n corresponding to the identifier according to its corresponding memory access requirement.
- the target data after the target data is acquired from the target memory, it may also be determined whether the target data needs to be cached in the data cache module based on the additional write cache information in the read data request corresponding to the target data. If the target data needs to be cached in the data cache module, it may be further determined whether data corresponding to the read address information corresponding to the target data is stored in the data cache module. If it is determined that the data corresponding to the read address information corresponding to the target data is stored in the data cache module, the stored data corresponding to the read address information can be updated to the target data, so as to complete the process of updating the read address information in the data cache module. The corresponding data is updated, and the storage status of the target data in the data cache module is set to valid, for example, set to a valid status.
- the data corresponding to the read address information corresponding to the target data is not stored in the data cache module, determine whether the storage space of the data cache module has been used up; if the storage space of the data cache module has not been used up, then The lowest free address can be selected from the cache address corresponding to the remaining space of the data cache module, the read address information and its corresponding target data can be cached in the lowest free address, and the storage status of the target data in the data cache module set to valid.
- the latest address to be written corresponding to the data cache module can be determined, and the address information and its corresponding address can be read according to the latest address to be written. storing the target data, and setting the storage status of the target data in the data caching module as valid.
- the latest address to be written is used to represent an address that the data cache module can use to store address information and data corresponding to the address information at the current time. For example, the latest address to be written may be determined by incrementing the address of the last address of the data cache module used to store address information and data corresponding to the address information in an address increment manner.
- the address used for storage next time will loop back to the data The lowest address in the cache module, which can ensure the longest storage time for the stored data and address information corresponding to the latest address to be written each time.
- the address information and its corresponding target data according to the latest address to be written when the storage space of the data cache module has been used up, it is equivalent to replacing the storage time in the data cache module with the target data acquired this time. The oldest data, thus effectively ensuring the timeliness of the valid data stored in the data cache module.
- the determination steps involved in caching the acquired target data in the data caching module by utilizing the additional write caching information can be executed synchronously.
- an embodiment of the present disclosure provides a data processing device corresponding to a data processing method, including: a data reading component, a data caching component, and a data storage component; the data reading component is communicatively connected to the data caching component, The data cache component is communicatively connected to the data storage component; the read data component is configured to determine a read data request for the data storage component, and the read data request includes read address information corresponding to the target data; and , based on the read address information, determining a storage status of the target data in a preset data cache component, and responding to the storage status indicating that valid target data is stored in the data cache component, from the data The target data is obtained from the cache component.
- the read data component is further configured to, in response to the storage status indicating that there is no valid target data in the data cache component, based on the read data request and the read address information, from The target data is acquired from the data storage component.
- the data processing device further includes a data writing component, the data writing component communicates with the data cache component and the data storage component; the data writing component is configured to determine the A first write data request from the data storage unit, the first write data request including first data to be written and first write address information corresponding to the first data; and, based on the first write address information When it is determined that valid data corresponding to the first write address information is stored in the data cache component, updating the storage status of the data corresponding to the first write address information in the data cache component to invalid; And based on the first write data request, store the first data at a location corresponding to the first write address information in the data storage component.
- the data writing component communicates with the data cache component and the data storage component; the data writing component is configured to determine the A first write data request from the data storage unit, the first write data request including first data to be written and first write address information corresponding to the first data; and, based on the first write address information When it is determined that valid data corresponding to the first write address information is stored in the data cache component
- the first write data request further includes first write cache information; the write data component is configured to: determine the data stored in the data cache component based on the first write address information If there is valid data corresponding to the first write address information, and the first write cache information indicates that the first data does not need to be cached in the data cache component, the data cache component in the data cache component The storage state of the data corresponding to the first write address information is updated to be invalid; based on the first write address information, it is determined that valid data corresponding to the first write address information is stored in the data cache component, and the In a case where the first write cache information indicates that the first data needs to be cached in the data cache component, updating the data corresponding to the first write address information in the data cache component to the first data.
- the data processing device further includes a data writing component, the data writing component communicates with the data cache component and the data storage component; the data writing component is used to determine the The second write data request of the component, the second write data request includes the second data to be written and the second write address information corresponding to the second data; based on the second write address information, determine the When valid data corresponding to the second write address information is stored in the data cache component, update the data corresponding to the second write address information to the second data; based on the second write data request, storing the second data at a location corresponding to the second write address information in the data storage component.
- the data writing component communicates with the data cache component and the data storage component; the data writing component is used to determine the The second write data request of the component, the second write data request includes the second data to be written and the second write address information corresponding to the second data; based on the second write address information, determine the When valid data corresponding to the second write address information is stored in the data cache component, update the data corresponding to the second write address information to
- the data processing device further includes a priority determination component, and the priority determination component is connected in communication with the data cache component and the data storage component; the data access component is configured to determine In the case of multiple data access requests for the data storage component, for each read data request in the data access request, based on the read address information corresponding to the read data request, determine the The storage status of the target data in the corresponding data cache component; the data access component includes a data read component and/or a data write component; based on the storage status, select the target that meets the preset condition from the read data request Read data request; the preset condition includes that there is no valid target data in the data cache component corresponding to the read data request; when the number of target access requests is greater than the preset number, use a preset priority determination component to determine The access priority of each target access request; the number of the target access requests is determined according to the number of the target read data requests and/or the number of write data requests in the plurality of data access requests; based on each target access According to the requested access priority, the
- the data cache component includes a plurality of cache subcomponents respectively corresponding to each data access component.
- the data access component is configured to use a preset priority determination component to set target read data requests with the same read address information as the same access priority.
- the read data request includes additional write cache information; the read data component is further configured to, after obtaining the target data from the data storage component, determine the additional write cache information When indicating that the target data needs to be cached in the data cache component, storing the target data based on the latest address to be written corresponding to the data cache component; storing the target data in the data cache component Storage status is set to valid.
- the function of the read data component is the same as the function of the read data module in the above-mentioned embodiment
- the function of the data storage component is the same as that of the target memory in the above-mentioned embodiment
- the data cache component is the same as the data cache module in the above-mentioned embodiment
- the write The function of the data component is the same as the write data module in the above-mentioned embodiment
- the function of the priority determination component is the same as the priority determination module in the above-mentioned embodiment
- the function of the data access component is the same as the data access module in the above-mentioned embodiment, about
- the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process.
- the specific execution order of each step should be based on its function and possible
- the inner logic is OK.
- the embodiment of the present disclosure also provides a data processing device corresponding to the data processing method. Since the problem-solving principle of the device in the embodiment of the present disclosure is similar to the above-mentioned data processing method of the embodiment of the present disclosure, the implementation of the device Reference can be made to the implementation of the method, and repeated descriptions will not be repeated.
- FIG. 7 it is a schematic diagram of a data processing device provided by an embodiment of the present disclosure, and the device includes:
- the first determination module 701 is configured to determine a read data request for the target memory, where the read data request includes read address information corresponding to the target data to be read;
- the second determination module 702 is configured to determine the storage state of the target data in the preset data cache module based on the read address information
- the acquiring module 703 is configured to acquire the target data from the data cache module in response to the storage status indicating that valid target data is stored in the data cache module.
- the obtaining module 703 is further configured to respond to the storage status indicating that there is no valid target data in the data cache module, based on the read data request and the read address information , acquire the target data from the target memory.
- the device further includes a first update module 704; the first determination module 701 is further configured to determine a first write data request for the target memory, and the first write data request includes Including first data to be written and first write address information corresponding to the first data; the first update module 704 is configured to determine that the data cache module stores a In the case of valid data corresponding to the first write address information, update the storage status of the data corresponding to the first write address information in the data cache module to invalid; based on the first write data request, set The first data is stored at a location corresponding to the first write address information in the target memory.
- the first write data request further includes first write cache information
- the first update module 704 is configured to: determine the data cache information based on the first write address information When valid data corresponding to the first write address information is stored in the cache module, and the first write cache information indicates that the first data does not need to be cached in the data cache module, cache the data The storage state of the data corresponding to the first write address information in the module is updated to be invalid; based on the first write address information, it is determined that valid data corresponding to the first write address information is stored in the data cache module , and when the first write cache information indicates that the first data needs to be cached in the data cache module, updating the data corresponding to the first write address information in the data cache module to the first a data.
- the device further includes a second updating module 705; the first determining module 701 is further configured to determine a second write data request for the target memory, and the second write data request includes Including second data to be written and second write address information corresponding to the second data; the second update module 705 is configured to determine that the data cache module stores a In the case of valid data corresponding to the second write address information, update the data corresponding to the second write address information to the second data; based on the second write data request, update the second data stored at a location corresponding to the second write address information in the target memory.
- the first determining module 701 is further configured to determine a second write data request for the target memory, and the second write data request includes Including second data to be written and second write address information corresponding to the second data
- the second update module 705 is configured to determine that the data cache module stores a In the case of valid data corresponding to the second write address information, update the data corresponding to the second write address information to the second data; based on the second write data request, update the second
- the device further includes a third determination module 706; the second determination module 702 is configured to For each read data request in the access request, based on the read address information corresponding to the read data request, determine the storage status of the target data corresponding to the read data request in the corresponding data cache module; the third determination module 706 uses Based on the storage status, select target read data requests that meet preset conditions from the read data requests; the preset conditions include that there is no valid target data in the data cache module corresponding to the read data request; When the number of access requests is greater than the preset number, a preset priority determination module is used to determine the access priority of each target access request; the number of the target access requests is based on the number of the target read data requests and/or The number of write data requests in the plurality of data access requests is determined; based on the access priority of each target access request, the target memory is accessed in sequence.
- the second determination module 702 is configured to For each read data request in the access request, based on the read address information corresponding to the read data request, determine
- the data cache module includes a plurality of cache submodules respectively corresponding to each data access module; the data access module includes a data read module and a data write module.
- the third determination module 706 is configured to use a preset priority determination module to set target read data requests with the same read address information as the same access priority.
- the read data request includes additional write cache information; the device further includes: a third update module 707, configured to obtain the target from the target memory in the obtain module 703 After data, when it is determined that the additional write cache information indicates that the target data needs to be cached in the data cache module, based on the latest address to be written corresponding to the data cache module, store the target data; The storage status of the target data in the data cache module is set to valid.
- the data processing apparatus may include a chip, an AI chip, and the like.
- the embodiment of the present disclosure also provides a computer device, which may include the data processing apparatus provided in the embodiment of the present disclosure.
- FIG. 8 it is a schematic structural diagram of a computer device provided by an embodiment of the present disclosure, including a processor 81 and a memory 82; the memory 82 stores machine-readable instructions executable by the processor 81, and the processor 81 is used to Execute the machine-readable instructions stored in the memory 82.
- the processor 81 performs the following steps: S101: Determine the read data request for the target memory, and the read data request includes the data to be read.
- Read address information corresponding to the fetched target data S102: Based on the read address information, determine the storage status of the target data in the preset data cache module; and S103: Instruct the storage status to indicate that valid target data is stored in the data cache module , to obtain the target data from the data cache module.
- memory 82 comprises memory 821 and external memory 822;
- Memory 821 here is also called internal memory, is used for temporarily storing the operation data in processor 81, and the data exchanged with external memory 822 such as hard disk, processor 81 communicates with memory 821 through memory 821.
- the external memory 822 performs data exchange.
- Embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the steps of the data processing method described in the foregoing method embodiments are executed.
- the storage medium may be a volatile or non-volatile computer-readable storage medium.
- the computer program product of the data processing method provided by the embodiments of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the data processing method described in the above method embodiments
- program code can be used to execute the steps of the data processing method described in the above method embodiments
- the computer program product can be specifically realized by means of hardware, software or a combination thereof.
- the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
- a software development kit Software Development Kit, SDK
- the disclosed devices and methods may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division.
- multiple units or components can be combined.
- some features can be ignored, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor.
- the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure.
- the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), target memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
Claims (16)
- 一种数据处理装置,其特征在于,包括:数据存储部件;数据缓存部件,所述数据缓存部件与所述数据存储部件通信连接;数据访问部件,所述数据访问部件包括至少一个读数据部件,其中,每个所述读数据部件,用于确定针对所述数据存储部件的读数据请求,所述读数据请求中包括待读取的目标数据对应的读地址信息;基于所述读地址信息,确定所述目标数据在预先设置的所述数据缓存部件中的存储状态;并响应于所述存储状态指示所述数据缓存部件中存储有有效的所述目标数据,从所述数据缓存部件中获取所述目标数据。
- 根据权利要求1所述的数据处理装置,其特征在于,所述读数据部件,还用于:响应于所述存储状态指示所述数据缓存部件中不存在有效的所述目标数据,基于所述读数据请求和所述读地址信息,从所述数据存储部件中获取所述目标数据。
- 根据权利要求1或2所述的数据处理装置,其特征在于,所述数据访问部件还包括至少一个写数据部件,所述至少一个写数据部件包括至少一个第一写数据部件,每个所述第一写数据部件与所述数据缓存部件以及所述数据存储部件通信连接,用于:确定针对所述数据存储部件的第一写数据请求,所述第一写数据请求中包括待写的第一数据和所述第一数据对应的第一写地址信息;在基于所述第一写地址信息,确定所述数据缓存部件中存储有有效的所述第一写地址信息对应的数据的情况下,将所述数据缓存部件中所述第一写地址信息对应的数据的存储状态更新为无效;并基于所述第一写数据请求,将所述第一数据存储在所述数据存储部件中的所述第一写地址信息对应的位置处。
- 根据权利要求3所述的数据处理装置,其特征在于,在所述第一写数据请求中还包括第一写缓存信息的情况下,所述第一写数据部件还用于:在基于所述第一写地址信息,确定所述数据缓存部件中存储有有效的所述第一写地址信息对应的数据、并且所述第一写缓存信息指示所述第一数据无需缓存在所述数据缓存部件中的情况下,将所述数据缓存部件中所述第一写地址信息对应的数据的存储状态更新为无效。
- 根据权利要求1或2所述的数据处理装置,其特征在于,所述数据访问部件还包括至少一个写数据部件,所述至少一个写数据部件包括至少一个第二写数据部件,每个所述第二写数据部件与所述数据缓存部件以及所述数据存储部件通信连接,用于:确定针对所述数据存储部件的第二写数据请求,所述第二写数据请求中包括待写的第二数据和所述第二数据对应的第二写地址信息;在基于所述第二写地址信息,确定所述数据缓存部件中存储有有效的所述第二写地址信息对应的数据的情况下,将所述数据缓存部件中所述第二写地址信息对应的数据更新为所述第二数据;基于所述第二写数据请求,将所述第二数据存储在所述数据存储部件中的所述第二写地址信息对应的位置处。
- 根据权利要求5所述的数据处理装置,其特征在于,所述第二写数据请求中还包括第二写缓存信息;所述写数据部件,用于在基于所述第二写地址信息,确定所述数据缓存部件中存储有有效的所述第二写地址信息对应的数据、并且所述第二写缓存信息指示所述第二数据需要缓存在所述数据缓存部件中的情况下,将所述第二写地址信息对应的数据更新为所 述第二数据。
- 根据权利要求1至6任一所述的数据处理装置,其特征在于,所述数据处理装置还包括优先级确定部件,所述优先级确定部件与所述数据缓存部件以及所述数据存储部件通信连接,用于:在所述数据访问部件确定出针对所述数据存储部件的多个数据访问请求,并且所述多个数据访问请求中的目标访问请求的数量大于预设数量的情况下,确定每个目标访问请求的访问优先级,其中,所述目标访问请求包括写数据请求和目标读数据请求,所述数据缓存部件中未存储有效的所述目标读数据请求对应的目标数据;所述数据访问部件,用于:基于每个所述目标访问请求的访问优先级,依次对所述数据存储部件进行访问。
- 根据权利要求7所述的数据处理装置,其特征在于,所述数据缓存部件包括多个缓存子部件,每个所述缓存子部件对应所述数据访问部件中的至少一个读数据部件和/或至少一个写数据部件。
- 根据权利要求7或8所述的数据处理装置,其特征在于,所述优先级确定部件,用于:将具有相同读地址信息的多个所述目标读数据请求设置为同一访问优先级。
- 根据权利要求2至9任一项所述的数据处理装置,其特征在于,所述读数据部件还用于:在从所述数据存储部件中获取所述目标数据之后,在所述读数据请求包括附加写缓存信息的情况下,基于所述数据缓存部件对应的最新待写地址存储所述目标数据在所述数据缓存部件中,其中,所述附加写缓存信息用于指示所述目标数据需要缓存在所述数据缓存部件中;将所述目标数据在所述数据缓存部件中的存储状态设置为有效。
- 一种数据处理方法,包括:确定针对目标存储器的读数据请求,所述读数据请求中包括待读取的目标数据对应的读地址信息;基于所述读地址信息,确定所述目标数据在预先设置的数据缓存模块中的存储状态;响应于所述存储状态指示所述数据缓存模块中存储有有效的所述目标数据,从所述数据缓存模块中获取所述目标数据。
- 根据权利要求11所述的方法,还包括:响应于所述存储状态指示所述数据缓存模块中不存在有效的所述目标数据,基于所述读数据请求和所述读地址信息,从所述目标存储器中获取所述目标数据。
- 根据权利要求11或12所述的方法,还包括:确定针对所述目标存储器的第一写数据请求,所述第一写数据请求中包括待写的第一数据和所述第一数据对应的第一写地址信息;在基于所述第一写地址信息,确定所述数据缓存模块中存储有有效的所述第一写地址信息对应的数据的情况下,将所述数据缓存模块中所述第一写地址信息对应的数据的存储状态更新为无效;基于所述第一写数据请求,将所述第一数据存储在所述目标存储器中的所述第一写地址信息对应的位置处。
- 根据权利要求11或12所述的方法,还包括:确定针对所述目标存储器的第二写数据请求,所述第二写数据请求中包括待写的第二数据和所述第二数据对应的第二写地址信息;在基于所述第二写地址信息,确定所述数据缓存模块中存储有有效的所述第二写地址信息对应的数据的情况下,将所述数据缓存模块中所述第二写地址信息对应的数据更 新为所述第二数据;基于所述第二写数据请求,将所述第二数据存储在所述目标存储器中的所述第二写地址信息对应的位置处。
- 一种计算机设备,其特征在于,包括:如权利要求1至10任意一项所述的数据处理装置。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被计算机设备运行时,所述计算机设备执行如权利要求11至14任意一项所述的数据处理方法的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110875105.1A CN113515474A (zh) | 2021-07-30 | 2021-07-30 | 数据处理装置、方法、计算机设备和存储介质 |
| CN202110875105.1 | 2021-07-30 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023005352A1 true WO2023005352A1 (zh) | 2023-02-02 |
Family
ID=78068940
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/092813 Ceased WO2023005352A1 (zh) | 2021-07-30 | 2022-05-13 | 数据处理的装置、方法、计算机设备和存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN113515474A (zh) |
| WO (1) | WO2023005352A1 (zh) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113515474A (zh) * | 2021-07-30 | 2021-10-19 | 上海阵量智能科技有限公司 | 数据处理装置、方法、计算机设备和存储介质 |
| CN115061972B (zh) * | 2022-07-05 | 2023-10-13 | 摩尔线程智能科技(北京)有限责任公司 | 处理器、数据读写方法、装置和存储介质 |
| CN115269199B (zh) * | 2022-08-11 | 2025-09-05 | 北京奕斯伟计算技术股份有限公司 | 数据处理方法、装置、电子设备及计算机可读存储介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110167223A1 (en) * | 2008-09-18 | 2011-07-07 | Panasonic Corporation | Buffer memory device, memory system, and data reading method |
| CN107506139A (zh) * | 2017-08-14 | 2017-12-22 | 上海交通大学 | 一种面向相变存储器的写请求优化装置 |
| CN108459826A (zh) * | 2018-02-01 | 2018-08-28 | 杭州宏杉科技股份有限公司 | 一种处理io请求的方法及装置 |
| CN109426623A (zh) * | 2017-08-29 | 2019-03-05 | 深圳市中兴微电子技术有限公司 | 一种读取数据的方法及装置 |
| CN110275841A (zh) * | 2019-06-20 | 2019-09-24 | 上海燧原智能科技有限公司 | 访问请求处理方法、装置、计算机设备和存储介质 |
| CN113515474A (zh) * | 2021-07-30 | 2021-10-19 | 上海阵量智能科技有限公司 | 数据处理装置、方法、计算机设备和存储介质 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9361236B2 (en) * | 2013-06-18 | 2016-06-07 | Arm Limited | Handling write requests for a data array |
| WO2019010703A1 (zh) * | 2017-07-14 | 2019-01-17 | 华为技术有限公司 | 读、部分写数据方法以及相关装置 |
| CN107623722A (zh) * | 2017-08-21 | 2018-01-23 | 云宏信息科技股份有限公司 | 一种远端数据缓存方法、电子设备及存储介质 |
| CN111209232B (zh) * | 2018-11-21 | 2022-04-22 | 昆仑芯(北京)科技有限公司 | 访问静态随机存取存储器的方法、装置、设备和存储介质 |
| CN112231241B (zh) * | 2019-07-15 | 2023-02-17 | 深圳市中兴微电子技术有限公司 | 一种数据读取方法和装置、计算机可读存储介质 |
-
2021
- 2021-07-30 CN CN202110875105.1A patent/CN113515474A/zh active Pending
-
2022
- 2022-05-13 WO PCT/CN2022/092813 patent/WO2023005352A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110167223A1 (en) * | 2008-09-18 | 2011-07-07 | Panasonic Corporation | Buffer memory device, memory system, and data reading method |
| CN107506139A (zh) * | 2017-08-14 | 2017-12-22 | 上海交通大学 | 一种面向相变存储器的写请求优化装置 |
| CN109426623A (zh) * | 2017-08-29 | 2019-03-05 | 深圳市中兴微电子技术有限公司 | 一种读取数据的方法及装置 |
| CN108459826A (zh) * | 2018-02-01 | 2018-08-28 | 杭州宏杉科技股份有限公司 | 一种处理io请求的方法及装置 |
| CN110275841A (zh) * | 2019-06-20 | 2019-09-24 | 上海燧原智能科技有限公司 | 访问请求处理方法、装置、计算机设备和存储介质 |
| CN113515474A (zh) * | 2021-07-30 | 2021-10-19 | 上海阵量智能科技有限公司 | 数据处理装置、方法、计算机设备和存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113515474A (zh) | 2021-10-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5917782B2 (ja) | プロセッサベースのシステムにおける異種メモリアクセス要求をサポートするための、異種メモリシステム、ならびに関連する方法およびコンピュータ可読媒体 | |
| JP5787629B2 (ja) | マシンビジョン用マルチプロセッサシステムオンチップ | |
| US12189545B2 (en) | System, apparatus and methods for handling consistent memory transactions according to a CXL protocol | |
| CN111046072A (zh) | 一种数据查询方法、系统、异构计算加速平台及存储介质 | |
| TW201539196A (zh) | 用於處理多個交易之資料處理系統及方法 | |
| TW201738763A (zh) | 使用nvme介面存取元件的同時核心模式和使用者模式的方法、非暫時性電腦可讀取媒體及主機電腦系統 | |
| CN107193761B (zh) | 队列优先级仲裁的方法与装置 | |
| CN113641596B (zh) | 缓存管理方法、缓存管理装置、处理器 | |
| JP2010134628A (ja) | メモリコントローラおよびデータ処理装置 | |
| WO2017027840A1 (en) | Register files for i/o packet compression | |
| JP2020087499A (ja) | スタティックランダムアクセスメモリにアクセスするための方法、装置、機器及び記憶媒体 | |
| CN103765380A (zh) | 用于事件的安全排队的方法和系统 | |
| JP2019133662A (ja) | キーバリューアクセスを含むマシンラーニングのためのシステム及び方法 | |
| WO2017181895A1 (zh) | 一种缓存一致性管理方法及节点控制器 | |
| CN114780463A (zh) | 中断控制方法、设备、分布式系统及存储介质 | |
| CN110187832B (zh) | 一种数据操作的方法、设备和系统 | |
| CN113515474A (zh) | 数据处理装置、方法、计算机设备和存储介质 | |
| CN107015923A (zh) | 用于管理探听操作的一致性互连和包括其的数据处理装置 | |
| JP2020530176A (ja) | 再構成可能なキャッシュアーキテクチャおよびキャッシュコヒーレンシの方法 | |
| CN115114042A (zh) | 存储数据访问方法、装置、电子设备和存储介质 | |
| CN113485791B (zh) | 配置方法和访问方法、装置、虚拟化系统和存储介质 | |
| JP6281442B2 (ja) | 割り当て制御プログラム、割り当て制御方法及び割り当て制御装置 | |
| US11940917B2 (en) | System and method for network interface controller based distributed cache | |
| JP7602712B2 (ja) | 調停方法、装置、デバイス、記憶媒体、プログラム製品及びチップ | |
| WO2016049807A1 (zh) | 多核处理器系统的缓存目录处理方法和目录控制器 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22847965 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22847965 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.06.2024) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22847965 Country of ref document: EP Kind code of ref document: A1 |