Scheduling Algorithms THE ATM SWITCH ARCHITECTURE

64 ATM NETWORKS The AAL 1 SAR sublayer The SAR sublayer accepts blocks of 47 bytes from the CS and adds a 1-byte header to form the SAR-PDU. The SAR-PDU is then passed on to the ATM layer, where it gets encapsulated with a 5-byte ATM header. The ATM cell is then passed on to the physical layer, which transmits it out. At the receiving SAR sublayer, the 1-byte header is stripped and the payload of the SAR-PDU is delivered to the receiving CS. The encapsulation of the SAR-PDU is shown in Figure 3.14. The header consists of two fields: the sequence number SN field and the sequence number protection SNP field. Both fields are 4 bits long. The SN field contains the subfields: • Convergence sublayer indication CSI : It carries an indication that is provided by the CS. The default value of the CSI bit is 0. • Sequence count : Provided by the transmitting CS, this field is associated with the block of data in the SAR-PDU. The count starts at 0 and is increased sequentially modulo 8. The receiving CS uses the sequence count to detect lost or misinserted cells. The SNP field contains the following two subfields: • CRC-3 : It is computed over the CSI and sequence count fields. • Parity : Even parity bit used calculated over the CSI, sequence count, and CRC-3 fields. The transmitting SAR computes the FCS for the first four bits of the header and inserts it into the CRC-3 field. The pattern used to compute the FCS is given by the polynomial: x 3 + x + 1. After completing the CRC operation, the transmitting AAL calculates the even parity bit on the first seven bits of the header and inserts the result in the parity field. The receiving SAR examines each SAR-PDU header by checking the FCS and the even parity bit. The state machine that controls the receiver’s error detection and correction scheme is the same as the header error control scheme used for the ATM header see Section 3.2; see also Figure 3.4. At initialization, the state machine is set to the correction mode. Each time an SAR-PDU comes in, the FCS and the parity bit are checked. If no errors are found, the SN field is declared as valid and the state machine remains in the correction mode. If a single-bit error is detected, then it is corrected and the SN field is declared as valid, but the state machine switches to detection mode. If a multi-bit error is detected, then SN field is declared as invalid and the state machine switches to detection mode. In detection mode, the FCS and the parity bit are checked each time an SAR-PDU comes in; if a single-bit or a multi-bit error is detected, then the SN field is declared as payload SAR Header 47 bytes SN SNP CRC-3 3 bits Parity 1 bit 3 bits 1 bit CSI Seq. count Figure 3.14 The SAR encapsulation for AAL 1. THE ATM ADAPTATION LAYER 65 invalid and the state machine remains in detection mode. If no errors are detected, then the SN field is declared as valid and the state machine returns to the correction mode. The receiving SAR sublayer conveys the sequence count, the CS indication, and the status of the SN field i.e., valid or invalid to the receiving CS. This error detection and correction scheme runs in addition to the error detection and correction scheme for the ATM header. However, these two mechanisms apply to two different fields of the ATM cell. The header error control mechanism applies to the first four bytes of cell’s header, whereas the above scheme applies to the SN field. The AAL 1 CS The convergence sublayer performs various functions, such as handling cell delay varia- tion, processing the sequence count, processing forward error correction, handling perfor- mance monitoring, transferring structured and unstructured data, and transferring timing information. Below, we describe each of these functions. Handling cell delay variation For AAL 1 to support constant bit rate applications, it has to deliver the data stream to the receiving application at the same bit rate at which it was transmitted. The ATM cells, which carry the data stream, might have to traverse multiple ATM switches before they reach their destination. In view of this, the arrival of these cells might sometimes be delayed because of network congestion. Also, the opposite might occur. That is, a group of cells might arrive closer to each other than they were originally transmitted. To compensate for this variability in the arrival of the cells, CS writes the incoming SAR-PDUs into a buffer, from where it delivers the data stream to the receiving AAL application at a constant bit rate. A similar method is used, for instance, when we listen to a radio station over the Internet. In the event of buffer underflow, CS might need to insert dummy bits in order to maintain bit count integrity. Also, if there is a buffer overflow, then CS drops the appropriate number of bits. Processing the sequence count CS processes the sequence count values in order to detect lost or misinserted cells. Any detected misinserted cells are discarded. To maintain bit count integrity of the AAL user information, it might be necessary to compensate for lost cells by inserting dummy SAR-PDU payloads. Forward error correction For video, forward error correction might be performed in order to protect against bit errors. For enhanced error-protection, forward error correction can be combined with interleaving of AAL user bits. Performance monitoring CS can generate reports giving the status of end-to-end performance, as deduced by the AAL. The performance measures can be based on events of: lost or misinserted cells, buffer underflows and overflows, or bit errors. 66 ATM NETWORKS Structured and unstructured data transfers Two CS-PDU formats have been defined: the CS-PDU non-P format and the CS-PDU P format . The CS-PDU non-P format is constructed from 47 bytes of information supplied by the AAL user. The CS-PDU P format, on the other hand, is constructed from a 1- byte header and 46 bytes of information supplied by the AAL user. The 1-byte header contains an even parity bit and a 7-bit field that contains the Structured Data Transfer SDT pointer, which is used to point to the beginning of a block of data. The CS-PDU P format or non-P format becomes the payload of the SAR-PDU. Structured and unstructured data transfers are used in circuit emulation services CES, which emulate a T1E1 link over an ATM network using AAL 1. In order to implement CES, an interworking function IWF is required, as shown in Figure 3.15. The two IWFs are connected over the ATM network using AAL 1 via a bidirectional point-to-point virtual circuit connection. CES provides two different services: DS1E1 unstructured service and DS1E1 N × 64 Kbps structured service . For more details on CES, see Chapter 12. In the unstructured service, CES simply carries an entire DS1E1 signal over an ATM network. Specifically, IWF A receives the DS1 signal from user A and packs it bit-by-bit into the 47-byte CS-PDU non-P format, which in turn becomes the payload of a SAR- PDU. The SAR-PDUs then become the payload of ATM cells, which are transferred to IWF B. From there, the bits get delivered to user B as a DS1 signal. In the structured service, CES provides a fractional DS1E1 service, where the user only requires an N × 64 Kbps connection. N can range from 1 to 24 for T1, and from 1 to 30 for E1. An N × 64 Kbps service generates blocks of N bytes. These blocks are carried using the structured data transfer protocol. Such a block of data is referred to in the standards as a structured block. These blocks of N bytes are transported back-to-back over successive cells using the CS-PDU non-P format and P formats. The SDT pointer in the CS-PDU P format is used to help delineate the boundaries of these blocks. The actual rules as to how to use the SDT pointer in the P format are somewhat complex. Below, we describe these rules and then we give an example. When the block is 1 byte long, the structured data transfer protocol generates only non-P format payloads. For block sizes greater than 1 byte, the structured data transfer protocol uses both the non-P and P formats. Recall that each SAR-PDU carries a CS-PDU P format or a non-P format in its payload, and a sequence count. CS provides both the CS-PDU P or non-P format and the sequence count. The sequence count ranges from 1 to 7, and eight successive SAR-PDUs with a sequence count from 1 to 7 form a cycle. The CS-PDU P format is used only once within each cycle at the first available oppor- tunity to point to the beginning of a structured block. The P format can only be used in an SAR-PDU with an even sequence count i.e., 0, 2, 4, 6. The SDT pointer gives the offset, expressed in bytes, between the end of the pointer field and the beginning of the first structured block within a 93-byte payload consisting IWF A IWF B ATM network UNI UNI CBR User A CBR User B Figure 3.15 The interworking function in CES.