Part Number Hot Search : 
EL5133 TF3000L C9004 PAN3501 14D331K BA9221F T6421D MJE295
Product Description
Full Text Search
 

To Download CS8920A Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  copyright ? cirrus logic, inc. 1997 (all rights reserved) CS8920A advanced product databook &u\vwdo/$1 tm isa plug-and-play ethernet controller features n single-chip ieee 802.3 ethernet controller with direct isa-bus interface n implements industry-standard plug and play n full duplex operation n auto-negotiation of full and half duplex modes n recognizes received magic packet? frames and requests the processor to power up n supported by complete family of device drivers n efficient packetpage? architecture operates in i/o and memory space, and as dma slave n on-chip ram buffers transmit & receive frames n 10base-t port with internal analog filters n aui port for 10base2, 10base5 and 10base-f n programmable receive features: streamtransfer ? for reduced cpu overhead auto-switch between dma and on-chip memory early interrupts for frame pre-processing n four led drivers for link status, full duplex, and lan activity n small 144-pin tqfp package, and minimal exter- nal components (transformer, crystal and optional eeprom) description the CS8920A is a low-cost ethernet lan control- ler optimized for industry standard architecture (isa) personal computers. its highly-integrated design eliminates the need for costly external com- ponents required by other ethernet controllers. in addition to high integration, the CS8920A offers a broad range of performance features and config- uration options. its unique packetpage architecture automatically adapts to changing net- work traffic patterns and available system resources. the result is increased system efficien- cy and minimized cpu overhead. the CS8920A is available in a thin 144-pin tqfp package ideally suited for small form-factor, cost- sensitive ethernet applications, such as desktop and portable motherboards. with the CS8920A, system engineers can design a complete plug- and-play ethernet circuit that occupies less than 2.0 square inches (14 sq. cm) of board space. ordering information contact cirrus to check on the availability of CS8920A for use in isa form-factor adapter-card applications. CS8920A-cq 0 to 70 c 144-pin tqfp cdk8920a developer's kit eeprom rj-45 10base-t attachment unit interface (aui) 20 mhz xtal cs8920 isa ethernet controller i s a isa bus logic & plug and play eeprom control ram memory manager 802.3 mac engine and auto negotiation led control clock power manager 10base-t rx filters & receiver aui receiver aui transmitter aui collision 10base-t tx filters & transmitter encoder/ decoder & pll sep 97 ds238pp2 crystal lan is a trademark of cirrus logic, inc. magic packet is a trademark of advanced micro devices, inc.
contents 1.0 introduction 1.1 general description . . . . 4 1.2 system applications . . . . 5 1.3 key features and benefits . . . 5 1.4 enhancements made in CS8920A . 8 2.0 pin description 2.1 pin diagram . . . . . . 9 2.2 pin description . . . . . . 10 3.0 functional description 3.1 overview . . . . . . . 14 3.2 isa bus interface . . . . . 15 3.3 reset and initialization . . . . 16 3.4 plug and play . . . . . . 18 3.5 configuration with eeprom . . 19 3.6 programming the eeprom . . 23 3.7 boot prom operation . . . . 24 3.8 low-power modes . . . . . 25 3.9 led outputs . . . . . . 26 3.10 media access control (mac) . . 27 3.11 encoder/decoder (endec) . . 33 3.12 10base-t transceiver . . . . 34 3.13 attachment unit interface (aui) . 37 3.14 external clock oscillator . . . 38 4.0 packetpage architecture 4.1 packetpage overview . . . . 39 4.2 packetpage memory map . . . 40 4.3 bus interface registers product identification code . . 42 dma start of frame . . . . 43 dma frame count . . . . 43 rxdma byte count . . . . 43 eeprom command . . . . 44 eeprom data . . . . . 44 receive frame byte counter . . 44 4.4 status and control registers . . 45 4.4.1 status/control bit definitions 46 4.4.2 status/control register summary 47 4.5 status/control register details (0) interrupt status queue . . 50 (3) receiver configuration (rxcfg) 51 (4) receiver event (rxevent) . 52 (5) receiver control (rxctl) . 53 (7) transmit configuration (txcfg) 54 (8) transmit event (txevent) . 55 (9) transmit command (txcmd) 56 (b) buffer configuration (bufcfg) 57 (c) buffer event (bufevent) . . 59 (d) advance interrupt control and status (advintctl/st) . 60 (10) receive miss counter (rxmiss) 61 (12) trans. collision count (txcol) 61 (13) line control (linectl) . . 62 (14) line status (linest) . . . 63 (15) self control (selfctl) . . 64 (16) self status (selfst) . . . 65 (17) bus control (busctl) . . 66 (18) bus status (busst) . . . 67 (19) test control (testctl) . . 68 (1c) aui time domain reflectometer 69 (1d) auto negotiation control (autonegctl) . . 70 (1e) auto negotiation status (autonegst) . . 71 4.6 initiate transmit register transmit command (txcmd) . 72 transmit length (txlength) . . 73 4.7 address filter registers logical address table (hash table) 74 individual address (ieee address) 74 4.8 plug n play resource registers . 75 4.9 receive and transmit frame locations 80 4.10 8 and 16-bit transfers . . . . 80 4.11 memory mode operation . . . 81 4.12 i/o space operation . . . . 83 5.0 operation 5.1 servicing the interrupt status queue 86 5.2 basic receive operation . . . 88 5.3 receive frame address filtering . 95 5.4 rx missed and collision counters . 98 5.5 receive dma . . . . . . 98 5.6 auto-switch dma . . . . . 103 5.7 streamtransfer . . . . . . 106 5.8 transmit operation . . . . . 108 5.9 full duplex considerations . . . 115 5.10 system wakeup with wakeup frames 115 6.0 test modes 6.1 boundary scan test . . . . . 121 7.0 absolute maximum ratings . 125 recommended operating conditions . 125 8.0 operating conditions . . . 125 CS8920A 2 ds238pp2
9.0 dc characteristics crystal . . . . . . . . 125 power supply . . . . . . 125 digital inputs/outputs . . . . 126 10base-t interface . . . . 127 aui interface . . . . . . 127 9.1 capacitance . . . . . 127 10.0 switching characteristics isa bus timing . . . . . 128 10base-t timing . . . . . 132 aui timing . . . . . . . 133 boot prom timing . . . . 135 eeprom timing . . . . . 135 11.0 10base-t wiring diagram . . 136 12.0 aui wiring diagram . . . . 137 13.0 crystal oscillator . . . . 137 14.0 physical dimensions . . . . 138 15.0 glossary . . . . . . . . 139 CS8920A ds238pp2 3
1.0 introduction 1.1 general description the CS8920A is a single-chip, isa plug-and- play, full-duplex, ethernet solution, incorporating all of the analog and digital cir- cuitry needed for a complete ethernet circuit. major functional blocks include: indus- try-standard plug-and-play protocol engine, a direct isa-bus interface, an 802.3 mac engine with auto-negotiation and wake-up frame recog- nition capability, integrated buffer memory; a serial eeprom interface, and a complete analog front end with both 10base-t and aui. plug and play the CS8920A implements plug and play in ac- cordance with the intel/microsoft plug and play isa specification version 1.0a, allowing inter- rupts, dma channels, io base address, memory base address, and optional bootprom address to be selected dynamically, by either a system bios, an operating system or an application pro- gram such as the configuration manager. the CS8920A supports 11 interrupts and 3 dma channels. direct isa-bus interface the CS8920A has a direct isa-bus interface with full 24 ma drive capability. the CS8920A operates in either 24-bit memory space, 16-bit i/o space, or with external dma controllers (three 16-bit channels), providing maximum de- sign flexibility. integrated memory the CS8920A incorporates a 4-kbyte page of on-chip memory, eliminating the cost and board area associated with external memory chips. un- like most other ethernet controllers, the CS8920A buffers entire transmit and receive frames on chip, eliminating the need for com- plex, inefficient memory management schemes. the on-chip buffer manager supports full-duplex operation. 802.3 ethernet mac engine the CS8920As ethernet media access control (mac) engine is fully compliant with the ieee 802.3 ethernet standard (iso/iec 8802-3, 1993), and supports full-duplex operation. the full-du- plex mode may be entered by a command from the host, or via auto-negotiation using link-pulse signaling. magic packet frames the mac machine recognizes magic packet frames, and can send a wakeup signal to a sys- tem power management chip via a dedicated control line or via an interrupt pin. eeprom interface the CS8920A provides a simple serial eeprom interface that allows configuration in- formation to be stored in eeprom, and then loaded automatically at power-up. complete analog front end the CS8920As analog front end incorporates a manchester encoder/decoder, clock recovery cir- cuit, 10base-t transceiver, and complete attachment unit interface (aui). it provides manual and automatic selection of either 10base-t or aui, and offers three on-chip led drivers for link status, bus status, and eth- ernet line activity. the 10base-t transceiver includes drivers, re- ceivers, and analog filters, allowing direct connection to low-cost isolation transformers. it supports 100, 120, and 150 w shielded and un- shielded cables, extended cable lengths. CS8920A 4 ds238pp1
the aui port provides a direct interface to 10base-2, 10base-5 and 10base-fl net- works, and is capable of driving a full 50-meter aui cable. 1.2 system applications the CS8920A is designed to work well in either motherboard or adapter applications. motherboard lans the CS8920A requires the minimum number of external components needed for an ethernet node, allowing a complete ethernet circuit that occupies as little as 2.0 square inches of pcb area (figure 1.1). in addition, the CS8920As power-saving features make it a perfect fit for power-sensitive portable and desktop pcs. moth- erboard design options include: the eeprom, used to store node-specific information, such as the ethernet individual address, can be eliminated by storing infor- mation in the system cmos. the 20 mhz crystal oscillator may be re- placed by a 20 mhz clock signal. note: while operation of the CS8920A is possi- ble without the use of an attached eeprom, special design considerations are required. fur- thermore, some of the CS8920A functions, such as plug and play capabilities and wakeup frame recognition are not possible without an attached eeprom. please contact crystals CS8920A technical support for more information on the use of the CS8920A without an attached eeprom. plug-and-play ethernet adapter cards the CS8920As highly efficient streamtrans- fer tm and auto-switch dma options, make it an excellent choice for high-performance, low- cost, isa adapter cards (fig. 1.2). the CS8920As wide range of configuration options, listed below, allow engineers to design ethernet solutions that meets their particular system re- quirements. a boot prom can be added to support disk- less applications. the 10base-t transmitter and receiver im- pedance can be adjusted to support 100, 120, or 150 w twisted pair cables. on-chip led ports can be used for either optional leds, or as programmable outputs. 1.3 key features and benefits very low cost the CS8920A is designed to provide the lowest- cost ethernet solutions available for isa desktop motherboards, portable motherboards, and adapter cards. cost-saving features include: integrated ram eliminates the need for ex- pensive external memory chips. rj-45 10base-t CS8920A i s a eeprom 20 mhz xtal (2.0 sq. in.) figure 1.1. complete ethernet motherboard solution CS8920A ds238pp1 5
on-chip 10base-t filters allow designers to use simple isolation transformers instead of more costly filter/transformer packages. the serial eeprom port, used for configu- ration and initialization, eliminates the need for expensive switches and jumpers. the CS8920A is designed to be used on a 2-layer circuit board instead of a more ex- pensive multi-layer board. the CS8920A-based solution offers the smallest footprint available, saving valuable printed circuit board area. a set of certified software drivers is available at no charge, eliminating the need for costly software development. high performance the CS8920A is a full 16-bit ethernet controller designed to provide optimal system performance by minimizing time on the isa bus and cpu overhead per frame. it offers equal or superior performance for less money when compared to other ethernet controllers. the CS8920As pack- etpage architecture allows software to select whichever access method is best suited to each particular cpu/isa-bus configuration. when compared to older i/o-space designs, packetpage is faster, simpler and more efficient. to boost performance further, the CS8920A in- clude several key features that increase throughput and lower cpu overhead, including: streamtransfer cuts up to 87% of interrupts to the host cpu during large block transfers. auto-switch dma allows the CS8920A to maximize throughput while minimizing missed frames. early interrupts allow the host to preprocess incoming frames. on-chip buffering of full frames cuts the amount of host bandwidth needed to manage ethernet traffic. low power and low noise for low power needs, the CS8920A offers three power-down options: hardware standby, hard- ware suspend, and software suspend. in standby mode, the chip is powered down with the exception of the 10base-t receiver, which is enabled to listen for link activity. in either hardware or software suspend mode, the re- CS8920A eeprom boot prom '245 20 mhz xtal rj-45 led attachment unit interface (aui) figure 1.2. full-featured isa adapter solution CS8920A 6 ds238pp1
eecs eedataout eesk sa[0:16] memw memr iow ior refresh sbhe sd[0:15] rxd- rxd+ txd- txd+ do- do+ ci- ci+ di- di+ lanled linkled/hc0 csout eedatain aen reset drq5 dack5 drq6 dack6 drq7 dack7 memcs16 iochrdy 1: 68 pf 1 3 6 8 24.3 w, 1% 24.3 w, 1% 130 129 126 125 100 w, 1% rj45 16 14 11 9 10 6 3 2 1 1:1 1 4 5 8 122 120 119 117 16 13 12 9 10 10 9 2 5 121 118 2 7 15 3 12 1:1 1:1 0.1 m f .1 m f 680 w 680 w ce oe oe dir 20 22 19 1 74ls245 xtal1 xtal2 sleep test res cs do di clk 1 3 2 4 141 6 142 7 93c56 28 90 89 29 7 irq3 irq4 irq5 irq6 16 17 la[17:23] bale 135 136 131 4.99 k w , 1% 12 v 6 20 mhz 0.1 m f 39.2 w , 1% 5 v 4.7 k w CS8920A iocs16 83 91 114 52 44 92 43 75 77 78 76 16 14 15 17 9 10 139 140 8 39.2 w , 1% 39.2 w , 1% 39.2 w , 1% eeprom 27c256 2 isa bus 10 base t isolation transformer 1:1 15 pin d aui isolation transformer bstatus/hci boot-prom pd[0:7] sa[0:14] sd[0:7] 15 8 localled irq7 irq9 irq10 irq11 irq12 irq14 irq15 57 34 33 31 32 106 79 30 5 113 115 .1 m f 2 ewake 680 w 3 116 figure 1.3. typical connection diagram CS8920A ds238pp1 7
ceiver is disabled and power consumption drops to the micro-amp range. in addition, the CS8920A has been designed for very low noise emission, thus shortening the time required for emi testing and qualification. complete support the CS8920A comes with a suite of software drivers for immediate use with most industry standard network operating systems. in addition, complete evaluation kits and manufacturing packages are available, significantly reducing the cost and time required to produce new ethernet products. 1.4 enhancements made in CS8920A the functional enhancements made to the CS8920A include the following: the fdx_led pin of the cs8920 has been red- fined as the local-lan-activity led on the CS8920A. the localled will light when one of two events occurs: the CS8920A transmits onto the network, or the CS8920A receives a frame from the net- work and that frame is addressed to this station (i.e., the frames address passes the CS8920As address filter). the plug and play standard provides for an aux- illary key which is normally used for testing purposes or to program the eeprom. the CS8920A will respond to the auxillary key at any time. the cs8920 responded to the auxil- lary key only if plug and play was enabled, or if the cs8920 had detected that the eeprom con- tained a bad crc value. this meant that the cs8920 would ignore the auxillary key in non- plug and play mode as long as the crc was valid. to support software compatibility with existing device drivers, the CS8920As product identifi- cation code register has the same product id number as the cs8920. the CS8920As revi- sion number has been incremented. the CS8920A has added the ewake pin to the boundary scan. CS8920A 8 ds238pp1
2.0 pin description 2.1 pin diagram 144 143 142 140 139 138 137 136 135 141 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 localled eedo eedi csout drq7 dack7 asub1 dvss1 dvdd1 dsub1 drq6 dack6 drq5 dack5 sd15 sd14 sd13 sd12 dvdd2 dvss2 sd11 sd10 iocs16 mcs16 la17 la18 la19 la20 la21 la22 la23 sbhe dsub2 dvdd3 dvss3 bale sa0 sa1 sa2 sa3 eesk eecs lanled linkled/hc0 xtal2 xtal1 asub2 avdd1 avss1 res rxd- rxd+ avdd2 avss2 txd- txd+ avss3 avdd3 do- do+ ci- CS8920A 144-pin tqfp (q) sd9 sd8 memw memr irq14 irq15 irq12 irq11 irq10 37 38 39 41 42 43 44 45 46 40 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 sa4 sa5 sa6 sa7 sa8 62 63 64 65 66 67 68 69 70 71 72 108 107 106 104 103 102 101 100 99 105 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 irq2/irq9 sd6 sd5 sd4 dvdd5 dvss5 sd3 sd7 sd2 sd1 sd0 dsub3 dvdd4 dvss4 iochrdy aen iow ior sa16 sa15 sa14 sa13 sa12 83 82 81 80 79 78 77 76 75 74 73 refresh sa11 sa10 sa9 irq7 irq6 irq5 irq4 irq3 119 118 117 116 115 114 113 112 111 110 109 ci+ di- di+ sleep test reset bstatus/hc1 1 2 3 5 6 7 8 9 10 4 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 asub3 asub4 ewake CS8920A ds238pp2 9
2.2 pin description isa bus interface symbol pin number type description sa0-sa8 sa9-sa11 sa12-sa16 58-66 80-82 84-88 i system address bus: address decoding for the isa addresses including boot prom and memory addresses. sa0-sa15 are used for i/o read/write operations. sa0-sa16 are used in for memory read and write operations. la17-la23 45-51 i latchable address bus: address decoding for the buffered version of the upper isa address bits. used for early address decode. latched on the trailing edge of the bale signal. bale 57 i buffered address latch enable: rising edge signals the CS8920A to decode the la17:la23. the trailing edge of bale is used to latch the address and hold it for the duration of the current bus cycle. sd0-sd3 sd4-sd7 sd8-sd11 sd12-sd15 96-99 102-105 27-24 21-18 b24 system data bus: bi-directional 16-bit system data bus used to transfer data between the CS8920A and the host. reset 114 i reset: active-high asynchronous input used to reset the CS8920A. must be stable for at least 400 ns before the CS8920A recognizes the signal as a valid reset. aen 91 i address enable: when test is high, the active-high aen input indicates to the CS8920A that the system dma controller has control of the isa bus. when aen is high, the CS8920A will not respond to an io or memory space access. memr 29 i memory read: active-low input indicates that the host is executing a memory read operation. memw 28 i memory write: active-low input indicates that the host is executing a memory write operation. mcs16 44 od24 memory chip select 16: open-drain, active-low output generated by the CS8920A when it recognizes an address on the isa bus that corresponds to its assigned memory space (CS8920A must be in memory mode with the memorye bit (register 17, busctl, bit a) set for mcs16 to go active). tri-stated when not active. refresh 83 i refresh: active-low input indicates to the CS8920A that a dram refresh cycle is in progress. when refresh is low, memr, memw, ior, iow, dmack0, dmack1, and dmack2 are ignored. ior 89 i i/o read: when ior is low and a valid address is detected, the CS8920A outputs the contents of the selected 16-bit i/o register onto the system data bus. ior is ignored if refresh is low. iow 90 i i/o write: when iow is low and a valid address is detected, the CS8920A writes the data on the system data bus into the selected 16-bit i/o register. iow is ignored if refresh is low. pin types: di = differential input pair i = input g = ground do = differential output pair o = output ts = tri-state b = bi-directional with tri-state output p = power w = internal weak pullup od = open drain output digital outputs are followed by drive in ma (example: od24 = open drain output with 24 ma drive). CS8920A 10 ds238pp2
isa bus interface (continued) symbol pin number type description iocs16 43 od24 i/o chip select 16-bit: open-drain, active-low output generated by the CS8920A when it recognizes an address on the isa bus that corresponds to its assigned i/o space. tri-stated when not active. iochrdy 92 od24 i/o channel ready: when driven low, this open-drain, active-high output extends i/o read and memory read cycles to the CS8920A. this output is functional when the iochrdye bit in the bus control register (register 17) is clear. this pin is always tri-stated when the iochrdye bit is set. sbhe 52 i system bus high enable: active-low input indicates a data transfer on the high byte of the system data bus (sd8-sd15). after a hardware or software reset, provide a high to low and then a low to high transition on sbhe signal before any io or memory access isdone to the CS8920A. * irq2/irq9 irq3-irq7 irq10-irq12 irq14-irq15 106 75-79 34-32 30-31 o24ts interrupt request: active-high output indicates the presence of an interrupt event. the pin goes low after the host reads a non-zero value from the interrupt status queue (isq). drq5 drq6 drq7 16 14 9 o24ts dma request: active-high, tri-stateable output used by the CS8920A to request a dma transfer. only one dma request output is used (one is selected during configuration). all non-selected dma request outputs are placed in a high-impedance state. dack5 dack6 dack7 17 15 10 i dma acknowledge: active-low input indicates acknowledgment by the host of the corresponding dma request output. eeprom and boot prom interface symbol pin number type description eesk 142 o4 eeprom serial clock: serial clock used to clock data into or out of the eeprom. eecs 141 o4 eeprom chip select: active-high output used to select the eeprom. eedi 7 iw eeprom data in: serial input used to receive data from the eeprom. connects to the do pin on the eeprom. eedi is also used to sense the presence of the eeprom. eedo 6 o4 eeprom data out: serial output used to send data to the eeprom. connects to the di pin on the eeprom. when test is low, this pin becomes the output for the boundary scan test. csout 8 o4 chip select for external boot prom: active-low output used to select an external boot prom when the CS8920A decodes a valid boot prom memory address. pin types: di = differential input pair i = input g = ground do = differential output pair o = output ts = tri-state b = bi-directional with tri-state output p = power w = internal weak pullup od = open drain output digital outputs are followed by drive in ma (example: od24 = open drain output with 24 ma drive). * for operation of the CS8920A in 16 bit mode, a transition on the sbhe line is required after a hardware or software reset. CS8920A ds238pp2 11
attachment unit interface (aui) symbol pin number type description do+ do- 121 122 do aui data out: differential output pair drives 10 mb/s manchester-encoded data to the aui transmit pair. di+ di- 117 118 di aui data in: differential input pair receives 10 mb/s manchester-encoded data from the aui receive pair. ci+ ci- 119 120 di aui collision in: differential input pair connects to the aui collision pair. a collision is indicated by the presence of a 10 mhz +/-15% signal with duty cycle no worse than 60/40. 10base-t interface symbol pin number type description txd+ txd- 125 126 do 10base-t transmit: differential output pair drives 10 mb/s manchester-encoded data to the 10base-t transmit pair. rxd+ rxd- 129 130 di 10base-t receive: differential input pair receives 10 mb/s manchester-encoded data from the 10base-t receive pair. pin types: di = differential input pair i = input g = ground do = differential output pair o = output ts = tri-state b = bi-directional with tri-state output p = power w = internal weak pullup od = open drain output digital outputs are followed by drive in ma (example: od24 = open drain output with 24 ma drive). CS8920A 12 ds238pp2
general pins symbol pin number type description xtal1 xtal2 135 136 i/o crystal: a 20 mhz crystal should be connected across these pins. if a crystal is not used, a 20 mhz signal should be connected to xtal1 and xtal2 should be left open. (see section 9.0 and 13.0.) sleep 116 iw hardware sleep: active-low input used to enable the two hardware sleep modes: hardware suspend and hardware standby. (see section 3.8.) ewake 3 o4w wakeup signal: the CS8920A asserts ewake high when a wakeup frame is detected on the ethernet receiver. linkled or hc0 139 od10 link good led or host controlled output 0: when the hce0 bit of the self control register (register 15) is clear, this active-low output is low when the CS8920A detects the presence of valid link pulses. when the hce0 bit is set, the host may drive this pin low by setting the hcbo in the self control register. bstatus or hc1 113 od10 bus status or host controlled output 1: when the hce1 bit of the self control register (register 15) is clear, this active-low output is low when receive activity causes an isa bus access. when the hce1 bit is set, the host may drive this pin low by setting the hcb1 in the self control register. lanled 140 od10 lan activity led: during normal operation, this active-low output goes low for 6 ms whenever there is a receive packet, a transmit packet, or a collision. during hardware standby mode, this output is driven low when the receiver detects network activity. localled 5 od10 local activity led: during normal operation, this active-low output goes low for 6 ms whenever there is either a receive packet addressed to this node, or a transmit packet. test 115 iw test enable: active-low input used to put the CS8920A in boundary scan test mode. for normal operation, this pin should be high or left open. res 131 i reference resistor: this input should be connected to a 4.99 k w +/-1% resistor needed for biasing of internal analog circuits. dvdd1 - dvdd5 12, 22, 55, 94, 101 p digital power: provides 5 v +/- 5% power to the digital circuits of the CS8920A. dvss1 - dvss5 11, 23, 56, 93, 100 g digital ground: provides ground reference (0v) to the digital circuits of the CS8920A. dsub1 - dsub3 13, 54, 95 provide additional ground references (0v) to digital circuits of the CS8920A. avdd1 - avdd3 133, 128, 123 p analog power: provides 5 v +/- 5% power to the analog circuits of the CS8920A. avss1 - avss7 4, 124, 127, 132, 134, 137, 138 g analog ground: provide ground reference (0v) to the analog circuits of the CS8920A. avss1 - avss4 4, 134, 137, 138 provided additional ground references (0v) to analog circuits of the CS8920A. pin types: di = differential input pair i = input g = ground do = differential output pair o = output ts = tri-state b = bi-directional with tri-state output p = power w = internal weak pullup od = open drain output digital outputs are followed by drive in ma (example: od24 = open drain output with 24 ma drive). CS8920A ds238pp2 13
3.0 functional description 3.1 overview during normal operation, the CS8920A performs two basic functions: ethernet packet transmis- sion and reception. before transmission or reception is possible, the CS8920A must be con- figured. configuration the CS8920A must be configured for packet transmission and reception at power-up or reset. various parameters must be written into its inter- nal configuration and control registers such as memory base address; ethernet physical ad- dress; what frame types to receive; and which media interface to use. configuration data can either be written to the CS8920A by the host (across the isa bus), or loaded automatically from an external eeprom. operation can begin after configuration is complete. sections 3.1 and 3.3 describe the configuration process in detail. section 4.4 provides a detailed description of the bits in the configuration and control registers. packet transmission packet transmission occurs in two phases. in the first phase, the host moves the ethernet frame into the CS8920As buffer memory. the first phase begins with the host issuing a transmit command. this informs the CS8920A that a frame is to be transmitted and tells the chip when (i.e. after 5, 381, or 1021 bytes have been transferred or after the full frame has been trans- ferred to the CS8920A) and how the frame should be sent (i.e. with or without crc, with or without pad bits, etc.). the host follows the transmit command with the transmit length, indicating how much buffer space is required. when buffer space is available, the host writes the ethernet frame into the CS8920As internal memory, either as a memory or i/o space opera- tion. in the second phase of packet transmission, the CS8920A converts the frame into an ethernet packet, then transmits it onto the network. the second phase begins with the CS8920A transmit- ting the preamble and start-of-frame delimiter as soon as the proper number of bytes have been transferred into its transmit buffer (5, 381, 1021 bytes or full frame, depending on configuration). the preamble and start-of-frame are followed by the destination address, source address, length field and llc data (all supplied by the host). if the frame is less than 64 bytes, includ- ing crc, the CS8920A adds pad bits if configured to do so. finally, the CS8920A ap- pends the proper 32-bit crc value. section 5.8 provides a detailed description of packet transmission. packet reception like packet transmission, packet reception oc- curs in two phases. in the first phase, the CS8920A receives an ethernet packet and stores it in on-chip memory. the first phase begins with the receive frame passing through the ana- log front end and manchester decoder where manchester data is converted to nrz data. next, the preamble and start-of-frame delimiter are stripped off and the receive frame is sent through the address filter. if the frames destination ad- dress matches the criteria programmed into the address filter, the packet is stored in the CS8920As internal memory. the CS8920A then checks the crc, and depending on the configu- ration, informs the processor that a frame has been received. in the second phase, the host transfers the re- ceive frame across the isa bus and into host memory. receive frames can be transferred as memory space operations, i/o space operations, or as dma operations using host dma. in addi- CS8920A 14 ds238pp2
tion, the CS8920A provides the capability to switch between memory or i/o operation and dma operation by using auto-switch dma and streamtransfer. sections 5.2 through 5.7 provide a detailed de- scription of packet reception. reset/boot/sleep nine resets can be activated on the CS8920A. three are activated by the v cc power supply line; one is activated when the eeprom fails checksum; one is activated on a plug and play instruction; one is activated when reset is set; and three are activated with sleep modes. a sleep mode disables the CS8920A (completely or partially) to reduce power consumption. "sus- pend" describes the CS8920A in the completely disabled mode. "standby" describes the CS8920A in the partially disabled mode when most of its circuits except the receiver are dis- abled. the CS8920A can be "awakened" when the receiver detects and receives line activity. after reset, packet transmission and reception are disabled. either an external eeprom must be used to start the CS8920A, or the host must di- rectly set up registers using plug and play protocols. contact crystals CS8920A technical support for more information regarding the use of the CS8920A without an external eeprom. 3.2 isa bus interface the CS8920A provides a direct interface to isa buses running at clock rates from 8 to 11 mhz. its on-chip bus drivers are capable of delivering 24 ma of drive current, allowing the CS8920A to drive the isa bus directly, without added ex- ternal "glue logic". the CS8920A is optimized for 16-bit data trans- fers, operating in either memory space, i/o space, or as a dma slave. note that isa-bus operation below 8 mhz should use the CS8920As receive dma mode to minimize missed frames. see section 5.5 for a description of receive dma operation. memory mode operation when configured for memory mode operation, the CS8920As internal ram is mapped into a contiguous 4-kbyte block of host memory, pro- viding the host with direct access to the CS8920As internal registers and frame buffers. the host initiates read operations by driving the memr pin low and write operations by driving the memw pin low. for additional information about memory mode, see section 4.11. i/o mode operation when configured for i/o mode operation, the CS8920A is accessed through eight, 16-bit i/o ports that are mapped into sixteen contiguous i/o locations in the host systems i/o space. i/o mode is the default configuration for the CS8920A and is always enabled. for an i/o read or write operation, the aen pin must be low, and the 16-bit i/o address on the isa system address bus (sa0 - sa15) must match the address space of the CS8920A. for a read, ior must be low, and for a write, iow must be low. for additional information about i/o mode, see section 4.12. interrupt request signals the CS8920A has eleven interrupt request out- put pins that can be connected directly to any CS8920A ds238pp2 15
eleven of the isa bus interrupt request signals. only one interrupt output is used at a time. the interrupt output is selected during initialization by writing the interrupt number (0 to 10) into packetpage memory base + 0370h; or, the inter- rupt output can be accessed through the plug and play resource register 0070h. unused interrupt request pins are placed in a high-impedance state. the selected interrupt request pin goes high when an enabled interrupt is triggered. the pin goes low after the interrupt status queue (isq) is read as all 0s (see section 5.1 for a description of the isq). table 3.1 presents one possible way of connect- ing the interrupt request pins to the isa bus that utilizes commonly available interrupts and facili- tates board layout. *when in pnp mode, the interrupt request output is accessed through the resource register 0370h. dma signals the CS8920A interfaces directly to the host dma controller to provide dma transfers of re- ceive frames from CS8920A memory to host memory. the CS8920A has three pairs of dma pins that can be connected directly to the three 16-bit dma channels of the isa bus. only one dma channel is used at a time. it is selected during initialization by writing the number of the desired channel (0, 1 or 2) into packetpage memory base + 0374h. unused dma pins are placed in a high-impedance state. the selected dma request pin goes high when the CS8920A has received frames to transfer to the host mem- ory via dma. if the dmaburst bit (register 17, busctl, bit b) is set, the pin goes low after the dma operation is complete. if the dmaburst bit is clear, the pin goes low 32 m s after the start of a dma transfer. the dma pin pairs are arranged on the CS8920A to facilitate board layout. crystal rec- ommends the configuration in table 3.2 when connecting these pins to the isa bus. for a description of dma mode, see section 5.5. 3.3 reset and initialization 3.3.1 reset nine different conditions cause the CS8920A to reset its internal registers and circuits. external reset, or isa reset: there is a chip- wide reset whenever the reset pin is high for at least 40 ns. during a chip-wide reset, all cir- cuitry and registers in the CS8920A are reset. power-up reset: when power is applied, the CS8920A maintains reset until the voltage at the supply pins reaches approximately 2.5 v. the CS8920A comes out of reset once vcc is greater CS8920A interrupt request pin isa bus interrupt packetpage base + 0370h* irq3(pin 75) irq3 0003h irq4 (pin 76) irq4 0004h irq5 (pin 77) irq5 0005h irq6(pin 78) irq6 0006h irq7(pin 79) irq7 0007h irq9(pin 106) irq9 0009h irq10(pin 34) irq10 000ah irq11(pin 33) irq11 000bh irq12(pin 32) irq12 000ch irq14(pin 30) irq14 000eh irq15 (pin 31) irq15 000fh table 3.1. interrupt assignments CS8920A dma signal (pin #) isa dma signal packetpage base + 0374h drq5 (16) drq5 0000h dack5 (17) dack5 drq6 (14) drq6 0001h dack6 (15) dack6 drq7 (9) drq7 0002h dack7 (10) dack7 table 3.2. dma assignments CS8920A 16 ds238pp2
than approximately 2.5 v and the crystal oscilla- tor has stabilized. power-down reset: if the supply voltage drops below approximately 2.5 v, there is a chip-wide reset. the CS8920A comes out of reset once the power supply returns to a level greater than ap- proximately 2.5 v and the crystal oscillator has stabilized. eereset: there is a chip-wide reset if the CS8920A detects an eeprom checksum error. (see section 3.1). software initiated reset: there is a chip-wide reset whenever the reset bit (register 15, selfctl, bit 6) is set. the plug and play card select number, plug and play rd data port, pnp_disable bit, io base address register, mem- ory base address register, interrupt register, and dma register are preserved. the digital logic is reset, but the analog circuits are not. hardware (hw) standby or suspend: the CS8920A goes though a chip-wide reset when- ever it enters or exits either hw standby mode or hw suspend mode (see section 3.8 for more information about hw standby and suspend). software (sw) suspend: whenever the CS8920A enters sw suspend mode, all registers and circuits are reset except for the isa i/o base address register (located at packetpage base + 0360h) and the selfctl register (register 15). upon exit, there is a chip-wide reset (see section 3.8 for more information about sw suspend). pnp initiated reset: writing a one (setting bit[0]) to the plug and play config control reg- ister (address 0x02) causes all digital registers to be reset, including the CS8920As card select number and plug and play read data port ad- dress. at the end of the reset, the CS8920A will attempt to read configuration information from eeprom. the analog circuits are not reset. magic packet frame generated reset: in power down mode, with wakeupen=1, the CS8920A wont reset completely unless the reset signal it detects is followed by 6 memr cycles. the magic packet frame generated reset ensures the CS8920A resets only when it receives a true power up reset signal. 3.3.2 allowing time for reset operation after a reset, the CS8920A goes through a self configuration. this includes calibrating on-chip analog circuitry, and reading eeprom for valid- ity and configuration. time required for the reset calibration is typically 10 ms. software drivers should not access registers internal to the CS8920A during this time. when calibration is done, bit initd in the self status register (reg- ister 16) is set indicating that initialization is complete, and the sibusy bit in the same regis- ter is cleared indicating the eeprom is no longer being read or programmed. 3.3.3 bus reset considerations the CS8920A reads 3000h from iobase+0ah after the reset, until the software writes a non- zero value at iobase+0ah. the 3000h address can be used as part of the CS8920A signature when the system scans for the CS8920A. see section 4.12, i/o space operation. after a reset, the isa bus outputs irqx and drqx are tri-stated, thus avoiding any interrupt or dma channel conflicts on the isa bus at power-up time. initialization after each reset (except eeprom reset), the CS8920A checks the sense of the eedi pin to see if an external eeprom is present. if eedi is high, an eeprom is present and the CS8920A automatically loads the configuration data stored in the eeprom into its internal reg- isters (see next section). if eedi is low, an CS8920A ds238pp2 17
eeprom is not present and the CS8920A comes out of reset with the default configuration shown in table 3.3. a low-cost serial eeprom can be used to store configuration information that is automatically loaded into the CS8920A after each reset (except eeprom reset). the use of an eeprom is op- tional and is not required for all applications (e.g. motherboard designs). however, while op- eration of the CS8920A is possible without the use of an attached eeprom, special design con- siderations are required. furthermore, some of the CS8920A functions, such as plug and play capabilities and wakeup frame recognition are not possible without an attached eeprom. con- tact crystals CS8920A technical support for more information on the use of the CS8920A without an attached eeprom. the CS8920A operates with any of six standard eeproms shown in table 3.4. to work in a pnp system, the CS8920A requires at least a 128 word eprom. 3.4 plug & play plug and play is a standard mechanism, devel- oped by intel and microsoft, that provides an automatic configuration capability for isa cards. system resources such as interrupts, memory ad- dresses, and io ports are assigned to plug and play compatible devices by the plug and play configuration mechanism. the CS8920A fully supports plug and play and allows the complete configuration of the isa in- terface by the plug and play compatible operating system software or bios. refer to the plug and play isa specification for detailed in- formation about the innerworkings of plug and play. plug and play configuration process the plug and play configuration process deter- mines the resource requirements of the plug and play devices in a system and assigns non-con- flicting resources to these cards. the configuration process goes through several phases: packetpage address register contents register description 0360h 0000h i/o base address* 0370h xxxx xxxx 0000 0000 interrupt number 0374h xxxx xxxx xxxx xx11 dma channel 0026h 0000h dma start-of-frame offset 0028h x000h dma frame count 002ah 0000h dma byte count 0348h xxx0 0000h memory base address 0340h xxx0 0000h boot prom base address 0343h xxx0 0000h boot prom address mask 0102h 0003h register 3 - rxcfg 0104h 0005h register 5 - rxctl 0106h 0007h register 7 - txcfg 0108h 0009h register 9 - txcmd 010ah 000bh register b - bufcfg 010ch 000dh register d - advint ctl/st 010eh undefined reserved 0110h undefined reserved 0112h 0013h register 13 - linectl 0114h 0015h register 15 - selfctl 0116h 0017h register 17 - busctl 0118h 0019h register 19 - testctl 011ch 001dh register id - autoneg ctl * i/o base address is unaffected by sw suspend mode. table 3.3. default configuration eeprom type size (16-bit words) c46 (non-sequential) 64 cs46 (sequential) 64 c56 (non-sequential) 128 cs56 (sequential) 128 c66 (non-sequential) 256 cs66 (sequential) 256 table 3.4. supported eeprom types CS8920A 18 ds238pp2
a reset signal on the system bus places all plug and play cards into a mode in which they are all waiting for configuration to be- gin. a special key is written to all all of the pnp cards to initialize them for selection. a special series of reads is performed that allows a single card to be selected. the se- lected card is given a system identifier, called the card select number (csn). the configu- ration software then determines the resource requirements of the card. finally, the selected card is placed into a sleep mode. the remain- ing cards are individually selected and assigned a csn and their resource needs de- termined. the configuration software then selects an individual card using the csn, assigns non- conflicting resources to the card, and then enables the card for normal operation. this is repeated for each of the plug and play cards until all of the cards have been configured and enabled. plug and play auxiliary key the CS8920A will respond to a special auxiliary key at any time. the auxiliary initiation key is normally used for testing/debug purposes. two bytes of 00 should proceed the initiation or aux- iliary key. this auxiliary initiation key is listed below in hexadecimal: 6a, b5, da, 6d, b6, 5b, 2d, 16 0b, 05, 02, 01, 80, c0, 60, 30 18, 0c, 06, 83, 41, 20, 90, 48 24, 12, 89, c4, e2, f1, f8, fc plug and play device ids the plug and play device id is a unique identi- fier that is used by the operating system to associate the plug and play card with its device driver. microsoft administers the assignment of these device ids. contact microsoft to receive a unique device id. 3.5 configuration with eeprom eeprom interface the interface to the eeprom consists of the four signals shown in table 3.5 eeprom memory organization eeprom is used to store initial configuration information for the CS8920A. the eeprom is organized in one or more blocks of 16-bit words. the first block in eeprom, referred to as the configuration block, is used to configure the CS8920A after reset. an example of a typical configuration block is shown in table 3.6 . ad- ditional user data may also be stored in the eeprom if space is available. the additional data are stored as 16-bit words and can occupy any eeprom address space beginning immedi- ately after the end of the reset configuration block up to address 7fh, depending on eeprom size. this additional data can only be accessed through software control (refer to sec- tion 3.6 for more information on accessing the eeprom). address space 80h to afh is re- served CS8920A pin (pin #) CS8920A function eeprom pin eecs (pin 141) eeprom chip select chip select eesk (pin 142) 1 mhz eeprom serial clock output clock eedo (pin 6) eeprom data out (data to eeprom) data in eedi (pin 7) eeprom data in (data from eeprom) data out table 3.5. eeprom interface CS8920A ds238pp2 19
reset configuration block the first block in eeprom, referred to as the reset configuration block, is used to automat- ically program the CS8920A with an initial configuration after a reset. it is a block of con- tiguous 16-bit words starting at eeprom address 00h. the reset configuration block can be divided into three logical sections: a header, one or more groups of configuration data words, and a checksum value. all of the words in the reset configuration block are read sequentially by the CS8920A after each reset, starting with the header and ending with the checksum. each group of configuration data is used to program a packetpage register (or set of packetpage regis- ters in some cases) with an initial non-default value. reset configuration block header: the header (first word of the block located at eeprom ad- dress 00h) specifies the type of eeprom used, whether or not a reset configuration block is present, if the CS8920As plug and play support is enabled or disabled, and how many bytes of data are stored in the reset configuration block. determining the eeprom type: the lsb of the high byte of the header indicates the type of eeprom attached: sequential or non-sequential. an lsb of 0 (xxxx-xxx0) indicates a se- quential eeprom. an lsb of 1 (xxxx- xxx1) indicates a non-sequential eeprom. the CS8920A works equally well with either type of eeprom. the CS8920A will automat- ically generate sequential addresses while reading the reset configuration block if a non- sequential eeprom is used. checking eeprom for presence of reset con- figuration block: the readout of either a binary 101x-xxx0 or 101x-xxx1 (x = do not care) from the high byte of the header indicates the presence of configuration data. any other read- word address value description first word in data block 00h b112h configuration block header. the high byte, b1h, indicates a c56 eeprom (non-sequential) is attached and plug and play is disabled. the link byte, 12h, indicates the number of bytes of configuration data in this block. first group of words 01h 2158h group header for first group of words. three words to be loaded, beginning at 0158h in packetpage memory. 02h 0100h individual address, bits[39-32], bits[47-40] 03h 0302h individual address, bits[23-16], bits[31-24] 04h 0504h individual address, bits[7-0], bits[15-8] second group of words 05h 0360h group header for second group of words. one word to be loaded at 360h in packetpage memory. 06h 0003h io base address = 300h third group of words 07h 0330h group header for third group of words. one word to be loaded at 330h in packetpage memory. 08h 0001 set adapters activate bit (make active on reset w/o pnp). checksum value 09h 1b00h the high byte, 1bh, is the checksum value. the checksum includes word addresses 00h through 08h. the hexadecimal sum of the bytes is e5h, resulting in a 2s complement of 1bh. the low byte, 00h, provides a pad to the word boundary. table 3.6. eeprom configuration block example CS8920A 20 ds238pp2
out value terminates initialization from the eeprom. if an eeprom is attached but not used for configuration, crystal recommends that the high byte of the first word be programmed with 00h in order to ensure that the CS8920A will not attempt to read configuration data from the eeprom. setting plug and play support enabled/dis- abled: setting bit four of the high byte of the header disables the CS8920As plug and play support. clearing this bit leaves plug and play support enabled (default). for example, a value of 1011-xxxx (x = do not care) for the high byte disables plug and play support while a value of 1010-xxxx leaves plug and play en- abled. determining number of bytes in the reset configuration block: the low byte of the reset configuration block header is known as the link byte. the value of the link byte represents the number of bytes of configuration data in the re- set configuration block. the two bytes used for the header are excluded when calculating the link byte value. for example, a reset configuration block header of a112h indicates a non-sequential eeprom programmed with eighteen (12h) bytes of configuration data. the CS8920As plug and play support is enabled. the reset configuration block occupies twenty bytes (10 words) of eeprom space (2 bytes for the header and 18 bytes of configuration data). groups of configuration data configuration data are arranged as groups of words. each group contains one or more words of data that are to be loaded into packetpage reg- isters. the first word of each group is referred to as the group header. the group header indi- cates the number of words in the group and the address of the packetpage register into which the first data word in the group is to be loaded. any remaining words in the group are stored in suc- cessive packetpage registers. group header: bits f through c of the group header specify the number of words in each group that are to be transferred to packetpage registers (see figure 3.1). this value is two less than the total number of words in the group, in- cluding the group header. for example, if bits f through c contain 0001, there are three words in the group (a group header and two words of configuration data). bits 9 through 0 of the group header specify a 10-bit packetpage address. this address defines the packetpage register that will be loaded with the first word of configuration data from the group. bits b and a of the group header are forced to 0, restricting the destination address range to the first 1024 bytes of packetpage mem- ory. figure 3.1 shows the format of the group header. reset configuration block checksum a checksum is stored in the high byte position of the word immediately following the last group of data in the reset configuration block. (the 10 3 2 5 4 76 first word of a group of words 9 8 b a d c fe number of words in group 00 10-bit packetpage address figure 3.1. group header CS8920A ds238pp2 21
eeprom address of the checksum value can be determined by dividing the value stored in the link byte by two). the checksum value is the 2s complement of the 8-bit sum (any carry out of eighth bit is ignored) of all the bytes in the reset configuration block, excluding the check- sum byte. this sum includes the reset configuration block header at address 00h. since the checksum value is calculated as the 2s complement of the sum of all the preceding bytes in the in the reset configuration block, a total of 0 should result when the checksum value is added to the sum of the previous bytes. eeprom example table 3.6 shows an example of a reset configu- ration block stored in a c56 (non-sequential) eeprom. the b112h value in the header dis- ables plug and play support and specifies eighteen bytes of configuration data follow. note that little-endian word ordering is used, i.e., the least significant word of a multi-word datum is located at the lowest address. eeprom readout if the eedi pin is asserted high at the end of reset, the CS8920A reads the first word of eeprom data by: 1. asserting eecs 2. clocking out a read-register-00h command on eedo (eesk provides a 1 mhz serial clock signal) 3. clocking the data in on eedi. if the eedi pin is low at the end of the reset signal, the CS8920A does not perform an eeprom readout (uses its default configura- tion). determining eeprom size: the CS8920A de- termines the size of the eeprom by checking the sense of eedi on the tenth rising edge of eesk. if eedi is low, the eeprom is a c46 or cs46. if eedi is high, the eeprom is a c56, cs56, c66, or cs66. loading configuration data: the CS8920A reads in the first word from the eeprom to de- termine if configuration data are contained in the f x e x d x c x b x elsel ob1 ob0 a 9 8 ad5 ad4 54 76 ad7 ad6 1 0 32 ad1 ad0 ad3 ad2 ad5 - ad0 used with 'c46 and 'cs46 ad7 - ad0 used with 'c56, 'cs56, 'c66 and 'cs66 bit name description [f:b] reserved [a] elsel external logic select: when clear, the eecs pin is used to select the eeprom. when set, the elcs pin is used to select the external la decode circuit. [9:8] ob1, ob0 opcode: indicates what command is being executed (see next section). [7:0] ad7 to ad0 eeprom address: address of eeprom word being accessed. figure 3.2. eeprom command register format CS8920A 22 ds238pp2
eeprom. if configuration data are not stored in the eeprom, the CS8920A terminates initiali- zation from eeprom and operates using its default configuration (see table 3.3). note: the default configuration leaves the CS8920A in a pnp inactive state; it can then only be accessed through the pnp configuration and data ports. if configuration data are stored in eeprom, the CS8920A automatically loads all configuration data stored in the reset configuration block into its internal packetpage registers. eeprom readout completion once all the configuration data are transferred to the appropriate packetpage registers, the CS8920A adds the sum of the data bytes it read to the 2s complement checksum at the end of the configuration data to verify the reset con- figuration blocks data are valid. if the resulting total is 0, the readout is considered valid. other- wise, the CS8920A initiates a partial reset to restore the default configuration. if the readout is valid, the eepromok bit (register 16, selfst, bit a) is set. eepromok is cleared if a checksum error is detected. in this case, the CS8920A performs a partial reset and is restored to its default. once initialization is complete (configuration loaded from eeprom or reset to default configuration) the initd bit is set (register 16, selfst, bit 7). 3.6 programming the eeprom after initialization, the host can access the eeprom through the CS8920A by writing one of seven commands to the eeprom command register (packetpage base + 0040h). figure 3.2 shows the format of the eeprom command register. eeprom commands the seven commands used to access the eeprom are: read, write, erase, erase/write enable, erase/write disable, erase-all, and write-all. they are described in table 3.7. eeprom command execution during the execution of a command, the two op- code bits, followed by six bits of address (for a c46 or cs46) or eighth bits of address (for a c56, cs56, c66 or cs66), are shifted out of the CS8920A, into the eeprom. if the com- mand is a write, the data in the eeprom data register (packetpage base + 0042h) follows. if command opcode (bits 9,8) eeprom address (bits 7 to 0) data eeprom type execution time read register 1,0 word address yes all 25 m s write register 0,1 word address yes all 10 ms erase register 1,1 word address no all 10 ms erase/write enable 0,0 xx11-xxxx no cs46, c46 9 m s 11xx-xxxx no cs56, c56, cs66, c66 9 m s erase/write disable 0,0 0,0 xx00-xxxx no cs46, c46 9 m s 00xx-xxxx no cs56, c56, cs66, c66 9 m s erase-all registers 0,0 0,0 xx10-xxxx no cs46, c46 10 ms 10xx-xxxx no cs56, c56, cs66, c66 10 ms write-all registers 0,0 0,0 xx01-xxxx yes cs46, c46 10 ms 01xx-xxxx yes cs56, c56, cs66, c66 10 ms table 3.7. eeprom commands CS8920A ds238pp2 23
the command is a read, the data in the specified eeprom location is written into the eeprom data register. if the command is an erase or erase-all, no data is transferred to or from the eeprom data register. before issuing any com- mand, the host must wait for the sibusy bit (register 16, selfst, bit 8) to clear. after each command has been issued, the host must wait again for si-busy to clear. enabling access to the eeprom the erase/write enable command provides pro- tection from accidental writes to the eeprom. the host must write an erase/write enable com- mand before it attempts to write to or erase any eeprom memory location. once the host has finished altering the contents of the eeprom, it must write an erase/write disable command to prevent unwanted modification of the eeprom. writing and erasing the eeprom to write data to the eeprom, the host must execute the following series of commands: 1. issue an erase/write enable command . 2. load the data into the eeprom data register. 3. issue a write command. 4. issue an erase/write disable command. during the erase command, the CS8920A writes ffh to the specified eeprom location. during the erase-all command, the CS8920A writes ffh to all locations. 3.7 boot prom operation the CS8920A supports an optional boot prom used to store code for remote booting from a network server. this is typically done for a disk- less workstation. accessing the boot prom the CS8920A provides address decoding cir- cuitry to generate a chip select for a boot prom. when the address on the isa bus match the address loaded into the boot prom base ad- dress register and qualified by boot prom address mask register. the CS8920A generates a chipselect signal for the boot prom. configuring the CS8920A for boot prom operation figure 3.3 show how the CS8920A should be connected to the boot prom and 245 driver. to configure the CS8920As internal registers for boot prom operation, the boot prom base address must be loaded into the boot prom base address register (packetpage base + 0340h) and the boot prom address mask must be loaded into the bootprom address mask regis- ter (packetpage base + 0343h). the boot prom base address provides the starting location in host memory where the boot prom is mapped. the boot prom address mask indicates the size of the attached boot prom and is limited to 4-kbyte increments. the lower 12 bits of the address mask are ignored and should be 000h. oe dir b1 . . . b8 a1 . . . a8 74ls245 sd(0:7) isa bus sa(0:14) 27c256 ce oe 20 22 19 CS8920A csout (pin 17) figure 3.3. boot prom connection diagram CS8920A 24 ds238pp2
as an example, to configure the CS8920A to use a 16-kbyte (128-kbit) prom mapped into host memory at a starting address of d0000h, write 0d00h to the bootprom base address register and write 0fc0h into the bootprom address mask register. (the mask value for a 16-kbyte prom is 0fc00h. see section 4.8 for more in- formation on determing the bootprom address and mask register values.) 3.8 low-power modes for power-sensitive applications, the CS8920A supports three low-power modes: hardware standby, hardware suspend, and software sus- pend. all three low-power modes are controlled through the selfctl register (register 15). an internal reset occurs when the CS8920A comes out of any suspend or standby mode. af- ter a reset (internal or external), the CS8920A goes though a self configuration. this includes calibrating on-chip analog circuitry, and reading eeprom for validity and configuration. when the calibration is done, bit initd in register 16 (self status register) is set indicating that initiali- zation is complete, and the sibusy bit in the same register is cleared (indicating that the eeprom is no longer being read or pro- grammed. time required for the reset calibration is typically 10 ms. software drivers should not access registers internal to CS8920A during this time. hardware standby hardware (hw) standby is designed for use in systems, such as portable pcs, that may be tem- porarily disconnected from the 10base-t cable. it allows the system to conserve power while the lan is not in use, and then automatically re- store ethernet operation once the cable is reconnected. in hw standby mode, all analog and digital cir- cuitry in the CS8920A is turned off, except for the 10base-t receiver which remains active to listen for link activity. if link activity is detected, the lanled pin is driven low, providing an in- dication to the host that the network connection is active. the host can then activate the CS8920A by de-asserting the sleep pin. dur- ing this mode, all isa bus accesses are ignored. CS8920A configuration CS8920A operation sleep (pin 116) hwstandbye (selfctl, bit a) hwsleepe (selfctl, bit 9) swsuspend (selfctl, bit 8) link pulses low set set clear not present hw standby mode: 10base-t receiver listens for link activity low set set clear receiver activity hw standby mode: lanled low low clear set clear n/a hw suspend mode low to high n/a set clear n/a CS8920A resets and goes through initialization high n/a n/a clear n/a not in any sleep mode low n/a clear set n/a sw suspend mode low n/a clear clear n/a not in any sleep mode note: both hw standby and hw suspend take precedence over sw suspend. table 3.8. low-power mode operation CS8920A ds238pp2 25
to enter hw standby mode, the sleep pin must be low and the hwsleepe bit (register 15, selfctl, bit 9) and the hwstandbye bit (regis- ter 15, selfctl, bit a) must be set. when the CS8920A enters hw standby, all registers and circuits are reset except for the selfctl register. upon exit from hw standby, the CS8920A per- forms a complete reset, and then goes through normal initialization. hardware suspend during hardware suspend mode, the CS8920A uses the least amount of current of the three low- power modes. all internal circuits are turned off and the CS8920As core is electronically isolated from the rest of the system. accesses from the isa bus and ethernet activity are both ignored. hw suspend mode is entered by driving the sleep pin low and setting the hwsleepe bit (register 15, selfctl, bit 9) while the hwstandbye bit (register 15, selfctl, bit a) is clear. to exit from this mode, the sleep pin must be driven high. upon exit, the CS8920A performs a complete reset, and then goes through a normal initialization procedure. software suspend software (sw) suspend mode can be used to conserve power in certain applications, such as adapter cards that do not have power manage- ment circuitry available. during software suspend mode there is a partial reset. all regis- ters and circuits are reset except for the plug and play state, csn, read data port, isa i/o base address register, and the selfctl register. to enter sw suspend mode, the host must set the swsuspend bit (register 15, selfctl, bit 8). to exit sw suspend, the host must write to the CS8920As assigned i/o space (the write is only used to wake the CS8920A, the write itself is ignored). upon exit, the CS8920A performs a complete reset, then goes through a normal in- itialization procedure. any hardware reset takes the chip out of any sleep mode. table 3.8 summarizes the operation of the three low-power modes. 3.9 led outputs the CS8920A provides four output pins that can be used to control leds or external logic. lanled: lanled goes low whenever the CS8920A transmits or receives a frame, or when it detects a collision. lanled remains low until there has been no activity for 6 ms (i.e. each transmission, reception, or collision produces a pulse lasting a minimum of 6 ms). hc0e (bit c) hcb0 (bit e) pin function 0 n/a pin configured as linkled: output is low when valid 10base-t link pulses are detected. output is high if valid link pulses are not detected. 1 0 pin configured as hc0: output is high 1 1 pin configured as hc0: output is low table 3.9. linkled/ hc0 pin operation hc1e (bit d) hcb1 (bit f) pin function 0 n/a pin configured as bstatus: output is low when a receive frame begins transfer across the isa bus. output is high otherwise. 1 0 pin configured as hc1: output is high 1 1 pin configured as hc1: output is low table 3.10. bstatus/ hc1 pin operation CS8920A 26 ds238pp2
linkled or hc0: linkled or hc0 can be controlled by either the CS8920A or the host. when controlled by the CS8920A, linkled is low whenever the CS8920A receives valid 10base-t link pulses. to configure this pin for CS8920A control, the hc0e bit (register 15, selfctl, bit c) must be clear. when controlled by the host, linkled is low whenever the hcb0 bit (register 15, selfctl, bit e) is set. to configure it for host control, the hc0e bit must be set. table 3.9 summarizes this operation. bstatus or hc1: bstatus or hc1 can be controlled by either the CS8920A or the host. when controlled by the CS8920A, bstatus is low whenever the host reads the rxevent regis- ter (packetpage base + 0124h), signaling the transfer of a receive frame across the isa bus. to configure this pin for CS8920A control, the hc1e bit (register 15, selfctl, bit d) must be clear. when controlled by the host, bstatus is low whenever the hcb1 bit (register 15, selfctl, bit f) is set. to configure it for host control, hc1e must be set. table 3.10 summa- rizes this operation. localled: localled goes low whenever local lan activity is occurring. local lan ac- tivity is defined as either the the receipt of ethernet frames that pass the address filter of the CS8920A, or the transmission of frames onto the ethernet. this led is intended to be used on the front panel of a pc in a manner analo- gous to a hard drive activity led. see section 5.3 for discussion of the receive address filter. led connection each led output is capable of sinking 10 ma to drive an led directly through a series resistor. the output voltage of each pin is less than 0.4 v when the pin is low. figure 3.4 shows a typical led circuit. 3.10 media access control overview the CS8920As ethernet media access control (mac) engine is fully compliant with the ieee 802.3 ethernet standard (iso/iec 8802-3, 1993). it handles all aspects of ethernet frame transmis- sion and reception, including: collision detection, preamble generation and detection, and crc generation and test. programmable mac fea- tures include automatic retransmission on collision, and padding of transmitted frames. figure 3.5 shows how the mac engine inter- faces to other CS8920A functions. on the host side, it interfaces to the CS8920As internal +5v lanled linkled localled figure 3.4. led connection diagram 802.3 mac engine encoder/ decoder & pll led logic CS8920A internal bus 10base-t & aui figure 3.5. mac interface CS8920A ds238pp2 27
data/address/control bus. on the network side, it interfaces to the internal manchester encoder/de- coder (endec). the primary functions of the mac are: frame encapsulation and decapsula- tion; error detection and handling; and, media access management. frame encapsulation and decapsulation the CS8920As mac engine automatically as- sembles transmit packets and disassembles receive packets. it also determines if transmit and receive frames are of legal minimum size. transmission: once the proper number of bytes have been transferred to the CS8920As memory (either 5, 381, 1021 bytes, or full frame), and providing that access to the network is permitted, the mac automatically transmits the 7-byte pre- amble (1010101b...), followed by the start-of-frame delimiter (sfd, 10101011b), and then the serialized frame data. it then transmits the frame check sequence (fcs). the data after the sfd and before the fcs (destination ad- dress, source address, length, and data field) is supplied by the host. fcs generation by the CS8920A may be disabled by setting the in- hibitcrc bit (register 9, txcmd, bit c). figure 3.6 shows the ethernet frame format. reception: the mac receives the incoming packet as a serial stream of nrz data from the manchester encoder/decoder. it begins by check- ing for the sfd. once the sfd is detected, the mac assumes all subsequent bits are frame data. it reads the da and compares it to the criteria programmed into the address filter (see section 5.3 for a description of address filtering). if the da passes the address filter, the frame is loaded into the CS8920As memory. if the buffercrc bit (register 3, rxcfg, bit b) is set, the re- ceived fcs is also loaded into memory. once the entire packet has been received, the mac validates the fcs. if an error is detected, the crcerror bit (register 4, rxevent, bit c) is set. enforcing minimum frame size: the mac provides minimum frame size enforcement of both transmit and receive packets. when the txpaddis bit (register 9, txcmd, bit d) is clear, transmit frames will be padded with addi- tional bits to ensure that the receiving station receives a legal frame (64 bytes, including crc). when txpaddis is set, the CS8920A will not add pad bits and will transmit frames less that 64 bytes. if a frame is received that is less than 64 bytes (including crc), the runt bit (register 4, rxevent, bit d) will be set indicat- ing the arrival of an illegal frame. 1 byte up to 7 bytes 6 bytes 6 bytes 2 bytes n bytes m bytes llc data pad fcs 4 bytes preamble frame length min 64 bytes max 1518 bytes alternating 1s / 0s sfd da sa the optional field, which is two bytes long, is either a type field for ethernet applications or a length field for ieee 802.3 applications. the pad field will be used only to get the frame to the minimum size. when the cs8920 adds pad bytes, the pad is the last byte of the llc data field repeated m times. direction of transmission frame packet optional field sfd = start of frame delimiter da = destination address sa = source address llc = logical link control fcs = frame check sequence (also called cyclic redundancy check, or crc) figure 3.6. ethernet frame format CS8920A 28 ds238pp2
transmit error detection and handling the mac engine monitors ethernet activity and reports and recovers from a number of error con- ditions. for transmission, the mac reports the following errors in the txevent register (register 8) and bufevent register (register c): loss of carrier: whenever the CS8920A is transmitting on the aui port, it expects to see its own transmission "looped back" to its receiver. if it is unable to monitor its transmission after the end of the preamble, the mac reports a loss-of- carrier error by setting the loss-of-crs bit (register 8, txevent, bit 6). if the loss-of- crsie bit (register 7, txcfg, bit 6) is set, the host will be interrupted. sqe error: after the end of transmission on the aui port, the mac expects to see a collision within 64 bit times. if no collision is detected, the sqeerror bit (register 8, txevent, bit 7) is set. if the sqeerrorie bit is set (register 7, txcfg, bit 7), the host is interrupted. an sqe error may indicate a fault on the aui cable or a faulty transceiver (it is assumed that the attached transceiver supports this function). out-of-window (late) collision: if a collision is detected after the first 512 bits have been trans- mitted, the mac reports a late collision by setting the out-of-window bit (register 8, txevent, bit 9). the mac then forces a bad crc and terminates the transmission. if the out- of-windowie bit (register 7, txcfg, bit 9) is set, the host is interrupted. a late collision may indicate an illegal network configuration. jabber error: if a transmission continues longer than about 26 ms, the mac disables the trans- mitter and sets the jabber bit (register 8, txevent, bit a). the output of the transmitter returns to idle and remains there until the host issues a new transmit command. if the jabberie bit (register 7, txcfg, bit a) is set, the host is interrupted. a jabber condition indicates that there may be something wrong with the CS8920A transmit function. to prevent possible network faults, the host should clear the transmit buffer. possible options include: reset the chip with either software or hardware reset (see section 3.3). issue a force transmit command by setting the force bit (register 9, txcmd, bit 8). issue a transmit command with the txlength field set to zero. transmit collision: the mac counts the num- ber of times an individual packet must be re-transmitted due to network collisions. the col- lision count is stored in bits b through e of the txevent register (register 8). if the packet col- lides 16 times, transmission of that packet is terminated and the 16coll bit (register 8, txevent, bit f) is set. if the 16collie bit (regis- ter 7, txcfg, bit f) is set, the host will be interrupted on the 16th collision. a running count of transmit collisions is recorded in the txcol register. transmit underrun: if the CS8920A starts transmission of a packet but runs out of data be- fore reaching the end of frame, the txunderrun bit (register c, bufevent, bit 9) is set. the mac then forces a bad crc and terminates the transmission. if the txunderrunie bit (register b, bufcfg, bit 9) is set, the host is interrupted. receive error detection and handling the following receive errors are reported in the rxevent register (register 4): crc error: if a frame is received with a bad crc, the crcerror bit (register 4, rxevent, bit c) is set. if the crcerrora bit (register 5, rxctl, bit c) is set, the frame will be buffered by the CS8920A. if the crcerrorie bit (register 3, rxcfg. bit c) is set, the host is interrupted. CS8920A ds238pp2 29
runt frame: if a frame is received that is shorter than 64 bytes, the runt bit (register 4, rxevent, bit d) is set. if the runta bit (register 5, rxctl, bit d) is set, the frame will still be buffered by CS8920A. if the runtie bit (regis- ter 3, rxcfg. bit d) is set, the host is interrupted. extra data: if a frame is received that is longer than 1518 bytes, the extradata bit (register 4, rxevent, bit e) is set. if the extradataa bit (register 5, rxctl, bit e) is set, the first 1518 bytes of the frame will still be buffered by CS8920A. if the extradataie bit (register 3, rxcfg. bit e) is set, the host is interrupted. dribble bits and alignment error: under nor- mal operating conditions, the mac may detect up to 7 additional bits after the last full byte of a receive packet. these bits, known as dribble bits, are ignored. if dribble bits are detected, the drib- blebit bit (register 4, rxevent, bit 7) is set. if both the dribblebit bit and crcerror bit (regis- ter 4, rxevent, bit c) are set at the same time, an alignment error has occurred. media access management the ethernet network topology is a single shared medium with several attached stations. the eth- ernet protocol is designed to allow each station equal access to the network at any given time. any node can attempt to gain access to the net- work by first completing a deferral process (described below) after the last network activity, and then transmitting a packet that will be re- ceived by all other stations. if two nodes transmit simultaneously, a collision occurs and the colliding packets are corrupted. two primary tasks of the mac are to avoid network colli- sions, and then recover from them when they occur. in addition, when the CS8920A is using the aui, the mac must support the sqe test function described in section 7.2.4.6 of the eth- ernet standard. collision avoidance: the mac continually monitors network traffic by checking for the presence of carrier activity (carrier activity is in- dicated by the assertion of the internal carrier sense signal generated by the endec). if car- rier activity is detected, the network is assumed busy and the mac must wait until the current packet is finished before attempting transmis- sion. the CS8920A supports two schemes for determining when to initiate transmission: two- part deferral, and simple deferral. selection of the deferral scheme is determined by the 2-part- transmit frame start monitoring network activity ipg timer = 6.4 m s? network active? network active? start ipg timer network active? yes no yes yes yes no no no no wait 3.2 m s yes tx frame ready and not in backoff? figure 3.7. two-part deferral CS8920A 30 ds238pp2
defdis bit (register 13, linectl, bit d). if the 2-partdefdis bit is clear, the mac uses a two- part deferral process defined in section 4.2.3.2.1 of the ethernet standard (iso/iec 8802-3, 1993). if the 2-partdefdis bit is set, the mac uses a simplified deferral scheme. both schemes are described below: two-part deferral: in the two-part deferral proc- ess, the 9.6 m s inter packet gap (ipg) timer is started whenever the internal carrier sense sig- nal is de-asserted. if activity is detected during the first 6.4 m s of the ipg timer, the timer is re- set and then restarted once the activity has stopped. if there is no activity during the first 6.4 m s of the ipg timer, the ipg timer is allowed to time out (even if network activity is detected during the final 3.2 m s). the mac then begins transmission if a transmit packet is ready and if it is not in backoff (backoff is described later in this section). if no transmit packet is pending, the mac continues to monitor the network. if activity is detected before a transmit frame is ready, the mac defers to the transmitting station and resumes monitoring the network. the two-part deferral scheme was developed to prevent the possibility of the ipg being short- ened due to a temporary loss of carrier. figure 3.7 diagrams the two-part deferral process. simple deferral: in the simple deferral scheme, the ipg timer is started whenever carrier sense is de-asserted. once the ipg timer is finished (after 9.6 m s), if a transmit frame is pending and if the mac is not in backoff, transmission be- gins (even if network activity is detected during the 9.6 m s ipg). if no transmit packet is pending, the mac continues to monitor the network. if activity is detected before a transmit frame is ready, the mac defers to the transmitting station and resumes monitoring the network. figure 3.8 diagrams the simple deferral process. collision resolution: if a collision is detected while the CS8920A is transmitting, the mac re- sponds in one of three ways depending on whether it is a normal collision (within the first 512 bits of transmission) or a late collision (after the first 512 bits of transmission): normal collisions: if a collision is detected be- fore the end of the preamble and sfd, the mac finishes the preamble and sfd, transmits the jam sequence (32-bit pattern of all 0s), and then in- itiates backoff. if a collision is detected after the transmission of the preamble and sfd but before 512 bit times, the mac immediately terminates transmission, transmits the jam sequence, and then initiates backoff. in either case, if the onecoll bit (register 9, txcmd, bit 9) is clear, the mac will attempt to transmit a packet a total of 16 times (the initial attempt plus 15 retrans- missions) due to normal collisions. on the 16th collision, it sets the 16coll bit (register 8, txevent, bit f) and discards the packet. if the t x f r a m e r e ad y a nd n o t i n ba ck o f f? transmit frame start monitoring network activity network active? network active? yes no yes no no yes wait 9.6 m s figure 3.8. simple deferral CS8920A ds238pp2 31
onecoll bit is set, the mac discards the packet without attempting any re-transmission. late collisions: if a collision is detected after the first 512 bits have been transmitted, the mac immediately terminates transmission, transmits the jam sequence, discards the packet, and sets the out-of-window bit (register 8, txevent, bit 9). the CS8920A does not initiate backoff or attempt to re-transmit the frame. for additional information about late collisions, see out-of-window error in this section. backoff: after the mac has completed transmit- ting the jam sequence, it must wait, or "back off", before attempting to transmit again. the amount of time it must wait is determined by one of two backoff algorithms: the standard backoff algorithm (iso/iec 4.2.3.2.5) or the modified backoff algorithm. the host selects which algorithm through the modbackoffe bit (register 13, linectl, bit b). standard backoff: the standard backoff algo- rithm, also called the "truncated binary exponential backoff", is described by the equa- tion: 0 r 2 k where r (a random integer) is the number of slot times the mac must wait (1 slot time = 512 bit times), and k is the smaller of n or 10, where n is the number of re-transmission attempts. modified backoff: the modified backoff is de- scribed by the equation: 0 r 2 k where r (a random integer) is the number of slot times the mac must wait, and k is 3 for n <3 and k is the smaller of n or 10 for n >3, where n is the number of re-transmission attempts. the advantage of the modified backoff algo- rithm over the standard backoff algorithm is that it reduces the possibility of multiple collisions on the first three re-tries. the disadvantage is that it extends the maximum time needed to gain access to the network for the first three re-tries. the host may choose to disable the backoff al- gorithm altogether by setting the disablebackoff bit (register 19, testctl, bit b). when dis- abled, the CS8920A only waits the 9.6 m s ipg time before starting transmission. encoder carrier detector decoder & pll rx mux tx mux rxsql auisql rx tx auirx auitx auicol clock carrier sense rx clk rx nrz txclk tx nrz ten port select collision mac endec 10base-t transceiver aui figure 3.9. endec CS8920A 32 ds238pp2
sqe test: if the CS8920A is transmitting on the aui, the external transceiver should generate an sqe test signal on the ci+/ci- pair following each transmission. the sqe test is a 10 mhz signal lasting 5 to 15 bit times and starting within 0.6 to 1.6 m s after the end of transmis- sion. during this period, the CS8920A ignores receive carrier activity (see sqe error in this section for more information). 3.11 encoder/decoder (endec) the CS8920As integrated encoder/decoder (en- dec) circuit is compliant with the relevant portions of section 7 of the ethernet standard (iso/iec 8802-3, 1993). its primary functions include: manchester encoding of transmit data; informing the mac when valid receive data is present (carrier detection); and, recovering the clock and nrz data from incoming manchester- encoded data. figure 3.9 provides a block diagram of the en- dec and how it interfaces to the mac, aui and 10base-t transceiver. encoder the encoder converts nrz data from the mac and a 20 mhz transmit clock signal into a se- rial stream of manchester data. the transmit clock is produced by an on-chip oscillator cir- cuit that is driven by either an external 20 mhz quartz crystal or a ttl-level cmos clock input. if a cmos input is used, the clock should be 20 mhz 0.01% with a duty cycle between 40% and 60%. the specifications for the crystal are described in section 13.0 (quartz crystal re- quirements). the encoded signal is routed to either the 10base-t transceiver or aui, de- pending on configuration. carrier detection the internal carrier detection circuit informs the mac that valid receive data is present by assert- ing the internal carrier sense signal as soon it detects a valid bit pattern (1010b or 0101b for 10base-t, and 1b or 0b for aui). during nor- mal packet reception, carrier sense remains asserted while the frame is being received, and is de-asserted 1.3 to 2.3 bit times after the last low- to-high transition of the end-of-frame (eof) sequence. whenever the receiver is idle (no re- ceive activity), carrier sense is de-asserted. the crs bit (register 14, linest, bit e) reports the state of the carrier sense signal. clock and data recovery when the receiver is idle, the phase-lock loop (pll) is locked to the internal clock signal. the assertion of the carrier sense signal interrupts the pll. when it restarts, it locks on the incom- ing data. the receive clock is then compared to the incoming data at the bit cell center and any phase difference is corrected. the pll remains locked as long as the receiver input signal is valid. once the pll has locked on the incoming data, the endec converts the manchester data to nrz and passes the decoded data and the re- covered clock to the mac for further processing. interface selection physical interface selection is determined by the auionly bit (bit 8) and the autoaui/10bt bit (bit 9) in the linectl register (register 13). table 3.11 describes the possible configurations. auionly (bit 8) autoaui/10bt (bit 9) physical interface 0010base-t only 1 n/a aui only 01auto-select table 3.11. interface selection CS8920A ds238pp2 33
10base-t only: when configured for 10base- t-only operation, the 10base-t transceiver and its interface to the endec are active, and the aui is powered down. aui only: when configured for aui-only opera- tion, the aui and its interface to the endec are active, and the 10base-t transceiver is powered down. auto-select: in auto-select mode, the CS8920A automatically selects the 10base-t interface and powers down the aui if valid packets or link pulses are detected by the 10base-t receiver. if valid packets and link pulses are not detected, the CS8920A selects the aui. whenever the aui is selected, the 10base-t receiver remains ac- tive to listen for link pulses or packets. if 10base-t activity is detected, the CS8920A switches back to 10base-t. 3.12 10base-t transceiver the CS8920A includes an integrated 10base-t transceiver that is compliant with the relevant portions of section 14 of the ethernet standard (iso/iec 8802-3, 1993). it includes all analog and digital circuitry needed to interface the CS8920A directly to a simple isolation trans- former (see section 11.0 for a connection diagram). figure 3.10 provides a block diagram of the 10base-t transceiver. 10base-t filters the CS8920As 10base-t transceiver includes integrated low-pass transmit and receive filters, eliminating the need for external filters or a fil- ter/transformer hybrid. on-chip filters are gm/c implementations of fifth-order butterworth low- pass filters. internal tuning circuits keep the gm/c ratio tightly controlled, even when large temperature, supply, and ic process variations rxsql rx tx link pulse detector tx pre- distortion rx squelch rx comparator tx filters filter tuning rx filters tx drivers rxd- rxd+ txd- txd+ endec linkok (to mac) 10base-t transceiver figure 3.10. 10base-t transceiver CS8920A 34 ds238pp2
occur. the nominal 3 db cutoff frequency of the filters is 16 mhz, and the nominal attenuation at 30 mhz (3rd harmonic) is -27 db. transmitter when configured for 10base-t operation, man- chester encoded data from the endec is fed into the transmitters pre-distortion circuit where initial wave shaping and pre-equalization is per- formed. the output of the pre-distortion circuit is fed into the transmit filter where final wave shaping occurs and unwanted noise is removed. the signal then passes to the differential driver where it is amplified and driven out of the txd+/txd- pins. in the absence of transmit packets, the transmit- ter generates link pulses in accordance with section 14.2.1.1 of the ethernet standard. trans- mitted link pulses are positive pulses, one bit time wide, typically generated at a rate of one every 16 ms. the 16 ms timer starts whenever the transmitter completes an end-of-frame (eof) sequence. thus, there is a link pulse 16 ms after an eof unless there is another transmit- ted packet. figure 3.11 diagrams the operation of the link pulse generator. if no link pulses are being received on the re- ceiver, the 10base-t transmitter is internally forced to an inactive state unless bit disablelt in register 19 (test control register) is set to one. receiver the 10base-t receive section consists of the receive filter, squelch circuit, polarity detection and correction circuit, and link pulse detector. squelch circuit: the 10base-t squelch circuit determines when valid data is present on the rxd+/rxd- pair. incoming signals passing through the receive filter are tested by the squelch circuit. any signal with amplitude less than the squelch threshold (either positive or negative, depending on polarity) is rejected. extended range: the CS8920A supports an ex- tended range feature that reduces the 10base-t receive squelch threshold by approximately 6 db. this allows the CS8920A to operate with 10base-t cables that are longer than 100 me- ters (100 meters is the maximum length specified by the ethernet standard). the exact additional distance depends on the quality of the cable and the amount of electro-magnetic noise in the sur- rounding environment. to activate this feature, the host must set the lorxsquelch bit (register 13, linectl, bit e). auto-negotiation the CS8920A supports auto-negotiation, the mechanism that allows the two devices on either end of a 10base-t link segment to share infor- mation and automatically configure both devices for maximum performance. when configured for auto-negotiation, the CS8920A will detect and automatically operate full-duplex, if the device on the other end of the link segment also sup- ports full-duplex and auto-negotiation. the CS8920A auto-negotiation capability is fully compliant with the relevant portions of section 28 of the ieee 802.3u standard. auto-negotiation encapsulates information within a burst of closely spaced link integrity test pulses, referred to as a fast link pulse (flp) burst. the flp burst consists of a series of link integrity pulses which form an alternating clock / data sequence. extraction of the data bits from the flp burst yields a link code word which identifies the capability of the remote de- vice. to remain interoperable with existing 10base-t devices, the CS8920A also supports the reception of 10base-t compliant link integ- rity test pulses, refered to as normal link pulses (nlp). devices that respond to the CS8920A with a normal link pulse, cause the CS8920A to operate as a 10base-t half-duplex device. CS8920A ds238pp2 35
prior to enabling auto-negotiation, the al- lowfdx bit (register 1d, autonegctl, bit 7) should be set if full-duplex operation is to be al- lowed and reset otherwise. if this bit is reset, only half-duplex operation will be negotiated. to enable auto-negotiation the host should set the autonegenable bit (register 1d, autonegctl, bit 8) and reset the nlpenable bit (register 1d, autonegctl, bit 9) and the forcefdx bit (register 1d, autonegctl, bit f). re-negotiation can be forced to occur by setting the renow bit (register 1d, autonegctl, bit 6). typically, this is done after a change in the settings of the auto-negotiation bits, in order to cause the new settings to be acted upon. the nlpenable bit (register 1d, autonegctl, bit 9) overrides the auto-negotiation settings and causes normal link pulses to be transmitted by the CS8920A. auto-negotiation is disabled. the following section describes the operation of the CS8920A in nlp mode. link pulse detection to prevent disruption of network operation due to a faulty link segment, the CS8920A continu- ally monitors the 10base-t receive pair (rxd+/ rxd-) for packets and link pulses. af- ter each packet or link pulse is received, an internal link-loss timer is started. as long as a packet or link pulse is received before the link- loss timer finishes (between 25 and 150 ms), the CS8920A maintains normal operation. if no receive activity is detected, the CS8920A dis- ables packet transmission to prevent "blind" transmissions onto the network (link pulses are still sent while packet transmission is disabled). to reactivate transmission, the receiver must de- tect a single packet (the packet itself is ignored), or two link pulses separated by more than 2 to 7 ms and no more than 25 to 150 ms (see section 10.0 for 10base-t timing). the state of the link segment is reported in the linkok bit (register 14, linest, bit 7). if the hc0e bit (register 15, selfctl, bit c) is clear, it is also indicated by the output of the linkled pin. if the link is "good", the linkok bit is set and the linkled pin is driven low. if the link is "bad" the linkok bit is clear and the linkled pin is high. to disable this feature, the host must set the disablelt bit (register 19, testctl, bit 7). if disablelt is set, the CS8920A will transmit and receive packets inde- pendent of the link segment. receive polarity detection and correction the CS8920A automatically checks the polarity of the receive half of the twisted pair cable. if the polarity is correct, the polarityok bit (regis- ter 14, linest, bit c) is set. if the polarity is reversed, the polarityok bit is clear. if the polar- itydis bit (register 13, linectl, bit c) is clear, packet less than 16 ms 16 ms 16 ms link pulse link pulse time packet figure 3.11. link pulse transmission CS8920A 36 ds238pp2
the CS8920A automatically corrects a reversal. if the polaritydis bit is set, the CS8920A does not correct a reversal. the polarityok bit and the polaritydis bit are independent. to detect a reversed pair, the receiver examines received link pulses and the end-of-frame (eof) sequence of incoming packets. if it de- tects at least one reversed link pulse and at least four frames in a row with negative polarity after the eof, the receive pair is considered reversed. any data received before the correction of the reversal is ignored. collision detection if half-duplex operation is selected (register 1d, bit e, forcefdx), the CS8920A detects a 10base-t collision whenever the receiver and transmitter are active simultaneously. when a collision is present, the collision detection cir- cuit informs the mac by asserting the internal collision signal (see section 3.11 for collision handling). 3.13 attachment unit interface (aui) the CS8920A attachment unit interface (aui) provides a direct interface to external 10base2, 10base5, and 10base-fl ethernet transceiv- ers. it is fully compliant with section 7 of the ethernet standard (iso/iec 8802-3), and as such, is capable of driving a full 50-meter aui cable. the aui consists of three pairs of signals: data out (do+/do-), data in (di+/di-), and colli- sion in (ci+/ci-). to select the aui, the host should set the aui bit (register 13, linectl, bit 8). the aui can also be selected automat- ically as described in the previous section. figure 3.12 provides a block diagram of the aui. (for a connection diagram, see section 12.0). aui transmitter the aui transmitter is a differential driver de- signed to drive a 78 ohm cable. it accepts data from the endec and transmits it directly on the do+/do- pins. after transmission has started, the CS8920A expects to see the packet "looped- back" (or echoed) to the receiver, causing the carrier sense signal to be asserted. this carrier sense presence indicates that the transmit signal is getting through to the transceiver. if the car- rier sense signal remains de-asserted throughout the transmission, or if the carrier sense signal is de-asserted before the end of the transmission, there is a loss-of-carrier error and the loss-of- crs bit (register 8, txevent, bit 6) is set. aui receiver the aui receiver is a differential pair circuit that connects directly to the di+/di- pins. it is de- signed to distinguish between transient noise pulses and incoming ethernet packets. incoming packets with proper amplitude and pulse width are passed on to the endec section, while un- wanted noise is rejected. collision detection the aui collision circuit is a differential pair re- ceiver that detects the presence of collision signals on the ci+/ci- pins. the collision signal is generated by an external ethernet transceiver whenever a collision is detected on the ethernet di+ di- do+ do- endec ci+ ci- collision detect auicol (to mac) auirx auisql auitx aui - + - + figure 3.12. aui CS8920A ds238pp2 37
segment. (section 7.3.1.2 of iso/iec 8802-3, 1993, defines the collision signal as a 10 mhz +/- 15% signal with a duty cycle no worse than 60/40). when a collision is present, the aui col- lision circuit informs the mac by asserting the internal collision signal. 3.14 external clock oscillator a 20 mhz quartz crystal or cmos clock input is required by the CS8920A. if a cmos clock input is used, it should be connected the to xtal1 pin, with the xtal2 pin left open. the clock signal should be 20 mhz 0.01% with a duty cycle between 40% and 60%. the specifi- cations for the crystal are described in section 13.0 (quartz crystal requirements). CS8920A 38 ds238pp2
4.0 packetpage architecture 4.1 packetpage overview the CS8920A architecture is based on a unique, highly-efficient method of accessing internal reg- isters and buffer memory known as packetpage. packetpage provides a unified way of controlling the CS8920A in memory or i/o space that mini- mizes cpu overhead and simplifies software. it provides a flexible set of performance features and configuration options, allowing designers to develop ethernet circuits that meet their particu- lar system requirements. integrated memory central to the CS8920A architecture is a 4-kbyte page of integrated ram known as packetpage memory. packetpage memory is used for tempo- rary storage of transmit and receive frames, and for internal registers. access to this memory is done directly, through memory space operations (section 4.11), or indirectly, though i/o space operations (section 4.12). in most cases, mem- ory mode will provide the best overall performance, because isa memory operations require fewer cycles than i/o operations. i/o mode is the CS8920As default configuration and is used when memory space is not available or when special operations are required (e.g. wak- ing the CS8920A from the software sleep state requires the host to write to the CS8920As as- signed i/o space). the user-accessible portion of packetpage mem- ory is organized into the following sections: bus interface registers the bus interface registers are used to configure the CS8920As isa-bus interface and to map the CS8920A into the host systems i/o and mem- ory space. most of these registers are written only during initialization, remaining unchanged while the CS8920A is in normal operating mode. the exceptions to this are the dma registers which are modified continually whenever the CS8920A is using dma. these registers are de- scribed in more detail in section 4.3. status and control registers the status and control registers are the primary means of controlling and getting status of the CS8920A. they are described in more detail in section 4.4. initiate transmit registers the txcmd/txlength registers are used to initi- ate ethernet frame transmission. these registers are described in more detail in section 4.6. (see section 5.8 for a description of frame transmis- sion.) address filter registers the filter registers store the individual address filter and logical address filter used by the des- tination address (da) filter. these registers are described in more detail in section 4.7. for a de- scription of the da filter, see section 5.3. plug and play registers plug and play registers hold resources assigned by a plug and play configuration manager. these resources include io and memory base address, interrupt number and dma channel. see section 4.8. packetpage address contents 0000h - 0048h product/bus specific registers 0100h - 013fh status and normal control registers 0120h interrupt status queue 0140h - 015dh ethernet, or line, related registers 0330h - 03ffh plug and play registers 0400h - 09ffh current receive frame virtual map 0a00h - 0fffh current transmit frame virtual map CS8920A ds238pp2 39
receive and transmit frame locations the receive and transmit frame packetpage lo- cations are used to transfer ethernet frames to and from the host. the host simply writes to and reads from these locations, and internal buffer memory is dynamically allocated between trans- mit and receive as needed. this provides more efficient use of buffer memory and better overall network performance. as a result of this dynamic allocation, only one receive frame (starting at packetpage base + 0400h) and one transmit frame (starting at packetpage base + 0a00h) are directly accessible. see section 4.9. 4.2 packetpage memory map table 4.1 shows the CS8920A packetpage mem- ory address map: table 4.1 is continued on the next page. base + # of bytes type description cross reference bus interface registers 0000h 4 read-only 32-bit product identification code section 4.3 0004h 34 reserved note 2 0026h 2 read-only isa rxdma start of frame 16-bit offset to status sections 4.3, 4.12 0028h 2 read-only isa rxdma 12-bit frame count sections 4.3 002ah 2 read-only isa rxdma byte count 16 bit sections 4.3 002ch 20 reserved. do not write to this space. note 2 0040h 2 read/write eeprom command register sections 3.6, 4.3 0042h 2 read/write eeprom data word sections 3.6, 4.3 0044h 4 reserved. do not write to this space. note 2 0048h 2 read link partner ability in auto negotiation note 2 004ah 6 read/write reserved. do not write to this space. sections 3.6, 4.3 0050h 2 read-only receive frame byte counter sections 4.3, 5.2.9 0052h 174 reserved note 2 status and control registers 0100h 32 CS8920A config/control registers (two bytes per coded value) section 4.4, 4.5 0120h 32 CS8920A status/event registers, isq is 0120h section 4.4, 4.5 0140h 2 read-only reserved. do not use. note 2 0142h 2 reserved. do not write to this space. note 2 notes: 1) all registers are accessed as words only. 2) read operation from the reserved location provides undefined data. writing to a reserved location or undefined bits may result in unpredictable operation of the CS8920A. table 4.1. packetpage memory address map CS8920A 40 ds238pp2
base + # of bytes type description cross reference initiate transmit registers 0144h 2 read/write txcmd. command request. the value written here is shown in registert 9. sections 4.6, 5.8 0146h 2 read/write txlength. command length request in bytes. sections 4.6, 5.8 0148h 8 reserved note 2 address filter registers 0150h 8 read/write logical address filter (hash table) sections 4.7, 5.3 0158h 6 read/write individual address, ia sections 4.7, 5.3 015e 674 reserved. do not write in this space. note 2 frame location 0330h 1 read/write pnp activation register sections 4.8 0331h 1 read/write pnp io range check register sections 4.8 0340h 1 read/write boot prom base address, high byte sections 4.8 0341h 1 read/write boot prom base address, low byte sections 4.8 0343h 1 read/write boot prom address mask, high byte a(23:16) sections 4.8 0344h 1 read/write boot prom address mask, low byte a(15:8) sections 4.8 0348h 1 read/write memory base address, high byte sections 4.8 0349h 1 read/write memory base address, low byte sections 4.8 0360h 1 read/write io base address, high byte sections 4.8 0361h 1 read/write io base address, low byte sections 4.8 0370h 1 read/write interrupt request channel select 0 sections 4.8 0371h 1 read only interrupt request type select 0 sections 4.8 0374h 1 read/write dma channel select sections 4.8 0400h 2 read only receive status sections 4.9, 5.8 0402h 2 read only receive length sections 4.9, 5.8 0404h aliased rxframe sections 4.9, 5.8 0a00h aliased txframe sections 4.9, 5.8 notes: 1. all registers are accessed as words only. 2. read operation from the reserved location provides undefined data. writing to a reserved location or undefined bits may result in unpredictable operation of the CS8920A. table 4.1. packetpage memory address map, continued CS8920A ds238pp2 41
4.3 bus interface registers bus interface register: product identification code (read only) address: packetpage base + 0000h address 0000h address 0001h address 0002h address 0003h first byte of eisa registration number for crystal semiconductor second byte of eisa registration number for crystal semiconductor first 8 bits of product id number last 3 bits of the product id number (5 "x" bits are the revision number) the product identification code register is located in the first four bytes of the packetpage (0000h to 0003h). the register contains a unique 32-bit product id code that identifies the chip as belonging to the cs8920/CS8920A family. the host can use this number to determine which software driver to load and to check which features are available. this registers initial state after reset is: 0000 1110 0110 0011 0000 0000 011x xxxx the x xxxx codes revision numbers are: cs8920 revision b has code 0 0001. cs8920 revision c has code 0 0010. cs8920 revision d has code 0 0011. CS8920A revisions a&b have code 0 0100. CS8920A revision c has code 0 0101. CS8920A 42 ds238pp2
bus interface register: dma start-of-frame (read only) address: packetpage base + 0026h address 0027h address 0026h most-significant byte of offset value least-significant byte of offset value the dma start-of-frame register contains a 16-bit value which defines the offset from the dma base address to the start of the most recently transferred received frame. see section 5.5. this registers initial state after reset is: 0000 0000 0000 0000 bus interface register: dma frame count (read only) address: packetpage base + 0028h address 0029h address 0028h most-significant byte of frame count (most-significant nibble always 0h) least-significant byte of frame count the lower 12 bits of the dma frame count register define the number of valid frames transferred via dma since the last readout of this register. the upper 4 bits are reserved. see section 5.5. this registers initial state after reset is: xxxx 0000 0000 0000 bus interface register: rxdma byte count (read only) address: packetpage base + 002ah address 002bh address 002ah most-significant byte of byte count. least-significant byte of byte count. the rxdma byte count register describes the valid number of bytes dmaed since the last readout. see section 5.5. this registers initial state after reset is: 0000 0000 0000 0000 CS8920A ds238pp2 43
bus interface register: eeprom command (read/write) address: packetpage base + 0040h f-a 9 8 7-0 reserved ob1 ob0 add7 to add0 this register is used to control the reading, writing, and erasing of the eeprom. see section 3.6. bit name description 7-0 add7- add0 address of the eeprom word being accessed. 9-8 ob1,ob0 indicates the opcode of the command being executed. see table 3.7. f-a reserved reserved and must be written as 0. this registers initial state after reset is: xxxx xxxx xxxx xxxx bus interface register: eeprom data (read/write) address: packetpage base + 0042h address 0043h address 0042h most-significant byte of eeprom data. least-significant byte of the eeprom data. this register contains the word being written to, or read from, the eeprom. see section 3.6. this registers initial state after reset is: xxxx xxxx xxxx xxxx bus interface register: receive frame byte counter (read only) address: packetpage base + 0050h address 0051h address 0050h most-significant byte of byte count. least-significant byte of the byte count. this register contains the count of the total number of bytes received in the the current received frame. this count continuously increments as more bytes in this frame are received. see section 5.2.9. this registers initial state after reset is: xxxx xxxx xxxx xxxx CS8920A 44 ds238pp2
4.4 status and control registers the status and control registers are the primary registers used to control and check the status of the CS8920A. they are organized into two groups: configuration/control registers and status/event registers. all status and control registers are 16-bit words as shown in figure 4.1. bit 0 indicates whether it is a configura- tion/control register (bit 0 = 1) or a status/event register (bit 0 = 0). bits 0 through 5 provide an internal address code that describes the exact function of the register. bits 6 through f are the actual configuration/control and status/event bits. configuration and control registers configuration and control registers are used to set up the following: how frames will be transmitted and received; which frames will be transmitted and re- ceived; which events will cause interrupts to the host processor; and, how the ethernet physical interface will be configured. these registers are read/write and are designated by odd numbers (e.g. register 1, register 3, etc.). the transmit command register (txcmd) is a special type of register. it appears in two separate locations in the packetpage memory map. the first location, packetpage base + 0108h, is within the configuration/control register block and is read-only. the second location, packetpage base + 0144h, is where the actual transmit commands are issued and is write-only. see section 4.4 (register 9) and section 5.8 for a more detailed description of the txcmd register. status and event registers status and event registers report the status of transmitted and received frames, as well as infor- mation about the configuration of the CS8920A. they are read-only and are designated by even numbers (e.g. register 2, register 4, etc.). the interrupt status queue (isq) is a special type of status/event register. it is located at packetpage base + 0120h and is the first register the host reads when responding to an interrupt. a more detailed description of the isq can be found in section 5.1. 10 3 2 54 76 10 register bits 1 = control/configuration 0 = status/event internal address (bits 0 - 5) 16-bit register word bit number 98 b a dc f e figure 4.1. status and control register format CS8920A ds238pp2 45
three 10-bit counters are included with the status and event registers. rxmiss counts missed receive frames, txcol counts transmit collisions, and tdr is a time domain reflectome- ter useful in locating cable faults. the following sections contain more information about these counters. table 4.2 provides a summary of packetpage register types. 4.4.1 status and control bit definitions this section provides a description of the special bit types used in the status and control registers. section 4.4 provides a detailed description of the bits in each register. act-once bits there are four bits that cause the CS8920A to take a certain action only once when set. these act-once bits are: skip_1 (register 3, rxcfg, bit 6), reset (register 15, selfctl, bit 6), resetrxdma (register 17, busctl, bit 6), and swint-x (register b, bufcfg, bit 6). to cause the action again, the host must set the bit again. act-once bits are always read as clear. temporal bits temporal bits are bits that are set and cleared by the CS8920A without intervention by the host processor. this includes all status bits in the four status registers (register 14, linest; register 16, selfst; register 18, busst; and register 1e, autonegst), the rxdest bit (register c, bufevent, bit f), and the rx128 bit (register c, bufevent, bit b). like all event bits, rxdest and rx128 are cleared when read by the host. interrupt enable bits and events interrupt enable bits end with the suffix ie and are located in three configuration registers: rxcfg (register 3), txcfg (register 7), and bufcfg (register b). each interrupt enable bit corresponds to a specific event. if an interrupt enable bit is set and its corresponding event oc- curs, the CS8920A generates an interrupt to the host processor. the bits that report when various events occur are located in three event registers and two suffix type description comments cmd read/write command: written once per frame to initiate transmit. cfg read/write configuration: written at setup and used to determine what frames will be transmitted and received and what events will cause interrupts. ctl read/write control: written at setup and used to determine what frames will be transmitted and received and how the physical interface will be configured. event read-only event: reports the status of transmitted and received frames. cleared when read st read-only status: reports information about the configuration of the CS8920A. read-only counters: counts missed receive frames and collisions. provides time domain reflectometer for locating coax cable faults. cleared when read table 4.2. packetpage register types CS8920A 46 ds238pp2
counters. the event registers are rxevent (reg- ister 4), txevent (register 8), and bufevent (register c). the counters are rxmiss (register 10) and txcol (register 12). each interrupt enable bit and its associated event are identified in table 4.3. an event bit is set whenever the specified event happens, whether or not the associated interrupt enable bit is set. all event registers are cleared upon readout by the host. accept bits there are nine accept bits located in the rxctl register (register 5), each of which is followed by the suffix a. accept bits indicate which types of frames will be accepted by the CS8920A. (a frame is said to be "accepted" by the CS8920A when the frame data are placed in either on-chip memory, or in host memory by dma.) four of these bits have corresponding interrupt enable (ie) bits. an accept bit and an interrupt enable bit are independent operations. it is possible to set either, neither, or both bits. the four corre- sponding pairs of bits are: ie bit in rxcfg a bit in rxctl extradataie extradataa runtie runta crcerrorie crcerrora rxokie rxoka if one of the above interrupt enable bits is set and the corresponding accept bit is clear, the CS8920A generates an interrupt when the associ- ated receive event occurs, but then does not accept the receive frame (the length of the re- ceive frame is set to zero). the other five accept bits in rxctl are used for destination address filtering (see section 5.3). the accept mechanism is explained in more de- tail in section 5.2. 4.4.2 status and control register summary the figure on the following page (figure 4.2) provides a summary of the status and control registers. section 4.4.2 gives a detailed descrip- tion of each status and control register. interrupt enable bit (register name) event bit or counter (register name) extradataie (rxcfg) extradata (rxevent) runtie (rxcfg) runt (rxevent) crcerrorie (rxcfg) crcerror (rxevent) rxokie (rxcfg) rxok (rxevent) 16collie (txcfg) 16coll (txevent) anycollie (txcfg) "number-of-tx-collisions" counter is incremented (txevent) jabberie (txcfg) jabber (txevent) out-of-windowie (txcfg) out-of-window (txevent) txokie (txcfg) txok (txevent) sqeerrorie (txcfg) sqeerror (txevent) loss-of-crsie (txcfg) loss-of-crs (txevent) missovfloie (bufcfg) rxmiss counter overflows past 1ffh txcolovfloie (bufcfg) txcol counter overflows past 1ffh rxdestie (bufcfg) rxdest (bufevent) rx128ie (bufcfg) rx128 (bufevent) rxmissie (bufcfg) rxmiss (bufevent) txunderrunie (bufcfg) txunderrun (bufevent) rdy4txie (bufcfg) rdy4tx (bufevent) rxdmaie (bufcfg) rxdmaframe (bufevent) table 4.3. interrupt enable bits and events CS8920A ds238pp2 47
control and configuration bits register fedcba9 8 7 6number (offset) name reserved (register contents undefined) 1 extra dataie runtie crc errorie buffer crc autorx dmae rxdma only rxokie streame skip_1 3 (0102h) rxcfg extra dataa runta crc errora broad casta individ uala multi casta rxoka promis cuousa iahasha 5 (0104h) rxctl 16collie anycollie jabberie out-of- windowie txokie sqeerror ie loss-of- crsie 7 (0106h) txcfg txpaddis inhibit crc onecoll force txstart 9 (0108h) txcmd rxdestie miss ovfloie txcol ovfloie rx128ie rxmissie txunder runie rdy4txie rxdmaie swint-x b (010ah) bufcfg timer enable mode rx48/64ie rx64 rx48/64irq timer irq d (010ch) advint ctl/st not applicable and reserved f not applicable and reserved 11 wakeen lorx squelch 2-part defdis polarity dis mod backoffe route wakeup auto aui/10bt auionly sertxon serrxon 13 (0112h) linectl hcb1 hcb0 hc1e hc0e hw standbye hw sleepe sw suspend reset 15 (0114h) selfctl enable irq rxdma size ioch rdye dma burst memorye usesa reset rxdma 17 (0116) busctl disable backoff auiloop endec loop disable lt 19 (0118) te s t c t l not applicable and reserved 1b force fdx nlp enable auto neg. enable allow fdx renow 1d (011ch) autoneg ctl not applicable and reserved 1f figure 4.2. status and control register summary CS8920A 48 ds238pp2
status and event bits register fedcba9 8 7 6number (offset) name reserved (register contents undefined) 2 event register for the event that caused an interrupt 0120h isq ewake event extra data runt crc error broad cast individual adr hashed rxok dribble bits iahash 4 (0124h) rxevent hash table index (alternate rxevent meaning if hashed = 1 and rxok =1) hashed rxok dribble bits iahash 4 (0124h) rxevent alternate reserved (register contents undefined) 6 16coll number of tx collisions jabber out-of- window txok sqe error loss-of- crs 8 (0128h) txevent reserved (register contents undefined) a rxdest rx128 rxmiss txunder run rdy4tx rxdma frame swintx c (012ch) bufevent reserved (register contents undefined) e 10-bit receive miss (rxmiss) counter, cleared when read 10 (0130h) rxmiss 10-bit transmit collision (txcol) counter, cleared when read 12 (0132h) txcol crs polarity ok 10bt aui linkok 14 (0134h) linest eesize eeprom ok eeprom present sibusy initd pnp disable 16 (0136h) selfst rdy4tx now txbid err 18 (0138h) busst reserved (register contents undefined) 1a 10-bit aui time domain reflectometer (tdr) counter, cleared when read 1c (013ch) tdr fdx active hdx active link fault flp link good flp link auto neg busy 1e (013eh) autoneg st figure 4.2. status and control register summary CS8920A ds238pp2 49
4.5 status and control register detailed description register 0: interrupt status queue (isq, read-only) address: packetpage base + 0120h f-6 5-0 regcontent regnum the interrupt status queue register is used in both memory mode and i/o mode to provide the host with interrupt information. whenever an event occurs that triggers an enabled interrupt, the CS8920A sets the appro- priate bit(s) in one of five registers, maps the contents of that register to the isq register, and drives an irq pin high. three of the registers mapped to isq are event registers: rxevent (register 4), txevent (register 8), and busevent (register c). the other two registers are counter-overflow reports: rxmiss (register 10) and txcol (register 12). in memory mode, isq is located at packetpage base + 120h. in i/o mode, isq is located at i/o base + 0008h. see section 5.1. a read of isq 0000 indicates that there are no pending interrupts. bit name description 5-0 regnum the lower six bits describe which register (4, 8, c, 10 or 12) is contained in the isq. 6 regcontent the upper ten bits contain the register data contents. this registers initial state after reset is: 0000 0000 0000 0000 CS8920A 50 ds238pp2
register 3: receiver configuration (rxcfg, read/write) address: packetpage base + 0102h fedcba98765-0 extra dataie runtie crc errorie buffer crc autorx dmae rxdma only rxokie streame skip_1 000011 rxcfg determines how frames will be transferred to the host and what frame types will cause interrupts. bit name description 5-0 000011 these bits provide an internal address used by the CS8920A to identify this as the receiver configuration register. 6 skip_1 when set, this bit causes the last committed received frame to be deleted from the receive buffer. to skip another frame, the host must rewrite a 1 to this bit. this bit is not to be used if rxdmaonly (bit 9) is set. skip_1 is an act-once bit. see section 5.2.5 7 streame when set, streamtransfer mode is used to transfer receive frames that are back-to- back and that pass the destination address filter (see section 5.3). when streame is clear, streamtransfer mode is not used. this bit must not be set unless either bit autorxdma or bit rxdma-only is set. when streamtransfer mode is used rx128ie (bit b) & rxdestie (bit f) in the buffer configuration register (register b) must be clear. 8 rxokie when set, there is an rxok interrupt if a frame is received without errors. 9 rxdmaonly when set, the receive-dma mode is used for all receive frames. a autorxdmae when set, the CS8920A will automatically switch to receive-dma mode if the conditions specified in section 5.6 are met. rxdmaonly (bit 9) has precedence over autorxdmae. b buffercrc when set, the received crc is included with the data stored in the receive-frame buffer, and the four crc bytes are included in the receive-frame length (packetpage base + 0402h). when clear, neither the receive buffer nor the receive length include the crc. c crcerrorie when set, there is a crcerror interrupt if a frame is received with a bad crc. d runtie when set, there is a runt interrupt if a frame is received that is shorter than 64 bytes. the CS8920A always discards any frame that is shorter than 8 bytes. e extradataie when set, there is an extradata interrupt if a frame is received that is longer than 1518 bytes. the operation of this bit is independent of the received packet integrity (good or bad crc). after reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0000 0011 CS8920A ds238pp2 51
register 4: receiver event (rxevent, read-only) address: packetpage base + 0124h fedcba98765-0 ewake event extradata runt crcerror broad cast individual adr hashed rxok dribblebits iahash 000100 alternate meaning if bits 8 and 9 are both set (see section 5.3 for exception regarding broadcast frames). fedcba98765-0 hash table index (see section 5.3) hashed = 1 rxok = 1 dribblebits iahash 000100 rxevent reports the status of the current received frame. all rxevent bits are cleared upon readout. the host is responsible for processing all event bits. rxstatus register (packetpage base + 0400h) is the same as the rxevent register except rxstatus is not cleared when rxevent is read. see section 5.2. value in rxevent register is undefined when rxdmaonly bit (bit 9, register 3, rxcfg) is set. bit name description 5-0 000100 these bits identify this as the receiver event register. when reading this register, these bits will be 000100, where the lsb corresponds to bit 0. 6iahash when the received frames destination address is accepted by the hash filter, this bit is set if, and only if, rxok (bit 8) is set, iahasha (register 5, rxctl, bit 6) is set, and hashed (bit 9) is set. see section 5.3. 7 dribblebits when set, the received frame has from one to seven bits after the last received full byte. an "alignment error" occurs when dribblebits and crcerror (bit c) are both set. 8 rxok when set, the received frame has a good crc and valid length (i.e., there is not a crc error, runt error, or extradata error). when rxok is set, the length of the received frame is contained at packetpage base + 0402h. if rxokie (register 3, rxcfg, bit 8) is set, there is an interrupt. 9 hashed when set, the received frame has a destination address that was accepted by the hash filter. if hashed and rxok (bit 8) are set, bits f-a of rxevent become the hash table index for this frame. (see section 5.3 for an exception regarding broadcast frames.) if hashed and rxok are not both set, bits f-a are individual event bits. a individualadr when the received frame has a destination address that matched the individual address found at packetpage base + 0158h, this bit is set if, and only if, rxok (bit 8) is set and individuala (register 5, rxctl, bit a) is set. b broadcast when the received frame has a broadcast address (ffff ffff ffffh) as the destination address, this bit is set if, and only if, rxok is set and broadcasta (register 5, rxctl, bit b) is set. c crcerror when set, the received frame has a bad crc. if crcerrorie (register 3, rxcfg, bit c) is set, there is an interrupt. d runt when set, the received frame is shorter than 64 bytes. if runtie (register 3, rxcfg, bit d) is set, there is an interrupt. e extradata when set, the received frame is longer than 1518 bytes. all bytes beyond 1518 are discarded. if extradataie (register 3, rxcfg, bit e) is set, there is an interrupt. f ewakeevent set once when the CS8920A recognizes a received frame as a magic packet frame. cleared when read. set again only when another magic packet frame is recognized. this registers initial state after reset is: 0000 0000 0000 0100 CS8920A 52 ds238pp2
register 5: receiver control (rxctl, read/write) address: packetpage base + 0104h fedcba98765-0 extradataa runta crcerrora broad casta individuala multicasta rxoka promis cuousa iahasha 000101 rxctl has two functions: bits 8, c, d, and e define what types of frames to accept; bits 6, 7, 9, a, and b configure the destination address filter. see section 5.3. bit name description 5-0 000101 these bits provide an internal address used by the CS8920A to identify this as the receiver control register. for a received frame to be accepted, the destination address of that frame must pass the filter criteria found in bits 6, 7, 9, a, and b (see section 5.3). 6 iahasha when set, receive frames are accepted when the destination address is an individual address that passes the hash filter. 7 promiscuousa frames with any address are accepted when this bit is set. 8 rxoka when set, the CS8920A accepts frames with correct crc and valid length 64 bytes <= length <= 1518 bytes). 9 multicasta when set, receive frames are accepted if the destination address is a multicast address that passes the hash filter. a individuala when set, receive frames are accepted if the destination address matches the individual address found at packetpage base + 0158h to packetpage base + 015dh. b broadcasta when set, receive frames are accepted if the destination address is ffff ffff ffffh. c crcerrora when set, receive frames that pass the destination address filter, but have a bad crc, are accepted. when clear, frames with bad crc are discarded. see note 1. d runta when set, receive frames that are smaller than 64 bytes, and that pass the destination address filter are accepted. when clear, received frames less that 64 bytes in length are discarded. the CS8920A discards any frame that is less than 8 bytes. see note 1. e extradataa when set, receive frames longer than 1518 bytes and that pass the destination address filter are accepted. the CS8920A accepts only the first 1518 bytes and ignores the rest. when clear, frames longer than 1518 bytes are discarded. see note 1. after reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0000 0101 note: 1. typically, when bits crcerrora, runta, and extradataa are cleared (meaning bad frames are being dis- carded), then the corresponding bits crcerrorie, runtie, and extradataie should be set in register 3 (receiver configuration register) to allow the device driver to keep track of discarded frames. CS8920A ds238pp2 53
register 7: transmit configuration (txcfg, read/write) address: packetpage base + 0106h fedcba98765-0 16collie anycollie jabberie out-of- windowie txokie sqe errorie loss-of- crsie 000111 each bit in txcfg is an interrupt enable. when set, the interrupt is enabled as described below. when clear, there is no interrupt. bit name description 5-0 000111 these bits provide an internal address used by the CS8920A to identify this as the transmit configuration register. 6 loss-of-crsie if the CS8920A starts transmitting on the aui and does not see the carrier sense signal at the end of the preamble; an interrupt is generated if this bit is set. carrier sense activity is reported by the crs bit (register 14, linest, bit e). 7sqeerrorie (aui only) at the end of a transmission, the CS8920A expects an assertion of the sqe_test signal on the aui port within 64 bit times. if this does not happen, an sqe error occurs. 8 txokie when set, an interrupt is generated if a packet is completely transmitted. 9out-of- windowie when set, an interrupt is generated if a late collision occurs (a late collision is a collision which occurs after the first 512 bit times). when this occurs, the CS8920A forces a bad crc and terminates the transmission. a jabberie when set, an interrupt is generated if a transmission is longer than approximately 26 ms. b anycollie when set, if one or more collisions occur during the transmission of a packet, an interrupt occurs at the end of the transmission. f 16collie when the CS8920A encounters 16 normal collisions while attempting to transmit a particular packet, the CS8920A stops attempting to transmit that packet. when this bit is set, there is an interrupt upon detecting the 16th collision. after reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0000 0111 note: bit 8 (txokie) and bit b (anycollie) are interrupts for normal transmit operation. bits 6, 7, 9, a, and f are interrupts for abnormal transmit operation. CS8920A 54 ds238pp2
register 8: transmitter event (txevent, read-only) address: packetpage base + 0128h fedcba98765-0 16coll number-of-tx-collisions jabber out-of- window txok sqeerror loss-of- crs 001000 txevent gives the event status of the last packet transmitted. bit name description 5-0 001000 these bits provide an internal address used by the CS8920A to identify this as the transmitter event register. when reading this register, these bits will be 001000, where the lsb corresponds to bit 0. 6 loss-of-crs if the CS8920A is transmitting on the aui and doesnt see carrier sense (crs) at the end of the preamble, there is a loss-of-carrier error and this bit is set. if loss-of- crsie (register 7, txcfg, bit 6) is set, there is an interrupt. 7 sqeerror at the end of a transmission on the aui, the CS8920A expects to see a collision within 64 bit times. if this does not happen, there is an sqe error and this bit is set. if sqeerrorie (register 7, txcfg, bit 7) is set, there is an interrupt. 8 txok this bit is set if the last packet was completely transmitted (jabber (bit a), out-of- window-collision (bit 9), and 16coll (bit f) must all be clear). if txokie (register 7, txcfg, bit 8) is set, there is an interrupt. 9out-of- window this bit is set if a collision occurs more than 512 bit times after the first bit of the preamble. when this occurs, the CS8920A forces a bad crc and terminates the transmission. if out-of-windowie (register 7, txcfg, bit 9) is set, there is an interrupt. a jabber if the last transmission is longer than 26 ms, the packet output is terminated by the jabber logic and this bit is set. if jabberie (register 7, txcfg, bit a) is set, there is an interrupt. e-b number-of- tx-collisions these bits give the number of transmit collisions that occurred on the last transmitted packet. bit b is the lsb. if anycollie (register 7, txcfg, bit b) is set, there is an interrupt when any collision occurs. f 16coll this bit is set when the CS8920A encounters 16 normal collisions while attempting to transmit a particular packet. when this happens, the CS8920A stops further attempts to send that packet. if 16collie (register 7, txcfg, bit f) is set, there is an interrupt. this registers initial state after reset is: 0000 0000 0000 1000 notes: 1. in any event register, like txevent, all bits are cleared upon readout. the host is responsible for processing all event bits. 2. txok (bit 8) and the number-of-tx-collisions (bits e-b) are used in normal packet transmission. all other bits (6, 7, 9, a, and f) give the status of abnormal transmit operation. CS8920A ds238pp2 55
register 9: transmit command status (txcmd, read-only) address: packetpage base + 0108h fedcba98765-0 txpaddis inhibitcrc onecoll force txstart 001001 this register contains the latest transmit command which tells the CS8920A how the next packet should be sent. the command must be written to packetpage base + 0144h in order to initiate a transmission. the host can read the command from register 9 (packetpage base + 0108h). see section 5.8. bit name description 5-0 001001 these bits provide an internal address used by the CS8920A to identify this as the transmit command register. when reading this register, these bits will be 001001, where the lsb corresponds to bit 0. 7, 6 txstart this pair of bits determines how many bytes are transferred to the CS8920A before the mac starts the packet transmit process. bit 7 bit 6 0 0 start transmission after 5 bytes are in the CS8920A 0 1 start transmission after 381 bytes are in the CS8920A 1 0 start transmission after 1021 bytes are in the CS8920A 1 1 start transmission after the entire frame is in the CS8920A 8 force when set in conjunction with a new transmit command, any transmit frames waiting in the transmit buffer are deleted. if a previous packet has started transmission, that packet is terminated within 64 bit times with a bad crc. 9 onecoll when this bit is set, any transmission will be terminated after only one collision. when clear, the CS8920A allows up to 16 normal collisions before terminating the transmission. c inhibitcrc when set, the crc is not appended to the transmission. d txpaddis when txpaddis is clear, and the host gives a transmit length less than 60 bytes and inhibitcrc is set, the CS8920A pads to 60 bytes. if the host gives a transmit length less than 60 bytes and inhibitcrc is clear, the CS8920A pads to 60 bytes and appends the crc. when txpaddis is set, the CS8920A allows transmission of runt frames (a frame less than 64 bytes). if inhibitcrc is clear, the CS8920A appends the crc. if inhibitcrc is set, the CS8920A does not append the crc. after reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0000 1001 note: the CS8920A does not transmit a frame if txlength < 3. CS8920A 56 ds238pp2
register b: buffer configuration (bufcfg, read/write) address: packetpage base + 010ah fedcba98765-0 rxdestie miss ovfloie txcol ovfloie rx128ie rxmissie txunder runie rdy4txie rxdmaie swint-x 001011 each bit in bufcfg is an interrupt enable. when set, the interrupt described below is enabled. when clear, there is no interrupt. bit name description 5-0 001011 these bits provide an internal address used by the CS8920A to identify this as the buffer configuration register. 6 swint-x when set, there is an interrupt requested by the host software. the CS8920A provides the interrupt, and sets the swint (register c, bufevent, bit 6) bit. the CS8920A acts upon this command at once. swint-x is an act-once bit. to generate another interrupt, rewrite a 1 to this bit. 7 rxdmaie when set, there is an interrupt when a frame has been received and dma is complete. with this interrupt, the rxdmaframe bit (register c, bufevent, bit 7) is set. 8 rdy4txie when set, there is an interrupt when the CS8920A is ready to accept a frame from the host for transmission. (see section 5.8 for a description of the transmit bid process.) 9 txunderrunie when set, there is an interrupt if the CS8920A runs out of data before it reaches the end of the frame (called a transmit underrun). when this happens, event bit txunderrun (register c, bufevent, bit 9) is set and the CS8920A makes no further attempts to transmit that frame. if the host still wants to transmit that particular frame, the host must go through the transmit request process again. a rxmissie when set, there is an interrupt if one or more received frames are lost due to slow movement of receive data out of the receive buffer (called a receive miss). when this happens, the rxmiss bit (register c, bufevent, bit a) is set. b rx128ie when set, there is an interrupt after the first 128 bytes of a frame have been received. this allows a host processor to examine the destination address, source address, length, sequence number, and other information before the entire frame is received. this interrupt should not be used with dma. if either autorxdma (register 3, rxcfg, bit a) or rxdmaonly (register 3, rxcfg, bit 9) is set, the rx128ie bit must be clear. do not set this bit when streamtransfer mode is enabled. c txcolovfie when set, there is an interrupt when the txcol counter increments from 1ffh to 200h. (the txcol counter (register 12) is incremented whenever the CS8920A sees that the rxd+/rxd- pins (10base-t) or the ci+/ci- pins (aui) go active while a packet is being transmitted.) continued on the next page. CS8920A ds238pp2 57
register b: buffer configuration (bufcfg) continued bit d name missovfloie description if missovfloie is set, there is an interrupt when the rxmiss counter increments from 1ffh to 200h. (a receive miss is said to have occurred if packets are lost due to slow movement of receive data out of the receive buffers. when this happens, the rxmiss bit (register c, bufevent, bit a) is set, and the rxmiss counter (register 10) is incremented.) f rxdestie when set, there is an interrupt when a receive frame passes the destination address filter criteria defined in the rxctl register (register 5). this bit provides an early indication of an incoming frame. it is earlier than rx128 (register c, bufevent, bit b). do not set this bit when streamtransfer mode is enabled. if rxdestie is set, the bufevent could be rxdest or rx128. after 128 bytes are received, the bufevent changes from rxdest to rx128. after reset, if no eeprom is found by the CS8920A, the register has the following initial state after reset. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0000 1011 CS8920A 58 ds238pp2
register c: buffer event (bufevent, read-only) address: packetpage base + 012ch fedcba98765-0 rxdest rx128 rxmiss txunder run rdy4tx rxdma frame swint 001100 bufevent gives the status of the transmit and receive buffers. bit name description 5-0 001100 these bits provide an internal address used by the CS8920A to identify this as the buffer event register. when reading this register, these bits will be 001100, where the lsb corresponds to bit 0. 6 swint when set, there has been a software initiated interrupt. this bit is used in conjunction with the swint-x bit (register b, bufcfg, bit 6). 7 rxdmaframe when set, one or more received frames have been transferred by slave dma. when rxdmaie (register b, bufcfg, bit 7) is set, there is an interrupt. 8 rdy4tx when set, the CS8920A is ready to accept a frame for transmission from the host. when rdy4txie (register b, bufcfg, bit 8) is set, there is an interrupt. (see section 5.8 for a description of the transmit bid process.) 9 txunderrun this bit is set if CS8920A runs out of data before it reaches the end of the frame (called a transmit underrun). if txunderrunie (register b, bufcfg, bit 9) is set, there is an interrupt. a rxmiss when set, one or more receive frames have been lost due to slow movement of data out of the receive buffers. if rxmissie (register b, bufcfg, bit a) is set, there is an interrupt. b rx128 this bit is set after the first 128 bytes of an incoming frame have been received. this bit will allow the host the option of pre-processing frame data before the entire frame is received. if rx128ie (register b, bufcfg, bit b) is set, there is an interrupt. f rxdest when set, this bit shows that a receive frame has passed the destination address filter criteria as defined in the rxctl register (register 5). this bit is useful as an early indication of an incoming frame. it will be earlier than rx128 (register c, bufevent, bit b). if rxdestie (register b, bufcfg, bit f) is set, there is an interrupt. this registers initial state after reset is: 0000 0000 0000 1100 note: with any event register, like bufevent, all bits are cleared upon readout. the host is responsible for processing all event bits. CS8920A ds238pp2 59
register d: advance interrupt control and status (advintctl/st, read/write) address: packetpage base + 010ch fedcba98765-0 timer enable mode rx48/64ie rx64 rx48/64 irq timer irq 001101 this register contains control bits for various interrupt sources and the status bits of those sources. bit name description 5-0 001101 these bits provide an internal address used by the CS8920A to identify this as the buffer configuration register. 6 timer irq when set, a timer-based interrupt has occurred (when idt exceeds the pdv). this can happen only when bit f (timer enable) is set. 7 rx48/64 irq when set, an interrupt based on 48/64 bytes of received data has occurred. the status bit is read only; it is reset when the bit is read. a rx64 this is a 64-byte interrupt. it is only applicable when rx48/64ie is set. b rx48/64ie interrupt enabled. if set to one, a 48- or 64-byte interrupt will be generated. the type of interrupt depends on bit a, the rx64 control bit. if cleared to 0, no interrupt will be generated. e mode used only for the idt/pdv timer mechanism. this determines how often an interrupt will automatically get generated. if the timer-generated interrupt is to be used, (timer enable bit is set) then the mode bit takes on this meaning: mode = 0 the programmable delay value (pdv) register is reset to ffffh following the interrupt generation and must be reprogrammed by the host. this will prevent generation of a second interrupt. the interrupt delay timer (idt) is restarted only on a read of the byte counter. if the byte counter is never read, a second interrupt will not be generated. mode = 1 the idt will be restarted on a read of the byte counter or when an interrupt event is seen. this mode allows a periodic interrupt because the exiting of an interrupt sequence/routine is accomplished by reading the isq. this will start the timer again. the pdv remains at its programmed value. f timer enable must be set to 1 to allow a timer-driven interrupt to occur. this enables the interrupt being generated from the pdv and idt. this registers initial state after reset is: 0000 0000 0000 1101 CS8920A 60 ds238pp2
register 12: transmit collision counter (txcol, read-only) address: packetpage base + 0132h f-6 5-0 colcount 010010 the txcol counter (bits 6 through f) is incremented whenever the 10base-t receive pair (rxd+ / rxd-) or aui collision pair (ci+ / ci-) becomes active while a packet is being transmitted. when the txcolovfie bit (register b, bufcfg, bit c) is set, there is an interrupt when txcol increments from 1ffh to 200h. this interrupt provides the host with an early warning that the txcol counter should be read before it reaches 3ffh and starts over (by interrupting at 200h, the host has an additional 512 counts before txcol actually overflows). the txcol counter is cleared when read. bit name description 5-0 010010 these bits provide an internal address used by the CS8920A to identify this as the bus status register. when reading this register, these bits will be 010010, where the lsb corresponds to bit 0. f-6 colcount the upper ten bits contain the number of collisions. this registers initial state after reset is: 0000 0000 0001 0010 register 10: receiver miss counter (rxmiss, read-only) address: packetpage base + 0130h f-6 5-0 misscount 010000 the rxmiss counter (bits 6 through f) records the number of receive frames that are lost (missed) due to the lack of available buffer space. when the missovfloie bit (register b, bufcfg, bit d) is set, there is an interrupt when rxmiss increments from 1ffh to 200h. this interrupt provides the host with an early warning that the rxmiss counter should be read before it reaches 3ffh and starts over (by interrupting at 200h, the host has an additional 512 counts before rxmiss actually overflows). the rxmiss counter is cleared when read. bit name description 5-0 010000 these bits provide an internal address used by the CS8920A to identify this as the bus status register. when reading this register, these bits will be 010000, where the lsb corresponds to bit 0. f-6 misscount the upper ten bits contain the number of missed frames. this registers initial state after reset is: 0000 0000 0001 0000 CS8920A ds238pp2 61
register 13: line control (linectl, read/write) address: packetpage base + 0112h fedcba98765-0 wakeupen lorx squelch 2-part defdis polaritydis mod backoffe route wakeup auto aui/10bt auionly sertxon serrxon 010011 linectl determines the configuration of the mac engine and physical interface. bit name description 5-0 010011 these bits provide an internal address used by the CS8920A to identify this as the line control register. 6 serrxon when set, the receiver is enabled. when clear, no incoming packets pass through the receiver. if serrxon is cleared while a packet is being received, reception is completed and no subsequent receive packets are allowed until serrxon is set again. 7 sertxon when set, the transmitter is enabled. when clear, no transmissions are allowed. if sertxon is cleared while a packet is being transmitted, transmission is completed and no subsequent packets are transmitted until sertxon is set again. 8 auionly bits 8 and 9 are used to select either the aui or the 10base-t interface according to the following: (note that the 10base-t transmitter will be inactive even when selected unless link pulses are detected or bit disablelt (register 19, bit 7) is set.) auionly (bit 8) autoaui/10bt (bit 9) physical interface 1n/a aui 0 0 10base-t 01auto-select 9 autoaui/10bt see auionly (bit 8) description above. a routewakeup determines action to be taken when a wakeup frame is seen and bit f is set (wakeupen=1). when routewakeup=1, the ewake pin and a programmable interrupt will be asserted. if routewakeup=0, only the ewake pin will be asserted. this is the default case. b modbackoffe when clear, the iso/iec standard backoff algorithm is used (see section 3.10). when set, the modified backoff algorithm is used. (the modified backoff algorithm extends the backoff delay after each of the first three tx collisions.) cpolarityd (10base-t, only) the 10base-t receiver automatically determines the polarity of the received signal at the rxd+/rxd- input (see section 3.12). when this bit is clear, the polarity is corrected, if necessary. when set, no effort is made to correct the polarity. this bit is independent of the polarityok bit (register 14, linest, bit c), which reports whether the polarity is normal or reversed. d 2-partdefdis before a transmission can begin, the CS8920A follows a deferral procedure. with the 2- partdefdis bit clear, the CS8920A uses the standard two-part deferral as defined in iso/iec 8802-3 paragraph 4.2.3.2.1. with the 2-partdefdis bit set, the two-part deferral is disabled. continued on the next page. CS8920A 62 ds238pp2
register 14: line status (linest, read-only) address: packetpage base + 0134h fedcba98765-0 crs polarityok 10bt aui linkok 010100 linest reports the status of the ethernet physical interface. bit name description 5-0 010100 these bits provide an internal address used by the CS8920A to identify this as the line status register. when reading this register, these bits will be 010100, where the lsb corresponds to bit 0. 7 linkok when set, the 10base-t link has not failed. when clear, the link has failed either because the CS8920A has just come out of reset, or because the receiver has not detected any activity (link pulses or received packets) for at least 50 ms. 8 aui when set, the CS8920A is using the aui. 9 10bt when set, the CS8920A is using the 10base-t interface. c polarityok when set, the polarity of the 10base-t receive signal (at the rxd+ / rxd- inputs) is correct. if clear, the polarity is reversed. if polaritydis (register 13, linectl, bit c) is clear, then the polarity is automatically corrected, if needed. the polarityok status bit shows the true state of the incoming polarity independent of the polaritydis control bit. when polaritydis is clear and polarityok is clear, the receive polarity is inverted, and corrected. e crs this bit tells the host the status of an incoming frame. if crs is set, a frame is currently being received. crs remains asserted until the end of frame (eof). at eof, crs goes inactive in about 1.3 to 2.3 bit times after the last low-to-high transition of the recovered data. this registers initial state after reset is: 0x0x 00xx x001 0100 register 13: line control (linectl, read/write) continued address: packetpage base + 0112h bit name description e lorxsquelch (10base-t, only) when clear, the 10base-t receiver squelch thresholds are set to levels defined by the iso/iec 8802-3 specification. when set, the thresholds are reduced by approximately 6 db. this is useful for operating with "quiet" cables that are longer than 100 meters. f wakeupen when set, the wakeup enable bit forces the mac to look at a special magic packet frame and ignore all other incoming data. wakeupen also enables some special logic to determine when the isa bus drivers are to be on/off and what is done when the magic packet frame is seen. after reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0001 0011 note: for rev. b of the CS8920A, if autonegotiation is selected and two CS8920As are connected back to back the auto aui/10bt function does not work. CS8920A ds238pp2 63
register 15: self control (selfctl, read/write) address: packetpage base + 0114h fedcba98765-0 hcb1 hcb0 hc1e hc0e hw standbye hwsleepe sw suspend reset 010101 selfctl controls the operation of the led outputs and the low-power modes. bit name description 5-0 010101 these bits provide an internal address used by the CS8920A to identify this as the chip self control register. 6 reset when set, a chip-wide reset is initiated immediately. reset is an act-once bit. this bit is cleared as a result of the reset. 8 swsuspend when set, the CS8920A enters the software initiated suspend mode. upon entering this mode, there is a partial reset. all registers and circuits are reset except for the isa i/o base address register and the selfctl register. there is no transmit nor receive activity in this mode. to come out of software suspend, the host issues an i/o write within the CS8920As assigned i/o space (see section 3.8 for a complete description of the CS8920As low-power modes). 9 hwsleepe when set, the sleep input pin is enabled. when sleep is high, the CS8920A is "awake", or operative (unless in swsuspend mode, as shown above). when sleep is low, the CS8920A enters either the hardware standby or hardware suspend mode. when clear, the CS8920A ignores the sleep input pin (see section 3.8 for a complete description of the CS8920As low-power modes). a hwstandbye when hwsleepe is set and the sleep input pin is low, then when hwstandbye is set, the CS8920A enters the hardware standby mode. when clear, the CS8920A enters the hardware suspend mode (see section 3.8 for a complete description of the CS8920As low-power modes). c hc0e the linkled or hc0 output pin is selected with this control bit. when hc0e is clear, the output pin is linkled. when hc0e is set, the output pin is hc0 and the hcb0 bit (bit e) controls the pin. d hc1e the bstatus or hc1 output pin is selected with this control bit. when hc1e is clear, the output pin is bstatus and indicates receiver isa bus activity. when hc1e is set, the output pin is hc1 and the hcb1 bit (bit f) controls the pin. e hcb0 when hc0e (bit c) is set, this bit controls the hc0 pin. if hcb0 is set, hc0 is low. if hcb0 is clear, hc0 is high. hc0 may drive an led or a logic gate. when hc0e (bit c) is clear, this control bit is ignored. f hcb1 when hc1e (bit d) is set, this bit controls the hc1 pin. if hcb1 is set, hc1 is low. if hcb1 is clear, hc1 is high. hc1 may drive an led or a logic gate. when hc1e (bit d) is clear, this control bit is ignored. after reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0001 0101 CS8920A 64 ds238pp2
register 16: self status (selfst, read-only) address: packetpage base + 0136h fedcba98765-0 eesize eeprom ok eeprom present sibusy initd pnp disable 010110 selfst reports the status of the eeprom interface and the initialization process. bit name description 5-0 010110 these bits provide an internal address used by the CS8920A to identify this as the chip self status register. when reading this register, these bits will be 010110, where the lsb corresponds to bit 0. 6 pnp disable indicates that the pnp section has been disabled by a bit in the eeprom. this disabling feature may be needed if the CS8920A is to look like a legacy device. 7 initd when set, the CS8920A initialization, including read-in of the eeprom, is complete. 8 sibusy when set, the eecs output pin is high indicating that the eeprom is currently being read or programmed. the host must not write to packetpage base + 0040h nor 0042h until sibusy is clear. 9 eeprom present when the eedi pin is low after reset, there is no eeprom present, and the eeprompresent bit is clear. if the eedi pin is high after reset, the CS8920A "assumes" that an eeprom is present, and this bit is set. a eepromok when set, the checksum of the eeprom readout was ok. c eesize this bit shows the size of the attached eeprom and is valid only if the eeprompresent bit (bit 9) and eepromok bit (bit a) are both set. if clear, the eeprom size is either 128 words (c56 or cs56) or 256 words (c66 or cs66). if set, the eeprom size is 64 words (c46 or cs46). this registers initial state after reset is: (x = depends on configuration.) 000x xxxx xx01 0110 CS8920A ds238pp2 65
register 17: bus control (busctl, read/write) address: packetpage base + 0116h fedcba98765-0 enableirq rxdma size ioch rdye dmaburst memorye usesa reset rxdma 010111 busctl controls the operation of the isa-bus interface. bit name description 5-0 010111 these bits provide an internal address used by the CS8920A to identify this as the bus control register. 6 resetrxdma when set, the rxdma offset pointer at packetpage base + 0026h is reset to zero. when the host sets this bit, the CS8920A does the following: 1. terminates the current receive dma activity, if any. 2. clears all internal receive buffers. 3. zeroes the rxdma offset pointer. the CS8920A acts upon this command only once when this bit is set. resetrxdma is an act-once bit. to cause the pointer to reset again, the host must rewrite a 1. 9 usesa when set, the mcs16 pin goes low whenever the address on the sa bus [13..16] and la[17:23] match the CS8920As assigned memory base address. when clear, mcs16 is driven low whenever la[17:23] match the CS8920As assigned memory base address. mcs16 is driven by the CS8920A in memory mode with the memorye bit (register 17, busctl, bit a) set. a memorye when set, the CS8920A may operate in memory mode. when clear, memory mode is disabled. i/o mode is always enabled. b dmaburst when clear, the CS8920A performs continuous dma until the receive frame is completely transferred from the CS8920A to host memory. when set, each dma access is limited to 28 m s, after which time the CS8920A gives up the bus for 1.3 m s before making a new dma request. c iochrdye when set, the CS8920A does not use the iochrdy output pin, and the pin is always in the high-impedance state. this allows external pull-up to force the output high. when clear, the CS8920A drives iochrdy low to request additional time during i/o read and memory read cycles. iochrdy does not affect i/o write, memory write, nor dma read. d rxdmasize this bit determines the size of the receive dma buffer (located in host memory). when set, the dma buffer size is 64 kbytes. when clear, it is 16 kbytes. f enableirq when set, the CS8920A will generate an interrupt in response to an interrupt event (section 5.1). when cleared, the CS8920A will not generate any interrupts. after reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0001 0111 CS8920A 66 ds238pp2
register 18: bus status (busst, read-only) address: packetpage base + 0138h fedcba98765-0 rdy4tx now txbiderr 011000 busst describes the status of the current transmit operation. bit name description 5-0 011000 these bits provide an internal address used by the CS8920A to identify this as the bus status register. when reading this register, these bits will be 011000, where the lsb corresponds to bit 0. 7 txbiderr if set, the host has commanded the CS8920A to transmit a frame that the CS8920A will not send. frames that the CS8920A will not send are: 1) any frame greater than 1514 bytes, provided that inhibitcrc (register 9, txcmd, bit c) is clear. 2) any frame greater than 1518 bytes. note that this bit is not set when transmit frames are too short. 8 rdy4txnow rdy4txnow signals the host that the CS8920A is ready to accept a frame from the host for transmission. this bit is similar to rdy4tx (register c, bufevent, bit 8) except that there is no interrupt associated with rdy4txnow. the host can poll the CS8920A and check rdy4txnow to determine if the CS8920A is ready for transmit. (see section 5.8 for a description of the transmit bid process.) this registers initial state after reset is: 0000 0000 xx01 1000 CS8920A ds238pp2 67
register 19: test control (testctl, read/write) address: packetpage base + 0118h fedcba98765-0 disable backoff auiloop endec loop disablelt 011001 testctl controls the diagnostic test modes of the CS8920A. bit name description 5-0 011001 these bits provide an internal address used by the CS8920A to identify this as the test control register. 7 disablelt when set, the 10base-t interface allows packet transmission and reception regardless of the link status. disablelt is used in conjunction with the linkok (register 14, linest, bit 7) as follows: linkok disablelt 0 0 no packet transmission or reception allowed. transmitter sends link pulses. x 1 disablelt overrides linkok to allow packet transmission and reception. 1 n/a disablelt has no meaning if linkok = 1. note that if the receiver is receiving no link pulses, then the 10base-t transmitter can be active only if bit disablelt is set. 9 endecloop when set, the CS8920A enters internal loopback mode where the internal manchester encoder output is connected to the decoder input. the 10base-t and aui transmitters and receivers are disabled. when clear, the CS8920A is configured for normal operation. a auiloop when set, the CS8920A allows reception while transmitting. this facilitates loopback tests for the aui. when clear, the CS8920A is configured for normal aui operation. b disable backoff when set, the backoff algorithm is disabled. the CS8920A transmitter looks only for completion of the inter-packet gap before starting transmission. when clear, the backoff algorithm is used. at reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0001 1001 CS8920A 68 ds238pp2
register 1c: aui time domain reflectometer (read-only) address: packetpage base + 013ch f-6 5-0 aui_delay 011100 the tdr counter (bits 6 through f) is a time domain reflectometer useful in locating cable faults in 10base-2 and 10base-5 coax networks. it counts at a 10-mhz rate from the beginning of transmission on the aui to when a collision or loss-of-carrier error occurs. the tdr counter is cleared when read. bit name description 5-0 011100 these bits provide an internal address used by the CS8920A to identify this as the bus status register. when reading this register, these bits will be 011100, where the lsb corresponds to bit 0. f-6 aui-delay the upper ten bits contain the number of 10-mhz clock periods between the beginning of transmission on the aui to when a collision or loss-of-carrier error occurs. this registers initial state after reset is: 0000 0000 0001 1100 CS8920A ds238pp2 69
register 1d: auto negotiation control (autonegctl, read/write) address: packetpage base + 011ch fedcba98765-0 forcefdx nlp enable autoneg enable allowfdx renow 011101 bit name description 5-0 011101 these bits provide an internal address used by the CS8920A to identify this as the test control register. 6 renow when set, and when nlpenable and forcefdx are not set, a re-negotiation is forced. renow clears itself after re-negotiation begins. reset value is 0. 7 allowfdx when set, the fdx mode is advertised. allowfdx is sampled only when entering the ability detect state during arbitration. changes to this bit are ignored after arbitration begins. to re-sample this bit, a re-negotiation must be forced. 8 autonegenable when set, and when nlpenable and forcefdx are not set, auto negotiation may occur, including using fast link pulses. when autonegenable is clear, negotiations are aborted, including the negotiation in progress. reset value is 0. when autonegenable bit is cleared, set bit renow. 9 nlpenable when set, the normal link pulses will be transmitted and auto negotiation will be disabled. reset value is 0. fforcefdx (10base-t, only) this bit is used to force full duplex operation. the fdxled output is asserted to show that full duplex operation is being used. fdxactive is also set and auto negotiation capability will be disabled. when forcefdx is clear, the full duplex operation is not forced, but the CS8920A may be in full duplex due to auto negotiation. note: one of the bits, either f, 9, or 8, must be set to allow a link to be established. if none of the bits are set, no link pulses of any kind will be sent, and the transmitter will be disabled. this registers initial state after reset is: 0000 0000 0001 1101 CS8920A 70 ds238pp2
register 1e: auto-negotiation status (autonegst, read-only) address: packetpage base + 013eh fedcba98765-0 fdxactive hdxactive linkfault flplink good flplink autoneg busy 011110 each bit in this register, when set, describes a particular activity on the isa bus. bit name description 5-0 011110 these bits provide an internal address used by the CS8920A to identify this as the test control register. to write to this register, these bits must be 011110, where the lsb corresponds to bit 0. 7 autonegbusy auto negotiation is busy. this is not a real register. autonegbusy is set while auto negotiation is in progress. this implies autonegenable is set, forcefdx is not set, nlpenable is not set, and a good link has not yet been established. 8 flplink set when the CS8920A has seen at least one flp burst from the link partner. flplink is cleared when a new auto negotiation begins. b flplinkgood set when auto negotiation has successfully completed. flplinkgood is cleared when re-negotiation is restarted. c linkfault set when an apparently good link goes down during auto negotiation. reset value is 0. e hdxactive half duplex active. set when forcefdx is clear and nlpenable is set, or when auto negotiation finds a half-duplex-only capable link partner. hdxactive is cleared when re- negotiation is requested. f fdxactive full duplex active. set whenforcefdx is set, or when auto negotiation reveals a full- duplex capable link partner. fdxactive is cleared when re-negotiation is requested. this registers initial state after reset is: 0000 0000 0001 1110 CS8920A ds238pp2 71
4.6 initiate transmit register initiate transmit register transmit command request - txcmd (write-only) address: packetpage base + 0144h fedcba98765-0 txpaddis inhibitcrc onecoll force txstart 001001 the word written to packetpage base + 0144h tells the CS8920A how the next packet should be transmitted. this packetpage location is write-only, and the written word can be read from register 9, at packetpage base + 0108h. the CS8920A does not transmit a frame if txlength (at packetpage location base + 0146h) is less than 3. see section 5.8. bit name description 5-0 001001 these bits provide an internal address used by the CS8920A to identify this as the transmit command register. when reading this register, these bits will be 001001, where the lsb corresponds to bit 0. 7, 6 txstart this pair of bits determines how many bytes are transferred to the CS8920A before the mac starts the packet transmit process. bit 7 bit 6 0 0 start transmission after 5 bytes are in the CS8920A 0 1 start transmission after 381 bytes are in the CS8920A 1 0 start transmission after 1021 bytes are in the CS8920A 1 1 start transmission after the entire frame is in the CS8920A 8 force when set in conjunction with a new transmit command, any transmit frames waiting in the transmit buffer are deleted. if a previous packet has started transmission, that packet is terminated within 64 bit times with a bad crc. 9 onecoll when this bit is set, any transmission will be terminated after only one collision. when clear, the CS8920A allows up to 16 normal collisions before terminating the transmission. c inhibitcrc when set, the crc is not appended to the transmission. d txpaddis when txpaddis is clear, if the host gives a transmit length less than 60 bytes and inhibitcrc is set, the CS8920A pads to 60 bytes. if the host gives a transmit length less than 60 bytes and inhibitcrc is clear, then the CS8920A pads to 60 bytes and appends the crc. when txpaddis is set, the CS8920A allows the transmission of runt frames (a frame less than 64 bytes). when inhibitcrc is clear, the CS8920A appends the crc. when inhibitcrc is set, the CS8920A does not append the crc. because this register is write-only, its initial state after reset is undefined. CS8920A 72 ds238pp2
initiate transmit register: transmit length (write-only) address: packetpage base + 0146h address 0147h address 0146h most-significant byte of transmit frame length. least-significant byte of transmit frame length. this register is used in conjunction with register 9, txcmd. when a transmission is initiated via a command in txcmd, the length of the transmitted frame is written into this register. the length of the transmitted frame may be modified by the configuration of the txpaddis and inhibitcrc bits in the txcmd register. see table 5.17, and section 5.8. txlength must be >3 and < 1519. because this register is write-only, its initial state after reset is undefined. CS8920A ds238pp2 73
4.7 address filter registers address filter register: logical address filter (hash table) (read//write) address: packetpage base + 0150h address 0157h address 0156h address 0155h address 0154h address 0153h address 0152h address 0151h address 0150h most- significant byte of hash filter. least- significant byte of hash filter. the CS8920A hashing decoder circuitry compares its output with one bit of the logical address filter register. if the decoder output and the logical address filter bit match, the frame passes the hash filter and the hashed bit (register 4, rxevent, bit 9) is set. see section 5.3. this registers initial state after reset is: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 address filter register: individual address (ieee address) (read//write) address: packetpage base + 0158h address 0015dh address 0015ch address 0015bh address 0015ah address 0159h address 00158h octet 5 of ia octet 0 of ia. the unique, ieee 48-bit individual address (ia) begins at 0158h. the first bit of the ia (bit ia[00]) must be 0. see section 5.3. the value of this register must be loaded from external storage, for example, from the eeprom. see section 3.3. if the CS8920A is not able to load the ia from the eeprom, after a reset this register is undefined, and the driver must write an address to this register. CS8920A 74 ds238pp2
4.8 plug n play resource registers plug n play activation register address: packetpage base + 0330h 76543210 0000000active bit name description 0 active until this bit is set the CS8920A will not respond to memory, io (except pnp accesses) and dma accesses. when set the CS8920A will respond to modes that are enabled. all other bits in this register are read as 0 after reset 0000 plug n play io range check register address: packetpage base + 0331h 76543210 0 0 0 0 0 0 check_enable io_check bit name description 0 io_check if the bit 1 (check enable) is set then when two io_check bit is clear the pnp read port is read on 55 when io_check bit is set the pnp read port is read aa. 1 check_enable this bit is set to enable the io range check. CS8920A ds238pp2 75
boot prom base address (read/write) address: packetpage base + 0340h address 0340h address 0341h boot prom base address, high byte. boot prom base address, low byte. after reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0000 0000 boot prom address mask (read/write) address: packetpage base + 0343h address 0343h address 0344h boot prom mask address, high byte. boot prom mask address, low byte. the boot prom address mask register indicates the size of the attached boot prom. the bits in this register select which address lines are used for address matching. if a bit is set, the corresponding address line is used in address matching for the boot prom address. the high byte (packetpage base + 0343h) corresponds to address lines a[23:16] and the low byte corresponds to address line a[15:8] for example: size of boot prom register value 4k bits xxxx xxxx xxxx 1111 1111 0000 0000 0000 8k bits xxxx xxxx xxxx 1111 1110 0000 0000 0000 16k bits xxxx xxxx xxxx 1111 1100 0000 0000 0000 after reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0000 0000 CS8920A 76 ds238pp2
memory base address (read/write) address: packetpage base + 0348h address 0348h address 0349h memory base address, high byte. memory base address, low byte. after reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. the memory mode is disabled when the memory base register is 0000 0000. 0000 0000 0000 0000 i/o base address (read/write) address: packetpage base + 0360h address 0360h address 0361h most significant byte of i/o base address least significant byte of i/o base address the i/o base address register describes the base address for the sixteen contiguous locations in the host systems i/o space, which are used to access the packetpage registers. see section 4.12. the CS8920A io mode is disabled if io base register is 0000 after reset, if no eeprom is found by the CS8920A, the register has the following initial state. if an eeprom is found, the registers initial value may be set by the eeprom. see section 3.3. 0000 0000 0000 0000 CS8920A ds238pp2 77
interrupt number (read/write) address: packetpage base + 0370h address 0370h interrupt number assignment: 0000 0011b= pin irq3 0000 0100b= pin irq4 0000 0101b= pin irq5 0000 0110b= pin irq6 0000 0111b= pin irq7 0000 1001b= pin irq9 0000 1010b= pin irq10 0000 1011b= pin irq11 0000 1100b= pin irq12 0000 1110b= pin irq14 0000 1111b= pin irq15 the interrupt number register defines the interrupt pin selected by the CS8920A. in a typical application the following bus signals are tied to the following pins: bus signal typical pin connection irq3 irq3 irq4 irq4 irq5 irq5 irq6 irq6 irq7 irq7 irq9 irq9 irq10 irq10 irq11 irq11 irq12 irq12 irq14 irq14 irq15 irq15 after reset, if no eeprom is found by the CS8920A, the register has the following initial state, which corre- sponds to placing all the irq pins in a high-impedance state. if an eeprom is found, the regist ers initial value may be set by the eeprom. all interrupts are disabled when interrupt number register is 0000. xxxx xxxx xxxx 0000 CS8920A 78 ds238pp2
dma channel number (read/write) address: packetpage base + 0374h address 0374h dma channel assignment: 05 = pins drq5 and dack5 06 = pins drq6 and dack6 07 = pins drq7 and dack7 08 = all drq pins high-impedance the dma channel register defines the dma pins selected by the CS8920A. in the typical application, the follow- ing bus signals are tied to the following pins: bus signal typical pin connection drq5 dack5 drq5 dack5 drq6 dack6 drq6 dack6 drq7 dack7 drq7 dack7 after reset, if no eeprom is found by the CS8920A, the register has 0000 effectively disabling dma interface. if an eeprom is found, the registers initial value may be set by the eeprom. xxxx xxxx xxxx 0000 CS8920A ds238pp2 79
4.9 receive and transmit frame locations the receive and transmit frame packetpage lo- cations are used to transfer ethernet frames to and from the host. the host sequentially writes to and reads from these locations, and internal buffer memory is dynamically allocated between transmit and receive as needed. one receive frame and one transmit frame are accessible at a time. receive packetpage locations in i/o mode, the receive status/length/frame lo- cations are read through repetitive reads from one i/o port at the i/o base address. see section 4.12. in memory mode, the receive status/length/frame locations are read using memory reads of a block of memory starting at memory base address + 0400h. typically the memory locations are read sequentially using repetitive move instructions (rep movs). see table 4.4 and section 4.11. the first 118 bytes of the receive frame can be accessed randomly if word reads on even word boundaries are used. beyond 118 bytes, the memory reads must be sequential. byte reads, or reads on odd-word boundaries, can be performed only in sequential read mode. see section 4.10. the rxstatus word reports the status of the cur- rent received frame. rxevent register 4 (packetpage base + 0124h) has the same contents as the rxstatus register, except rxevent is cleared when rxevent is read. see section 5.2. the rxlength (receive length) word is the length, in bytes, of the data to be transferred to the host across the isa bus. the register de- scribes the length from the start of source address to the end of crc, assuming that crc has been selected (via register 3 rxcfg, bit buffercrc). if crc has not been selected, then the length does not include the crc, and the crc is not present in the receive buffer. after the rxlength has been read, the receive frame can be read. once some portion of the frame is read, the entire frame should be read before reading the rxevent register either di- rectly or through the isq register. reading the rxevent register signals to the CS8920A that the host is finished with the current frame and wants to start processing the next frame. in this case, the current frame will no longer be accessible to the host. the current frame will also become in- accessible if a skip command is issued, or if the entire frame has been read. see section 5.2. transmit locations the host can write frames into the CS8920A buffer using memory writes using rep movs to the txframe location. see section 5.8. 4.10 eight and sixteen bit transfers a data transfer to or from the CS8920A can be done in either i/o or memory space, and can be either 16 bits wide (word transfers) or 8 bits wide (byte transfers). because the CS8920As in- ternal architecture is based on a 16-bit data bus, word transfers are the most efficient. description mnemonic read/write location: packetpage base + receive status rxstatus read-only 0400h-0401h receive length rxlength read-only 0402h-0403h receive frame rxframe read-only starts at 0404h transmit frame txframe write-only starts at 0a00h table 4.4. receive/transmit memory locations CS8920A 80 ds238pp2
the CS8920A does not support connection to 8- bit buses. to transfer transmit frames to the CS8920A and receive frames from the CS8920A, the host may mix word and byte transfers, provided it follows three rules: 1.the primary method used to access CS8920A memory is word access. 2.word accesses to the CS8920As internal mem- ory are kept on even-byte boundaries. 3.when switching from byte accesses to word accesses, a byte access to an even byte address must be followed by a byte access to an odd- byte address before the host may execute a word access (this will re-align the word trans- fers to even-byte boundaries). on the other hand, a byte access to an odd-byte address may be followed by a word access. failure to observe these three rules may cause data corruption. transferring odd-byte-aligned data some applications gather transmit data from more than one section of host memory. the boundary between the various memory locations may be either even- or odd-byte aligned. when such a boundary is odd-byte aligned, the host should transfer the last byte of the first block to an even address, followed by the first byte of the second block to the following odd address. it can then resume word transfers. an example of this is shown in figure 4.3. random access to CS8920A memory the first 118 bytes of a receive frame held in the CS8920As on-chip memory may be randomly accessed in memory mode. after the first 118 bytes, only sequential access of received data is allowed. either byte or word access is permitted, as long as all word accesses are executed to even-byte boundaries. 4.11 memory mode operation to configure the CS8920A for memory mode, the packetpage memory must be mapped into a contiguous 4-kbyte block of host memory. the block must start at an x000h boundary, with the packetpage base address mapped to x000h. when the CS8920A comes out of reset, its de- fault configuration is i/o mode. when memory mode is selected, all of the CS8920As registers can be accessed directly. in memory mode, the CS8920A supports stand- ard or ready bus cycles without introducing additional wait states (i.e., iochrdy is not deasserted). memory moves can use movd (double-word transfers) as long as the CS8920As memory base address is on a double word boundary. be- cause 286 processors dont support the movd instruction, word and byte transfers must be used with a 286. word transfer word transfer byte transfer word transfer word transfer byte transfer word transfer word transfer first block of data second block of data figure 4.3. odd-byte aligned data CS8920A ds238pp2 81
4.11.1 accesses in memory mode the CS8920A allows read/write access to the internal packetpage memory, and read access of the optional boot prom. (see section 3.7 for a description of the optional boot prom.) a memory access occurs when all of the follow- ing are true: the address on the isa system address bus sa[0:16] and la[17:23] is within the mem- ory space range of the CS8920A or boot prom. either the memr pin or the memw pin is low. 4.11.2 configuring the CS8920A for memory mode the CS8920As internal memory can be mapped anywhere within the host systems 24-bit mem- ory space. the CS8920A occupies 4k bytes of space in the system memory map. configuring the CS8920A to respond in a memory mode re- quires the following: the memory base address registers (packatepage base + 0348h and 0349h) should have the high and low bytes of the 24 bit mem- ory base address. the value written in register at 0348h must be non-zero for memory mode to be active. for example, if the memory base address for the CS8920A is to be 0c8000h, write 0c at packatpage base + 0348h and 80h at packetpage base + 0349h. the memorye bit (bit a) in the bus control register (register 17, packetpage base + 116h) must be set. the CS8920A latches address on pins la[17:23] when the bale signal remains low. when either memr (memory read) or memw (mem- ory write) pin goes active (low), the CS8920A will respond to memory access if address latched from the la[17:23] and ad- dress on pins sa[12:16] match the address in the memory base address register, and the memory enable bit memorye bit in the bus control register is set, and refresh, and aen signals are inactive. 4.11.3 basic memory mode transmit memory mode transmit operations occur in the following order (using interrupts): 1.the host bids for storage of the frame by writ- ing the transmit command to the txcmd register (memory base + 0144h) and the trans- mit frame length to the txlength register (memory base + 0146h). if the transmit length is erroneous, the command is discarded and the txbiderr bit (register 18, busst, bit 7) is set. 2.the host reads the busst register (register 18, memory base + 0138h). when the rdy4txnow bit (bit 8) is set, the frame can be written. when clear, the host must wait for CS8920A buffer memory to become available. when rdy4txie (register b, bufcfg, bit 8) is set, the host will be interrupted when rdy4tx (register c, bufevent, bit 8) be- comes set. 3.once the CS8920A is ready to accept the frame, the host executes repetitive memory-to- memory move instructions (rep movs) to memory base + 0a00h to transfer the entire frame from host memory to CS8920A mem- ory. for a more detailed description of transmit, see section 5.8. CS8920A 82 ds238pp2
4.11.4 basic memory mode receive memory mode receive operations occur in the following order (interrupts used to signal the presence of a valid receive frame): 1.a frame is received by the CS8920A, trigger- ing an enabled interrupt. 2.the host reads the interrupt status queue (memory base + 0120h) and is informed of the receive frame. 3.the host reads rxstatus (memory base + 0400h) to learn the status of the receive frame. 4.the host reads rxlength (memory base + 0402h) to learn the frames length. 5.the host reads the frame data by executing re- petitive memory-to-memory move instructions (rep movs) from memory base + 0404h to transfer the entire frame from CS8920A mem- ory to host memory. for a more detailed description of receive, see section 5.2. 4.11.5 polling the CS8920A in memory mode if interrupts are not used, the host can poll the CS8920A to check if receive frames are present and if memory space is available for transmit. however, this is beyond the scope of this data sheet. 4.12 i/o space operation in i/o mode, packetpage memory is accessed through eight 16-bit i/o ports that are mapped into 16 contiguous i/o locations in the host sys- tems i/o space. i/o mode is the default configuration for the CS8920A and is always en- abled. on power up, the default value of the i/o base address is set at 300h. (note that 300h is typically assigned to lan peripherals). the i/o base address may be changed to any available xxx0h location, either by loading configuration data from the eeprom, or during system setup. table 4.5 shows the CS8920A i/o mode map- ping: receive/transmit data ports 0 and 1 these two ports are used when transferring trans- mit data to the CS8920A and receive data from the CS8920A. port 0 is used for 16-bit opera- tions and ports 0 and 1 are used for 32-bit operations (lower-order word in port 0). txcmd port the host writes the transmit command (txcmd) to this port at the start of each trans- mit operation. the transmit command tells the CS8920A that the host has a frame to be trans- mitted as well as how that frame should be transmitted. this port is mapped into packetpage base + 0144h. see register 9 in section 4.4 for more information. txlength port the length of the frame to be transmitted is writ- ten here immediately after the transmit offset type description 0000h read/write receive/transmit data (port 0) 0002h read/write receive/transmit data (port 1) 0004h write-only txcmd (transmit command) 0006h write-only txlength (transmit length) 0008h read-only interrupt status queue 000ah read/write packetpage pointer 000ch read/write packetpage data (port 0) 000eh read/write packetpage data (port 1) table 4.5. i/o mode mapping CS8920A ds238pp2 83
command is written. this port is mapped into packetpage base + 0146h. interrupt status queue port this port contains the current value of the inter- rupt status queue (isq). the isq is located at packetpage base + 0120h. for a more detailed description of the isq, see section 5.1. packetpage pointer port the packetpage pointer port is written whenever the host wishes to access any of the CS8920As internal registers. the first 12 bits (bits 0 through b) provide the internal address of the target reg- ister to be accessed during the current operation. the next three bits (c, d, and e) must be 0. the last bit (bit f) indicates whether or not the pack- etpage pointer should be auto-incremented to the next word location. figure 4.4 shows the struc- ture of the packetpage pointer. packetpage data ports 0 and 1 the packetpage data ports are used to transfer data to and from any of the CS8920As internal registers. port 0 is used for 16-bit operations and ports 0 and 1 are used for 32-bit operations (lower-order word in port 0). i/o mode operation for an i/o read or write operation, the aen pin must be low, and the 16-bit i/o address on the isa system address bus (sa0 - sa15) must match the address space of the CS8920A. for a read, the ior pin must be low, and for a write, the iow pin must be low. note that the isa latchable address bus (la17 - la23) is not needed for applications that use only i/o mode and receive dma operation. basic i/o mode transmit i/o mode transmit operations occur in the fol- lowing order (using interrupts): 1.the host bids for storage of the frame by writ- ing the transmit command to the txcmd port (i/o base + 0004h) and the transmit frame length to the txlength port (i/o base + 0006h). 2.the host reads the busst register (register 18) to see if the rdy4txnow bit (bit 8) is set. to read the busst register, the host must first set the packetpage pointer at the correct location by writing 0138h to the packetpage pointer port (i/o base + 000ah). it can then read the busst register from the packetpage data port (i/o base + 000ch). when rdy4txnow is set, the frame can be written. when clear, the host must wait for CS8920A buffer memory to become available. when rdy4txie (register b, bufcfg, bit 8) is set, the host will be in- terrupted when rdy4tx (register c, bufevent, bit 8) becomes set. when the txbiderr bit (register 18, busst, bit 7) is set, the transmit length is not valid. 3.when the CS8920A is ready to accept the frame, the host executes repetitive write in- structions (rep out) to the receive/transmit data port (i/o base + 0000h) to transfer the 10 32 54 76 packetpage register address 98 ba dc f e i/o base + 000bh i/o base + 000ah bit f: 0 = pointer remains fixed 1 = auto-increments to next word location 0 1 1 figure 4.4. packagepage pointer CS8920A 84 ds238pp2
entire frame from host memory to CS8920A memory. for a more detailed description of transmit, see section 5.8. basic i/o mode receive i/o mode receive operations occur in the follow- ing order (in this example, interrupts are enabled to signal the presence of a valid receive frame): 1.a frame is received by the CS8920A, trigger- ing an enabled interrupt. 2.the host reads the interrupt status queue port (i/o base + 0008h) and is informed of the re- ceive frame. 3.the host reads the frame data by executing re- petitive read instructions (rep in) from the receive/transmit data port (i/o base + 0000h) to transfer the frame from CS8920A memory to host memory. preceding the frame data are the contents of the rxstatus register (packet- page base + 0400h) and the rxlength register (packetpage base + 0402h). for a more detailed description of receive, see section 5.2. accessing internal registers to access any of the CS8920As internal registers in i/o mode, the host must first set up the pack- etpage pointer. it does this by writing the packetpage address of the target register to the packetpage pointer port (i/o base + 000ah). the content of the target register is then mapped into the packetpage data port (i/o base + 000ch). when the host needs to access a sequential block of registers, the msb of the packetpage address of the first word to be accessed should be set to 1. the packetpage pointer will then move to the next word location automatically, eliminating the need to set up the packetpage pointer between successive accesses (see figure 4.4). polling the CS8920A in i/o mode if interrupts are not used, the host can poll the CS8920A to check if receive frames are present and if memory space is available for transmit. CS8920A ds238pp2 85
5.0 operation 5.1 managing interrupts and servicing the interrupt status queue the interrupt status queue (isq) is used by the CS8920A to communicate event reports to the host processor. whenever an event occurs that triggers an enabled interrupt, the CS8920A sets the appropriate bit(s) in one of five registers, maps the contents of that register to the isq, and drives the selected interrupt request pin high (if an earlier interrupt is waiting in the queue, the interrupt request pin will already be high). when the host services the interrupt, it must first read the isq to learn the nature of the interrupt. it can then process the interrupt (the first read to the isq causes the interrupt request pin to go low. three of the registers mapped to the isq are event registers: rxevent (register 4), txevent (register 8), and bufevent (register c). the other two registers are counter-overflow reports: rxmiss (register 10) and txcol (register 12). there may be more than one rxevent report and/or more than one txevent report in the isq at a time. however, there may be only one bufevent report, one rxmiss report and one txcol report in the isq at a time. event reports stored in the isq are read out in the order of priority, with rxevent first, followed by txevent, bufevent, rxmiss, and then txcol. the host only needs to read from one location to get the interrupt currently at the front of the queue. in memory mode, the isq is lo- cated at packetpage base + 0120h. in i/o mode, it is located at i/o base + 0008h. each time the host reads the isq, the bits in the corresponding register are cleared and the next report in the queue moves to the front. when the host starts reading the isq, it must read and process all event reports in the queue. a readout of a null word (0000h) indicates that all interrupts have been read. the isq is read as a 16-bit word. the lower six bits (0 through 5) contain the register number (4, 8, c, 10, or 12). the upper ten bits (6 through f) contain the register contents. the host must al- ways read the entire 16-bit word, because the CS8920A does not support 8-bit access to its in- ternal registers. figure 5.1 shows the operation of the isq. the active interrupt pin (intrqx) is selected via the interrupt number register (packetpage base + 0370h). as an additional option, all of the inter- rupt pins can be placed in the high-impedance state using the same register. see section 4.3. an event triggers an interrupt only when the en- ableirq bit of the bus control register (bit f of register 17) is set. after the CS8920A has generated an interrupt, the first read of the isq makes the intrq out- put pin go low (inactive). intrq remains low until the null word (0000h) is read from the isq, or for 1.6 m s, whichever is longer. typically, when interrupts have been enabled for various error conditions (runt, crc error, frame > 1518 bytes) via register 3, the software will also select that those frames be discarded (regis- ter 5). CS8920A 86 ds238pp2
an enabled interrupt occurs. the selected interrupt request pin is driven high (active) if not already high. isq = 0000h? yes the host reads the isq. the selected interrupt request pin is driven low. no process applicable rxevent bits: extradata, runt, crcerror, rxok. process applicable txevent bits: 16coll, jabber, out-of-window, txok. process applicable bufevent bits: rxdest, rx128, rxmiss, txunderrun, rdy4tx, rxdmaframe, swint. process rxmiss counter. process txcol counter. which event report type? rxevent txevent bufevent rxmiss txcol none of the above service default exit. interrupts re-enabled. figure 5.1. interrupt status queue CS8920A ds238pp2 87
5.2 basic receive operation overview when an incoming packet has passed through the analog front end and manchester decoder, it goes through the following three-step receive process: 1. pre-processing 2. temporary buffering 3. transfer to host figure 5.2 shows the steps in frame reception. as shown in the figure, all receive frames go through the same pre-processing and temporary buffering phases, regardless of transfer method. when a frame has been pre-processed and buff- ered, it can be accessed by the host in either memory or i/o space. in addition, the CS8920A can transfer receive frames to host memory via host dma. this section describes receive frame pre-processing and memory and i/o space re- ceive operation. sections 5.5 through 5.6 describe dma operation. 5.2.1 terminology: packet, frame, and transfer the terms packet, frame, and transfer are used extensively in the following sections. they are defined below for clarity. packet: the term "packet" refers to the entire se- rial string of bits transmitted over an ethernet network. this includes the preamble, start-of- frame delimiter (sfd), destination address (da), source address (sa), length field, data field, pad bits (if necessary), and frame check sequence (fcs, also called crc). figure 3.6 shows the format of a packet. frame: the term "frame" refers to the portion of a packet from the da to the fcs. this includes the destination address (da), source address (sa), length field, data field, pad bits (if neces- sary), and frame check sequence (fcs, also called crc). figure 3.6 shows the format of a frame. the term "frame data" refers to all the data from the da to the fcs that is to be trans- mitted, or that has been received. transfer: the term "transfer" refers to moving data across the isa bus, to and from the CS8920A. during receive operations, only frame data are transferred from the CS8920A to the host (the preamble and sfd are stripped off by the CS8920As mac engine). the fcs may or may not be transferred, depending on the con- figuration. all transfers to and from the CS8920A are counted in bytes, but may be pad- ded for word alignment. yes no use dma? frame held on chip frame dmaed to host memory host reads frame from host memory frame pre- processed frame temporarily buffered packet received preamble and start-of-frame delimiter removed host reads frame from CS8920A memory figure 5.2. frame reception CS8920A 88 ds238pp2
5.2.2 receive configuration after each reset, the CS8920A must be config- ured for receive operation. this can be done automatically using an attached eeprom, or by writing configuration commands to the CS8920As internal registers (see section 3.3). the items that must be configured include: which physical interface to use; which types of frames to accept; which receive events cause interrupts; and, how received frames are transferred. configuring the physical interface: configuring the physical interface consists of determining which ethernet interface should be active and enabling the receive logic for serial reception. this is done via the linectl register (register 13) and is described in table 5.1. choosing which frame types to accept: the rxctl register (register 5) is used to determine which frame types will be accepted by the CS8920A (a receive frame is said to be "ac- cepted" when the frame is buffered, either on chip or in host memory via dma). table 5.2 de- scribes the configuration bits in this register. refer to section 5.3 for a detailed description of destination address filtering. selecting which events cause interrupts : the rxcfg register (register 3) and the bufcfg register (register b) are used to determine which receive events will cause interrupts to the host processor. table 5.3 describes the interrupt en- able (ie) bits in these registers. register 13, linectl bit bit name operation 6 serrxon when set, reception enabled. 8 auionly when set, aui selected (takes precedence over autoaui/10bt). 9 autoaui/ 10bt when set, automatic interface selection enabled. when both bits 8 and 9 are clear, 10base-t selected. elorx squelch when set, receiver squelch level reduced by approximately 6 db. table 5.1. physical interface configuration register 5, rxctl bit bit name operation 6 iahasha when set, individual address frames that pass the hash filter are accepted*. 7promis cuousa when set, all frames are accepted*. 8 rxoka when set, frames with valid length and crc and that pass the da filter are accepted. 9 multicasta when set, multicast frames that pass the hash filter accepted*. a individuala when set, frames with da that matches the ia at packetpage base + 0158h are accepted*. b broadcasta when set, all broadcast frames are accepted*. c crcerrora when set, frames with bad crc that pass the da filter are accepted. d runta when set, frames shorter than 64 bytes that pass the da filter are accepted. e extradataa when set, frames longer than 1518 bytes that pass the da filter are accepted (only the first 1518 bytes are buffered). * must also meet the criteria programmed into bits 8, c, d, and e. table 5.2. frame acceptance criteria register 3, rxcfg bit bit name operation 8 rxokie when set, there is an interrupt if a frame is received with valid length and crc*. c crcerrorie when set, there is an interrupt if a frame is received with bad crc*. d runtie when set, there is an interrupt if a frame is received that is shorter than 64 bytes*. e extradataie when set, there is an interrupt if a frame is received that is longer than 1518 bytes*. * must also pass the da filter before there is an interrupt. CS8920A ds238pp2 89
choosing how to transfer frames: the rxcfg register (register 3) and the busctl register (register 17) are used to determine how frames will be transferred to host memory, as described in table 5.4. 5.2.3 receive frame pre-processing the CS8920A pre-processes all receive frames using a four step process: 1. destination address filtering; 2. early interrupt generation; 3. acceptance filtering; and, 4. normal interrupt generation. figure 5.3 provides a diagram of frame pre- processing. destination address filtering: all incoming frames are passed through the destination ad- dress filter (da filter). if the frames da passes the da filter, the frame is passed on for further pre-processing. if it fails the da filter, the frame is discarded. see section 5.3 for a more detailed description of da filtering. early interrupt generation: the CS8920A sup- ports the following two early interrupts that can be used to inform the host that a frame is being received: rxdest: the rxdest bit (register c, bufevent, bit f) is set as soon as the desti- nation address (da) of the incoming frame passes the da filter. when the rxdestie bit (register b, bufcfg, bit f) is set, the CS8920A generates a corresponding inter- rupt. when rxdest is set, the host is allowed to read the incoming frames da (the first 6 bytes of the frame). rx128: the rx128 bit (register c, bufevent, bit b) is set as soon as the first 128 bytes of the incoming frame have been received. when the rx128ie bit (register b, bufcfg, bit b) is set, the CS8920A gener- ates a corresponding interrupt. when the rx128 bit is set, the rxdest bit is cleared and the host is allowed to read the first 128 bytes of the incoming frame. the rx128 bit is cleared by the host reading the bufevent register (either directly or through the inter- rupt status queue) or by the CS8920A register b, bufcfg bit bit name operation 7 rxdmaie when set, there is an interrupt if one or more frames are transferred via dma. a rxmissie when set, there is an interrupt if a frame is missed due to insufficient receive buffer space. b rx128ie when set, there is an interrupt after the first 128 bytes of receive data have been buffered. d missovfloie when set, there is an interrupt if the rxmiss counter overflows. f rxdestie when set, there is an interrupt after the da of an incoming frame has been buffered. table 5.3. registers 3 & b interrupt configuration register 3, rxcfg bit bit name operation 7 streame when set, streamtransfer enabled. 9 rxdmaonly when set, dma slave operation used for all receive frames. aautorx dmae when set, auto-switch dma enabled. register 17, busctl bit bit name operation b dmaburst when set, dma operations hold the bus for up to approximately 28 m s. when clear, dma operations are continuous. f rxdmasize when set, dma buffer size is 64 kbytes. when clear, dma buffer size is 16 kbytes. table 5.4. frame transfer method CS8920A 90 ds238pp2
detecting the incoming frames end-of-frame (eof) sequence. like all event bits, rxdest and rx128 are set by the CS8920A whenever the appropriate event oc- curs. unlike other event bits, rxdest and rx128 may be cleared by the CS8920A without host in- tervention. all other event bits are cleared only by the host reading the appropriate event register, either directly or through the interrupt status queue (isq). (rxdest and rx128 can also be cleared by the host reading the bufevent register, either directly or through the interrupt status queue). figure 5.4 provides a diagram of the early interrupt process. acceptance filtering: the third step of pre-proc- essing is to determine whether or not to accept the frame by comparing the frame with the crite- ria programmed into the rxctl register (register 5). when the receive frame passes the acceptance filter, the frame is buffered, either on chip or in host memory via dma. if the frame fails the acceptance filter, it is discarded. the re- sults of the acceptance filter are reported in the rxevent register (register 4). normal interrupt generation: the final step of pre-processing is to generate any enabled inter- rupts that are triggered by the incoming frame. interrupt generation occurs when the entire frame has been buffered (up to the first 1518 bytes). for more information about interrupt generation, see section 5.1. 5.2.4 held vs. dmaed receive frames all accepted frames are either held in on-chip ram until processed by the host, or stored in host memory via dma. a receive frame that is held in on-chip ram is referred to as a held re- ceive frame. a frame that is stored in host memory via dma is a dmaed receive frame. this section describes buffering and transferring held receive frames. sections 5.5 through 5.7 de- scribe dmaed receive frames. pass da filter? discard frame destination address filter check: - promiscuousa? - iahasha? - multicasta? - individuala? - broadcasta? receive frame yes no yes no generate interrupts check: - rxokie? - extradataie? - crcerrorie? - runtie? - rxdmaie? pre-processing complete generate early interrupts if enabled (see figure 5.3) acceptance filter check: - rxoka? - extradataa? - runta? - crcerrora? status of receive frame reported in rxevent register, frame discarded. status of receive frame reported in rxevent register, frame accepted into on-chip ram pass accept. filter? figure 5.3. receive frame pre-processing CS8920A ds238pp2 91
eof received? 128 bytes received? eof received? 64 bytes received? eof received? receive frame rxdest cleared and runt set. if runta is set, frame accepted and host may read frame. rxdest cleared and rxok or crcerror set, as appropriate. if rxoka or crcerrora is set, frame accepted and host may read frame. rx128 cleared and rxok, crcerror or extradata set, as appropriate. if extradataa, rxoka or crcerrora is set, frame is accepted and host may read frame. da filter passed? yes no yes no no yes yes no no yes rx128 set and rxdest cleared. host may read first 128 received bytes. yes no discard frame rxdest set. host may read the da (first 6 received bytes). figure 5.4. early interrupt generation CS8920A 92 ds238pp2
5.2.5 buffering held receive frames if space is available, an incoming frame will be temporarily stored in on-chip ram, where it awaits processing by the host. although this re- ceive frame now occupies on-chip memory, the CS8920A does not commit the memory space to it until one of the following two conditions is true: 1. the entire frame has been received and the host has learned about the frame by reading the rxevent register (register 4), either di- rectly or through the isq. or: 2. the frame has been partially received, causing either the rxdest bit (register c, bufevent, bit f) or the rx128 bit (register c, bufevent, bit b) to become set, and the host has learned about the receive frame by read- ing the bufevent register (register c), either directly or through the isq. when the CS8920A commits buffer space to a particular held receive frame (termed a commit- ted received frame), no data from subsequent frames can be written to that buffer space until the frame is freed from commitment. (the com- mitted received frame may or may not have been received error free.) a received frame is freed from commitment by either of the following conditions: 1. the host reads the entire frame sequentially in the order that it was received (first byte in, first byte out). or: 2. the host reads part or none of the frame, and then issues a skip command by setting the skip_1 bit (register 3, rxcfg, bit 6). both early interrupts are disabled whenever there is a committed receive frame waiting to be proc- essed by the host. 5.2.6 transferring held receive frames the host can read out held receive frames in memory or i/o space. to transfer frames in memory space, the host executes repetitive move instructions (rep movs) from packetpage base + 0404h. to transfer frames in i/o space, the host executes repetitive in instructions (rep in) from i/o base + 0000h, with status and length preceding the frame. there are three possible ways that the host can learn the status of a particular frame. it can: 1. read the interrupt status queue; 2. read the rxevent register directly (register 4); or 3. read the rxstatus register (packetpage base + 0400h). 5.2.7 receive frame visibility only one receive frame is visible to the host at a time. the receive frames status can be read from the rxstatus register (packetpage base + 0400h) and its length can be read from the rxlength register (packetpage base + 0402h). for more in- formation about memory space operation, see section 4.11. for more information about i/o space operation, see section 4.12. 5.2.8 example of memory mode receive operation a common length for short frames is 64 bytes, including the 4-byte crc. suppose that such a frame has been received with the CS8920A con- figured as follows: CS8920A ds238pp2 93
the buffercrc bit (register 3, rxcfg, bit b) is set causing the 4-byte crc to be buff- ered with the rest of the receive data. the rxoka bit (register 5, rxctl, bit 8) is set, causing the CS8920A to accept good frames (a good frame is one with legal length and valid crc). the rxokie bit (register 3, rxcfg, bit 8) is set, causing an interrupt to be generated whenever a good frame is received. then the transfer to the host would proceed as follows: 1. the CS8920A generates an rxok interrupt to the host to signal the arrival of a good frame. 2. the host reads the isq (packetpage base + 0120h) to assess the status of the receive frame and sees the contents of the rxevent register (register 4) with the rxok bit (bit 8) set. 3. the host reads the receive frames length from the rxlength register (packetpage base + 0402h). 4. the host reads the frame data by executing 32 consecutive mov instructions from packet- page base + 0404h. the memory map of the 64-byte frame is given in table 5.5. 5.2.9 receive frame byte counter the receive frame byte counter describes the number of bytes received for the current frame. the counter is incremented in real time as bytes are received from the ethernet. the byte counter can be used by the driver to determine how many bytes are available for reading out of the CS8920A. maximum ethernet throughput can be achieved by using i/o or memory modes, and by dedicating the cpu to reading this counter, and using the count to read the frame out of the CS8920A at the same time it is being received by the CS8920A from the ethernet (parallel frame-reception and frame-read-out tasks). the byte count register resides at packetpage base + 50h. following an rxdest or rx128 interrupt, the register contains the number of bytes which are available to be read by the cpu. when the end of frame is reached, the count contains the final count value for the frame, including the allow- ance for the buffercrc option. when this final count is read by the cpu, the count register is set to zero. therefore, to read a complete frame using the byte count register, the register can be read and the data moved until a count of zero is detected. the rxevent register can then be read to determine the final frame status. the sequence is as follows: 1. at the start of a frame, the byte counter matches the incoming character counter. 2. at the end of the frame, the final count includ- ing the allowance for the crc (if the memory space word offset description of data stored in on- chip ram 0400h rxstatus register (the host may skip reading 0400h since rxevent was read from the isq.) 0402h rxlength register (in this example, the length is 40h bytes. the frame starts at 0404h, and runs through 0443h.) 0404h to 0409h 6-byte destination address. 040ah to 040fh 6-byte source address. 0410h to 011h 2-byte length or type field. 0412h to 043fh 46 bytes of data. 0440h crc, bytes 1 and 2 0442h crc, bytes 3 and 4 table 5.5. example memory map CS8920A 94 ds238pp2
buffercrc option is enabled), is held until the byte counter is read. 3. when a read of the byte counter returns a count of zero, the previous count was the final count. 4. rxevent should be read to obtain a final status of the frame, followed by a skip command to complete the operation. note that all rxevents should be processed be- fore using the byte counter. the byte counter should be used following a bufevent when rxdest or rx128 interrupts are enabled. 5.3 receive frame address filtering the CS8920A is equipped with a destination address (da) filter used to determine which re- ceive frames will be accepted. (a receive frame is said to be "accepted" by the CS8920A when the frame data are placed in either on-chip mem- ory, or in host memory by dma). the da filter can be configured to accept the following frame types: individual address frames: for all individual address frames, the first bit of the da is a 0 (da[0] = 0), indicating that the address is a physical address. the address filter accepts indi- vidual address frames whose da matches the individual address (ia) stored at packetpage base + 0158h, or whose hash-filtered da matches one of the bits programmed into the logical address filter (the hash filter is de- scribed later in this section). multicast frames: for multicast frames, the first bit of the da is a 1 (da[0] = 1), indicating that the frame is a logical address. the address filter accepts multicast frames whose hash-fil- tered da matches one of the bits programmed into the logical address filter (the hash filter is described later is this section). as shown in table 5.7, broadcast frames can be accepted as multi- cast frames under a very specific set of condi- tions. broadcast frames: broadcast frames have a da equal to ffff ffff ffffh. in addition, the CS8920A can be configured for promiscuous mode, in which case it will accept all receive frames, irrespective of da. configuring the destination address filter the da filter is configured by programming five da filter bits in the rxctl register (register 5): iahasha, promiscuousa, multicasta, individu- ala, and broadcasta. four of these bits are associated with four status bits in the rxevent register (register 4): iahash, hashed, individu- aladr, and broadcast. the rxevent register reports the results of the da filter for a given receive frame. the bits associated with da filter- ing are summarized below: bit # rxctl register 5 rxevent register 4 6iahasha iahash (used only if iahasha = 1) 7 promiscuousa 9 multicasta hashed a individuala individualadr (used only if individuala = 1) b broadcasta broadcast (used only if broadcasta = 1) the iahasha, multicasta, individuala, and broadcasta bits are used independently. as a re- sult, many da filter combinations are possible. for example, if multicasta and individuala are set, then all frames that are either multicast or individual address frames are accepted. the promiscuousa bit, when set, overrides the other four da bits and allows all valid frames to be accepted. table 5.6 summarizes the configuration options available for da filtering. CS8920A ds238pp2 95
it may become necessary for the host to change the destination address (da) filter criteria with- out resetting the CS8920A. this can be done as follows: 1. clear serrxon (register 13, linectl, bit 6) to prevent any additional receive frames while the filter is being changed. 2. modify the da filter bits (b, a, 9, 7, and 6) in the rxctl register. modify the logical ad- dress filter at packetpage base + 0150h, if necessary. modify the individual address at packetpage base + 0158h, if necessary. 3. set serrxon to re-enable the receiver. because the receiver has been disabled, the CS8920A will ignore frames while the host is changing the da filter. hash filter the hash filter is used to help determine which multicast frames and which individual address frames should be accepted by the CS8920A. hash filter operation: see figure 5.5. the da of the incoming frame is passed through the crc logic, generating a 32-bit crc value. the six most-significant bits of the crc are latched into the 6-bit hash register (hr). the contents of the hr are passed through a 6-to-64-bit decoder, asserting one of the decoders outputs. the as- serted output is compared with a corresponding bit in the 64-bit logical address filter, located at packetpage base + 0150h. if the decoder output and the logical address filter bit match, the frame passes the hash filter and the hashed bit (register 4, rxevent, bit 9) is set. if the two do not match, the frame fails the filter and the hashed bit is clear. whenever the hash filter is passed by a "good" frame, the rxok bit (register 4, rxevent, bit 8) is set and the bits in the hr are mapped to the hash table index bits (register 4, rxevent, bits a through f). broadcast frame hashing exception table 5.7 describes in detail the content of the rxevent register for each output of the hash and address filters and describes an exception to nor- mal processing. that exception can occur when the hash-filter broadcast address matches a bit in the logical address filter. to properly account for this exception, the software driver should use the following test to determine if the rxevent register contains a normal rxevent (meaning bits e-a are used for extradata, runt, crc error, broadcast and individualadr) or a hash-table rxevent (meaning bits f-a contain the hash ta- ble index). iahasha promiscuousa multicasta individuala broadcasta frames accepted 0 0 010 individual address frames with da matching the ia at packetpage base + 0158h 1 0 000 individual address frames with da that pass the hash filter (da[0] must be 0) 0 0 100 multicast frames with da that pass the hash filter (da[0] must be 1) 0 0 001 broadcast frames x 1 xxx all frames table 5.6. configuration options for da filtering CS8920A 96 ds238pp2
64-bit logical address filter (laf) written into packetpage base + 150h 6-to-64 decoder 1 64 CS8920A crc logic destination address (da) from incoming frame 32-bit crc value (msb) (lsb) 6-bit hash register (hr) [hash table index] 64-input or gate to hashed bit figure 5.5. hash filter operation address type of received frame erred frame? passes hash filter? contents of rxevent bits f-a bit 9 hashed bit 8 rxok bit 6 iahash individual address no yes hash table index 1 1 1 no no extraruntcrcbroadcastindividual dataerroradr 010 yes dont care extraruntcrcbroadcastindividual dataerroradr 000 multicast address no yes hash table index 1 1 0 no no extraruntcrcbroadcastindividual dataerroradr 010 yes dont care extraruntcrcbroadcastindividual dataerroradr 000 broadcast address no yes (note 1) extraruntcrcbroadcastindividual dataerroradr (actual value x00010) 110 no no extraruntcrcbroadcastindividual dataerroradr 010 yes dont care extraruntcrcbroadcastindividual dataerroradr 000 notes: 1. broadcast frames are accepted as multicast frames if and only if all the following conditions are met simultaneously: a) the logical address filter is programmed as: (msb) 0000 8000 0000 0000h (lsb). note that this laf value corresponds to a multicast addresses of both all 1s and 03-00-00-00-00-01. b) the rx control register (register 5) is programmed to accept individuala, multicasta, rxok-only, and the following address filters were enabled: iahasha and broadcasta. 2. not (note 1). 3. this frame is accepted if the promiscuous accept bit is set. 4. this frame is accepted if either promiscuous accept or broadcast accept bit are set. table 5.7. contents of rxevent upon various conditions CS8920A ds238pp2 97
if bit hashed =0, or bit rxok=0, or (bits f-a = 02h and the destination address is all ones) then rxevent contains a normal rxevent else rxevent contained a hash rxevent. 5.4 rx missed and tx collision counters 5.4.1 rxmiss counter the rxmiss counter is (register 10) incremented when receive data are lost (missed) due to slow movement of the data out of the receive buffer. rxmiss is a ten-bit counter (bit 6 to bit f) with bit 6 as the lsb. rxmiss is cleared when read. when missovfloie is (register b, buf cfg, bit d) set, there is an interrupt when rxmiss incre- ments from 1ffh to 200h. the actual overflow is at 3ffh. interrupting at 200h provides an addi- tional 512 (decimal) counts before rxmiss actually overflows back to 000h. 5.4.2 txcol counter the txcol counter (register 12) is incremented when there is a transmit collision. txcol is a ten-bit counter (bit 6 to bit f) with bit 6 as the lsb. txcol is cleared when read. when txcolovfie (register b, buf cfg, bit c) is set, there is an interrupt when rxmiss incre- ments from 1ffh to 200h. the actual overflow is at 3ffh. interrupting at 200h provides an addi- tional 512 (decimal) counts before txcol actually overflows back to 000h. 5.5 receive dma 5.5.1 overview the CS8920A supports a direct interface to the host dma controller allowing it to transfer re- ceive frames to host memory via slave dma. the dma option applies only to receive frames, not to transmit operation. the CS8920A offers three possible receive dma modes: 1. receive-dma-only mode: all receive frames are transferred via dma. 2. auto-switch dma mode: dma is used only when needed to help prevent missed frames. 3. streamtransfer mode: dma is used to mini- mize the number of interrupts to the host. this section provides a description of receive- dma-only mode. section 5.6 describes auto-switch dma and section 5.7 describes streamtransfer. 5.5.2 configuring the CS8920A for dma operation the CS8920A interfaces to the host dma con- troller through one pair of the dma request/acknowledge pins (see section 3.2 for a description of the CS8920As dma interface). four registers are used for dma operation. these are described in table 5.8. receive-dma-only mode is enabled by setting the rxdmaonly bit (register 3, rxcfg, bit 9). note that if the rxdmaonly bit and the autorxdmae bit (register 3, rxcfg, bit a) are both set, then rxdmaonly takes precedence, and the CS8920A is in dma mode for all re- ceive frames. 5.5.3 dma receive buffer size in receive dma mode, the CS8920A stores re- ceived frames (along with their status and length) in a circular buffer located in host memory space. the size of the circular buffer is deter- mined by the rxdmasize bit (register 17, busctl, bit d). when rxdmasize is clear, the CS8920A 98 ds238pp2
buffer size is 16 kbytes. when rxdmasize is set, the buffer is 64 kbytes. it is the hosts task to locate and keep track of the dma receive buffers base address. the dma start-of-frame register is the only circuit affected by this bit. application note: as a result of the pc ar- chitecture, dma cannot occur across a 128k boundary in memory. thus, the dma buffer re- served for the CS8920A must not cross a 128k boundary in host memory if dma operation is desired. requesting a 64k, rather than a 16k buffer, increases the probability of crossing a 128k alignment boundary. after the driver re- quests a dma buffer, the driver must check for a boundary crossing. if the boundary is crossed, then the driver must disable dma functionality. 5.5.4 receive-dma-only operation if space is available, an incoming frame is tem- porarily stored in on-chip ram. when the entire frame has been received, pre-processed, and ac- cepted, the CS8920A signals the dma controller that a frame is to be transferred to host memory by driving the selected dma request pin high. the dma controller acknowledges the request by driving the dma acknowledge pin low. the CS8920A then transfers the contents of the rxstatus register (packetpage base + 0400h) and the rxlength register (packetpage base + 0402h) to host memory, followed by the frame data. if the dmaburst bit (register 17, busctl, bit b) is clear, the dma request pin remains high until the entire frame is transferred. if the dmaburst bit is set, the dma request pin (dmarq) re- mains high for approximately 28 m s then goes low for approximately 1.3 m s to give the cpu and other peripherals access to the bus. the CS8920As dma request pin remains active (high), until all but one word is transferred. the dma request pin goes inactive just before transfer of the last word. for an isa bus, the dma request signal is latched during a dma cycle. therefore, a dma controller will gener- ate one more cycle after the CS8920As dma request pin goes inactive. the CS8920A expects this additional dma cycle after its dma request pin goes inactive. when the transfer is complete, the CS8920A does the following: updates the dma start-of-frame register (packetpage base + 0026h); updates the dma frame count register (packetpage base + 0028h); updates dma byte count register (packet- page base + 002ah); sets the rxdmaframe bit (register c, bufevent, bit 7); and, de-allocates the buffer space used by the transferred frame. in addition, if the rxdmaie bit (register b, bufcfg, bit 7) is set, a corresponding interrupt occurs. packetpage address register description 0374h dma channel number: dma channel number (0, 1, or 2) that defines the dmarq/dmack pin pair used. 0026h dma start-of-frame: 16-bit value that defines the offset from the dma base address to the start of the most recently transferred received frame. 0028h dma frame count: the lower 12 bits define the number of valid frames transferred via dma since the last read-out of this register. the upper 4 bits are reserved and not applicable. 002ah dma byte count: defines the number of bytes that have been transferred via dma since the last read-out of this register. table 5.8. receive dma registers CS8920A ds238pp2 99
when the host processes dmaed frames, it must read the dma frame count register. whenever a receive frame is missed (lost) due to insufficient receive buffer space, the rxmiss counter (register 10) is incremented. a missed receive frame causes the counter to increment in either dma or non-dma modes. note that when in dma mode, reading the con- tents of the rxevent register will return 0000h. status information should be obtained from the dma buffer. 5.5.5 committing buffer space to a dmaed frame although a receive frame may occupy space in the host memorys circular dma buffer, the CS8920As memory manager does not commit the buffer space to the receive frame until the en- tire frame has been transferred and the host learns of the frames existence by reading the frame count register (packetpage base + 0028h). when the CS8920A commits dma buffer space to a particular dmaed receive frame (termed a committed received frame), no data from sub- sequent frames can be written to that buffer space until the committed received frame is freed from commitment. (the committed received frame may or may not have been received error free.) a committed dmaed receive frame is freed from commitment by any one of the following conditions: 1. the host re-reads the dma frame count regis- ter (packetpage base + 0028h). 2. new frames have been transferred via dma, and the host reads the bufevent register (either directly or from the isq) and sees that the rxdmaframe bit is set (register c, bit 7) (this condition is termed an "implied skip"). 3. the host issues a reset-dma command by setting the resetrxdma bit (register 17, busctl, bit 6). 5.5.6 dma buffer organization when dma is used to transfer receive frames, the dma start-of-frame register (packetpage base + 0026h) defines the offset from the dma base to the start of the most recently transferred received frame. frames stored in the dma buff- er are transferred as words and maintain double-word (32-bit) alignment. unfilled mem- ory space between successive frames stored in the dma buffer may result from double-word non-streamtransfer mode streamtransfer mode (see section 5.7) to set rxdmaframe the rxdmaframe bit is set whenever the dma frame count register (packetpage base + 0028h) transitions to non-zero. the rxdmaframe bit is set at the end of a streamtransfer cycle. to clear rxdmaframe the dma frame count is zero. the dma frame count is zero. table 5.9. rxdmaframe bit CS8920A 100 ds238pp2
alignment. these "holes" may be 1, 2, or 3 bytes, depending on the length of the frame preceding the hole. 5.5.7 rxdmaframe bit the rxdmaframe bit (register c, bufevent, bit 7) is controlled by the CS8920A and is set whenever the value in the dma frame count register is non-zero. the host cannot clear rxdmaframe by reading the bufevent register (register c). table 5.9 summarizes the criteria used to set and clear rxdmaframe. 5.5.8 receive dma example without wrap-around figure 5.6 shows three frames stored in host memory by dma without wrap-around. rxstatus - frame 1 rxlength - frame 1 rxstatus - frame 2 rxlength - frame 2 frame 2 rxstatus - frame 3 rxlength - frame 3 frame 3 dma buffer base address frame 1 "holes" due to double-word alignment dma start-of-frame register (packetpage base + 0026h) points here. dma byte count (packetpage base + 002ah) figure 5.6. example of frames stored in dma buffer CS8920A ds238pp2 101
5.5.9 receive dma operation for rxdma-only mode in an rxdmaonly mode, a system dma moves all the received frames from the on-chip memory to an external 16- or 64-kbyte buffer memory. the received frame must have passed the desti- nation address filter, and must be completely received. usually the dma receive frame inter- rupt (rxdmaie, bit 7, register b, bufcfg) is set so that the CS8920A generates an interrupt when a frame is transferred by dma. figure 5.7 shows how a dma receive frame interrupt is processed. in the interrupt service routine, the bufevent register (register c), bit rxdma frame (bit 7) indicates that one or more receive frames were transferred using dma. the software driver should maintain a pointer (e.g. pdma_start) that will point to the beginning of a new frame. after the CS8920A is initialized and before any frame is received, pointer p dma_start points to the beginning of the dma buffer memory area. the first read of the dma frame count, c dma , commits the memory covered by the c dma count, and the dma cannot overwrite this com- mitted space until the space is freed. the driver then processes the frames described by the c dma count and makes a second read of the dma frame count. this second read frees the buffer memory space described by the c dma counter. during the frame processing, the software should advance the p dma_start pointer. at the end of processing a frame, pointer p dma_start should process the c dma frames read the dma frame count (c dma ) (packetpage base + 0028h) no c dma = 0 ? host enters interrupt routine process other events that caused interrupt yes no rxdma frame bit set? process other events that caused interrupt yes figure 5.7. rxdma only operation CS8920A 102 ds238pp2
be made to align with a double-word boundary. the software remains in the loop until the dma frame count read is zero. 5.6 auto-switch dma overview the CS8920A supports a unique feature, auto- switch dma, that allows it to switch between memory or i/o mode and receive dma auto- matically. auto-switch dma allows the CS8920A to realize the performance advantages of memory or i/o mode while minimizing the number of missed frames that could result due to slow processing by the host. configuring the CS8920A for auto-switch dma auto-switch dma mode requires the same con- figuration as receive-dma-only mode, with one exception: the autorxdmae bit (register 3, rxcfg, bit a) must be set, and the rxdmaonly bit (register 3, rxcfg, bit 9) must be clear (see section 5.5.2). in auto-switch dma mode, the CS8920A operates in non-dma mode if possible, only switching to slave dma if necessary. note that if the autorxdmae bit and the rxdmaonly bit (register 3, rxcfg, bit 9) are both set, the CS8920A uses dma for all receive frames. auto-switch dma operation whenever a frame begins to be received in auto- switch dma mode, the CS8920A checks to see if there is enough on-chip buffer space to store a maximum length frame. if there is, the incoming frame is pre-processed and buffered as normal. if there isnt, the CS8920As mac engine com- pares the frames destination address (da) to the criteria programmed into the da filter. if the incoming da fails the da filter, the frame is dis- carded. if the da passes the da filter, the CS8920A automatically switches to dma mode and starts transferring the frame(s) currently be- ing held in the on-chip buffer into host memory. this frees up buffer space for the incoming frame. figure 5.8 shows the steps the CS8920A goes through in determining when to automatically switch to dma. whenever the CS8920A automatically enters dma, at least one complete frame is already stored in the on-chip buffer. because frames are transferred to the host in the same order as re- ceived (first in, first out), the beginning of the received frame that triggered the switch to dma all frames use dma yes yes no no yes no no yes frame discarded frame buffered in on-chip ram auto-switch dma disabled packet received auto-switch to dma frame passed the da filter? rxdma only bit=1 more buffer space available? autorxdma bit=1? figure 5.8. conditions for switching to dma CS8920A ds238pp2 103
is not the first frame to be transferred. instead, the oldest non-committed frame in the on-chip buffer is the first frame to use dma. when dma begins, any pending rxevent reports in the interrupt status queue are discarded because the host cannot process those events until the corresponding frames have been completely dmaed. auto-switch dma works only on entire received frames. the CS8920A does not use auto-switch dma to transfer partial frames. also, when a frame has been committed (see section 5.2.5), the CS8920A will not switch to dma mode un- til the committed frame has been transferred completely or skipped. after a complete frame has been moved to host memory, the CS8920A updates the dma start- of-frame register (packetpage base + 0026h), the dma frame count register (packetpage base + 0028h), and the dma byte count register, then sets the rxdmaframe bit (register c, bufevent, bit 7). if rxdmaie (register b, bufcfg, bit 7) is set, a corresponding interrupt occurs. dma channel speed vs. missed frames when the CS8920A starts dma, the entire old- est, non-committed frame must be placed in host memory before on-chip buffer space will be freed for the next incoming frame. if the oldest frame is relatively large, and the next incoming frame is also large, the incoming frame may be missed, depending on the speed of the dma channel. if this happens, the CS8920A will in- crement the rxmiss counter (register 10) and clear any event reports (rxevent and bufevent) associated with the missed frame. exit from dma when the CS8920A has activated receive dma, it remains in dma mode until all of the follow- ing are true: the host processes all rxevent and bufevent reports pending in the isq. the host reads a zero value from the dma frame count register (packetpage base + 0028h). the CS8920A is not in the process of trans- ferring a frame via dma. auto-switch dma example figure 5.9 shows how the CS8920A enters and exits auto-switch dma mode. CS8920A 104 ds238pp2
f r a m e 1 f r a m e 2 frame 3 starts to be received and passes the da filter. this activates auto-switch dma. f r a m e 3 frame 1 is placed in host memory via dma freeing space for the incoming frame 3. the CS8920A updates the dma frame count, dma start of frame and dma byte count registers. it then sets the rxdma dmaframe bit and generates an interrupt. frame 2 is placed in host memory via dma and the CS8920A updates the dma registers. the host responds to the rxdmaframe interrupt, and reads the frame count register, which is cleared when read. since there are no receive interrupts pending, the CS8920A exits dma (assumes frame 3 is still coming in). receive dma used during this time. at this point, the CS8920A does not have sufficient buffer space for another complete large frame (1518 bytes). frame 1 received and completely stored in on-chip ram. frame 2 received and completely stored in on-chip ram. enter example here exit example time frame 3 is completely buffered in on-chip ram, and awaits processing by the host. entering this example, the receive buffer is empty and the dma frame count (packetpage base + 0028h) is zero. figure 5.9. example of auto-switch dma CS8920A ds238pp2 105
5.7 streamtransfer overview the CS8920A supports an optional feature, streamtransfer, that can reduce the amount of cpu overhead associated with frame reception. streamtransfer works during periods of high re- ceive activity by grouping multiple receive events into a single interrupt, thereby reducing the number of receive interrupts to the host proc- essor. during periods of peak loading, streamtransfer will eliminate 7 out of every 8 interrupts, cutting interrupt overhead by up to 87%. configuring the CS8920A for streamtransfer streamtransfer is enabled by setting the streame bit along with either the autorxdmae bit or the rxdmaonly bit in register receiver configura- tion (register 3). (streamtransfer must not be selected unless either one of autorxdmae or rxdma-only is selected.) streamtransfer only applies to "good" frames (frames of legal length with valid crc). therefore, the rxoka bit and the rxokie bit must both be set. finally, streamtransfer works on whole packets and is not compatible with early interrupts. this re- quires that the rxdestie bit and the rx128ie bit both be clear. table 5.10 summarizes how to configure the CS8920A for streamtransfer. streamtransfer operation when streamtransfer is enabled, the CS8920A will initiate a streamtransfer cycle whenever two or more frames with the following charac- teristics are received: 1. have passed the destination address filter; 2. are of legal length with valid crc; and, 3. are spaced "back-to-back" (between 9.6 and 52 m s apart). during a streamtransfer cycle the CS8920A does the following: delays the normal rxok interrupt associated with the first receive frame; switches to receive dma mode; transfers up to eight receive frames into host memory via dma; updates the dma start-of-frame register (packetpage base + 0026h); updates the dma frame count register (packetpage base + 0028h); updates dma byte count register (packet- page base + 002ah); sets the rxdmaframe bit (register c, bufevent, bit 7); and, generates an rxdmaframe interrupt. keeping streamtransfer mode active when the CS8920A initiates a streamtransfer cycle, it will continue to execute cycles as long as the following conditions hold true: register name bit bit name value register 3, rxcfg 7 streame 1 8rxokie1 9 or a rxdmaonly or autorxdma 1 or 1 register 5, rxctl 8 rxoka 1 register b, bufcfg 7 rxdmaie 1 frxdestie0 b rx128ie 0 table 5.10. stream transfer configuration CS8920A 106 ds238pp2
all packets received are of legal length with valid crc; each packet follows its predecessor by less than 52 m s; and, the da of each packet passes the da filter. if any of these conditions are not met, the CS8920A exits streamtransfer by generating rxok and rxdma interrupts. the CS8920A then returns to either memory, i/o, or dma mode, depending on configuration. example of streamtransfer figure 5.10 shows how four back-to-back frames, followed by five back-to-back frames, would be received without streamtransfer. fig- ure 5.11 shows how the same sequence of frames would be received with streamtransfer. receive dma summary table 5.11 summarizes the receive dma con- figuration options supported by the CS8920A. rxdmaonly (register 3, rxcfg, bit 9) autorxdmaie (register 3, rxcfg, bit a) rxdmaie (register b, bufcfg, bit 7) rxokie (register 3, rxcfg, bit 8) CS8920A configuration 1 na 0 0 receive dma used for all receive frames, without interrupts. 1 na 1 0 receive dma used for all receive frames, with bufevent interrupts. 0 1 0 0 auto-switch dma used if necessary, without interrupts. 0 1 1 1 auto-switch dma used if necessary, with rxevent and bufevent interrupts possible. 0 0 na 1 memory or i/o mode only. table 5.11. receive dma configuration options 4 back-to-back frames 5 back-to-back frames interrupt request 9 interrupts for 9 "good" packets time t > 52 us figure 5.10. receive example without stream transfer 4 back-to-back frames 5 back-to-back frames interrupt request 2 interrupts for 9 "good" packets time t > 52 us figure 5.11. receive example with stream transfer CS8920A ds238pp2 107
5.8 transmit operation 5.8.1 overview packet transmission occurs in two phases. in the first phase, the host moves the ethernet frame into the CS8920As buffer memory. the first phase begins with the host issuing a transmit command. this informs the CS8920A that a frame is to be transmitted and tells the chip when (i.e. after 5, 381, or 1021 bytes have been trans- ferred or after the full frame has been transferred to the CS8920A) and how the frame should be sent (i.e. with or without crc, with or without pad bits, etc.). the host follows the transmit command with the transmit length, indicating how much buffer space is required. when buffer space is available, the host writes the ethernet frame into the CS8920As internal memory, us- ing either memory or i/o space. in the second phase of transmission, the CS8920A converts the frame into an ethernet packet then transmits it onto the network. the second phase begins with the CS8920A transmit- ting the preamble and start-of-frame delimiter as soon as the proper number of bytes have been transferred into its transmit buffer (5, 381, 1021 bytes or full frame, depending on configuration). the preamble and start-of-frame delimiter are followed by the data transferred into the on-chip buffer by the host (destination address, source address, length field and llc data). if the frame is less than 64 bytes, including crc, the CS8920A adds pad bits if configured to do so. finally, the CS8920A appends the proper 32-bit crc value. 5.8.2 transmit configuration after each reset, the CS8920A must be config- ured for transmit operation. this can be done automatically, using an attached eeprom, or by writing configuration commands to the CS8920As internal registers (see section 3.3). the items that must be configured include which physical interface to use and which transmit events cause interrupts. configuring the physical interface: configuring the physical interface consists of determining which ethernet interface should be active (10base-t or aui), and enabling the transmit logic for serial transmission. configuring the physical interface is accomplished via the linectl register (register 13) and is described in table 5.12. note that the CS8920A will transmit in 10base-t mode when no link pulses are being received only if bit disablelt is set in register test control (register 19, bit 7). selecting which events cause interrupts: the txcfg register (register 7) and the bufcfg register (register b) are used to determine which transmit events will cause interrupts to the host processor. tables 5.13 and 5.14 describe the in- terrupt enable (ie) bits in these registers. register 13, linectl bit bit name operation 7 sertxon when set, transmission enabled. 8 auionly when set, aui selected (takes precedence over autoaui/10bt). when clear, 10base-t is selected. 9 autoaui/ 10bt when set, automatic interface selection is enabled. bmod backoffe when set, the modified backoff algorithm is used. when clear, the standard backoff algorithm is used. d2-part defdis when set, two-part deferral is disabled. table 5.12. physical interface configuration CS8920A 108 ds238pp2
5.8.3 changing the configuration when the host configures these registers it does not need to change them for subsequent packet transmissions. if the host does choose to change the txcfg or bufcfg registers, it may do so at any time. the effects of the change are noticed immediately. that is, any changes in the inter- rupt enable (ie) bits may affect the packet currently being transmitted. if the host chooses to change bits in the linectl register after initialization, the mod- backoffe bit and any receive related bit (lorxsquelch, serrxon) may be changed at any time. however, the autoaui/10bt and auionly bits should not be changed while the sertxon bit is set. if any of these three bits are to be changed, the host should first clear the sertxon bit (register 13, linectl, bit 7), and then set it when the changes are complete. 5.8.4 enabling crc generation and padding whenever the host issues a transmit request command, it must indicate whether or not the cyclic redundancy check (crc) value should be appended to the transmit frame, and whether or not pad bits should be added (if needed). ta- ble 5.15 describes how to configure the CS8920A for crc generating and padding. 5.8.5 individual packet transmission whenever the host has a packet to transmit, it must issue a transmit request to the CS8920A consisting of the following three operations in the exact order shown: 1. the host must write a transmit command to the txcmd register (packetpage base + 0144h or i/o base +0004h). the contents of register 7, txcfg bit bit name operation 6 loss-of- crsie when set, there is an interrupt whenever the CS8920A fails to detect carrier sense after transmitting the preamble (applies to the aui only). 7 sqeerrorie when set, there is an interrupt whenever there is an sqe error. 8 txokie when set, there is an interrupt whenever a frame is transmitted successfully. 9out-of- windowie when set, there is an interrupt whenever a late collision is detected. a jabberie when set, there is an interrupt whenever there is a jabber condition. b anycollie w hen set, there is an interrupt whenever there is a collision. f 16collie w hen set, there is an interrupt whenever the CS8920A attempts to transmit a single frame 16 times. table 5.13. transmitting interrupt configuration register b, bufcfg bit bit name operation 8 rdy4txie when set, there is an interrupt whenever buffer space becomes available for a transmit frame (used with a transmit request). 9 txunder runie when set, there is an interrupt when the CS8920A runs out of data after transmit has started. ctxcol ovfloie when set, there is an interrupt whenever the txcol counter overflows. table 5.14. tranmit interrupt configuration register 9, txcmd txpad dis (bit d) inhibit crc (bit c) operation 0 0 pad to 64 bytes if necessary (including crc). 0 1 send a runt frame if specified length less than 60 bytes. 1 0 pad to 60 bytes if necessary (without crc). 1 1 send runt if specified length less than 64. the CS8920A will not transmit a frame that is less than 3 bytes. table 5.15. crc and padding configuration CS8920A ds238pp2 109
the txcmd register may be read back from the txcmd register (register 9). 2. the host must write the frames length to the txlength register (packetpage base + 0146h or i/o base + 0006h). 3. the host must read the busst register (regis- ter 18) to check rdy4txnow (bit 8). the information written to the txcmd register tells the CS8920A how to transmit the next frame. the bits that must be programmed in the txcmd register are described in table 5.16. for each individual packet transmission, the host must issue a complete transmit request. also, the host must write to the txcmd register be- fore each packet transmission, even if the contents of the txcmd register do not change. the transmit request may be in either memory space or i/o space, as described in sections 5.8.6 and 5.8.7. note for rev b silicon, it is recommended that the use txstart of 01 (start preamble after 381 bytes have been transferred). for rev c and later, any txstart mode may be used. 5.8.6 transmit in poll mode in poll mode, rdy4txie bit (register b bufcfg, bit 8) must be clear (interrupt dis- abled). the transmit operation occurs in the following order and is shown in figure 5.12 1. the host bids for frame storage by writing the transmit command to the txcmd register (memory base+ 0144h in memory mode or i/o base + 0004h in i/o mode). 2. the host writes the transmit frame length to the txlength register (memory base + 0146h in memory mode or i/o base + 0006h in i/o mode). if the transmit length is erroneous, the command is discarded and the txbiderr bit (register 18, busst, bit 7) is set. 3. the host reads the busst register. this read is performed in memory mode by reading regis- ter 18, at memory base + 0138h. in i/o mode, the host must first set the packetpage pointer at the correct location by writing 0138h to the packetpage pointer port (i/o base + 000ah). the host can then read the busst register from the packetpage data port (i/o base + 000ch). after reading the register, the rdy4txnow bit (bit 8) is checked. if the bit is set, the frame can be written. if the bit is clear, the host must continue reading the busst register (register 18) and checking the rdy4txnow bit (bit 8) until the bit is set. when the CS8920A is ready to accept the frame, the host transfers the entire frame from host register 9, txcmd bit bit name operation 76tx start 0 0 start preamble after 5 bytes have been transferred to the CS8920A. 0 1 start preamble after 381 bytes have been transferred to the CS8920A. 1 0 start preamble after 1021 bytes have been transferred to the CS8920A. 1 1 start preamble after entire frame has been transferred to the CS8920A. 8 force when set, the CS8920A discards any frame data currently in the transmit buffer. 9 onecoll when set, the CS8920A will not attempt to re-transmit any packet after a collision. c inhibitcrc when set, the CS8920A does not append the 32-bit crc value to the end of any transmit packet. d txpaddis when set, the CS8920A will not add pad bits to short frames. table 5.16. tx command configuration CS8920A 110 ds238pp2
CS8920A commits buffer space to transmit frame host reads the busst register (register 18) transmit request host writes transmit frame to CS8920A host writes transmit command to the txcmd register host writes transmit frame length to the txlength register exit transmit process yes no enter packet transmit process rdy4 txnow bit = 1? polling loop no yes is txcmd pending? exit: can't issue command note: issuing a command at this point will cause previous transmit frame to be lost. CS8920A transmits frame figure 5.12. transmit operation in polling mode CS8920A ds238pp2 111
CS8920A commits buffer space to transmit frame host reads isq host reads the busst register (register 18) transmit request host writes transmit frame to CS8920A host writes transmit command to the txcmd register host writes transmit frame length to the txlength register rdy4tx bit = 1? exit transmit process no yes no yes rdy4 txnow bit = 1? host enters interrupt routine exit wait-for-interrupt wait for next interrupt no yes is txcmd pending? exit: can't issue command note: issuing a command at this point will cause previous transmit frame to be lost. enter packet transmit process CS8920A transmits frame figure 5.13. transmit operation in interrupt mode CS8920A 112 ds238pp2
memory to CS8920A memory using rep in- struction (rep movs to memory base + 0a00h in memory mode, and rep out to re- ceive/transmit data port (i/o base + 0000h) in i/o mode). 5.8.7 transmit in interrupt mode in interrupt mode, rdy4txie bit (register b bufcfg, bit 8) must be set for transmit opera- tion. transmit operation occurs in the following order and is shown in figure 5.13 1. the host bids for frame storage by writing the transmit command to the txcmd register (memory base + 0144h in memory mode or i/o base + 0004h in i/o mode). 2. the host writes the transmit frame length to the txlength register (memory base + 0146h in memory mode or i/o base + 0006h in i/o mode). if the transmit length is erroneous, the command is discarded and the txbiderr, bit 7, in busst (register 18) is set. 3. the host reads the busst register. this read is performed in memory mode by reading regis- ter 18, at memory base + 0138h. in i/o mode, the host must first set the packetpage pointer at the correct location by writing 0138h to the packetpage pointer port (i/o base + 000ah), it than can read the busst register from the packetpage data port (i/o base + 000ch). after reading the register, the rdy4txnow bit is checked. if the bit is set, the frame can be written to CS8920A memory. if rdy4txnow is clear, the host will have to wait for the CS8920A buffer memory to be- come available at which time the host will be interrupted. on interrupt, the host enters the interrupt service routine and reads isq regis- ter (memory base + 0120h in memory mode or i/o base + 0008h in i/o) and checks the rdy4tx bit (bit 8). if rdy4tx is clear then the CS8920A waits for the next interrupt. if rdy4tx is set, then the CS8920A is ready to accept the frame. 4. when the CS8920A is ready to accept the frame, the host transfers the entire frame from host memory to CS8920A memory using rep instruction (rep movs to memory base + 0a00h in memory mode, and rep out to receive/transmit data port (i/o base + 0000h) in i/o mode). 5.8.8 completing transmission when the CS8920A successfully completes transmitting a frame, it sets the txok bit (regis- ter 8, txevent, bit 8). if the txokie bit (register 7, txcfg, bit 8) is set, the CS8920A generates a corresponding interrupt. 5.8.9 rdy4txnow vs. rdy4tx the rdy4txnow bit (register 18, busst, bit 8) is used to tell the host that the CS8920A is ready to accept a frame for transmission. this bit is used during the transmit request process or af- ter the transmit request process to signal the host that space has become available when inter- rupts are not being used (i.e. the rdy4txie bit (register b, bufcfg, bit 8) is not set). also, the rdy4tx bit is used with interrupts and requires the rdy4txie bit be set. figures 5.12 & 5.13 provide diagrams of error free transmission without collision. for revision b of CS8920A, if dma mode is used for receive operation, rdy4tx interrupt may not occur every time. after servicing a rxdma interrupt, check the bit rdy4txnow to take ap- propriate action. 5.8.10 committing buffer space to a transmit frame when the host issues a transmit request, the CS8920A checks the length of the transmit CS8920A ds238pp2 113
frame to see if there is sufficient on-chip buffer space. if there is, the CS8920A sets the rdy4txnow bit. if not, and the rdy4txie bit is set, the CS8920A waits for buffer space to free up and then sets the rdy4tx bit. if rdy4txie is not set, the CS8920A sets the rdy4txnow bit when space becomes available. even though transmit buffer space may be avail- able, the CS8920A does not commit buffer space to a transmit frame until all of the following are true: 1. the host must issues a transmit request; 2. the transmit request must be successful; and, 3. either the host reads that the rdy4txnow bit (register 18, busst, bit 8) is set, or the host reads that the rdy4tx bit (register c, bufevent, bit 8) is set. if the CS8920A commits buffer space to a par- ticular transmit frame, it will not allow subsequent frames to be written to that buffer space as long as the transmit frame is committed. after buffer space is committed, the frame is subsequently transmitted unless any of the fol- lowing occur: 1. the host completely writes the frame data, but transmission failed on the ethernet line. there are three such failures, and these are in- dicated by three transmit error bits in the txevent register (register 8): 16coll, jabber, or out-of-window. or: 2. the host aborts the transmission by setting the force (register 9, txcmd, bit 8) bit. in this case, the committed transmit frame, as well as any yet-to-be-transmitted frames queued in the on-chip memory, are cleared and not transmitted. the host should make txlength = 0 when using the force bit. or: 3. there is a transmit under-run, and the txun- derrun bit (register c, bufevent, bit 9) is set. successful transmission is indicated when the txok bit (register 8, txevent, bit 8) is set. register 9, txcmd host specified transmit length at 0146h (in bytes) txpaddis (bit d) inhibitcrc (bit c) 3 < txlength < 60 60 >= txlength =< 1514 1514 > txlength < 1518 txlength > 1518 00pad to 60 and add crc send frame and add crc [normal mode] will not send will not send 0 1 pad to 60 and send without crc send frame without crc send frame without crc will not send 1 0 send without pads, and add crc send frame and add crc will not send will not send 1 1 send without pads and without crc send frame without crc send frame without crc will not send notes: 1. if the txpaddis bit is clear and inhibitcrc is set and the CS8920A is commanded to send a frame of length less than 60 bytes, the CS8920A pads. 2. the CS8920A will not send a frame with txlength less than 3 bytes. table 5.17. transmit frame length CS8920A 114 ds238pp2
5.8.11 transmit frame length the length of the frame transmitted is deter- mined by the value written into the txlength register (packetpage base + 0146h) during the transmit request. the length of the transmit frame may be modified by the configuration of the txpaddis bit (register 9, txcmd, bit d) and the inhibitcrc bit (register 9, txcmd, bit c). table 5.17 defines how these bits affect the length of the transmit frame. in addition, it shows which frames the CS8920A will send. 5.9 full duplex considerations the driver should not bid to transmit a long frame (i.e., a frame greater than 118 bytes) if the prior transmit frame is still being transmitted. the end of the transmission of this prior frame is indicated by a txok bit being set in the txevent register (register 8). 5.10 system wakeup with wakeup frames the CS8920A will recognize a magic packet wakeup frame that is received from either the 10base-t or aui port, and can consequently generate a signal to awaken a sleeping or idling system cpu. a desktop system may go to sleep in response to any number of conditions. for ex- ample, a system power manager observes no user or computing activity for some period of time, or a user turns the pc off using a soft or hard power switch. wakeup frame recognition allows access to a sleeping (powered-down or slowed down) cpu over the network. potential applications include personal remote access to a desktop pc, or ac- cess by a host to all clients to upgrade software programs, perform virus scans, or check for un- authorized software. a complete wakeup frame state diagram is shown in figure 5.14. the key states are as fol- lows: normal: the CS8920A is receiving nor- mal packet traffic and is ignoring wakeup frames. suspend: the CS8920A is waiting for a wakeup frame and is ignoring all other frames. the isa bus is powered down. typi- cally, the cpu is also powered down. standby: the CS8920A is waiting for a wakeup frame and is ignoring all other frames. the isa bus is powered up, and typi- cally the cpu is running with a slowed-down clock. reset: the CS8920A is performing an in- ternal reset and all received frames are ignored. the state entered following reset is determined by the contents of the eeprom and by whether or not the isa bus is powered up. dropping frame: the CS8920A is look- ing for normal packet traffic, but the isa bus is not powered up. this is a somewhat abnor- mal condition. wakeup frame control/status bits the following control/status bits are associated with the wakeup function. linectl (register 13) bit f, wakeupen: set this bit to enable the wakeup function. all non-wakeup frames are discarded when wakeup is enabled. this bit defaults to clear, meaning wakeup frame rec- ognition is disabled. when recognition is disabled, the ewake pin remains low inde- pendent of the state of linectl, bit a. CS8920A ds238pp2 115
suspend mode CS8920A isa drivers are off ignoring normal frames looking for wakeup standby mode CS8920A isa drivers are on/active ignoring normal frames looking for wakeup normal mode - isa drivers on - looking for normal frames - ignoring wakeup frames reset = 1 or isa = off isa = on and wakeupen = 0, as read from the eeprom reset = 1 wakeupen = 1 (from software over the isa bus) wakeupen = 0 (from software over the isa bus) isa = off (causing reset = 1) isa = on and wakeupen = 1 (from eeprom) isa = off and wakeupen = 1 (from the eeprom) isa = on or reset = 1 (qualified) reset state CS8920A inactive during reset read pperom normal frames are ignored isa = on or reset = 1 (qualified) receive wakeup frame asserting ewake or generate intrq deassert wakeupen dropping norm packets ignoring wakeup frame CS8920A drivers off rxmiss occuring assert ewake isa = on or reset = 1 (qualified) receive wakeup frame isa = off or reset = 0 isa = off and wakeupen = 0 (from eeprom) reset is defined as an isa bus reset signal. isa off is defined as the sensing of the isa signals in the power off state. this is accomplished when memr_b = memw_b = ior_b = 0, which can only happen when the isa bus is power off. figure 5.14.wakeup frame state diagram CS8920A 116 ds238pp2
bit a, routewakeup: set this bit to route the wakeup signal to both the presently pro- grammed interrupt pin and the ewake pin. this bit defaults to clear, meaning the wakeup signal is routed only to the ewake pin. note that the interrupt pin is used only if the CS8920A has determined that the isa bus is powered up. rxevent (register 4) and isq bit f, wakeup frame received: this bit is set when a valid wakeup frame is received. this bit is cleared when read. it may be set again only by a new wakeup frame. for more information about the status and con- trol bits, see section 4.4.1 normal state while in the normal state, the CS8920A re- ceives all packets and does not check for wakeup frames. the CS8920A remains in normal state until a reset occurs or until the software sets the wakeupen bit to 1. the reset causes the CS8920A to enter the reset state. setting wakeupen to 1 causes the CS8920A to enter the standby state. while in the normal state, and before enter- ing the standby state, the CS8920A must be initialized with the following information: ia must be loaded into the CS8920A. rxctl (register 5) must be set for appropri- ate address filtering set. linectl (register 13) bit 7, serrxon, must be set. this turns on the receiver. the routewakeup bit (linectl, bit a) must be configured. if an interrupt is being used, an interrupt pin must be enabled via busctl, register 17, bit f. if the CS8920A is to enter the suspend or standby state from the reset mode, then during the normal state, the software must ensure that the eeprom initialization section contains the following: wakeupen bit set to 1 (reg 13, linectl, bit f). individual address rxctl (register 5) must be set for appropri- ate address filtering set. linectl (register 13) bit 7, serrxon, must be set. this turns on the receiver. the routewakeup bit (linectl, bit a) must be configured. if the CS8920A enters the standby state from the reset state, the driver may select an inter- rupt pin via the busctl register, bit f after the reset. selecting the interrupt pin via the eeprom may interfere with pnp configuration management. reset state the CS8920A enters the reset state in re- sponse to one of the following: the isa bus reset signal is recognized. note that if the CS8920A has previously recog- nized that the isa bus was powered down, the CS8920A qualifies a reset request by 15 transitions on memr. this qualification fil- ters spurious signals on the reset pin. a reset request is written to bit 6 of register selfctl (register 15). CS8920A ds238pp2 117
the isa bus transitions from powered up to powered down. when the isa bus is being powered down and is decaying to ground, the isa reset signal may be asserted. at this time, the CS8920A will reset. therefore, be- fore powering down the isa bus, the CS8920A eeprom should be configured to allow the CS8920A to be activated in wait- ing-for-wakeup-frame state. note that a "ctrl-alt-del" does not reset the isa bus. during the reset state, the CS8920A does an internal hardware reset, ignores all incoming frames, and reads the eeprom, includng the burned-in ieee address. during reset, the CS8920A also shuts off the CS8920A isa bus drivers. the drivers remain off until memr and memw and ior have all gone high. also, the CS8920A does not allow isa accesses before eeprom initialization. based on the state of the isa bus (powered or not powered), and based on the state of the wakeupen bit as read from the eeprom, the CS8920A will exit the reset state and enter one of the normal, standby, suspend, or dropping packets states, as shown be- low. suspend state in the suspend state, the isa bus is powered down, and the wakeupen bit is set to 1. typi- cally, the cpu and chipset clocks will also be stopped. in this state, the CS8920A remains powered, discards all non-wakeup frames, and shuts off the CS8920A isa bus drivers. upon wakeup frame recognition, the CS8920A generates a signal on the ewake pin that can be connected by jumper to the system power man- ager. an ewake output signal will be a logic high for approximately 50 to 55 ms. the system power manager function can then wake up the system. after generating the ewake signal, the CS8920A checks that the isa bus is still pow- ered off, and that there is no reset request. if these conditions are true, the CS8920A returns to the suspend state. otherwise, the CS8920A enters the reset state. note that the CS8920A determines that the isa bus is powered by look- ing for memr and memw and ior bus signals being simultaneously low. in a system with a powered down isa bus, inter- rupts must not be enabled (via loading register 17, busctl register, bit f from the eeprom). standby state in the standby state, the isa bus is powered up, and the cpu is typically operating at a low clock rate to save power. this state is entered when either: the CS8920A is in normal state, and the software sets wakeupen bit to 1; or while in reset state, the CS8920A detects that the isa bus is powered and the wakeu- pen bit is set to 1 by the eeprom. in this state, the CS8920A is powered up, looks for wakeup frame, and discards all other frames. upon wakeup frame recognition, the CS8920A can wake up the cpu using either just the ewake pin, or a combination of the ewake pin and an isa-bus interrupt. state entered wakeupen bit from eeprom isa bus normal 0 powered dropping pac k e t 0 not powered suspend 1 not powered standby 1 powered CS8920A 118 ds238pp2
for the CS8920A to signal a wakeup interrupt, the routewakeup bit (linectl, register 13, bit a) must be set, and the isa bus must be pow- ered up. when a wakeup frame is recognized, the presently programmed interrupt pin remains as- serted until the interrupt has been acknowledged by reading the isq. the host is responsible for determining the interrupt cause. the wakeup in- terrupt signal meets all isa bus requirements for interrupt signals. after the wakeup signals are generated, the CS8920A will automatically reset the wakeupen bit to 0 and return to normal state. alterna- tively, the CS8920A will transition from the standby state to the reset state at any time if the isa bus transitions to powered down or if a reset signal is recognized. dropping packets state the CS8920A will enter the dropping pack- ets state after reset if the isa bus is not powered, and if wakeupen is off. the CS8920A will look for normal frames, ignore wakeup frames, and shut off the CS8920A isa bus driv- ers. therefore, the CS8920A will not pass received frames to the cpu. this state is exited and the reset state is entered upon detecting that the isa bus in now powered, or upon reset signal recognition. definition of a magic packet wakeup frame a received wakeup frame must pass the pres- ently selected CS8920A destination address filter. typically, the frame will be a broadcast frame because broadcast frames can pass through routers, even if the ia is not present in the router address tables. the payload of the frame must contain at least six contiguous synchronization bytes (six repetitions of ffh) followed immedi- ately by sixteen repetitions of the 6-byte ia, with no unused bits between successive ia occur- rences. this information can appear anywhere in the payload, but must be byte aligned. the CS8920A uses the six ff bytes to determine when to begin the address match. a wakeup frame may contain multiple occur- rences of the "six ffh + sixteen ia" pattern. the CS8920A checks each pattern for an ia match. multiple patterns allow both the burned-in ieee ia and also a locally-administered ia to be broadcast. the CS8920A compares the address in the pattern with the contents of the ia address register (located at packetpage base + 0158h), to determine if the pc should be awakened. in standby state, the packetpage location will contain a locally administered ia if such an ad- dress has been loaded by the driver. note that upon entering the suspend state (stopped isa bus), the packetpage location will always contain the burned-in ieee address. use of magic packet trade mark customers who use the CS8920A magic packet capability in their products are requested to use the magic packet tm trademark in their applicable sales and advertising documentation. any cus- tomer referring to magic packet in their literature should attribute ownership of the trademark to amd, and should contact amd for attribution instructions. considerations for hardware design systems which implement wakeup-via-lan will generally use a seperate power supply for the CS8920A. please contact crystal for board deisgn guidelines. CS8920A ds238pp2 119
6.0 test modes loopback & collision diagnostic tests internal and external loopback and collision tests can be used to verify the CS8920As func- tionality when configured for either 10base-t or aui operation. internal tests internal tests allow the major digital functions to be tested, independent of the analog functions. during these tests, the manchester encoder is connected to the decoder. all digital circuits are operational, and the transmitter and receiver are disabled. external tests external test modes allow the complete chip to be tested without connecting it directly to an ethernet network. loopback tests during loopback tests, the internal carrier sense (crs) signal, used to detect collisions, is ig- nored, allowing packet reception during packet transmission. 10base-t loopback and collision tests 10base-t loopback and collision tests are controlled by two bits: force fdx (register 1d, autonegctl, bit f) and endecloop (register 19, testctl, bit 9). table 6.1 describes these tests. aui loopback and collision tests aui loopback and collision tests are controlled by two bits in the test control register: auiloop (register 19, testctl, bit a) and endecloop (register 19, testctl, bit 9). table 6.2 de- scribes these tests. test mode fdx endecloop description of test 10base-t internal loopback 11 transmit a frame and verify that the frame is received without error. 10base-t internal collision 01 transmit frames and verify that collisions are detected and that internal counters function properly. after 16 collisions, verify that 16coll (register 8, txevent, bit f) is set. 10base-t external loopback 10 connect txd+ to rxd+ and txd- to rxd-. transmit a frame and verify that the frame is received without error. 10base-t external collision 00 connect txd+ to rxd+ and txd- to rxd-. transmit frames and verify that collisions are detected and that internal counters function properly. after 16 collisions, verify that 16coll (register 8, txevent, bit f) is set. table 6.1. 10base-t loopback and collision tests CS8920A 120 ds238pp2
6.1 boundary scan boundary scan test mode provides an easy and efficient board-level test for verifying that the CS8920A has been installed properly. boundary scan will check to see if the orientation of the chip is correct, and if there are any open or short circuits. boundary scan is controlled by the test pin. when test is high, the CS8920A is configured for normal operation. when test is low, the following occurs: the CS8920A enters boundary scan test mode and stays in this mode as long as test is low; the CS8920A goes through an internal reset and remains in internal reset as long as test is low; the aen pin, normally the isa bus address enable, is redefined to become the boundary scan shift clock input; and all digital outputs and bi-directional pins are placed in a high-impedance state (this electri- cally isolates the CS8920A digital outputs from the rest of the circuit board). for boundary scan to be enabled, aen must be low before test is driven low. a complete boundary scan test is made up of two separate cycles. the first cycle, known as the output cycle, tests all digital output pins and all bi-directional pins. the second cycle, known as the input cycle, tests all digital input pins and all bi-directional pins. output cycle during the output cycle, the falling edge of aen causes each of the 26 digital output pins and each of the 16 bi-directional pins to be driven low, one at a time. the cycle begins with linkled and advances in order counterclock- wise around the chip though all 42 pins. this test is referred to as a "walking 0" test. the following is a list of output pins and bi-di- rectional pins that are tested during the output cycle: pin name pin # pin name pin # eecs 141 irq2/9 106 eesk 142 irq7 79 localled 5 irq6 78 eedo 6 irq5 77 drq7 9 irq4 76 drq6 14 irq3 75 drq5 16 iocs16 43 csout 8 mcs16 44 sd08-sd15 27-24,21-18 iochrdy 92 irq15 31 sd0 - sd7 96-99,102-105 irq14 30 bstatus 113 irq12 32 linkled 139 irq11 33 lanled 140 irq10 34 ewake 3 test mode auiloop endecloop description of test aui internal loopback 11 transmit a frame and verify that the frame is received without error. aui external loopback 10 connect do+ to di+ and d0- to di-. transmit a frame and verify that the frame is received without error (since there is no collision signal, an sqe error will occur). aui collision 0 0 start transmission and observe do+/do- activity. input a 10 mhz sine wave to ci+/ci- pins and observe collisions. table 6.2. aui loopback and collision tests CS8920A ds238pp2 121
the output pins not included in this test are: pin name pin # pin name pin # do+ 121 txd- 126 do- 122 res 131 txd+ 125 xtal2 136 input cycle during the input cycle, the falling edge of aen causes the state of each selected pin to be trans- ferred to eedo (that is, eedo will be high or low depending on the input level of the selected pin). this cycle begins with sleep and ad- vances clockwise through each of 37 input pins (all digital input pins except for aen) and each of the 16 bi-directional pins, one pin at a time. the following is a list of input pins and bi-direc- tional pins that are tested during the input cycle: pin name pin # pin name pin # eedi 7 sa0 - sa11 58-66,80-82 dack7 10 refresh 83 dack6 15 sa12- sa16 84-88, dack5 17 ior 89 sd08-sd15 27-24,21-18 iow 90 memw 28 sd0 - sd7 96-99, 102-105 memr 29 reset 114 sbhe 52 sleep 116 la17-23 45-51 the input pins not included in this test are: pin name pin # pin name pin # aen 91 ci- 120 test 115 rxd+ 129 di+ 117 rxd- 130 di- 118 xtal1 135 ci+ 119 after the input cycle is complete, one more cy- cle of aen returns all digital output pins and bi-directional pins to a high-impedance state. continuity cycle the combination of a complete output cycle, a complete input cycle, and an additional aen cy- cle is called a continuity cycle. each continuity cycle lasts for 85 aen clock cycles. the first continuity cycle can be followed by additional continuity cycles by keeping test low and continuing to cycle aen. when test is driven high, the CS8920A exits boundary scan mode and aen is again used as the isa-bus address enable. figure 6.1 shows a complete boundary scan continuity cycle. figure 6.2 shows boundary scan timing. CS8920A 122 ds238pp2
enter boundary scan: CS8920A resets, all digital output pins and bi-directional pins enter high-z state, and aen becomes shift clock aen switches high output cycle aen switches low selected output goes low aen switches high 34 cycles input cycle aen switches low selected input copied out to the eedataout pin aen switches high 50 cycles all digital output pins and bi-directional pins enters high-z state test switches low (aen must be low) not in boundary scan test mode aen switches low aen switches high exit boundary scan: aen becomes isa bus address enable test switches high figure 6.1. boundary scan continuity cycle CS8920A ds238pp2 123
test aen outputs all outputs tri-state lanled low bstatus low eedo reset copied out outputs hi z output test 42 clocks input test 53 clocks outputs hi z 1 clock complete continuity cycle 96 clocks linkled low sleep copied out eedi copied out figure 6.2. boundary scan timing CS8920A 124 ds238pp2
7.0 absolute maximum ratings (avss, dvss = 0 v, all voltages with respect to 0 v.) parameter symbol min max units power supply: digital analog d v dd a v dd -0.3 -0.3 6.0 6.0 v v input current (except supply pins) 10.0 ma analog input voltage -0.3 ( a v dd+) +0.3 v digital input voltage -0.3 ( d v dd+) +0.3 v ambient temperature (power applied) -55 +125 c storage temperature -65 +150 c warning: operation at or beyond these limits may result in permanent damage to the device. normal operation is not guaranteed at these extremes. 8.0 recommended operating conditions (avss, dvss = 0 v, all voltages with respect to 0 v.) parameter symbol min max units power supply: digital analog d v dd a v dd 4.75 4.75 5.25 5.25 v v operating ambient temperature t a 0+70 c 9.0 dc characteristics t a = 25 c; vdd = 5 v parameter symbol min max units crystal (when using external clock) xtal1 input low voltage v ixh -0.3 0.8 v xtal1 input high voltage v ixh 3.5 v dd v xtal1 input low current i ixl -40 m a xtal1 input high current i ixh 40 m a power supply power supply current while active i dd 130 ma hardware standby mode current (note 1) i ddstndby 1.0 ma hardware suspend mode current (note 1) i ddhwsus 75 m a software suspend mode current (note 1) i ddswsus 1.0 ma notes: 1. with digital inputs connected to cmos levels. CS8920A ds238pp2 125
9.0 dc characteristics (continued.) i/o type parameter symbol conditions and comments min max units digital inputs and outputs od24 output low voltage v ol i ol = 24 ma 0.4 v od24 output leakage current i ll 0 v out v cc -10 10 m a od10 output low voltage v ol i ol = 10 ma 0.4 v od10 output leakage current i ll 0 v out v cc -10 10 m a b24 output low voltage v ol i ol = 24 ma 0.4 v b24 output high voltage v oh i oh = -12 ma 2.4 v b24 output leakage current i ll 0 v out v cc -10 10 m a b4w output low voltage v ol i ol = 4 ma 0.4 v b4w output high voltage v oh ioh = -2 ma 2.4 v b4w output leakage current i ll 0 v out v cc -20 10 m a o24ts output low voltage v ol i ol = 24 ma 0.4 v o24ts output high voltage v oh i oh = -2 ma 2.4 v o24ts output leakage current i ll 0 v out v cc -10 10 m a o4 output low voltage v ol i ol = 4 ma 0.4 v o4 output high voltage v oh i oh = -2 ma 2.4 v i input low voltage v il 0.8 v i input high voltage v ih 2.4 v i input leakage current i l 0 v in v cc -10 10 m a iw input low voltage v il 0.8 v iw input high voltage v ih 2.4 v iw input leakage current i l 0 v in v cc -20 10 m a pin types: d = differential input pair i = input g = ground do = differential output pair o = output ts = tri-state b = bi-directional with tri-state output p = power w = internal weak pullup od = open drain output digital outputs are followed by drive in ma (example: od24 = open drain output with 24 ma drive). CS8920A 126 ds238pp2
9.0 dc characteristics (continued) parameter symbol min typical max units 10base-t interface transmitter differential output voltage (peak) v od 2.2 2.8 v receiver normal squelch level (peak) v isq 300 525 mv receiver low squelch level (lorxsquelch bit set) v sql 125 290 mv aui interface transmitter differential output voltage (do+/do- peak) v aod 0.45 1.2 v transmitter undershoot voltage v aodu 100 mv transmitter differential idle voltage (do+/do- peak) v idle 40 mv receiver squelch level (di+/di- peak) v aisq 180 300 mv 9.1 capacitance t a = 25 c; fc = 1 mhz; vcc = 5 v limits parameter symbol min typical max unit test condition input pins c in - - 10 pf all pins except pin under test tied to ac ground input pins c out --20pf input/output pins c io --20pf CS8920A ds238pp2 127
10.0 switching characteristics t a = 25 c; vdd = 5 v parameter symbol min max units 16-bit i/o read, iochrdy not used address, aen, sbhe active to iocs16 low t ior1 35 ns address, aen, sbhe active to ior active t ior2 20 ns ior low to sd valid t ior3 145 ns address, aen, sbhe hold after ior inactive t ior4 15 ns ior inactive to active t ior5 60 ns ior inactive to sd 3-state t ior6 30 ns parameter symbol min max units 16-bit i/o read, with iochrdy ior active to iochrdy inactive t ior7 25 ns iochrdy low pulse width t ior8 125 175 ns iochrdy active to sd valid t ior9 0ns sa [16:0], aen, sbhe valid address iocs16 in direction: in or out of chip ior sd [15:0] valid data out in out t ior1 t ior2 t ior3 t ior4 t ior5 t ior6 sa [16:0], aen, sbhe valid address iocs16 in direction: in or out of chip ior sd [15:0] valid data out in out iochrdy out t ior7 t ior8 t ior9 CS8920A 128 ds238pp2
10.0 switching characteristics (continued) parameter symbol min max units 16-bit memory read, iochrdy not used sa [16:0], sbhe, chipsel, active to memcs16 low (note 1) t memr1 30 ns address, sbhe, chipsel active to memr active t memr2 20 ns memr low to sd valid t memr3 145 ns address, sbhe, chipsel hold after memr inactive t memr4 0ns memr inactive to sd 3-state t memr5 30 ns memr inactive to active t memr6 55 ns parameter symbol min max units 16-bit memory read, with iochrdy memr low to iochrdy inactive t memr7 35 ns iochrdy low pulse width t memr8 125 175 ns iochrdy active to sd valid t memr9 0ns sa [16:0], sbhe, chipsel valid address memcs16 in direction: in or out of chip memr sd [15:0] valid data out in out iochrdy out t memr7 t memr8 t memr9 sa [16:0], sbhe, chipsel valid address memcs16 in direction: in or out of chip memr sd [15:0] valid data out in out t memr1 t memr2 t memr3 t memr4 t memr5 t memr6 note 1: it is assumed that the address line la[23:17] has been latched early with bale. CS8920A ds238pp2 129
10.0 switching characteristics (continued) parameter symbol min max units dma read aen active to ior low t dmar1 20 ns ior low to dmarqx inactive t dmar2 80 ns ior low to sd valid t dmar3 145 ns dmackx, aen hold after ior high t dmar4 20 ns ior inactive to sd 3-state t dmar5 30 ns parameter symbol min max units 16-bit i/o write address, aen, sbhe valid to iocs16 low t iow1 35 ns address, aen, sbhe valid to iow low t iow2 25 ns iow pulse width t iow3 110 ns sd hold after iow high t iow4 6ns iow low to sd valid t iow5 10 ns iow inactive to active t iow6 55 ns address hold after iow high t iow7 0ns dmarqx direction: in or out of chip dmackx sd [15:0] valid data out out in out x = 0, 1, 2 aen in ior in t dmar1 t dmar3 t dmar4 t dmar5 t dmar2 sa [15:0], aen, sbhe valid address iocs16 in direction: in or out of chip iow sd [15:0] valid data in out in in t iow1 t iow2 t iow3 t iow4 t iow5 t iow6 t iow7 CS8920A 130 ds238pp2
10.0 switching characteristics (continued) parameter symbol min max units 16-bit memory write address, sbhe, valid to memcs16 low (note 1) t memw1 30 ns address, sbhe, valid to memw low t memw2 20 ns memw pulse width t memw3 125 ns memw low to sd valid t memw4 40 ns sd hold after memw high t memw5 6ns address hold after memw inactive t memw6 0ns memw inactive to active t memw7 55 ns sa [16:0], sbhe, valid address memcs16 in direction: in or out of chip memw sd [15:0] valid data in out in in t memw3 t memw4 t memw5 t memw6 t memw7 t memw2 t memw1 note 1: it is assumed that the address line la[23:17] has been latched early with bale. CS8920A ds238pp2 131
10.0 switching characteristics (continued) parameter symbol min typ max units 10base-t receive allowable received jitter at bit cell center t trx1 13.5 ns allowable received jitter at bit cell boundary t trx2 13.5 ns carrier sense assertion delay t trx3 540 ns invalid preamble bits after assertion of carrier sense t trx4 12bits carrier sense deassertion delay t trx5 270 ns 10.0 switching characteristics (continued) parameter symbol min typ max units 10base-t transmit txd pair jitter into 100 ohm load t ttx1 8ns txd pair return to < 50 mv after last positive transition t ttx2 4.5 m s txd pair positive hold time at end of packet t ttx3 250 ns t trx3 rxd t trx5 t trx4 t trx1 t trx2 carrier sense (internal) txd t ttx1 t ttx3 t ttx2 CS8920A 132 ds238pp2
10.0 swithing characteristics (continued) parameter symbol min typ max units 10base-t link integrity first transmitted link pulse after last transmitted packet t ln1 81624ms time between transmitted link pulses t ln2 81624ms width of transmitted link pulses t ln3 60 100 200 ns minimum received link pulse separation t ln4 27ms maximum received link pulse separation t ln5 25 150 ms last receive activity to link fail (link loss timer) t ln6 50 150 ms 10.0 swithing characteristics (continued) parameter symbol min typ max units aui transmit do pair rise and fall times t atx1 5ns do pair jitter at bit cell center t atx2 0.5 ns do pair positive hold time at start of idle t atx3 200 ns do pair return to < 40 mvp after last positive transition t atx4 8.0 m s rxd linkled txd t ln1 t ln2 t ln3 t ln4 t ln5 t ln6 do t atx1 t atx1 t atx2 t atx4 t atx3 1 0 0 0 CS8920A ds238pp2 133
10.0 switching characteristics (continued) parameter symbol min typ max units aui receive di pair rise and fall time t arx1 10 ns allowable bit cell center and boundary jitter in data t arx2 18 ns carrier sense assertion delay t arx3 100 ns invalid preamble bits after carrier sense asserts t arx4 12bits carrier sense deassertion delay t arx5 200 ns 10.0 swithing characteristics (continued) parameter symbol min typ max units aui collision ci pair cycle time t acl1 85 100 115 ns ci pair rise and fall times t acl2 10 ns ci pair return to zero from last positive transition t acl3 160 ns collision assertion delay t acl4 140 ns collision deassertion delay t acl5 240 ns di t arx1 t arx2 1 0 1 0 t arx3 t arx4 t arx5 t arx1 carrier sense (internal) t acl1 ci t acl4 t acl5 collision (internal) t acl2 t acl2 t acl3 CS8920A 134 ds238pp2
10.0 switching characteristics (continued) parameter symbol min typ max units external boot prom access address active to memr (note 1) t bprom1 20 ns memr active to csout low t bprom2 35 ns memr inactive to csout high t bprom3 40 ns 10.0 switching characteristics (continued) parameter symbol min typ max units eeprom eesk setup time relative to eecs t sks 100 - - ns eecs/elcs_b setup time wrt - eesk t css 250 - - ns eedataout setup time wrt - eesk t dis 250 - - ns eedataout hold time wrt - eesk t dih 500 - - ns eedatain hold time wrt - eesk t dh 10 - - ns eecs hold time wrt eesk t csh 100 - - ns sa [16:0] memr t bprom1 csout cs t bprom3 t bprom2 t csh t cs t sks t css t dis t dih t dh eesk eecs eedata out eedata in (read) note 1: it is assumed that the address line la[23:17] has been latched early with bale. CS8920A ds238pp2 135
rt rt cs8900a td + td - txd + txd - 1 : 2 rj 45 1 2 1 : 1 rd + rd - 3 6 0.01 m f + rxd+ rxd- rr rr 0.01 m f - 68 pf 11.0 10base-t wiring cable impedance ( w ) rt ( w ) rr ( w ) 100 24.3 49.9 120 30.1 60.4 150 37.4 75 notes: 1. if a center tap transformer is used on the rxd+ and rxd- inputs, replace the pair of rr resistors with a single 2xrr resistor. 2. the rt and rr resistors are +/- 1% tolerance. 3. the CS8920A supports 100, 120, and 150 w unshielded twisted pair cables. the proper values of rt and rr, for a given cable impedance, are shown below: CS8920A 136 ds238pp2
12.0 aui wiring cs8900a do + do - 1 : 1 db15 3 10 tx 4 1 : 1 5 12 13 6 +12 v + ci + ci - 1 : 1 2 9 39.2 w 39.2 w col 0.01 uf - + di + di - 39.2 w 39.2 w rx 0.01 uf - 13.0 quartz crystal requirements if a 20 mhz quartz crystal is used, it must meet the following specifications: parameter min typ max unit parallel resonant frequency 20 mhz resonant frequency error (cl = 18 pf) -50 +50 ppm resonant frequency change over operating temperature -40 +40 ppm crystal capacitance 18 pf motional crystal capacitance 0.022 pf series resistance 50 w shunt capacitance 7 pf CS8920A ds238pp2 137
millimeters inches 0.007 0.854 0.049 0.000 min 0.063 0.008 max 0.011 0.018 0.030 0.008 dim d d1 e b a a1 l1 l c 0 12 0.17 1.25 0.00 min 0.45 0.09 0 1.60 0.20 max 0.27 0.75 0.20 12 144-pin tqfp 21.70 0.004 144 1 e d1 d e b c a1 a l terminal detail 1 e e1 22.30 21.70 - 22.30 0.878 0.854 0.878 1.00 ref l1 e1 0.039 ref nom 1.43 0.10 0.22 0.65 0.15 22.00 20.00 22.00 20.00 - - - 0.40 0.60 0.50 - nom 0.056 0.004 0.009 0.024 0.006 0.866 0.787 0.866 0.787 0.020 - 0.016 0.024 -- -- 14.0 physical dimensions schematic & layout review service confirm optimum schematic & layout before building your board. confirm optimum schematic & layout before building your board. for our free review service call applications engineering. for our free review service call applications engineering. call: (512) 445-7222 CS8920A 138 ds238pp2
glossary of terms acronyms aui attachment unit interface crc cyclic redundancy check cs carrier sense csn card select number csma/cd carrier sense multiple access with collision detection da destination address eeprom electrically erasable programmable read only memory eof end-of-frame fcs frame check sequence fdx full duplex flp fast link pulse ia individual address ipg inter-packet gap isa industry standard architecture la isa latchable address bus (la17 - la23) llc logical link control mac media access control mau medium attachment unit mib management information base nlp normal link pulse pnp plug and play rx receive sa source address or isa system address bus (sa0 - sa19) sfd start-of-frame delimiter snmp simple network management protocol sof start-of-frame sqe signal quality error stp shielded twisted pair tcp/ip transmission control protocol/internet protocol tdr time domain reflectometer tx transmit utp unshielded twisted pair definitions cyclic redundancy check the method used to compute the 32-bit frame check sequence (fcs). frame check sequence the 32-bit field at the end of a frame that contains the result of the cyclic redundancy check (crc). CS8920A ds238pp2 139
definitions (continued) frame an ethernet string of data bits that includes the destination address (da), source address (sa), optional length field, logical link control data (llc data), pad bits (if needed) and frame check sequence (fcs). individual address the specific ethernet address assigned to a device attached to the ethernet media. inter-packet gap time interval between packets on the ethernet. minimum interval is 9.6 m s. jabber a condition that results when a ethernet node transmits longer than between 20 ms and 150 ms. packet an ethernet string of data bits that includes the preamble, start-of-frame delimiter (sfd), destination address (da), source address (sa), optional length field, logical link control data (llc data), pad bits (if needed) and frame check sequence (fcs). a packet is a frame plus the preamble and sfd. receive collision a receive collision occurs when the ci+/ci- inputs are active while a packet is being received. applies only to the aui. signal quality error when transmitting on the aui, the mac expects to see a collision signal on the ci+/ci- pair within 64 bit times after the end of a transmission. if no collision occurs, there is said to be an "sqe error". applies only to the aui. slot time time required for an ethernet frame to cross a maximum length ethernet network. one slot time equals 512 bit times. transmit collision a transmit collision occurs when the receive inputs, rxd+/rxd- (10base-t) or ci+/ci- (aui) are active while a packet is being transmitted. CS8920A 140 ds238pp2
acronyms specific to the CS8920A advintctl/st interrupt control and status - register d autonegst isa bus state or status - register 1e bufcfg buffer configuration - register b bufevent buffer event - register c busctl bus control - register 17 busst bus state - register 18 endec manchester encoder/decoder isq interrupt status queue - register 0 linectl ethernet line control - register 13 linest ethernet line status - register 14 rxcfg receive configuration - register 3 rxctl receive control - register 5 rxevent receive event - register 4 selfctl self control - register 15 selfst self status - register 16 testctl test control - register 19 txcfg transmit configuration - register 7 txcmd transmit command - register 9 txevent transmit event - register 8 terms specific to the CS8920A act-once bit a control bit that causes the CS8920A to take a certain action once when a logic "1" is written to that bit. to cause the action again, the host must rewrite a "1". committed received frame a receive frame is said to be "committed" after the frame has been buffered by the CS8920A, and the host has been notified, but the frame has not yet been transferred by the host. committed transmit frame a transmit frame is said to be "committed" after the host has issued a transmit command, and the CS8920A has reserved buffer space and notified the host that it is ready for transmit. event or interrupt event the term "event" is used in this document to refer to something that can trigger an interrupt. items that are considered "events" are reported in the three event registers (rxevent, txevent, or bufevent) and in two counter-overflow bits (rxmiss and txcol). CS8920A ds238pp2 141
terms specific to the CS8920A (continued) packetpage a unified, highly-efficient method of controlling and getting status of a peripheral controller in i/o or memory space. standby a feature of the CS8920A used to conserve power. when in standby mode, the CS8920A can be awakened either by 10base-t activity or host command. streamtransfer a method used to significantly reduce the number of interrupts to the host processor during block data transfers (patent pending). suspend a feature of the CS8920A used to conserve power. when in suspend mode, the CS8920A can be awakened only by host command. transfer the term "transfer" refers to moving frame data across the isa bus to or from the CS8920A. transmit request a transmit request is issued by the host to initiate the start of a new packet transmission. a transmit request consists of the following three steps in exactly the order shown: 1. the host writes a transmit command to the txcmd register (packetpage base + 0144h). 2. the host writes the transmit frames length to the txlength register (packetpage base + 0146h). 3. the host reads busst (register 18) to see in the rdy4txnow bit (bit 8) is set. wakeup frame a specific ethernet frame that enables an nic to signal the pc power management to power up the pc. sub-terms specific to the CS8920A used at the end of the term these terms have meaning only at the end of a term; a accept cmd command cfg configure ctl control dis disable CS8920A 142 ds238pp2
e enable h indicates the number is hexadecimal ie interrupt enable st status CS8920A ds238pp2 143


▲Up To Search▲   

 
Price & Availability of CS8920A

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X