CN116912079B - Data processing system, electronic component, electronic device and data processing method - Google Patents

Data processing system, electronic component, electronic device and data processing method Download PDF

Info

Publication number
CN116912079B
CN116912079B CN202311167411.5A CN202311167411A CN116912079B CN 116912079 B CN116912079 B CN 116912079B CN 202311167411 A CN202311167411 A CN 202311167411A CN 116912079 B CN116912079 B CN 116912079B
Authority
CN
China
Prior art keywords
write
response
request
write request
written
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.)
Active
Application number
CN202311167411.5A
Other languages
Chinese (zh)
Other versions
CN116912079A (en
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.)
Beijing Xiangdixian Computing Technology Co Ltd
Original Assignee
Beijing Xiangdixian Computing 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 Beijing Xiangdixian Computing Technology Co Ltd filed Critical Beijing Xiangdixian Computing Technology Co Ltd
Priority to CN202311167411.5A priority Critical patent/CN116912079B/en
Publication of CN116912079A publication Critical patent/CN116912079A/en
Application granted granted Critical
Publication of CN116912079B publication Critical patent/CN116912079B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/423Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to the technical field of chips, and provides a data processing system, an electronic component, electronic equipment and a data processing method. Wherein the data processing system comprises a response processing module configured to: receiving a write response sent from the device; discarding the write response upon determining that the write response was issued by the slave device for the third write request; the third write request is a write request sent by the compression module after the first write request sent by the main equipment is processed; and generating a corresponding write response for the first write request, and returning the generated write response to the master device. In the disclosure, the response processing module generates a corresponding write response for the first write request by intercepting the write response corresponding to the third write request, and returns the generated write response to the master device, so that the problem that the number of the write responses returned by the slave device is not matched with the number of the write responses required to be received by the master device is solved.

Description

Data processing system, electronic component, electronic device and data processing method
Technical Field
The disclosure relates to the field of chip technologies, and in particular, to a data processing system, an electronic component, an electronic device, and a data processing method.
Background
In the related art, a GPU (graphics processor, graphics processing unit) or a VDEC (video decoder) is used as a master device of a bus protocol, and a GDDR (double data rate for graphics, graphics Double Data Rate) is used as a slave device of the bus protocol, and the GPU/VDEC needs to send a write request to the GDDR, so that data obtained by the GPU/VDEC processing is written into the GDDR. The bus protocol may be, for example, AXI (Advanced eXtensible Interface) or ACE (AXI Coherency Extensions).
In order to reduce occupation of system broadband, a lossless compression module is arranged outside the GPU/VDEC in the related art, each image data output by the GPU/VDEC is subjected to lossless compression through the lossless compression module, and compressed data and header files corresponding to the compressed data are output. After the compressed data and the header file thereof are written into the GDDR, the GDDR returns write responses corresponding to the compressed data and the header file respectively, which causes a problem that the number of write responses returned by the GDDR is not matched with the number of write responses required to be received by the GPU/VDEC.
Disclosure of Invention
The invention aims to provide a data processing system, an electronic component, electronic equipment and a data processing method, and aims to solve the problem that the number of write responses returned by slave equipment is not matched with the number of write responses required to be received by master equipment.
According to one aspect of the present disclosure, there is provided a data processing system, the system comprising a response processing module configured to:
receiving a write response sent from the device;
discarding the write response upon determining that the write response was issued by the slave device for a third write request; the third write request is a write request sent by the compression module after the first write request sent by the main equipment is processed;
generating a corresponding write response for the first write request, and returning the generated write response to the master device.
In a possible implementation of the disclosure, the response processing module is further configured to: returning the write response to the master device when the write response is determined to be sent by the slave device for a second write request; wherein the second write request is a write request issued by the master device that does not need to go through the compression module.
In a possible implementation manner of the present disclosure, a request ID corresponding to the second write request is stored in the response processing module;
the response processing module is further configured to: judging whether a response ID carried by the write response is matched with the request ID, and determining whether the write response is sent by the slave device for a third write request or whether the write response is sent by the slave device for a second write request according to the matching condition of the response ID and the request ID.
In a possible implementation manner of the present disclosure, the response processing module includes a first-in first-out queue;
the response processing module is further configured to: receiving the first write requests sent by the master device, and storing the received request ID of each first write request into the first-in first-out queue;
the response processing module, when generating a corresponding write response for the first write request, is specifically configured to: and sequentially taking out the request ID of each first write request from the first-in first-out queue, and generating a corresponding write response according to each taken-out request ID.
In one possible implementation of the disclosure, the first write request is generated by the master device when processing a current task, and the first write request and the third write request both belong to the current task; the response processing module, when generating a corresponding write response for the first write request, is specifically configured to:
judging whether the data to be written corresponding to each third write request in the current task are written into the slave device or not;
if yes, generating a corresponding write response for the last first write request in the current task;
if not, a corresponding write response is not generated for the last first write request temporarily.
In one possible implementation of the present disclosure, the total number of the first write requests included in the current task is stored in the response processing module;
the response processing module is further configured to: and judging whether the accumulated number of the received first write requests is equal to the total number, if so, determining the last received first write request as the last first write request in the current task.
In a possible implementation of the disclosure, the response processing module is further configured to: when the last first write request is received, a clear request is sent to the compression module, so that the compression module sends out a last third write request;
the response processing module is specifically configured to, when judging whether each third write request in the current task corresponds to data to be written in the slave device, whether the data to be written in the third write request is written in the slave device: after receiving the emptying request response returned by the compression module, judging whether the data to be written corresponding to each third writing request sent by the compression module are written into the slave device.
In a possible implementation of the disclosure, the response processing module is further configured to: counting the third write requests sent by the compression module, and subtracting 1 from the count value when a write response corresponding to one third write request is received;
The response processing module is specifically configured to, when determining whether each of the third write requests sent by the compression module has been written to the slave device, whether the data to be written corresponding to the third write requests is written to the slave device: and monitoring whether the count value is equal to 0, and when the count value is equal to 0, determining that data to be written, which corresponds to each third write request sent by the compression module, is written into the slave device.
In a possible implementation of the present disclosure, the system further includes the master device, the master device configured to:
issuing the first write request and the second write request, wherein the request ID carried by the first write request is different from the request ID carried by the second write request;
and receiving a write response sent by the response processing module.
In a possible implementation of the present disclosure, the system further includes the compression module configured to:
receiving the first write request sent by the main equipment, and compressing data to be written corresponding to the first write request to obtain compressed data and a header file corresponding to the data to be written;
a third write request is generated for the compressed data and header file.
In a possible implementation manner of the present disclosure, the compression module, when generating the third write request for the header file, is specifically configured to:
When the number of the head files cached by the compression module reaches the preset threshold value, generating a third write request for all the cached head files;
and when the number of the head files cached by the compression module does not reach the preset threshold value, but the compression module receives the emptying request, generating a third writing request for all the cached head files.
In a possible implementation of the present disclosure, the system further includes the slave device configured to:
receiving a second write request sent by the main equipment, executing write processing on data to be written corresponding to the second write request, and sending a write response corresponding to the second write request;
and receiving a third write request sent by the compression module, executing write processing on data to be written corresponding to the third write request, and sending out a write response corresponding to the third write request.
In one possible implementation of the present disclosure, the master device is a GPU or VDEC and the slave device is a GDDR.
According to another aspect of the present disclosure, there is also provided an electronic assembly comprising a data processing system as described in any one of the embodiments above. In some use scenarios, the product form of the electronic assembly is embodied as a graphics card; in other use cases, the product form of the electronic assembly is embodied as a CPU motherboard.
According to another aspect of the present disclosure, there is also provided an electronic device including the above-described electronic component. In some use 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 use cases, the electronic device is in the form of a personal computer, a game console, or the like.
According to another aspect of the present disclosure, there is also provided a data processing method, the method including:
receiving a write response sent from the device;
discarding the write response upon determining that the write response was issued by the slave device for a third write request; the third write request is a write request sent by the compression module after the first write request sent by the main equipment is processed;
generating a corresponding write response for the first write request, and returning the generated write response to the master device.
In a possible implementation manner of the present disclosure, the method further includes:
returning the write response to the master device when the write response is determined to be sent by the slave device for a second write request; wherein the second write request is a write request issued by the master device that does not need to go through the compression module.
In a possible implementation manner of the present disclosure, the method further includes:
the request ID corresponding to the second writing request is stored in advance;
judging whether a response ID carried by the write response is matched with the request ID, and determining whether the write response is sent by the slave device for a third write request or whether the write response is sent by the slave device for a second write request according to the matching condition of the response ID and the request ID.
In a possible implementation manner of the present disclosure, the method further includes: receiving the first write requests sent by the master device, and storing the received request ID of each first write request into a first-in first-out queue;
the generating a corresponding write response for the first write request includes: and sequentially taking out the request ID of each first write request from the first-in first-out queue, and generating a corresponding write response according to each taken-out request ID.
In one possible implementation of the disclosure, the first write request is generated by the master device when processing a current task, and the first write request and the third write request both belong to the current task; the generating a corresponding write response for the first write request includes:
Judging whether the data to be written corresponding to each third write request in the current task are written into the slave device or not;
if yes, generating a corresponding write response for the last first write request in the current task;
if not, a corresponding write response is not generated for the last first write request temporarily.
In a possible implementation manner of the present disclosure, the method further includes:
pre-storing the total number of first write requests included in the current task;
and judging whether the accumulated number of the received first write requests is equal to the total number, if so, determining the last received first write request as the last first write request in the current task.
In a possible implementation manner of the present disclosure, the method further includes: when the last first write request is received, a clear request is sent to the compression module, so that the compression module sends out a last third write request;
the judging whether the data to be written corresponding to each third write request in the current task has been written into the slave device comprises the following steps: after receiving the emptying request response returned by the compression module, judging whether the data to be written corresponding to each third writing request sent by the compression module are written into the slave device.
In a possible implementation manner of the present disclosure, the method further includes: counting the third write requests sent by the compression module, and subtracting 1 from the count value when a write response corresponding to one third write request is received;
the determining whether the data to be written corresponding to each third write request sent by the compression module has been written into the slave device includes: and monitoring whether the count value is equal to 0, and when the count value is equal to 0, determining that data to be written, which corresponds to each third write request sent by the compression module, is written into the slave device.
Drawings
FIG. 1 is a schematic diagram of a data processing system provided in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a data processing system provided in an embodiment of the present disclosure;
fig. 3 is a flow chart of a data processing method according to an embodiment of the disclosure.
Detailed Description
Before describing embodiments of the present disclosure, it should be noted that:
some embodiments of the disclosure are described as process flows, in which the various operational steps of the flows may be numbered sequentially, but may be performed in parallel, concurrently, or simultaneously.
The terms "first," "second," and the like may be used in embodiments of the present disclosure to describe various features, but these features should not be limited by these terms. These terms are only used to distinguish one feature from another.
The term "and/or," "and/or" may be used in embodiments of the present disclosure to include any and all combinations of one or more of the associated features listed.
It will be understood that when two elements are described in a connected or communicating relationship, unless a direct connection or direct communication between the two elements is explicitly stated, connection or communication between the two elements may be understood as direct connection or communication, as well as indirect connection or communication via intermediate elements.
In order to make the technical solutions and advantages of the embodiments of the present disclosure more apparent, the following detailed description of exemplary embodiments of the present disclosure is provided in conjunction with the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments of which are exhaustive. It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other.
In the related art, a GPU or a VDEC is used as a master device of a bus protocol, a GDDR is used as a slave device of the bus protocol, and the GPU/VDEC needs to send a write request to the GDDR, so that data obtained by processing the GPU/VDEC is written into the GDDR. The bus protocol may be, for example, AXI (Advanced eXtensible Interface) or ACE (AXI Coherency Extensions). In order to reduce occupation of system broadband, a lossless compression module is arranged outside the GPU/VDEC in the related art, each image data output by the GPU/VDEC is subjected to lossless compression through the lossless compression module, and compressed data and header files corresponding to the compressed data are output.
Currently, the GPU/VDEC and the lossless compression module usually adopt a set of IP (Intellectual Property) cores, so that the matching between the GPU/VDEC and the lossless compression module does not have a problem. But if the GPU/VDEC and lossless compression module are from different IP core providers, respectively, the following problems may occur: the lossless compression module respectively generates corresponding write requests aiming at the compressed data and the header files thereof, and after the compressed data and the header files thereof are written into the GDDR, the GDDR returns write responses corresponding to the compressed data and the header files respectively, so that the problem that the number of write responses returned by the GDDR is not matched with the number of write responses required to be received by the GPU/VDEC is caused.
In order to solve the problem that the number of write responses returned by the slave device is not matched with the number of write responses required to be received by the master device, the following embodiments provide one or more data processing systems, electronic components, electronic devices and data processing methods. For ease of explanation, the AXI bus protocol will be described below as an example. However, it should be noted that the bus protocol in the present disclosure is not limited to the AXI bus protocol.
With reference to FIG. 1, FIG. 1 is a schematic diagram of a data processing system according to one embodiment of the present disclosure. As shown in fig. 1, the data processing system includes a response processing module.
The response processing module is configured to: a write response issued from the device is received.
The response processing module is further configured to: discarding the write response upon determining that the write response was issued by the slave device for the third write request; the third write request is a write request sent by the compression module after the first write request sent by the main device is processed.
In the present disclosure, the first write request is a write request sent by the master device that needs to go through the compression module. The "write request required to go through the compression module" specifically means: a write request is received by the compression module. After the compression module compresses the data to be written corresponding to the write request, the disclosure is not limited as to whether the request ID of the write request sent by the compressed data and the header file is the same as the request ID of the write request. In other words, whether the request ID of the write request received by the compression module is the same as the request ID of the write request issued by the compression module is not limited in this disclosure.
In some embodiments, the response processing module may determine, according to a response ID carried by the write response, whether the write response is issued by the slave device for the third write request. Specifically, after receiving the write response, the response processing module reads the response ID carried by the write response, and if the response ID meets (or does not meet) a preset condition, it may be confirmed that the write response is sent by the slave device for the third write request, so that the write response is discarded. In this disclosure, the term "discard write response" specifically refers to: the write response is not sent to the master. Further, the response handling module may or may not delete the write response, and the disclosure is not limited as to whether the response handling module deletes the write response.
In some embodiments, the write request and write response may be an AXI bus protocol based write request and write response, in which case the response ID carried by the write response is specifically the BID in the AXI write response, i.e., the AXI bus protocol write response ID.
The response processing module is further configured to: and generating a corresponding write response for the first write request, and returning the generated write response to the master device.
It should be noted that, the present disclosure is not limited to the sequence of the two actions of "generating the write response for the first write request by the response processing module" and "receiving the write response by the response processing module". For example, in some embodiments, the above two actions are independent of each other, and the response processing module continuously generates a write response for the first write request and returns the write response to the master device on one hand, and continuously receives the write response on the other hand, so that there is no restriction between the two actions. For example, in other embodiments, the above two actions are in a constraint relationship, for example, the response processing module generates a write response for a first write request corresponding to a third write request each time a write response corresponding to the third write request is received.
In addition, the particular manner in which the response processing module generates the write response may be determined based on the actual bus protocol employed. For example, the bus protocol used is AXI bus protocol, and the write response generated by the response processing module needs to carry BID (write response ID), BRESP (write response, indicating write transaction status), BVALID (write response validity).
In the present disclosure, the response processing module discards the write request by receiving the write response issued from the device, upon determining that the write response is issued for the write request (i.e., the third write request) of the compression module. In addition, the response processing module also generates write responses for the first write request sent by the main equipment and returns the generated write responses to the main equipment, so that the number of the write responses actually received by the main equipment is equal to the number of the write responses required to be received by the main equipment, and the problem that the number of the write responses returned by the slave equipment is not matched with the number of the write responses required to be received by the main equipment is solved.
In some application scenarios, in all data processed by the master device, a part of data needs to be written into the slave device after compression processing of the compression module, and another part of data can be directly written into the slave device without compression processing of the compression module. For example, when the master device is a VDEC (or GPU), the image frames output by the VDEC need to be written into the slave device after the compression process of the compression module, and the reference frames and other data output by the VDEC can be directly written into the slave device without the compression process of the compression module.
In the above application scenario, the response processing module may be further configured to: returning the write response to the master device when the write response is determined to be sent by the slave device for the second write request; wherein the second write request is a write request issued by the master device that does not need to go through the compression module.
In the present disclosure, the term "write request without going through a compression module" specifically refers to: no write requests are required to be received by the compression module.
In some embodiments, the response processing module may determine, according to a response ID carried by the write response, whether the write response is issued by the slave device for the second write request. Specifically, after receiving the write response, the response processing module reads the response ID carried by the write response, and if the response ID meets (or does not meet) a preset condition, it can be confirmed that the write response is sent by the slave device for the second write request, so that the write response is returned to the master device.
For example, each second write request sent by the master device carries the same request ID, and the master device or the upper layer application program may configure the request ID of the second write request to the first register of the response processing module in advance, so that the response processing module stores the request ID corresponding to the second write request. And after receiving the write response, the response processing module judges whether a response ID carried by the write response is matched with a request ID stored in the first register, and determines whether the write response is sent by the slave device for a third write request or determines whether the write response is sent by the slave device for a second write request according to the matching condition of the response ID and the request ID.
If the response ID carried by the write response matches the request ID stored in the first register, it is determined that the write response was issued from the device for the second write request, otherwise it is determined that the write response was issued from the device for the third write request. Wherein, the response ID matches the request ID, which may specifically mean that the response ID and the request ID are identical, or that a part of fields of the response ID and the request ID are identical. Taking the AXI bus protocol as an example, if the response ID is the same as the request ID, the two are matched so that it can be determined that the write response was issued from the device for the second write request.
Or for example, the response processing module may record a request ID of each second write request sent by the master device, and when the response processing module receives the write response, determine whether the response ID carried by the write response matches a pre-recorded certain request ID, and determine whether the write response is sent by the slave device for the third write request or whether the write response is sent by the slave device for the second write request according to the matching condition.
In the above two examples, the response processing module records the request ID of the second write request, and determines whether the write response is issued for the second write request (or the third write request) by determining a match between the response ID of the write response and the recorded request ID. In other examples, the response processing module may also record the request ID of the third write request, and determine whether the write response was issued for the second write request (or the third write request) by determining a match between the response ID of the write response and the recorded request ID. Of the above examples, the processing logic of the first example is the simplest and the least calculated, and may be regarded as the optimal example.
In some application scenarios, when the data to be written corresponding to each of the plurality of first write requests is written into the slave device, there is a sequence-preserving requirement, that is, the data to be written corresponding to the first write request sent first should be written into the slave device first. Accordingly, when the write responses are returned to the master device, the write responses are also kept in sequence, that is, the write response corresponding to each first write request is returned in turn according to the sending sequence of the first write requests.
In the above application scenario, the response processing module may include a first-in first-out queue, where the response processing module is further configured to: and receiving the first write requests sent by the master device, and storing the received request ID of each first write request into the first-in first-out queue. The response processing module, when generating a corresponding write response for the first write request, is specifically configured to: and sequentially taking out the request ID of each first write request from the first-in first-out queue, and generating a corresponding write response according to each taken-out request ID.
For example, the first write request and the second write request sent by the master device respectively carry different request IDs, the response processing module may determine whether the write request is a first write request or a second write request according to the request ID carried by the write request (for example, the second write request may uniformly carry a certain request ID, and all the first write requests may not carry such a request ID, so that whether the write request carries such a request ID may be determined by determining whether the write request is a first write request or a second write request), and if the write request is a first write request, the request ID of the first write request is stored in the fifo queue. In addition, the response processing module reads out the request IDs one by one from the first-in first-out queue, and for each read-out request ID, takes the request ID as a response ID, thereby generating a write response, and returns the write response to the master device.
In the disclosure, since the request ID of the first write request sent by the master device is stored in the fifo queue, the request ID is also read out from the fifo queue, and the write response is generated first and returned first, thereby realizing the order-preserving requirement of the write response.
As described above, the present disclosure does not limit the sequence of the two actions of "generating a write response for the first write request by the response processing module" and "receiving the write response by the response processing module", and the two actions may be independent of each other, that is, there is no restriction between the two actions. In this case, the following may occur: the response processing module has generated and returned a write response for the last first write request, but some data to be written corresponding to the third write requests have not been written to the slave device, and the response processing module has not received the write responses corresponding to the third write requests.
The above occurs without causing additional problems for some types of host devices. But may cause additional problems for other types of host devices, such as VDECs. For example, the VDEC generates an interrupt for completing decoding of the video after receiving the write response of the last first write request, and once the interrupt is generated, default data to be written is already written to the slave device and can be used by other devices, but some data to be written may not be actually written to the slave device, and at this time, if the other devices use the data to be written, additional problems may be caused.
In order to further address the above issues, the response processing module, when generating a corresponding write response for the first write request, is specifically configured to: judging whether the data to be written corresponding to each third write request in the current task are written into the slave device or not; if yes, generating a corresponding write response for the last first write request in the current task; if not, a corresponding write response is not generated for the last first write request temporarily.
It should be noted that, the first write request is generated by the master device when processing the current task, and both the first write request and the third write request belong to the current task. In this disclosure, the current task refers to: the upper layer application is currently assigned to a task of the host device. For example, if the host device is a VDEC, then the current task is that of decoding a piece of video that is assigned to the VDEC by an upper layer application (e.g., video processing related software).
In this disclosure, the master device generates processing data when performing the current task, and the master device needs to issue a plurality of first write requests in order to write the processing data to the slave device. After receiving each first write request, the compression module compresses data to be written corresponding to the first write request to obtain compressed data and a header file, and generates third write requests for the compressed data and the header file, wherein the third write requests are third write requests in the current task. The response processing module generates a corresponding write response for the last first write request in the current task only after each third write request respectively corresponding data to be written (namely compressed data and header files) are written into the slave device, so that the problem that the master device generates interruption in advance can be avoided.
In order to be able to discern the last first write request of the current task from the subsequently received plurality of first write requests, in some embodiments the total number of first write requests comprised by the current task is stored in the response processing module. The response processing module is further configured to: and judging whether the accumulated number of the received first write requests is equal to the total number, if so, determining the last received first write request as the last first write request in the current task.
For example, for a master device such as VDEC, the upper layer application calculates in advance the number of image frames parsed by the VDEC according to the relevant parameters (such as the number of frames, resolution, video format, etc.) of the video related to the current task, and since each image frame needs to be compressed by the compression module before being written into the slave device, the number of image frames is equal to the total number of first write requests that the VDEC needs to issue, and then configures the total number of first write requests to the second register of the response processing module. After each time the response processing module receives a first write request, updating the accumulated number of the first write requests already received in the current task, and then judging whether the accumulated number is equal to the total number stored in the second register. If not, it is stated that the response processing module has not received the last first write request in the current task. If so, it is indicated that the response processing module has received the last first write request in the current task, and that the last received first write request is the last first write request in the current task.
For another example, in some scenarios, the master device is dedicated to processing a class of tasks, and each time such a task is processed, the total number of first write requests that the master device needs to issue is fixed, so the total number of first write requests may be fixedly stored in the response processing module, without requiring the upper layer application to configure the response processing module with the total number of first write requests corresponding to the current task.
In order to accurately determine whether each third write request in the current task corresponds to data to be written to the slave device, the present disclosure provides the following two alternative schemes.
The first scheme is as follows:
the response processing module is further configured to: and when the last first write request is received, sending a clear request to the compression module, so that the compression module sends out the last third write request. It should be noted that, the "purge request" is a self-defined term of the disclosure, and the purge request has the following functions: causing the compression module to issue the last third write request. In particular, the request can be understood as a clear request as long as the above-described function can be achieved.
For example, by default, the compression module may generate a third write request for 32 header files after the 32 header files are assembled, and issue the third write request instead of generating a third write request for each header file, so that the number of transmission of the third write request may be reduced. The above is the case of header files, but for compressed data, the compression module typically does not cache the compressed data, but once the compression is completed, generates a write request for the compressed data and issues the write request.
The response processing module may send a fe ce request to the compression module after receiving the last first write request (the fe ce request may be understood as the foregoing purge request, and the chinese name of fe is a fence). After receiving the fe request, the compression module generates a third write request for all the cached header files even if 32 header files are not yet obtained, and issues the third write request, and then returns an fe ACK to the response processing module (the fe ACK may be understood as the foregoing emptying request response). Wherein, one third write request generated for all the head files already cached is the last third write request sent by the compression module.
The response processing module is specifically configured to, when judging whether each third write request in the current task corresponds to data to be written in the slave device, whether the data to be written in the slave device is written in the data to be written in the slave device: after receiving the emptying request response returned by the compression module, judging whether the data to be written corresponding to each third writing request sent by the compression module are written into the slave device.
In the present disclosure, after the compression module returns the flush request response, it is indicated that all third write requests in the current task have been issued. Therefore, after receiving the flushing request response, the response processing module determines whether the data to be written of each third writing request sent by the compression module is written into the slave device or not, so that whether the data to be written of each third writing request in the current task is written into the slave device or not can be determined. Wherein if the data to be written of each third write request issued by the compression module has been written to the slave device, it may be determined that the data to be written of each third write request in the current task has been written to the slave device.
In particular implementations, the response processing module is further configured to: and counting the third write requests sent by the compression module, and subtracting 1 from the count value when each write response corresponding to one third write request is received. And after receiving the emptying request response, the response processing module monitors whether the count value is equal to 0, and when the count value is equal to 0, determines that the data to be written corresponding to each third write request sent by the compression module is written into the slave device, and can generate a write response for the last first write request of the current task. For example, after receiving the emptying request response, the response processing module starts to monitor the count value, and the specific monitoring mode is as follows: the count value is read every n clock cycles, and whether the count value is equal to 0 is judged until the count value is equal to 0.
The second scheme is as follows:
for example, for a master device such as a VDEC, the upper layer application calculates in advance the number of image frames parsed by the VDEC according to the relevant parameters (such as the number of frames, resolution, video format, etc.) of the video related to the current task, and since each image frame needs to be compressed by the compression module before being written into the slave device, the number of image frames is equal to the total number of first write requests that the VDEC needs to issue. After determining the total number of first write requests, the total number of third write requests may be calculated ,/>Wherein->Is the total number of first write requests, the specific meaning of the above formula is: will firstDivided by 32, then the quotient of the two is rounded up, finally the result of the rounding up is added +.>Get the total number of third write requests +.>. Wherein (1)>Is the number of requests for the write head file in the third write request. />Is the number of requests for writing compressed data in the third write request.
The upper layer application program can make the total numberA third register allocated to the response processing module, and the response processing module is configured to add +_total number to each write response corresponding to a third write request received>A subtraction of 1 is performed. When total amount->When the data is equal to 0, it is determined that the data to be written of each third write request in the current task has been written to the slave device, and at this time, a write response may be generated for the last first write request of the current task.
As shown in fig. 1, in some embodiments, the system further comprises a master device configured to: and sending out a first write request and a second write request, wherein the request ID carried by the first write request is different from the request ID carried by the second write request. Furthermore, the master device is further configured to: and receiving a write response sent by the response processing module.
In the present disclosure, the request IDs of the plurality of first write requests issued by the master device may be the same or different, which is not limited in the present disclosure. Likewise, the request IDs of the plurality of second write requests issued by the master device may be the same or different, which is not limited by the present disclosure.
In some embodiments, the write request and write response may be a write request and write response based on an AXI bus protocol, in which case the request ID carried by the write request is specifically the WID in the AXI write request.
As shown in fig. 1, in some embodiments, the system further comprises a compression module configured to: and receiving a first write request sent by the main equipment, and compressing data to be written corresponding to the first write request to obtain compressed data and a header file corresponding to the data to be written. The compression module is further configured to: a third write request is generated for the compressed data and header file.
Wherein the compression module generates a third write request for each header file and generates a third write request for each compressed data. Alternatively, the compression module generates a third write request for each header file and each compressed data. Alternatively, the compression module generates a third write request for every N header files and generates a third write request for every N shares of compressed data. Alternatively, the compression module generates a third write request for every N header files and every N shares of compressed data.
In some preferred embodiments, the compression module, when generating the third write request for the compressed data and header file, is specifically configured to:
when the number of the compressed data cached by the compression module reaches a preset threshold (such as 32), generating a third write request for all cached compressed data; when the number of the head files cached by the compression module reaches a preset threshold (such as 32), generating a third write request for all the cached head files; when the number of the compressed data buffered by the compression module does not reach a preset threshold (such as 32), but the compression module receives a purge request (such as a fe request), a third write request is generated for all buffered compressed data; when the number of header files cached by the compression module does not reach the preset threshold (such as 32), but the compression module receives a purge request (such as a fe request), a third write request is generated for all of the cached header files.
As shown in fig. 1, in some embodiments, the system further comprises a slave device configured to: and receiving a second write request sent by the main equipment, executing write processing on data to be written corresponding to the second write request, and sending a write response corresponding to the second write request.
The slave device is further configured to: and receiving a third write request sent by the compression module, executing write processing on data to be written corresponding to the third write request, and sending out a write response corresponding to the third write request.
In some embodiments, the master device is a GPU or VDEC and the slave device is a GDDR.
With reference now to FIG. 2, FIG. 2 is a block diagram illustrating a data processing system according to one embodiment of the present disclosure. As shown in FIG. 2, the data processing system includes a master device, a compression module, a slave device, and a response processing module. Wherein, the response processing module further comprises: the system comprises a first-in first-out queue, a processing core, a first counter, a register, a write response receiving module, a second counter, a clear request sending module and a clear request response receiving module. Note that, in fig. 2, connection lines between the modules represent: one party needs to read data from the other party, or one party needs to send data to the other party, or one party needs to control the other party.
As shown in fig. 2, the total number of first write requests is configured in the register by the upper layer application. The master device issues a first write request and a second write request, wherein the second write request is received and processed directly by the slave device and the first write request is received and processed by the compression module.
After receiving the first write request, the compression module compresses data to be compressed corresponding to the first write request, thereby obtaining compressed data and a header file. The compression module generates a third write request for the compressed data and header file and issues the third write request, which is received and processed by the slave device.
The response processing module stores each first write request sent by the main device into a first-in first-out queue, and counts the number of the first write requests by using a first counter. The processing core of the response processing module reads the first write request from the first-in-first-out queue, generates a write response for the first write request, and then returns the generated write response to the master device.
The response processing module also counts the third write requests by using a second counter, and the count value of the second counter is increased by 1 every time the compression module sends out a third write request.
The write response receiving module of the response processing module receives the write response sent by the slave device and judges whether the write response is sent for a third write request according to the response ID carried by the write response; if so, discarding the write response and decrementing the count value of the second counter by 1 (indicating that the write response of a third write request previously issued has been received); if not, the write response is returned to the master device.
The processing core of the response processing module also determines whether the count value of the first counter is equal to the total number of configurations in the register. If the first write request is equal to the second write request, the response processing module receives the last first write request of the current task, so that the processing core does not generate a write response for the last first write request temporarily, and in addition, the flush request sending module sends a flush request to the compression module, so that the compression module sends a last third write request.
When the clear request response receiving module of the response processing module receives the clear request response, the processing core starts to monitor the value of the second counter (for example, the value of the second counter is read once every n clock cycles), and when the value of the second counter is equal to 0, the processing core generates a write response for the last first write request, and returns the write response to the master device.
The disclosed embodiments also provide an electronic assembly comprising a data processing system as described in any of the embodiments above. In some use scenarios, the product form of the electronic assembly is embodied as a graphics card; in other use cases, the product form of the electronic assembly is embodied as a CPU motherboard.
The embodiment of the disclosure also provides electronic equipment, which comprises the electronic component. In some use 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 use cases, the electronic device is in the form of a personal computer, game console, workstation, server, etc.
The embodiments of the present disclosure also provide a data processing method, which is based on the same inventive concept as the aforementioned data processing system, and the following briefly describes the data processing method to avoid repetition.
Referring to fig. 3, fig. 3 is a flow chart illustrating a data processing method according to an embodiment of the disclosure. As shown in fig. 3, the data processing method includes the steps of:
s310: receiving a write response sent from the device;
s320: discarding the write response upon determining that the write response was issued by the slave device for the third write request; the third write request is a write request sent by the compression module after the first write request sent by the main equipment is processed;
s330: and generating a corresponding write response for the first write request, and returning the generated write response to the master device.
The execution sequence of steps S330 and S310 is not limited, and similarly, the execution sequence of steps S330 and S320 is not limited.
In some embodiments, the method further comprises:
returning the write response to the master device when the write response is determined to be sent by the slave device for the second write request; wherein the second write request is a write request issued by the master device that does not need to go through the compression module.
In the present disclosure, by receiving a write response issued from a device, upon determining that the write response was issued for a write request (i.e., a third write request) of a compression module, the write request is discarded. In addition, a write response is generated for the first write request sent by the main equipment, and the generated write response is returned to the main equipment, so that the number of the write responses actually received by the main equipment is equal to the number of the write responses required to be received by the main equipment, and the problem that the number of the write responses returned by the slave equipment is not matched with the number of the write responses required to be received by the main equipment is solved.
In some embodiments, the method further comprises:
storing a request ID corresponding to the second write request in advance;
and judging whether a response ID carried by the write response is matched with the request ID, and determining whether the write response is sent by the slave device for a third write request or whether the write response is sent by the slave device for a second write request according to the matching condition of the response ID and the request ID.
In some embodiments, the method further comprises: receiving first write requests sent by a main device, and storing the received request ID of each first write request into a first-in first-out queue;
generating a corresponding write response for the first write request, comprising: and sequentially taking out the request ID of each first write request from the first-in first-out queue, and generating a corresponding write response according to each taken-out request ID.
In some embodiments, the first write request is generated by the master device when processing the current task, and the first write request and the third write request both belong to the current task; generating a corresponding write response for the first write request, comprising:
judging whether the data to be written corresponding to each third write request in the current task are written into the slave device or not;
if yes, generating a corresponding write response for the last first write request in the current task;
if not, a corresponding write response is not generated for the last first write request temporarily.
In some embodiments, the method further comprises:
pre-storing the total number of first write requests included in the current task;
and judging whether the accumulated number of the received first write requests is equal to the total number, if so, determining the last received first write request as the last first write request in the current task.
In some embodiments, the method further comprises: when the last first write request is received, a clear request is sent to the compression module, so that the compression module sends out the last third write request;
judging whether each third write request in the current task respectively corresponds to data to be written into the slave device or not, wherein the method comprises the following steps: after receiving the emptying request response returned by the compression module, judging whether the data to be written corresponding to each third writing request sent by the compression module are written into the slave device.
In some embodiments, the method further comprises: counting the third write requests sent by the compression module, and subtracting 1 from the count value when a write response corresponding to the third write request is received each time;
judging whether the data to be written corresponding to each third write request sent by the compression module is written into the slave device or not, wherein the method comprises the following steps: and monitoring whether the count value is equal to 0, and when the count value is equal to 0, determining that the data to be written corresponding to each third write request sent by the compression module is written into the slave device.
While the preferred embodiments of the present disclosure have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the disclosure.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present disclosure without departing from the spirit or scope of the disclosure. Thus, the present disclosure is intended to include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (21)

1. A data processing system, the system comprising a response processing module configured to:
receiving a write response sent from the device;
discarding the write response upon determining that the write response was issued by the slave device for a third write request; the third write request is a write request sent by the compression module after the first write request sent by the main equipment is processed;
generating a corresponding write response for the first write request, and returning the generated write response to the master device;
returning the write response to the master device when the write response is determined to be sent by the slave device for a second write request; wherein the second write request is a write request issued by the master device that does not need to go through the compression module.
2. The system of claim 1, wherein the response processing module stores a request ID corresponding to the second write request;
The response processing module is further configured to: judging whether a response ID carried by the write response is matched with the request ID, and determining whether the write response is sent by the slave device for a third write request or whether the write response is sent by the slave device for a second write request according to the matching condition of the response ID and the request ID.
3. The system of claim 1, wherein the response processing module comprises a first-in first-out queue;
the response processing module is further configured to: receiving the first write requests sent by the master device, and storing the received request ID of each first write request into the first-in first-out queue;
the response processing module, when generating a corresponding write response for the first write request, is specifically configured to: and sequentially taking out the request ID of each first write request from the first-in first-out queue, and generating a corresponding write response according to each taken-out request ID.
4. The system of claim 1, the first write request being generated by the master device while processing a current task, the first write request and the third write request both belonging to the current task; the response processing module, when generating a corresponding write response for the first write request, is specifically configured to:
Judging whether the data to be written corresponding to each third write request in the current task are written into the slave device or not;
if yes, generating a corresponding write response for the last first write request in the current task;
if not, a corresponding write response is not generated for the last first write request temporarily.
5. The system of claim 4, the response processing module having stored therein a total number of first write requests included by a current task;
the response processing module is further configured to: and judging whether the accumulated number of the received first write requests is equal to the total number, if so, determining the last received first write request as the last first write request in the current task.
6. The system of claim 4, the response processing module further configured to: when the last first write request is received, a clear request is sent to the compression module, so that the compression module sends out a last third write request;
the response processing module is specifically configured to, when judging whether each third write request in the current task corresponds to data to be written in the slave device, whether the data to be written in the third write request is written in the slave device: after receiving the emptying request response returned by the compression module, judging whether the data to be written corresponding to each third writing request sent by the compression module are written into the slave device.
7. The system of claim 6, the response processing module further configured to: counting the third write requests sent by the compression module, and subtracting 1 from the count value when a write response corresponding to one third write request is received;
the response processing module is specifically configured to, when determining whether each of the third write requests sent by the compression module has been written to the slave device, whether the data to be written corresponding to the third write requests is written to the slave device: and monitoring whether the count value is equal to 0, and when the count value is equal to 0, determining that data to be written, which corresponds to each third write request sent by the compression module, is written into the slave device.
8. The system of any of claims 1 to 7, further comprising the master device configured to:
issuing the first write request and the second write request, wherein the request ID carried by the first write request is different from the request ID carried by the second write request;
and receiving a write response sent by the response processing module.
9. The system of any of claims 1 to 7, further comprising the compression module configured to:
Receiving the first write request sent by the main equipment, and compressing data to be written corresponding to the first write request to obtain compressed data and a header file corresponding to the data to be written;
a third write request is generated for the compressed data and header file.
10. The system of claim 9, wherein the compression module, when generating the third write request for the header file, is specifically configured to:
when the number of the head files cached by the compression module reaches a preset threshold value, generating a third write request for all the cached head files;
and when the number of the head files cached by the compression module does not reach the preset threshold value, but the compression module receives the emptying request, generating a third writing request for all the cached head files.
11. The system of any of claims 1 to 7, further comprising the slave device configured to:
receiving a second write request sent by the main equipment, executing write processing on data to be written corresponding to the second write request, and sending a write response corresponding to the second write request;
and receiving a third write request sent by the compression module, executing write processing on data to be written corresponding to the third write request, and sending out a write response corresponding to the third write request.
12. The system of any of claims 1 to 7, the master device being a GPU or VDEC and the slave device being a GDDR.
13. An electronic assembly comprising the system of any one of claims 1 to 12.
14. An electronic device comprising the electronic assembly of claim 13.
15. A method of data processing, the method comprising:
receiving a write response sent from the device;
discarding the write response upon determining that the write response was issued by the slave device for a third write request; the third write request is a write request sent by the compression module after the first write request sent by the main equipment is processed;
generating a corresponding write response for the first write request, and returning the generated write response to the master device;
returning the write response to the master device when the write response is determined to be sent by the slave device for a second write request; wherein the second write request is a write request issued by the master device that does not need to go through the compression module.
16. The method of claim 15, the method further comprising:
the request ID corresponding to the second writing request is stored in advance;
Judging whether a response ID carried by the write response is matched with the request ID, and determining whether the write response is sent by the slave device for a third write request or whether the write response is sent by the slave device for a second write request according to the matching condition of the response ID and the request ID.
17. The method of claim 15, the method further comprising: receiving the first write requests sent by the master device, and storing the received request ID of each first write request into a first-in first-out queue;
the generating a corresponding write response for the first write request includes: and sequentially taking out the request ID of each first write request from the first-in first-out queue, and generating a corresponding write response according to each taken-out request ID.
18. The method of claim 15, the first write request being generated by the master device while processing a current task, the first write request and the third write request both belonging to the current task; the generating a corresponding write response for the first write request includes:
judging whether the data to be written corresponding to each third write request in the current task are written into the slave device or not;
If yes, generating a corresponding write response for the last first write request in the current task;
if not, a corresponding write response is not generated for the last first write request temporarily.
19. The method of claim 18, the method further comprising:
pre-storing the total number of first write requests included in the current task;
and judging whether the accumulated number of the received first write requests is equal to the total number, if so, determining the last received first write request as the last first write request in the current task.
20. The method of claim 18, the method further comprising: when the last first write request is received, a clear request is sent to the compression module, so that the compression module sends out a last third write request;
the judging whether the data to be written corresponding to each third write request in the current task has been written into the slave device comprises the following steps: after receiving the emptying request response returned by the compression module, judging whether the data to be written corresponding to each third writing request sent by the compression module are written into the slave device.
21. The method of claim 20, the method further comprising: counting the third write requests sent by the compression module, and subtracting 1 from the count value when a write response corresponding to one third write request is received;
The determining whether the data to be written corresponding to each third write request sent by the compression module has been written into the slave device includes: and monitoring whether the count value is equal to 0, and when the count value is equal to 0, determining that data to be written, which corresponds to each third write request sent by the compression module, is written into the slave device.
CN202311167411.5A 2023-09-12 2023-09-12 Data processing system, electronic component, electronic device and data processing method Active CN116912079B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311167411.5A CN116912079B (en) 2023-09-12 2023-09-12 Data processing system, electronic component, electronic device and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311167411.5A CN116912079B (en) 2023-09-12 2023-09-12 Data processing system, electronic component, electronic device and data processing method

Publications (2)

Publication Number Publication Date
CN116912079A CN116912079A (en) 2023-10-20
CN116912079B true CN116912079B (en) 2024-02-20

Family

ID=88358699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311167411.5A Active CN116912079B (en) 2023-09-12 2023-09-12 Data processing system, electronic component, electronic device and data processing method

Country Status (1)

Country Link
CN (1) CN116912079B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958649A (en) * 2018-05-17 2018-12-07 天津飞腾信息技术有限公司 A kind of security isolation method and device for storage system
WO2022160206A1 (en) * 2021-01-28 2022-08-04 华为技术有限公司 System-on-chip abnormality processing method and apparatus, and system on chip
CN116561056A (en) * 2023-07-07 2023-08-08 芯动微电子科技(珠海)有限公司 System on chip

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10684965B2 (en) * 2017-11-08 2020-06-16 Advanced Micro Devices, Inc. Method to reduce write responses to improve bandwidth and efficiency

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958649A (en) * 2018-05-17 2018-12-07 天津飞腾信息技术有限公司 A kind of security isolation method and device for storage system
WO2022160206A1 (en) * 2021-01-28 2022-08-04 华为技术有限公司 System-on-chip abnormality processing method and apparatus, and system on chip
CN116561056A (en) * 2023-07-07 2023-08-08 芯动微电子科技(珠海)有限公司 System on chip

Also Published As

Publication number Publication date
CN116912079A (en) 2023-10-20

Similar Documents

Publication Publication Date Title
US8291133B2 (en) Skip based control logic for first in first out buffer
US20160274820A1 (en) Signal transfer device, information processing apparatus, signal transfer method, and non-transitory recording medium
CN112565115A (en) Transmission method and device of TCP data, computer equipment and storage medium
US9276879B2 (en) Memory transfer optimization of network adapter data placement when performing header-data split operations
US20090182798A1 (en) Method and apparatus to improve the effectiveness of system logging
US20080310411A1 (en) Communication apparatus and integrated circuit for communication
CN113498595B (en) PCIe-based data transmission method and device
US8230137B2 (en) Network processor, reception controller and data reception processing method performing direct memory access transfer
US7822040B2 (en) Method for increasing network transmission efficiency by increasing a data updating rate of a memory
CN116912079B (en) Data processing system, electronic component, electronic device and data processing method
US9319296B2 (en) Methods for embedding an out-of-band signal into a communication protocol capture stream
CN113498600B (en) PCIe-based data transmission method and device
CN116610623A (en) Data reading method and device, electronic equipment and storage medium
CN115061959B (en) Data interaction method, device and system, electronic equipment and storage medium
CN116738089A (en) Rendering method, chip, electronic device and storage medium
US20080034106A1 (en) Reducing power consumption for bulk data transfers
US7702054B2 (en) Detecting errors in transmitted data
CN111026694B (en) Data receiving method, data receiving apparatus, image forming system, and electronic apparatus
US7373541B1 (en) Alignment signal control apparatus and method for operating the same
CN114691023A (en) Read-write operation method of read-write equipment, read-write equipment and readable storage medium
CN115599574B (en) Graphic processing system, electronic component, electronic device, and information processing method
CN112751873B (en) Bluetooth MIDI data conversion method, circuit and storage medium
US20240163231A1 (en) Electronic apparatus and control method for managing available pointers of packet buffer
CN116193138B (en) Data processing system, electronic component and electronic equipment
CN116149453A (en) Controller, electronic device and data transmission system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant