Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. S.Nayeema,K.Jamal / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 Vol. 3, Issue 1, January -February 2013, pp.338-342 Design and implementation of MAC Transmitter for the transmission of UDP packet using FSM and verilog coding techniques S.Nayeema K.Jamal Gokaraju Rangaraju Institute of Engineering & Gokaraju Rangaraju Institute of Engineering & Technology,M.Tech,VLSI, Hyderabad,AP. Technology, Asst.Prof. ,ECE Department, Hyderabad,AP.Abstract The purpose of this paper is to design correction, or acknowledgment is done byand develop a MAC Transmitter on Field UDP.UDP is only concerned with speed. So when,Programmable Gate Arrays (FPGA) that the data sent over the Internet is affected byconverts 32 bit data in to 4 bit DATA for collisions, and errors will be present. UDP packetstransmitter. The data which is used for called as user datagrams with 8 bytes header. Atransmission is UDP Packet. The entire UDP format of user datagrams is shown in figure below.packet will go as data for MAC frame. In this In the user datagrams first 8 bytes contains headerpaper we design the Ethernet (IEEE 802.3) information and the remaining bytes contains data.connection oriented LAN Medium AccessControl Transmitter (MAC). It starts bydescribing the behavior of MAC circuit usingVerilog. A synthesized Verilog model of the chipis developed and implemented on targettechnology. This paper will concentrate on thetestability features that increase productreliability. It focuses on the design of a MACTransmitter chip with embedded Built-In-Self-Test (BIST) architecture using FPGA technology.Keywords—UDP,MAC, IEEE 802.31.INTRODUCTION : Figure: UDP Frame Format User Datagram Protocol (UDP) is atransport layer protocol that supports Network The Media Access Control (MAC) dataApplication. It layered on just below the „Session‟ communication protocol sub-layer, also known asand sits above the IP(Internet Protocol) in open the Medium Access Control, is a part of the datasystem interconnection model (OSI). This protocol link layer specified in the seven-layer of OSI modelis similar to TCP (transmission control protocol) that (layer 2). It provides addressing and channel accessis used in client/ server programs like video control mechanisms that make it possible for severalconference systems expect UDP is connection terminals or network nodes to communicate within aless.Unlike TCP, UDP doesnt establish a connection multipoint network, typically with a local areabefore sending data, it just sends. Because of this, network (LAN) or metropolitan area networkUDP is called "Connectionless". UDP packets are (MAN). A MAC protocol is not required in full-often called "Datagrams. It‟s a transport layer duplex point-to-point communication. In singleprotocol. This section will cover the UDP protocol, channel point-topoint communications full-duplexits header structure & the way with which it can be emulated. This emulation can be considered aestablishes the network connection. MAC layer. The MAC sublayer acts as an interface UDP is a connectionless and unreliable between the Logical Link Control sub layer and thetransport protocol. The two ports serve to identify networks physical layer. The MAC layer providesthe end points within the source and destination an addressing mechanism called physical address ormachines. User Datagram Protocol is used, in place MAC address. This is a unique serial numberof TCP, when a reliable delivery is not required. assignedto each network adapter, making it possibleHowever, UDP is never used to send important data to deliver data packets to a destination within a subsuch as web-pages, database information, etc. network, i.e. a physical network without routers, forStreaming media such as video ,audio and others use example an Ethernet network. FPGA area and speedUDP because it offers speed. optimization to implement computer networkThe reason UDP is faster than TCP is because there protocol is subject of research mainly due to itsis no form of flow control. No error checking, error importance to network performance. The objective 338 | P a g e
  2. 2. S.Nayeema,K.Jamal / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 Vol. 3, Issue 1, January -February 2013, pp.338-342of resource utilization of field programming gate number of sixteen attempts have been made. Thearray (FPGA) is to allocate contending to embed scheduling of the retransmission is determined by amaximum intricate functions. This approach makes controlled randomization process known asdesign cost effective and maximizing IEEE 802.3 “Truncated Binary Exponential Back Off”[1][4].MAC performance. Binary exponential back off After the end of enforcing a Collision (jamming), thealgorithm. Verilog coding to implemented transmitter delay before attempting to retransmit thesynchronous counter and FSM coding style frame delay is an integer multiple of slot times toinfluence performance of MAC delay before the retransmission attempt is chosen astransmitter[1][3].However effective VHDL coding a uniformly distributed random integer r in thestyle optimizes FPGA resource allocation for area range.and speed performance of IEEE 802.3 MAC 0<=r<=2^ktransmitter can be optimized using linear feedback Whereshift register, one hot finite machine (FSM) state K=min (n,10)encoding style. If all attempt limit fails. This event is reported as an error2.MAC TRANSMITTER: 4. IMPLEMENTATION OF BACK OFF WITH FINITE STATE MACHINE BASED APROACH: The function of a frame assembler is to contain the information of the different components of the frame viz .destination address, source address and data, and supply this to the transmitter as well as the CRC block. Hence, the frame Assembler assembles all the fields over which FCS is determined [8]. The Frame Assembler block is controlled by the transmitter block through the STRT signal. This signal is low when the transmitter is idle. The STRT signal function as an enable for the Frame Assembler assembles block. The buffer width is 32 bits. Since the entire frame data is assumed to be present inside the MAC, the Buffer has to accommodate at least 1500 bytes, which is the maximum data size in an 802.3 frame. Here, it is assumed that the entire data contents of a frame reside with the MAC before transmission. In order toBlock diagram of MAC Transmitter address a 32 wide buffer of 1500 bytes a 9 bit On receiving „STRT_XMIT. from the address is required. The CNTRL (2) is connected toupper layer (LLC) this Block makes the X_BUSY. RD pin of the buffer while CNTRL (1) andsignal active and starts the process of monitoring the CNTRL(0) controls data to bechannel for CARRIER SENSE.. This process is read from either buffer location of the source addresscalled DEFER. The signal CARRIER SENSE. is register(1).provide the physical layer. It monitor the channel forinter-frame gap period, which.s 96 bit period. Theperiod is split up into two different slot 60 bit periodand 36-bit period[1].During the 60-bit period if itreceives CARRIER SENSE. as active then the timeris restarted. After 60 bit time period is elapsed, thetransmitter does not monitor CARRIER SENSE. fornext 36 bit period[1] and gives the signalXMIT_FRAME.. Once the transmission is started it The function of a frame assembler is to construct thewaits for XMIT_OVER. or START_DEF to be 802.3 frame from the followingasserted and goes to start of defer when either is 1. Destination address stored in first 6 bytes ofasserted. buffer. 2. Source address that is hardwired onto the MAC3.OPTIMIZATION IMPLEMENTATION 3. Length stored in the lower word of the secondOF BACK OFF: location of buffer When a transmission attempt has been 4. Data bytes stored in the subsequent bufferterminated due to collision, it is retired by the locationtransmitter until it is successful or a maximum 339 | P a g e
  3. 3. S.Nayeema,K.Jamal / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 Vol. 3, Issue 1, January -February 2013, pp.338-3425. Pad bytes if length is less than 46 bytes to make 6.CRC Generator:up a total of 46 bytes of data and pad A Cyclic Redundancy Check [CRC] is used by the transmitHence the frame Assembler is tested as and receive algorithms to generate a CRC value forfollows :- the FCS field, The frame check sequence [FCS] field1. The buffer is filled with some destination address contains a 4-octet CRC value, This value is and a length. A source address is also stored in its computed as a function of the contents of the Source register. Address, Destination Address , Length, LLC data2. The subsequent buffer location are filled with and pad. The encoding is defined by the following randomly generated data vectors generating polynomial:3. The frame assembler is activated by the STRT X32+X26+X23+X22+X16+X12+X11+X10+X8+X signal. 7+X5+ X4+X2+X1+1 [4]4. The byte output of the frame assembler is stored Mathematically, the CRC value corresponding to a into an output file through textio given frame is defined by the following5. The frame generated is analyzed to isolate its procedure[4].individual components viz. destination 1. The first 32 bits of the farm are complemented.Address,Source Address, Length data + Pad. Each 2. The n bits of the frame are then considered to befield is verified for correct operation. The total thecoefficient of a polynomial M[x] of degree [n-1].length of the data must match the length specified in (The first bit of the destination Address fieldthe length field for length between 46 and corresponds to the X (n-1). term and last bit of data1500,where as it should be 46 bytes including data field corresponds to the X term)and padding for length field or less than 46. if the 3. M (x) is multiplied by X32 and divided by G (x) ,length specified is greater than 1500 the frame producing a remainder R(x) of degree < 31 .Assembler should generate an error condition and 4. The coefficients of R (x)are considered to be a32-exit. The Frame Assembler is tested for the bit sequence.following length 5. The bit sequence is completed and the results theConditions CRCLength=0, Length<46, Length=46, Length>46,and<1500 7. SIMULATION RESULTSLength =1500, Length <15005. OPTIMIZATION IMPLEMENTATIONOF TRANSMITTER: On receiving „STRT_XMIT active fromDEFER block this starts transmitting 4 bits at a time.At the same time it gives signal Transmit Valid(TXDV) to the physical layer. First it transmit 7-byteof Preamble then 1 byte of Start FrameDelimiter(SFD) is transmitted and it also givesSTRT signal to Frame Assembler until it receiveEND of Frame(EOF) signal from the FrameAssembler. Then it transmits 32 bit of CRC and givethe signal„Transmit Over (XMIT_OVER) toDEFER block and de-assert the signal TXDV andSTRT. Since CRC block works on bytes. FrameAssembler gives 8-bit of data at the output. Where as,Transmitter give nibble at the output so it readsfrom Frame Assembler. After 2 clock cycles(FrameAssembler) Block also give output on every 2 clockcycles. This block also monitor the signal collision UDP SIMULATION RESULTSDetector(CD) provided by the physical layer. If itdetects CD during transmitting Preamble then itcompletes transmitting Preamble and then ittransmits 4 bytes of JAM sequence. It also assertsthe signal Start Back Off (STRT_BO) and de-assertsignal STRT.If collision is detected anywhere elsethen Preamble then„Transmitter stops transmittingand sends JAM sequence.It also asserts the signalStart Back Off(STRT_BO) and dessert signal STRT. 340 | P a g e
  4. 4. S.Nayeema,K.Jamal / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 Vol. 3, Issue 1, January -February 2013, pp.338-342 FRAME ASSEMBLER SIMULATIONDEFER SIMULATION RESULTS RESULTSBACK OFF SIMULATION RESULTS TRANSMITTER SIMULATION RESULTS 8. CONCLUSIONS: The data which is sent through UDP packet is transmitted by the transmitter. The Verilog Implementation of MAC gives the improved digital design process, especially for FPGA design. A hardware description language allows a digital system to be designed and debugged at a higher level before conversion to the gate and flip-flop level. One of the most popular hardware description languages is Verilog .It is used to describe and simulate the operation of variety IEEE 802.3 341 | P a g e
  5. 5. S.Nayeema,K.Jamal / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 Vol. 3, Issue 1, January -February 2013, pp.338-342systems. This paper has covered and discussed a [8] Paran Kurup & Taher Abbasi Kluwar,software design, and implementation of a basic IEEE “Logic synthesisusing synopsys”.802.3 (MAC Transmitter) system. The speed of data [9] Xilinx, "Spartan-3A DSP FPGA Familytransmission is very high & it gives proper CRC bit data sheet", March 2009.for receiving correct data. The simulated waveforms [10] Lofgren, A. Lodesten, L. Sjoholm, S.give the reliability of the Verilog implementation to Hansson, H., "An analysis of FPGA-baseddescribe the characteristics and the architecture of UDP/1P stack parallelism for embeddedthe designed MAC with embedded BIST. The Ethernet connectivity," NORCHIPsimulated waveforms also have shown the observer Conference, November long the test result can be achieved by using the [11] lvica Crnkovic, "Component-basedBuilt- In-Self-Test technique (BIST) is completed at Software Engineeri – New Challenges in39.2ms using 25 MHz clock speed transmitting at Software Development," Proceeding of the100 Mbps. Even though it seems not to be as fast as 25th International Conference onit should be when BIST is implemented (the receiver Information Technology Interfaces.,needs to wait the signal from the transmitter), the June 2003.MAC Transmitter module still takes advantage ofthe 100% fault coverage. This is the most importantthing that should not be left out by any designer toensure the reliability of their design. The next targetfor this research is to verify the RTL, implement anddownload it on Xilinx‟s FPGA chip.REFERENCES: [1] Dr. M.S. Sutaone “Performance Evaluation of VHDL Coding Techniques for Optimized Implementation of IEEE 802.3” IEEE transaction on communication, pp- 287-293,Jan 12, 2008 [2] Fedrico Cali, Marco Conti, and Enrico Gregori “ IEEE 802.11 protocol: design and performance evaluation of an adaptive Back off mechanism” IEEE journal on selected areas in communications, vol .18.No.September 2000,pp1774-1778. [3] P.M.Soni and a Chockalingam “IEEE analysis of link layer backoff schemes on Point –to-point Markov fading links” ,IEEE Transaction on communication, vol.51,no.1, January 2003,pp 29-31. [4] IEEE 802.3 Cyclic Redundancy Check, Xilinx, XAPP209 (v1.0) march 23, Application note: vertex series and vertex II family, 2001, Author by Chriss Borelli [5] Kenneth J.Christensen “A simulation study of enhanced arbitration methods for improving Ethernet performance” computer communications,21(1998)24- 36, ELSEVIER. [6] Douglas J. Smith ”HDL Chip Design A Practical Guide for designing ,synthesis & simulating ASICs & FPGAs using VHDL or Verilog”,3rd edition – MGH.pp179-183 and 198 201. [7] Neil H.E.Weste and David Harris, ”CMOS VLSI Design A circuitand systems perspective”3rd edition – PIE,pp164-166. 342 | P a g e