designing embedded communication system

8
Introduction: Table 1-1: OSI reference model. Layer Typical Implementation Name Function Examples 7 Software Application Network interface and user apps. Email 6 Software Presentation Data format XDR (eXtended Data Representation) in  Network File System (NFS) protocol definition 5 Software Session Dialog and synchronization management Checkpointing protocols 4 Software Transport End-to-End Application Transport User Datagram Protocol (UDP), Transmission Control Protocol (TCP) 3 Software and Hardware  Network Addressing and  packet transmission Internet Protocol (IP) 2 Hardware and Software Data Link Frame transmission across link Ethernet MAC 1 Hardware Physical Transmission method RS-232 Each layer is implemented via a combination of end points and protocols. An end point is a device that implements a protocol function. It communicates with a peer end point using the implemented protocol. For example, two hosts using the Transmission Control Protocol (TCP) to communicate between each other are TCP peers Physical Layer This layer defines how transmission media, such as cable, communicate with other devices and how bits are conveyed between peer systems. The physical layer provides the hardware means for transmitting data, including mechanical, procedural, electrical, and functional specifications for attributes such as voltage levels, encoding formats, and signal pins. This layer is almost always implemented in hardware; functionality for the physical layer is usually enabled in software as device drivers.  Data Link Layer The data link layer is subdivided into two layers-the Logical Link Control (LLC) layer and the Media Access Control (MAC) layer.

Upload: jravi2050

Post on 03-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Designing Embedded Communication System

7/28/2019 Designing Embedded Communication System

http://slidepdf.com/reader/full/designing-embedded-communication-system 1/8

Page 2: Designing Embedded Communication System

7/28/2019 Designing Embedded Communication System

http://slidepdf.com/reader/full/designing-embedded-communication-system 2/8

The data link layer is usually associated with data integrity through error detection and uses data

checks such as Cyclic Redundancy Check (CRC). Framing and CRC are handled by hardware

controllers; so the data link layer software needs to program the controllers appropriately, as with

the physical layer.

Network Layer

This layer is responsible for delivery of packets from the source to the destination. It isolates

the network topology from the higher layers, so that these layers are network independent.

The network technologies may be different-for example, the source may be connected to an

Ethernet network, while the destination may be part of an ISDN network. The network layer 

 provides information for source and destination addresses, subnet information, and parts used

 by higher transport layers. This layer uses information to determine the correct path to reach a

destination from the source and proceeds with forwarding the packets from source to

destination networks.

Routers and software used by routers typically utilize the network layer.

Internet Protocol (IP) is an example of a network layer protocol. It is a connectionless

 protocol, in the sense that individual packets (datagrams) can be treated differently-for 

example, each packet can potentially follow a different path from source to destination,

depending upon the forwarding decision at each router.

While network layer forwarding can be implemented in either software or hardware, routing

is usually less performance critical and involves more peer transactions. Therefore, routing is

usually implemented in software.

Transport Layer

Running on top of the network layer, the transport layer provides network-independent, end-

to-end integrity between two devices communicating through the network. It builds on the

addressing protocols implemented in the network layer and interfaces with higher layer 

 processes and applications on both source and destination systems. Protocols at this layer 

may be either connection oriented and reliable or connectionless and unreliable.

A connectionless transport protocol, such as User Datagram Protocol (UDP), does not

 provide feedback from the receiver and can be unreliable. A connection-oriented protocol,

such as Transmission Control Protocol (TCP), provides feedback on the reception of the data by the peer. A connection process is initiated prior to data transmission, an acknowledgement

is sent upon receipt of the data, and error detection and recovery routines ensure the data

arrives intact. The connection is closed when the transmission is complete. For these

capabilities, TCP is considered to be reliable.

Transport layer functions are usually implemented in software

Session, Presentation and Application Layers

The session, presentation, and application layers are closest to the user applications and can be treated together. Session layer functionality includes establishment, management, and

Page 3: Designing Embedded Communication System

7/28/2019 Designing Embedded Communication System

http://slidepdf.com/reader/full/designing-embedded-communication-system 3/8

termination of application connections and includes services such as data flow

synchronization, partitioning, and checkpointing. The presentation layer specifies how user 

applications format data between applications and includes functionalities such as encryption,

data compression, and character sets. The application layer provides end- user services such

as mail, file transfer, and so on.

The TCP/IP world uses only one layer-the application layer-to signify all of these, even

though the OSI model specifies each of them as separate layers. Hence, the TCP/IP model is

a five-layer model. Protocols like Simple Mail Transfer Protocol (SMTP), File Transfer 

Protocol (FTP), and Virtual terminal protocol (Telnet) are in the application layer. These

layers are usually implemented as networking applications on the communications system,

 but some functions, such as encryption algorithms, may run in an off- CPU hardware

accelerator for security or performance reasons.

In the case of TCP traffic over Ethernet, the data is first encapsulated with the TCP header (Layer 4),

preceded by the IP header (Layer 3), which, in turn, is preceded by the Ethernet header (Layer 2).

Communication devices have a specific place in the network and implement specific protocols at

each of the layers.

  A host system may implement all the layers of the OSI stack to communicate with a peer

host entity.

  A hub or repeater may implement only the physical layer to regenerate the signals.

  An Ethernet switch may implement only physical and data link layer functionality.

  A router primarily operates at the network layer, so it will typically implement the first three

layers, physical, data link, and network.

A host system connected to a LAN, such as Ethernet, communicates with devices on its own LAN and

can also communicate with devices on other networks, such as Web servers. A host system with a

Web browser uses an application protocol like HyperText Transfer Protocol (HTTP) to access the

content provided by the Web server. In this situation, HTTP runs on top of TCP at the transport layer,

which, in turn, runs over IP at the network layer.

Layer 2 Switches

Layer 2 switches operate at the data link layer and switch MAC (Ethernet) frames between

two LAN segments. They determine the destination Ethernet address from the MAC frameand forward the frame to the appropriate port. The port determination is done via a table

which has entries in the form of a (Destination MAC Address, Port) pair. The Layer 2 switch

constructs this table by learning the addresses of the nodes on each of its ports. It does this by

monitoring traffic that the nodes send out on its LAN segment. The source address on a MAC

frame indicates that the node with this address is present on the LAN segment (and port) over 

which the frame was received.

 Note that Layer 2 switches do not examine the network layer IP address of the packets they

are forwarding, as these devices switch MAC frames between two hosts on the same IP

network. Layer 2 switches are an evolution of the earlier transparent bridges. Transparent  

implies that the hosts are not aware of the existence of the switches — i.e., they do not targetframes to the switches but only to the destinations on the same network. The switch makes

Page 4: Designing Embedded Communication System

7/28/2019 Designing Embedded Communication System

http://slidepdf.com/reader/full/designing-embedded-communication-system 4/8

decisions on forwarding the frame to the appropriate LAN segment without the source node

 being aware of its presence. For forwarding IP packets to other networks, a router is used.

Routers

Routers operate at the network layer of the OSI model and can forward IP packets between asource and destination.

Hosts send their “off -net” packets to the router, which, in turn, forwards these frames in the

direction of the destination. If the destination host is directly connected, the packets are sent

directly to the destination. If the destination host is not directly connected, the packets are sent to

another router, from where they are directed towards the destination network, traversing, possibly,

several intermediate networks.

IP routers build tables using routing updates that are exchanged between neighboring routers. These

tables are used for forwarding IP packets across a network.

Using Multiple Protocols

Protocol functions constitute a large part of the software in a communications system.

Software that implements protocol functionality is often called a protocol stack . Each

 protocol stack component performs the protocol function while stacked on top of or below

another. For example, a TCP stack sits on top of an IP stack in a host implementation. The IP

stack could sit on top of a PPP (Point to Point Protocol) stack for communicating over a serial

interface.

Communications devices often perform more than one function—for example, a router may also

perform Layer 2 switching. Also, there may be a need for the router to communicate as an end node

for management (e.g., SNMP, Telnet, HTTP) purposes.

Telecom Equipment

Routers and switches are typically used in the data communications world, where data transfer is

done via packet switching. In the telecommunications (telecom) world, circuit switching is the

traditional switching scheme used for voice communications. In this scenario, the end node is

typically a phone which is connected to the telecom network though a wired or wireless link. The

connection from the phone terminates at a local exchange or switching center.

The phone links to the network by using messages sent via a tone (analog) or messages

(digital). Multiple switching centers or exchanges use these messages to establish the

connection from the dialing phone to the destination phone, a process known as signaling .

The exchanges communicate with each other using a separate protocol called Signaling

System #7 (SS7). This protocol enables the end-to-end connection between source and

destination phones.

After the connection is established, voice conversation is carried as either analog or digital

information. A supervisory function, known as call control , sets up and characterizes theconnection between source and destination using a set of rules. For example, the destination

Page 5: Designing Embedded Communication System

7/28/2019 Designing Embedded Communication System

http://slidepdf.com/reader/full/designing-embedded-communication-system 5/8

 phone may have specified that it is not willing to accept calls from the source phone. In this

case, the exchange (switch) will deny the call, since it would have been informed of this rule

through SS7.

In the scenario described, the handset or telephone is a low-complexity device, while the central

office switch is at the other end of the spectrum. Commercial switches like the Lucent 5ESS™ and

Nortel’s DMS-100™ are extremely complex pieces of equipment which require hundreds of 

thousands of lines of software for call control and supervisory functions, which are the typical

software components in the switch.

From an architectural perspective, circuit-switched systems can be designed such that the

network contains the communications intelligence, and end systems have little or no

intelligence. This is the typical view of the telecom world. The alternate is the view of the

engineers in the IP/Internet world. In this view, end system devices may need to implement

functions such as timeouts and retransmissions while the network performs basic forwarding

functions, i.e., has little intelligence. Similar to the datagram-versus-virtual circuit argument,there is no clear winner.

Due to the increasing complexity of the software, the large circuit switching exchanges are

 being replaced by a new class of devices called “soft switches.” These switches separate the

control processing from data or payload processing. Complex control software can reside in

an off-switch workstation, rather than an embedded device like the circuit switch. This

strategy increases architectural flexibility, since the workstation software can be upgraded

without affecting data processing. This separation of the control and data processing

functions is common among recent communications software and systems.

Phones

Traditional phones use analog signals to communicate with the central office exchange. Some

cordless phones still use analog methods to communicate with the central office to record,

store, and retrieve messages. Office phones usually communicate with a local exchange

located within the office, which is often called a private branch exchange (PBX) and is

usually a scaled-down version of the central office exchange. Often the private exchanges use

a proprietary digital communications and require software functions on them built into the

 phones. The private exchange will, in turn, use a digital method of communication with the

central office exchange using a line like a T1 or E1 line.

Cellular phones now use digital communication with the network. These phones have a set of 

 protocols starting from the physical layer that they use to communicate with the base

transmission station (BTS). The software implementing these protocol stacks includes

functionality to send periodic signals to the base transmission station to indicate the locationof the phone within the cellular network as well as set up connections through the cellular 

network to another phone. While the cellular network is quite complex, some of the

complexity is on the handset itself.

Convergence

Many companies typically have two networks — a telephone network and a data network.The telephone network is a circuit-switched network both internally and externally, while

Page 6: Designing Embedded Communication System

7/28/2019 Designing Embedded Communication System

http://slidepdf.com/reader/full/designing-embedded-communication-system 6/8

email, file transfer and collaborative work is done using IP on a packet- switched network. To

reduce complexity, there is a movement towards a single, integrated network, where even

voice is carried over the network in IP packets. In a typical voice-over-IP implementation, a

 phone is connected to an Ethernet network instead of a private branch exchange. Voice is

sampled and digitized into discrete packets and sent over the Ethernet network. Packets are

forwarded to reach destinations, which could be other IP phones or analog phones. Withanalog phones, a gateway converts the packets back into analog information to communicate

with the analog phone.

Simple phones of the analog world are being replaced by a complex Ethernet phone, while

the relatively homogeneous circuit-switching network is being supplanted by a more complex

topology, including gateways and soft switches. All of these involve a fair degree of software

complexity and introduce new system requirements. On a network where voice and data

traffic travel over the same links, voice traffic must be given a higher priority, since a voice

 packet that arrives late is meaningless to the listener. In summary, phones are increasing in

complexity with a need for protocol stacks to be implemented on them.

Types of Software Components 

Broadly, there are two types of software components in a communications system: protocol 

 software, which implements a protocol specification, and systems software (including

infrastructure software) which usually includes a real-time operating system (RTOS) and an

infrastructure to manage the hardware.

Protocol Software

Protocol software implements the protocol as detailed in a protocol specification. Thesespecifications are usually specified by a standards body such as theInternational Organization

for Standardization (ISO), Institution of Electrical and Electronic Engineers (IEEE), or 

International Telecommunications Union (ITU-T). Example protocols include the Internet

Protocol (IP) and IEEE 802.2 Logical Link Control (LLC).

While the protocols are standard, implementation on communications systems varies widely. 

Small form factor devices such as PDAs (Personal Digital Assistant) and cell phones may

limit the size of the protocol software resident on the device. On the other hand, carrier-class

systems like edge routers may require that the protocol software be implemented in a

distributed fashion.

Using the OSI layering as an abstraction mechanism, the software architecture of a complex

communications system can be partitioned into higher and lower layers. For some functions,

the higher and lower layers may be other protocols. For example, a device driver may be a

lower layer function, while an application may be a higher layer implementation (see

xrefparanum).

Protocol implementation is typically based on a state event machine (SEM), also known

as a state machine . The state machine is the core of the protocol implementation,

typically in the form of the State Event Table (SET), which holds a set of rules

specifying the action to be performed based on events. For example, a message is

transmitted if a timeout occurs in a specific state.

Page 7: Designing Embedded Communication System

7/28/2019 Designing Embedded Communication System

http://slidepdf.com/reader/full/designing-embedded-communication-system 7/8

The Communications Ecosystem

The communications infrastructure requires a number of participants in the development and

deployment process. The final product is sold by equipment vendors for use by end users and

enterprises. The engineering effort in building the product requires tools at various levels.

  Electronic Design Automation (EDA) vendors

  Semiconductor component vendors

  RTOS, tools and software vendors

  Contract Manufacturers (CMs)

  Equipment Manufacturers (EMs)

  Home, Enterprise and service-provider users

Semiconductor component vendors supply their chips to the equipment manufacturers.

Semiconductor vendors use tools from Electronic Design Automation (EDA) vendors to

design chips, which are then supplied to the communications equipment manufacturers. If the

EM staff designs some ASICs, these EDA vendors supply the tools to the equipmentmanufacturers also. The hardware designers on the EM staff design their hardware using

these chips — they may include processors, network controllers, switch fabrics, network 

 processors, and so on.

The processors will typically require an RTOS to run on them and may also include other software like third-party protocol stacks, redundancy framework software, and so on. These

will be provided by the RTOS and third-party software vendors (or reused from earlier 

 projects). The tool vendors provide the compilation, test and debugging tools for the

engineering effort at the EM. The EMs design and develop the communications hardware and

software using these tools. They can then sign up with a contract manufacturer (CM) to

manufacture the actual equipment. These are then shipped to service- provider, enterprise, or 

home customers depending upon the distribution model. For example, a DSL service provider 

may take the complete responsibility and install the DSL modem at the customer premises. In

this case, the EM never deals with the end customer.

Design Considerations-A Prelude

  The following is an example of some of the issues faced by designers and developers

of communications software. It is important that these issues are addressed early inthe design for the product to meet its requirements.

  Does the hardware architecture involve one processor or multiple processors?

Partitioning of functions will depend upon the number of processors.

  Has the RTOS been chosen? If so, does it provide memory protection between

 processes/tasks? The task partitioning and interfacing will depend upon this.

  What kind of performance is required? Can this be implemented completely in

software, or does it require some hardware acceleration support?

  What are the protocols to be implemented, and how do they interface with the system

software and other protocols? Can any of the protocols be accelerated via hardware?

  What kind of global data structures and tables are to be used for the implementation?

  What kinds of buffer and timer management are required?

Page 8: Designing Embedded Communication System

7/28/2019 Designing Embedded Communication System

http://slidepdf.com/reader/full/designing-embedded-communication-system 8/8