WO2023005352A1 - 数据处理的装置、方法、计算机设备和存储介质 - Google Patents

数据处理的装置、方法、计算机设备和存储介质 Download PDF

Info

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
Application number
PCT/CN2022/092813
Other languages
English (en)
French (fr)
Inventor
张启荣
王文强
徐宁仪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sensetime Intelligent Technology Co Ltd
Original Assignee
Shanghai Sensetime Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sensetime Intelligent Technology Co Ltd filed Critical Shanghai Sensetime Intelligent Technology Co Ltd
Publication of WO2023005352A1 publication Critical patent/WO2023005352A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/18Handling requests for interconnection or transfer for access to memory bus based on priority control
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
    • G06F13/30Handling 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
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy 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

数据处理的装置、方法、计算机设备和存储介质
交叉引用声明
本申请要求于2021年07月30日提交中国专利局的申请号为202110875105.1的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及集成电路技术领域,具体而言,涉及一种数据处理的装置、方法、计算机设备和计算机可读存储介质。
背景技术
随着人工智能(Artificial Intelligence,AI)技术的发展,AI芯片的应用越来越广泛。不断迭代的AI算法及应用场景,对AI芯片PPA(性能Performace,功耗Power,面积Area)的要求也越来越高。在端侧特别是便携设备中,在一定的性能下,对功耗的控制尤为重要。
在利用AI芯片进行数据处理的过程中,读数据模块需要按地址信息对随机存取存储器(Random Access Memory,RAM)进行访问,以获取存储在RAM中该地址信息对应的存储空间的数据。随着读数据模块的增加以及访问次数的增加,将产生大量的访存功耗,造成了资源的浪费。
发明内容
本公开实施例至少提供一种数据处理装置、方法、计算机设备和计算机可读存储介质,以降低访存功耗。
第一方面,本公开实施例提供了一种数据处理装置,包括:读数据部件、数据缓存部件和数据存储部件;所述读数据部件与所述数据缓存部件通信连接,所述数据缓存部件与所述数据存储部件通信连接;所述读数据部件,用于确定针对所述数据存储部件的读数据请求,所述读数据请求中包括待读取的目标数据对应的读地址信息;以及,基于所述读地址信息,确定所述目标数据在预先设置的数据缓存部件中的存储状态,并响应于所述存储状态指示所述数据缓存部件中存储有有效的目标数据,从所述数据缓存部件中获取所述目标数据。
基于读地址信息对应的目标数据在预先设置的数据缓存部件中的存储状态,能够确定出数据缓存部件中是否存储有有效的目标数据。由于访问数据缓存部件的功耗低于访问数据存储部件(例如,RAM)的功耗,所以在确定数据缓存部件中存储有有效的目标数据的情况下,可以直接从数据缓存部件获取目标数据,而不需要从数据存储部件中获取目标数据,因此,降低了获取目标数据的访存功耗。另外,针对需要连续多次或短时间内重复对同一RAM地址信息对应的存储空间进行访问的情况,利用数据缓存部件存储目标数据,每次都可以直接在数据缓存部件中获取目标数据,不需要每次都从数据存储部件中获取目标数据,进而,大大降低了访存功耗。
在一种可能的实施方式中,所述读数据部件,还用于响应于所述存储状态指示所述数据缓存部件中不存在有效的目标数据,基于所述读数据请求和所述读地址信息,从所述数据存储部件中获取所述目标数据。
在一种可能的实施方式中,所述数据处理装置还包括写数据部件,所述写数据部件 与所述数据缓存部件以及所述数据存储部件通信连接;所述写数据部件,用于确定针对所述数据存储部件的第一写数据请求,所述第一写数据请求中包括待写的第一数据和所述第一数据对应的第一写地址信息;以及,在基于所述第一写地址信息,确定所述数据缓存部件中存储有有效的所述第一写地址信息对应的数据的情况下,将所述数据缓存部件中所述第一写地址信息对应的数据的存储状态更新为无效;并基于所述第一写数据请求,将所述第一数据存储在所述数据存储部件中的第一写地址信息对应的位置处。
在一种可能的实施方式中,所述第一写数据请求中还包括第一写缓存信息;所述写数据部件,用于:在基于所述第一写地址信息,确定所述数据缓存部件中存储有有效的所述第一写地址信息对应的数据、并且所述第一写缓存信息指示所述第一数据无需缓存在所述数据缓存部件中的情况下,将所述数据缓存部件中所述第一写地址信息对应的数据的存储状态更新为无效;在基于所述第一写地址信息,确定所述数据缓存部件中存储有有效的所述第一写地址信息对应的数据、并且所述第一写缓存信息指示所述第一数据需要缓存在所述数据缓存部件中的情况下,将所述数据缓存部件中所述第一写地址信息对应的数据更新为所述第一数据。
在一种可能的实施方式中,所述数据处理装置还包括写数据部件,所述写数据部件与所述数据缓存部件以及所述数据存储部件通信连接;所述写数据部件,用于确定针对数据存储部件的第二写数据请求,所述第二写数据请求中包括待写的第二数据和所述第二数据对应的第二写地址信息;在基于所述第二写地址信息,确定所述数据缓存部件中存储有有效的所述第二写地址信息对应的数据的情况下,将所述第二写地址信息对应的数据更新为所述第二数据;基于所述第二写数据请求,将所述第二数据存储在所述数据存储部件中的第二写地址信息对应的位置处。
在一种可能的实施方式中,所述数据处理装置还包括优先级确定部件,所述优先级确定部件与所述数据缓存部件以及所述数据存储部件通信连接;数据访问部件,用于在确定出针对数据存储部件的多个数据访问请求的情况下,针对所述数据访问请求中的每个读数据请求,基于该读数据请求对应的读地址信息,确定该读数据请求对应的目标数据在对应的数据缓存部件中的存储状态;所述数据访问部件包括读数据部件和/或写数据部件;基于所述存储状态,从所述读数据请求中筛选符合预设条件的目标读数据请求;所述预设条件包括与读数据请求对应的数据缓存部件中不存在有效的目标数据;在目标访问请求的数量大于预设数量的情况下,利用预先设置的优先级确定部件确定每个目标访问请求的访问优先级;所述目标访问请求的数量根据所述目标读数据请求的数量和/或所述多个数据访问请求中的写数据请求的数量确定;基于每个目标访问请求的访问优先级,依次对所述数据存储部件进行访问。
在一种可能的实施方式中,所述数据缓存部件包括与每个数据访问部件分别对应的多个缓存子部件。
在一种可能的实施方式中,所述数据访问部件,用于利用预先设置的优先级确定部件,将具有相同读地址信息的目标读数据请求设置为同一访问优先级。
在一种可能的实施方式中,所述读数据请求包括附加写缓存信息;所述读数据部件,还用于在从所述数据存储部件中获取所述目标数据之后,在确定所述附加写缓存信息指示所述目标数据需要缓存在所述数据缓存部件中的情况下,基于所述数据缓存部件对应的最新待写地址,存储所述目标数据;将所述目标数据在所述数据缓存部件中的存储状态设置为有效。
第二方面,本公开实施例提供了一种数据处理方法,包括:确定针对目标存储器的读数据请求,所述读数据请求中包括待读取的目标数据对应的读地址信息;基于所述读地址信息,确定所述目标数据在预先设置的数据缓存模块中的存储状态;响应于所述存 储状态指示所述数据缓存模块中存储有有效的目标数据,从所述数据缓存模块中获取所述目标数据。
在一种可能的实施方式中,所述方法还包括:响应于所述存储状态指示所述数据缓存模块中不存在有效的目标数据,基于所述读数据请求和所述读地址信息,从所述目标存储器中获取所述目标数据。
在一种可能的实施方式中,所述方法还包括:确定针对目标存储器的第一写数据请求,所述第一写数据请求中包括待写的第一数据和所述第一数据对应的第一写地址信息;在基于所述第一写地址信息,确定所述数据缓存模块中存储有有效的所述第一写地址信息对应的数据的情况下,将所述数据缓存模块中所述第一写地址信息对应的数据的存储状态更新为无效;基于所述第一写数据请求,将所述第一数据存储在所述目标存储器中的第一写地址信息对应的位置处。
在一种可能的实施方式中,所述第一写数据请求中还包括第一写缓存信息;所述方法还包括:在基于所述第一写地址信息,确定所述数据缓存模块中存储有有效的所述第一写地址信息对应的数据、并且所述第一写缓存信息指示所述第一数据无需缓存在所述数据缓存模块中的情况下,将所述数据缓存模块中所述第一写地址信息对应的数据的存储状态更新为无效;在基于所述第一写地址信息,确定所述数据缓存模块中存储有有效的所述第一写地址信息对应的数据、并且所述第一写缓存信息指示所述第一数据需要缓存在所述数据缓存模块中的情况下,将所述数据缓存模块中所述第一写地址信息对应的数据更新为所述第一数据。
在一种可能的实施方式中,所述方法还包括:确定针对目标存储器的第二写数据请求,所述第二写数据请求中包括待写的第二数据和所述第二数据对应的第二写地址信息;在基于所述第二写地址信息,确定所述数据缓存模块中存储有有效的所述第二写地址信息对应的数据的情况下,将所述第二写地址信息对应的数据更新为所述第二数据;基于所述第二写数据请求,将所述第二数据存储在所述目标存储器中的第二写地址信息对应的位置处。
在一种可能的实施方式中,所述方法还包括:在确定出针对目标存储器的多个数据访问请求的情况下,针对所述数据访问请求中的每个读数据请求,基于该读数据请求对应的读地址信息,确定该读数据请求对应的目标数据在对应的数据缓存模块中的存储状态;基于所述存储状态,从所述读数据请求中筛选符合预设条件的目标读数据请求;所述预设条件包括与读数据请求对应的数据缓存模块中不存在有效的目标数据;在目标访问请求的数量大于预设数量的情况下,利用预先设置的优先级确定模块确定每个目标访问请求的访问优先级;所述目标访问请求的数量根据所述目标读数据请求的数量和/或所述多个数据访问请求中的写数据请求的数量确定;基于每个目标访问请求的访问优先级,依次对所述目标存储器进行访问。
在一种可能的实施方式中,所述数据缓存模块包括与每个数据访问模块分别对应的多个缓存子模块;所述数据访问模块包括读数据模块和写数据模块。
在一种可能的实施方式中,所述利用预先设置的优先级确定模块确定每个目标访问请求的访问优先级,包括:利用预先设置的优先级确定模块,将具有相同读地址信息的目标读数据请求设置为同一访问优先级。
在一种可能的实施方式中,所述读数据请求包括附加写缓存信息;在从所述目标存储器中获取所述目标数据之后,还包括:在确定所述附加写缓存信息指示所述目标数据需要缓存在所述数据缓存模块中的情况下,基于所述数据缓存模块对应的最新待写地址,存储所述目标数据;将所述目标数据在所述数据缓存模块中的存储状态设置为有效。
第三方面,本公开可选实现方式还提供一种计算机设备,包括上述第一方面,或第一方面中任一种可能的实施方式中的装置。
第四方面,本公开可选实现方式还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被运行时执行上述第二方面,或第二方面中任一种可能的实施方式中的步骤。
关于上述数据处理方法、装置、计算机设备、及计算机可读存储介质的效果描述参见第一方面中的数据处理装置的说明,这里不再赘述。
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍。这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1示出了本公开实施例所提供的一种数据处理方法的流程图;
图2示出了本公开实施例所提供的一种读数据模块访问数据缓存模块的示意图;
图3示出了本公开实施例所提供的一种数据写入的方法的流程图;
图4示出了本公开实施例所提供的一种对确定的多个数据访问请求进行处理的方法的流程图;
图5示出了本公开实施例所提供的一种多个读数据模块相互独立地访问数据缓存模块中的地址信息对应的目标数据的示意图;
图6示出了本公开实施例所提供的一种多个读数据模块相互交叉地访问数据缓存模块中的地址信息对应的目标数据的示意图;
图7示出了本公开实施例所提供的一种数据处理装置的示意图;
图8示出了本公开实施例所提供的一种计算机设备结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中附图,对本公开实施例中的技术方案进行清楚、完整地描述。所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对本公开的实施例的详细描述无意限制要求保护的本公开的范围。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
另外,本公开实施例中的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。
在本文中提及的“多个或者若干个”是指两个或两个以上。“和/或”表示关联对象 可以存在三种关系,例如,A和/或B可以表示单独存在A、同时存在A和B、单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
经研究发现,随着人工智能(Artificial Intelligence,AI)技术的发展,AI芯片的应用越来越广泛。不断迭代的AI算法及应用场景,对AI芯片PPA(性能Performance,功耗Power,面积Area)的要求也越来越高。在端侧特别是便携设备中,在一定的性能下,对功耗的控制尤为重要。在利用AI芯片进行数据处理的过程中,读数据模块需要按地址信息对RAM进行访问,以获取存储在RAM中该地址信息对应的存储空间的数据。随着读数据模块的增加以及访问次数的增加,将产生大量的访存功耗。
基于上述研究,本公开提供了一种数据处理装置、方法、计算机设备和计算机可读存储介质,基于读地址信息对应的待读取的目标数据在预先设置的数据缓存模块中的存储状态,能够确定出数据缓存模块中是否存储有有效的目标数据。由于访问数据缓存模块的功耗低于访问目标存储器(例如,RAM)的功耗,所以在确定数据缓存模块中存储有有效的目标数据的情况下,可以直接从数据缓存模块获取目标数据,不需要从目标存储器中获取目标数据,从而降低了获取目标数据的访存功耗。另外,针对需要连续多次或短时间内重复对同一RAM地址信息对应的存储空间进行访问的情况,利用数据缓存模块存储目标数据,每次都可以直接在数据缓存模块中获取目标数据,不需要每次都从目标存储器中获取目标数据,进而,大大降低了访存功耗。
以上均是发明人在经过实践并仔细研究后得出的结果,因此,上述问题的发现过程以及下文中本公开针对上述问题所提出的解决方案,都应该是发明人在本公开过程中对本公开做出的贡献。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
为便于对本实施例进行理解,首先对本公开实施例所公开的一种数据处理方法进行详细介绍。本公开实施例所提供的数据处理方法的执行主体一般为具有一定计算能力的计算机设备。在一些可能的实现方式中,该数据处理方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。
下面以执行主体为计算机设备为例,对本公开实施例提供的数据处理方法加以说明。
如图1所示,为本公开实施例提供的一种数据处理方法的流程图,该方法可以包括以下步骤S101至S103。
S101:确定针对目标存储器的读数据请求,该读数据请求中包括待读取的目标数据对应的读地址信息。
这里,目标存储器可以为芯片(后面均以AI芯片为例,其他类型芯片也可以适用本公开提供的方案,这里不再赘述)中的RAM,RAM中的不同地址信息处可以用于存储不同的数据,也可以用于写入新的数据。
读数据请求可以为获取目标存储器中的数据的请求,读地址信息可以表示目标存储器中的某个地址或地址范围,目标数据可以为存储在目标存储器中的该读地址信息对应的位置处的数据。
具体实施时,针对目标存储器的读数据请求,可以是任一存在访问需求的读数据模块基于所需要获取的目标数据对应的读地址信息确定的。或者,用户端在需要获取读地址信息对应的目标数据的情况下,基于读地址信息生成读数据请求,并将该读数据请求发送给AI芯片中的读数据模块,以使得读数据模块可以根据接收到的该读数据请求确定针对该读地址信息的读数据请求。关于读数据请求是如何确定的,这里不进行限定。
S102:基于读地址信息,确定目标数据在预先设置的数据缓存模块中的存储状态。
这里,预先设置的数据缓存模块可以是一级缓存,例如,可以是一个寄存器Register,或者,可以是一个高速缓冲存储器Cache,具体的,可以用L0 Cache表示。数据缓存模块用于缓存地址信息及其对应的数据。具体实施时,数据缓存模块可以设置有限的存储空间,用于存储有限个地址信息及地址信息对应的数据。数据缓存模块的存储空间的设置可以根据应用的场景进行设定。并且,数据缓存模块中存储的数据可以根据不同的读数据模块的访存需求,以及当前发起读数据请求的读数据模块要获取的目标数据进行更新。
另外,在利用AI芯片进行数据处理的过程中,可能存在频繁访问目标存储器且访问的地址信息包括多个的情况。若每次访问的地址信息均不相同,则由于数据缓存模块的存储空间有限且存储的数据可以更新,数据缓存模块中缓存的数据及对应的地址信息将无法每次都与读数据请求对应的目标数据相匹配。因此,本公开实施实例所提供的方法可以适用于特定时间内需要对同一RAM地址信息对应的存储空间进行重复访问的情况,这样,可以保证存储在数据缓存模块中的有效的数据能够与读数据请求对应的目标数据相匹配,从而,降低了读数据模块访存目标数据时的访存功耗。
数据的存储状态用于表征在预先设置的数据缓存模块中是否存储有有效的读地址信息及其对应的数据。具体实施时,数据的存储状态可以包括:表示数据缓存模块中存在有效的读地址信息及其对应的数据的valid状态,表示数据缓存模块中存在读地址信息及其对应的数据但读地址信息对应的数据却无效的invalid状态,以及,表示数据缓存模块中不存在读地址信息及其对应的数据的状态。
读数据模块可以包括多个,每个读数据模块可以发起针对RAM中的不同地址信息的读数据请求。
一个读数据模块可以对应设置一个数据缓存模块,不同的读数据模块对应设置有不同的数据缓存模块。如图2所示,为本公开实施例所提供的一种读数据模块访问数据缓存模块的示意图。其中,
读数据模块210(可表示为Rd_mdl)用于发起读数据请求;
cupen为表征附加写缓存信息的标识,用于指示是否需要将从目标存储器220中读取的目标数据写入数据缓存模块210中;
rden表示读数据模块210的读使能,
raddr表示读数据请求中包含的地址信息,本文中也可称为读地址信息;
rdata表示读取到的目标数据,可以为从数据缓存模块230中读取的数据,也可以为从目标存储器220中读取的数据;
数据缓存模块230用于缓存数据,可表示为L0 Cache,也可以表示为Register,即根据预先设置的数据缓存模块的类型不同,可以用不同的符号表示,但L0 Cache/Register均可用于表示数据缓存模块230;
ram_rden表示对目标存储器的读使能,
ram_raddr表示读数据请求中包含的对应于目标存储器220中的读地址信息,
ram_rdata表示从目标存储器220中获取的目标数据,
目标存储器220,可具体为RAM,
数据处理装置中的写数据模块240可表示为Wr_mdl,
wren表示写数据模块240的写使能,
waddr表示写数据请求中包含的地址信息,本文中也可称为写地址信息;
wdata表示待写的数据。
具体实施时,当任一存在访问需求的读数据模块210确定读数据请求之后,先经过使能rden使该读数据模块210具有读取数据的能力,然后可以确定读数据请求中包含的读地址信息raddr对应的目标数据在数据缓存模块230中的存储状态。在存储状态指示数据缓存模块230中存储有有效的目标数据rdata的情况下,直接从数据缓存模块230中获取目标数据rdata。
在存储状态指示数据缓存模块230中未存储有有效的目标数据的情况下,可以经过使能ram_rden使该读数据模块210具有从目标存储器220中读取数据的能力,然后可以将读数据请求中包含的读地址信息raddr作为目标存储器220中的读地址信息ram_raddr,从目标存储器220中读取读地址信息ram_raddr对应的位置处的目标数据ram_rdata,从而,读数据模块210可以从目标存储器220中获取目标数据ram_rdata。
针对写数据模块240,当任一存在写数据需求的写数据模块240确定写数据请求之后,可以经过使能wren使该写数据模块240具有将数据wdata写入目标存储器220的能力,之后,可以将数据wdata写入目标存储器220中该写数据请求包含的地址信息waddr对应的存储空间处。并且,在经过使能wren之后,写数据模块240也具有将数据wdata写入数据缓存模块230的能力,例如可以直接将数据wdata和对应的地址信息waddr写入数据缓存模块230中。
针对S102,数据缓存模块中存储的地址信息、地址信息对应的数据、以及地址信息对应的数据的存储状态之间存在映射关系。读数据模块在获取读地址信息之后,还可以确定数据缓存模块中存储的各个地址信息,进而可以确定数据存储模块中是否存在读地址信息;如果是,则可以根据映射关系,确定读地址信息对应的数据的存储状态;如果否,则可以直接确定存储状态为表示数据缓存模块中不存在读地址信息对应的目标数据。
进一步地,也可以多个读数据模块对应设置同一个数据缓存模块。具体实施时,可以根据读数据模块要访问的存储空间的地址信息进行设置,也可以基于用户的需求进行设置,这里不进行限定。例如,在多个读数据模块中的每个读数据模块可以相互独立地访问RAM中的数据的情况下,可以为每个读数据模块都设置一个对应的数据缓存模块;在多个读数据模块中的每个读数据模块存在相互交叉地访问RAM中的数据的情况下,可以为多个读数据模块对应设置同一个数据缓存模块。其中,相互交叉访问是指多个读数据模块可以间隔特定的时间和/或一定的访问次数对RAM中对应同一个地址信息的存储空间进行访问,以获取该地址信息对应的数据。
本步骤中,读数据模块在确定读数据请求之后,可以基于读数据请求中包含的读地址信息,确定与该读数据请求对应的数据缓存模块中该读地址信息对应的目标数据的存储状态。
S103:响应于存储状态指示数据缓存模块中存储有有效的目标数据,从数据缓存模块中获取目标数据。
这里,在基于存储状态确定数据缓存模块中存储有有效的目标数据的情况下,也即,确定数据缓存模块中的目标数据的存储状态为valid的情况下,读数据模块可以直接从数据缓存模块中获取读地址信息对应的目标数据。
之后,读数据模块可以基于获取的目标数据进行数据处理,也可以将获取的目标数据发送给用户端,以使用户端获取到目标数据并基于该目标数据进行数据处理。
这样,基于待读取的读地址信息对应的目标数据在预先设置的数据缓存模块中的存储状态,能够确定出数据缓存模块中是否存储有有效的目标数据。由于访问数据缓存模块的功耗低于访问目标存储器(例如,RAM)的功耗,所以在确定数据缓存模块中存储有有效的目标数据的情况下,可以直接从数据缓存模块获取目标数据,不需要从目标存储器中获取目标数据,从而,降低了获取目标数据的访存功耗。另外,针对需要连续多次(例如,短时间内重复地)对同一RAM地址信息对应的存储空间进行访问的情况,利用数据缓存模块存储该RAM地址信息对应的数据,使得每次都可以直接在数据缓存模块中获取该RAM地址信息对应的数据,不需要每次都从目标存储器中获取该RAM地址信息对应的数据,进而,大大降低了访存功耗,有效避免了资源的浪费。
在另一种实施例中,在基于存储状态确定数据缓存模块中不存在有效的目标数据的情况下,例如,确定数据缓存模块中不存在读地址信息及其对应的目标数据,或者,确定数据缓存模块中读地址信息对应的目标数据的存储状态为invalid状态的情况下,可以直接基于读数据请求及其包含的读地址信息,对目标存储器进行访问,从目标存储器中直接读取出读地址信息对应的目标数据,从而获取到读数据请求对应的数据。
这样,即使在确定数据缓存模块中不存在有效的目标数据的情况下,也可以通过直接访问目标存储器的方式,获取存储在目标存储器中的目标数据,保证了每个读数据请求都可以得到有效的响应,从而获取到需要的目标数据。
在一种实施例中,针对目标存储器的操作请求还可以包括由图2中的写数据模块240确定的写数据请求,写数据模块240可以基于写数据请求,实现对目标存储器的数据写入。具体实施时,可以按照如图3所示的步骤,对目标存储器进行数据写入。如图3所示,为本公开实施例所提供的一种数据写入的方法的流程图,该方法可以包括以下步骤S301至S303。
S301:确定针对目标存储器的第一写数据请求。
其中,第一写数据请求中包括待写的第一数据和第一数据对应的第一写地址信息,其中,第一写地址信息表示目标存储器中的数据存储地址,具体的,可以表示RAM中的数据存储地址。
具体实施时,当存在向目标存储器中写入数据的需求时,写数据模块240可以基于需要写入的第一数据以及表示第一数据需要写入的存储空间的第一写地址信息,确定针对目标存储器的第一写数据请求。
S302:在基于第一写地址信息,确定数据缓存模块中存储有有效的第一写地址信息对应的数据的情况下,将数据缓存模块中第一写地址信息对应的数据的存储状态更新为无效。
这里,在确定第一写数据请求之后,写数据模块可以基于第一写地址信息,确定数据缓存模块中是否缓存有第一写地址信息及其对应的数据。如果是,则可以将数据缓存模块中的第一写地址信息对应的数据的存储状态更新为无效。具体实施时,可以将上述数据的存储状态更新为invalid状态。由于需要在目标存储器的第一写地址信息处写入新的数据,因此,目标存储器的第一写地址信息对应的位置处的数据将改变,并使得存储在数据缓存模块中的第一写地址信息对应的数据已经不准确。这样,通过将数据缓存模块中该数据的存储状态更新为无效,可以防止在获取到新的包括第一写地址信息的读数据请求时,将数据缓存模块中的未更新的数据进行反馈,从而有效提高了反馈的数据的准确性。
S303:基于第一写数据请求,将第一数据存储在目标存储器中的第一写地址信息对应的位置处。
本步骤中,在确定第一写数据请求之后,可以直接基于第一写数据请求包含的第一写地址信息,对目标存储器进行访问,将第一数据写在目标存储器的第一写地址信息对应的位置处。
其中,如果目标存储器中第一写地址信息对应的位置处存在先前存储的数据,可以利用第一数据对先前存储的数据进行更新,例如将第一写地址信息对应的位置处的数据更新为第一数据。或者,如果目标存储器中第一写地址信息对应的位置处不存在数据,则可以直接将第一数据存储在第一写地址信息对应的位置处。
在具体实施时,S303和S302可以同步执行,也可以异步执行。同步执行和异步执行均可以用于将数据缓存模块中的第一写地址信息对应的数据的存储状态更新为无效但不更新数据缓存模块中的该数据。例如,异步执行可以用于先更新数据缓存模块中的第一写地址信息对应的数据的存储状态,再将第一数据写入目标存储器中第一写地址信息对应的位置处。
在一种实施例中,第一写数据请求中还可包括第一写缓存信息。其中,第一写缓存信息用于指示是否需要利用第一写数据请求对应的第一数据更新存储在数据缓存模块中的第一写地址信息对应的数据。
针对S302,可以在基于第一写地址信息,确定数据缓存模块中存储有有效的第一写地址信息对应的数据的情况下,基于第一写缓存信息,确定是否需要利用第一数据对数据缓存模块中的第一写地址信息对应的数据进行更新,也即确定是否需要将第一数据缓存在数据缓存模块中;如果否,则可以将数据缓存模块中第一写地址信息对应的数据的存储状态更新为无效;如果是,则可以直接将第一数据写在数据缓存模块中作为第一写地址信息对应的数据,且不需要更新数据缓存模块中第一写地址信息对应的数据的存储状态,也即将数据缓存模块中第一写地址信息对应的数据的存储状态保持为有效。
在另一种实施例中,在针对目标存储器的请求包括缺省要同步更新数据缓存模块的写数据请求的情况下,还可以按照以下步骤实现对目标存储器的数据写入。
步骤一、确定针对目标存储器的第二写数据请求。
其中,第二写数据请求中包括待写的第二数据和第二数据对应的第二写地址信息。
步骤二、在基于第二写地址信息,确定数据缓存模块中存储有有效的第二写地址信息对应的数据的情况下,将数据缓存模块中第二写地址信息对应的数据更新为第二数据。
本步骤中,在基于第二写地址信息,确定数据缓存模块中存储有有效的第二写地址信息对应的数据的情况下,可以将数据缓存模块中该第二写地址信息对应的数据更新为第二数据。这样,在获取到新的包括第二写地址信息的读数据请求时,可以直接从数据缓存模块中获取到已经更新的第二数据,而不需要访问目标存储器,从而,降低了访存功耗。
此外,在基于第二写地址信息,确定数据缓存模块中未存储第二写地址信息对应的数据的情况下,尽管第二写数据请求对应的缺省操作需同步更新对应的数据缓存模块,也没有必要将该第二写地址信息对应的数据写入数据缓存模块中。类似地,在基于第二写地址信息,确定数据缓存模块中存储的第二写地址信息对应的数据的存储状态为无效的情况下,尽管第二写数据请求对应的缺省操作需同步更新对应的数据缓存模块,也没有必要将该第二写地址信息对应的数据写入数据缓存模块中。
步骤三、基于第二写数据请求,将第二数据存储在目标存储器中的第二写地址信息对应的位置处。
关于步骤三的具体实施步骤,可以参照S303,这里不再赘述。
第一写缓存信息是用于指示是否需要将写数据请求中的数据缓存在数据缓存模块中的信息。
在一种实施例中,本公开实施例所提供的数据处理方法还包括对同步获取的多个数据访问请求进行处理的步骤,这里,数据访问请求可以为数据访问模块(包括至少一个读数据模块和至少一个写数据模块)发起的,并且包括读数据请求和写数据请求。其中,读数据请求为读数据模块发起的,写数据请求为写数据模块发起的。如图4所示,为本公开实施例所提供的一种对多个数据访问请求进行处理的方法的流程图,该方法可以包括以下步骤S401至S404。
S401:在确定出针对目标存储器的多个数据访问请求的情况下,针对数据访问请求中的每个读数据请求,基于该读数据请求对应的读地址信息,确定该读数据请求对应的目标数据在对应的数据缓存模块中的存储状态。
这里,在利用AI芯片进行数据处理的过程中,可能存在多个数据访问模块(包括读数据模块和写数据模块)同时确定出并发起访问目标存储器的数据访问请求的情况,而目标存储器在同一时刻只能满足对一个地址信息对应的数据进行读取或写入的需求。
数据访问请求可以包括读数据请求和写数据请求。其中,针对写数据请求而言,其目的是将待写的数据写入目标存储器,因此,只需要确定写数据请求的数量以用于后续的仲裁即可,不需要确定写数据请求对应的写地址信息及其对应的数据在数据缓存模块中的存储状态。而针对读数据请求而言,在数据缓存模块中存储有有效的相应数据的情况下,可直接从数据缓存模块中获取数据,不需要再访问目标存储器。因此,在确定出针对目标存储器的多个读数据请求的情况下,需要先对其进行筛选,选取需要访问目标存储器的目标读数据请求。
具体实施时,针对每个读数据请求,基于该读数据请求中的读地址信息,确定该读数据请求对应的目标数据在对应的数据缓存模块中的存储状态。
这里,如果获取到的多个数据访问请求中的每个读数据请求对应的读数据模块可以相互独立地访问目标存储器的不同地址区间中的数据,则数据缓存模块可以包括多个缓存子模块。其中,每个缓存子模块对应于一个读数据模块,缓存子模块的具体设置可如图5所示。如图5所示,为本公开实施例所提供的一种多个读数据模块510-0~510-n相互独立访问数据缓存模块530-0~530-n中的地址信息对应的目标数据的示意图。在图5中,不同的读数据模块510-0~510-n可表示为Rd_mdl0~Rd_mdln,并可统称为读数据模块510,图5仅示出了读数据模块510-0、读数据模块510-1和读数据模块510-n,其余的读数据模块未示出。预先设置的与读数据模块510-0对应的缓存子模块530-0,可以用于缓存读数据模块510-0确定的读数据请求中的读地址信息对应的数据;预先设置的与读数据模块510-1对应的缓存子模块530-1,可以用于缓存读数据模块510-1确定的读数据请求中的读地址信息对应的数据;预先设置的与读数据模块510-n对应的缓存子模块530-n,可以用于缓存读数据模块510-n确定的读数据请求中的读地址信息对应的数据;与其他读数据模块510-i对应的缓存子模块530-i未示出,i为大于1小于n的整数。缓存子模块530-0~530-n可统称为缓存子模块530。并且,图5中的写数据模块540可以对应于每个缓存子模块530,每个缓存子模块530对应的wren/addr表示写数据模块540写使能以及对该缓存子模块530要写入的数据所对应的地址信息addr。
在写数据模块包括多个的情况下,每个写数据模块也可以分别对应于一个缓存子模块。例如,一个读数据模块、一个写数据模块和一个缓存子模块可构成一个模块组,该模块组中的读数据模块和写数据模块均对应于该模块组中的缓存子模块,负责目标存 储器中的特定范围的地址信息对应的数据的读写。
在另一种实施例中,如果确定出的多个数据访问请求中的每个读数据请求对应的读数据模块相互交叉访问目标存储器的地址信息,则可以只设置一个数据缓存模块与多个读数据模块对应。具体实施时,数据缓存模块的设置可以参考图6。如图6所示,为本公开实施例所提供的一种多个读数据模块510-0~510-n相互交叉访问数据缓存模块630中的地址信息对应的目标数据的示意图。其中,一个数据缓存模块630(可表示为L0)与多个读数据模块510-0~510-n(可表示为Rd_mdl0~Rd_mdln)以及写数据模块540通信连接。
结合图5和图6所示,可以基于多个读数据模块510-0~510-n访问目标存储器520的方式(相互独立访问或相互交叉访问),从每个读数据请求对应的数据缓存模块630或缓存子模块530-0~530-n中确定对应的目标数据的存储状态。
S402:基于存储状态,从读数据请求中筛选符合预设条件的目标读数据请求。
其中,预设条件包括与读数据请求对应的数据缓存模块中不存在有效的该读数据请求对应的目标数据。这里,针对每个读数据请求,可以基于该读数据请求对应的目标数据在对应的数据缓存模块(或数据缓存子模块中)的存储状态,确定在数据缓存模块(或数据缓存子模块中)是否存储有效的目标数据;如果是,则可以将数据缓存模块中存储的有效的目标数据反馈给该读数据请求对应的读数据模块,也即由数据缓存模块响应该读数据请求,且下文可称为“该读数据请求命中(hit)数据缓存模块”;如果否,则将该读数据请求作为目标读数据请求发送给目标存储器进行处理,也即由目标存储器来响应该读数据请求,且下文可称为“该读数据请求未命中(miss)数据缓存模块”。这里,可以根据确定的存储状态对获取的多个读数据请求进行筛选,筛选出确定出符合预设条件的目标读数据请求。
也即,从多个读数据请求中筛选出对应的数据缓存模块中(或缓存子模块中)不存在有效的目标数据的目标读数据请求。
S403:在目标访问请求的数量大于预设数量的情况下,利用预先设置的优先级确定模块确定每个目标访问请求的访问优先级。
其中,目标访问请求包括所述目标读数据请求和所述多个数据访问请求中的写数据请求;目标访问请求的数量根据所述目标读数据请求的数量和所述多个数据访问请求中的写数据请求的数量确定。
这里,预先设置的优先级确定模块用于确定每个目标访问请求的访问优先级。具体实施时,优先级确定模块可以是仲裁器(Arbiter)。
在筛选出目标读数据请求之后,可以先确定目标读数据请求的数量,并确定多个数据访问请求中的写数据请求的数量,将目标读数据请求的数量和写数据请求的数量之和作为目标访问请求的数量。然后,可确定该数量是否大于预设数量。其中,预设数量可以是1。由上述实施例的介绍可知,目标存储器在同一时刻只能满足对一个地址信息对应的数据进行读取或写入的需求。因此,如果针对目标存储器的目标访问请求的数量大于1,则无法实现同步对两个目标访问请求进行处理。因此,需要对多个目标访问请求进行分开处理,包括确定每个目标访问请求的访问优先级。可以利用预设数量确定是否需要确定目标访问请求的访问优先级。
这里,如果多个数据访问请求中不存在读数据请求,则可以将目标读数据请求的数量默认设置为0。
另外,在确定目标读数据请求的数量的过程中,还可以基于每个目标读数据请求 中的读地址信息,确定存在相同的读地址信息的目标读数据请求。然后,可以基于具有相同的读地址信息的目标读数据请求的数量和读地址信息不同的目标访问请求的数量,确定最终的目标读数据请求的数量。具体实施时,无论具有相同的读地址信息的目标读数据请求的数量为多少,在确定目标读数据请求的数量的过程中,将该数量作为1进行计算。这是因为,具有相同的读地址信息的多个目标读数据请求所需要获取的目标数据是相同的,在响应于所述多个目标读数据请求中的一个目标读数据请求获取到存储在目标存储器中的对应的目标数据之后,可以将该目标数据发送给所述多个目标读数据请求分别对应的读数据模块,从而,上述多个读数据模块可以同步获取到所需要的目标数据。因此,在确定目标访问请求的数量的过程中,可以将具有相同的读地址信息的目标读数据请求的数量作为1进行计算。
进一步的,在确定目标访问请求的数量大于预设数量的情况下,可以利用预先设置的优先级确定模块(即仲裁器)进行仲裁,以确定每个目标访问请求的访问优先级,进而,可以基于确定访问优先级对应的访问顺序,依次对每个目标访问请求进行响应。
关于确定每个目标访问请求的访问优先级,可以包括但不限于以下方式:一、可以利用仲裁器根据每个目标访问请求对应的数据访问模块的功能确定每个目标访问请求的访问优先级;二、可以利用仲裁器根据每个目标访问请求中的目标读数据请求对应的读地址信息的位置,以及写数据请求对应的写地址信息,确定每个目标访问请求的访问优先级;三、可以利用仲裁器根据每个目标访问请求中携带的用于表征重要程度的标识,确定每个目标访问请求的访问优先级;四、访问优先级为预先设定的。
在一种实例方式中,优先级确定模块可以将具有相同读地址信息的多个目标访问请求的优先级设置为同一优先级。
在图5和图6中,ram_rdif0~ram_rdifn可以表示请求针对数据访问模块(包括读数据模块510-1~510-n和写数据模块540)发出的访问请求进行仲裁的仲裁请求信号。例如,ram_rdif0表示请求对来自读数据模块510-0的访问目标存储器520的目标访问请求(具体为读数据请求)进行仲裁的仲裁请求信号,ram_rdif1表示请求对来自读数据模块510-1的访问目标存储器520的读数据请求进行仲裁的仲裁请求信号,ram_rdifn表示请求对来自读数据模块510-n的访问目标存储器520的目标访问请求(具体为读数据请求)进行仲裁的仲裁请求信号。类似地,关于请求对来自其他读数据模块510的访问目标存储器520的目标访问请求(具体为读数据请求)进行仲裁的仲裁请求信号,图5和图6中未一一示出,但均可用ram_rdif表示。如图5和图6所示,仲裁请求信号ram_rdif0~ram_rdifn均被输入预先设置的优先级确定模块(例如仲裁器)550。
其中,如图5所示,在每个目标访问请求对应的数据访问模块相互独立地访问目标存储器的不同区间的情况下,每个读数据模块510-0~510-n对应一个独立的数据缓存子模块530-0~530-n,且读数据模块510-0~510-n可以同时向对应的数据缓存子模块530-0~530-n发出读数据请求。对于来自读数据模块510-0~510-n的读数据请求,若对应的数据缓存子模块530-0~530-n无法直接响应该读数据请求(例如,对应的数据缓存子模块530-0~530-n未存储有该读数据请求对应的目标数据、或者所存储的对应的目标数据的存储状态为无效),则该读数据请求将被转换为仲裁请求信号并发送至例如仲裁器的优先级确定模块550。这样,550可以根据获取的仲裁请求信号,确定每个仲裁请求信号对应的目标访问请求(包括所述未被数据缓存子模块530-0~530-n直接响应的读数据请求)的访问优先级。
此外,如图6所示,在多个读数据模块510-0~510-n相互交叉地访问目标存储器520,且各个读数据模块510-0~510-n访问的目标存储器地址相同或短时间内相同,则读数据模块510-0~510-n可以共用一个数据缓存模块630。并且,由于数据缓存模块630 由寄存器或高速缓冲存储器搭建而成,数据缓存模块630理论上可以同时响应多个读数据请求。然而,对于来自读数据模块510-0~510-n的读数据请求,若数据缓存模块630无法直接响应该读数据请求(例如,数据缓存模块630未存储有该读数据请求对应的目标数据、或者所存储的对应的目标数据的存储状态为无效),则该读数据请求将被转换为对应的仲裁请求信号,并向优先级确定模块550发出所述仲裁请求信号。之后,优先级确定模块550可以根据获取的仲裁请求信号,确定每个仲裁请求信号对应的目标访问请求(包括所述未被数据缓存模块630直接响应的读数据请求)的访问优先级。
具体实施时,作为仲裁器的优先级确定模块550在同时接收到多个仲裁请求信号之后,即根据接收到的仲裁请求信号,确定每个请求仲裁信号对应的目标访问请求的访问优先级;然后,根据确定的访问优先级,依次将目标存储器520的数据访问接口连接至每个目标访问请求对应的数据访问模块510-0~510-n和540;之后,各个数据访问模块510-0~510-n和540可以基于连接的数据访问接口,对目标存储器520进行数据读取或数据写入。
另外,如果在确定获取到的每个仲裁请求信号对应的目标访问请求的访问优先级的过程中,优先级确定模块550接收到新的仲裁请求信号,则可以按照新获取的仲裁请求信号的产生时间,将新获取的仲裁请求信号存储至预设的仲裁队列中;当优先级确定模块550完成当前次仲裁时,根据产生时间的先后顺序,从仲裁队列中获取新的仲裁请求信号进行新一次的仲裁。
以图5所示的多个读数据模块510-0~510-n为例,对例如仲裁器的优先级确定模块550的仲裁过程进行说明。在确定出多个读数据模块510-0~510-n发出针对目标存储器520的多个读数据请求,且多个读数据请求对应的目标数据在各个缓存子模块530-0~530-n中的存储状态均指示非有效的情况下,多个读数据模块510-0~510-n发出的读数据请求可以经由对应的缓存子模块530-0~530-n转换为仲裁请求信号,并且缓存子模块530-0~530-n向仲裁器550发送仲裁请求信号。其中,读数据模块510-0产生的读数据请求经由仲裁请求信号ram_rdif0向仲裁器请求仲裁,读数据模块510-1产生的读数据请求经由仲裁请求信号ram_rdif1向仲裁器请求仲裁,读数据模块510-n产生的读数据请求经由仲裁请求信号ram_rdifn向仲裁器请求仲裁,关于对读数据模块510-2~510-n-1产生的读数据请求发起仲裁的过程与此类似并不再赘述。这样,仲裁器550可以接收到多个仲裁请求信号ram_rdif0~ram_rdifn,进而,仲裁器550对每个仲裁请求信号对应的读数据请求进行仲裁,确定每个读数据请求的访问优先级。之后,各个读数据请求可以根据确定的访问优先级,依次从目标存储器520中获取目标数据。
S404:基于每个目标访问请求的访问优先级,依次对目标存储器进行访问。
这里,针对目标访问请求中的每个目标读数据请求,优先级确定模块可以按照确定的每个目标读数据请求的访问优先级,依次建立每个目标读数据请求对应的读数据模块和目标存储器的数据访问接口之间的连接,进而,各个读数据模块可以基于其对应的目标读数据请求的读地址信息,利用数据访问接口对目标存储器进行访问,从而,实现依次从目标存储器中获取每个目标读数据请求对应的目标数据。
并且,如果存在具有相同访问优先级的多个目标读数据请求,在响应该访问优先级对应的多个目标读数据请求时,可以随机响应于该访问优先级对应的多个目标读数据请求中的任一个目标读数据请求,建立该目标读数据请求对应的读数据模块与目标数据访问接口之间的连接,进而,该读数据模块可以基于该目标读数据请求对应的读地址信息,利用数据访问接口对目标存储器进行访问,获取到目标存储器的中该读地址信息对应的位置处的目标数据。
针对目标访问请求中的每个写数据请求,可以基于确定的每个写数据请求的访问 优先级,依次建立每个写数据请求对应的写数据模块与数据访问接口之间的连接,以使各个写数据模块利用数据访问接口,将写数据请求对应的待写数据写入目标存储器。
在一种实施例中,如果同步获取到针对目标存储器的访问请求包括读数据请求和写数据请求,则可以先利用仲裁器确定写数据请求对应的访问优先级,然后依次将写数据请求对应的待写数据写入目标存储器中,再基于确定的读数据请求的访问优先级,依次从目标存储器中获取读数据请求对应的目标数据。或者,可以直接利用仲裁器确定出每个读数据请求和每个写数据请求的整体的访问优先级,基于确定的该访问优先级,完成从目标存储器中读取目标数据和将待写数据写入目标存储器的操作。
在一种实施方式中,读数据请求中还可以包括附加写缓存信息,其中,附加写缓存信息用于指示是否需要将从目标存储器中获取的目标数据缓存在数据缓存模块中。示例性的,附加写缓存信息可以利用图2、图5和图6中的cupen标识。例如,当cupen置为1时,表示可以将获取的目标数据缓存到数据缓存模块230、530-0~530-n、630中;当cupen置为0时表示不需要将获取的目标数据缓存到数据缓存模块230、530-0~530-n、630中。cupen标识对应的数值可以由该标识对应的读数据模块210、510-0~510-n根据其对应的访存需求进行确定。
具体实施时,在从目标存储器中获取目标数据之后,还可以基于该目标数据对应的读数据请求中的附加写缓存信息,确定是否需要将该目标数据缓存到数据缓存模块中。如果需要将该目标数据缓存到数据缓存模块中,则可以进一步确定数据缓存模块中是否存储有该目标数据对应的读地址信息对应的数据。如果确定数据缓存模块中存储有该目标数据对应的读地址信息对应的数据,则可以将已存储的该读地址信息对应的数据更新为该目标数据,以完成对数据缓存模块中该读地址信息对应的数据的更新,并将该目标数据在数据缓存模块中的存储状态设置为有效,例如,设置为valid状态。
或者,在确定数据缓存模块中未存储有该目标数据对应的读地址信息对应的数据的情况下,确定数据缓存模块的存储空间是否已经使用完毕;如果数据缓存模块的存储空间尚未使用完毕,则可以从数据缓存模块的剩余空间对应的缓存地址中,选取最低空闲地址,将读地址信息及其对应的目标数据缓存在该最低空闲地址中,并将该目标数据在数据缓存模块中的存储状态设置为有效。
如果数据缓存模块的存储空间已经使用完毕,说明数据缓存模块中不存在可使用的存储空间,则可以确定数据缓存模块对应的最新待写地址,按最新待写地址进行读地址信息及其对应的目标数据的存储,并将该目标数据在数据缓存模块中的存储状态设置为有效。其中,最新待写地址用于表征数据缓存模块当前次可以用于存储地址信息及地址信息对应的数据的地址。例如,最新待写地址可以是按照地址递增的方式,将数据缓存模块上一次用于存储地址信息及地址信息对应的数据的地址进行地址递增后确定的。并且,在数据缓存模块中进行数据和地址信息的存储时,如果用于存储地址信息及对应的数据的地址已经为数据缓存模块中的最高地址,则下一次用于存储的地址将回环到数据缓存模块中的最低地址,这样可以保证每次确定的最新待写地址对应存储的数据和地址信息的存储时间最久。相应地,通过在数据缓存模块的存储空间已经使用完毕的情况下按最新待写地址进行地址信息及其对应的目标数据的存储,相当于利用当前次获取的目标数据替换数据缓存模块中存储时间最久的数据,从而有效保证了数据缓存模块中存储的有效数据的时效性。
上述利用附加写缓存信息,将获取的目标数据缓存在数据缓存模块中所涉及的各判断步骤,可以同步执行。
另外,本公开实施例化提供了一种与数据处理方法相对应的数据处理装置,包括:读数据部件、数据缓存部件和数据存储部件;所述读数据部件与所述数据缓存部件通信 连接,所述数据缓存部件与所述数据存储部件通信连接;所述读数据部件,用于确定针对所述数据存储部件的读数据请求,所述读数据请求中包括目标数据对应的读地址信息;以及,基于所述读地址信息,确定所述目标数据在预先设置的数据缓存部件中的存储状态,并响应于所述存储状态指示所述数据缓存部件中存储有有效的目标数据,从所述数据缓存部件中获取所述目标数据。
在一种实施例中,所述读数据部件,还用于响应于所述存储状态指示所述数据缓存部件中不存在有效的目标数据,基于所述读数据请求和所述读地址信息,从所述数据存储部件中获取所述目标数据。
在一种实施例中,所述数据处理装置还包括写数据部件,所述写数据部件与所述数据缓存部件以及所述数据存储部件通信连接;所述写数据部件,用于确定针对所述数据存储部件的第一写数据请求,所述第一写数据请求中包括待写的第一数据和所述第一数据对应的第一写地址信息;以及,在基于所述第一写地址信息,确定所述数据缓存部件中存储有有效的所述第一写地址信息对应的数据的情况下,将所述数据缓存部件中所述第一写地址信息对应的数据的存储状态更新为无效;并基于所述第一写数据请求,将所述第一数据存储在所述数据存储部件中的第一写地址信息对应的位置处。
在一种实施例中,所述第一写数据请求中还包括第一写缓存信息;所述写数据部件,用于:在基于所述第一写地址信息,确定所述数据缓存部件中存储有有效的所述第一写地址信息对应的数据、并且所述第一写缓存信息指示所述第一数据无需缓存在所述数据缓存部件中的情况下,将所述数据缓存部件中所述第一写地址信息对应的数据的存储状态更新为无效;在基于所述第一写地址信息,确定所述数据缓存部件中存储有有效的所述第一写地址信息对应的数据、并且所述第一写缓存信息指示所述第一数据需要缓存在所述数据缓存部件中的情况下,将所述数据缓存部件中所述第一写地址信息对应的数据更新为所述第一数据。
在一种实施例中,所述数据处理装置还包括写数据部件,所述写数据部件与所述数据缓存部件以及所述数据存储部件通信连接;所述写数据部件,用于确定针对数据存储部件的第二写数据请求,所述第二写数据请求中包括待写的第二数据和所述第二数据对应的第二写地址信息;在基于所述第二写地址信息,确定所述数据缓存部件中存储有有效的所述第二写地址信息对应的数据的情况下,将所述第二写地址信息对应的数据更新为所述第二数据;基于所述第二写数据请求,将所述第二数据存储在所述数据存储部件中的第二写地址信息对应的位置处。
在一种实施例中,所述数据处理装置还包括优先级确定部件,所述优先级确定部件与所述数据缓存部件以及所述数据存储部件通信连接;所述数据访问部件,用于在确定出针对数据存储部件的多个数据访问请求的情况下,针对所述数据访问请求中的每个读数据请求,基于该读数据请求对应的读地址信息,确定该读数据请求对应的待读取的目标数据在对应的数据缓存部件中的存储状态;所述数据访问部件包括读数据部件和/或写数据部件;基于所述存储状态,从所述读数据请求中筛选符合预设条件的目标读数据请求;所述预设条件包括与读数据请求对应的数据缓存部件中不存在有效的目标数据;在目标访问请求的数量大于预设数量的情况下,利用预先设置的优先级确定部件确定每个目标访问请求的访问优先级;所述目标访问请求的数量根据所述目标读数据请求的数量和/或所述多个数据访问请求中的写数据请求的数量确定;基于每个目标访问请求的访问优先级,依次对所述数据存储部件进行访问。
在一种实施例中,所述数据缓存部件包括与每个数据访问部件分别对应的多个缓存子部件。
在一种实施例中,所述数据访问部件,用于利用预先设置的优先级确定部件,将 具有相同读地址信息的目标读数据请求设置为同一访问优先级。
在一种实施例中,所述读数据请求包括附加写缓存信息;所述读数据部件,还用于在从所述数据存储部件中获取所述目标数据之后,在确定所述附加写缓存信息指示所述目标数据需要缓存在所述数据缓存部件中的情况下,基于所述数据缓存部件对应的最新待写地址,存储所述目标数据;将所述目标数据在所述数据缓存部件中的存储状态设置为有效。
这里,读数据部件的功能与上述实施例中的读数据模块的功能相同,数据存储部件与上述实施例中的目标存储器的功能相同,数据缓存部件与上述实施例中的数据缓存模块相同,写数据部件的功能与上述实施例中的写数据模块相同,优先级确定部件的功能与上述实施例中的优先级确定模块相同,数据访问部件的功能与上述实施例中的数据访问模块相同,关于上述数据处理装置中的各部件以及上述各实施例的具体介绍,可以参照本公开实施例所提供的数据处理方法对应的各实施例的介绍,这里不再赘述。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
基于同一发明构思,本公开实施例中还提供了与数据处理方法对应的数据处理装置,由于本公开实施例中的装置解决问题的原理与本公开实施例上述数据处理方法相似,因此装置的实施可以参见方法的实施,重复之处不再赘述。
如图7所示,为本公开实施例提供的一种数据处理装置的示意图,该装置包括:
第一确定模块701,用于确定针对目标存储器的读数据请求,所述读数据请求中包括待读取的目标数据对应的读地址信息;
第二确定模块702,用于基于所述读地址信息,确定所述目标数据在预先设置的数据缓存模块中的存储状态;
获取模块703,用于响应于所述存储状态指示所述数据缓存模块中存储有有效的目标数据,从所述数据缓存模块中获取所述目标数据。
在一种可能的实施方式中,所述获取模块703,还用于响应于所述存储状态指示所述数据缓存模块中不存在有效的目标数据,基于所述读数据请求和所述读地址信息,从所述目标存储器中获取所述目标数据。
在一种可能的实施方式中,所述装置还包括第一更新模块704;所述第一确定模块701,还用于确定针对目标存储器的第一写数据请求,所述第一写数据请求中包括待写的第一数据和所述第一数据对应的第一写地址信息;所述第一更新模块704,用于在基于所述第一写地址信息,确定所述数据缓存模块中存储有有效的所述第一写地址信息对应的数据的情况下,将所述数据缓存模块中所述第一写地址信息对应的数据的存储状态更新为无效;基于所述第一写数据请求,将所述第一数据存储在所述目标存储器中的第一写地址信息对应的位置处。
在一种可能的实施方式中,所述第一写数据请求中还包括第一写缓存信息;所述第一更新模块704,用于:在基于所述第一写地址信息,确定所述数据缓存模块中存储有有效的所述第一写地址信息对应的数据、并且所述第一写缓存信息指示所述第一数据无需缓存在所述数据缓存模块中的情况下,将所述数据缓存模块中所述第一写地址信息对应的数据的存储状态更新为无效;在基于所述第一写地址信息,确定所述数据缓存模块中存储有有效的所述第一写地址信息对应的数据、并且所述第一写缓存信息指示所述第一数据需要缓存在所述数据缓存模块中的情况下,将所述数据缓存模块中所述第一写 地址信息对应的数据更新为所述第一数据。
在一种可能的实施方式中,所述装置还包括第二更新模块705;所述第一确定模块701,还用于确定针对目标存储器的第二写数据请求,所述第二写数据请求中包括待写的第二数据和所述第二数据对应的第二写地址信息;所述第二更新模块705,用于在基于所述第二写地址信息,确定所述数据缓存模块中存储有有效的所述第二写地址信息对应的数据的情况下,将所述第二写地址信息对应的数据更新为所述第二数据;基于所述第二写数据请求,将所述第二数据存储在所述目标存储器中的第二写地址信息对应的位置处。
在一种可能的实施方式中,所述装置还包括第三确定模块706;所述第二确定模块702,用于在确定出针对目标存储器的多个数据访问请求的情况下,针对所述数据访问请求中的每个读数据请求,基于该读数据请求对应的读地址信息,确定该读数据请求对应的目标数据在对应的数据缓存模块中的存储状态;所述第三确定模块706,用于基于所述存储状态,从所述读数据请求中筛选符合预设条件的目标读数据请求;所述预设条件包括与读数据请求对应的数据缓存模块中不存在有效的目标数据;在目标访问请求的数量大于预设数量的情况下,利用预先设置的优先级确定模块确定每个目标访问请求的访问优先级;所述目标访问请求的数量根据所述目标读数据请求的数量和/或所述多个数据访问请求中的写数据请求的数量确定;基于每个目标访问请求的访问优先级,依次对所述目标存储器进行访问。
在一种可能的实施方式中,所述数据缓存模块包括与每个数据访问模块分别对应的多个缓存子模块;所述数据访问模块包括读数据模块和写数据模块。
在一种可能的实施方式中,所述第三确定模块706,用于利用预先设置的优先级确定模块,将具有相同读地址信息的目标读数据请求设置为同一访问优先级。
在一种可能的实施方式中,所述读数据请求包括附加写缓存信息;所述装置还包括:第三更新模块707,用于在所述获取模块703从所述目标存储器中获取所述目标数据之后,在确定所述附加写缓存信息指示所述目标数据需要缓存在所述数据缓存模块中的情况下,基于所述数据缓存模块对应的最新待写地址,存储所述目标数据;将所述目标数据在所述数据缓存模块中的存储状态设置为有效。
本公开实施例提供的数据处理装置可以包括芯片、AI芯片等。
关于装置中的各模块的处理流程、以及各模块之间的交互流程的描述可以参照上述方法实施例中的相关说明,这里不再详述。
本公开实施例还提供了一种计算机设备,可以包括本公开实施例提供的数据处理装置。如图8所示,为本公开实施例提供的一种计算机设备结构示意图,包括处理器81和存储器82;所述存储器82存储有处理器81可执行的机器可读指令,处理器81用于执行存储器82中存储的机器可读指令,所述机器可读指令被处理器81执行时,处理器81执行下述步骤:S101:确定针对目标存储器的读数据请求,读数据请求中包括待读取的目标数据对应的读地址信息;S102:基于读地址信息,确定目标数据在预先设置的数据缓存模块中的存储状态;以及S103:响应于存储状态指示数据缓存模块中存储有有效的目标数据,从数据缓存模块中获取目标数据。
上述存储器82包括内存821和外部存储器822;这里的内存821也称内存储器,用于暂时存放处理器81中的运算数据,以及与硬盘等外部存储器822交换的数据,处理器81通过内存821与外部存储器822进行数据交换。
上述指令的具体执行过程可以参考本公开实施例中所述的数据处理方法的步骤, 此处不再赘述。
本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的数据处理方法的步骤。其中,该存储介质可以是易失性或非易失的计算机可读取存储介质。
本公开实施例所提供的数据处理方法的计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行上述方法实施例中所述的数据处理方法的步骤,具体可参见上述方法实施例,在此不再赘述。
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本公开所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、目标存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上所述实施例,仅为本公开的具体实施方式,用以说明本公开的技术方案,而非对其限制,本公开的保护范围并不局限于此,尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本公开实施例技术方案的精神和范围,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应所述以权利要求的保护范围为准。

Claims (16)

  1. 一种数据处理装置,其特征在于,包括:
    数据存储部件;
    数据缓存部件,所述数据缓存部件与所述数据存储部件通信连接;
    数据访问部件,所述数据访问部件包括至少一个读数据部件,
    其中,每个所述读数据部件,用于
    确定针对所述数据存储部件的读数据请求,所述读数据请求中包括待读取的目标数据对应的读地址信息;
    基于所述读地址信息,确定所述目标数据在预先设置的所述数据缓存部件中的存储状态;并
    响应于所述存储状态指示所述数据缓存部件中存储有有效的所述目标数据,从所述数据缓存部件中获取所述目标数据。
  2. 根据权利要求1所述的数据处理装置,其特征在于,所述读数据部件,还用于:
    响应于所述存储状态指示所述数据缓存部件中不存在有效的所述目标数据,基于所述读数据请求和所述读地址信息,从所述数据存储部件中获取所述目标数据。
  3. 根据权利要求1或2所述的数据处理装置,其特征在于,所述数据访问部件还包括至少一个写数据部件,所述至少一个写数据部件包括至少一个第一写数据部件,每个所述第一写数据部件与所述数据缓存部件以及所述数据存储部件通信连接,用于:
    确定针对所述数据存储部件的第一写数据请求,所述第一写数据请求中包括待写的第一数据和所述第一数据对应的第一写地址信息;
    在基于所述第一写地址信息,确定所述数据缓存部件中存储有有效的所述第一写地址信息对应的数据的情况下,将所述数据缓存部件中所述第一写地址信息对应的数据的存储状态更新为无效;并
    基于所述第一写数据请求,将所述第一数据存储在所述数据存储部件中的所述第一写地址信息对应的位置处。
  4. 根据权利要求3所述的数据处理装置,其特征在于,在所述第一写数据请求中还包括第一写缓存信息的情况下,所述第一写数据部件还用于:
    在基于所述第一写地址信息,确定所述数据缓存部件中存储有有效的所述第一写地址信息对应的数据、并且所述第一写缓存信息指示所述第一数据无需缓存在所述数据缓存部件中的情况下,将所述数据缓存部件中所述第一写地址信息对应的数据的存储状态更新为无效。
  5. 根据权利要求1或2所述的数据处理装置,其特征在于,所述数据访问部件还包括至少一个写数据部件,所述至少一个写数据部件包括至少一个第二写数据部件,每个所述第二写数据部件与所述数据缓存部件以及所述数据存储部件通信连接,用于:
    确定针对所述数据存储部件的第二写数据请求,所述第二写数据请求中包括待写的第二数据和所述第二数据对应的第二写地址信息;
    在基于所述第二写地址信息,确定所述数据缓存部件中存储有有效的所述第二写地址信息对应的数据的情况下,将所述数据缓存部件中所述第二写地址信息对应的数据更新为所述第二数据;
    基于所述第二写数据请求,将所述第二数据存储在所述数据存储部件中的所述第二写地址信息对应的位置处。
  6. 根据权利要求5所述的数据处理装置,其特征在于,所述第二写数据请求中还包括第二写缓存信息;
    所述写数据部件,用于在基于所述第二写地址信息,确定所述数据缓存部件中存储有有效的所述第二写地址信息对应的数据、并且所述第二写缓存信息指示所述第二数据需要缓存在所述数据缓存部件中的情况下,将所述第二写地址信息对应的数据更新为所 述第二数据。
  7. 根据权利要求1至6任一所述的数据处理装置,其特征在于,所述数据处理装置还包括优先级确定部件,
    所述优先级确定部件与所述数据缓存部件以及所述数据存储部件通信连接,用于:在所述数据访问部件确定出针对所述数据存储部件的多个数据访问请求,并且所述多个数据访问请求中的目标访问请求的数量大于预设数量的情况下,确定每个目标访问请求的访问优先级,其中,所述目标访问请求包括写数据请求和目标读数据请求,所述数据缓存部件中未存储有效的所述目标读数据请求对应的目标数据;
    所述数据访问部件,用于:基于每个所述目标访问请求的访问优先级,依次对所述数据存储部件进行访问。
  8. 根据权利要求7所述的数据处理装置,其特征在于,所述数据缓存部件包括多个缓存子部件,
    每个所述缓存子部件对应所述数据访问部件中的至少一个读数据部件和/或至少一个写数据部件。
  9. 根据权利要求7或8所述的数据处理装置,其特征在于,所述优先级确定部件,用于:
    将具有相同读地址信息的多个所述目标读数据请求设置为同一访问优先级。
  10. 根据权利要求2至9任一项所述的数据处理装置,其特征在于,所述读数据部件还用于:
    在从所述数据存储部件中获取所述目标数据之后,在所述读数据请求包括附加写缓存信息的情况下,基于所述数据缓存部件对应的最新待写地址存储所述目标数据在所述数据缓存部件中,其中,所述附加写缓存信息用于指示所述目标数据需要缓存在所述数据缓存部件中;
    将所述目标数据在所述数据缓存部件中的存储状态设置为有效。
  11. 一种数据处理方法,包括:
    确定针对目标存储器的读数据请求,所述读数据请求中包括待读取的目标数据对应的读地址信息;
    基于所述读地址信息,确定所述目标数据在预先设置的数据缓存模块中的存储状态;
    响应于所述存储状态指示所述数据缓存模块中存储有有效的所述目标数据,从所述数据缓存模块中获取所述目标数据。
  12. 根据权利要求11所述的方法,还包括:
    响应于所述存储状态指示所述数据缓存模块中不存在有效的所述目标数据,基于所述读数据请求和所述读地址信息,从所述目标存储器中获取所述目标数据。
  13. 根据权利要求11或12所述的方法,还包括:
    确定针对所述目标存储器的第一写数据请求,所述第一写数据请求中包括待写的第一数据和所述第一数据对应的第一写地址信息;
    在基于所述第一写地址信息,确定所述数据缓存模块中存储有有效的所述第一写地址信息对应的数据的情况下,将所述数据缓存模块中所述第一写地址信息对应的数据的存储状态更新为无效;
    基于所述第一写数据请求,将所述第一数据存储在所述目标存储器中的所述第一写地址信息对应的位置处。
  14. 根据权利要求11或12所述的方法,还包括:
    确定针对所述目标存储器的第二写数据请求,所述第二写数据请求中包括待写的第二数据和所述第二数据对应的第二写地址信息;
    在基于所述第二写地址信息,确定所述数据缓存模块中存储有有效的所述第二写地址信息对应的数据的情况下,将所述数据缓存模块中所述第二写地址信息对应的数据更 新为所述第二数据;
    基于所述第二写数据请求,将所述第二数据存储在所述目标存储器中的所述第二写地址信息对应的位置处。
  15. 一种计算机设备,其特征在于,包括:如权利要求1至10任意一项所述的数据处理装置。
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被计算机设备运行时,所述计算机设备执行如权利要求11至14任意一项所述的数据处理方法的步骤。
PCT/CN2022/092813 2021-07-30 2022-05-13 数据处理的装置、方法、计算机设备和存储介质 Ceased WO2023005352A1 (zh)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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 深圳市中兴微电子技术有限公司 一种数据读取方法和装置、计算机可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
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