BCM1250/BCM1125/BCM1125H
User Manual
10/21/02
B r o a d c o m C o r p o r a t i o n
Page
344
Section 10: Serial Interfaces
Document
1250_1125-UM100CB-R
The address, control and data fields are of variable length. The lengths and formats of addresses vary among
the various link-level protocols that use bit synchronous HDLC-like framing, but lengths of 0, 1 or 2 bytes are
typical. A CRC is appended on transmission and is checked on reception. The CRC can be either 16 bits or
32 bits. The CCITT CRC algorithms are used. The generator polynomials are:
CRC-CCITT: x
16
+ x
12
+ x
5
+ 1
CRC-32: x
32
+ x
26
+ x
23
+ x
22
+ x
16
+ x
12
+ x
11
+ x
10
+ x
8
+ x
7
+ x
5
+ x
4
+ x
2
+ x + 1
CRC-32 is also known as CRC-CCITT-32. Both alternatives use a CRC preset of all 1’s and send the resulting
CRC in complemented form.
On the physical link, HDLC flags (8‘b01111110) delimit frames. A flag must precede and follow the
concatenation of the Address, Control, Data and CRC fields of a frame. Bit-stuffing prevents any occurrence
of the flag pattern within those fields; the transmitter inserts a 0-bit after any sequence of 5 consecutive 1’s,
and the receiver performs corresponding 0 deletion.
When the same flag terminates one frame and begins the next, it is called a shared flag. A configuration option
controls the minimum number of additional flags between frames. During idle periods, the transmitter sends
either consecutive Flags or will send an idle as zero followed by fifteen 1s and then the output will go high
impedance. Consecutive flags are logically equivalent to a single flag and do not delimit frames of length 0.
Frames can also be terminated by HDLC Abort or Idle patterns (a zero bit followed by at least 7 ones). Abort
and Idle termination are not distinguished by the receiver but are reported as aborted frames.
Bytes are sent and received in order of increasing address according to the system endian mode. Within each
byte, except for the CRC, the least significant bit is sent or received first.
Framing Parameters
The parameters controlling the format of frames are set in various configuration registers. The
ser_mode
register selects the CRC used, the minimum number of flags between frames, and the pattern sent on an idle
line. The
ser_minfrm_sz
and
ser_maxfrm_sz
registers set the minimum and maximum frame size
respectively. The minimum should be set to the smallest size permitted for the Address, Control and Data fields
prior to bit-stuffing. The maximum should be set to the largest size permitted for the total sizes in bytes of the
Address, Control, Data and CRC fields prior to bit-stuffing.
HDLC Transmitter
The user defines a frame to be transmitted by constructing the Address, Control and Data fields in a DMA
buffer or chain of such buffers. For details of DMA buffers and descriptors, see
For transmit, the DMA option flags shown in
are supported.
Table 227: Option Flags for Synchronous Serial Transmit Channel
Transmit Commands
Bits
Name
Default
Description
0 reserved
1'b0 Reserved
1
append CRC
1'b0
If this bit is set the computed CRC will be appended to the packet.
2
append PAD
1'b0
If this bit is set the packet will be padded to the minimum packet size.
3
abort
1'b0
If this bit is set the packet will be ended with an abort instead of a standard flag.