Synchronization state machine, Packet synchronization – Altera ASI MegaCore Function User Manual

Page 19

Advertising
background image

4–4

Chapter 4: Functional Description

Receiver

Asynchronous Serial Interface (ASI) MegaCore Function User Guide

January 2014

Altera Corporation

Synchronization State Machine

Two consecutive comma characters without any disparity or code error enables word
synchronization. Four consecutive disparity or code errors enables loss of
synchronization and so disable the word synchronization flag. The word
synchronization flag gates the rate matching FIFO write request.

Figure 4–3

shows the

synchronization state machine.

Packet Synchronization

The packet synchronization block looks for the presence of valid TS packets. Valid
packets have either 188 bytes or 204 bytes between synchronization bytes. The
synchronization byte takes the value 0x47.

The block first looks for the synchronization byte that indicates the start of the packet,
which is indicated by rx_ts_status[1]. The block then counts valid bytes in the
incoming stream. If a synchronization byte is seen 188 or 204 bytes after the first sync
byte is seen, lock is indicated on rx_ts_[5:4] and end of packet is indicated on
rx_ts_status[2]

. If no synchronization byte is seen at either 188 or 204 bytes, the

packet is deemed to have an error and rx_ts_status[3] is asserted. The block then
again starts the search for synchronization bytes.

Figure 4–3. Synchronization State Machine

SYNC_REQ 1

SYNC_REQ 2

IN_SYNC 1

! CODE_ERROR

CODE_ERROR

! CODE_ERROR

CODE_ERROR

CODE_ERROR

CODE_ERROR

! CODE_ERROR and
KCODE_FOUND

! CODE_ERROR and
KCODE_FOUND

! CODE_ERROR

! CODE_ERROR

IN_SYNC 2

IN_SYNC 3

IN_SYNC 4

Advertising