CN109379342A - Host computer and DSP data transmission method based on UDP network protocol - Google Patents
Host computer and DSP data transmission method based on UDP network protocol Download PDFInfo
- Publication number
- CN109379342A CN109379342A CN201811127528.XA CN201811127528A CN109379342A CN 109379342 A CN109379342 A CN 109379342A CN 201811127528 A CN201811127528 A CN 201811127528A CN 109379342 A CN109379342 A CN 109379342A
- Authority
- CN
- China
- Prior art keywords
- data
- dsp
- host computer
- network protocol
- data packet
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/164—Adaptation or special uses of UDP protocol
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0078—Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
- H04L1/0083—Formatting with frames or packets; Protocol or part of protocol for error control
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention proposes a kind of host computer based on UDP network protocol and DSP data transmission methods, are related to field of data transmission, it is intended to by reducing the resource consumption of DSP, improve data transfer efficiency;Realize step are as follows: host computer is pre-processed to sent data, the broadcast mode of UDP network protocol is recycled to be sent to DSP, DSP directly handles the data packet that EMAC is received later, without building real time operating system and ICP/IP protocol stack, it avoids that the prior art builds real time operating system and ICP/IP protocol stack occupies the defect that a large amount of DSP resources cause operational efficiency low, effectively improves the efficiency that data are transmitted between host computer and DSP.
Description
Technical field
The invention belongs to technical field of data transmission, are related to the data transmission method of a kind of DSP and other equipment, especially relate to
And a kind of host computer based on UDP network protocol and DSP data transmission method.
Background technique
With the continuous development of modern electronic technology and network technology, the Peripheral Interface of traditional DSP embedded system with
And transport protocol often become data transmission bottleneck, in DSP embedded system using network interface communicated at
For the topic of a popular research;DSP is the operation array based on coarseness arithmetic unit, and be good at math operation, is had very
Powerful data-handling capacity has been widely used in the fields such as radar, communication, signal processing, while at baseband signal
Reason, the scenes such as network security processing also have application;Therefore, there is high want to the real-time and efficiency of transmission of data transmission
It asks;Network interface communicates the exchange regulation for following computer network, and there are two types of the architectures of present computer network, one is
Seven layer architectures of OSI, clear concept is theoretical also more complete, but complicated and impracticable;Another kind is TCP/IP
Four-tier model, include application layer, transportation level, internetwork layer, network interface layer.
Currently, the transmission rate that the data transmission method of common host computer and DSP can achieve is lower, rest essentially within
Kbps the and Mbps order of magnitude, and the message transmission rate of the network communication based on gigabit networking interface theoretically can achieve Gbps
The order of magnitude, can satisfy the needs of growing message transmission rate;Current generation, using network protocol carry out DSP with
The research that data are transmitted between host computer largely needs to build real time operating system at the end DSP, and in real time operating system
ICP/IP protocol stack is built, needs to occupy DSP resource, so that the efficiency of DSP reduces.
Summary of the invention
It is an object of the invention to overcome the problems of the above-mentioned prior art, provide a kind of based on UDP network protocol
Host computer and DSP data transmission method, it is intended to pass through reduce DSP resource consumption, improve data transfer efficiency.
Technical thought of the invention is: host computer to after data prediction utilize the modified broadcast mould of UDP network protocol
Formula carries out the transmission of data, and DSP directly handles the data packet that EMAC module receives, completes the transmission of data;Specifically include with
Lower step:
A kind of host computer based on UDP network protocol and DSP data transmission method, include the following steps:
(1) host computer is pre-processed to sent data:
Multiple Document type datas to be sent are converted into Unicode format data by host computer, and will be all
Unicode format data point reuse is the data of equal length, then adds head in the head end of each data, is obtained by multiple comprising head
The preprocessed data of the Unicode format data of portion and equal length composition;
(2) DSP is initialized:
DSP storage allocation space, and be EMAC module configuration register;
(3) host computer sends preprocessed data using UDP network protocol:
The transmission mode of UDP network protocol is revised as broadcast mode by (3a) host computer, obtains the UDP network of broadcast mode
Agreement;
Preprocessed data is loaded into the UDP network protocol of broadcast mode by (3b) host computer, obtains complete data packet,
And the data packet is sent to DSP by network interface;
(4) DSP received data packet:
Whether (4a) EMAC module check receives data packet, if so, executing step (4c), otherwise, executes step (4b);
(4b) EMAC module continues waiting for received data packet;
(4c) EMAC module carries out CRC check to the data packet received, and judges CRC check position and school in data packet
Whether the check bit tested out be consistent, if so, otherwise, abandoning in the memory headroom of data packet deposit DSP distribution and having received
Data packet simultaneously waits new data packet to be received;
(5) DSP obtains the data in data packet:
The length of every data and customized head are in data packet in the memory headroom of (5a) DSP judgement deposit distribution
It is no identical as the length of each Unicode format data in preprocessed data and customized head, if so, executing step
(5b) otherwise abandons the data packet;
(5b) DSP extracts the data that are loaded of UDP network protocol of broadcast mode in data packet, obtains length and customized
Head multiple data identical with the length of each Unicode format data in preprocessed data and customized head are realized
The transmission of data.
Compared with prior art, the present invention having the following characteristics that
The present invention is when position machine and DSP carry out data transmission in realization, is carried out by host computer to sent data pre-
Processing recycles the broadcast mode of UDP network protocol to be sent to DSP, UDP network protocol be it is connectionless, before sending data
It does not need to establish connection, reduce resource overhead and sends the time delay before data, DSP directly handles what EMAC was received later
The technological means of data packet, without building real time operating system and ICP/IP protocol stack, it is intended to solve the prior art and build in real time
Operating system and ICP/IP protocol stack occupy the technical problem that a large amount of DSP resources cause operational efficiency low, compared with prior art,
Effectively improve the efficiency that data are transmitted between host computer and DSP.
Detailed description of the invention
Fig. 1 is implementation flow chart of the invention;
Fig. 2 is the form schematic diagram of the UDP network protocol of broadcast mode of the present invention;
Fig. 3 is the hardware architecture diagram of DSP of the present invention;
Fig. 4 is the EMAC modular structure schematic diagram of DSP of the present invention;
Fig. 5 is the descriptor schematic diagram of the EMAC module of DSP of the present invention;
Fig. 6 is the data that data packet of the present invention loads;
Fig. 7 is the data that the end DSP of the present invention is extracted.
Specific embodiment
Below in conjunction with the drawings and specific embodiments, technical solution of the present invention is described in detail:
Referring to Fig.1, a kind of host computer based on UDP network protocol and DSP data transmission method, include the following steps:
Step 1) host computer is pre-processed to sent data:
Interface of the host computer as human-computer interaction, receives the data for the text formatting being manually entered, host computer by it is multiple to
The Document type data of transmission is converted into Unicode format data, when input data is of different sizes, using longest data as base
Standard carries out zero padding in other data ends, is the data of equal length by all Unicode format data point reuses, then each
The head end of data adds customized head, obtains the Unicode format data by multiple comprising customized head and equal length
The preprocessed data of composition;Preprocessed data receives the judgement after data packet for subsequent DSP and provides foundation, while can after handling
So that DSP directly use data, do not need to format, improve the operational efficiency of DSP;
Step 2) initializes DSP:
DSP storage allocation space, and be EMAC module configuration register;The DSP model that this example uses
TMS320C6657 after hardware structure is as shown in figure 3, DSP powers on, executes initial code, and DSP is defined using CMD file
Memory headroom can correctly define the corresponding address of corresponding data segment, memory defined in this example according to the handbook of DSP
Address is as follows:
After having defined the corresponding address of memory headroom, the memory headroom of received data packet is specified, is defined in this example
Memory headroom of the L2DATA memory as received data packet, the i.e. space buffer;It is as follows to implement code:
TMS320C6657DSP has peripheral module abundant, this example mainly uses EMAC (Ethernet Media
Access Controller) module, which is the interface that dsp processor and piece external equipment carry out network communication, is responsible for ether
Network data sends and receivees;The work of EMAC module supports 10/100/1000Mbps mode in network interface layer, supports complete double
Work/half-duplex, and have the function of flow control etc., EMAC module works normally the support for needing external physical equipment, including an object
Reason Ethernet receives transmitter, and a receiving sends transformer and RJ45 standard interface, complete circuit configuration module such as Fig. 4 institute
Show;
EMAC module provides 8K byte of memory space, is typically used to hold descriptor, above according to needs in L2DATA
The space buffer is distributed, for saving message content, the pBuffer pointer in descriptor is directed toward buffer, as shown in Figure 5;DSP
EMAC module is initialized by configuration register, configuration code is as follows:
Step 3) host computer sends preprocessed data using UDP network protocol:
The transmission of data is carried out using UDP network protocol, UDP network protocol mainly there are following Some features: 1.UDP is nothing
Connection, it does not need to establish connection before sending data, therefore reduce expense and send the time delay before data;2.UDP makes
With Best-Effort, do not guarantee reliably to deliver, therefore host does not need to maintain complicated session table;3.UDP is face
To message, the UDP of sender just consigns to downwards IP layers after adding stem to the message to get off using program delivery;
The message that UDP hands over application layer, both nonjoinder, does not also split, but retains the boundary of these messages, and UDP is once delivered
One complete message, therefore application layer must select the message of suitable size;4.UDP does not have congestion control, therefore network goes out
Existing congestion will not be such that the transmission rate of source host reduces;5.UDP supports one-to-one, one-to-many, the friendship of many-one and multi-to-multi
Mutual communication;The stem expense of 6.UDP is small, only 8 bytes, and the stem than 20 bytes of TCP is short;Above feature makes
UDP network protocol has the characteristics that high efficiency, is the suitable selection of Data Transport Protocol.
Step 3a) transmission mode of UDP network protocol is revised as broadcast mode by host computer, obtain the UDP of broadcast mode
Network protocol;Code is as follows:
Step 3b) preprocessed data is loaded into the UDP network protocol of broadcast mode by host computer, obtain complete data
Packet, and the data packet is sent to DSP by network interface;UDP network protocol such as Fig. 2 institute of broadcast mode after loading data
Show;
When carrying out information exchange, the noun that often this is abstract using entity, which indicates any, may send or receive information
Hardware or software process;In many cases, entity is exactly a specific software module;In order between host computer and DSP
Communication, can receive the hardware entities of information using the EMAC module of DSP as one, is peer-to-peer communications between entity, real
Existing host computer and DSP carry out the transmission of data using network protocol, it is necessary to make them using identical information exchange regulation;This reality
Example illustrates the data exchange of explanation DSP and host computer using the four-tier model information exchange regulation of TCP/IP, using wide
The UDP network protocol for broadcasting mode realizes the transmission of data by gigabit networking interface.
In this example, the data content that host computer is sent is as shown in Figure 6.
Step 4) DSP received data packet:
After the completion of initialization, DSP's DSP starts to work, and EMAC module starts waiting received data packet:
Step 4a) whether EMAC module check receives data packet, if so, executing step (4c), otherwise, execute step
(4b);
Step 4b) EMAC module continues waiting for received data packet;
Step 4c) EMAC module carries out CRC check to the data packet received, and judges the CRC check position in data packet
Whether it is consistent with the check bit verified out, if so, otherwise, discarding has received by the memory headroom of data packet deposit DSP distribution
To data packet and wait new data packet to be received;
Step 5) DSP obtains the data in data packet:
It is network interface layer data that EMAC module, which is stored in the data in memory headroom, and DSP is needed further to be located
Reason can just obtain valid data.
Step 5a) DSP judgement deposit distribution memory headroom in data packet in every data length and customized head
Whether portion is identical as the length of each Unicode format data in preprocessed data and customized head, if so, executing step
(5b) otherwise abandons the data packet;
Step 5b) DSP extracts the data that are loaded of UDP network protocol of broadcast mode in data packet, obtain length and from
Head multiple data identical with the length of each Unicode format data in preprocessed data and customized head are defined,
Realize the transmission of a data.
Two above step can be realized in dsp with few code, compared to real time operating system and TCP/IP
Protocol stack greatly improves the treatment effeciency of DSP, to improve the efficiency of data transmission.
Finally the extracted valid data content of DSP is checked as shown in fig. 7, completion one identical as host computer transmission data
The transmission of secondary data.
Data transmission method proposed by the present invention based on UDP network protocol is mutually tied by hardware design with software design
The mode of conjunction realizes the data transmission between host computer and DSP;The invention enriches the biography of the data between host computer and DSP
Transmission method improves the data transmission efficiency between host computer and DSP, provides and borrows with the transmission exploitation of DSP data for host computer
Mirror.
Above description is only example of the present invention, does not constitute any limitation of the invention.Obviously for this
It, all may be without departing substantially from the principle of the invention the case where after having understood the content of present invention and principle for the professional in field
Under, various modifications and variations in form and details are carried out, but these modifications and variations based on inventive concept are still at this
Within the claims of invention.
Claims (4)
1. a kind of host computer based on UDP network protocol and DSP data transmission method, which comprises the steps of:
(1) host computer is pre-processed to sent data:
Multiple Document type datas to be sent are converted into Unicode format data by host computer, and by all Unicode
Formatted data is adjusted to the data of equal length, then adds head in the head end of each data, obtains by multiple comprising head and length
Spend the preprocessed data of equal Unicode format data composition;
(2) DSP is initialized:
DSP storage allocation space, and be EMAC module configuration register;
(3) host computer sends preprocessed data using UDP network protocol:
The transmission mode of UDP network protocol is revised as broadcast mode by (3a) host computer, obtains the UDP network association of broadcast mode
View;
Preprocessed data is loaded into the UDP network protocol of broadcast mode by (3b) host computer, obtains complete data packet, and will
The data packet is sent to DSP by network interface;
(4) DSP received data packet:
Whether (4a) EMAC module check receives data packet, if so, executing step (4c), otherwise, executes step (4b);
(4b) EMAC module continues waiting for received data packet;
(4c) EMAC module carries out CRC check to the data packet received, and judges the CRC check position in data packet and verify out
Check bit whether be consistent, if so, by data packet deposit DSP distribution memory headroom in, otherwise, abandon the data having received
It wraps and waits new data packet to be received;
(5) DSP obtains the data in data packet:
(5a) DSP judge deposit distribution memory headroom in data packet in every data length and customized head whether with
The length of each Unicode format data in preprocessed data is identical with customized head, if so, step (5b) is executed, it is no
Then abandon the data packet;
(5b) DSP extracts the data that the UDP network protocol of broadcast mode in data packet is loaded, and obtains length and customized head
Multiple data identical with the length of each Unicode format data in preprocessed data and customized head are realized primary
The transmission of data.
2. the host computer according to claim 1 based on UDP network protocol and DSP data transmission method, which is characterized in that
Described in step (1) by all Unicode format data point reuses be equal length data, be by with longest
On the basis of Unicode format data, realized in the end zero padding of remainder data.
3. the host computer according to claim 1 based on UDP network protocol and DSP data transmission method, which is characterized in that
The transmission mode of UDP network protocol is revised as broadcast mode by host computer described in step (2), is host computer by by UDP
What the mode that the destination address of network protocol is revised as broadcast address was realized.
4. the host computer according to claim 1 based on UDP network protocol and DSP data transmission method, which is characterized in that
DSP described in step (5) extracts the data that are loaded of UDP network protocol of broadcast mode in data packet, refer to DSP directly from
EMAC module is stored in the UDP the Internet protocol data packet of the broadcast mode in the memory headroom of distribution and extracts data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811127528.XA CN109379342B (en) | 2018-09-27 | 2018-09-27 | UDP network protocol-based upper computer and DSP data transmission method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811127528.XA CN109379342B (en) | 2018-09-27 | 2018-09-27 | UDP network protocol-based upper computer and DSP data transmission method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109379342A true CN109379342A (en) | 2019-02-22 |
CN109379342B CN109379342B (en) | 2021-07-27 |
Family
ID=65402126
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811127528.XA Active CN109379342B (en) | 2018-09-27 | 2018-09-27 | UDP network protocol-based upper computer and DSP data transmission method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109379342B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112363743A (en) * | 2020-11-03 | 2021-02-12 | 南京德睿智芯电子科技有限公司 | User program updating method based on internet access transmission |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1703883A (en) * | 2002-10-08 | 2005-11-30 | 松下电器产业株式会社 | Transmission data structure, data receiving method, data receiving apparatus, and data receiving program |
WO2007064135A1 (en) * | 2005-12-02 | 2007-06-07 | Alticast Corp. | Apparatus and method for the efficient processing of digital broadcasting signal transmitted through ethernet in a form of internet protocol |
CN202183779U (en) * | 2011-08-04 | 2012-04-04 | 上海电器科学研究院 | Ethernet access device of serial bus |
CN105122699A (en) * | 2013-04-17 | 2015-12-02 | 高通股份有限公司 | Systems and methods for synchronizing timing between wireless networking devices |
CN107613583A (en) * | 2017-10-25 | 2018-01-19 | 上海海洋大学 | A kind of distributed wireless sensor network data summarization gateway |
-
2018
- 2018-09-27 CN CN201811127528.XA patent/CN109379342B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1703883A (en) * | 2002-10-08 | 2005-11-30 | 松下电器产业株式会社 | Transmission data structure, data receiving method, data receiving apparatus, and data receiving program |
WO2007064135A1 (en) * | 2005-12-02 | 2007-06-07 | Alticast Corp. | Apparatus and method for the efficient processing of digital broadcasting signal transmitted through ethernet in a form of internet protocol |
CN202183779U (en) * | 2011-08-04 | 2012-04-04 | 上海电器科学研究院 | Ethernet access device of serial bus |
CN105122699A (en) * | 2013-04-17 | 2015-12-02 | 高通股份有限公司 | Systems and methods for synchronizing timing between wireless networking devices |
CN107613583A (en) * | 2017-10-25 | 2018-01-19 | 上海海洋大学 | A kind of distributed wireless sensor network data summarization gateway |
Non-Patent Citations (1)
Title |
---|
戴钦来等: "《基于ARM和DSP的多轴伺服系统以太网通信》", 《轻工机械》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112363743A (en) * | 2020-11-03 | 2021-02-12 | 南京德睿智芯电子科技有限公司 | User program updating method based on internet access transmission |
Also Published As
Publication number | Publication date |
---|---|
CN109379342B (en) | 2021-07-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9049218B2 (en) | Stateless fibre channel sequence acceleration for fibre channel traffic over Ethernet | |
CN1883212B (en) | Method and apparatus to provide data streaming over a network connection in a wireless MAC processor | |
US8738820B2 (en) | Method and apparatus for wireless network communication wherein a universal serial bus request block (URB) is generated that will vary parameters that controls wireless transmission commands between devices | |
CN103391296B (en) | A kind of controller, transponder and Path Setup method and system | |
EP1868093B1 (en) | Method and system for a user space TCP offload engine (TOE) | |
WO2018094743A1 (en) | Method for processing packet, and computer device | |
CN108494817A (en) | Data transmission method, relevant apparatus and system | |
CN102014067A (en) | Message fragment sending method, device and network equipment | |
JP2004534311A (en) | Configuration to create multiple virtual queue pairs from compressed queue pairs based on shared attributes | |
WO2019000866A1 (en) | Data processing method and internet of things (iot) gateway | |
CN105144657B (en) | The technology of the direct-connected service (WFDS) application service platform (ASP) of the WI-FI for servicing ergosphere 2 | |
US10609125B2 (en) | Method and system for transmitting communication data | |
CN113986811B (en) | High-performance kernel mode network data packet acceleration method | |
US8990422B1 (en) | TCP segmentation offload (TSO) using a hybrid approach of manipulating memory pointers and actual packet data | |
CN108900433B (en) | Method, terminal and server for transmitting lora message | |
CN110167197A (en) | GTP downlink data transmission optimization method and device | |
US8135851B2 (en) | Object request broker for accelerating object-oriented communications and method | |
US7580410B2 (en) | Extensible protocol processing system | |
CN102780633A (en) | Device and method for transmitting data based on CAPWAP (control and provisioning of wireless access points) protocol | |
CN109379342A (en) | Host computer and DSP data transmission method based on UDP network protocol | |
CN114301576A (en) | Method and communication device for generating and transmitting acknowledgement frame in IEEE802.15.4 network | |
KR20020087472A (en) | Method and apparatus for customizing and forwarding parameters in a network processor | |
CN111065084A (en) | Method for improving low-power-consumption Bluetooth transmission speed | |
US8176117B2 (en) | Accelerator for object-oriented communications and method | |
CN113905417B (en) | Token bucket-based control method for flow of packet data convergence protocol layer of 5G base station |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |