XRT86VL38
PRELIMINARY
xr
OCTAL T1/E1/J1 FRAMER/LIU COMBO
REV. P1.0.6
323
HDLC CONTROLLERS AND LAPD MESSAGES
The purpose of the HDLC controllers is to allow messages to be stored for transport in the outbound transmit
framer block or extracted from the receive framer block through the LAPD interface. Each channel within the
Framer has 3 independent HDLC controllers. Each HDLC controller has two 96-Byte buffers for Transmit and
two 96-Byte buffers for Receive. The buffers are used to insert messages into the out going data stream for
Transmit or to extract messages from the incoming data stream from the Receive path. Total, there are twelve
96-Byte buffers per channel. This allows multiple HDLC messages to be transported to and from EXAR’s
framing device.
5.2
Programming Sequence for Sending Less Than 96-Byte Messages
Once the data link source and the type of message has been chosen, the following programming sequence
can be followed to send (in this example) a 15-bye LAPD message.
N
OTE
: To send more than 96-Bytes, the programming sequence is slightly modified, which is described in the next section.
1.
Read the Transmit Data Link Byte Count Register to determine which buffer is available.
2.
Enable TxSOT in the Data Link Interrupt Enable Register.
3.
Write 0x0F into the transmit byte count register (assuming buffer 0 was available).
4.
Write the 15-byte message contents into register 0xn600 (automatically incremented).
5.
Enable the LAPD transmission by writing to register 0xn113.
6.
Once TxEOT occurs, the message has been transmitted.
5.3
Programming Sequence for Sending Large Messages
1.
Read the Transmit Data Link Byte Count Register to determine which buffer is available.
2.
Enable TxSOT in the Data Link Interrupt Enable Register.
3.
Write 0x60 into the transmit byte count register (assuming buffer 0 was available).
4.
Write the first 96-bytes into register 0xn600 (buffer 0, automatically incremented).
5.
Enable the LAPD transmission by writing to register 0xn113.
6.
Wait for the TxSOT before writing the next 96-bytes.
7.
Re-initiate the TxSOT interrupt enable.
F
IGURE
38. HDLC C
ONTROLLERS
Buffer 0
Buffer 1
Transmit
Receive
96-Bytes
96-Bytes
96-Bytes
96-Bytes
Transmit
Receive
96-Bytes
96-Bytes
96-Bytes
96-Bytes
Transmit
Receive
96-Bytes
96-Bytes
96-Bytes
96-Bytes
HDLC1
HDLC2
HDLC3
Buffer 0
Buffer 1
Buffer 0
Buffer 1
Channel N