TCP/IP Network Protocol Stack for Embedded DSP Systems

Network connectivity gains more and more importance in industrial applications. Data-base connectivity, browser frontends for configuration and setup, and remote maintainance are but a few features requiring a network interface. Such a network interface must however under no circumstances delay or block the DSP’s main task: real-time signal processing. Some applications might tolerate delays, e.g. biometric access control, but if the DSP is a part of the production environment, any violation of real-time constraints will inevitably cause system malfunction.

Network Protocol Stacks

Using a preemptive operating system is always a good choice on high-performance processors, but smaller, mostly application-specific, processors like the Texas Instruments C2000 family, do not provide the memory and computation resources required by such an operating system. These smaller processors use a cooperative multitasking OS, if any. Cooperative systems however do require the cooperation of all tasks. Standard network protocol stacks need extensive adaptations and verifications to be usable in a cooperative multitasking environment.

Network Co-Processor

On first sight a co-processor seems to be an ideal solution. Processors like the Texas Instruments OMAP family combine an ARM and a DSP core on a single chip and seem predestined for these applications. Especially the large software base of the ARM core and Linux support makes them particularly attractive.

However, not all problems are solved: ARM and DSP share all on-chip resources, external memories, peripherals, and interfaces. Memory-extensive operations running on the ARM core might still stall and delay the DSP execution and cause real-time violations.

In-depth knowledge of the processor architecture is required to avoid or at least minimize such resource conflicts.

DModule2 DSP, FPGA, and Analog I/O Module Stack
DSP & FPGA Modules

For many smaller DSP systems this solution is not practicable because no on-chip co-processors are available and no suitable host interface exists to add an external co-processor. If large amounts of data are transferred via the network, a co-processor might not be able to significantly reduce the DSP computation load: Data moves to a co-processor will consume as much time as direct access to a network interface chip. Many network controllers now offer features like checksum offloading, which reduces the DSP protocol overhead anyway.

Optimized Network Stack

D.SignT concluded to develop its own TCP/IP network stack, specifically optimized for DSP systems. This stack can operate as a background process using only the remaining processing time after all other tasks are completed, thereby not influencing the real-time performance of the DSP system. The D.SignT TCP/IP stack does not require an underlying operating system, but may as well be used in a preemptive or cooperative RTOS environment. All functions are non-blocking and interruptable at any time.

Resource consumption has been minimized too. Copy operations are mostly replaced by callback functions to inform the application layer if new data is available. The receive and transmit functions can directly access the application data buffers.

Existing Ports

The D.SignT TCP/IP stack has been ported to the Texas Instruments C2000, C5000 and C6000 families, the TMS320CV33 and to the Analog Devices ADSP-21065 processor.

Supported Network Protocols

ZeroConf/AutoIPautomatic client configuration (IP address assignment)
ARPAddress Resolution Protocol, resolves the IP address to a hardware MAC address. No user action is required. If an address is unknown, an ARP request is generated automatically.
IPInternet Protocol. All data transferred by DNS, DHCP, ICMP, UDP and TCP is automatically packed into IP packets.
ICMPInternet Control Message Protocol. The D.SignT.TCP/IP protocol stack responds to “ping” requests to test a connection
UDPUser Datagram Protocol, provides a one-to-one or one-to-many connectionless data path. Data transmitted via UDP is not guaranteed to reach its destination. This protocol has very low overhead and is especially useful for transmitting non-critical data like audio and video streams, or any other realtime data where retransmissions cannot be tolerated.
TCPTransmission Control Protocol, provides reliable, connection-oriented, one-to-one connections. All data is acknowledged by the receiver and retransmitted automatically if required. This protocol should be used for critical data like software uploads, commands, etc.
DHCPDynamic Host Configuration Protocol. This protocol has been developed to ease maintenance of a TCP/IP network. A DHCP server manages the allocation of IP addresses and provides additional network configuration data like gateways, DNS servers etc. The TCP/IP stack integrates the client functions required to obtain an IP address, DNS server, and gateway.
DNSDomain Name System. This protocol allows to use symbolic host names instead of numerical IP addresses. The TCP/IP stack integrates the client functions to query a DNS server to resolve a host name.
FTPFile Transfer Protocol, based on TCP. A FTP server library exists, which allows to upload programs and parameters to the module´s Flash Memory, or download log files and data from the DSP. The FTP server is widely configurable: users, passwords, directories, files, and access restrictions are maintained in a simple data structure.
HTTPHypertext Transfer Protocol, based on TCP. We do provide a HTTP server framework, which passes GET and POST parameters to a user-defined callback function, hence providing the required flexibility for dynamic data. The DSP can send static HTML pages and images as well as inserting the current value of variables, generate images from data acquisition buffers, etc. on demand.
TELNETTerminal-based communications for maintenance and updates
SMTPSimple Mail Transfer Protocol. Send and Email message or notification
SNTPSimple Network Time Protocol. Obtain the current time from a network/Internet server

Basic Network Functions

net_initinitialize the TCP/IP stack
net_set_gatewayconfigure the default gateway for connections outside the local network
socket_opencreate and open a new socket
socket_closeclose a socket
set_socket_optionspecify non-default socket options, e.g. disable UDP checksum
install_icmp_socketinstall a socket for ICMP messages (ping)
net_sendnon-blocking send function
net_send_readyblocking send function (binary data)
net_send_stringblocking send function (ASCII streams)
net_recvnon-blocking receive function
net_recv_readyblocking receive function
net_isqmain networking function, must be called periodically in your program main loop, from a timer interrupt, or as a task in a RTOS
connectestablish a TCP connection
shutdownshutdown a TCP connection
gethostbynamehost name resolution
accepttest if a TCP socket is connected

Resource Consumption

Typical memory requirements (including ARP, IP, ICMP, UDP, TCP, DHCP and DNS) vs. DSP architecture. A minimum configuration (UDP only, no DHCP) will reduce the code size by approx. 25 percent.

TMS320F2812/2833527.4K bytes5.6K bytes + 604 bytes per socket
TMS320C550x35K bytes8K bytes + 640 bytes per socket
TMS320C6xxx72K bytes7.2K bytes + 604 bytes per socket
TMS320VC3315K words2.7K words + 151 words per socket
ADSP-2106512.4K words1.9K words + 224 words per socket

Test Systems

Besides D.Module DSP modules and UniDAQ multifunction data acquisition boards, the D.SignT TCP/IP stack can be evaluated on the following low-cost Delfino, eZdsp and DSK Starter Kits:

  • TMS320F2812 eZdsp + eZdsk.91C111
  • TMS320F28335 eZdsp + eZdsk.91C111
  • TMS320F28379D LAUNCHXL-F28379D + D.Elfino.Net
  • TMS320F28379D ControlCard-F28379D + D.Elfino.Net
  • TMS320C5502 eZdsp USB Stick
  • TMS320VC5509A DSP Starter Kit + DSK.91C111
  • TMS320VC5510 DSP Starter Kit + DSK.91C111
  • OMAP-L137/TMS320C6747 Floating Point Starter Kit
  • TMS320C6416 DSK + DSK.91C111
  • TMS320C6713 DSK + DSK.91C111
  • TMS320DM6437 DSK
  • TMS320DM6455 DSK


The following license models, tailored to your requirements:

  • Test- and Evaluation License
  • Quantity-based License
  • Unlimited OEM License

A quantity-based or OEM license includes free consultancy in integrating a network controller into your target circuit.

Shopping Cart