1 / 11

MAC Project

MAC Project. 8/26. Project 說明. 實作 PCF 模式 PCF 模式與 DCF 模式會週期性的切換. DEMO 環境 (DCF)–contention. 0. Warp (Client). Warp (Client). 2. Warp (Client). 1. DEMO 環境 (PCF)-contention free. 0. Warp (Server). Warp (Client). 2. Warp (Client). 1. Superframe. 1.change mode DCF->PCF

wilona
Download Presentation

MAC Project

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MAC Project 8/26

  2. Project 說明 • 實作PCF模式 • PCF模式與DCF模式會週期性的切換

  3. DEMO 環境(DCF)–contention 0 Warp (Client) Warp (Client) 2 Warp (Client) 1

  4. DEMO 環境(PCF)-contention free 0 Warp (Server) Warp (Client) 2 Warp (Client) 1

  5. Superframe • 1.change mode DCF->PCF server key “P” to start PCF mode • 2.server polling every client client key “D” if client have data • 3.change mode PCF->DCF server key “S” to end PCF mode

  6. csmaMAC.c Main() //poll the timer, PHY and user I/O warpmac_pollPeripherals() you can trace warpmac.c to know the detail

  7. csmaMAC.c Void uartRecv_callback(unsigned char uartByte) if(uartByte != 0x0) { xil_printf("(%c)\t", uartByte); switch(uartByte) case ASCII_1: ….. }

  8. csmaMAC.c voidtimer_callback(unsigned char timerType) switch(timerType) { case TIMEOUT_TIMER: … case BACKOFF_TIMER: … }

  9. csmaMAC.c voiddataFromNetworkLayer_callback(Xuint32 length, char* payload) txMacframe.header.length = length; txMacframe.header.pktType = PKTTYPE_DATA; txMacframe.header.destAddr = (unsigned short int)(NODEID_TO_ADDR(destNode)); txMacframe.header.remainingTx = (maximumReSend+1); if(warpmac_carrierSense()) { … } else { warpmac_setTimer(BACKOFF_TIMER); }

  10. csmaMAC.c intphyRx_goodHeader_callback(Macframe* packet) if( packet->header.destAddr == (NODEID_TO_ADDR(myID)) )  { switch(packet->header.pktType) { case PKTTYPE_DATA: …. case PKTTYPE_ACK: …. }

  11. Deadline & Demo • Question?

More Related