Data processing device and system

By cache and converting the address and data of memory write operations in the data processing device, calculating and splicing verification codes, and directly executing the write operations, the problem of low memory write operations is solved and a more efficient write operation process is achieved.

CN119065611APending Publication Date: 2024-12-03CCORE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411239937.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

When writing operations in memory, if the data to be written is smaller than the size of the minimum case unit, the old data needs to be read first and checked, resulting in a reduced write efficiency.

Method used

Provide a data processing device, including an address cache module, a data cache module, an address conversion module, a verification calculation module and a data check module. By cache and converting the write operation address and data, the verification code is calculated, and after confirming that the consistency is confirmed, it is performed. Data modification and splicing are used to write the splicing data directly into memory to avoid waiting for the verification process of the original data.

Benefits of technology

The execution time of write operations is reduced and the write operation efficiency is improved. Especially when the data bit width is smaller than the memory cell bit width, it avoids waiting for old data to be read out and checked, and improves the instruction execution efficiency and reaction speed of the CPU.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065611A_ABST
    Figure CN119065611A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing device and system in the technical field of computers. According to the data processing device provided by the invention, receiving and execution of continuous write operation are decoupled, the address cache module receives and caches addresses, and the data cache module receives and caches data. And the address conversion module, the check calculation module, the data check module and the data splicing module execute the write operation on the basis of the cached data of the address cache module and the data cache module, so that the execution of the write operation does not need to wait for the check process of the original data, the execution time of the write operation is reduced to a certain extent, and the write operation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing device and system. Background Art

[0002] Currently, when performing a write operation on a memory, if the data to be written is smaller than the size of the minimum write unit, it is necessary to first read the old data and then write the new data to be written into the memory; and the old data read needs to be verified before the write operation of the data to be written can be performed, which increases the execution time of the write operation and slows down the efficiency of the write operation.

[0003] Therefore, how to improve the write operation efficiency of the memory is a problem that those skilled in the art need to solve. Summary of the invention

[0004] In view of this, the purpose of this application is to provide a data processing device and system to improve the write operation efficiency of the memory. The specific scheme is as follows:

[0005] In a first aspect, the present application provides a data processing device, comprising:

[0006] An address cache module, used for receiving and caching write operation addresses in continuous write operations sent by the processor;

[0007] A data cache module, used for receiving and caching the to-be-written data corresponding to the continuous write operation;

[0008] An address conversion module, configured to read at least one write operation address from the address cache module, convert the at least one write operation address into a corresponding physical write address in the memory, and read from the physical write address to obtain first data and a first check code corresponding to the first data;

[0009] A check calculation module, used for calculating a second check code according to the first data read by the address conversion module;

[0010] a data checking module, configured to modify the first data according to the data to be written corresponding to the at least one write operation address to obtain new data after confirming that the first check code is consistent with the second check code and the amount of the data to be written corresponding to the at least one write operation address is less than the unit storage block size;

[0011] The data splicing module is used to splice the new data and the new check code calculated by the check calculation module according to the new data to obtain spliced ​​data, and write the spliced ​​data into the physical write address.

[0012] Optionally, the address cache module is used to cache write operation addresses in the continuous write operations according to the order in which the continuous write operations are received.

[0013] Optionally, the data cache module is used to cache the to-be-written data corresponding to the continuous write operations according to the order in which the continuous write operations are received.

[0014] Optionally, the check calculation module is used to calculate an ECC check code according to the first data read by the address conversion module, and use the ECC check code as the second check code;

[0015] Correspondingly, the check calculation module is used to use the ECC check code calculated according to the new data as the new check code.

[0016] Optionally, the data checking module is used to generate corresponding write error prompt information after confirming that the first verification code and the second verification code are inconsistent.

[0017] Optionally, the data checking module is used to use the data to be written corresponding to the at least one write operation address as the new data when confirming that the data amount of the data to be written corresponding to the at least one write operation address is equal to the unit storage block size.

[0018] Optionally, the address cache module is used to receive and cache read operation addresses in continuous read operations sent by the processor;

[0019] The address conversion module is used to read at least one read operation address from the address cache module, convert the at least one read operation address into a corresponding physical read address in the memory, and read from the physical read address to obtain third data and a third check code corresponding to the third data;

[0020] The check calculation module is used to calculate a fourth check code according to the third data;

[0021] The data checking module is used to send the third data to the processor after confirming that the third check code is consistent with the fourth check code.

[0022] Optionally, the data checking module is used to generate corresponding read error prompt information after confirming that the third check code and the fourth check code are inconsistent.

[0023] In a second aspect, the present application provides a data processing system, comprising a processor, a memory, and a data processing device as described in any one of the above items.

[0024] Optionally, the memory and the data processing device communicate via a preset interface module.

[0025] It can be seen from the above scheme that the present application provides a data processing device, including: an address cache module, used to receive and cache write operation addresses in continuous write operations sent by a processor; a data cache module, used to receive and cache data to be written corresponding to the continuous write operations; an address conversion module, used to read at least one write operation address from the address cache module, convert the at least one write operation address into a corresponding physical write address in a memory, and read first data and a first check code corresponding to the first data from the physical write address; a check calculation module, used to calculate a second check code according to the first data read by the address conversion module; a data checking module, used to modify the first data according to the data to be written corresponding to the at least one write operation address to obtain new data after confirming that the first check code and the second check code are consistent and the data amount of the data to be written corresponding to the at least one write operation address is less than the unit storage block size; a data splicing module, used to splice the new data and the new check code calculated by the check calculation module according to the new data to obtain spliced ​​data, and write the spliced ​​data into the physical write address.

[0026] It can be seen that the data processing device provided by the present application decouples the reception and execution of continuous write operations. The address cache module receives and caches addresses, and the data cache module receives and caches data. The address conversion module, the verification calculation module, the data checking module and the data splicing module perform write operations based on the cached data of the address cache module and the data cache module. Therefore, the execution of the write operation does not need to wait for the verification process of the original data, which reduces the execution time of the write operation to a certain extent and improves the efficiency of the write operation.

[0027] Correspondingly, a data processing system provided by the present application also has the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present application 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 embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0029] Figure 1 A schematic diagram of a data processing device disclosed in this application;

[0030] Figure 2 A schematic diagram of another data processing device disclosed in this application;

[0031] Figure 3 A read operation processing flow chart disclosed in this application;

[0032] Figure 4 This is a write operation processing flow chart disclosed in this application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0034] At present, when performing a write operation on a memory, if the data to be written is smaller than the size of the minimum write unit, it is necessary to read the old data first, and then write the new data to be written into the memory; and the read old data needs to be verified before the write operation of the data to be written can be performed, which increases the execution time of the write operation and slows down the efficiency of the write operation. To this end, the present application provides a data processing solution that can improve the write operation efficiency of the memory.

[0035] See also Figure 1 As shown, the embodiment of the present application discloses a data processing device, including:

[0036] The address cache module is used to receive and cache write operation addresses in continuous write operations sent by the processor.

[0037] The data cache module is used to receive and cache the to-be-written data corresponding to the continuous write operation.

[0038] The address conversion module is used to read at least one write operation address from the address cache module, convert the at least one write operation address into a corresponding physical write address in the memory, and read the first data and the first check code corresponding to the first data from the physical write address.

[0039] The check calculation module is used to calculate a second check code according to the first data read by the address conversion module.

[0040] The data checking module is used to modify the first data according to the data to be written corresponding to at least one write operation address to obtain new data after confirming that the first check code and the second check code are consistent and the data amount of the data to be written corresponding to at least one write operation address is less than the unit storage block size.

[0041] The data splicing module is used to splice the new data and the new check code calculated by the check calculation module according to the new data to obtain the spliced ​​data, and write the spliced ​​data into the physical write address.

[0042] In one example, the address cache module is used to cache write operation addresses in consecutive write operations according to the order in which the consecutive write operations are received.

[0043] In one example, the data cache module is used to cache the to-be-written data corresponding to the continuous write operations according to the order in which the continuous write operations are received.

[0044] In one example, the check calculation module is used to calculate an ECC check code based on the first data read by the address conversion module, and use the ECC check code as the second check code; accordingly, the check calculation module is used to use the ECC check code calculated based on the new data as the new check code.

[0045] In one example, the data checking module is used to generate corresponding write error prompt information after confirming that the first check code and the second check code are inconsistent.

[0046] In one example, the data checking module is used to treat the data to be written corresponding to at least one write operation address as new data when confirming that the data amount of the data to be written corresponding to at least one write operation address is equal to the unit storage block size.

[0047] In one example, an address cache module is used to receive and cache read operation addresses in continuous read operations sent by a processor;

[0048] An address conversion module is used to read at least one read operation address from the address cache module, convert the at least one read operation address into a corresponding physical read address in the memory, and read the third data and the third check code corresponding to the third data from the physical read address; a check calculation module is used to calculate a fourth check code based on the third data; and a data checking module is used to send the third data to the processor after confirming that the third check code and the fourth check code are consistent.

[0049] In one example, the data checking module is used to generate corresponding read error prompt information after confirming that the third check code and the fourth check code are inconsistent.

[0050] In one example, the memory and the data processing device communicate through a preset interface module.

[0051] It can be seen that the data processing device provided in this embodiment decouples the reception and execution of continuous write operations. The address cache module receives and caches addresses, and the data cache module receives and caches data. The address conversion module, the verification calculation module, the data checking module and the data splicing module perform write operations based on the cached data of the address cache module and the data cache module. Therefore, the execution of the write operation does not need to wait for the verification process of the original data, which reduces the execution time of the write operation to a certain extent and improves the efficiency of the write operation.

[0052] The data processing device provided in this application can be used in an automobile controller to control the read and write operations of a dynamic random access memory (DRAM). Figure 2 , another data processing device comprises:

[0053] Address cache module: mainly caches addresses when the CPU performs data write operations, and also plays a sorting role to ensure the correct order of operation execution.

[0054] Address translation module: converts the address passed by the CPU into the address of DRAM.

[0055] Data cache module: stores the data to be written transmitted by the CPU and the old data read from DRAM.

[0056] Data splicing module: splices the new data to be written into DRAM and the ECC code value corresponding to the data into one data.

[0057] ECC calculation module: calculates the corresponding ECC code value based on the input data. The input data may be old data read from DRAM or new data to be written into DRAM.

[0058] Data checking module: The ECC code value obtained by the ECC calculation module is checked against the ECC code value read out with the data to check whether there is any error.

[0059] See also Figure 3 When the CPU performs a data read operation on the DRAM, it sends a read request and a read address to the data processing device; after the read address passes through the address conversion module, the DRAM is accessed from the interface to read out the data and the ECC code stored at the address; the read data enters the data check module, and the ECC calculation module recalculates the ECC code value of the data and compares it with the read ECC code value to determine whether the data is wrong; after the data is verified to be correct, the read data is sent to the CPU.

[0060] See also Figure 4 When the CPU performs a write operation on the DRAM, it sends a write request, a write address, and data to be written to the data processing device; after the address cache module and the data cache module save the address and data respectively, the CPU can continue to execute subsequent instructions without waiting for the execution of the current instruction. In addition, the address cache module and the data cache module can continue to cache the addresses and data of other subsequent instructions. After the address cache module and the data cache module store the relevant data of an instruction, they give the CPU a signal to enable the CPU to execute the next instruction.

[0061] It should be noted that there are two types of data writing operations. The first type is that the bit width of the data to be written is equal to the size of the complete storage unit. At this time, it is not necessary to take out the old data in the storage unit for verification and write the new data; the second type is that the bit width of the data to be written is less than the size of the complete storage unit, and the old data needs to be verified. The write address enters the address conversion module from the address cache module, and the old data stored in the storage unit is taken out from the corresponding address. According to the old data, the ECC code value corresponding to the old data is calculated using the ECC calculation module, and compared with the ECC code value in the storage unit to confirm that the old data taken out is error-free; after verification, the data to be written is used to replace part of the bits in the old data to form a new data; the ECC code value of the new data is calculated, and the data and the corresponding ECC code value are spliced ​​together through the data splicing module; the spliced ​​data is written to the DRAM through the interface. Based on this, it can be achieved that: when the CPU performs a write operation, there is no need to wait for the write operation to be completed, especially when the data bit width is less than the storage unit bit width, there is no need to wait for the old data to be read and verified, the replacement and verification of the new and old data, etc., which improves the instruction execution efficiency and response speed of the CPU. Through the data cache module and the address cache module in the data processing device, operations such as checking old data, replacing old and new data, and splicing new data can be completed inside the data processing device.

[0062] A data processing system provided in an embodiment of the present application is introduced below. The data processing system described below and the data processing device described above can be referenced to each other.

[0063] An embodiment of the present application discloses a data processing system, including a processor, a memory, and a data processing device as described in any of the above embodiments.

[0064] In one example, the data processing device includes:

[0065] The address cache module is used to receive and cache write operation addresses in continuous write operations sent by the processor.

[0066] The data cache module is used to receive and cache the to-be-written data corresponding to the continuous write operation.

[0067] The address conversion module is used to read at least one write operation address from the address cache module, convert the at least one write operation address into a corresponding physical write address in the memory, and read the first data and the first check code corresponding to the first data from the physical write address.

[0068] The check calculation module is used to calculate a second check code according to the first data read by the address conversion module.

[0069] The data checking module is used to modify the first data according to the data to be written corresponding to at least one write operation address to obtain new data after confirming that the first check code and the second check code are consistent and the data amount of the data to be written corresponding to at least one write operation address is less than the unit storage block size.

[0070] The data splicing module is used to splice the new data and the new check code calculated by the check calculation module according to the new data to obtain the spliced ​​data, and write the spliced ​​data into the physical write address.

[0071] In one example, the address cache module is used to cache write operation addresses in consecutive write operations according to the order in which the consecutive write operations are received.

[0072] In one example, the data cache module is used to cache the to-be-written data corresponding to the continuous write operations according to the order in which the continuous write operations are received.

[0073] In one example, the check calculation module is used to calculate an ECC check code according to the first data read by the address conversion module, and use the ECC check code as the second check code;

[0074] Correspondingly, the check calculation module is used to use the ECC check code calculated according to the new data as the new check code.

[0075] In one example, the data checking module is used to generate corresponding write error prompt information after confirming that the first check code and the second check code are inconsistent.

[0076] In one example, the data checking module is used to treat the data to be written corresponding to at least one write operation address as new data when confirming that the data amount of the data to be written corresponding to at least one write operation address is equal to the unit storage block size.

[0077] In one example, an address cache module is used to receive and cache read operation addresses in continuous read operations sent by a processor;

[0078] An address conversion module, configured to read at least one read operation address from the address cache module, convert the at least one read operation address into a corresponding physical read address in the memory, and obtain third data and a third check code corresponding to the third data from the physical read address;

[0079] A check calculation module, used for calculating a fourth check code according to the third data;

[0080] The data checking module is used to send the third data to the processor after confirming that the third check code is consistent with the fourth check code.

[0081] In one example, the data checking module is used to generate corresponding read error prompt information after confirming that the third check code and the fourth check code are inconsistent.

[0082] Among them, for more specific working processes of each module and unit in this embodiment, reference can be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0083] It can be seen that this embodiment provides a data processing system, in which the execution of the write operation does not need to wait for the verification process of the original data, which reduces the execution time of the write operation to a certain extent and improves the efficiency of the write operation.

[0084] The "first", "second", "third", "fourth", etc. (if any) referred to in this application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods or devices.

[0085] It should be noted that the descriptions involving "first", "second", etc. in this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0086] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0087] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of readable storage medium known in the art.

[0088] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data processing device, characterized in that: include: An address cache module, used for receiving and caching write operation addresses in continuous write operations sent by the processor; A data cache module, used for receiving and caching the to-be-written data corresponding to the continuous write operation; An address conversion module, configured to read at least one write operation address from the address cache module, convert the at least one write operation address into a corresponding physical write address in the memory, and read from the physical write address to obtain first data and a first check code corresponding to the first data; A check calculation module, used for calculating a second check code according to the first data read by the address conversion module; a data checking module, configured to modify the first data according to the data to be written corresponding to the at least one write operation address to obtain new data after confirming that the first check code is consistent with the second check code and the amount of the data to be written corresponding to the at least one write operation address is less than the unit storage block size; The data splicing module is used to splice the new data and the new check code calculated by the check calculation module according to the new data to obtain spliced ​​data, and write the spliced ​​data into the physical write address.

2. The data processing device according to claim 1, characterized in that: The address cache module is used to cache the write operation addresses in the continuous write operations according to the receiving order of the continuous write operations.

3. The data processing device according to claim 1, characterized in that: The data cache module is used to cache the to-be-written data corresponding to the continuous write operations according to the order in which the continuous write operations are received.

4. The data processing device according to claim 1, characterized in that: The check calculation module is used to calculate an ECC check code according to the first data read by the address conversion module, and use the ECC check code as the second check code; Correspondingly, the check calculation module is used to use the ECC check code calculated according to the new data as the new check code.

5. The data processing device according to claim 1, characterized in that: The data checking module is used to generate corresponding write error prompt information after confirming that the first check code and the second check code are inconsistent.

6. The data processing device according to claim 1, characterized in that: The data checking module is used to use the data to be written corresponding to the at least one write operation address as the new data when confirming that the data amount of the data to be written corresponding to the at least one write operation address is equal to the unit storage block size.

7. The data processing device according to any one of claims 1 to 6, characterized in that: The address cache module is used to receive and cache the read operation addresses in the continuous read operations sent by the processor; The address conversion module is used to read at least one read operation address from the address cache module, convert the at least one read operation address into a corresponding physical read address in the memory, and read from the physical read address to obtain third data and a third check code corresponding to the third data; The check calculation module is used to calculate a fourth check code according to the third data; The data checking module is used to send the third data to the processor after confirming that the third check code is consistent with the fourth check code.

8. The data processing device according to claim 7, characterized in that: The data checking module is used to generate corresponding read error prompt information after confirming that the third check code and the fourth check code are inconsistent.

9. A data processing system, characterized in that: The method comprises a processor, a memory and a data processing device as claimed in any one of claims 1 to 8.

10. The data processing system according to claim 9, characterized in that: The memory and the data processing device communicate with each other through a preset interface module.