FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-09-2005, 11:45 AM
Guest
 
Posts: n/a
Default START /STOP sync pattern

Hi all,

I am implementing some logic in FPGA(Transmit/Reveive).

On the receive data first i look for a 8- bit pattern to detect the
START pattern.Now my question is in the data also i may get the same
START pattern how to distinguish between the START /STOP pattern and
data.

Any comments are appreciated.

Regards,
Prav

Reply With Quote
  #2 (permalink)  
Old 08-09-2005, 12:37 PM
Kryten
Guest
 
Posts: n/a
Default Re: START /STOP sync pattern

<[email protected]> wrote in message
news:[email protected] oups.com...
> Hi all,
>
> I am implementing some logic in FPGA(Transmit/Receive).
>
> On the receive data first I look for a 8- bit pattern to detect the
> START pattern.Now my question is in the data also I may get the same
> START pattern how to distinguish between the START /STOP pattern and
> data.


Based on the brief text above, the FPGA has no way to tell a start flag
character from the same byte appearing as data, so unless you give it one it
cannot do this.

In practice, people have invented ways of sending 8-bit data like that.

The HDLC/ADLC protocol uses the bit pattern 01111110 (0x7E) to mark the
start of packets. To prevent those 6 consecutive set bits appearing
elsewhere, the transmitter stuffs in a zero after 5 consecutive set bits.

Receivers look for 5 consecutive set bits.
If the next bit is set, it is the start of a frame.
If not, it is a stuffed-bit which is discarded.

The Zilog SCC is a good example of a serial chip that supports HDLC.
Don't re-invent the wheel!

Google HDLC and 'bit stuffing'


Reply With Quote
  #3 (permalink)  
Old 08-09-2005, 01:37 PM
backhus
Guest
 
Posts: n/a
Default Re: START /STOP sync pattern


[email protected] schrieb:
> Hi all,
>
> I am implementing some logic in FPGA(Transmit/Reveive).
>
> On the receive data first i look for a 8- bit pattern to detect the
> START pattern.Now my question is in the data also i may get the same
> START pattern how to distinguish between the START /STOP pattern and
> data.
>
> Any comments are appreciated.
>
> Regards,
> Prav
>


Hi Praveen,
do you transmit fully binary data?
otherwise e.g. for ascii transmission there is the X-On X-Off protocol.

Or how about formatting your data?
If you define a blocksize N then after a start symbol follows (at least)
one whole block and then comes the stop symbol. The next block(s) need a
start symbol again and so on , and so on...
(A sophisticated example for a block protocoll is TCP/IP)

Surely there are many solutions to your problem.

Regards
Eilert



Reply With Quote
  #4 (permalink)  
Old 08-09-2005, 02:00 PM
Ico
Guest
 
Posts: n/a
Default Re: START /STOP sync pattern

[email protected] wrote:

> On the receive data first i look for a 8- bit pattern to detect the
> START pattern.Now my question is in the data also i may get the same
> START pattern how to distinguish between the START /STOP pattern and
> data.


You could define special characters for synchronisation (start/stop/etc),
and use escaping to encode these characters with other characters.

For an example, take a look at the SLIP protocol RFC (1055)

http://www.faqs.org/rfcs/rfc1055.html

A snippet from this RFC explains this better then I do :

The SLIP protocol defines two special characters: END and ESC. END is
octal 300 (decimal 192) and ESC is octal 333 (decimal 219) not to be
confused with the ASCII ESCape character; for the purposes of this
discussion, ESC will indicate the SLIP ESC character. To send a
packet, a SLIP host simply starts sending the data in the packet. If
a data byte is the same code as END character, a two byte sequence of
ESC and octal 334 (decimal 220) is sent instead. If it the same as
an ESC character, an two byte sequence of ESC and octal 335 (decimal
221) is sent instead. When the last byte in the packet has been
sent, an END character is then transmitted.


As said before, don't re-invent the wheel

--
:wq
^X^Cy^K^X^C^C^C
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pattern generator code Chip Verilog 7 07-19-2008 12:55 AM
VCS: $stop -> simulator exit instead of going to CLI Tom Verilog 2 03-27-2007 08:00 PM
Make program stop AL FPGA 19 02-23-2005 07:33 PM
How to convert a pattern to SVF Ste FPGA 0 05-24-2004 05:22 PM


All times are GMT +1. The time now is 12:32 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved