Control unit, system on chip and address translation error processing method

By designing the data transmission module and the error reporting module in the control unit, the task re-execution problem caused by address conversion errors in the SG-DMA process is solved, and more efficient error handling is achieved, reducing waste of computing resources and improving execution performance.

CN119473940APending Publication Date: 2025-02-18T-HEAD (SHANGHAI) SEMICON CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310998844.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-08
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

During SG-DMA, address translation errors will cause the entire task to be re-execute, resulting in waste of computing resources and degraded execution performance.

Method used

A control unit is designed, including a data transmission module and an error reporting module. When an address conversion error occurs, the control unit will stop data transmission, record the amount of transmitted data, and send an error notification including breakpoint position information to the processing unit.

Benefits of technology

By including breakpoint position information in the error notification, the upper-level tasks allow quick determination of the part to be completed, thereby avoiding re-executing the entire task, reducing waste of computing resources and reducing the impact of address translation errors on execution performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473940A_ABST
    Figure CN119473940A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a control unit, a system on chip and an address translation error processing method. The control unit comprises a data transmission module used for receiving transmission configuration information comprising a linked list virtual address; performing linked list access according to a linked list physical address obtained by performing address conversion on the linked list virtual address, and obtaining a target data virtual address included in the linked list; transmitting the target data between the processing unit and the memory according to a target data physical address obtained by performing address conversion on the target data virtual address, and recording the transmitted data volume in the target data transmission process; the error reporting module is used for stopping a target data transmission process and determining the transmitted data volume as breakpoint position information if an address conversion error occurs; an error notification including the breakpoint location information is sent to a processing unit. According to the embodiment of the invention, waste of computing resources caused by repeated task execution can be avoided, and the influence of address conversion errors on task execution performance is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a control unit, a system on chip, and an address conversion error processing method. Background Art

[0002] DMA (Direct Memory Access) is a hardware mechanism that allows peripheral devices to directly transfer their input / output data to the main memory without the involvement of the system processor. Using this mechanism can greatly improve the throughput of communication with the device. The main process of DMA is: the processor sends a data transfer instruction to the DMA controller, and the DMA controller completes the data transfer and returns a transfer completion notification.

[0003] During the DMA process, the accessed memory address is often a multiple discrete area. For example, the accessed memory address is: a memory area with a length of L1 starting from base address A1, a memory area with a length of L2 starting from base address A2, and a memory area with a length of L3 starting from base address A3. In order to reduce the number of instructions issued by the processor, the SG-DMA (Scatter-Gather DMA) scheme can be adopted: introduce multiple linked lists, one linked list corresponds to a discrete area, and for a single linked list, in addition to storing the address information of a corresponding discrete area, it also stores the address information of the next linked list; after the SG-DMA controller receives the transmission configuration information issued by the processor, it accesses the first linked list in the memory based on the address of the first linked list included therein; then, based on the address information stored in the first linked list, it accesses the corresponding memory area to perform data transmission in the memory area, and then, based on the address information of the next linked list stored in the linked list, it accesses the next linked list, and so on, until the access to each discrete area is completed.

[0004] In order to reduce memory overhead, the SG-DMA controller uses the feature of shared virtual addresses for memory access, that is, the SG-DMA controller directly uses virtual addresses during memory access, and the memory management unit then converts the virtual addresses into physical addresses in the memory to perform data transmission in the corresponding physical addresses. Errors may occur during the address conversion process, for example, for a certain virtual address, the corresponding physical address is not found in the conversion list, etc.; or, although the physical address corresponding to a certain virtual address is converted, it is found according to the address matching information that the SG-DMA controller does not have access rights to the physical address.

[0005] In the relevant SG-DMA scheme, when an address conversion error occurs, the corresponding upper-layer task often needs to be re-executed as a whole, which has a significant impact on the execution performance of the entire task. Taking the task scenario of high-speed symmetric encryption and decryption as an example, when the amount of data corresponding to a task is large, if an error occurs near the end of the processing and the task is discarded, the overall recalculation overhead will be very large. Summary of the invention

[0006] In view of this, embodiments of the present invention provide a control unit, a system on chip, and an address translation error processing method to at least partially solve the above problems.

[0007] According to a first aspect of an embodiment of the present invention, a control unit is provided, which is applied to a system on chip, and the system on chip also includes: a processing unit and a memory, and the control unit includes: a data transmission module, which is used to receive transmission configuration information including a linked list virtual address; perform linked list access according to a linked list physical address obtained by address conversion of the linked list virtual address, and obtain a target data virtual address included in the linked list; transmit target data between the processing unit and the memory according to a target data physical address obtained by address conversion of the target data virtual address, and record the amount of transmitted data during the target data transmission process; an error reporting module, which is used to stop the target data transmission process and determine the amount of transmitted data as breakpoint position information if an address conversion error occurs, and send an error notification including the breakpoint position information to the processing unit.

[0008] According to a second aspect of an embodiment of the present invention, a system on chip is provided, comprising: a control unit according to the first aspect above; a processing unit, used to execute a preset algorithm on data transmitted by the control unit; during the execution of the preset algorithm, if an error notification sent by the control unit is received, the execution of the preset algorithm is stopped, the amount of processed data of the preset algorithm that has been executed is determined based on the error notification, and error prompt information including the amount of processed data is reported to an upstream node.

[0009] According to a third aspect of an embodiment of the present invention, a data center is provided, comprising: a system on chip according to the second aspect above.

[0010] According to a fourth aspect of an embodiment of the present invention, there is provided an address conversion error handling method, which is applied to a control unit in a system on chip, wherein the system on chip further comprises: a processing unit and a memory, and the control unit comprises: a data transmission module and an error reporting module, and the method comprises: receiving transmission configuration information including a linked list virtual address through the data transmission module; performing linked list access according to a linked list physical address obtained by address conversion of the linked list virtual address, and acquiring a target data virtual address included in the linked list; transmitting target data between the processing unit and the memory according to a target data physical address obtained by address conversion of the target data virtual address, and recording the amount of transmitted data during the target data transmission process; if an address conversion error occurs, stopping the target data transmission process and determining the amount of transmitted data as breakpoint position information through the error reporting module, and sending an error notification including the breakpoint position information to the processing unit.

[0011] According to a fifth aspect of an embodiment of the present invention, there is provided a computer storage medium on which a computer program is stored. When the program is executed by a processor, the method according to the fourth aspect is implemented.

[0012] According to the control unit, system on chip and address conversion error handling method provided by the embodiment of the present invention, in the process of data transmission based on the linked list, when an address conversion error occurs, the breakpoint location information is included in the reported error notification. That is to say, in the embodiment of the present invention, when an address conversion error occurs, an error notification including breakpoint location information is uploaded, so that the corresponding upper-level task can quickly determine the unfinished part of the task after receiving the above error notification, and then when the task is re-executed, only the above unfinished part needs to be executed, without re-execution of the entire task, thereby avoiding the waste of computing resources caused by repeated execution of tasks and effectively reducing the impact of address conversion errors on task execution performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0014] Figure 1 FIG. 4 is a hardware structure diagram of a system on chip according to an embodiment of the present invention.

[0015] Figure 2 is a structural block diagram of a control unit according to another embodiment of the present invention.

[0016] Figure 3The figure is a flowchart of a method for handling address translation errors according to another embodiment of the present invention. DETAILED DESCRIPTION

[0017] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only partial embodiments of the embodiments of the present invention, rather than all embodiments. Based on the embodiments in the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field should belong to the scope of protection of the embodiments of the present invention. It should be noted that the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.

[0018] The embodiment of the present invention provides an address translation error processing solution, which can be deployed in a system on chip that executes a preset algorithm. Specifically, the preset algorithm can be, for example, an encryption algorithm, a decryption algorithm, etc. In the embodiment of the present invention, the specific content of the preset algorithm is not limited.

[0019] For ease of understanding, the following briefly describes the service priority management solution in the embodiment of the present application in combination with the hardware structure of the system on chip:

[0020] Here, a cryptographic algorithm is taken as an example. The above-mentioned system on chip may include: a control unit, a processing unit for executing a preset algorithm, and a memory.

[0021] See also Figure 1 , Figure 1 1 is a hardware structure diagram of a system on chip according to an embodiment of the present invention, the system on chip includes a processing unit cluster 110, a control unit cluster 120, a scheduling unit 130, a format conversion unit 140 and a memory. The processing unit cluster 110 includes a plurality of processing units 112 ( Figure 13 are taken as an example, which is not enough to limit the number of paired processing units 112); wherein the processing unit 112 is a unit that performs preset algorithm processing, and the processing unit 112 can be in various forms such as a processor (Central Processing Unit, CPU), an application-specific integrated circuit (Application Specific Integrated Circuits, ASIC), and a field-programmable gate array (Field-Programmable Gate Arra, FPGA); the control unit cluster 120 may include multiple control units 122; wherein one control unit 122 corresponds to one processing unit 112, and the control unit 122 is used to receive the transmission configuration information issued by the corresponding processing unit 112, and based on the above transmission configuration information, the data is transmitted between the processing unit 122 and the memory of the system on chip; and during the data transmission process, when an address conversion error occurs, the data transmission process is stopped and an error notification including the amount of data transmitted is reported to the corresponding processing unit 112; the scheduling unit 130 is used to schedule and manage the data transmission requests of each control unit 122; the format conversion unit 140 is used to convert the format of the request and data issued by the control unit 122 to meet the relevant protocols followed during the data transmission process.

[0022] Further, see Figure 1 , the data transmission process can be divided into reading data from the memory and writing data to the memory, therefore, correspondingly, the control unit 122 can be divided into: a read control subunit and a write control subunit, wherein the read control subunit is used to receive the read configuration information sent by the corresponding processing unit 122, and read data from the memory of the system on chip to the processing unit 122 based on the above read configuration information; and in the data reading process, when an address conversion error occurs, the data reading process is stopped and an error notification including the amount of data read is reported to the corresponding processing unit 112; the write control subunit is used to receive the write configuration information sent by the corresponding processing unit 122, and write data from the processing unit 122 to the memory of the system on chip based on the above write configuration information; and in the data writing process, when an address conversion error occurs, the data writing process is stopped and an error notification including the amount of data written is reported to the corresponding processing unit 112. Correspondingly, the scheduling unit 130 includes a read-write scheduling unit and a write scheduling unit.

[0023] Further, see Figure 1The processing unit 112 may include a read queue and a write queue, wherein the read queue is used to store data read from the memory by the read control subunit. After storing the data in the read queue, the processing unit 112 may perform a preset algorithm processing operation (such as encryption processing) on ​​the data stored in the read queue to obtain corresponding processed data, and store the processed data in the write queue, and then the write control subunit writes the processed data in the write queue into the memory.

[0024] The detailed implementation process of the embodiment of the present invention is as follows:

[0025] The specific implementation of the embodiment of the present invention is further described below in conjunction with the accompanying drawings of the embodiment of the present invention.

[0026] Reference Figure 2 , Figure 2 This is a structural block diagram of a control unit according to an embodiment of the present invention. The control unit 122 includes:

[0027] Data transmission module 124 and error reporting module 126;

[0028] The data transmission module 124 is used to receive transmission configuration information including a linked list virtual address; perform linked list access according to a linked list physical address obtained by address conversion of the linked list virtual address to obtain a target data virtual address included in the linked list; transmit the target data between the processing unit and the memory according to a target data physical address obtained by address conversion of the target data virtual address, and record the amount of data transmitted during the target data transmission process;

[0029] The error reporting module 126 is used to stop the target data transmission process and determine the amount of transmitted data as breakpoint location information if an address conversion error occurs, and send an error notification including the breakpoint location information to the processing unit.

[0030] Specifically: the target data is the data to be transmitted. Since the transmission process can be divided into a reading process and a writing process, the target data can refer to the data to be read or the data to be written.

[0031] Furthermore, when the data to be transmitted corresponds to multiple discrete areas of the memory respectively, the transmission configuration information may include the linked list virtual address of the first linked list. Subsequently, when accessing the first linked list, in addition to obtaining the target data virtual address corresponding to the linked list, the linked list virtual address of the second linked list can also be obtained. In this way, after the target data corresponding to the first linked list is transmitted, the second linked list can be accessed according to the physical address corresponding to the linked list virtual address of the second linked list. When accessing, in addition to obtaining the target data corresponding to the second linked list, the linked list virtual address of the third linked list is also obtained, and so on, until the target data corresponding to each linked list is transmitted, the data transmission process ends.

[0032] According to the control unit provided by the embodiment of the present invention, in the process of data transmission based on the linked list, when an address conversion error occurs, the breakpoint location information is included in the reported error notification. That is to say, in the embodiment of the present invention, when an address conversion error occurs, an error notification including the breakpoint location information is uploaded, so that the corresponding upper-level task can quickly determine the unfinished part of the task after receiving the above error notification, and then when the task is re-executed, only the above unfinished part needs to be executed, without re-execution of the entire task, thereby avoiding the waste of computing resources caused by repeated execution of tasks and effectively reducing the impact of address conversion errors on task execution performance.

[0033] Optionally, in some of the embodiments, if the address conversion error is an error occurring during linked list access, the error reporting module is specifically configured to: upon receiving the address conversion error notification, stop the target data transmission process and determine the amount of data transmitted as the breakpoint position information, and send an error notification including the breakpoint position information to the processing unit;

[0034] If the address conversion error is an error that occurs during target data transmission, the error reporting module, after receiving the address conversion error notification, is specifically used to: when it is determined that data with the same data volume as the target data has been transmitted, stop the target data transmission process and determine the amount of data transmitted as breakpoint position information, and send an error notification including the breakpoint position information to the processing unit.

[0035] Specifically, when accessing a linked list, there is no data being transmitted in the transmission channel between the control unit and the memory. Therefore, if an address conversion error occurs at this time, the target data transmission process can be stopped when the address conversion error notification is received.

[0036] However, if an address conversion error occurs during the transmission of the target data, at this time, although the transmission of the target data cannot be completed due to the inability to obtain accurate address information, in order to ensure the integrity of the data transmission process, in addition to returning the address conversion error notification to the control unit, data with the same data volume as the target data will also be returned. Therefore, in this case, after receiving the address conversion error notification, there is still data with the same data volume as the target data in the transmission channel between the control unit and the memory. At this time, if the data transmission process is stopped immediately, it will cause data retention in the transmission channel, which will cause the blockage of other subsequent data transmission processes or even the problem of transmission failure. Therefore, in order to avoid unnecessary impact on the subsequent data transmission process, when the address conversion error notification is received, the data transmission process can be stopped first, but from the moment when the address conversion error notification is received, it is determined that the data with the same data volume as the target data has been transmitted, and then the target data transmission process is stopped, that is: the data transmission process is stopped after the data in the transmission channel is transmitted. In addition, since an error occurred during the transmission of the target data this time, the data volume (equal to the data volume of the target data) transmitted this time can be excluded from the data volume transmitted.

[0037] Optionally, in some of the embodiments, the data transmission module includes: a data reading submodule and a data writing submodule; the error reporting module includes: a reading error reporting submodule and a writing error reporting submodule;

[0038] The data reading submodule is used to receive transmission configuration information including a virtual address of a read linked list; access the read linked list according to a physical address of the read linked list obtained by address conversion of the virtual address of the read linked list, and obtain a virtual address of the data to be read included in the read linked list; read the data to be read according to the physical address of the data to be read obtained by address conversion of the virtual address of the data to be read, and record the amount of data read during the data reading process;

[0039] A read error reporting submodule, for stopping the data reading process and determining the amount of data read as breakpoint position information if an address conversion error occurs in the data reading submodule during the data reading process, and sending a read error notification including the breakpoint position information to the processing unit;

[0040] The data writing submodule is used to receive transmission configuration information including a write linked list virtual address; access the write linked list according to the write linked list physical address obtained by address conversion of the write linked list virtual address, and obtain the virtual address of the data to be written included in the write linked list; write the data to be written according to the physical address of the data to be written obtained by address conversion of the virtual address of the data to be written, and record the amount of data written during the data writing process;

[0041] The write error reporting submodule is used to stop the data writing process, determine the amount of written data as breakpoint position information, and send a write error notification including the breakpoint position information to the processing unit if an address conversion error occurs in the data writing submodule during the data writing process.

[0042] Specifically, data transmission can be divided into two independent processes, data reading and data writing. Therefore, in an embodiment of the present invention, two independent sub-modules, a data reading sub-module and a data writing sub-module, are used to process the data reading process and the data writing process, respectively. Correspondingly, two independent sub-modules, a read error reporting sub-module and a write error reporting sub-module, are used to process address conversion errors occurring in the data reading process and address conversion errors occurring in the data reading and writing processes, respectively.

[0043] The following explains the workflow of the data reading submodule and the data writing submodule respectively:

[0044] Data reading submodule: receiving the reading configuration information and the reading start instruction issued by the processing unit for performing the preset processing operation on the data according to the processing task, wherein the above-mentioned reading configuration information includes the reading table virtual address of the first reading table and the total length of the data to be transmitted this time; performing the reading table access according to the reading table physical address obtained by address conversion of the reading table virtual address, obtaining the data configuration information to be read included in the reading table and the reading table physical address of the next reading table; parsing the data configuration information to be read, obtaining the virtual address of the data to be read and the length of the data to be read, and initiating a data read request to the memory; then, returning the read data to the processing unit so that the processing unit performs the preset algorithm processing on the read data; after completing the data reading of a single reading table, the data configuration information to be read of the next reading table can be read from the memory according to the virtual address of the next reading table included in the current reading table, and the reading operation of the next data to be read has been performed, and so on, until the reading operation of the data to be read corresponding to the last reading table is completed, then it is determined that the data reading process is over.

[0045] In the above data reading process, the amount of data that has been read will be recorded. In addition, when the length of the data to be read is large, the reading process of the data to be read can be divided into multiple reading processing items. After executing a reading processing item, the processing unit processes the read data and then executes the next reading processing item. Since the number of processing units can be multiple, the number of data reading submodules can also be multiple accordingly. The data reading process in the embodiment of the present invention supports multi-concurrency parallel processing of multiple processing items, that is: the next processing item request can be initiated when the previous processing item has not been completed.

[0046] Data writing submodule: receiving the write configuration information and the write start instruction issued by the processing unit according to the processing task, wherein the above-mentioned write configuration information includes the write list virtual address of the first write list and the total length of the data to be written this time; performing write list access according to the write list physical address obtained by address conversion of the write list virtual address, obtaining the data configuration information to be written included in the write list and the write list physical address of the next write list; parsing the data configuration information to be written, obtaining the virtual address of the data to be written and the length of the data to be written, and initiating a write data request to the memory; then, receiving the write completion notification, and then, according to the virtual address of the next write list included in the current write list, writing the data configuration information to be written of the next write list to the memory, and performing the write operation of the next data to be written, and so on, until the write operation of the data to be written corresponding to the last write list is completed, then it is determined that the data writing process is over.

[0047] In the above data writing process, the amount of written data will also be recorded. In addition, when the length of the data to be written is large, the writing process of the data to be written can be divided into multiple writing processing items. After executing a writing processing item, the processing unit processes the written data and then executes the next writing processing item. Since the number of processing units can be multiple, the number of data writing submodules can also be multiple accordingly. The data writing process in the embodiment of the present invention supports multi-concurrency parallel processing of multiple processing items, that is: the next processing item request can be initiated when the previous processing item has not been completed.

[0048] For the data reading process, different data reading stop times may also be determined according to different times when address conversion errors occur. Specifically:

[0049] If the address conversion error is an error that occurs when accessing the read linked list, the read error reporting submodule is specifically used to: upon receiving the address conversion error notification, stop the data reading process and determine the amount of data that has been read as the breakpoint position information, and send an error notification including the breakpoint position information to the processing unit;

[0050] If the address conversion error is an error that occurs during data reading, the read error reporting submodule, after receiving the address conversion error notification, is specifically used to: when it is determined that data with the same amount of data as the data to be read has been transmitted since the address conversion error notification was received, stop the data reading process and determine the amount of data that has been read as the breakpoint position information, and send an error notification including the breakpoint position information to the processing unit.

[0051] Correspondingly, for the data writing process, different data writing stop times may also be determined according to different times when address conversion errors occur. Specifically:

[0052] If the address conversion error is an error that occurs when accessing the write linked list, the write error reporting submodule is specifically used to: upon receiving the address conversion error notification, stop the data writing process and determine the amount of written data as the breakpoint position information, and send an error notification including the breakpoint position information to the processing unit;

[0053] If the address conversion error is an error that occurs when writing data, the write error reporting submodule, after receiving the address conversion error notification, is specifically used to: when it is determined that data with the same amount of data as the data to be written has been transmitted since receiving the address conversion error notification, stop the data writing process and determine the amount of data that has been written as the breakpoint position information, and send an error notification including the breakpoint position information to the processing unit.

[0054] Optionally, in some embodiments, if the first error reporting submodule receives an address conversion error notification, the first error reporting submodule is further used to: send a first error notification to the second error reporting submodule; wherein the first error reporting submodule is a read error reporting submodule, the second error reporting submodule is a write error reporting submodule, and the first error notification is a read error notification; or, the first error reporting submodule is a write error reporting submodule, the second error reporting submodule is a read error reporting submodule, and the first error notification is a write error notification;

[0055] The second error reporting submodule is further used, after receiving the first error notification, to: stop the data transmission process and determine the amount of transmitted data as breakpoint location information, and send a reporting notification including the breakpoint location information to the processing unit.

[0056] Specifically, when the data transmission process is divided into two independent processes: a data reading process and a data writing process, and two different error reporting modules: a read error reporting submodule and a write error reporting submodule respectively handle errors that occur during the transmission process, if one of the error reporting modules receives an address conversion error notification, then the error reporting module, in addition to reporting the above-mentioned address conversion error notification to the corresponding processing unit, can also send an error notification to another error reporting module, so that the other error reporting module controls the data transmission process that has not erroneously stopped the data transmission, so as to reduce invalid transmission. For example: Taking the encryption algorithm scenario as an example, if an address conversion error occurs in the reading process of the encrypted data, that is, the read error reporting submodule receives an address conversion error notification, then the read error reporting submodule can send an error notification to the write error reporting submodule to stop the writing process of the encrypted data.

[0057] Furthermore, for the second error reporting submodule, after receiving the error notification, different data transmission stopping times may also be determined according to different error notification receiving times. Specifically:

[0058] If the error notification is received during linked list access, the second error reporting submodule is specifically used to: upon receiving the error notification, stop the data transmission process and determine the amount of transmitted data as breakpoint location information, and send a reporting notification including the breakpoint location information to the processing unit.

[0059] If the error notification is received during data transmission, the second error reporting submodule, after receiving the error notification, is specifically used to: when it is determined that data with the same amount of data as the data to be transmitted has been transmitted since the error notification was received, stop the data transmission process and determine the amount of data transmitted as the breakpoint position information, and send a reporting notification including the breakpoint position information to the processing unit.

[0060] Optionally, in some of the embodiments, the first error reporting submodule is a read error reporting submodule, the second error reporting submodule is a write error reporting submodule, and the first error notification is a read error notification;

[0061] The write error reporting submodule is used, when executing the step of stopping the data transmission process and determining the amount of transmitted data as the breakpoint position information, to:

[0062] Determine whether the amount of data read is equal to the amount of data written;

[0063] If yes, stop the data writing process and determine the amount of written data as the breakpoint position information, and send a report notification including the breakpoint position information to the processing unit;

[0064] If the amount of data read is greater than the amount of data written, when it is determined that the amount of data written by the data writing submodule is equal to the amount of data read, the data writing process is stopped and the amount of data written is determined as the breakpoint position information.

[0065] Specifically, when an address conversion error occurs during the reading process, the write error reporting submodule can first determine whether the amount of data written is equal to the amount of data read, that is: first determine whether the processed data that has been processed by the processing unit has all been written into the memory. If so, there is no processed data to be written at this time. Therefore, the data writing process can be stopped and the amount of written data can be determined as the breakpoint position information, and a reporting notification including the breakpoint position information is sent to the processing unit; if the amount of data written is less than the amount of data read, it indicates that some of the processed data that has been processed by the processing unit has not been written into the memory. At this time, in order to avoid the upper-level node from having to repeat the processing operation on the processed data that has been processed but not written when re-processing the task, the data writing process can be stopped after all the processed data has been written into the memory. In this way, the waste of processing unit resources can be effectively reduced.

[0066] Optionally, in some of the embodiments, after receiving the read error notification sent by the read error reporting submodule, the write error reporting submodule is also used to: if an address conversion error occurs in the data writing process of the data writing submodule, stop the data writing process and determine the amount of written data as breakpoint position information, and send a write error notification including the breakpoint position information to the processing unit.

[0067] Specifically, after the write error reporting submodule receives the error notification sent by the read error reporting submodule, if it is determined that the amount of data read is greater than the amount of data written, the data writing process can be continued as described above until the amount of data read is equal to the amount of data written. However, if an address conversion error occurs during the data writing process, then the write error reporting submodule can stop the data writing process and determine the amount of data written as the breakpoint position information after receiving the address conversion error notification, and send a write error notification including the breakpoint position information to the processing unit.

[0068] Correspondingly, for the write error reporting submodule, different data writing stop times can also be determined according to different times when the address conversion error occurs. Specifically:

[0069] If the address conversion error is an error that occurs when accessing the write linked list, the write error reporting submodule is specifically used to: upon receiving the address conversion error notification, stop the data writing process and determine the amount of written data as the breakpoint position information, and send a write error notification including the breakpoint position information to the processing unit;

[0070] If the address conversion error is an error that occurs when writing data, the write error reporting submodule, after receiving the address conversion error notification, is specifically used to: when it is determined that data with the same amount of data as the data to be written has been transmitted since the address conversion error notification was received, stop the data writing process and determine the amount of data that has been written as the breakpoint position information, and send a write error notification including the breakpoint position information to the processing unit.

[0071] The following describes in detail the different operations performed by each submodule in the control unit when an address conversion error is received at different times:

[0072] First, if an address conversion error occurs when the data reading submodule accesses the read linked list, then: upon receiving the address conversion error notification, the read error reporting submodule stops the data reading process and determines the amount of data read as the breakpoint location information, and sends a write error notification including the breakpoint location information to the processing unit. For the data writing part:

[0073] If the data writing submodule is also accessing the write linked list at this time, the write error reporting submodule determines whether the amount of data read is equal to the amount of data written. If it is equal, the data writing process is stopped and the amount of data written is determined as the breakpoint position information, and a reporting notification including the breakpoint position information is sent to the processing unit. In addition, it should be noted that if the data writing submodule has not received the write completion notification for accessing the write linked list, the data writing process will not be stopped until the above-mentioned write completion notification is received; if the amount of data read is greater than the amount of data written, the data writing submodule continues the data writing operation until the amount of data read is equal to the amount of data written.

[0074] If the data writing submodule is writing data at this time, the write error reporting submodule determines whether the amount of data read is equal to the amount of data written. If it is equal, and the writing submodule has completed the writing of the data corresponding to the previous linked list, and is about to enter the stage of accessing the next write linked list, at this time, the data writing process can be stopped and the amount of data written can be determined as the breakpoint position information, and a reporting notification including the breakpoint position information is sent to the processing unit; if the amount of data read is equal to the amount of data written, and the writing submodule has not completed the writing operation of the data corresponding to the current linked list (the data corresponding to the current linked list has not been written), but because the read data has been processed by the processing unit, it has been written into the memory, therefore, there is no data to be written. At this time, the data writing process can be stopped and the amount of data written can be determined as the breakpoint position information, and a reporting notification including the breakpoint position information is sent to the processing unit; if the amount of data read is greater than the amount of data written, the data writing submodule continues the data writing operation until the amount of data read is equal to the amount of data written.

[0075] Second, if an address conversion error occurs when the data reading submodule reads data, then: the reading error reporting submodule, when determining that data with the same amount of data as the data to be read has been transmitted since receiving the address conversion error notification, stops the data reading process and determines the amount of data that has been read as the breakpoint position information, and sends an error notification including the breakpoint position information to the processing unit. For the data writing part:

[0076] If the data writing submodule is also accessing the write linked list at this time, the write error reporting submodule determines whether the amount of data read is equal to the amount of data written. If so, the data writing process is stopped and the amount of data written is determined as the breakpoint position information, and a reporting notification including the breakpoint position information is sent to the processing unit; if the amount of data read is greater than the amount of data written, the data writing submodule continues the data writing operation until the amount of data read is equal to the amount of data written.

[0077] If the data writing submodule is writing data at this time, the write error reporting submodule determines whether the amount of data read is equal to the amount of data written. If so, the data writing process can be stopped and the amount of data written can be determined as the breakpoint position information, and a reporting notification including the breakpoint position information is sent to the processing unit; if the amount of data read is greater than the amount of data written, the data writing submodule continues the data writing operation until the amount of data read is equal to the amount of data written.

[0078] Wherein, for the above-mentioned first and second situations, if the data writing submodule also has an address conversion error after the address conversion error occurs in the data reading submodule, then the write error reporting submodule stops the data writing process and determines the amount of data written as the breakpoint position information when receiving the address conversion error notification, and sends an error notification including the breakpoint position information to the processing unit. Specifically: if the address conversion error is an error that occurs when accessing the write linked list, the write error reporting submodule stops the data writing process and determines the amount of data written as the breakpoint position information when receiving the address conversion error notification, and sends an error notification including the breakpoint position information to the processing unit; if the address conversion error is an error that occurs when writing data, the write error reporting submodule, after receiving the address conversion error notification, stops the data writing process and determines the amount of data written as the breakpoint position information when it is determined that data with the same amount of data as the data to be written has been transmitted since the address conversion error notification was received, and sends an error notification including the breakpoint position information to the processing unit.

[0079] Third, if an address conversion error occurs when the data writing submodule writes data, then: if the address conversion error is an error that occurs when accessing the write linked list, the write error reporting submodule stops the data writing process and determines the amount of data that has been written as the breakpoint location information when receiving the address conversion error notification, and sends an error notification including the breakpoint location information to the processing unit; if the address conversion error is an error that occurs when writing data, the write error reporting submodule, after receiving the address conversion error notification, stops the data writing process and determines the amount of data that has been written as the breakpoint location information when it is determined that data with the same amount of data as the data to be written has been transmitted since the address conversion error notification was received, and sends an error notification including the breakpoint location information to the processing unit. For the data reading part:

[0080] If the error notification is received when accessing the read linked list, the read error reporting submodule is specifically used to: when the error notification is received, stop the data reading process and determine the amount of data that has been read as the breakpoint position information, and send a reporting notification including the breakpoint position information to the processing unit; if the error notification is received when the data is read, the read error reporting submodule, after receiving the error notification, when it is determined that data with the same amount of data as the data to be read has been read since the error notification was received, stop the data reading process and determine the amount of data that has been read as the breakpoint position information, and send a reporting notification including the breakpoint position information to the processing unit.

[0081] The present invention also provides a system on chip, which includes: the control unit and the processing unit in the above embodiment. The processing unit is used to execute a preset algorithm on the data transmitted by the control unit; during the execution of the preset algorithm, if an error notification sent by the control unit is received, the execution of the preset algorithm is stopped, the amount of data processed by the preset algorithm is determined based on the error notification, and error prompt information including the amount of data processed is reported to the upstream node.

[0082] The above-mentioned preset algorithm may be, for example, an encryption algorithm, a decryption algorithm, etc. In the embodiment of the present invention, the specific content of the preset algorithm is not limited, and the cryptographic algorithm is taken as an example here.

[0083] The present invention also provides a data center, which includes the system on chip in the above embodiment.

[0084] Reference Figure 3 , Figure 3 The present invention is a flowchart of a method for handling address translation errors according to another embodiment of the present invention. Specifically, the method is applied to a control unit in a system on chip, the system on chip further includes: a processing unit and a memory, the control unit includes: a data transmission module and an error reporting module, the method includes the following steps:

[0085] Step 302, receiving transmission configuration information including a linked list virtual address through a data transmission module; performing linked list access according to a linked list physical address obtained by address conversion of the linked list virtual address, and acquiring a target data virtual address included in the linked list; transmitting the target data between the processing unit and the memory according to a target data physical address obtained by address conversion of the target data virtual address, and recording the amount of data transmitted during the target data transmission process;

[0086] Step 304: If an address conversion error occurs, the target data transmission process is stopped through the error reporting module, the amount of data transmitted is determined as breakpoint location information, and an error notification including the breakpoint location information is sent to the processing unit.

[0087] Optionally, in some of the embodiments, if the address conversion error is an error occurring during linked list access, step 304 includes: when receiving the address conversion error notification, the error reporting module stops the target data transmission process and determines the amount of data transmitted as the breakpoint position information, and sends an error notification including the breakpoint position information to the processing unit;

[0088] If the address translation error is an error that occurs during target data transmission, step 304 includes:

[0089] After receiving the address conversion error notification, through the error reporting module, when it is determined that data with the same data volume as the target data has been transmitted, the target data transmission process is stopped and the amount of transmitted data is determined as the breakpoint position information, and an error notification including the breakpoint position information is sent to the processing unit.

[0090] Optionally, in some of the embodiments, the data transmission module includes: a data reading submodule and a data writing submodule; the error reporting module includes: a reading error reporting submodule and a writing error reporting submodule;

[0091] The data reading submodule is used to receive transmission configuration information including a virtual address of a read linked list; access the read linked list according to a physical address of the read linked list obtained by address conversion of the virtual address of the read linked list, and obtain a virtual address of the data to be read included in the read linked list; read the data to be read according to the physical address of the data to be read obtained by address conversion of the virtual address of the data to be read, and record the amount of data read during the data reading process;

[0092] A read error reporting submodule, configured to stop the data reading process and determine the amount of data read as breakpoint position information if an address conversion error occurs in the data reading submodule during the data reading process, and send a read error notification including the breakpoint position information to the processing unit;

[0093] The data writing submodule is used to receive transmission configuration information including a write linked list virtual address; access the write linked list according to the write linked list physical address obtained by address conversion of the write linked list virtual address, and obtain the virtual address of the data to be written included in the write linked list; write the data to be written according to the physical address of the data to be written obtained by address conversion of the virtual address of the data to be written, and record the amount of data written during the data writing process;

[0094] The write error reporting submodule is used to stop the data writing process and determine the amount of written data as breakpoint position information if an address conversion error occurs in the data writing submodule during the data writing process, and send a write error notification including the breakpoint position information to the processing unit.

[0095] Optionally, in some of the embodiments, if the first error reporting submodule receives an address conversion error notification, the method further includes:

[0096] Sending a first error notification to the second error reporting submodule through the first error reporting submodule; wherein the first error reporting submodule is a read error reporting submodule, the second error reporting submodule is a write error reporting submodule, and the first error notification is a read error notification; or, the first error reporting submodule is a write error reporting submodule, the second error reporting submodule is a read error reporting submodule, and the first error notification is a write error notification;

[0097] After receiving the first error notification, the data transmission process is stopped through the second error reporting submodule, the amount of transmitted data is determined as breakpoint location information, and a reporting notification including the breakpoint location information is sent.

[0098] Optionally, in some of the embodiments, the first error reporting submodule is a read error reporting submodule, the second error reporting submodule is a write error reporting submodule, and the first error notification is a read error notification;

[0099] By means of the second error reporting submodule, the data transmission process is stopped and the amount of transmitted data is determined as the breakpoint position information, including:

[0100] Through the second error reporting submodule, determine whether the amount of data read is equal to the amount of data written; if so, stop the data writing process and determine the amount of data written as the breakpoint position information; if the amount of data read is greater than the amount of data written, when it is determined that the amount of data written by the data writing submodule is equal to the amount of data read, stop the data writing process and determine the amount of data written as the breakpoint position information.

[0101] Optionally, in some of the embodiments, after receiving the read error notification sent by the read error reporting submodule, the method further includes:

[0102] If an address conversion error occurs in the data writing submodule during the data writing process, the data writing process is stopped through the write error reporting submodule, the amount of written data is determined as the breakpoint position information, and a write error notification including the breakpoint position information is sent.

[0103] The address conversion error handling method provided by the embodiment of the present invention includes the breakpoint location information in the reported error notification when an address conversion error occurs during the process of data transmission based on the linked list. That is to say, in the embodiment of the present invention, when an address conversion error occurs, an error notification including the breakpoint location information is uploaded, so that the corresponding upper-level task can quickly determine the unfinished part of the task after receiving the above error notification, and then when the task is re-executed, only the above unfinished part needs to be executed, without re-execution of the entire task, thereby avoiding the waste of computing resources caused by repeated execution of tasks and effectively reducing the impact of address conversion errors on task execution performance.

[0104] The address conversion error processing method of this embodiment has the beneficial effects corresponding to the control unit provided in the above embodiment, which will not be described in detail here. In addition, the implementation of each step in the address conversion error processing method of this embodiment can refer to the description of the corresponding part in the above embodiment, which will not be described in detail here.

[0105] It should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0106] In addition, it should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present invention can be split into more components / steps, and two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present invention.

[0107] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present invention.

[0108] The above implementation methods are only used to illustrate the embodiments of the present invention, and are not limitations of the embodiments of the present invention. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present invention. The patent protection scope of the embodiments of the present invention should be defined by the claims.

Claims

1. A control unit, applied to a system on chip, the system on chip further comprising: The processing unit and the memory, the control unit comprises: A data transmission module, configured to receive transmission configuration information including a linked list virtual address; perform linked list access according to a linked list physical address obtained by address conversion of the linked list virtual address to obtain a target data virtual address included in the linked list; transmit target data between the processing unit and the memory according to a target data physical address obtained by address conversion of the target data virtual address, and record the amount of data transmitted during the target data transmission process; The error reporting module is used to stop the target data transmission process and determine the amount of transmitted data as breakpoint position information if an address conversion error occurs, and send an error notification including the breakpoint position information to the processing unit.

2. The control unit according to claim 1, wherein: If the address conversion error is an error occurring during linked list access, the error reporting module is specifically configured to: upon receiving an address conversion error notification, stop the target data transmission process and determine the amount of data transmitted as breakpoint location information, and send an error notification including the breakpoint location information to the processing unit; If the address conversion error is an error that occurs during target data transmission, the error reporting module, after receiving the address conversion error notification, is specifically used to: when it is determined that data with the same data volume as the target data has been transmitted, stop the target data transmission process and determine the amount of data transmitted as breakpoint position information, and send an error notification including the breakpoint position information to the processing unit.

3. The control unit according to claim 1, wherein: The data transmission module includes: a data reading submodule and a data writing submodule; the error reporting module includes: a reading error reporting submodule and a writing error reporting submodule; The data reading submodule is used to receive transmission configuration information including a virtual address of a read linked list; access the read linked list according to a physical address of the read linked list obtained by address conversion of the virtual address of the read linked list, and obtain a virtual address of the data to be read included in the read linked list; read the data to be read according to the physical address of the data to be read obtained by address conversion of the virtual address of the data to be read, and record the amount of data read during the data reading process; The read error reporting submodule is used to stop the data reading process and determine the amount of data read as breakpoint position information if an address conversion error occurs in the data reading submodule during the data reading process, and send a read error notification including the breakpoint position information to the processing unit; The data writing submodule is used to receive transmission configuration information including a write linked list virtual address; access the write linked list according to a write linked list physical address obtained by address conversion of the write linked list virtual address, and obtain a virtual address of the data to be written included in the write linked list; write the data to be written according to a physical address of the data to be written obtained by address conversion of the virtual address of the data to be written, and record the amount of data written during the data writing process; The write error reporting submodule is used to stop the data writing process and determine the amount of written data as breakpoint position information if an address conversion error occurs in the data writing process of the data writing submodule, and send a write error notification including the breakpoint position information to the processing unit.

4. The control unit according to claim 3, wherein: If the first error reporting submodule receives the address conversion error notification, the first error reporting submodule is further used to: send the first error notification to the second error reporting submodule; wherein the first error reporting submodule is a read error reporting submodule, the second error reporting submodule is a write error reporting submodule, and the first error notification is a read error notification; or, the first error reporting submodule is a write error reporting submodule, the second error reporting submodule is a read error reporting submodule, and the first error notification is a write error notification; After receiving the first error notification, the second error reporting submodule is further used to: stop the data transmission process and determine the amount of transmitted data as breakpoint location information, and send a reporting notification including the breakpoint location information.

5. A control unit according to claim 4, wherein: The first error reporting submodule is a read error reporting submodule, the second error reporting submodule is a write error reporting submodule, and the first error notification is a read error notification; The write error reporting submodule, when executing the step of stopping the data transmission process and determining the amount of transmitted data as the breakpoint position information, is specifically used to: Determine whether the amount of data read is equal to the amount of data written; If yes, stop the data writing process and determine the amount of written data as the breakpoint position information; If the amount of data read is greater than the amount of data written, when it is determined that the amount of data written by the data writing submodule is equal to the amount of data read, the data writing process is stopped and the amount of data written is determined as the breakpoint position information.

6. A control unit according to claim 5, wherein: After receiving the read error notification sent by the read error reporting submodule, the write error reporting submodule is also used to: if an address conversion error occurs in the data writing process of the data writing submodule, stop the data writing process and determine the amount of written data as breakpoint position information, and send a write error notification including the breakpoint position information.

7. A system on chip, comprising: A control unit according to any one of claims 1 to 6; a processing unit, configured to execute a preset algorithm on the data transmitted by the control unit; During the execution of the preset algorithm, if an error notification sent by the control unit is received, the execution of the preset algorithm is stopped, the amount of processed data of the preset algorithm is determined based on the error notification, and error prompt information including the amount of processed data is reported to the upstream node.

8. A data center, comprising: The system on chip according to claim 7.

9. A method for handling address translation errors, applied to a control unit in a system on chip, the system on chip further comprising: The processing unit and the memory, the control unit includes: a data transmission module and an error reporting module, the method includes: Receiving transmission configuration information including a linked list virtual address through a data transmission module; performing linked list access according to a linked list physical address obtained by address conversion of the linked list virtual address to obtain a target data virtual address included in the linked list; transmitting target data between the processing unit and the memory according to a target data physical address obtained by address conversion of the target data virtual address, and recording the amount of data transmitted during the target data transmission process; If an address conversion error occurs, the target data transmission process is stopped through the error reporting module, the amount of transmitted data is determined as breakpoint position information, and an error notification including the breakpoint position information is sent to the processing unit.

10. A computer storage medium having a computer program stored thereon, which implements the method according to claim 9 when the program is executed by a processor.