Data access processing method, data management module and electronic equipment

By deploying the data management module on the system-level chip, using storage space registers to store memory addresses and interactive copy information to process data access requests, the problem of poor transaction processing performance during the copy process in the traditional hot and cold data management solution is solved, achieving a more efficient data access.

CN118626404APending Publication Date: 2024-09-10XIANGDIXIAN COMPUTING TECH (CHONGQING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410756261.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Traditional hot and cold data management solutions result in poor transaction processing performance of software or hardware units during the data copy process, requiring the data stored in memory or RAM to be accessed only after the copy is completed.

Method used

Deploy the data management module on the system-level chip, store memory address information and interactive copy information through the storage space register, receive data access requests and process the requests based on the interactive copy information, realize real-time processing of data access requests during the copy process, and improve transaction processing efficiency .

Benefits of technology

It improves data access efficiency, reduces waiting time, and improves the overall performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626404A
    Figure CN118626404A
Patent Text Reader

Abstract

The invention provides a data access processing method, a data management module and an electronic device, the data management module is deployed on a system-on-chip, the system-on-chip is also deployed with an RAM, the RAM comprises a plurality of storage spaces, the data management module comprises a plurality of storage space registers, and the storage spaces are stored in the storage space registers. Any storage space register corresponds to any storage space in the RAM, and the storage space register is used for storing address information of a data block in the corresponding storage space in the memory and interactive copy information of the storage space and the memory; the method comprises the following steps: receiving a data access request, wherein the data access request carries address information of accessed target data in a memory; traversing address information stored in a plurality of local storage space registers, and determining a target storage space register hit by the address information carried by the data access request; and processing the data access request according to the interactive copy information in the target storage space register.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Hot data refers to data that is frequently accessed, and cold data refers to data that is infrequently accessed. System-level chips are often configured with large-capacity storage, such as memory (for example, DDR, i.e., DDR SDRAM, double-rate synchronous dynamic random access memory), and faster and smaller-capacity memory, such as RAM (i.e., Random Access Memory), are generally deployed on system-level chips. Placing hot data on RAM and cold data on memory can improve the data access efficiency of the entire system.

[0003] In traditional hot and cold data management solutions, software programs are required to process the copying of hot and cold data between memory and RAM. When the accessed data is in the interactive copying process, the software or other hardware units that need to access the data can only wait. Only after the copying is completed can the hot and cold data stored in the memory or RAM be accessed normally. Therefore, in the current hot and cold data management solutions, the transaction processing performance of software or other hardware units that need to access data is poor. Summary of the invention

[0004] The purpose of the present disclosure is to provide a data access processing method, a data management module and an electronic device.

[0005] According to one aspect of the present disclosure, a data access processing method is provided, which is applied to a data management module, wherein the data management module is deployed on a system-level chip, and a RAM is also deployed on the system-level chip, wherein the RAM includes a plurality of storage spaces, and the data management module includes a plurality of storage space registers, wherein any storage space register corresponds to any storage space in the RAM, and the storage space register is used to store: address information of a data block in the corresponding storage space in a memory and interactive copy information between the storage space and the memory; the method includes: Receive a data access request, wherein the data access request carries address information of the target data to be accessed in the memory; Traversing the address information stored in a plurality of local storage space registers, and determining a target storage space register hit by the address information carried by the data access request; The data access request is processed according to the interactive copy information in the target storage space register.

[0006] In one embodiment, the method further includes: after traversing the address information stored in several local storage space registers and determining that the address information carried by the data access request does not hit any storage space register, processing the target data in the memory according to the data access request.

[0007] In one implementation, the data access request is a write request, and the processing of the data access request according to the interactive copy information in the target storage space register includes: If the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, write processing is performed on the target data in the target storage space according to the write request.

[0008] In one implementation, the data management module further includes a write mode configuration register, and the write mode configuration register is used to store a processing mode for a write request; the method further includes: Query the processing method for the write request in the write mode configuration register. If the processing method for the write request is to write the data in the storage space and the memory at the same time, then while writing the target data in the target storage space according to the write request, write the target data in the memory according to the write request.

[0009] In one embodiment, the data management module further includes a write request cache area, and the method further includes: In a case where the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently performing interactive copying, the write request is cached in the write request cache area; If the copy direction is to copy the data in the target storage space to the memory, then after the interactive copy, the target data in the memory is written according to the data access request; If the copy direction is to copy the data in the memory to the target storage space, then after the interactive copy, the write request is processed according to the write request processing mode in the write mode configuration register.

[0010] In one implementation, the processing of the write request according to the write request processing mode in the write mode configuration register includes: If the processing method for the write request is to write the data in the storage space and the memory at the same time, write the target data in the target storage space according to the write request, and write the target data in the memory according to the write request; If the processing method for the write request is to perform write processing only on the data in the storage space, then write processing is performed on the target data in the target storage space according to the write request.

[0011] In one implementation, the data access request is a read request, and the processing of the data access request according to the interactive copy information in the target storage space register includes: If the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, the target data in the target storage space is read according to the read request.

[0012] In one embodiment, the method further comprises: In a case where the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently undergoing interactive copying, it is determined whether the target data corresponding to the read request has completed interactive copying according to the copy progress information; if not, the target data is read from the source location of the interactive copy; if completed, the target data is read from the destination location of the interactive copy; wherein the source location includes the target storage space, the memory, and the write request cache area; and the destination location includes the target storage space and the memory.

[0013] In one implementation, after a data block in any storage space is copied to the memory, address information in a storage space register corresponding to the storage space is deleted.

[0014] In one embodiment, any storage space register is further used to store data validity information, and the validity information is used to indicate whether the data block in the corresponding storage space is valid; after the data block in any storage space is copied to the memory, or when any storage space and the memory are interactively copied, the valid information in the storage space register corresponding to the storage space is marked as invalid; after the data block in the memory is copied to any storage space, the valid information in the storage space register corresponding to the storage space is marked as valid; the method further includes: If the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, and the valid information in the target storage space register indicates that the data block in the target storage space is invalid, the target data in the memory is processed according to the data access request.

[0015] In one embodiment, the data management module further includes a copy command register; the copy command register is used to store: a storage space register to be copied and a copy direction; the method further includes: Querying the copy command register to determine the storage space register to be copied; For the storage space register to be copied, acquiring address information stored in the storage space register, copying data to the storage space corresponding to the storage space register to be copied according to the copy direction and the address information, and marking valid information in the storage space register to be copied as invalid; After the data block in the memory is copied to the storage space, the valid information in the storage space register to be copied is marked as valid; After the data block in the storage space is copied to the memory, the valid information in the storage space register to be copied is marked as invalid.

[0016] In one embodiment, the method further comprises: When data is copied to the storage space corresponding to the storage space register to be copied according to the copy direction and address information, current copy progress information is determined according to the copy speed and copy time, and the copy progress information is stored.

[0017] According to a second aspect of the present disclosure, a data management module is provided, the data management module is deployed on a system-level chip, a RAM is also deployed on the system-level chip, the RAM includes a plurality of storage spaces, the data management module includes a plurality of storage space registers, wherein any storage space register corresponds to any storage space in the RAM, and the storage space register is used to store: address information of a data block in the corresponding storage space in the memory and interactive copy information between the storage space and the memory; the data management module includes: A request receiving unit, used to receive a data access request, wherein the data access request carries address information of the accessed target data in the memory; An address traversal unit, used to traverse the address information stored in a plurality of local storage space registers, and determine a target storage space register hit by the address information carried by the data access request; The request processing unit is used to process the data access request according to the interactive copy information in the target storage space register.

[0018] In one embodiment, the request processing unit is also used to traverse the address information stored in several local storage space registers, and when it is determined that the address information carried by the data access request does not hit any storage space register, process the target data in the memory according to the data access request.

[0019] In one implementation, the data access request is a write request; The request processing unit is specifically configured to perform write processing on the target data in the target storage space according to the write request if the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied.

[0020] In one embodiment, the data management module further includes a write mode configuration register, and the write mode configuration register is used to store a processing mode for a write request; The request processing unit is also used to query the processing method for the write request in the write mode configuration register. If the processing method for the write request is to simultaneously write the data in the storage space and the memory, then while writing the target data in the target storage space according to the write request, writing the target data in the memory according to the write request.

[0021] In one embodiment, the data management module further includes a write request cache area; The request processing unit is further configured to cache the write request in the write request cache area when the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently performing interactive copying; If the copy direction is to copy the data in the target storage space to the memory, then after the interactive copy, the target data in the memory is written according to the data access request; If the copy direction is to copy the data in the memory to the target storage space, then after the interactive copy, the write request is processed according to the write request processing mode in the write mode configuration register.

[0022] In one embodiment, the request processing unit is specifically configured to, if the processing mode for the write request is to simultaneously write the data in the storage space and the memory, write the target data in the target storage space according to the write request, and simultaneously write the target data in the memory according to the write request; If the processing method for the write request is to perform write processing only on the data in the storage space, then write processing is performed on the target data in the target storage space according to the write request.

[0023] In one implementation, the data access request is a read request; The request processing unit is specifically configured to read the target data in the target storage space according to the read request if the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied.

[0024] In one embodiment, the request processing unit is also used to determine whether the target data corresponding to the read request has completed interactive copying according to the copy progress information when the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently undergoing interactive copying. If not, the target data is read from the source location of the interactive copy; if completed, the target data is read from the destination location of the interactive copy; wherein the source location includes the target storage space, the memory, and the write request cache area; and the destination location includes the target storage space and the memory.

[0025] In one implementation manner, the request processing unit is further configured to delete address information in a storage space register corresponding to any storage space after copying a data block in the storage space to the memory.

[0026] In one embodiment, any storage space register is further used to store data validity information, and the validity information is used to indicate whether the data block in the corresponding storage space is valid; after the data block in any storage space is copied to the memory, or when any storage space and the memory are interactively copied, the valid information in the storage space register corresponding to the storage space is marked as invalid; after the data block in the memory is copied to any storage space, the valid information in the storage space register corresponding to the storage space is marked as valid; The request processing unit is also used to process the target data in the memory according to the data access request if the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, and the valid information in the target storage space register indicates that the data block in the target storage space is invalid.

[0027] In one embodiment, the data management module further includes a copy command register; the copy command register is used to store: a storage space register to be copied and a copy direction; the data management module further includes a copy processing unit; The copy processing unit is used to query the copy command register to determine the storage space register to be copied; For the storage space register to be copied, acquiring address information stored in the storage space register, copying data to the storage space corresponding to the storage space register to be copied according to the copy direction and the address information, and marking valid information in the storage space register to be copied as invalid; After the data block in the memory is copied to the storage space, the valid information in the storage space register to be copied is marked as valid; After the data block in the storage space is copied to the memory, the valid information in the storage space register to be copied is marked as invalid.

[0028] In one embodiment, the copy processing unit is also used to determine the current copy progress information according to the copy speed and copy time when copying data to the storage space corresponding to the storage space register to be copied according to the copy direction and address information, and store the copy progress information.

[0029] According to a third aspect of the present disclosure, a graphics processing system is provided, comprising the data management module of the second aspect.

[0030] According to a fourth aspect of the present disclosure, there is provided an electronic component comprising the graphics processing system of the third aspect.

[0031] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising the electronic component of the fourth aspect.

[0032] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of a cold and hot data interaction scenario provided by an embodiment of the present disclosure; Figure 2 A flowchart of a data access processing method provided by an embodiment of the present disclosure; Figure 3 A structural schematic diagram of a graphics processing system including a data management module provided by an embodiment of the present disclosure; Figure 4 A flowchart of an interactive copying method provided by an embodiment of the present disclosure; Figure 5 A schematic diagram of the structure of a copy command register provided by an embodiment of the present disclosure; Figure 6 A schematic diagram of a data management module structure provided for one embodiment of the present disclosure; Figure 7 A schematic diagram of the structure of a graphics processing system provided by one embodiment of the present disclosure. DETAILED DESCRIPTION

[0034] Before introducing the embodiments of the present disclosure, it should be noted that: Some embodiments of the present disclosure are described as processing flows. Although the various operation steps of the flow may be given sequential step numbers, the operation steps therein may be implemented in parallel, concurrently or simultaneously.

[0035] In the embodiments of the present disclosure, the terms "first", "second", etc. may be used to describe various features, but these features should not be limited by these terms. These terms are used only to distinguish one feature from another.

[0036] The term “and / or” may be used in embodiments of the present disclosure. “And / or” includes any and all combinations of one or more of the associated features listed.

[0037] It should be understood that when describing the connection or communication relationship between two components, unless it is explicitly stated that the two components are directly connected or directly communicating, the connection or communication between the two components can be understood as direct connection or communication, or as indirect connection or communication through an intermediate component.

[0038] In order to make the technical solutions and advantages of the embodiments of the present disclosure more clearly understood, the exemplary embodiments of the present disclosure are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0039] Hot data refers to data that is frequently accessed, and cold data refers to data that is infrequently accessed. Usually, the software will distinguish hot and cold data by counting the access frequency of the data, taking the data of a preset data size as a data block, such as taking the data block with a data access frequency higher than the preset frequency as hot data, and taking the data block with a data access frequency lower than the preset frequency as cold data. Various mature hot and cold data algorithms can be used to distinguish hot data from cold data, and the present disclosure does not limit this.

[0040] In the SoC scenario, the software will copy the filtered hot data from the SoC's corresponding memory to the SoC's RAM so that the software or other hardware units on the SoC can access the hot data more quickly. When the access frequency of some hot data in the RAM is not high, the hot data in the RAM needs to be re-determined as cold data and copied to the memory. In an actual application scenario, such as Figure 1 As shown, in the case where the system-level chip is a graphics processing system, i.e., GPU SOC (graphics processing unit, System on Chips), the software is usually a graphics processing system software driver on a host, that is, the software driver on the host distinguishes between hot and cold data and copies the hot and cold data interactively between the RAM on the GPU SOC and the memory.

[0041] When the accessed data is in the interactive copy process, the host software or other hardware units on the system-level chip that need to access the data can only wait. Only after the copy is completed can the cold and hot data stored in the memory or RAM be accessed normally. Therefore, in the current hot and cold data management solutions, the transaction processing performance of the software or other hardware units that need to access the data is poor.

[0042] Based on the above problems, Figure 2 As shown, the present disclosure proposes a data access processing method, which is applied to a data management module, such as Figure 3 As shown, the data management module is deployed on the system-level chip, and the system-level chip is also deployed with RAM, the RAM includes a plurality of storage spaces, and the data management module includes a plurality of storage space registers, wherein any storage space register corresponds to any storage space in the RAM, and the storage space register is used to store: the address information of the data block in the corresponding storage space in the memory and the interactive copy information between the storage space and the memory; exemplarily, as Figure 3 As shown, for example, if the storage space register 1 in the data management module corresponds to the storage space 1 in the RAM, the storage space register 1 will store the address information of the data block in the storage space 1 in the memory, as well as the current interactive copy information between the storage space 1 and the memory, wherein the interactive copy information is used to indicate whether the storage space corresponding to the storage space register and the memory are currently performing interactive copying, and the copy direction. Specifically, the index of the storage space register can be set to the address of the corresponding storage space in the RAM, thereby realizing that any storage space register corresponds to any storage space.

[0043] The data access processing method includes: S201, receiving a data access request, the data access request carrying address information of target data to be accessed in a memory; In the present disclosure, data access requests sent by access devices are routed to the data management module for processing. The access devices can be various hardware units on the system-level chip or software on the host. Data access requests include read requests or write requests. Regardless of the type of data access request, in order to access the target data, the data access request must carry the address information of the target data in the memory so that the target data can be finally accessed.

[0044] S202, traversing address information stored in a plurality of local storage space registers to determine a target storage space register hit by the address information carried in the data access request; As described above, several storage space registers in the data management module respectively store the address information of the data blocks in the corresponding storage space in the memory, so in this step, after receiving the data access request, the data management module can traverse each storage space register. For example, as shown in Table 1, it is the address information stored in each storage space register.

[0045]

[0046] Table 1 It is understandable that the contents in Table 1 are only exemplary contents for ease of understanding. In actual scenarios, the address information is the actual address in the memory. In this step, for example, if the address information carried by the data access request received by the data management module is A, it is determined that the address information carried by the data access request hits the storage space register 1, and then the storage space register 1 is determined to be the target storage space register (the storage space register hit by the data access request is referred to as the target storage space register in this disclosure).

[0047] S203: Process the data access request according to the interactive copy information in the target storage space register.

[0048] In this step, after determining the target storage space register, since the storage space register also stores the interactive copy information, the data management module can process the data access request according to the interactive copy information. The access device that sends the data access request does not need to wait for the target data to be copied between the memory and the RAM to be completed. Instead, the data management module will process the data access request. The access device can continue to perform other tasks, thereby improving the transaction processing efficiency of the access device.

[0049] Each step in the data access processing method proposed in the present disclosure is described below.

[0050] Since the storage space in RAM is smaller than the storage space in the internal memory, it is impossible to store all the data in the internal memory in RAM, and usually, only hot data needs to be stored in RAM, so the target data that the access device needs to access may not be stored in RAM but in the internal memory. Furthermore, in the above S202, the data management module traverses the address information stored in several local storage space registers, and when it is determined that the address information carried by the data access request does not hit any storage space register, the target data in the internal memory can be processed according to the access request. That is, if the address information carried by the data access request does not hit any storage space register, it means that the target data corresponding to the data access request is currently in the internal memory, and the target data in the internal memory is directly processed according to the address information.

[0051] As described above, the software will copy the filtered hot data from the memory corresponding to the system-level chip to the RAM on the system-level chip, so that the software or other hardware units on the system-level chip can access the hot data more quickly. When the access frequency of some hot data in the RAM is not high, the hot data in the RAM needs to be re-determined as cold data and copied to the memory. Therefore, after copying the data of a storage space in the RAM back to the memory, the storage resources of the storage space need to be released to store other data blocks.

[0052] In one implementation, the storage resources of the storage space may be released in the following manner.

[0053] After determining that a data block in any storage space is cold data, the data management module deletes the address information in the storage space register corresponding to the storage space.

[0054] It is understandable that after a write request hits the address information in any storage space register, if the data management module processes the write request by only writing the target data in the storage space but not the target data in the memory, then after determining that the data in the storage space has been converted to cold data, it is necessary to copy the data block in the storage space to the memory and delete the address information in the storage space register corresponding to the storage space. If the data management module processes the write request by writing the target data in the storage space and the memory at the same time, then after determining that the data in the storage space has been converted to cold data, it is not necessary to copy the data block in the storage space to the memory, and the address information in the storage space register corresponding to the storage space can be directly deleted.

[0055] Since the address information in the storage space register corresponding to the storage space will be deleted after the data block in any storage space is copied to the memory, after receiving a data access request, the storage space corresponding to the storage space register hit by the address information carried by the data access request must have data stored in it, that is, the stored data must be valid and can be accessed.

[0056] In a specific implementation, 2 bits may be used in the storage space register to identify interactive copy information, such as 00 indicates that the storage space corresponding to the storage space register and the memory are not currently performing interactive copying; 01 indicates that the storage space corresponding to the storage space register and the memory are currently performing interactive copying, and the copy direction is to copy the data in the storage space to the memory; 10 indicates that the storage space corresponding to the storage space register and the memory are currently performing interactive copying, and the copy direction is to copy the data in the memory to the storage space.

[0057] In the above S203, the write request may be processed in the following manner.

[0058] If the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, then write processing is performed on the target data in the target storage space according to the write request.

[0059] If the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, it means that the data in the target storage space in the RAM can be directly accessed, so the target data in the target storage space can be written according to the write request.

[0060] Considering that when writing data according to a write request, it is possible to choose to write only the data in the RAM according to actual needs, or to write the data in the RAM and the data in the internal memory at the same time, the data management module may adopt one of the methods for writing by default.

[0061] In addition, in one embodiment, the data management module further includes a write mode configuration register, which is used to store a processing mode for a write request. For example, the write mode register can use 1 bit to represent the write mode, 0 means writing only the data in the RAM, and 1 means writing the data in both the RAM and the memory. The software can set the write mode configuration register according to actual needs.

[0062] In this embodiment, for the processing of the write request, the data management module can also query the processing mode for the write request in the write mode configuration register. If the processing mode for the write request is to write the data in the storage space and the memory at the same time, then while writing the target data in the target storage space according to the write request, the target data in the memory must also be written according to the write request. If the processing mode for the write request is to only write the data in the storage space, then only the target data in the target storage space is written according to the write request.

[0063] The above describes the processing performed on a write request when the interactive copy information represents that the target storage space corresponding to the target storage space register and the memory are not currently performing interactive copying. The following describes how to process a write request when the interactive copy information represents that the target storage space corresponding to the target storage space register and the memory are currently performing interactive copying.

[0064] The data management module further includes a write request cache area. When the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently undergoing interactive copying, in order to be able to process the write request after the copying is completed, the write request is cached in the write request cache area. If the copy direction is to copy the data in the target storage space to the memory, then after the interactive copy, the target data in the memory is written according to the access request; If the copy direction is to copy the data in the memory to the target storage space, after the interactive copy, the write request is processed according to the write request processing mode in the write mode configuration register.

[0065] That is, if the copy direction is to copy the data in the target storage space to the memory, then after the interactive copy, since the data is currently only stored in the memory, the data in the cache space in the RAM is no longer valid. Therefore, the target data in the memory can be written directly according to the access request.

[0066] If the copy direction is to copy the data in the memory to the target storage space, then after the interactive copy is completed, the data exists in both the RAM storage space and the memory, so the write request needs to be processed according to the write request processing method in the write mode configuration register. Specifically, if the processing method for the write request is to write the data in the storage space and the memory at the same time, then the target data in the target storage space is written according to the write request, and the target data in the memory is written according to the write request; If the processing method for the write request is to perform write processing only on the data in the storage space, then the write processing is performed on the target data in the target storage space according to the write request.

[0067] The above describes how to handle write requests. The following describes how to handle read requests.

[0068] If the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, the target data in the target storage space is read according to the read request.

[0069] That is, if there is data in the storage space in the RAM and no interactive copy is currently being performed, the target data in the target storage space can be directly read according to the read request.

[0070] In the case where the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently undergoing interactive copying, it is determined whether the target data corresponding to the read request has completed the interactive copy according to the copy progress information; if not, the target data is read from the source location of the interactive copy; if completed, the target data is read from the destination location of the interactive copy; wherein the source location includes the target storage space, the memory, and the write request cache area; and the destination location includes the target storage space and the memory.

[0071] Since the size of the target data accessed by an access request is usually smaller than the amount of data in a data block in a storage space, for example, if the size of the storage space is 4KB and the size of the data accessed by an access request is 256 bits, 128 access data can be stored in the storage space.

[0072] For example, the data in the storage space and the memory are copied, and each copy is 256 bits. If the data in the target storage space is currently copied to the memory, and the copy information indicates that the 100th data is currently copied, if the address information carried by the read request is the 1st data in the target storage space, it means that the data has been copied to the memory, and the target data is directly read from the destination location of the interactive copy, that is, the memory. On the contrary, if the address information carried by the read request is the 101st data in the target storage space, it means that the data is still in the source location, that is, the target storage space, and the target data is directly read from the target storage space. As described above, during the data interactive copy process, the data management module will also cache the write request to the local write request cache area. If the address information of the target data carried by the received read request is consistent with the address information of the target data in the write cache area, it means that the target data targeted by the read request is currently in the write request cache area, that is, the source location at this time is the write request cache area, so the target data can be directly read from the write request cache area.

[0073] In addition, if the data in the memory is currently copied to the target storage space, for example, the storage space and the data in the memory are copied, each copy is 256 bits, and the copy information indicates that the 100th data is currently copied, if the address information carried by the read request is the 1st data in the target storage space, it means that the data has been copied to the target storage space, and the target data is directly read from the destination location of the interactive copy, that is, the target storage space. On the contrary, if the address information carried by the read request is the 101st data in the target storage space, it means that the data is still in the source location, that is, the memory, and the target data is directly read from the memory. As described above, during the data interactive copy process, the data management module will also cache the write request to the local write request cache area. If the address information of the target data carried by the received read request is consistent with the address information of the target data in the write cache area, it means that the target data targeted by the read request is currently in the write request cache area, that is, the source location at this time is the write request cache area, so the target data can be directly read from the write request cache area.

[0074] In another implementation, the storage resources of the storage space may also be released in the following manner.

[0075] Specifically, any storage space register is also used to store data validity information, which is used to indicate whether the data block in the corresponding storage space is valid; after the data block in any storage space is copied to the memory, or when any storage space is copied interactively with the memory, the valid information in the storage space register corresponding to the storage space is marked as invalid; after the data block in the memory is copied to any storage space, the valid information in the storage space register corresponding to the storage space is marked as valid.

[0076] In this embodiment, data validity information is stored in the storage space register, for example, 1 bit can be used to store data validity information, 0 indicates that the data block in the storage space corresponding to the storage space register is invalid, and 1 indicates that the data block in the storage space corresponding to the storage space register is valid. In this embodiment, after copying the data block in any storage space to the memory, it is not necessary to delete the address information in the storage space register corresponding to the storage space, but to adjust the data validity information in the storage space register. Compared with the previous embodiment (the method of deleting address information), the processing of read and write requests in this embodiment is similar, and the only difference is that after traversing the address information stored in several local storage space registers and determining the target storage space register hit by the address information carried by the data access request, if the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, and the valid information in the target storage space register indicates that the data block in the target storage space is invalid, the target data in the memory is processed according to the access request. In this embodiment, since data validity information is used to identify whether the data in the storage space is valid, rather than deleting the address information, after traversing to the target storage space register, it is still not certain whether the data in the corresponding target storage space can be used. Therefore, it is necessary to check the valid information in the target storage space register. If it is invalid, it means that the data has been copied back to the memory, so the data in the memory needs to be processed. If it is valid, it means that the data in the storage space can be used directly, that is, if the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, and the valid information in the target storage space register indicates that the data block in the target storage space is valid, then the write request is processed according to the write processing method.

[0077] When the target storage space is interactively copied with the memory, the valid information in the storage space register is marked as invalid, and the processing method for the access request is the same as that in the previous implementation method (the method of deleting the address information), which will not be repeated here.

[0078] The above describes how the data management module processes access requests, such as Figure 4 As shown, the present disclosure also proposes a method for the data management module to process data interactive copying. The data management module also includes a copy command register; the copy command register is used to store: a storage space register to be copied and a copy direction. For example, Figure 5As shown, the copy command register is 32 bits: bit [1:0] indicates the copy direction, 0: invalid, 1: RAM to memory, 2: memory to RAM; bit [7:2] is reserved; bit [23:8] is the index of the storage space register, indicating which storage space stores information that needs to be copied; bit [31:24] is reserved. The method includes: S401, querying the copy command register to determine the storage space register to be copied; The copy command register can be filled in by software. In the GPU SOC scenario, it can be filled in by the GPU SOC driver software. For example, it can determine the hot and cold data based on the commonly used hot and cold data algorithm, and then generate the interactive copy instructions of the hot and cold data, and fill the generated instructions into the copy command register. At the same time, the software will also fill in the storage space register for the copy to be executed, such as filling in the address information, interactive copy information and valid information. The address information is the address information of the data block in the storage space to be copied in the memory, and the interactive copy information is used to characterize the interactive copy currently being performed and the direction of the interactive copy.

[0079] S402, for the storage space register to be copied, obtain address information stored in the storage space register, and copy data to the storage space corresponding to the storage space register to be copied according to the copy direction and the address information; wherein valid information in the storage space register to be copied is marked as invalid; The data management module can obtain the storage space to be copied and the copy direction by querying the copy command register, and then copy the data for the storage space to be copied. During the copy process, the valid information of the storage space register will be configured as invalid by the software or the data management module.

[0080] S403, after the data block in the memory is copied to the storage space, the valid information in the storage space register to be copied is marked as valid; For the data copy direction from memory to RAM, after the copy is completed, the valid information in the storage space register to be copied needs to be marked as valid, so that the read and write requests can be processed directly according to the data in the register corresponding to the storage space register to be copied. Please refer to the above. The valid information in the storage space register to be copied is marked as valid, which can be executed by the data management module, or the data management module can feedback a signal of copy completion to the software, and the software can execute it.

[0081] S404, after the data block in the storage space is copied to the memory, the valid information in the storage space register to be copied is marked as invalid.

[0082] For the data copy direction from RAM to internal memory, after the copy is completed, the valid information in the storage space register to be copied needs to be marked as invalid to avoid subsequent processing of read and write requests based on the data in the register corresponding to the storage space register to be copied. Please refer to the above. The valid information in the storage space register to be copied is marked as invalid, which can be executed by the data management module, or the data management module can feedback a signal of copy completion to the software, and the software can execute it.

[0083] In addition, in order to facilitate the processing of the read request according to the copy progress information, when the storage space corresponding to the storage space register to be copied is copied according to the copy direction and address information, the current copy progress information is determined according to the copy speed and copy time, and the copy progress information is stored, so that when the read request is received, the read request can be processed according to the copy progress information. For example, the amount of data currently copied can be recorded according to the time when the copy has started and the copy speed, and the amount of data can be stored as the copy progress information. Subsequently, it can be determined whether the target data of the read request has been copied according to the starting address of the copy and the copy progress information.

[0084] like Figure 6 As shown, corresponding to the above data processing method, the present disclosure further proposes a data management module, which is deployed on a system-level chip, and a RAM is also deployed on the system-level chip, and the RAM includes a plurality of storage spaces. The data management module includes a plurality of storage space registers, wherein any storage space register corresponds to any storage space in the RAM, and the storage space register is used to store: address information of a data block in the corresponding storage space in the memory and interactive copy information between the storage space and the memory; the data management module includes: A request receiving unit 610 is used to receive a data access request, wherein the data access request carries address information of the target data to be accessed in the memory; An address traversal unit 620, configured to traverse address information stored in a plurality of local storage space registers, and determine a target storage space register hit by the address information carried by the data access request; The request processing unit 630 is used to process the data access request according to the interactive copy information in the target storage space register.

[0085] In one embodiment, the request processing unit 630 is also used to traverse the address information stored in several local storage space registers, and when it is determined that the address information carried by the data access request does not hit any target storage space register, process the target data in the memory according to the data access request.

[0086] In one implementation, the data access request is a write request; The request processing unit 630 is specifically configured to perform write processing on the target data in the target storage space according to the write request if the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied.

[0087] In one embodiment, the data management module further includes a write mode configuration register, and the write mode configuration register is used to store a processing mode for a write request; The request processing unit 630 is also used to query the processing method for the write request in the write mode configuration register. If the processing method for the write request is to simultaneously write the data in the storage space and the memory, then while writing the target data in the target storage space according to the write request, writing the target data in the memory according to the write request is performed.

[0088] In one embodiment, the data management module further includes a write request cache area; The request processing unit 630 is further configured to cache the write request in the write request cache area when the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently performing interactive copying; If the copy direction is to copy the data in the target storage space to the memory, then after the interactive copy, the target data in the memory is written according to the data access request; If the copy direction is to copy the data in the memory to the target storage space, then after the interactive copy, the write request is processed according to the write request processing mode in the write mode configuration register.

[0089] In one embodiment, the request processing unit 630 is specifically configured to, if the processing mode for the write request is to simultaneously write the data in the storage space and the memory, write the target data in the target storage space according to the write request, and simultaneously write the target data in the memory according to the write request; If the processing method for the write request is to perform write processing only on the data in the storage space, then write processing is performed on the target data in the target storage space according to the write request.

[0090] In one implementation, the data access request is a read request; The request processing unit 630 is specifically configured to read the target data in the target storage space according to the read request if the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied.

[0091] In one embodiment, the request processing unit 630 is also used to determine whether the target data corresponding to the read request has completed the interactive copy according to the copy progress information when the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently undergoing interactive copying. If not, the target data is read from the source location of the interactive copy; if completed, the target data is read from the destination location of the interactive copy; wherein the source location includes the target storage space, the memory, and the write request cache area; and the destination location includes the target storage space and the memory.

[0092] In one implementation, the request processing unit 630 is further configured to delete address information in a storage space register corresponding to any storage space after copying a data block in the storage space to the memory.

[0093] In one embodiment, any storage space register is further used to store data validity information, and the validity information is used to indicate whether the data block in the corresponding storage space is valid; after the data block in any storage space is copied to the memory, or when any storage space and the memory are interactively copied, the valid information in the storage space register corresponding to the storage space is marked as invalid; after the data block in the memory is copied to any storage space, the valid information in the storage space register corresponding to the storage space is marked as valid; The request processing unit 630 is also used to process the target data in the memory according to the data access request if the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, and the valid information in the target storage space register indicates that the data block in the target storage space is invalid.

[0094] In one embodiment, the data management module further includes a copy command register; the copy command register is used to store: a storage space register to be copied and a copy direction; the data management module further includes a copy processing unit 640; The copy processing unit 640 is used to query the copy command register to determine the storage space register to be copied; For the storage space register to be copied, acquiring address information stored in the storage space register, copying data to the storage space corresponding to the storage space register to be copied according to the copy direction and the address information, and marking valid information in the storage space register to be copied as invalid; After the data block in the memory is copied to the storage space, the valid information in the storage space register to be copied is marked as valid; After the data block in the storage space is copied to the memory, the valid information in the storage space register to be copied is marked as invalid.

[0095] In one embodiment, the copy processing unit 640 is also used to determine the current copy progress information according to the copy speed and copy time when copying data to the storage space corresponding to the storage space register to be copied according to the copy direction and address information, and store the copy progress information.

[0096] Based on the same inventive concept, the present disclosure also proposes a graphics processing system, such as Figure 7 As shown, it at least includes: The GPU core is used to process commands, such as drawing commands, and execute the image rendering pipeline according to the drawing commands. The GPU core mainly includes a computing unit, which is used to execute shader compiled instructions. It is a programmable module composed of a large number of ALUs; Cache (memory), which is used to cache GPU core data to reduce memory access; controller (not shown in the figure). In addition, the GPU core also has a variety of functional modules, such as rasterization (a fixed stage of the 3D rendering pipeline), Tilling (slicing a frame in the TBR and TBDR GPU architecture), cropping (a fixed stage of the 3D rendering pipeline, cropping out the primitives outside the observation range or not displayed on the back), post-processing (scaling, cropping, rotating, etc. of the drawn image), etc.

[0097] General DMA is used to perform data movement between host memory and GPU graphics card memory. For example, for 3D drawing, general DMA moves vertex data from host memory to GPU graphics card memory. On-chip network, used for data exchange between masters and slaves on the SOC; The application processor is used to schedule tasks of various modules on the SOC. For example, after the GPU renders a frame, it notifies the application processor, and the application processor then starts the display controller to display the image drawn by the GPU on the screen. PCIe controller is used to communicate with the host, implement PCIe protocol, and connect GPU graphics card to the host through PCIe interface. Graphics API and graphics card driver are running on the host; A memory controller, used to connect to a memory device and to store data on the SOC; the data management module proposed in the present disclosure can be deployed in the memory controller to execute the above-mentioned access data processing method; Display controller, used to control the output of the frame buffer in the memory to the display via the display interface (HDMI, DP, etc.); Video decoder, used to decode the encoded video on the host hard disk into a displayable picture.

[0098] The video encoder is used to encode the original video code stream on the host hard disk into a specified format and return it to the host.

[0099] Based on the same inventive concept, the embodiment of the present disclosure also provides an electronic component, which includes the graphics processing system described in the above embodiment. In some usage scenarios, the product form of the electronic device is embodied as a graphics card; in other usage scenarios, the product form of the electronic device is embodied as a CPU motherboard.

[0100] Based on the same inventive concept, the disclosed embodiment also provides an electronic device, which includes the above-mentioned electronic components. In some usage scenarios, the product form of the electronic device is a portable electronic device, such as a smart phone, a tablet computer, a VR device, etc.; in some usage scenarios, the product form of the electronic device is a personal computer, a game console, etc.

[0101] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present disclosure.

[0102] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.

Claims

1. A data access processing method is applied to a data management module, wherein the data management module is deployed on a system-level chip, and a RAM is also deployed on the system-level chip, wherein the RAM includes a plurality of storage spaces, and the data management module includes a plurality of storage space registers, wherein: Any storage space register corresponds to any storage space in the RAM, and the storage space register is used to store: address information of a data block in the corresponding storage space in the memory and current interactive copy information between the storage space and the memory; the method includes: Receive a data access request, wherein the data access request carries address information of the target data to be accessed in the memory; Traversing the address information stored in a plurality of local storage space registers, and determining a target storage space register hit by the address information carried by the data access request; The data access request is processed according to the interactive copy information in the target storage space register.

2. The method according to claim 1, further comprising: When traversing the address information stored in several local storage space registers and determining that the address information carried by the data access request does not hit any storage space register, the target data in the memory is processed according to the data access request.

3. The method according to claim 1, wherein the data access request is a write request, and the processing of the data access request according to the interactive copy information in the target storage space register comprises: If the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, write processing is performed on the target data in the target storage space according to the write request.

4. The method according to claim 3, wherein the data management module further comprises a write mode configuration register, wherein the write mode configuration register is used to store a processing mode for a write request; the method further comprises: Query the processing method for the write request in the write mode configuration register. If the processing method for the write request is to write the data in the storage space and the memory at the same time, then while writing the target data in the target storage space according to the write request, write the target data in the memory according to the write request.

5. The method according to claim 4, wherein the data management module further comprises a write request cache area, and the method further comprises: When the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently performing interactive copying, caching the write request in the write request cache area; If the copy direction is to copy the data in the target storage space to the memory, then after the interactive copy, the target data in the memory is written according to the data access request; If the copy direction is to copy the data in the memory to the target storage space, then after the interactive copy, the write request is processed according to the write request processing mode in the write mode configuration register.

6. The method according to claim 5, wherein processing the write request according to the write request processing mode in the write mode configuration register comprises: If the processing method for the write request is to write the data in the storage space and the memory at the same time, write the target data in the target storage space according to the write request, and write the target data in the memory according to the write request; If the processing method for the write request is to perform write processing only on the data in the storage space, then write processing is performed on the target data in the target storage space according to the write request.

7. The method according to claim 1, wherein the data access request is a read request, and the processing of the data access request according to the interactive copy information in the target storage space register comprises: If the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, the target data in the target storage space is read according to the read request.

8. The method according to claim 7, further comprising: In the case where the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently undergoing interactive copying, determining whether the target data corresponding to the read request has completed interactive copying according to the copy progress information, and if not, performing read processing on the target data from the source location of the interactive copy; If it is completed, the target data is read from the target location of the interactive copy; wherein the source location includes the target storage space, the memory and the write request cache area; The destination location includes a target storage space and a memory.

9. The method according to any one of claims 1 to 8, After the data block in any storage space is copied to the memory, the address information in the storage space register corresponding to the storage space is deleted.

10. According to the method according to any one of claims 1 to 8, any storage space register is further used to store data validity information, and the validity information is used to indicate whether the data block in the corresponding storage space is valid; after the data block in any storage space is copied to the memory, or when any storage space is interactively copied with the memory, the validity information in the storage space register corresponding to the storage space is marked as invalid; After the data block in the memory is copied to any storage space, the valid information in the storage space register corresponding to the storage space is marked as valid; The method further comprises: If the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, and the valid information in the target storage space register indicates that the data block in the target storage space is invalid, the target data in the memory is processed according to the data access request.

11. The method according to claim 10, wherein the data management module further comprises a copy command register; the copy command register is used to store: a storage space register to be copied and a copy direction; the method further comprises: Querying the copy command register to determine the storage space register to be copied; For the storage space register to be copied, acquiring address information stored in the storage space register, copying data to the storage space corresponding to the storage space register to be copied according to the copy direction and the address information, and marking valid information in the storage space register to be copied as invalid; After the data block in the memory is copied to the storage space, the valid information in the storage space register to be copied is marked as valid; After the data block in the storage space is copied to the memory, the valid information in the storage space register to be copied is marked as invalid.

12. The method according to claim 11, further comprising: When data is copied to the storage space corresponding to the storage space register to be copied according to the copy direction and address information, current copy progress information is determined according to the copy speed and copy time, and the copy progress information is stored.

13. A data management module is deployed on a system-level chip, and a RAM is also deployed on the system-level chip. The RAM includes a plurality of storage spaces, and the data management module includes a plurality of storage space registers, wherein: Any storage space register corresponds to any storage space in the RAM, and the storage space register is used to store: address information of a data block in the corresponding storage space in the memory and current interactive copy information between the storage space and the memory; The data management module comprises: A request receiving unit, used to receive a data access request, wherein the data access request carries address information of the accessed target data in the memory; An address traversal unit, used to traverse the address information stored in a plurality of local storage space registers, and determine a target storage space register hit by the address information carried by the data access request; The request processing unit is used to process the data access request according to the interactive copy information in the target storage space register.

14. The data management module according to claim 13, The request processing unit is also used to traverse the address information stored in several local storage space registers, and when it is determined that the address information carried by the data access request does not hit any storage space register, process the target data in the memory according to the data access request.

15. The data management module according to claim 13, wherein the data access request is a write request; The request processing unit is specifically configured to perform write processing on the target data in the target storage space according to the write request if the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied.

16. The data management module according to claim 15, further comprising a write mode configuration register, wherein the write mode configuration register is used to store a processing mode for a write request; The request processing unit is also used to query the processing method for the write request in the write mode configuration register. If the processing method for the write request is to simultaneously write the data in the storage space and the memory, then while writing the target data in the target storage space according to the write request, writing the target data in the memory according to the write request.

17. The data management module according to claim 16, further comprising a write request cache area; The request processing unit is further configured to cache the write request in the write request cache area when the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently performing interactive copying; If the copy direction is to copy the data in the target storage space to the memory, then after the interactive copy, the target data in the memory is written according to the data access request; If the copy direction is to copy the data in the memory to the target storage space, then after the interactive copy, the write request is processed according to the write request processing mode in the write mode configuration register.

18. The data management module according to claim 17, The request processing unit is specifically configured to, if the processing mode for the write request is to simultaneously write the data in the storage space and the memory, write the target data in the target storage space according to the write request, and simultaneously write the target data in the memory according to the write request; If the processing method for the write request is to perform write processing only on the data in the storage space, then write processing is performed on the target data in the target storage space according to the write request.

19. The data management module according to claim 13, wherein the data access request is a read request; The request processing unit is specifically configured to perform a read process on the target data in the target storage space according to the read request if the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied.

20. The data management module according to claim 19, The request processing unit is further configured to determine whether the target data corresponding to the read request has completed interactive copying according to the copy progress information when the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are currently undergoing interactive copying, and if not, perform read processing on the target data from a source location of the interactive copy; If it is completed, the target data is read from the destination location of the interactive copy; wherein, The source location includes the target storage space, memory, and write request cache area; The destination location includes a target storage space and a memory.

21. The data management module according to any one of claims 13 to 19, The request processing unit is further configured to delete the address information in the storage space register corresponding to any storage space after the data block in the storage space is copied to the memory.

22. According to the data management module of any one of claims 13 to 19, any storage space register is further used to store data validity information, and the validity information is used to indicate whether the data block in the corresponding storage space is valid; after the data block in any storage space is copied to the memory, or in the case where any storage space and the memory are interactively copied, the valid information in the storage space register corresponding to the storage space is marked as invalid; after the data block in the memory is copied to any storage space, the valid information in the storage space register corresponding to the storage space is marked as valid; The request processing unit is also used to process the target data in the memory according to the data access request if the interactive copy information indicates that the target storage space corresponding to the target storage space register and the memory are not currently interactively copied, and the valid information in the target storage space register indicates that the data block in the target storage space is invalid.

23. The data management module according to claim 22, further comprising a copy command register; the copy command register is used to store: a storage space register to be copied and a copy direction; the data management module further comprises a copy processing unit; The copy processing unit is used to query the copy command register to determine the storage space register to be copied; For the storage space register to be copied, acquiring address information stored in the storage space register, copying data to the storage space corresponding to the storage space register to be copied according to the copy direction and the address information, and marking valid information in the storage space register to be copied as invalid; After the data block in the memory is copied to the storage space, the valid information in the storage space register to be copied is marked as valid; After the data block in the storage space is copied to the memory, the valid information in the storage space register to be copied is marked as invalid.

24. The data management module according to claim 13, further comprising a copy processing unit; The copy processing unit is used to determine the current copy progress information according to the copy speed and copy time when copying data to the storage space corresponding to the storage space register to be copied according to the copy direction and address information, and store the copy progress information.

25. A graphics processing system, comprising the data management module according to any one of claims 13-24.

26. An electronic assembly comprising the graphics processing system of claim 25.

27. An electronic device comprising the electronic component according to claim 26.

Citation Information

Cited By

  • Table look-up system, equipment and cluster

    CN118869590A