Discrete DMA data transfer system

By configuring the byte enable signal and mapping information in the DMA control module, and directly writing the target data in the extended memory, the problem that traditional DMA technology cannot handle discrete DMA data transmission is solved and the transmission efficiency is improved.

CN117667790BActive Publication Date: 2024-10-15SHANGHAI UNIVISTA IND SOFTWARE GRP CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202211018499.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-24
Publication Date
2024-10-15
Estimated Expiration
2042-08-24

AI Technical Summary

Technical Problem

Existing DMA technology cannot directly handle discrete DMA data transmission, resulting in the need to read and rewrite the entire data when accessing the target user-designed memory block, which reduces transmission efficiency.

Method used

By using the byte enable signal configuration method in the DMA control module, the byte enable sequence and mapping information are generated to realize direct writing of target data to the extended memory and avoid the impact of non-target data.

Benefits of technology

It realizes that a single write access can complete the write operation of the target user's designed storage block, which significantly improves the efficiency of discrete DMA data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117667790B_ABST
    Figure CN117667790B_ABST
Patent Text Reader

Abstract

The present invention relates to a discrete DMA data transmission system, comprising: a DUT, comprising N internal storage units {U1, U2, ... U N}; simulator, used to combine {U1, U2, ...U N The stored data is spliced ​​and mapped to the address space corresponding to the extended memory; the PC is used to obtain the preset data splicing rules and the address space corresponding to the extended memory from the emulator to generate mapping information; it is also used to obtain the write access request and the corresponding mapping information, generate a byte enable sequence, and send it to the DMA control module; the byte enable configurator is used to configure the state of each byte enable signal line according to the byte enable sequence; the DMA controller is used to generate a read-write control signal and an address signal based on the corresponding mapping information, and write the target data corresponding to the write access request into the target address of the spliced ​​data in the corresponding extended memory. The present invention improves the efficiency of discrete DMA data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a discrete DMA data transmission system. Background Art

[0002] Existing computers (PCs) access extended memories other than computer memory sticks, such as static random access memory (SRAM) or double data rate synchronous dynamic random access memory (DDR), through direct memory access (DMA) technology. Existing DMA transmission can only implement overall byte enable control, making all byte enables continuously valid and supporting continuous data transmission.

[0003] In existing large-scale hardware simulators or prototype verification platforms, there are situations where large-capacity extended memory SRAM, DDR and other memories are used to simulate chip storage. In specific applications, multiple storage blocks inside the user design under test (DUT) are usually mapped to the same large-capacity extended memory memory. Since the data width of the internal storage block of the DUT is inconsistent with the data width of the extended memory memory, several ports are usually spliced ​​together and placed in the same extended memory data port when data splicing is performed, making DMA transmission non-aligned transmission or non-continuous DMA transmission, collectively referred to as discrete DMA data transmission. PC backdoor access to the extended memory is often implemented by DMA technology transmission. Traditional DMA technology cannot directly process discrete DMA data transmission. In order to avoid affecting the contents of other user storage blocks when accessing one of the target user design storage blocks, all data stored in the extended memory memory must be read out first, and then only the part corresponding to the target user design storage block is replaced, and then the entire data is rewritten to the extended memory using DMA, which greatly reduces the efficiency of discrete DMA data transmission. Summary of the invention

[0004] The present invention aims to provide a discrete DMA data transmission system to improve the efficiency of discrete DMA data transmission.

[0005] The present invention provides a discrete DMA data transmission system, comprising a user-designed DUT to be tested, a simulator, a computer PC, a DMA control module and an extended memory, wherein the DUT, the simulator and the extended memory are connected in sequence; the PC, the DMA control module and the extended memory are connected in sequence; the simulator is connected to the PC;

[0006] The DUT includes N internal storage units {U 1 , U 2 , …U N},U n is the nth internal storage unit, and the value of n ranges from 1 to N;

[0007] The simulator is used to combine {U 1 , U 2 , …U N}The stored data is concatenated and mapped to the address space corresponding to the extended memory, U n The data bit width is less than or equal to the data bit width M of the extended memory;

[0008] The PC is used to obtain the preset data splicing rules and the address space corresponding to the extended memory from the simulator to generate mapping information; it is also used to obtain a write access request, and based on the write access request, obtain the corresponding mapping information, generate a byte enable sequence, and send the mapping information and the byte enable sequence to the DMA control module;

[0009] The DMA control module includes a byte enable configurator and a DMA controller. The byte enable configurator is used to configure the state of each byte enable signal line according to the byte enable sequence; the DMA controller is used to generate a read / write control signal and an address signal based on the corresponding mapping information, and write the target data corresponding to the write access request into the target address of the spliced ​​data in the corresponding extended memory, while the data of the non-target address of the spliced ​​data in the corresponding extended memory remains unchanged.

[0010] Compared with the prior art, the present invention has obvious advantages and beneficial effects. By means of the above technical solution, the discrete DMA data transmission system provided by the present invention can achieve considerable technical advancement and practicality, and has wide industrial utilization value, and has at least the following advantages:

[0011] The system of the present invention adopts a method of directly modifying the byte enable signal in the DMA transmission interface, so that a single write can complete the write access of the target user-designed storage block, solving the problem that traditional DMA transmission cannot directly process discrete DMA data transmission, and greatly improving the efficiency of discrete DMA data transmission.

[0012] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 A schematic diagram of a discrete DMA data transmission system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0014] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation method and effects of a discrete DMA data transmission system proposed according to the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments.

[0015] The embodiment of the present invention provides a discrete DMA data transmission system, such as Figure 1 As shown, it includes a user-designed DUT to be tested, an emulator, a computer PC, a DMA control module and an extended memory, wherein the DUT, the emulator and the extended memory are connected in sequence; the PC, the DMA control module and the extended memory are connected in sequence; and the emulator and the PC are connected. The extended memory can specifically be an extended memory such as SRAM or DDR. In the embodiment of the present invention, the DMA control module can be used to realize data exchange between the extended memory and the PC memory, and data exchange between the extended memories. That is, the data in the extended memory can be mapped to the PC memory, and the data in the PC memory can be mapped to the extended memory, and data mapping between the extended memories can also be realized.

[0016] The DUT includes N internal storage units {U 1 , U 2 , …U N},U n The nth internal storage unit, n ranges from 1 to N. It can be understood that N is a positive integer greater than or equal to 2, and the data bit widths of different internal storage units can be the same or different. The DUT can map the data of the DUT internal storage unit to the extended memory through the simulator, and can also obtain data from the extended memory through the simulator.

[0017] The simulator is used to combine {U 1 , U 2 , …U N}The stored data is concatenated and mapped to the address space corresponding to the extended memory, U n The data bit width of the extended memory is less than or equal to the data bit width M of the extended memory, so it is usually necessary to 1 , U 2 , …U N} data to avoid wasting memory. It should be noted that in most cases, U n The data bit width of is smaller than the data bit width M of the extended memory. In the simulator, the corresponding splicing rules are pre-set according to the simulation requirements or verification requirements of the specific large-scale hardware simulator or prototype verification platform.

[0018] As an embodiment, the simulator is specifically used to convert {U 1 i ,U 2 i ,…U z(i) i} corresponding data concatenation generates the M-bit data stored for the i-th time, and stores it in the address space corresponding to the extended memory. As described in the above example, the {U 1 i ,U 2 i ,…U z(i) i} corresponding data to generate the M-bit data stored for the i-th time, it is not necessary to simultaneously 1 i ,U 2 i ,…U z(i) i} is stored in the address space corresponding to the extended memory, but according to the splicing rule, time division multiplexing and other methods are used to store U x i The corresponding data, the final stored result can meet the splicing rules. x i is the xth internal storage unit in the i-th storage process, U 1 i , U 2 i ,…U z(i) i All belong to {U 1 , U 2 , …U N}, the value range of x is 1 to Z(i), Z(i) is a function of i, that is, when i takes different values, the value of Z(i) may be different, of course, it may also be the same. The value range of i is 1 to P, P is the total number of storage times executed by DUT to the extended memory.

[0019] As an embodiment, all i-th data splicing rules are the same, {U 1 i ,U 2 i ,…U z(i) i}={U 1 , U 2 , …U N}. The DUT only includes two internal storage units {U 1 , U 2}, the splicing rule is U 1The data is mapped to the upper M / 2 bits, U 2 For example, the data is mapped to the lower M / 2 bits. 1 and U 2 Specifically, data can be mapped to the extended memory by time division multiplexing. 1 and U 2 After the data is spliced, it is mapped to the extended memory at the same time. Instead, after the splicing rules are set, the address space of the extended memory mapped by each internal storage unit is determined, and then the data of different internal storage units are mapped to the extended memory through time division multiplexing.

[0020] It is understandable that the above example is only a simple example, and there may be more internal storage units, and more complex splicing rules may be set, and a splicing rule may be set for each M bits of data. As another embodiment, among all the i-th data splicing rules, some rules are the same, or all rules are different, {U 1 i ,U 2 i ,…U z(i) i} is {U 1 , U 2 , …U N}. With M = 64, the DUT includes 4 internal storage units {U 1 , U 2 , U 3 , U 4} as an example 1 The data bit width is 32, U 2 , U 31 The data bit width is 16, U 4 The data bit width is 8. According to application requirements, the following rules can be set: For the first 4 mappings, the [31,0] bit corresponds to U 1 The data [47,32] bits correspond to U 2 The data [63,48] bit corresponds to U 2 Data; for the 5th to 10th mappings, [15,0] corresponds to U 2 data, [47,16] corresponds to U 1 data, [55,48] corresponds to U 4 The data [63,56] is set to invalid... The preset data splicing rules can be flexibly set according to specific application requirements and will not be listed one by one.

[0021] The PC is used to obtain the preset data splicing rules and the address space corresponding to the extended memory from the simulator to generate mapping information; it is also used to obtain a write access request, and based on the write access request, obtain the corresponding mapping information, generate a byte enable sequence, and send the mapping information and the byte enable sequence to the DMA control module. It should be noted that the PC can also obtain a read access request, and can also generate a byte enable sequence according to a similar method to the write access request, so that different byte enable settings are valid or invalid. It can also directly read out all the M bits of data corresponding to the extended memory according to the existing DMA technology, and then obtain the target data therefrom.

[0022] As an embodiment, the PC is specifically used to obtain the i-th splicing rule and the address space corresponding to the extended memory from the simulator, and generate corresponding mapping information, wherein the mapping information includes each U corresponding to the i-th storage process. x i , each U x i The corresponding address information can be used to determine the address of the M-bit data corresponding to the extended memory and the U corresponding to the data stored in the M bits based on the corresponding mapping information. x i .

[0023] It should be noted that the system described in the embodiment of the present invention is usually used in a large-scale hardware simulator or a prototype verification platform. If the data in the extended memory is changed through the DUT, the operation speed is very slow. Therefore, it is usually necessary to perform backdoor access through the PC to change it, that is, write the target data into the target address space corresponding to the extended memory. As an embodiment, in the process of processing the write access of the PC backdoor access, the PC is specifically used to obtain a write access request, parse the target data corresponding to the write access request, and the U corresponding to the target data from the write access request. n , based on the U corresponding to the target data n Obtain corresponding mapping information, and generate a byte enable sequence list based on the corresponding mapping information {S 1 , S 2 ,…S Y},S y is the byte enable sequence corresponding to the yth write to the extended memory of the write access request, the value range of y is 1 to Y, Y is the total number of writes corresponding to the write access request, S y = {r 1 y ,r 2 y ,…r Q y},r q y For S yThe corresponding qth byte enable signal, r q y When the corresponding storage address is the target address corresponding to the target data, it is set to be valid; q y When the corresponding storage address is a non-target address corresponding to non-target data, it is set to invalid. Q is the total number of bytes corresponding to the extended memory, Q=M / B, and B is the number of bits corresponding to each byte. The value of B is usually 8, that is, 8 bits correspond to one byte, but it should be noted that, according to application requirements, the value of B can also be 9, 10, etc., that is, 9 bits or 10 bits correspond to one byte. Preferably, the value of M is an integer power of 2, the value of B is 8, M is set to 32 bits, 64 bits or 128 bits, etc., and the corresponding value of Q is 4, 8 or 16.

[0024] The DMA control module includes a byte enable configurator and a DMA controller. The byte enable configurator is used to configure the state of each byte enable signal line according to the byte enable sequence. It should be noted that the initial state of all byte enable signal lines can be configured as a valid state; the DMA controller is used to generate control signals such as read-write control signals and address signals in addition to the byte enable control signal based on the corresponding mapping information, and write the target data corresponding to the write access request into the target address of the spliced ​​data in the corresponding extended memory, and the data of the non-target address of the spliced ​​data in the corresponding extended memory remains unchanged. In this way, it is possible to achieve that the M-bit data where the target data is located does not need to be read out in full, and is directly written into the corresponding extended memory based on the write access, and will not affect the non-target data, which greatly improves the processing efficiency of DMA discrete data write access.

[0025] As an embodiment, the DMA control module further includes a counter for determining the number of times the extended memory is written, and when it is determined to be the yth time, the byte enable configurator is specifically used to y Configure the state of each byte enable signal line.

[0026] The system described in the embodiment of the present invention adopts a method of directly modifying the byte enable signal in the DMA transmission interface, so that a single write can complete the write access of the target user-designed storage block, solving the problem that traditional DMA transmission cannot directly process discrete DMA data transmission, and greatly improving the efficiency of discrete DMA data transmission.

[0027] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.

Claims

1. A discrete DMA data transmission system, characterized in that: It includes a user-designed DUT to be tested, a simulator, a computer PC, a DMA control module and an extended memory, and the DUT, the simulator and the extended memory are connected in sequence; The PC, DMA control module and extended memory are connected in sequence; the emulator is connected to the PC; The DUT includes N internal storage units {U1, U2, ...U N },U n is the nth internal storage unit, and the value of n ranges from 1 to N; The simulator is used to combine {U1, U2, ...U N }The stored data is concatenated and mapped to the address space corresponding to the extended memory, U n The data bit width is less than or equal to the data bit width M of the extended memory; The PC is used to obtain the preset data splicing rules and the address space corresponding to the extended memory from the simulator to generate mapping information; it is also used to obtain a write access request, and based on the write access request, obtain the corresponding mapping information, generate a byte enable sequence, and send the mapping information and the byte enable sequence to the DMA control module; The DMA control module includes a byte enable configurator and a DMA controller. The byte enable configurator is used to configure the state of each byte enable signal line according to the byte enable sequence; the DMA controller is used to generate a read / write control signal and an address signal based on the corresponding mapping information, and write the target data corresponding to the write access request into the target address of the spliced ​​data in the corresponding extended memory, while the data of the non-target address of the spliced ​​data in the corresponding extended memory remains unchanged.

2. The system according to claim 1, characterized in that The simulator is specifically used to convert {U1 i ,U2 i ,…U z(i) i } corresponding data splicing generates the M-bit data stored for the i-th time and stores it in the address space corresponding to the extended memory, where U x i is the xth internal storage unit in the i-th storage process, U1 i 、U2 i ,…U z(i) i All belong to {U1, U2, ...U N }, x ranges from 1 to z(i), z(i) is a function of i, i ranges from 1 to P, and P is the total number of storage times performed by the DUT to the extended memory.

3. The system according to claim 2, characterized in that All i-th data concatenation rules are the same, {U1 i ,U2 i ,…U z(i) i }={U1,U2,…U N }.

4. The system according to claim 2, characterized in that Among all the i-th data concatenation rules, some rules are the same, or all rules are different, {U1 i ,U2 i ,…U z(i) i } is {U1, U2, ...U N }.

5. The system according to claim 2, characterized in that The PC is specifically used to obtain the i-th splicing rule and the address space corresponding to the extended memory from the simulator, and generate corresponding mapping information, wherein the mapping information includes each U corresponding to the i-th storage process. x i , each U x i The corresponding address information.

6. The system according to claim 5, characterized in that The PC is specifically used to obtain a write access request, parse the target data corresponding to the write access request, and the U corresponding to the target data from the write access request. n , based on the U corresponding to the target data n Obtain corresponding mapping information, and generate a byte enable sequence list {S1, S2, ... S Y },S y is the byte enable sequence corresponding to the yth write to the extended memory of the write access request, the value range of y is 1 to Y, Y is the total number of writes corresponding to the write access request, S y ={r1 y ,r2 y ,…r Q y },r q y For S y The corresponding qth byte enable signal, r q y When the corresponding storage address is the target address corresponding to the target data, it is set to be valid; q y When the corresponding storage address is a non-target address corresponding to non-target data, it is set to invalid. Q is the total number of bytes corresponding to the extended memory, Q=M / B, and B is the number of bits corresponding to each byte.

7. The system according to claim 6, characterized in that The DMA control module further includes a counter for determining the number of times the extended memory is written. When it is determined to be the yth time, the byte enable configurator is specifically used to y Configure the state of each byte enable signal line.

8. The system according to claim 1, characterized in that The extended memory is SRAM or DDR.

Citation Information

Patent Citations

  • DMA controller and transmission method of implementing high efficient DMA transmission

    CN101046786A

  • Dma transfer control apparatus

    CN101118524A

  • DRAM (Dynamic Random Access Memory) access system based on mirror image storage

    CN114564423A

  • Data processing system for discrete DMA data access

    CN117667789A

  • Direct memory access controller handling exceptions during transferring multiple bytes in parallel

    US5465340A