CP2200/1
58
Rev. 1.0
12. Receive Interface
12.1. Overview
The CP2200/1 has a 4k circular receive FIFO buffer and an 8 entry translation look-aside buffer (TLB) capable of
storing up to 8 packets at a time. Each TLB entry holds the starting address, length, and other information about a
single received packet. Once a packet is received, the host microcontroller is notified using the interrupt request
pin. The host microcontroller may then copy the contents of the packet to its local memory through the host
interface or skip the packet by writing ‘1’ to RXSKIP (RXCN.1). Skipped packets remain in memory but will be
overwritten as new packets arrive.
The receive interface has an advanced receive filter and hash table to prevent unwanted packets from reaching the
receive buffer. For all packet types not supported by the receive filter, the CP2200/1 allows the host microcontroller
complete random access to the receive buffer. The host microcontroller can check specific bytes in the packet to
determine whether or not to copy the packet.
.
Figure 17. Receive Interface Block Diagram
12.2. Reading a Packet Using the Autoread Interface
12.4) are initialized, the CP2200/1 is ready to receive Ethernet packets. After receiving notification of a new packet,
the following procedure can be used to read the packet:
Step 1: Read RXVALID (CPINFOH.7) and RXOK (CPINFOL.7) to check if the current packet was received
correctly. The host processor may optionally use the packet starting address CPADDR to read
specific bytes in the packet and determine whether to copy or skip the current packet. The random
Step 2: If RXVALID or RXOK is 0, or to skip the packet, write a ‘1’ to RXSKIP (RXCN.1).
If RXVALID and RXOK are 1, read the length of the current packet from CPLENH:CPLENL.
Step 3: Read the entire packet, one byte at a time, by reading RXAUTORD.
Step 4: If the entire packet was read, write a ‘1’ to RXCLRV (RXCN.2).
If there are any unread bytes remaining in the current buffer, write a ‘1’ to RXSKIP (RXCN.1).
12.3. Timing and Buffer Overflow Considerations
For 10 Base-T Ethernet, a minimum-sized packet of 64 bytes is received in 51.2 us. The maximum number of
packets that can be held by the receive buffer is eight. To ensure that pointer corruption does not occur, software
should disable packet reception (RXINH = 1) after the seventh packet has arrived in the receive buffer. If the ability
to service the packet received interrupt is longer than 51.2us, then software should use the random access method
4 KB
Receive
Buffer
with
8-entry TLB
Programmable
Receive Filter and
Hash Table
Host Interface Registers
Autoread Interface:
Autoread Data Register
Packet Skip Bit
Current Packet:
Packet Address
Packet Length
Packet Information