CN117472823A - Data transmission method and device, electronic equipment and storage medium - Google Patents

Data transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117472823A
CN117472823A CN202311543648.9A CN202311543648A CN117472823A CN 117472823 A CN117472823 A CN 117472823A CN 202311543648 A CN202311543648 A CN 202311543648A CN 117472823 A CN117472823 A CN 117472823A
Authority
CN
China
Prior art keywords
data
transmitted
address
determining
address information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311543648.9A
Other languages
Chinese (zh)
Inventor
史方显
李兆静
刘子君
李坚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Silang Technology Co ltd
Original Assignee
Shanghai Silang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Silang Technology Co ltd filed Critical Shanghai Silang Technology Co ltd
Priority to CN202311543648.9A priority Critical patent/CN117472823A/en
Publication of CN117472823A publication Critical patent/CN117472823A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0292User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/18Handling requests for interconnection or transfer for access to memory bus based on priority control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a data transmission method, a data transmission device, electronic equipment and a storage medium. The data transmission method comprises the following steps: determining a first-in first-out memory for caching the data to be transmitted according to the address information of the data to be transmitted; acquiring a preset lookup table according to the associated output port type of the first-in first-out memory; determining a destination transmission address of the data to be transmitted according to the address information of the data to be transmitted and the preset lookup table; and transmitting the data to be transmitted to an output port according to the destination transmission address. According to the embodiment of the invention, the first-in first-out memory corresponding to the data to be transmitted is pre-judged according to the address information, unnecessary storage and reading and writing of the first-in first-out memory are reduced, data blocking caused when the data to be transmitted is excessively large is prevented, meanwhile, the output port type corresponds to the preset lookup table, the query of the preset lookup table data is facilitated, and the use experience of a user is improved.

Description

Data transmission method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a data transmission method, a data transmission device, an electronic device, and a storage medium.
Background
Currently, the information age has been entered, and the informatization is not separated from the transmission of data. With the development of socioeconomic performance, data communication has become an important means of information transfer. With the continuous progress of communication technology, the requirements of the information society for data transmission in communication are continuously increasing.
In order to ensure the normal transmission of data between chips, each chip can buffer the data to be sent to other chips by using a first-in first-out memory (First Input First Output, FIFO) to buffer continuous data streams, so that the data is prevented from being lost during the machine entering and storage operation, and the data is centralized to enter the machine entering and storage at the same time, thereby avoiding frequent bus operation and reducing the burden of a central processing unit. However, the destination addresses of the data to be transmitted are different, so that unnecessary reading and writing can be generated in the process of buffering the data in the fifo memory, and when the amount of data between chips is large, data flow blocking is easy to occur, so that how to improve the utilization rate of the fifo memory and conveniently and rapidly perform data transmission becomes a problem to be solved urgently at present.
Disclosure of Invention
The invention provides a data transmission method, a data transmission device, electronic equipment and a storage medium, which are used for reducing unnecessary storage and reading and writing of a first-in first-out memory and preventing data blocking when the data to be transmitted is excessively large.
According to an aspect of the present invention, there is provided a data transmission method, wherein the method includes:
determining a first-in first-out memory for caching the data to be transmitted according to the address information of the data to be transmitted;
acquiring a preset lookup table according to the associated output port type of the first-in first-out memory;
determining a destination transmission address of the data to be transmitted according to the address information of the data to be transmitted and a preset lookup table;
and transmitting the data to be transmitted to the output port according to the destination transmission address.
According to another aspect of the present invention, there is provided a data transmission apparatus, including:
the buffer position determining module is used for determining a first-in first-out memory for buffering the data to be transmitted according to the address information of the data to be transmitted;
the lookup table acquisition module is used for acquiring a preset lookup table according to the associated output port type of the first-in first-out memory;
the destination address determining module is used for determining a destination transmission address of the data to be transmitted according to the address information of the data to be transmitted and a preset lookup table;
and the data transmission module is used for transmitting the data to be transmitted to the output port according to the destination transmission address.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data transmission method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a data transmission method according to any one of the embodiments of the present invention.
According to the technical scheme, the first-in first-out memory for caching the data to be transmitted is determined according to the address information of the data to be transmitted, the preset lookup table is obtained according to the type of the associated output port of the first-in first-out memory, the target transmission address of the data to be transmitted is determined according to the address information of the data to be transmitted and the preset lookup table, the data to be transmitted is transmitted to the output port according to the target transmission address, the first-in first-out memory corresponding to the address information is prejudged, the preset lookup table corresponding to the first-in first-out memory is extracted to determine the target transmission address, the data to be transmitted is transmitted, unnecessary storage, reading and writing of the first-in first-out memory are reduced, data blocking caused when the data to be transmitted is excessively large is prevented, and the use experience of a user is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data processing method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a data processing method according to a second embodiment of the present invention;
FIG. 3 is a flow chart of a data processing method according to a third embodiment of the present invention;
FIG. 4 is a flow chart of a data processing method according to a third embodiment of the present invention;
FIG. 5 is a schematic diagram of a data processing apparatus according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device implementing a data processing method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a data processing method according to a first embodiment of the present invention, where the method may be performed by a data processing device, which may be implemented in hardware and/or software, and the data processing device may be configured in an electronic device, where the data processing method is applicable to a case of transmitting data to be transmitted to a destination transmission address. As shown in fig. 1, the method includes:
s110, determining a first-in first-out memory for caching the data to be transmitted according to the address information of the data to be transmitted.
The data to be transmitted may refer to data to be transmitted, and address information and destination transmission address of different data to be transmitted may be different. In one embodiment, the data to be transmitted may include, but is not limited to, a clock signal. In the actual operation process, the data to be transmitted can be the data which is transmitted by the external chip and needs to be forwarded; or, it may be data that the chip generates to be transmitted. The address information may be used to indicate the transmission purpose of the data to be transmitted. In an embodiment, an identifier of the address information may be present in the data to be transmitted, and the transmission purpose of the data to be transmitted may be determined according to the identifier of the address information. The FIFO memory (First Input First Output, FIFO) is a FIFO data buffer that can sequentially write data to be transferred and sequentially read data to be transferred. The first-in first-out memory can buffer and retransmit the continuous data stream, so that the data loss of the data to be transmitted when the chip is processed is prevented. In actual operation, the number of the first-in first-out memories may be at least one, which is not limited.
In the embodiment of the invention, the address information of the data to be transmitted can be determined, and the first-in first-out memory for caching the data to be transmitted is determined according to the address information as an index. In the actual operation process, the identification of the address information in the data to be transmitted can be extracted, the address information of the data to be transmitted is determined, and the corresponding first-in first-out memory is queried for caching according to the address information of the data to be transmitted. In one embodiment, the correspondence between address information and fifo memory may be pre-configured for storage. For example, the correspondence of address information with a first-in first-out memory may be stored in a register, REG array. When the first-in first-out memory of the data to be transmitted needs to be determined, the corresponding relation between the data to be transmitted and the first-in first-out memory is inquired according to the address information.
S120, acquiring a preset lookup table according to the associated output port type of the first-in first-out memory.
The output port type may refer to a type of destination address corresponding to data to be transmitted buffered in the fifo. By way of example, the output port types may include kernel, physical coding sub-layer (physical coding sublayer, PCS), etc. Different types of destination addresses may correspond to different first-in first-out memories. In one embodiment, the same first-in first-out memory may correspond to one or more output port types. That is, a fifo memory may be buffered with data to be transmitted for a plurality of output port types. The predetermined Look-Up Table may be a predetermined Look-Up Table (LUT) which is essentially a random access memory (Random Access Memory, RAM). The number of the preset lookup tables may be at least one, and in an actual operation process, one preset lookup table may correspond to data corresponding to one output port type.
In the embodiment of the invention, the output port types associated with different fifos are different, and the preset lookup table can be obtained according to the output port types associated with the fifos. In the actual operation process, the output port types and the preset lookup table can be in one-to-one correspondence; alternatively, a predetermined look-up table may correspond to a plurality of output port types. The output port type associated with each fifo can be determined first, and the corresponding lookup table is obtained according to the output port type.
S130, determining a destination transmission address of the data to be transmitted according to the address information of the data to be transmitted and a preset lookup table.
In the embodiment of the invention, the corresponding relation between the address information and the destination transmission address determining mode can be stored in a preset lookup table; alternatively, the correspondence between the address information and the destination transmission address may be stored. When the corresponding relation between the address information and the destination transmission address determining mode is stored in the preset lookup table, the associated destination transmission address determining mode can be searched according to the address information, and the address information is changed into the destination transmission address according to the destination transmission address determining mode; when the corresponding relation between the address information and the destination transmission address is stored in the preset lookup table, the destination transmission address of the data to be transmitted which is stored in an associated mode can be directly searched according to the address information.
And S140, transmitting the data to be transmitted to the output port according to the destination transmission address.
The output port may refer to a port that outputs data to be transmitted, and may be determined according to a destination transmission address. In one embodiment, one output port may correspond to at least one destination transport address.
In the embodiment of the invention, after determining the destination transmission address of the data to be transmitted, the fifo can be controlled to transmit the data to be transmitted to the output port corresponding to the destination transmission address, so as to transmit the data to be transmitted.
According to the embodiment of the invention, the first-in first-out memory for caching the data to be transmitted is determined according to the address information of the data to be transmitted, the preset lookup table is acquired according to the associated output port type of the first-in first-out memory, the data to be transmitted is transmitted to the output port according to the destination transmission address, the first-in first-out memory corresponding to the data to be transmitted is prejudged according to the address information, unnecessary storage and reading and writing of the first-in first-out memory are reduced, data blocking is prevented when the data quantity to be transmitted is overlarge, meanwhile, the destination port address is conveniently determined according to the data of the preset lookup table according to the output port type corresponding to the preset lookup table, and the use experience of a user is improved.
In an embodiment, the data processing method further includes:
determining the source of the data to be transmitted;
determining the priority of the data to be transmitted according to the address information and/or the source of the data to be transmitted;
determining a destination transmission address of data to be transmitted corresponding to a first priority in the priorities;
and when the destination transmission address is a preset priority address, transmitting the data to be transmitted according to the first priority channel.
The first priority may refer to the highest priority among the priorities of the data to be transmitted. In an embodiment, the priorities corresponding to the different address information may be preset. The preset priority address may refer to a destination transmission address with the highest priority, and may be preset according to a user requirement. The preset priority address may be one or more, which is not limited. The first priority path may be a path for priority transmission, and when the data to be transmitted satisfies a preset condition, priority transmission may be performed according to the first priority path.
In an embodiment of the invention, the name or identification number (Identity document, ID) of the device transmitting the data to be transmitted may be determined to determine the source of the data to be transmitted. And determining the priority of the data to be transmitted according to at least one of the address information and the source of the data to be transmitted, and determining the data to be transmitted corresponding to the address information meeting the first priority. And determining a destination transmission address of the data to be transmitted corresponding to the first priority, and transmitting the data to be transmitted according to the first priority channel when the destination transmission address is a preset priority address. That is, when it is determined that the priority of the data to be transmitted is the first priority according to the address information and the corresponding destination address is the preset priority address, the data to be transmitted may be transmitted according to the first priority path. The data to be transmitted with high priority can be guaranteed to be transmitted preferentially, and delay of the data to be transmitted with high priority is reduced.
In one embodiment, after determining the priority of the data to be transmitted according to the address information of the data to be transmitted, the method further includes:
the data to be transmitted without the first priority is input to a preconfigured arbiter, so that the arbiter determines the transmission order of the respective data to be transmitted.
The arbiter is a device that decides which data to be transmitted is to be transmitted with priority when a plurality of data to be transmitted contend for transmission rights. During actual operation, the arbiter may include, but is not limited to, a configurable arbiter, a poll arbiter, and the like. The transmission policy of the arbiter may be preconfigured, and the transmission order of each data to be transmitted may be determined according to the arbitrated transmission policy.
In the embodiment of the invention, when the priority of the data to be transmitted is determined according to the address information of the data to be transmitted, the data to be transmitted without the first priority may be input into a preconfigured arbiter, and the arbiter may transmit each data to be transmitted according to a preconfigured transmission policy, so that the data to be transmitted is transmitted according to the transmission order.
In one embodiment, after transmitting the data to be transmitted according to the first priority path, the method further comprises:
data to be transmitted having a first priority and a destination transmission address not being a preset priority address and data to be transmitted not having the first priority are input to an arbiter.
In the embodiment of the invention, after determining the destination transmission address of the data to be transmitted with the first priority within the corresponding priority, the data to be transmitted with the first priority and the destination transmission address not being the preset priority address and the data to be transmitted without the first priority may be simultaneously input into the arbiter, so that the data to be transmitted with the first priority and the destination transmission address not being the preset priority address and the data to be transmitted without the first priority are simultaneously determined in transmission order. That is, the transmission order of the data to be transmitted, which is not transmitted through the first priority path, is determined.
In one embodiment, the number of arbiters may be one or more. For example, the number of the arbiters may include two, and the data to be transmitted without the first priority may be input into a first pre-configured arbiter, the transmission order of the data to be transmitted without the first priority may be determined, and then the data to be transmitted with the first priority and the destination transmission address not being the pre-set priority address and the data to be transmitted without the first priority may be input into a second arbiter, and the transmission order of the data to be transmitted not transmitted through the first priority path may be determined. The data to be transmitted without the first priority is the data to be transmitted output by the first arbiter.
In an embodiment, the data transmission method further includes:
determining the type of an output port corresponding to the address information of the data to be transmitted according to the data transmission requirement;
creating a mapping relation between address information and the first-in first-out memory, and adding the mapping relation to a preset register;
determining a destination transmission address determining mode corresponding to the address information of each data to be transmitted;
creating a preset lookup table corresponding to each output port type; the preset lookup table comprises a corresponding relation between address information of data to be transmitted and a destination transmission address determining mode.
The data transmission requirement may refer to a requirement for transmission of data to be transmitted. The preset register is a high-speed memory unit with limited memory capacity and can be used for storing the mapping relation between the address information of the data to be transmitted and the first-in first-out memory. In one embodiment, the preset registers may be implemented in the form of an array of REGs. The preset lookup table may store a correspondence between address information of data to be transmitted and a determination manner of a destination transmission address, and in an embodiment, the number of preset lookup tables may be at least one, which is not limited.
In the embodiment of the invention, the address information of the data to be transmitted can be determined, and the type of the output port corresponding to each address information is determined according to the data transmission requirement. And creating a mapping relation between the output port type and the first-in first-out memory, and storing the mapping relation into a preset register so as to determine the cached first-in first-out memory through the output port type. The method can determine the destination transmission address determination mode corresponding to the address information of the data to be transmitted, and store the corresponding relation between the address information of the data to be transmitted and the destination transmission address determination mode in a preset lookup table. In the actual operation process, a preset lookup table can be created according to the type of the output port, and the type of the output port and the preset lookup table can be in one-to-one correspondence so as to obtain the corresponding preset lookup table according to the type of the output port.
Example two
Fig. 2 is a flowchart of a data processing method according to a second embodiment of the present invention, which is further optimized and expanded based on the foregoing embodiment, and may be combined with various optional technical solutions in the foregoing embodiment. As shown in fig. 2, the method includes:
s210, determining the type of the output port according to the address information of the data to be transmitted.
In the embodiment of the invention, after receiving the address information of the data to be transmitted, the target transmission address identifier carried by the data to be transmitted can be extracted, and the type of the output port is determined according to the target transmission address identifier.
S220, extracting the mapping relation between the output port type and the first-in first-out memory in a preset register, and taking the first-in first-out memory corresponding to the output port type as the first-in first-out memory for caching the data to be transmitted.
In the embodiment of the invention, after determining the output port type, the mapping relation between the output port type and the first-in first-out memory can be queried in a preset register according to the output port type, and the first-in first-out memory stored corresponding to the output port type is extracted and used as the first-in first-out memory for caching the data to be transmitted. In the actual operation process, the data multiplexer can be controlled to extract the mapping relation between the output port type and the FIFO memory in the preset register, and the FIFO memory corresponding to the output port type is determined.
S230, acquiring a preset lookup table according to the associated output port type of the first-in first-out memory.
S240, extracting a destination transmission address determining mode of address information association storage from a preset lookup table.
In the embodiment of the invention, after the preset lookup table is determined, the corresponding determination mode of the destination transmission address can be searched in the preset lookup table according to the address information. In the actual operation process, the method can acquire the address information and the destination transmission address determining mode according to the address information, and extract the destination transmission address determining mode stored in association with the address information.
S250, modifying the address information into the destination transmission address according to the destination transmission address determination mode.
In the embodiment of the invention, after the determination mode of the destination transmission address is determined, the destination transmission address can be determined by the address information and the determination mode of the destination transmission address. In one embodiment, the destination address determining method may include shifting in a register, adding and subtracting operations, and how to shift to the destination address according to the address information.
And S260, transmitting the data to be transmitted to the output port according to the destination transmission address.
According to the embodiment of the invention, the type of the output port is determined according to the address information of the data to be transmitted, the mapping relation between the type of the output port and the first-in first-out memory is extracted from the preset register, the first-in first-out memory corresponding to the type of the output port is used as the first-in first-out memory for caching the data to be transmitted, the first-in first-out memory corresponding to the data to be transmitted is predicted according to the address information, unnecessary storage and reading and writing of the first-in first-out memory are reduced, data blocking is prevented when the data to be transmitted is excessively large, meanwhile, a preset lookup table is acquired according to the associated type of the first-in first-out memory, the destination transmission address determining mode of the address information associated storage is extracted from the preset lookup table, the data to be transmitted is modified into the destination transmission address in the address information according to the destination transmission address, the extraction of the preset lookup table according to the type of the output port is realized, the destination port address is conveniently determined, and the use experience of a user is improved.
Example III
Fig. 3 is a flowchart of a data processing method according to a third embodiment of the present invention, in which, based on the above embodiment, a pre-determining module is taken as an example of a preset register, a mapping relationship between an output port type stored in the preset register and a fifo memory is obtained through the data multiplexer, and a pre-determining module and a preset lookup table are configured through a control configuration interface. As shown in fig. 3, the method includes:
the configuration interface inputs data transmission requirements, extracts information such as an output port type, a destination transmission address determining mode, a destination transmission address and the like corresponding to the address information as pre-judging information, creates a mapping relation between the address information and the first-in first-out memory, and adds the mapping relation to the pre-judging module. Wherein, the pre-judging module can be realized by a REG array. And simultaneously, determining the corresponding relation between the address information of the data to be transmitted and the destination transmission address determination mode, and creating a preset lookup table corresponding to each output port type.
When the data to be transmitted is input, the data multiplexer is controlled to determine the first-in first-out memory of the data buffer memory to be transmitted in the pre-judging module according to the address information of the data to be transmitted. The data to be transmitted is distributed to the corresponding first-in first-out memory. Meanwhile, a preset lookup table is obtained according to the associated output port type of the first-in first-out memory, and a destination transmission address determining mode of address information associated storage is extracted from the preset lookup table. And determining a destination transmission address according to the address information and the destination transmission address determination mode, and transmitting the data to be transmitted to the output port. The method realizes the writing of the data to be transmitted into the necessary first-in first-out memory, reduces unnecessary reading and writing of the first-in first-out memory, and prevents data blocking when the data volume is large.
In an embodiment, fig. 4 is a flowchart of a data processing method according to a third embodiment of the present invention, in which a plurality of data to be transmitted are taken, a priority of data m to be transmitted is taken as a first priority, an arbiter is taken as a configurable arbiter, and the number of the configurable arbiters is 2 as an example, and when determining the priority of each data to be transmitted for transmission, a further description is given of a data processing method. As shown in fig. 4, the method includes:
when it is determined that the priority of the data m to be transmitted is high priority (i.e., the first priority), the data m to be transmitted is transmitted to the second data multiplexer through the first data multiplexer. And controlling the second data multiplexer to determine a destination transmission address of the data to be transmitted in the pre-judging module according to the address information of the data to be transmitted, and transmitting the data to be transmitted to the high-priority transmission port according to the high-priority channel (the first priority channel) when the destination transmission address is a preset priority address. And inputting the data to be transmitted, the destination transmission address of which is not the preset priority address, into a second arbiter.
When the data to be transmitted is determined not to be high priority (first priority), the data to be transmitted is input into a first arbiter, the transmission sequence of each data to be transmitted is determined, then each data to be transmitted is input into a second arbiter, the transmission sequence of the data to be transmitted which is not high priority and the data to be transmitted which is high priority but the transmission address is not a preset priority address is determined, and each data to be transmitted is transmitted to a low priority transmission port according to a low priority channel. The data to be transmitted with high priority can be ensured to be sent quickly, and meanwhile, the hardware consumption is reduced in a low-priority data public cache mode under the condition that the bandwidth is met.
Example IV
Fig. 5 is a schematic structural diagram of a data processing apparatus according to a fourth embodiment of the present invention. As shown in fig. 5, the apparatus includes: the cache location determination module 51, the lookup table acquisition module 52, the destination address determination module 53 and the data transmission module 54.
The buffer location determining module 51 is configured to determine a first-in first-out memory for buffering the data to be transmitted according to address information of the data to be transmitted.
The lookup table obtaining module 52 is configured to obtain a preset lookup table according to the associated output port type of the fifo.
The destination address determining module 53 determines a destination transmission address of the data to be transmitted according to the address information of the data to be transmitted and a preset lookup table.
The data transmission module 54 is configured to transmit data to be transmitted to the output port according to the destination transmission address.
According to the embodiment of the invention, the first-in first-out memory for caching the data to be transmitted is determined according to the address information of the data to be transmitted through the cache position determining module, the lookup table acquiring module acquires the preset lookup table according to the associated output port type of the first-in first-out memory, the destination address determining module acquires the preset lookup table according to the associated output port type of the first-in first-out memory, the data to be transmitted is transmitted to the output port through the data transmitting module according to the destination transmission address, the first-in first-out memory corresponding to the data to be transmitted is predicted according to the address information, unnecessary storage and reading and writing of the first-in first-out memory are reduced, data blocking is prevented when the data to be transmitted is excessively large, meanwhile, the destination port address is conveniently determined according to the convenience of the preset lookup table data through the corresponding to the output port type, and the use experience of a user is improved.
In an embodiment, the data transmission device further includes:
the source determining module is used for determining the source of the data to be transmitted;
the priority determining module is used for determining the priority of the data to be transmitted according to the address information and/or the source of the data to be transmitted;
the address determining module is used for determining a destination transmission address of the data to be transmitted corresponding to the first priority in the priority;
and the path determining module is used for transmitting the data to be transmitted according to the first priority path when the destination transmission address is a preset priority address.
In one embodiment, the cache location determination module 51 includes:
the type determining unit is used for determining the type of the output port according to the address information of the data to be transmitted;
and the buffer position determining unit is used for extracting the mapping relation between the output port type and the first-in first-out memory in a preset register, and taking the first-in first-out memory corresponding to the output port type as the first-in first-out memory for buffering the data to be transmitted.
In one embodiment, the destination address determining module 53 includes:
the determining mode extracting unit is used for extracting a destination transmission address determining mode stored in association with the address information in a preset lookup table;
and the destination address determining unit is used for modifying the address information into the destination transmission address according to the destination transmission address determining mode.
In an embodiment, the data transmission device further includes:
the port type determining module is used for determining the type of an output port corresponding to the address information of the data to be transmitted according to the data transmission requirement;
the relation creation module is used for creating a mapping relation between the address information and the first-in first-out memory and adding the mapping relation to a preset register;
the mode determining module is used for determining a destination transmission address determining mode corresponding to the address information of each data to be transmitted;
the lookup table creation module is used for creating a preset lookup table corresponding to each output port type; the preset lookup table comprises a corresponding relation between address information of data to be transmitted and a destination transmission address determining mode.
In an embodiment, the data transmission device further includes:
the first transmission sequence determining module is used for inputting the data to be transmitted without the first priority into a preconfigured arbiter so that the arbiter determines the transmission sequence of each data to be transmitted.
In an embodiment, the data transmission device further includes:
the second transmission sequence determining module is used for inputting the data to be transmitted with the first priority and the destination transmission address not being the address with the preset priority and the data to be transmitted without the first priority into the arbiter.
The data transmission device provided by the embodiment of the invention can execute the data transmission method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 6 is a schematic structural diagram of an electronic device 10 implementing a data processing method according to an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a data transmission method.
In some embodiments, a data transmission method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of one data transmission method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a data transmission method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A data transmission method, comprising:
determining a first-in first-out memory for caching the data to be transmitted according to the address information of the data to be transmitted;
acquiring a preset lookup table according to the associated output port type of the first-in first-out memory;
determining a destination transmission address of the data to be transmitted according to the address information of the data to be transmitted and the preset lookup table;
and transmitting the data to be transmitted to an output port according to the destination transmission address.
2. The method as recited in claim 1, further comprising:
determining the source of the data to be transmitted;
determining the priority of the data to be transmitted according to the address information and/or the source of the data to be transmitted;
determining a destination transmission address of the data to be transmitted corresponding to a first priority in the priorities;
and when the destination transmission address is a preset priority address, transmitting the data to be transmitted according to a first priority channel.
3. The method of claim 1, wherein determining a first-in first-out memory for buffering the data to be transmitted according to address information of the data to be transmitted comprises:
determining the type of an output port according to the address information of the data to be transmitted;
and extracting the mapping relation between the output port type and the first-in first-out memory in a preset register, and taking the first-in first-out memory corresponding to the output port type as a first-in first-out memory for caching the data to be transmitted.
4. The method according to claim 1, wherein the determining the destination transmission address of the data to be transmitted according to the address information of the data to be transmitted and the preset lookup table includes:
extracting a destination transmission address determining mode stored in association with the address information from the preset lookup table;
and modifying the address information into the destination transmission address according to the destination transmission address determination mode.
5. The method as recited in claim 1, further comprising:
determining the type of an output port corresponding to the address information of the data to be transmitted according to the data transmission requirement;
creating a mapping relation between the address information and the first-in first-out memory, and adding the mapping relation to a preset register;
determining a destination transmission address determining mode corresponding to the address information of each data to be transmitted;
creating the preset lookup table corresponding to each output port type; the preset lookup table includes a correspondence between address information of the data to be transmitted and the destination transmission address determining mode.
6. The method according to claim 2, further comprising, after determining the priority of the data to be transmitted according to the address information of the data to be transmitted:
the data to be transmitted without the first priority is input to a preconfigured arbiter, so that the arbiter determines the transmission order of the data to be transmitted.
7. The method of claim 2, further comprising, after said transmitting said data to be transmitted in accordance with the first priority path:
the data to be transmitted having the first priority and the destination transmission address not being the preset priority address and the data to be transmitted not having the first priority are input to an arbiter.
8. A data transmission apparatus, comprising:
the buffer position determining module is used for determining a first-in first-out memory for buffering the data to be transmitted according to the address information of the data to be transmitted;
the lookup table acquisition module is used for acquiring a preset lookup table according to the associated output port type of the first-in first-out memory;
the destination address determining module is used for determining a destination transmission address of the data to be transmitted according to the address information of the data to be transmitted and the preset lookup table;
and the data transmission module is used for transmitting the data to be transmitted to an output port according to the destination transmission address.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data transmission method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the data transmission method of any one of claims 1-7.
CN202311543648.9A 2023-11-17 2023-11-17 Data transmission method and device, electronic equipment and storage medium Pending CN117472823A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311543648.9A CN117472823A (en) 2023-11-17 2023-11-17 Data transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311543648.9A CN117472823A (en) 2023-11-17 2023-11-17 Data transmission method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117472823A true CN117472823A (en) 2024-01-30

Family

ID=89627424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311543648.9A Pending CN117472823A (en) 2023-11-17 2023-11-17 Data transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117472823A (en)

Similar Documents

Publication Publication Date Title
US8447897B2 (en) Bandwidth control for a direct memory access unit within a data processing system
US20220004387A1 (en) Handling an input/output store instruction
US8825927B2 (en) Systems and methods for managing queues
CN106371898B (en) Event queue management
US10303627B2 (en) Hardware queue manager with water marking
US11074203B2 (en) Handling an input/output store instruction
CN114095438B (en) Data transmission method, apparatus, device, storage medium and computer program product
CN115934625B (en) Doorbell knocking method, equipment and medium for remote direct memory access
US9336162B1 (en) System and method for pre-fetching data based on a FIFO queue of packet messages reaching a first capacity threshold
US20150188816A1 (en) Look-aside processor unit with internal and external access for multicore processors
US9288163B2 (en) Low-latency packet receive method for networking devices
CN117472823A (en) Data transmission method and device, electronic equipment and storage medium
CN116633879A (en) Data packet receiving method, device, equipment and storage medium
CN111970213A (en) Queuing system
CN116594563A (en) Distributed storage capacity expansion method and device, electronic equipment and storage medium
CN114564149B (en) Data storage method, device, equipment and storage medium
CN114500398B (en) Method, device, equipment and medium for processor collaborative acceleration
CN108415779B (en) Method and apparatus for queue management through a host fabric interface
CN115955518A (en) Communication conversion method, device and storage medium for communication between master equipment and slave equipment
CN113253922B (en) Cache management method, device, electronic equipment and computer readable storage medium
CN116107763B (en) Data transmission method, device, equipment and storage medium
CN116166605B (en) Data hybrid transmission method, device, DMA controller, medium and system
CN115442432B (en) Control method, device, equipment and storage medium
CN114553894B (en) Data synchronization method, device, system and storage medium
CN114615273B (en) Data transmission method, device and equipment based on load balancing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Shi Fangxian

Inventor after: Li Zhaojing

Inventor after: Li Jian

Inventor before: Shi Fangxian

Inventor before: Li Zhaojing

Inventor before: Liu Zijun

Inventor before: Li Jian