Data transmission method, device, equipment and medium

The data transmission method optimizes bus efficiency by determining bit width and address splicing conditions to manage data transmission, addressing inefficiencies in SoC bus systems with varying subsystem data widths and protocols.

CN119065998APending Publication Date: 2024-12-03SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The increasing complexity of System on Chips (SoC) and varying data widths and transmission protocols among subsystems lead to inefficient bus transmission due to narrow bus usage and frequent response time occupation.

Method used

A data transmission method that determines bit width and address splicing conditions to optimize data transmission, including bit width and address splicing based on bus compatibility and transmission type, using a cache to manage spliced data before sending it to the external bus.

Benefits of technology

Improves bus transmission efficiency by avoiding narrow bus transmission and reducing the number of requests, thus enhancing overall bus performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065998A_ABST
    Figure CN119065998A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device, equipment and a medium, and relates to the technical field of computers, and the method comprises the steps: obtaining a judgment result whether a bit width splicing condition is satisfied or not according to the data bit width of a target bus and the data bit width of an external bus; the target bus comprises a bus used by the functional component and a bus used by the subsystem; generating a control instruction according to the judgment result, the transmission type and the continuity of the data address; the control instruction represents whether the bit width is spliced and / or whether the address is spliced; if the control instruction represents that bit width splicing is carried out, bit width splicing is carried out on current data sent by the target bus; and if the control instruction represents that the addresses are spliced, splicing the data addresses, obtaining a current bus signal according to an address splicing result and a judgment result, and sending a bit width splicing result to an external bus based on the current bus signal. According to the invention, the narrow transmission of the bus is avoided, the number of requests to the external bus is reduced, and the transmission efficiency is improved.
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 data transmission method, device, equipment and medium. Background Art

[0002] In a computer system, the external bus is responsible for all data transmission, and each subsystem must communicate through the bus. As the scale of SoC (System on Chips) becomes larger and larger, the design complexity is increasing, and the requirements for bus performance are also getting higher and higher. However, due to various differences in the functional components or subsystems connected to the bus, such as different bit widths of transmitted data and different transmission protocols, it is difficult to achieve unified transmission.

[0003] In this case, since the data width of the external bus must be greater than or equal to the largest data width of all functional components or subsystems, when a functional component or subsystem with a smaller data width interacts with the bus, only a portion of the bus's data width may be used, resulting in low transmission efficiency. See Figure 1 As shown, further, when a functional component or subsystem repeatedly initiates data transmission requests with consecutive addresses to the external bus, the multiple responses of the external bus will occupy the response time and reduce the bus transmission efficiency, see Figure 2 As shown, for this reason, the above problems need to be solved urgently by those skilled in the art. Summary of the invention

[0004] In view of this, the object of the present invention is to provide a data transmission method, device, equipment and medium, which can avoid bus narrow transmission and reduce the number of requests to the external bus, thereby improving the bus transmission efficiency. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a data transmission method, comprising:

[0006] Obtaining a determination result of whether a bit width splicing condition is met according to a first data bit width of the target bus and a second data bit width of the external bus; wherein the target bus includes a bus used by a pre-designed target functional component and a bus used by a target subsystem including the target functional component;

[0007] Determining the transmission type and current data address of the current data sent by the target bus, and determining the continuity of the current data address; the transmission type includes burst transmission and non-burst transmission;

[0008] Generate a control instruction according to the determination result, the transmission type and the continuity of the current data address; the control instruction indicates whether to splice the bit width and / or whether to splice the address;

[0009] If the control instruction indicates that bit width splicing is to be performed, bit width splicing is performed on the current data sent by the target bus, and the preset cache is controlled to cache the corresponding bit width splicing result;

[0010] If the control instruction indicates address splicing, the current data address is spliced, and a current bus signal is obtained according to the corresponding address splicing result and the determination result, and the bit width splicing result in the preset cache is sent to the external bus based on the current bus signal.

[0011] Optionally, obtaining a determination result of whether a bit width splicing condition is met according to a first data bit width of the target bus and a second data bit width of the external bus includes:

[0012] When the ratio of the second data bit width of the external bus to the first data bit width of the target bus is not less than a preset value, obtaining the determination result that satisfies the bit width splicing condition;

[0013] When the ratio of the second data bit width of the external bus to the first data bit width of the target bus is smaller than the preset value, the determination result that the bit width splicing condition is not met is obtained.

[0014] Optionally, generating a control instruction according to the determination result, the transmission type and the continuity of the current data address includes:

[0015] If the determination result satisfies the bit width splicing condition and the current data addresses are continuous, generating a first control instruction for splicing the bit width and the address;

[0016] If the determination result does not satisfy the bit width splicing condition and the current data addresses are continuous, generating a second control instruction for splicing only the addresses;

[0017] If the determination result satisfies the bit width splicing condition, the transmission type is the burst transmission, and the current data address is discontinuous, then generating a third control instruction for splicing only the bit width;

[0018] If the states corresponding to the current data address, the determination result, and the transmission type match any target state in a preset state set, a fourth control instruction is generated that does not splice the bit width and the address; wherein the preset state set includes a first target state, a second target state, and a third target state; the first target state is that the current data address is discontinuous, the determination result does not satisfy the bit width splicing condition, and the transmission type is the non-burst transmission, the second target state is that the current data address is discontinuous, the determination result does not satisfy the bit width splicing condition, and the transmission type is the burst transmission, and the third target state is that the current data address is discontinuous, the determination result satisfies the bit width splicing condition, and the transmission type is the non-burst transmission.

[0019] Optionally, performing bit width splicing on the current data sent by the target bus includes:

[0020] A time window threshold is set, and bit width splicing is performed on the current data within the time window threshold sent by the target bus.

[0021] Optionally, in the process of controlling the preset cache to cache the corresponding bit width splicing result, the following is further included:

[0022] Obtaining the current remaining memory of the preset cache;

[0023] Determine whether to continue controlling the preset cache to cache the bit width splicing result or directly send the bit width splicing result in the preset cache to the external bus based on the current bus signal according to the current remaining memory and the time window threshold.

[0024] Optionally, sending the bit width splicing result in the preset cache to the external bus based on the current bus signal includes:

[0025] Based on the current bus signal and through a write operation, the bit width splicing result in the preset cache is written into a first-in-first-out queue so that the external bus can perform a read operation; wherein the clock domain of the write operation is the clock domain of the target bus, and the clock domain of the read operation is the clock domain of the external bus.

[0026] Optionally, the concatenating the current data addresses includes:

[0027] The current data address is concatenated with the previous data address; wherein the previous data address is the data address of the previous data sent by the target bus.

[0028] In a second aspect, the present application discloses a data transmission device, comprising:

[0029] A bit width comparison module, used to determine whether a bit width splicing condition is met according to a first data bit width of the target bus and a second data bit width of the external bus; wherein the target bus includes a bus used by a pre-designed target functional component and a bus used by a target subsystem including the target functional component;

[0030] A transmission type and address determination module, used to determine the transmission type and current data address of the current data sent by the target bus, and determine the continuity of the current data address; the transmission type includes burst transmission and non-burst transmission;

[0031] A control instruction generation module, used to generate a control instruction according to the determination result, the transmission type and the continuity of the current data address; the control instruction indicates whether to splice the bit width and / or whether to splice the address;

[0032] A bit width splicing module, configured to perform bit width splicing on the current data sent by the target bus if the control instruction indicates that the bit width is to be spliced, and control a preset cache to cache a corresponding bit width splicing result;

[0033] An address splicing module, configured to splice the current data address if the control instruction indicates that the address is to be spliced;

[0034] The data sending module is used to obtain a current bus signal according to a corresponding address splicing result and the determination result, and then send the bit width splicing result in the preset cache to the external bus based on the current bus signal.

[0035] In a third aspect, the present application discloses an electronic device, including:

[0036] Memory, used to store computer programs;

[0037] The processor is used to execute the computer program to implement the aforementioned disclosed data transmission method.

[0038] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed data transmission method is implemented.

[0039] It can be seen that the present application proposes a data transmission method, comprising: obtaining a determination result of whether a bit width splicing condition is met according to a first data bit width of a target bus and a second data bit width of an external bus; wherein the target bus includes a bus used by a pre-designed target functional component and a bus used by a target subsystem including the target functional component; determining a transmission type and a current data address of current data sent by the target bus, and determining the continuity of the current data address; the transmission type includes burst transmission and non-burst transmission; generating a control instruction according to the determination result, the transmission type and the continuity of the current data address; the control instruction indicates whether to splice the bit width and / or whether to splice the address; if the control instruction indicates that the bit width is spliced, the current data sent by the target bus is spliced ​​in bit width, and the preset cache is controlled to cache the corresponding bit width splicing result; if the control instruction indicates that the address is spliced, the current data address is spliced, and a current bus signal is obtained according to the corresponding address splicing result and the determination result, and then the bit width splicing result in the preset cache is sent to the external bus based on the current bus signal. In summary, the present application determines whether the bit width splicing condition is met based on the relationship between the second data bit width of the external bus and the first data bit width of the target bus, and determines whether to perform data bit width splicing and address splicing based on whether the bit width splicing condition is met, whether the current address is continuous, and the data transmission type. It can be understood that the data bit width splicing performed by the present application can change the data bit width when the target functional component or subsystem transmits data, thereby avoiding bus narrow transmission to improve bus transmission efficiency. The address splicing performed by the present application can reduce the number of requests to the external bus, thereby reducing the time of occupying the bus response channel to further improve bus transmission efficiency, solves the problem of narrow bus transmission caused by the inconsistency between the data bit width used by the target functional component or subsystem and the data bit width used by the external bus in traditional technology, and solves the problem of long bus response channel occupation time caused by frequent transmission requests sent to the bus in traditional technology. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 A schematic diagram of a conventional narrow transmission disclosed in this application;

[0042] Figure 2A schematic diagram of a continuous address request disclosed in the present application and multiple responses from an external bus;

[0043] Figure 3 A flow chart of a data transmission method disclosed in this application;

[0044] Figure 4 A schematic diagram of the structure of a device for changing data bit width and data address disclosed in the present application;

[0045] Figure 5 A schematic diagram of data splicing within a time window disclosed in this application;

[0046] Figure 6 A flow chart of a data transmission method disclosed in this application;

[0047] Figure 7 A schematic diagram of splicing data to reduce the transmission cycle disclosed in the present application;

[0048] Figure 8 A schematic diagram of splicing multiple non-burst transmissions with consecutive addresses into a burst transmission disclosed in the present application;

[0049] Fig. 9 A schematic diagram of changing narrow transmission by bit width splicing disclosed in the present application;

[0050] Fig.10 A schematic diagram of changing multiple responses by address splicing disclosed in this application;

[0051] Fig.11 This is a schematic diagram of the structure of a data transmission device disclosed in this application;

[0052] Fig.12 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

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

[0054] Since the data bit width of the external bus must be greater than or equal to the maximum data bit width of all functional components or subsystems, when a functional component or subsystem with a smaller data bit width interacts with the bus, only a portion of the bus's data bit width may be used, resulting in lower transmission efficiency. Furthermore, when a functional component or subsystem initiates data transmission requests with consecutive addresses to the external bus multiple times, the multiple responses of the external bus will take up response time and reduce the bus transmission efficiency.

[0055] To this end, an embodiment of the present application proposes a data transmission scheme that can avoid bus narrow transmission and reduce the number of requests to the external bus, thereby improving bus transmission efficiency.

[0056] The present application discloses a data transmission method. Figure 3 As shown, the method includes:

[0057] Step S11: Obtain a determination result of whether a bit width splicing condition is met based on a first data bit width of the target bus and a second data bit width of the external bus; wherein the target bus includes a bus used by a pre-designed target functional component and a bus used by a target subsystem including the target functional component.

[0058] For the data output by the bus of the target functional component or the bus of the target subsystem, the present application proposes a device that can merge the data bit width and the data address of the data. By merging the data bit width, narrow bus transmission can be avoided. By merging the data address, the number of requests to the external bus can be reduced, the time of occupying the bus response channel can be reduced, and the bus transmission efficiency can be improved.

[0059] See also Figure 4 As shown, the device includes a bit width comparison module, a bit width matching module, a transmission type judgment module, an address continuity judgment module, a control module, a time window module, a cache module and a signal conversion module.

[0060] The bit width matching module obtains a determination result of whether the bit width splicing condition is met based on the first data bit width of the target bus and the second data bit width of the external bus. In a specific embodiment, when the ratio of the second data bit width of the external bus to the first data bit width of the target bus is not less than a preset value, the determination result of satisfying the bit width splicing condition is obtained. In another specific embodiment, when the ratio of the second data bit width of the external bus to the first data bit width of the target bus is less than the preset value, a determination result of not satisfying the bit width splicing condition is obtained. Exemplarily, when the ratio of the second data bit width of the external bus to the first data bit width of the target bus is not less than 2, a determination result of satisfying the bit width splicing condition is obtained, otherwise, a determination result of not satisfying the bit width splicing condition is obtained.

[0061] Step S12: determining the transmission type and current data address of the current data sent by the target bus, and determining the continuity of the current data address; the transmission type includes burst transmission and non-burst transmission.

[0062] In this embodiment, the transmission type judgment module determines whether the transmission type of the current data is burst transmission (burst) or non-burst transmission (non-burst). After the burst transmission completes sending the current data to the external bus, the next data can be directly sent without waiting for the external bus response. After the non-burst transmission completes sending the current data to the external bus, the next data can be sent only after waiting for the external bus response.

[0063] Furthermore, the address continuity judgment module is used to determine whether the current data address is continuous with the previous data address, and the continuity of the current data address is obtained. The continuity includes address continuity or address discontinuity. It can be understood that the previous data address is the data address of the previous data sent by the target bus.

[0064] Step S13: Generate a control instruction according to the determination result, the transmission type and the continuity of the current data address; the control instruction indicates whether to splice the bit width and / or whether to splice the address.

[0065] In this embodiment, the control module generates a control instruction according to the determination result, the transmission type and the continuity of the current data address. The following describes the generation of different control instructions:

[0066] In some embodiments, if the determination result satisfies the bit width splicing condition and the current data address is continuous, a first control instruction for splicing the bit width and the address is generated. That is, if the determination result satisfies the bit width splicing condition and the current data address is continuous, regardless of whether the transmission type is burst transmission or non-burst transmission, a first control instruction for splicing the bit width and the address can be generated.

[0067] In some embodiments, if the determination result does not satisfy the bit width splicing condition and the current data addresses are continuous, a second control instruction for splicing only the addresses is generated. That is, if the determination result does not satisfy the bit width splicing condition and the current data addresses are continuous, a second control instruction for splicing only the addresses can be generated regardless of whether the transmission type is burst transmission or non-burst transmission.

[0068] In some embodiments, if the determination result satisfies the bit width splicing condition, the transmission type is burst transmission, and the current data address is discontinuous, a third control instruction for splicing only the bit width is generated. That is, when the determination result satisfies the bit width splicing condition, the transmission type is burst transmission, and the current data address is discontinuous, a third control instruction for splicing only the bit width is generated.

[0069] In some embodiments, if the state corresponding to the current data address, the determination result, and the transmission type matches any target state in a preset state set, a fourth control instruction is generated that does not splice the bit width and the address; wherein the preset state set includes a first target state, a second target state, and a third target state; the first target state is that the current data address is discontinuous, the determination result does not satisfy the bit width splicing condition, and the transmission type is the non-burst transmission, the second target state is that the current data address is discontinuous, the determination result does not satisfy the bit width splicing condition, and the transmission type is the burst transmission, and the third target state is that the current data address is discontinuous, the determination result satisfies the bit width splicing condition, and the transmission type is the non-burst transmission.

[0070] See Table 1, which is a table for generating different control instructions according to different conditions. The content in the table is 1, which means that the corresponding condition is met, and 0, which means that the corresponding condition is not met. Direct connection to the external bus means that neither address splicing nor data bit width splicing is performed, but data is sent directly to the external bus.

[0071] Table 1

[0072]

[0073] Step S14: if the control instruction indicates to splice the bit width, then the bit width of the current data sent by the target bus is spliced, and the preset cache is controlled to cache the corresponding bit width splicing result.

[0074] In this embodiment, if the control instruction characterizes the bit width to be spliced, the bit width matching module performs bit width splicing on the current data sent by the target bus. Furthermore, in order to ensure the performance of the target bus, it is necessary to set a time window threshold through a time window module, and when the control instruction characterizes the bit width to be spliced, the bit width splicing is performed on the current data within the time window threshold sent by the target bus. Figure 5 As shown, the time window threshold is set to X, data 1, data 2, data 3 and data 4 are data within X, and data 5 is data outside X, so data 1-data 4 are spliced.

[0075] Further, the preset cache is controlled to cache the corresponding bit width splicing result. In the process of caching the bit width splicing result, it is necessary to determine whether to continue caching or send the currently cached content to the external bus in combination with the remaining memory size of the preset cache and the time window threshold. That is, this embodiment needs to obtain the current remaining memory of the preset cache, and determine whether to continue to control the preset cache to cache the bit width splicing result or directly send the bit width splicing result in the preset cache to the external bus based on the current bus signal according to the current remaining memory and the time window threshold. It should be pointed out that the preset cache in this embodiment is provided by a cache module. This embodiment caches the data after bit width splicing through the cache module, which can achieve the following effects: 1. Support burst transmission, and the spliced ​​data is also burst transmission. 2. If the addresses of multiple non-burst data transmissions are continuous, the addresses can be spliced ​​through the cache module and cached into burst transmission to reduce the number of requests to the external bus and improve the bus efficiency. 3. If the addresses between burst transmissions are continuous, burst transmission data can be spliced, which also reduces the number of requests to the external bus.

[0076] Step S15: If the control instruction indicates address splicing, the current data address is spliced, and a current bus signal is obtained according to the corresponding address splicing result and the determination result, and the bit width splicing result in the preset cache is sent to the external bus based on the current bus signal.

[0077] If the control instruction indicates that the address is to be spliced, the address continuity judgment module is used to splice the current data address with the previous data address, wherein the previous data address is the data address of the previous data sent by the target bus. Further, the current bus signal is obtained according to the address splicing result and the judgment result, and the bit width splicing result in the preset cache is sent to the external bus based on the current bus signal.

[0078] In this embodiment, the current bus signal is obtained through the signal conversion module according to the address splicing result and the judgment result, and then the bit width splicing result in the preset cache is sent to the external bus based on the current bus signal, wherein the current bus signal represents whether the data transmission type is changed, etc. It should be pointed out that the data type can be changed by splicing the address.

[0079] In this embodiment, based on the current bus signal, the bit width splicing result in the preset cache is written to the first-in-first-out queue through a write operation so that the external bus can perform a read operation; wherein the clock domain of the write operation is the clock domain of the target bus, and the clock domain of the read operation is the clock domain of the external bus. In this way, by reading and writing asynchronous first-in-first-out queues, data cross-clock domain processing can be simply and efficiently realized.

[0080] See also Figure 6 As shown, the control module in this embodiment generates control instructions according to the transmission type, whether the address is continuous, and the data bit width, and controls the data bit width splicing through the control instructions, and caches the splicing result using a preset cache, and then converts the bus signal so that the bit width splicing result in the preset cache is sent to the external bus based on the current bus signal.

[0081] Exemplarily, if the transmission type is burst transmission, when the ratio of the second data bit width of the external bus to the first data bit width of the target bus is greater than or equal to 2, the control module will control the bit width matching module, the cache module and the signal conversion module to respectively perform data bit width splicing, cache data and convert the original bus signal sent by the target bus. If the transmission type is non-burst transmission, check whether the address is continuous. If the address is continuous and the ratio of the second data bit width of the external bus to the first data bit width of the target bus is greater than or equal to 2, the address and data splicing can be performed. Similarly, the control module will control the bit width matching module, the cache module and the signal conversion module to work. If the transmission type is non-burst transmission, the address is continuous but the ratio of the second data bit width of the external bus to the first data bit width of the target bus is greater than or equal to 1 and less than 2, then the address can be merged to form a burst transmission to reduce the number of data requests to the external bus. If the transmission type is non-burst transmission and the address is non-continuous, the address and data splicing is not performed, the original bus signal sent by the target bus to the external bus is not processed, and the current bus signal is the result of changing the original bus signal according to the current transmission type, etc.

[0082] For example, the data width of the target bus is 8 bits, the data width of the external bus is 128 bits, and the size of a complete burst transmission data is 512 bits. At t0, by comparing the data width of the target bus with the data width of the external bus, the 8-bit data is stored in the first 8 bits of a 128-bit buffer module, and then stored in the second 8 bits, the third 8 bits, the fourth 8 bits... of the 128 bits in sequence until it is full, and then sent to the first-in-first-out queue, the cache module continues to store the next 128 bits, and the cycle is repeated four times. The transmission with a data width of 8 bits, a total of 64 data, and a complete burst data size of 512 bits can be adjusted to a data width of 128 bits, a total of 4 data, and a complete burst data size of 512 bits. For the external bus, the transmission performance is greatly improved, see Figure 7 shown.

[0083] Exemplarily, the data width of the target bus is 8 bits, the data width of the external bus is 128 bits, and the size of a complete burst transmission data is 504 bits. At t0, the 8-bit data is stored in the first 8 bits of a 128-bit buffer module, and then stored in the second 8 bits, the third 8 bits, the fourth 8 bits... of the 128 bits in order until it is full, then it is sent to the first-in-first-out queue, and the cache module continues to store the next 128 bits. The cycle is repeated four times. For the last data, the actual effective data width is 120 bits, and 8 bits of data width are lost and not used. However, for each complete burst transmission, only the last data width will be lost. Compared with traditional technologies, it can still greatly improve the problem of narrow bus transmission.

[0084] It should be pointed out that every time the bit width matching module matches the data bit width, if the first-in first-out queue is not full, a write operation can be performed. The size of the cache module can be set to the maximum amount of data for a burst transmission, and the number of cache transmissions can be configured. When the number is greater than 1, if the data of the burst transmission is still addressed continuously, or after a burst transmission is full, the address of the next non-burst transmission is still continuous, then splicing can continue. When multiple non-burst transmission data requests with continuous addresses occur, the control module will notify the signal conversion module to convert the original bus signal into the current bus signal, such as Figure 8 As shown, Figure 8 A schematic diagram of splicing multiple consecutive non-burst transfers of addresses into a burst transfer is provided, thereby reducing the number of requests initiated to an external bus.

[0085] This application matches the data bit width of the external bus and the target bus, thereby increasing the bit width ratio of the external bus transmission and reducing the impact of narrow transmission on bus efficiency. This application integrates the data of consecutive addresses to reduce the number of requests from the target bus to the external bus. This application effectively controls the data storage time through the time window module to meet performance requirements. After using this device, the schematic diagrams of the bus bit width occupancy rate and the number of requests to the external bus are shown in Figure 1. Fig. 9 , 10 It should be pointed out that, in addition to considering that one target bus corresponds to one external bus, it is also possible to consider concatenating data and addresses when multiple target buses request data transmission from the external bus, so as to improve the performance of the external bus.

[0086] Accordingly, the present application also discloses a data transmission device, see Fig.11 As shown, the device comprises:

[0087] A bit width comparison module 11 is used to determine whether a bit width splicing condition is met according to a first data bit width of the target bus and a second data bit width of the external bus; wherein the target bus includes a bus used by a pre-designed target functional component and a bus used by a target subsystem including the target functional component;

[0088] The transmission type and address determination module 12 is used to determine the transmission type and current data address of the current data sent by the target bus, and determine the continuity of the current data address; the transmission type includes burst transmission and non-burst transmission;

[0089] A control instruction generation module 13, used to generate a control instruction according to the determination result, the transmission type and the continuity of the current data address; the control instruction indicates whether to splice the bit width and / or whether to splice the address;

[0090] A bit width splicing module 14 is used for performing bit width splicing on the current data sent by the target bus if the control instruction indicates to perform bit width splicing, and controlling a preset cache to cache a corresponding bit width splicing result;

[0091] An address splicing module 15, configured to splice the current data address if the control instruction indicates that the address is to be spliced;

[0092] The data sending module 16 is used to obtain a current bus signal according to the corresponding address splicing result and the determination result, and send the bit width splicing result in the preset cache to the external bus based on the current bus signal.

[0093] Among them, for more specific working processes of the above-mentioned modules, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0094] It can be seen that the present application proposes a data transmission method, comprising: obtaining a determination result of whether a bit width splicing condition is met according to a first data bit width of a target bus and a second data bit width of an external bus; wherein the target bus includes a bus used by a pre-designed target functional component and a bus used by a target subsystem including the target functional component; determining a transmission type and a current data address of current data sent by the target bus, and determining the continuity of the current data address; the transmission type includes burst transmission and non-burst transmission; generating a control instruction according to the determination result, the transmission type and the continuity of the current data address; the control instruction indicates whether to splice the bit width and / or whether to splice the address; if the control instruction indicates that the bit width is spliced, the current data sent by the target bus is spliced ​​in bit width, and the preset cache is controlled to cache the corresponding bit width splicing result; if the control instruction indicates that the address is spliced, the current data address is spliced, and a current bus signal is obtained according to the corresponding address splicing result and the determination result, and then the bit width splicing result in the preset cache is sent to the external bus based on the current bus signal. In summary, the present application determines whether the bit width splicing condition is met based on the relationship between the second data bit width of the external bus and the first data bit width of the target bus, and determines whether to perform data bit width splicing and address splicing based on whether the bit width splicing condition is met, whether the current address is continuous, and the data transmission type. It can be understood that the data bit width splicing performed by the present application can change the data bit width when the target functional component or subsystem transmits data, thereby avoiding bus narrow transmission to improve bus transmission efficiency. The address splicing performed by the present application can reduce the number of requests to the external bus, thereby reducing the time of occupying the bus response channel to further improve bus transmission efficiency, solves the problem of narrow bus transmission caused by the inconsistency between the data bit width used by the target functional component or subsystem and the data bit width used by the external bus in traditional technology, and solves the problem of long bus response channel occupation time caused by frequent transmission requests sent to the bus in traditional technology.

[0095] Furthermore, an embodiment of the present application also provides an electronic device. Fig.12 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0096] Fig.12A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the data transmission method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0097] In this embodiment, the power supply 26 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 24 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0098] In addition, the memory 22, as a carrier for storing resources, may be a read-only memory, a random access memory, a disk or an optical disk, etc., and the resources stored thereon may include a computer program 221, and the storage method may be temporary storage or permanent storage. In addition to including a computer program that can be used to complete the data transmission method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 221 may further include a computer program that can be used to complete other specific tasks.

[0099] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed data transmission method is implemented.

[0100] For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be described in detail here.

[0101] The various embodiments in this application 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. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0102] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0103] 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 storage medium known in the art.

[0104] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0105] The above is a detailed introduction to a data transmission method, device, equipment, and storage medium provided by the present application. Specific examples are used in this article 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 general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method 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 transmission method, characterized in that: include: Obtaining a determination result of whether a bit width splicing condition is met according to a first data bit width of the target bus and a second data bit width of the external bus; wherein the target bus includes a bus used by a pre-designed target functional component and a bus used by a target subsystem including the target functional component; Determining the transmission type and current data address of the current data sent by the target bus, and determining the continuity of the current data address; the transmission type includes burst transmission and non-burst transmission; Generate a control instruction according to the determination result, the transmission type and the continuity of the current data address; the control instruction indicates whether to splice the bit width and / or whether to splice the address; If the control instruction indicates that bit width splicing is to be performed, bit width splicing is performed on the current data sent by the target bus, and the preset cache is controlled to cache the corresponding bit width splicing result; If the control instruction indicates address splicing, the current data address is spliced, and a current bus signal is obtained according to the corresponding address splicing result and the determination result, and the bit width splicing result in the preset cache is sent to the external bus based on the current bus signal.

2. The data transmission method according to claim 1, characterized in that: The determining result of whether the bit width splicing condition is met according to the first data bit width of the target bus and the second data bit width of the external bus includes: When the ratio of the second data bit width of the external bus to the first data bit width of the target bus is not less than a preset value, obtaining the determination result that satisfies the bit width splicing condition; When the ratio of the second data bit width of the external bus to the first data bit width of the target bus is smaller than the preset value, the determination result that the bit width splicing condition is not met is obtained.

3. The data transmission method according to claim 2, characterized in that: The generating of the control instruction according to the determination result, the transmission type and the continuity of the current data address comprises: If the determination result satisfies the bit width splicing condition and the current data addresses are continuous, generating a first control instruction for splicing the bit width and the address; If the determination result does not satisfy the bit width splicing condition and the current data addresses are continuous, generating a second control instruction for splicing only the addresses; If the determination result satisfies the bit width splicing condition, the transmission type is the burst transmission, and the current data address is discontinuous, then generating a third control instruction for splicing only the bit width; If the states corresponding to the current data address, the determination result, and the transmission type match any target state in a preset state set, a fourth control instruction is generated that does not splice the bit width and the address; wherein the preset state set includes a first target state, a second target state, and a third target state; the first target state is that the current data address is discontinuous, the determination result does not satisfy the bit width splicing condition, and the transmission type is the non-burst transmission, the second target state is that the current data address is discontinuous, the determination result does not satisfy the bit width splicing condition, and the transmission type is the burst transmission, and the third target state is that the current data address is discontinuous, the determination result satisfies the bit width splicing condition, and the transmission type is the non-burst transmission.

4. The data transmission method according to claim 3, characterized in that: The bit width splicing of the current data sent by the target bus includes: A time window threshold is set, and bit width splicing is performed on the current data within the time window threshold sent by the target bus.

5. The data transmission method according to claim 4, characterized in that: In the process of controlling the preset cache to cache the corresponding bit width splicing result, it also includes: Obtaining the current remaining memory of the preset cache; Determine whether to continue controlling the preset cache to cache the bit width splicing result or directly send the bit width splicing result in the preset cache to the external bus based on the current bus signal according to the current remaining memory and the time window threshold.

6. The data transmission method according to claim 5, characterized in that: The step of sending the bit width splicing result in the preset cache to the external bus based on the current bus signal includes: Based on the current bus signal and through a write operation, the bit width splicing result in the preset cache is written into a first-in-first-out queue so that the external bus can perform a read operation; wherein the clock domain of the write operation is the clock domain of the target bus, and the clock domain of the read operation is the clock domain of the external bus.

7. The data transmission method according to any one of claims 1 to 6, characterized in that: The step of splicing the current data address includes: The current data address is concatenated with the previous data address; wherein the previous data address is the data address of the previous data sent by the target bus.

8. A data transmission device, characterized in that: include: A bit width comparison module, used to determine whether a bit width splicing condition is met according to a first data bit width of the target bus and a second data bit width of the external bus; wherein the target bus includes a bus used by a pre-designed target functional component and a bus used by a target subsystem including the target functional component; A transmission type and address determination module, used to determine the transmission type and current data address of the current data sent by the target bus, and determine the continuity of the current data address; the transmission type includes burst transmission and non-burst transmission; A control instruction generation module, used to generate a control instruction according to the determination result, the transmission type and the continuity of the current data address; the control instruction indicates whether to splice the bit width and / or whether to splice the address; A bit width splicing module, configured to perform bit width splicing on the current data sent by the target bus if the control instruction indicates that the bit width is to be spliced, and control a preset cache to cache a corresponding bit width splicing result; An address splicing module, configured to splice the current data address if the control instruction indicates that the address is to be spliced; The data sending module is used to obtain a current bus signal according to a corresponding address splicing result and the determination result, and send the bit width splicing result in the preset cache to the external bus based on the current bus signal.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the data transmission method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Data caching method and device, equipment and medium

    CN119576824A

  • Data transmission method, data transmission device, system on chip and storage medium

    CN119847973A