
PEB 20321
PEF 20321
Local Bus Interface (LBI)
Data Sheet
165
2001-02-14
Data Transfer Description
As HDLC packets are received by the LBI peripheral, they fill into the RFIFO (threshold
value must be programmed in register to be compliant to that of the external device).
When the threshold is reached, the peripheral generates the RPF interrupt. The DMSM
services then, depending on the threshold value, up to 32 data bytes, assembles them
and alerts the DMA controller to transfer them to host memory. Each DMA access
transfers as many DWORDs as possible (PCI burst size = 8 DWORD typically). At the
end of the Rx packet, the RME interrupt is serviced, the RBCL byte count (bytes
remaining in RFIFO) is determined and the receive bytes are serviced. Data is fetched
and the valid number of bytes is indicated in the status word at the end of the DMA buffer.
Similarly on the transmit side, when an XPR interrupt is detected, the DMSM requests
the LBI DMA controller to take the Tx packet data. The LBI DMAC then delivers the data
and stores it in the LBI TFIFO. When 32 bytes are available in the TFIFO, the DMSM
transfers the 32 bytes to the peripheral, and sets the XTF bit in the peripheral to start
sending out the packet. When the next XPR is indicated, the LBI DMA is alerted to fetch
the next set of data, and the DMSM transfers it to the peripheral. When the Tx packet is
completed, the DMAC indicates the number of valid bytes transferred. The DMSM
transfers the valid bytes and sets the XTF and the XME bits to indicate to the peripheral
HDLC controller to close the packet with the trailer bytes (CRC and Flag).This is
implemented by the on-chip logic.
Note that all LBI peripheral interrupts are maskable via the DMSM register LREG6.
6.3.3
Some devices such as ESCC2 and HSCX support DMA assisted data transfers from and
to their internal FIFOs. If this function is chosen, the DMSM services the DMA request
pins of the peripheral (DRQTA, DRQRA, DRQTB, DRQRB) and acknowledges the
requests with the DACKTA, DACKRA, DACKTB and DACKRB pins.
Note that the bit field LCONF.CDP in LBI Configuration register enables combined DMA
acknowledge pins for receive and transmit direction of the LBI channels A/B (refer to
register description section).
The DMSM supports transferring of data to the LBI FIFO from the peripheral
’
s FIFO. It
also uses the DMSM registers (LREG0
…
LREG5) to set the peripheral
’
s XTF and RMC
bits to start and complete packet transfers. It recognizes RME and XPR interrupts and
passes other interrupts.
Data Transfer in DMA Assisted Mode
6.3.4
If the DMSM has to control the interrupt driven data handling of only a single device such
as the HSCX, the addresses of the device specific registers (e.g., XFIFOA, RMC bit
location in CMDR register) could be fixed. However, the state machine is needed to
handle
different
devices (HSCX, ESCC2, FALC54 etc.), which have the same registers
DMSM Registers