
ASIX ELECTRONICS CORPORATION
28
AX88796 L 3-in-1 Local Bus Fast Ethernet Controller
REMOTE WRITE
A Remote Write transfer is used to move a block of data from the host into local buffer memory. The Remote
DMA will read data from the I/O port and sequentially write it to local buffer memory beginning at the Remote
Start Address. The DMA Address will be incremented and the Byte Counter will be decremented after each
transfer. The DMA is terminated when the Remote Byte Count Register reaches a count of zero.
4.2.4 Removing Packets from the Ring (Host read data from memory)
REMOTE READ
A Remote Read transfer is used to move a block of data from local buffer memory to the host. The Remote DMA
will sequentially read data from the local buffer memory, beginning at the Remote Start Address, and write data
to the I/O port. The DMA Address will be incremented and the Byte Counter will be decremented after each
transfer. The DMA is terminated when the Remote Byte Count Register reaches zero.
Packets are removed from the ring using the Remote DMA or an external device. When using the Remote DMA.
The Boundary Pointer can also be moved manually by programming the Boundary Register. Care should be
taken to keep the Boundary Pointer at least one buffer behind the Current Page Pointer. The following is a
suggested method for maintaining the Receive Buffer Ring pointers.
1. At initialization, set up a software variable (next_pkt) to indicate where the next packet will be read. At the
beginning of each Remote Read DMA operation, the value of next_pkt will be loaded into RSAR0 and
RSAR1.
2. When initializing the AX88796 set:
BNRY = PSTART
CPR = PSTART + 1
Next_pkt = PSTART + 1
3. After a packet is DMAed from the Receive Buffer Ring, the Next Page Pointer (second byte in AX88796
receive packet buffer header) is used to update BNRY and next_pkt.
Next_pkt = Next Page Pointer
BNRY = Next Page Pointer - 1
If BNRY < PSTART then BNRY = PSTOP – 1
Note the size of the Receive Buffer Ring is reduced by one 256-byte buffer; this will not, however, impede the
operation of the AX88796. The advantage of this scheme is that it easily differentiates between buffer full and
buffer empty: it is full if BNRY = CPR; empty when BNRY = CPR-1.
STORAGE FORMAT FOR RECEIVED PACKETS
The following diagrams describe the format for how received packets are placed into memory by the local DMA
channel. These modes are selected in the Data Configuration Register and setting the
CPU[1:0]
pins for ISA,
80186, MC68K or MCS-51 mode.