Data processing device and memory management method

By configuring and permissions to manage memory areas in the data processing device, the problem of low memory space configuration efficiency is solved, and effective distinction and management of real-time and non-real-time data is realized, and data processing efficiency and memory utilization efficiency are improved.

CN118939569APending Publication Date: 2024-11-12REALTEK SEMICON CORP
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing data processing devices have problems of inefficiency and waste of resources in memory space configuration, especially in different application scenarios, it is difficult to effectively distinguish and manage real-time and non-real-time data processing needs.

Method used

By configuring the first and second memory areas in the memory device and managing permissions according to the application scenario, the central processing unit and the data processing circuit have the permissions to access these areas respectively, ensuring that real-time data is in the real-time area and non-real-time data is in the non-real-time area. Regional storage avoids resource grabbing and optimizes memory usage through proprietary and shared configurations of real-time subregions.

Benefits of technology

It improves data processing efficiency, reduces the waste of memory space, ensures the distinction between real-time and non-real-time data streams, avoids mutual acquisition of resources, and improves the efficiency of memory utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939569A_ABST
    Figure CN118939569A_ABST
Patent Text Reader

Abstract

The invention provides a data processing device and a memory management method. The data processing device comprises a memory device, a central processing unit and a data processing circuit. The memory device includes a first memory region and a second memory region. The central processing unit is coupled to the memory device and used for accessing the memory device, and the central processing unit accesses a first memory area and a second memory area of the memory device. The data processing circuit is coupled to the memory device and used for accessing the memory device, and the data processing circuit only accesses the first memory area of the memory device. The first memory region is configured to store a first type of data and the second memory region is configured to store a second type of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data processing device and a memory management method, and in particular to a data processing device that flexibly configures memory space according to application scenarios and a corresponding memory management method. Background Art

[0002] Data processing devices (e.g., microprocessor chips) are essential hardware components for most electronic products. According to the design functions of the electronic products, the data processing devices can implement corresponding data processing programs by executing corresponding software or firmware program codes. In the data processing program, the data processing devices usually need to access memory devices. If there is no appropriate memory space configuration, it is very likely to greatly reduce the data processing efficiency or cause a waste of memory space.

[0003] Therefore, an improved memory management method is needed. Summary of the invention

[0004] According to one embodiment of the present invention, a data processing device includes a memory device, a central processing unit and a data processing circuit. The memory device includes a first memory area and a second memory area. The central processing unit is coupled to the memory device for accessing the memory device, wherein the central processing unit accesses the first memory area and the second memory area of ​​the memory device. The data processing circuit is coupled to the memory device for accessing the memory device, wherein the data processing circuit only accesses the first memory area of ​​the memory device. The first memory area is configured to store a first type of data, and the second memory area is configured to store a second type of data.

[0005] According to another embodiment of the present invention, a memory management method is provided for managing a memory device used by a data processing device, the data processing device including a central processing unit and a data processing circuit, the memory management method including: configuring a first memory area and a second memory area in the memory device, wherein the central processing unit has access rights to the first memory area and access rights to the second memory area, and the data processing device only has access rights to the first memory area; the central processing unit or the data processing device stores a first type of data in the first memory area; and the central processing unit stores a second type of data in the second memory area. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Figure 1 is a block diagram showing an example of a data processing device according to an embodiment of the present invention.

[0007] Figure 2 FIG. 4 is a diagram showing an example of access permissions of a memory area according to an embodiment of the present invention.

[0008] Figure 3 is a flow chart showing an example of a memory management method according to an embodiment of the present invention.

[0009] Figure 4 FIG. 2 is a diagram showing an example of a configuration of memory areas of a memory device according to a first embodiment of the present invention.

[0010] Figure 5 FIG. 2 is a diagram showing an example of a configuration of memory areas of a memory device according to a second embodiment of the present invention.

[0011] Figure 6 FIG. 1 is an example showing a usage space example of expanding a real-time sub-region by using a common real-time sub-region according to the second embodiment of the present invention.

[0012] Figure 7 is a schematic diagram showing an idle graph according to an embodiment of the present invention.

[0013] Figure 8 FIG. 4 is a schematic diagram showing the flexible configuration of the sizes of access blocks for different real-time sub-regions according to an embodiment of the present invention.

[0014] Fig. 9 is a flow chart showing an example of a memory management method according to an embodiment of the present invention.

[0015] Explanation of symbols

[0016] 100,200: Data processing device

[0017] 110,210: Central Processing Unit

[0018] 120,220: Data processing circuit

[0019] 130,230: Memory device

[0020] 231: Real-time area

[0021] 232: Non-real-time area

[0022] 410-1, 410-2, 410-3, 510-1, 510-2, 510-3, 610-1: Real-time systems

[0023] 430-1,430-2,430-3,530-1,530-2,530-3,530-4,630-1,630-4,730,830-1,830-2,830-3,830-4: Real-time sub-area

[0024] 440,540: Non-real-time systems

[0025] 450,550: Non-real-time area

[0026] 660: Exclusive usage

[0027] 680: Maximum usage

[0028] 700: Idle chart DETAILED DESCRIPTION

[0029] Figure 1 1 is a block diagram showing an example of a data processing device according to an embodiment of the present invention. The data processing device 100 may include at least a central processing unit 110, a data processing circuit 120 and a memory device 130. The data processing device 100 may be implemented as a processor product, for example, a microprocessor chip. The data processing device 100 may be designed accordingly according to the functions required by the processor product, so that the data processing device can implement the corresponding data processing program by executing the corresponding software or firmware program code. The data processing circuit 120 may be any hardware device in the data processing device 100 that has the authority to access the memory device 130. For example, in one embodiment of the present invention, the data processing circuit 120 may be a direct memory access (DMA) circuit, a signal processing circuit, or others.

[0030] According to an embodiment of the present invention, in order to improve the data processing efficiency of the data processing device and reduce the waste of memory space, the memory space of the memory device 130 can be flexibly configured according to the application scenario. For example, the memory device 130 can be configured or divided into at least one first memory area and one second memory area. In an embodiment of the present invention, the central processing unit 110 has the right to access the first memory area and the right to access the second memory area, and the data processing device 120 can be configured to have at least the right to access the first memory area, or only the right to access the first memory area.

[0031] In one embodiment of the present invention, the application scenarios may include application scenarios that require real-time data processing and application scenarios that do not require real-time data processing, wherein at least one hardware circuit in the data processing device 100 and at least one software task executed by the central processing unit 110 may be associated with the application scenario that requires real-time data processing, and at least another hardware circuit in the data processing device 100 and at least another software task executed by the central processing unit 110 may be associated with the application scenario that does not require real-time data processing. The hardware circuit or software task associated with the application scenario that requires real-time data processing will be granted the right to access the first memory area, and the hardware circuit or software task associated with the application scenario that does not require real-time data processing will be granted the right to access the second memory area, but will not be granted the right to access the first memory area, so as to avoid occupying the memory resources of the first memory area. It should be noted that since the multiple software tasks executed by the central processing unit 110 may include a portion of software tasks associated with application scenarios that require real-time data processing, and may also include another portion of software tasks associated with application scenarios that do not require real-time data processing, the central processing unit 110 has both the authority to access the first memory area and the authority to access the second memory area.

[0032] Figure 2 2 is a schematic diagram showing an example of access permissions for a memory area according to an embodiment of the present invention. In this example, a data processing device 200 may include at least a central processing unit 210, a data processing circuit 220, and a memory device 230. The memory device 230 may be configured or divided into a real-time area 231 and a non-real-time area 232, and the data processing circuit 220 may be a hardware circuit associated with an application scenario that requires real-time data processing. Therefore, the data processing circuit 220 may be granted permission to access the real-time area 231, and the central processing unit 210 may be granted permission to access the real-time area 231 and permission to access the non-real-time area 232.

[0033] In addition, in one embodiment of the present invention, in order to truly distinguish data streams and effectively improve the data processing efficiency of the data processing device, the data processing circuit 220 may also be granted only the permission to access the real-time area 231. Therefore, the data processing circuit 220 may only access the real-time area 231 of the memory device 230. Similarly, other hardware circuits or software tasks associated with application scenarios that do not require real-time data processing may also be granted only the permission to access the non-real-time area 232, but not the permission to access the real-time area 231, so as to avoid occupying the memory resources of the real-time area 231.

[0034] It should be noted that although Figure 1 and Figure 2 The memory device 130 / 230 is configured as a memory device inside the data processing device 100 / 200, but the present invention is not limited thereto. In other embodiments of the present invention, the memory device that can be flexibly configured by applying the memory management method proposed in the present invention can also be a memory device outside the data processing device, so the present invention is not limited thereto. Figure 1 and Figure 2 The device architecture.

[0035] According to one embodiment of the present invention, a first memory area (or, for example, the aforementioned real-time area) may be configured to store a first type of data, a second memory area (or, for example, the aforementioned non-real-time area) may be configured to store a second type of data, and each piece of data stored in a memory device (e.g., memory device 130 / 230) may be classified as first type of data or second type of data based on a processing time of the data, and the processing time of the first type of data is generally shorter than the processing time of the second type of data.

[0036] According to one embodiment of the present invention, the processing time of a piece of data may be the length of time or the number of clock cycles (for example, the clock cycles of a central processing unit) required to use or process the data when the data is used or processed, wherein the length of time or the number of clock cycles required to use or process the data may be calculated in advance based on the number of instructions required to use or process the data and the clock cycles of the central processing unit required to execute each instruction.

[0037] According to another embodiment of the present invention, the processing time of a piece of data may also be the time during which the piece of data is retained in the corresponding memory area. Therefore, the time during which the first type of data is retained in the first memory area may be shorter than the time during which the second type of data is retained in the second memory area. For example, when a hardware circuit or a software task obtains the required information from a piece of data and determines that the data is no longer needed, the data may be deleted or discarded from the corresponding memory area, and the memory space originally used to store the data may be released. Therefore, regardless of whether the data is physically erased, it will be deemed to no longer be retained in the corresponding memory area.

[0038] According to another embodiment of the present invention, a data update rate of the first memory area (or, for example, the aforementioned real-time area) may be higher than a data update rate of the second memory area (or, for example, the aforementioned non-real-time area), wherein the data update rate of the memory area may also correspond to the memory space release rate of the memory area. Continuing with the previous example, when a memory space is released, the data stored in the memory space can be updated (for example, when the memory space is used to store new data, the data in the memory space is updated). Therefore, in the embodiment of the present invention, since the data stored in the real-time area is data that needs to be processed in real time, and its data processing time is relatively short or the time it is retained in the real-time area is relatively short, the data update rate / memory space release rate of the real-time area (or the aforementioned first memory area) may be higher than the data update rate / memory space release rate of the non-real-time area (or the aforementioned second memory area).

[0039] Figure 3 is a flow chart showing an example of a memory management method according to an embodiment of the present invention, wherein: Figure 3 Shown is a high-level flow of the memory management method, which includes the following steps:

[0040] Step S302: A first memory area and a second memory area are configured in a memory device, wherein hardware circuits or software operations associated with application scenarios that require real-time data processing will have access to the first memory area, and hardware circuits or software operations associated with application scenarios that do not require real-time data processing will have access to the second memory area.

[0041] Step S304: The hardware circuit or software that needs to perform data processing in real time stores the first type of data in the first memory area. For example, the central processing unit or data processing device that executes the software stores the first type of data in the first memory area.

[0042] Step S306: The second type of data is stored in the second memory area by a hardware circuit or software that does not need to perform real-time data processing, for example, by a central processing unit or other hardware circuit that executes software to store the second type of data in the second memory area.

[0043] According to an embodiment of the present invention, the real-time area (or the aforementioned first memory area) may be further divided into or include a plurality of sub-areas. In the first embodiment of the present invention, one of the plurality of sub-areas may be exclusively allocated to one of the plurality of tasks (e.g., tasks associated with application scenarios requiring real-time data processing) performed by the central processing unit 110 / 210, or may be exclusively allocated to a hardware circuit requiring real-time data processing, such as the data processing circuit 120 / 220. For the sake of simplicity, in the following paragraphs and Figure 4-Figure 6 In the present invention, software tasks and hardware circuits associated with application scenarios that require real-time data processing will be collectively named real-time systems, and software tasks and hardware circuits associated with application scenarios that do not require real-time data processing will be collectively named non-real-time systems. A real-time system can represent a software task that requires real-time data processing or a hardware circuit that requires real-time data processing, and a non-real-time system can represent all software tasks and hardware circuits associated with application scenarios that do not require real-time data processing.

[0044] Figure 4 1 is an example of the configuration of the memory area of ​​the memory device according to the first embodiment of the present invention. In the first embodiment of the present invention, the real-time area (or the aforementioned first memory area) is further divided into three sub-areas (hereinafter referred to as real-time sub-areas) 430-1, 430-2 and 430-3, and one of the real-time sub-areas can be exclusively allocated to one of the multiple software tasks that need to perform data processing in real time executed by the central processing unit, or be exclusively allocated to one of the hardware circuits that need to perform data processing in real time, that is, be exclusively allocated to a real-time system, wherein the exclusive allocation means that the real-time sub-area will be exclusively used by the corresponding real-time system. Figure 4 As shown, the real-time sub-area 430-1 is exclusively provided for the real-time system 410-1, the real-time sub-area 430-2 is exclusively provided for the real-time system 410-2, and the real-time sub-area 430-3 is exclusively provided for the real-time system 410-3. In addition, in this example, the non-real-time area (or the aforementioned second memory area) 450 is provided for the non-real-time system 440. In this way, data flows can be distinguished, the memory resources of the real-time area can be prevented from being occupied by the non-real-time system, and the data processing efficiency of the data processing device can be effectively improved.

[0045] In a second embodiment of the present invention, at least one of the multiple real-time sub-areas is set as a shared sub-area (hereinafter referred to as the shared real-time sub-area), and the shared real-time sub-area is shared by multiple real-time systems, while one of the remaining real-time sub-areas other than the shared real-time sub-area is exclusively allocated to a real-time system as described above.

[0046] Figure 5 2 is a diagram showing an example of the configuration of the memory area of ​​the memory device according to the second embodiment of the present invention. In the second embodiment of the present invention, the real-time area (or the aforementioned first memory area) is further divided into four sub-areas (hereinafter referred to as real-time sub-areas) 530-1, 530-2, 530-3 and 530-4, wherein the real-time sub-area 530-4 is a shared real-time sub-area. Figure 5 As shown, the real-time sub-region 530-1 is exclusively provided for the real-time system 510-1, the real-time sub-region 530-2 is exclusively provided for the real-time system 510-2, the real-time sub-region 530-3 is exclusively provided for the real-time system 510-3, and the shared real-time sub-region 530-4 can be provided for the real-time systems 530-1, 530-2 and 510-3. In addition, in this example, the non-real-time region (or the aforementioned second memory region) 550 is provided for the non-real-time system 540. In addition to distinguishing data flows, avoiding the memory resources of the real-time region from being occupied by the non-real-time system, and effectively improving the data processing efficiency of the data processing device, the shared real-time sub-region 530-4 can be dynamically and flexibly allocated to one of the software tasks or hardware circuits that need to perform data processing in real time. For example, when the exclusive real-time sub-region space configured for a real-time system is insufficient, the memory space of the shared real-time sub-region 530-4 can be used. Therefore, under the design of distinguishing data flows, the use of memory space will be more flexible.

[0047] Figure 6 1 is an example of using a shared real-time sub-region to expand the usage space of a real-time sub-region according to the second embodiment of the present invention. In this example, the real-time sub-region 630-1 is exclusively provided to the real-time system 610-1, and the real-time sub-region 630-4 is a shared real-time sub-region that can be used by all real-time systems, so the memory size that can be used by the real-time system 610-1 is between the exclusive usage 660 and the maximum usage 680.

[0048] According to an embodiment of the present invention, the real-time sub-area may be further divided into or include a plurality of access blocks of equal size, and each access block may correspond to a bit for recording the state of the access block. For example, the bit may be used to record whether the corresponding access block is in a free state (Free) or a used state (Used), wherein the free state refers to a state in which valid data has not been written to the corresponding access block, and the used state refers to a state in which valid data has been written to the corresponding access block. In other words, the access block recorded as free is an access block in which data can still be written.

[0049] In addition, in one embodiment of the present invention, the CPU 110 / 210 may maintain a free map for each real-time sub-region, and the free map may include a plurality of bits, each bit corresponding to an access block, for recording the state of the access block. The CPU 110 / 210 may store the free map in its internal memory or in the memory device 130 / 230.

[0050] Figure 7 7 is a schematic diagram showing an idle chart according to an embodiment of the present invention. Assuming that the idle chart 700 corresponds to the real-time sub-area 730, and is used to record the status of each access block of the real-time sub-area 730, and assuming that the real-time sub-area 730 includes N0 equal-sized access blocks, for example, N0 equal-sized access blocks corresponding to index values ​​0, 1, 2, ..., (N0-1) in sequence, the idle chart 700 may include N0 bits, each of which is used to record the status of an access block. As shown in the figure, in this example, since the access blocks with index values ​​2, 4, and 5 are currently in an idle state, the value of the corresponding bit in the idle chart 700 can be set to 1 to represent that the corresponding access block is in an idle state where valid data has not yet been written, and the remaining bit values ​​can be set to 0 to represent that the corresponding access block is in a used state where valid data has been written.

[0051] According to one embodiment of the present invention, the access blocks included in at least two of the plurality of sub-areas (e.g., at least two real-time sub-areas) may have different sizes. More specifically, the size of the access block may be selected to be a suitable size according to the access requirements of the corresponding real-time system. For example, assuming that the first real-time system is used to process data of a large packet, wherein the packet size is usually 512 bytes, then the size of an access block of the real-time sub-area allocated to the first real-time system may be 512 bytes. Assuming that the second real-time system is used to process data of a small packet, wherein the packet size is usually 128 bytes, then the size of an access block of the real-time sub-area allocated to the second real-time system may be 128 bytes.

[0052] Figure 81 is a schematic diagram showing the flexible allocation of access block sizes for different real-time sub-regions according to an embodiment of the present invention. In this example, the real-time region of the memory device may include at least real-time sub-regions 830-1, 830-2, 830-3 and 830-4, wherein the real-time sub-region 830-4 may be a shared real-time sub-region. The real-time sub-region 830-1 includes N0 access blocks of equal size (e.g., access blocks corresponding to index values ​​0, 1, 2, ..., (N0-1) in sequence in the figure), the real-time sub-region 830-2 includes N1 access blocks of equal size (e.g., access blocks corresponding to index values ​​0, 1, 2, ..., (N1-1) in sequence in the figure), the real-time sub-region 830-3 includes N2 access blocks of equal size (e.g., access blocks corresponding to index values ​​0, 1, 2, ..., (N2-1) in sequence in the figure), and the real-time sub-region 830-4 includes N3 access blocks of equal size (e.g., access blocks corresponding to index values ​​0, 1, 2, ..., (N3-1) in sequence in the figure).

[0053] In this example, the access block size of the real-time sub-area 830 - 1 is smaller than the access block sizes of the real-time sub-areas 830 - 2 , 830 - 3 , and 830 - 4 .

[0054] In addition, in the second embodiment of the present invention, since the shared real-time sub-area is not exclusively allocated to any one real-time system, the access block size of the shared real-time sub-area can be flexibly designed. For example, the access block size of the shared real-time sub-area is set to the minimum block size, the maximum block size, the average block size required by all real-time systems, or can be selected as the access block size required by the real-time system that is most likely to frequently use the shared real-time sub-area.

[0055] According to an embodiment of the present invention, the central processing unit 110 / 210 may also move the data stored in the real-time area (or the aforementioned first memory area) to the non-real-time area (or the aforementioned second memory area) according to data processing requirements. For example, after a real-time system completes its required data processing operation by accessing the data stored in its corresponding real-time sub-area, if it is determined that the subsequent data processing program still needs the data, but the subsequent data processing program is non-real-time data processing and can be executed by another non-real-time system, the central processing unit 110 / 210 may move the data from the real-time area to the non-real-time area to provide it to the non-real-time system for use.

[0056] Fig. 9 is a flowchart showing an example of a memory management method according to an embodiment of the present invention, which is a more detailed flowchart for illustrating the memory configuration and the corresponding memory management process for a real-time system.

[0057] In an embodiment of the present invention, application scenarios requiring real-time data processing may include receiving input data from an external or other hardware queue, or simply moving data from a source end to the memory device 130 / 230, so the above-mentioned data receiving operation may be performed by a real-time system. Fig. 9 The process may start when a given real-time system receives input data and includes the following steps:

[0058] Step S902: Search for a free bit in the free table corresponding to the predetermined real-time sub-region assigned to the predetermined real-time system. Here, the free bit represents a bit that is set to an idle state (eg, the bit value 1 in the above example). Figure 7 As shown, the bit value in the free table can be used to record whether the corresponding access block is a used access block or a free access block, and the established real-time system can obtain the index value of the free access block by searching the free bit in the free table accordingly.

[0059] Step S904: Determine whether the given real-time sub-area is full based on the search results. For example, in step S902, a variable that is an integer can be used to search for free bits in the free table by setting the value of the variable to 0 and starting to accumulate. If the value of the variable accumulates to equal the value N, p , no free bits are found, the search result can be set to FULL, indicating that the corresponding established real-time sub-area has been filled, where the value N p The number of access blocks contained in the given real-time sub-area. If the value of this variable is accumulated to the value N p Previously, a free bit is found, for example, at least one bit with a bit value of 1 is found from the corresponding free table, and the search result can be set as the variable value when the free bit is found. According to the search result, if the predetermined real-time sub-region is full, step S910 is executed. If the predetermined real-time sub-region is not full, step S906 is executed.

[0060] Step S906: Write data into the predetermined real-time sub-region assigned to the predetermined real-time system. The predetermined real-time system can calculate the memory address of the free access block according to the obtained variable value, the starting memory address of the predetermined real-time sub-region and the access block size, and write the data into the free access block.

[0061] Step S908: Set the corresponding bit value in the free table of the access block to which the data is written in step S906 to 0, so as to represent that the access block is in a used state where valid data has been written.

[0062] Step S910: Determine whether the shared real-time sub-area is full. The established real-time system can use the variables to search the free table corresponding to the shared real-time sub-area to find out whether there are free bits to determine whether the shared real-time sub-area is full. If yes, execute step S916. If no, execute step S912.

[0063] Step S912: Write data into the shared real-time sub-region. Similarly, the established real-time system can calculate the memory address of the free access block in the shared real-time sub-region according to the variable value obtained in step S910, the starting memory address of the shared real-time sub-region and the access block size, and write the data into the free access block.

[0064] Step S914: Set the corresponding bit value of the access block in the free table to 0 in the step S912 to represent that the access block is in a used state where valid data has been written.

[0065] Step S916: End the real-time data processing and start the error handling process. In this step, since the predetermined real-time sub-area and the shared real-time sub-area that can be used by the predetermined real-time system are all full, it means that the current memory configuration may be improper or there may be errors, so it is necessary to trigger the error handling process to try to find and repair the errors.

[0066] Step S918: Determine whether the written data needs to be processed in real time. If yes, execute step S920. If no, execute step S922.

[0067] Step S920: The predetermined real-time system performs the required real-time data processing. After the real-time data processing is completed, step S926 is executed.

[0068] Step S922: The central processing unit moves the data from the real-time area to the non-real-time area to provide the data to the non-real-time system.

[0069] Step S924: Start the non-real-time data processing process. It should be noted that the non-real-time data processing process can be performed in parallel with the current real-time data processing. Therefore, after step S922, the central processing unit can continue to perform steps S924 and S926.

[0070] Step S926: Set the corresponding bit value in the free table of the access block to which the data is written in step S906 to 1, so as to represent that the access block is in a free state.

[0071] Step S928: Determine whether there is only one free bit in the free chart corresponding to the predetermined real-time sub-region or the free chart corresponding to the shared real-time sub-region. If so, it means that the current demand for memory space is large, which means that there may still be data stuck in the queue of the external or other hardware waiting to be written to the memory device 130 / 230, so step S930 is executed. If not, the program can be terminated. It should be noted that the present invention is not limited to being set to determine that only one bit is a free bit, and it is also possible to determine whether multiple (for example, a predetermined number) bits are free bits in step S928.

[0072] Step S930: Trigger the hardware circuit to continue receiving data from the queue and pass the data to the predetermined real-time system or any real-time system to write the data into the memory device 130 / 230.

[0073] In an embodiment of the present invention, by allocating a dedicated real-time sub-area to each real-time system, each real-time system can retain basic usage space, and divide the corresponding real-time sub-area into access blocks of the same size according to its needs. By using the bit values ​​and bit index values ​​recorded in the free chart, the free access blocks in the real-time sub-area can be quickly searched, which greatly reduces the number of clock cycles required to search for available memory space in the existing design, thereby effectively shortening the time required to perform memory configuration. In addition, in an embodiment of the present invention, by additionally configuring a shared real-time sub-area, the usage space of the real-time sub-area that can be used by each real-time system can be flexibly expanded, making the use of memory more efficient.

[0074] In addition, in an embodiment of the present invention, real-time and non-real-time data flows can be clearly distinguished, wherein hardware circuits or software operations associated with application scenarios that do not require real-time data processing can be restricted from accessing the real-time area to avoid occupying memory resources in the real-time area, and effectively avoid the situation where the real-time system and the non-real-time system compete for memory resources.

[0075] The above descriptions are only preferred embodiments of the present invention. All equivalent changes and modifications made according to the claims of the present invention should fall within the scope of the present invention.

Claims

1. A data processing device, comprising: A memory device comprising a first memory area and a second memory area; a central processing unit, coupled to the memory device, for accessing the memory device, wherein the central processing unit accesses the first memory area and the second memory area of ​​the memory device; as well as a data processing circuit coupled to the memory device for accessing the memory device, wherein the data processing circuit only accesses the first memory area of ​​the memory device, and The first memory area is configured to store a first type of data, and the second memory area is configured to store a second type of data. 2 . The data processing device as claimed in claim 1 , wherein each piece of data stored in the memory device is classified as the first type of data or the second type of data according to a processing time of the data. 3 . The data processing apparatus as claimed in claim 2 , wherein a processing time of the first type of data is shorter than a processing time of the second type of data. 4 . The data processing apparatus according to claim 1 , wherein a time for which the first type of data is retained in the first memory area is shorter than a time for which the second type of data is retained in the second memory area. 5 . The data processing apparatus as claimed in claim 1 , wherein the central processing unit further moves the data stored in the first memory area to the second memory area. 6 . The data processing apparatus as claimed in claim 1 , wherein the first memory area is divided into a plurality of sub-areas, and each sub-area includes a plurality of access blocks of equal size. 7 . The data processing device as claimed in claim 6 , wherein the access blocks included in at least two of the plurality of sub-areas have different sizes.

8. The data processing apparatus as claimed in claim 6, wherein one of the plurality of sub-areas is exclusively allocated to one of a plurality of tasks executed by the central processing unit, and another one of the plurality of sub-areas is exclusively allocated to the data processing circuit.

9. A data processing device as described in claim 6, wherein the multiple sub-regions include a common sub-region, which is shared by multiple tasks executed by the central processing unit and the data processing circuit, and one of the remaining sub-regions of the multiple sub-regions except the common sub-region is exclusively allocated to the data processing circuit or one of the multiple tasks.

10. A memory management method for managing a memory device used by a data processing device, the data processing device comprising a central processing unit and a data processing circuit, the memory management method comprising: A first memory area and a second memory area are configured in the memory device, wherein the central processing unit has the authority to access the first memory area and the authority to access the second memory area, and the data processing device only has the authority to access the first memory area; The central processing unit or the data processing device stores data of a first type in the first memory area; as well as The central processing unit stores data of a second type in the second memory area.