22.09.2013 Aufrufe

Workshopband als PDF - Mpc.belwue.de

Workshopband als PDF - Mpc.belwue.de

Workshopband als PDF - Mpc.belwue.de

MEHR ANZEIGEN
WENIGER ANZEIGEN

Erfolgreiche ePaper selbst erstellen

Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.

MPC-WORKSHOP FEBRUAR 2013<br />

Figure 5: Set-up for Implementation<br />

The dv signal helps the SYN <strong>de</strong>tection block to read<br />

the incoming bits. Due to the start-up <strong>de</strong>lay in the<br />

DPLL the SYN Detection block only takes into account<br />

the last 6 bits of the SYN pattern, that is, if the<br />

string “010100” is <strong>de</strong>tected, a SYNC pattern will be<br />

consi<strong>de</strong>red positive. The SYN <strong>de</strong>tection block <strong>als</strong>o<br />

searches for long strings of ones to <strong>de</strong>tect an idle state.<br />

3) NRZI Decoding and De-Bit Stuffing Block<br />

The NRZI <strong>de</strong>coding block must read a bit when the<br />

dv signal is high to guarantee the correct value has<br />

been stored. Much in the same way, it must <strong>de</strong>liver a<br />

new data valid signal to compensate the <strong>de</strong>lay along<br />

with the <strong>de</strong>co<strong>de</strong>d data. The <strong>de</strong>-bit stuffing block is<br />

<strong>de</strong>signed as a finite state machine with the purpose to<br />

extract the 0 bit whenever 6 consecutive ones are<br />

found. This task is done only by not activating the data<br />

valid signal output whenever the zero should be extracted.<br />

4) CRC Verification Block<br />

The CRC verification block is activated after the<br />

PID field has been read and it is disabled when the<br />

EOP is <strong>de</strong>tected. There are 2 internal verification<br />

blocks, one to check the CRC-5 and the second for<br />

CRC-16, and they both work with the exact logic as<br />

the CRC calculators. They calculate the CRC from the<br />

data being received and compares it to the residual,<br />

mentioned in table 2, to check if there were any errors<br />

in the process.<br />

5) Shift Register and Registers for Saved Data<br />

The shift register is a simple 16 bit register to load<br />

the incoming data before transferring it to the registers<br />

for saved data. It takes the data coming from the <strong>de</strong>-<br />

bit stuffing block when the valid signal is high and<br />

saves it. The 16 bits of the shift register are loa<strong>de</strong>d<br />

into a word of the registers for saved data structure<br />

when the control state machine gives the write signal<br />

in the address provi<strong>de</strong>d.<br />

If the microcontroller wishes to read the information<br />

stored, it uses the input sel of the receiving block; the<br />

four msb chooses the word that will appear in the<br />

parallel output Q; the four lsb runs each of the<br />

bits into the serial output Q. After the receiving<br />

process is over, the control state machine writes the<br />

number of words received into the last register, that<br />

way when the data wants to be read out, the first step<br />

is to read address 1111B for the number of bytes to be<br />

read out.<br />

6) Control State Machine for Reception<br />

The Control State Machine takes care of every control<br />

line in whole receiving structure. The Receptor<br />

Structure offers the possibility to start saving in a<br />

specific register, this is indicated by the adr and mo<strong>de</strong><br />

inputs. If mo<strong>de</strong> is one the control state machine loads<br />

the address from adr to start saving, otherwise it will<br />

start in address zero. If run is activated and either an<br />

EOP or a line of ones (idle state) is <strong>de</strong>tected the waiting<br />

to <strong>de</strong>tect a valid SYN pattern begins. Once this<br />

happens the enable signal for the <strong>de</strong>- bit stuffing is<br />

activated and the process of reception starts.<br />

When the EOP is <strong>de</strong>tected, the control state machine<br />

saves the last data into a register along with the number<br />

of words received and the CRC Verification is<br />

checked. If the data received was only the PID plus 16<br />

bits the CRC5 is taken into account, if there were<br />

more bytes received then the CRC16 is checked.<br />

The outputs of the block are flags; if there is new<br />

data stored the dv_st flag is set, if the correct CRC<br />

was a match the CRC_ok flag is set. The ovrun flag is<br />

set when the last possible register is written to and<br />

there is no more place to save data. The flags are<br />

maintained until the run signal is turned off; once the<br />

run signal is off the flags are reset and the CRCs<br />

cleared.<br />

55

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!