In
computer network
A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
s, a syncword, sync character, sync sequence or preamble is used to synchronize a
data transmission
Data communication, including data transmission and data reception, is the transfer of data, signal transmission, transmitted and received over a Point-to-point (telecommunications), point-to-point or point-to-multipoint communication chann ...
by indicating the end of
header information and the start of data. The syncword is a known
sequence
In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is cal ...
of data used to identify the start of a frame, and is also called ''reference signal'' or ''midamble'' in
wireless communications.
Prefix code
A prefix code is a type of code system distinguished by its possession of the prefix property, which requires that there is no whole Code word (communication), code word in the system that is a prefix (computer science), prefix (initial segment) of ...
s allow unambiguous identification of synchronization sequences and may serve as
self-synchronizing code
In coding theory, especially in telecommunications, a self-synchronizing code is a uniquely decodable code in which the symbol stream formed by a portion of one code word, or by the overlapped portion of any two adjacent code words, is not a ...
.
Examples
In an
audio receiver receiving a
bit stream of data, an example of a syncword is 0x0B77 for an
AC-3 encoded stream.
An
Ethernet packet with the Ethernet preamble, 56 bits of alternating 1 and 0 bits, allowing the receiver to synchronize its clock to the transmitter, followed by a one-octet start frame delimiter byte and then the header.
All
USB
Universal Serial Bus (USB) is an industry standard, developed by USB Implementers Forum (USB-IF), for digital data transmission and power delivery between many types of electronics. It specifies the architecture, in particular the physical ...
packets begin with a sync field (8 bits long at low speed, 32 bits long at high speed) used to synchronize the receiver's clock to the transmitter's clock.
A receiver uses a physical layer preamble, also called a physical layer training sequence, to synchronize on the signal by estimating frequency and clock offsets.
Some documentation uses "preamble" to refer to a signal used to announce a transmission, to wake-up receivers in a low-power mode.
While some systems use exactly the same signal for both physical-layer training and wake-up functions, others use 2 different signals at 2 different times for these 2 functions, or have only one or the other of these signals.
The
Bisync protocol of the 1960s used a minimum of two ASCII "
SYN" characters (0x16…0x16) to achieve character synchronization in an undifferentiated bit stream, then other special characters to
synchronize to the beginning of a frame of characters.
The syncwords can be seen as a kind of
delimiter
A delimiter is a sequence of one or more Character (computing), characters for specifying the boundary between separate, independent regions in plain text, Expression (mathematics), mathematical expressions or other Data stream, data streams. An ...
. Various techniques are used to avoid
delimiter collision, orin other wordsto "disguise" bytes of data at the
data link layer
The data link layer, or layer 2, is the second layer of the seven-layer OSI model of computer networking. This layer is the protocol layer that transfers data between nodes on a network segment across the physical layer. The data link layer p ...
that might otherwise be incorrectly recognized as the syncword. For example,
HDLC
High-Level Data Link Control (HDLC) is a communication protocol used for transmitting data between devices in Telecommunications, telecommunication and Computer network, networking. Developed by the International Organization for Standardization ...
uses
bit stuffing or "octet stuffing", while other systems use
ASCII armor or
Consistent Overhead Byte Stuffing (COBS).
Alternatives
In some communication systems, a receiver can achieve character synchronization from an undifferentiated bit stream, or start-of-header synchronization from a byte stream, without the overhead of an explicit syncword. For example, the
FSK441 protocol achieves character synchronization by synchronizing on any "
space
Space is a three-dimensional continuum containing positions and directions. In classical physics, physical space is often conceived in three linear dimensions. Modern physicists usually consider it, with time, to be part of a boundless ...
" characters in the messagein effect, every "space" character in the message does double duty as a syncword. For example,
CRC-based framing achieves character and start-of-header synchronization.
In a
self-synchronizing code
In coding theory, especially in telecommunications, a self-synchronizing code is a uniquely decodable code in which the symbol stream formed by a portion of one code word, or by the overlapped portion of any two adjacent code words, is not a ...
, every character is, in effect, a syncword, and can be used to achieve character synchronization in an undifferentiated bit stream.
Preamble
In
digital communication, preamble is a sequence of known bits sent in each frame. It is used for
frame synchronization
In telecommunications, frame synchronization or framing is the process by which, while receiving a stream of fixed-length frames, the receiver identifies the frame boundaries, permitting the data bits within the frame to be extracted for decodin ...
such as in
Ethernet frames, as well as for
channel estimation.
In Ethernet and other protocols, the preamble can also be used for
automatic baud rate detection.
See also
*
*
Magic number (programming)
*
Out-of-band data
*
Start Frame Delimiter
*
Synchronous idle
*
Pilot signal
In telecommunications, a pilot signal is a signal, usually a single frequency, transmitted over a communications system for supervisory, control, equalization, continuity, synchronization, or reference purposes.
Uses in different communicat ...
References
{{reflist
Synchronization
Data transmission
Packets (information technology)