09.07.2015 Views

Design and Realization of a Prototype Hardware Platform for ...

Design and Realization of a Prototype Hardware Platform for ...

Design and Realization of a Prototype Hardware Platform for ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The MegaWatch Wireless <strong>Plat<strong>for</strong>m</strong>Master's Thesis - Emanuel Corthay8 The S<strong>of</strong>tware* This mechanism is implemented to make sure the receiver is not receiving new data while theprocessor is reading it. The same thing is true <strong>for</strong> the transmitter.At start-up, this register is initialized so that the transmitter <strong>and</strong> receiver as well as the buttons areinhibited. It is then important to do an initial write into this register to enable the transceiver!See section 8.2 <strong>for</strong> more details on the programming interface.8.1.9 CRC Generator <strong>and</strong> DecoderThe cyclic redundancy code (CRC) is used to detect a transmission error. It works by computing a16 bit checksum <strong>of</strong> the previous frame bits. This checksum is sent along with the frame <strong>and</strong>compared at the receiver with the CRC computed on the receiver side.Polynomial CRCs are widely used <strong>for</strong> their good mathematical characteristics <strong>and</strong> easy hardwareimplementation. They generate a 16 bit CRC according to the generator polynomial <strong>and</strong> appendthem to the transmitted frame. The CRC is calculated based on the header <strong>and</strong> payload <strong>and</strong> iscalculated on the fly, no matter what the header <strong>and</strong> payload size is.In reception mode, the received header <strong>and</strong> payload is fed into the CRC function, along with the 16bits received CRC. If the result in the CRC register is equal to zero, the received sequence iscorrect.The mathematical concept behind the CRC is outside the scope <strong>of</strong> this document, but the generalprinciple is simple. Every incoming bit is combined to the previous CRC sequence using XORoperations.More in<strong>for</strong>mation on CRC can be found in [32].8.1.10 R<strong>and</strong>om Number GeneratorThe r<strong>and</strong>om generator is used to provide a pseudo r<strong>and</strong>om sequence number when transmitting aping or emergency frame. It is based on a 9 bits Linear Feedback Shift Registers, initialized atstart-up time, <strong>and</strong> updated at every clock cycle using the previous result. The output is thuspseudo-r<strong>and</strong>om, because the output sequence will repeat itself in the same order after a giventime.More in<strong>for</strong>mation on this pseudo-r<strong>and</strong>om number generator can be found in [33]. A more theoryoriented approach is presented in [34].8.2 3-wire Control CoreThis was the first core that was tested, <strong>and</strong> was used to get familiar with the developmentenvironment, board particularities, <strong>and</strong> ARM – FPGA interactions. In the same way as with thetransceiver core, the ARM-AHB-Avalon bridge from Altera is used. The various registers can bewritten <strong>and</strong> read from the ARM. The 3-wire serial bus is described in 7.3.58 / 83

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!