News & Analysis
De-layered stack brings TCP/IP to tiny devices
Jim Kopetsky, Chief Operating Officer, Ipsil Inc., Cambridge, Mass.
3/7/2002 4:02 PM EST
Internet and intranet connectivity is, now more than ever, considered a key technology enabling straightforward local and remote monitoring and control of a wide variety of devices. For product developers, enabling a device for Internet/intranet access to a variety of Web services is now considered an important differentiator, especially in markets that are becoming more and more commoditized.
For this to happen, silicon-level solutions must become cost-effective, easy to integrate, scalable, secure and safe, and based on open standards. The protocol underlying the Internet, TCP/IP, is the ideal solution for connecting embedded devices, but only if only these criteria are met.
But the prevailing wisdom is that TCP/IP is too heavyweight for anything but the largest systems such as PCs and servers. This is because the traditional approach for implementing TCP/IP typically involves a high-end 16- or 32-bit processor, lots of memory, a real-time operating system and, finally, a TCP/IP stack. The cost of adding this connectivity can often run $60 to $80, more than almost any conceivable embedded product can afford.
Attempting to squeeze TCP/IP into less space at lower cost is like trying to compress water: It just can't be done. To provide standards-compliant TCP/IP connectivity at an affordable price, the TCP/IP stack itself has to be reconsidered from the ground up.
The first thing to recall in attempting this rebuild is that networking technology is built on a seven-layer stack based on the Open Systems Interconnection (OSI) model, which defines how independent systems communicate with one another. These seven layers are physical, data link, network, transport, session, presentation and application.
Each of the layers of the OSI model has a well-defined function. The transport layer (Transmission Control Protocol, or TCP), provides crucial end-to-end services, including the assurance of correct delivery of data and procedures so as not to overwhelm the network with too much data. The network layer (Internet Protocol, the "IP" layer in TCP/IP), takes care of addressing and routing the packets till the final destination. The data link layer establishes a basic link between network nodes an example of a data link protocol is Ethernet. In a conventional implementation, each layer is logically isolated from the others.
At a conceptual level, this is an ideal solution. Each layer can be implemented and changed independent of any other layer. Similarly, users can purchase specific implementations of different layers from different vendors and be reasonably assured that these products will intercommunicate.
But there is a price to be paid for the layered OSI architectural approach in terms of redundancy and overhead. Each layer, for example, typically has its own set of buffers, so a significant amount of energy is spent reading and writing the same information again and again at each level in the networking model. Not only does this occupy a great number of processor cycles, but it also accounts for a large appetite for memory in most TCP/IP implementations.
For a TCP/IP implementation residing on a Windows-based PC with memory and processing cycles to spare, this is not a problem. However, most embedded systems have far more constraints put on them. And even embedded systems with microcontrollers don't necessarily have the space or budget to add memory at will. Every penny counts with these systems, whose numbers run in the hundreds of thousands to millions in terms of production volumes.
To create a bona fide TCP/IP connection that meets the requirements for embedded environments, one must compress the seven-layer OSI model into a single integrated module. Instead of looking at networking and TCP/IP as a series of distinct layers, the full stack can be collapsed but still operate at line rates, processing TCP/IP traffic one bit at a time, without any delays or buffering. The performance of a "de-layered" solution is limited only by the specific process technology used for implementation. The FlowStack approach, for example, processes each bit of TCP/IP traffic through a delay of less than 50 gates.
With this methodology, the core of a de-layered TCP/IP stack makes use of a logical, rather than a physical, representation of required TCP/IP behavior (as specified in RFC1122) and performs "peephole optimization" across the seven layers. This results in a cross-layer optimization of the functional transformations specified in the standard, resulting in a sub-5,000-gate implementation that is mathematically provable to be fully compliant. The de-layered implementation is nearly a full order of magnitude more compact than traditional attempts at integrating TCP/IP functionality.
Most important, despite the radical approach to TCP/IP from an outside standpoint (that is, looking at it as a black box), de-layered TCP/IP performs like any other other standard TCP/IP solution. A Web server prototype using this de-layered approach, for example, was hooked to the public Internet for more than a year and received over 2 million hits in its first two months alone without any incompatibilities discovered. To paraphrase an old adage, if it looks and feels like TCP/IP, it must be TCP/IP.
Like other TCP/IP implementations, de-layered architectures can be integrated into microcontrollers and used to connect a wide range of products to an intranet or the Internet. The resulting single-chip solutions should combine the physical layer, the data link layer, IP/TCP/UDP and standard application services including an HTTP 1.0-compliant Web server, Dynamic Host Configuration Protocol and Internet Control Message Protocol (ping) capabilities.
These embeddable TCP/IP chips can be used either as standalone devices or in conjunction with existing subsystems. In standalone mode, any TCP/IP implementation, including a de-layered one, must be able to be programmatically controlled, allowing for a single-chip solution for managing connectivity between devices and the network.



