W89C840F ; Ts pert T ee 4 Winbond: a Electronics Corp. PCI Bus Master Fast Ethernet LAN Controller The W89C840P is a highly integrated Ethernet LAN controller for both LOOBaseT and 10BaseT Ethernet. It provides a host bus interface complying with the PCI local bus specification revision 2.1, and the MII interface complying with the [EEE802.3u standard for easily implementing an Ethernet LAN adapter. The built-in 2K bytes transmit FIFO and 4K bytes receive FIFO, controlled by the on-chip bus master, are designed for improving network performance and reducing the host bus utilitzation. The on-chip DMA controller handles the data transfer between the host memory and the FIFOs. The data received from network are queued into the receive FIFO and then, directly moved into the host memory through the PCI bus. On the other hand, the transmitted data are fetched from the host memory and directly queued into the transmit FIFO. No extra on-board meinory is needed for data buffering during the data transceiving operation. Many versatile registers, inculuding host bus control registers, direct memory access(DMA) control registers, media access control registers, and signature identification registers, are implemented for system configuring. All of these long word accessible registers perform the status report and the precisely control on the transmit and receive operation. It also provides an extra channel for the on-line application program to update the on-board expansion ROM device in some specific application environment. Features Complies with [IEEE 802.3, 802.3u, ANSI 8802-3 and Ethemet standards Supports PCI bus master mode for DMA operation, fully complying with PCI 2.1 standard Early interrupt function available for both transmit and receive Both half duplex and full duplex available Independent deep receive and transmit FIFO and no onboard memory required Flexible data structure for host compatibility and system performance Supports 25 to 33 Mhz PCI clock speed Supports full MII management function Provides EEPROM and flash memory on-board programming function Supports both big and little endian byte ordering for descriptor and buffer Flexible address filtering modes -- 64-bit hash-table and one perfect address -- all multicast and promiscuous A boot ROM interface, capable of supporting up to 256KB Supports programmable sub-vendor ID with automatic loading into configuration register Internal and external loopback mode for diagnostic Single 5 volt power supply 100 pins PQFP package Publication Release Date: April 1997 -i- Revision AlW89C840F Clectronics Carp. Winbond Pin Assignment LCEE. Bi rh { Ras uy Ww a we w S B28 8 BRS K i a ow ao GC ob b2e222Eeg58 88 88528 6 Q 3 = ahah Gh oa Rett et tt tc OF he 7 M t = BEPFRESR PSP PPR SES BABES ozo - Or mo } | acer 2-rxuU ez oe oO ro LE muoroem ot bP ougcem oza = Poo aw ro -pme_Onom B-s00 oo co mn Pp Ouriyim =-s0-07] on ot PE -ro>ra coco C) m4 1 er oem Oza >oo| oY ~ bP-ure Sum 3S ocm ited _ t+ oe mo S B-oo+4 Pe oo | o270 S-cxo>_ | mou = a - >00 Som oe] mon o | oo _ ow m be oer 2 OexOuy ezay o Ore Soo __] Meo w Po gore hh B-ocxoco | To P- tane B-oxo,-__] Moo oO tay BS -ocxOna MoD M P fOnqy = -oexKoOa core FP - tanm _ Nw Oo st Ww oO bh co oo o ~~ AN wo st Ww Mh oO om 8 oO ao co oo o oO co ao ao a a oa oo ao a a a ao oo - ao ao 9 mM oO ow ot im gad SaeEoR BAAR oom Fh ozEhSz2z2uU8 BAAARA ARAB 2B > 6 2r 7 86 fet egegecgct gee ovo es WS89C840F pin configuration Fig 1 Block DiagramW89C840F C oe " gy nbond : tite, inhale TX FIFO ali buffer data PCI interface RX FIFO buffer data driver Mil control als receive data BMA machine PCI bus master transmit data i ! Media BMA machine Access Controller memory int PCI bus slave contral Expansion controller registers ROM interface EEPROM access interface configuration status registers registers Fig. xx: W89C840F-E Block Diagram System Diagram Publication Release Date: April 1997 -3- Revision Alte i ginbond ATES, W89C840F system PCI bus 4 host memory |~ controller | W89Ce840F |* MII interface network physical layer device | Media Y a and el} $f media transceiver Fig. xx: SA5381 System Diagram Pin Function Descriptions L) PCT Interface Signal Name Pin Number Pin Description PCICLK PCI Clock Input: The W89C840F supports PCI clock rate ranged from 25Mhz to 33MHz continuously. All PCT signals except RST# and INTA#, are referenced on the nsing edge of this clock. RSTB Hardware reset signal: When asserted(active low), all PCI output of W89C840F will be in high impedance state, and all open drain signals will be floated. The configurations inside W89C840F will be in its initial state. This signal must be asserted for a period of, at least, 10 PCI clocks to have a reset on hardware correctly. ADJ[31:0] IO/TS Multiplexed Address and Data bus: During the first cycle that FRAME# asserts, they act as an address bus; on the other cycles, they are switched to be a data bus. C_BEB[3:0] IO/TS Multiplexed command and byte enables: These signals are driven by current bus master. During address phase, it means a bus comimand; on the other phase, it presents byte enable of the transaction. _4-Winbond EE Ctoctronics Corp. ATES, W89C840F PAR IO/TS Parity signal. This PAR represents even parity across AD[31:0] and C_BEB[3:0]. It has the saine timing as AD[31:0] but delayed by one clock. FRAMEB IO/STS PCI Cycle Frame: The current bus master asserts FRAMEB to indicate the beginning and duration of a bus access. This signal will keep asserted while the current transaction is ongoing and will keep deasserted to indicate that the next data phase is the final data phase. IRDYB IO/STS Initiator Ready: The IRDYB asserted by the current initiator to indicate the ability to complete the data transfer at the current data phase. The initiator asserts IRDYB to indicate the valid write data, or to indicate it is ready to accept the read data. More than or exactly one wait state will be inserted if IRDYB deasserted during the current transaction. Data is transferred at the clock rising edge when both IRDYB and TRDYB are asserted at the same time. TRDYB IO/STS Target Ready: Asserted by the current target to indicate ability to complete data transfer at the current data phase. When W89C840F is operating at the bus slave mode, it asserts TRDYB to indicate that the valid read data presents on the bus or to indicate it is ready to accept data. Wait states will be inserted if TRDYB deasserted. Data is transferred at the rising edge of the PCI clock when IRDYB and TRDYB are both asserted at the same time. STOPB IO/STS PCI Stop: Asserted by the current target to request master to stop the current transaction. IDSEL PCT Initialization Device Select: Asserted by host to signal the configuration access request to W89C840F. DEVSELB IO/STS PCI Device Select: Asserted by the current target to indicate that it has decoded its address as the current access target. When W89C840F is the current master, it checks if the target asserted this signal within 5 PCI clocks. If not, W89C840F will abort the access operation. When W89C840F is the target, it asserts DEVSELB in a medium speed, 1.e., within 2 clocks. Publication Release Date: April 1997 -5- Revision Alte i ginbond ATES, W89C840F REQB O/TS PCI Request: Asserted by W89C840F to request bus ownership. REQB will be tri-stated when RSTB asserted. GNTB Ts PCI Grant: Asserted by host to grant that W89C840F have got the bus ownership. When RSTB asserted, W89C840F will ignore GNTB. PERRB IO/STS PCI Parity Error: Asserted by the current data receiptor. When W89C840F is the bus master, if a data parity error is detected and the parity error response bit (FCS<6>) is also set, it will set both bits of FCS<24> and Cl4<13> as 1 to terminate the current transaction after the current data phase is finished. When W89C840F is the target, a data parity error is detected and the bit FCS<6> is set, it will assert PERRB. SERRB O/OD System Error: This pin will be asserted with one PCI clock width within two PCI clocks after an address parity error is detected and keep in high impedance state when idle. The interrupt function caused by this event is gated by the bits in FCS register. The W89C840F will assert SERRB and set a high to the Detect Parity Error bit FCS<31>, the Signal System Erro bit FCS<30> if an error, address parity error, is detected and SERRB enable bit FCS<&> is previously set to Ll. The Bus Error Status bit Cl4<13> will be set to high if an address parity error is detected and the parity error response bit FCS<6> is set to high. To assert SERRB, when W89C840F detects an address parity error, the bit FCS<31> will be set to high. If the parity error response bit is set, the bit C14<13> will also be set. Under this case, if the SERRB enable bit FCS<8> is previously set too, W89C840F will assert SERRB and set the bit FCS<30> high. When W89C840F detects an address parity error, it will, within two PCI clocks after detecting, assert SERRB for one clock width and then tri-stated the signal. INTAB O/OD Interrupt A: INTAB is asserted when any of the unmasked interrupt bits in C14/CISR are set. It will be kept asserted until all of the unmasked interrupt bits are cleared. 2) BootROM and EEPROM InterfaceATES, W89C840F A WE Ta nnn Signal Name Pin Type | Pin Pin Description Number BtAddO TO BootROM address bit 0 BtAdd1 TO BootROM address bit 1 BtAdata[7:4] To BootROM address and data bus: bit? - bit. BtAdata[3]/EEDO Yo EEPROM data output; BootROM address &data:bit3 BtAdata[2]/EEDI To EEPROM data input; BootROM address & data:bit2. BtAdata[1]/EECK TO EEPROM data clock; BootROM address & data:bitL. BtAdata[0] To BootROM address & data:bit0 BtCSB To BootROM chip select EECS Yo EEPROM chip select 3) MII Interface Signal Name Pin Pin Pin Description Type | Number MTXCLEK I Transinit clock: MTXCLE is a continuous uniformed clock source driven by the external PHY. It provides the timing reference for the signals MTXEN and MTXD. MTXCLEK should be either 25MHz or 2.5MHz clock. MTXDJ3:0] Oo Transmit Data: This nibble byte width transmit data bus is synchronized with MTXCLE. It should be latched by the external PHY at the rising edge of MTXCLK. MTXD[0] is the least significant bit. MTXEN oO Transmit enable: It indicates that transmits activity to an external PHY. It will be synchronized with MTXCLEK. MMDC oO MII management reference clock. It is the reference clock of MMDIO. Each data bit will be latched at the MMDC rising edge. MMDIO TO MII management data input/output. This pin is used to transfer the MII control and status information between PHY and MAC. MCRS I Carrier Sense Signal: This shall be asserted by PHY device when media is busy, and deasserted when media is idle. MCRS shall keep asserted, even at the duration of a collision. Publication Release Date: April 1997 Revision Al| W89C840F . Hinbond rh EE Ctoctronics Corp. be Q ATES, MCOL I Collision detected: This shall be asserted by the PHY device upon detecting a collision happened over the medium. It will be asserted and lasted until collision condition wholly vanishes. MRXDV I Received data valid: This pin is driven by PHY device. It will be asserted when received data is coming and present, and deasserted at the end of the frame. MRXDYV is synchronized with MRXCLK from PHY device. MRXER I Received data error: This pin is driven by PHY device. It indicates a data conversion error is detected by PHY device. The assertion of MRXER should be lasted for longer than a period of MRXCLK. When MRXER asserted, W89C840F will report a Receive Error detection and a CRC error. MRXCLEK I Received clock source: This clock is from PHY device. It will be either 25Mhz or 2.5Mhz receive clock, determined by auto-negotiation device in PHY and supported by WS89C840F. The minimun duty cycle at its high state or low state of MRXCLEK should be 35% of the nominal period under all condition. PHY device should drive MRXCLK as a continuous clock. MRXDJ3:0] I Received data pins: This is driven by external 100/10 Mbps PHY. MRXD should be syncronized with clock source MRXCLK and valid only when MRXDV is valid. MRXD[O] is the least significant bit. $. Functional Description Receive direct memory access function On receiving a data packet, the receive DMA function will transfer these data from the internal receive FIFO which has a size of 4k bytes to the host memory with the assistance of the on-chip PCI bus master. During the transaction cycle, the media access controller(MAC) requests the receive DMA state machine to move the data in the receive FIFO onto the PCI bus, and then move it to the host memory with a kind of data structure which is constructed and described by descriptors. A number of receive descriptors in the chip, which generated by chip itself, are used to specify the descriptor structure and indicate the memory spaces for storing the received packet data. The receive descriptors are also used to store the received packet status when a valid packet is received. Each descriptor -8-W89C840F Winbond EE Ctoctronics Corp. ATES, has a size of 4 long words that resides in the host memory. The first 32 bits are used to keep the received packet status information. The second 32 bits are used to specify the descriptor structure type and the size of the received data buffer. The remains 64 bits are used to specify the size and the address of the allocated meinory for this data buffer and the next one. The received packet can be described by a single descriptor or multiple descriptors. It depends on the configuration, previously set by software driver, and the received packet length. The received packet data also can be stored in a single data buffer or multiple data buffers. The descriptor structure can be either a ring structure or a chain structure. A mixed structure mode is also allowed, too. In the descriptors with the ring structure, Host allocates a big continuous memory for keeping all the descriptor information. Each descriptor can point to two data buffer addresses to store the received packet data. Though the data buffers are not necessarily be contiguous, the descriptors must be contiguous one after the other. The following figures describe the ring structures of receive descriptor. first descritpor of Rx descriptor list status register - - data butter 1 -W or storing the first RX packet data structure constructing register - data buffer 1 pointer \\ data buffer 2 a ; ; data butter 2 pointer a for storing the first RX packet data second descritpor of Rx descriptor list status register - - data buffer 1 tor storing the 2nd RX packet data structure constructing register data buffer 1 pointer | \\ data buffer 2 4 ; data buffer 2 pointer 4 for storing the 2nd RX packet data third descritpor of Rx descriptor list status register - - data butter 1 C Hor storing the 3rd RX packet data structure constructing register - data buffer 1 pointer \\ data buffer 2 a ; data butter 2 pointer a for storing the 3rd RX packet data last descritpor of Rx descriptor list status register - - data buffer 1 - ior storing the nth RX packet data structure constructing register | data buffer 1 pointer \\ data butter 2 tor storing the nth RX packet data data buffer 2 pointer "7 The software driver can request more than one descriptors and data buffers at a time. As described in the above diagram, the total descriptors are constructed as a ring. A packet can be stored in more than one data buffers. In that case, the data buffer | is stored first and then data buffer 2. If a packet contains more data than the two data buffer can accorminodate, it fetches the next descriptor and two new data buffers to save the extra more data. That is a packet can be stored in more than one descriptors. In the contrary, a descriptor is not allowed to hold more than one packet. If the data buffer | can completely store Publication Release Date: April 1997 -9- Revision AlW89C840F cs AR BRT S \ Minbond lectronics Carp. ATES, the received packet, the data buffer 2 will be left empty and the next packet will be firstly stored at the data buffer | in the next descriptor. The diagram shown above is just one case of the buffer application. When the last descriptor is used by a received packet, the next descriptor should be the first descriptor of the ring. Once the descriptors are processed by the driver, it can be released to the ring for later use. In the ring structure, the start address of the next descriptor is specified by the skip length, bit2 to bit6 of COO/CBCR register, and the start address of the first descriptor is specified by the COC/CRDLA register. . For the descriptors with the chain structure, host is allowed to allocate scatterly a block of memory with the size of 4 long words, linked by the pointer which located at the next descriptor pointer field. Each descriptor has only one link to a data buffer to store the received packet data. The descriptors are located randomly and linked by the second pointer in each descriptor, which points to the start address of the next descriptor. The following figures describe the chain structures of receive descriptor. tirst descritpor of the RX descriptor status register structure constructing register data buffer 1 pointer > | data buffer 1 t ior storing the first RX packet data C next descriptor pointer second descritpor of the RX descriptor status register structure constructing register data buffer 1 pointer 7 | data buffer 1 - ior storing the 2nd RX packet data ( next descriptor pointer third descritpor of the RX descriptor status register structure constructing register data buffer 1 pointer | data buffer 1 tor storing the 3rd RX packet data C next descriptor pointer last descritpor of the RX descriptor status register structure constructing register data buffer 1 pointer _ | data butter 1 tor storing the nth RX packet data yl next descriptor pointer As shown in the above diagram, all descriptors are linked by pointers to construct a chain. The data can be stored in more than one data buffers. In the last descriptor of the descriptor chain, the content of the RO3 register will be ignored by the receive DMA state machine if the RLINK bit of the RO] register in the last descriptor is set to high. When the last descriptor has already been used, the next descriptor pointer in this one will link to the start address of the first descriptor in the chain if it is available. In the chain structure, the base address of the first descriptors is specified by the COC/CRDLA register, the receiving descriptors list address register and the base address of the next descriptor is pointed by the RO3 of the current descriptor. The following figure describes the mixed mode list, composed of both the ring and the chain structures at the same time. -10-ATES, W89C840F Winbond EE Ctoctronics Corp. first descritpor of the RX descriptor status register structure constructing register data buffer 1 pointer >+- | data buffer 1 ior storing the first RX packet data C next descriptor pointer second descritpor of the RX descriptor status register - - data butter 1 or storing the 2nd RX packet data structure constructing register data buffer 1 pointer 4 next descriptor pointer | data butter 2 HIor storing the 2nd RX packet data third descritpor of the RX descriptor y skip length between descriptors status register structure constructing register data buffer 1 pointer + | data buffer 1 Hor storing the 3rd RX packet data C next descriptor pointer last descritpor of the RX descriptor status register < - - data butter 1 tor storing the nth RX packet data structure constructing register data buffer 1 pointer 4 data butfer 2 pointer =p) data butter 2 - tor storing the nth RX packet data As shown by the above diagram, the descriptors construct a mixed structure. Each descriptor with the chain structure can link to only one data buffer and the last 32 bits are treated as the next descriptor pointer. When the RLINK bit of the current descriptor, other than the last descriptor in the descriptor list, is reset to low and this descriptor is programmed to be a ring structure, the current descriptor can point to two data buffers and the skip length between descriptor is used to point to the next descriptor starting address. In the last descriptor in the descriptor list, the RO3 register will be used to designate the base address of the data buffer 2 while the RLINK bit of the last descriptor is reset to low, but will be ignored if the RLINK bit of the last descriptor is set to high. That is, if the last descriptor is a ring structure, it acts as a ring and vice versa. The next descriptor field of the last descriptor will be the starting address of the first descriptor, no matter what the value of the RLINK bit of the last descriptor is low or high. The data flow of a packet in the receiving path is shown as the following diagram. Publication Release Date: April 1997 -il- Revision AlW89C840F Te . Winbond EE Ctoctronics Corp. As PCl a data Lg | data data buffer 1 f MAC rom ______ data 4 Kbytes FIFO buffer 2 data butler 3 status control Ax Ht descriptor 1 , controls he recelve from MAC descriptor 2 A - Law| PCI DMA x descriptor 3 master state machine dat 4 ata buffer n status & control Rx descriptor n I PGI slave As shown the above diagrain, the receiving DMA state machine controls the data receiving processing and the receiving status monitoring. On receiving the data packets, the receiving DMA will start to move these data from FIFO to the data buffer, pointed by descriptors in the host memory if there is an available data buffer and the byte count of the data received into the FIFO is larger than or equals to 64 bytes. If the received packet length is less than 64 bytes and runt packet is not accepted, the receiving DMA will discard this invalid packet and give it a record in the status register. The recetving DMA will start to move the data in FIFO after the full packet is received if runt packet is accepted. Once a valid packet is received, the recetve DMA will advance the descriptor pointer for the next incoming packet. However, the current data buffer and the descriptor will be re-used if the current receiving packet is not a valid packet, Le. the receive state machine will ignore the previously received packet data in the data buffer. Each received packet will be treated as a valid packet if it meets the requirement in the bits 3, 4, 5, 6 and 7 of C18/CNCR register. In some case of the data buffer unavailable temporarily, the incoming packet data from media will be queued in the FIFO temporarily, meanwhile, the receive DMA will enter suspend state at this time and a buffer unavailable interrupt will be issued. The receive DMA will start moving the data whenever the data buffer is available and a receiving operation is demanded, On the other hand, the data will be lost if the FIFO is overflowed. The receiving status, e.g., the receive descriptor access status, the receive completion status, the received data byte count, the received packet error status, the received packet data type, ... and so on., will be written back into the descriptor by the receive DMA when the packet is received successfully. During receiving a packet, the receive DMA will release the access right of the descriptor and the data buffer to the driver immediately after the free byte space of the data buffers pointed by the current descriptor is counted down to zero and the receive DMA will fetch the next available descriptor for the current incoming packet. It is known that the LLC layer data is packed into the first 64 bytes of the packet in most application program. The driver and the upper layer application program can read the protocol messages carried in the first 64 bytes of the incoming packet when the receive DMA release the descriptor -12-W89C840F C oe " gy nbond ATES, and the data buffer for the current incoming packet, although the current incoming packet is not yet received completely. The function of the receive DMA releasing the descriptor and the data buffer which have been used during receiving a packet allows the software and the hardware to process the receiving packet concurrently. This parallel processing of software and the hardware can improve the system receiving performance significantly. When the incoming packet is received completely, the receive DMA will write the same copy of the packet receiving status to the first descriptor and the last descriptor of the current frame respectively. The receiving status includes the receive completion status, the received byte count, the receive error type,...ctc. All of the status is specified in the receive descriptor ROO. When the software and hardware are concurrently processing , the software needs not to go back to read the first descriptor of the current incoming packet for knowing the receive completed status or other receiving status when it is processing the last descriptor and the data buffer of the current incoming packet. But, if there is only one descriptor needed for the current incoming packet, all of receiving status will be updated in the unique descriptor. The W89C840F transmit DMA function performs the data transfer from the host memory through on-chip PCI bus master into the intemal 2 Kbytes transmit FIFO. The transmit DMA state machine will request the MAC to send out the data in the FIFO onto the MIL The transmit descriptor is used to set the transmit configuration and to point to the transmit data buffer locations. Each packet to be transmitted can be described by one or more than one descriptor. And each descriptor consists of four consecutive long word. The first long word(T00) is for the transmit frame status register. The TOO describes the descriptor access right control, the packet transimitting status,...etc. The second long word(TO1) is for the control register used to specify the transmission configuration, including the CRC inhibit control, padding function control, the descriptor structure control ... ete. The third long word (T02) is for the first data buffer pointer and the fourth long word is used as the second data buffer pointer in the ring structure. The transmit descriptor list also can be constructed as a ring structure or a chain structure. The mixed chain and ring structure is also allowed to be constructed. The scheme for constructing the transmit descriptor list is same as the one for receiving descriptor list, but, each transmit data buffer size is limited to under | Kbytes other than the 2 Kbytes receiving data buffer. In the consequence of the 1 Kbytes transmit data buffer, each descriptor can point to a maximum two | Kbytes data buffer totally. The data flow of the packet transmission is shown as the following diagram Publication Release Date: April 1997 - 13 - Revision AlW89C840F track C Pe " cinbond ATES, PCl A data data ew o buffer 1 data MAC long word ~ 2 Kbytes Le data aligning buffer FIFO butter 2 i data | control buffer 3 TX Lal descriptor 1 = controls T. i. fromto descriptor 2 a PCI L_ transmission MAC Tx master DMA ~_____ descriptor 3 state machine A data butter n Tx descriptor n i PCl slave The data to be transmitted is stored in the transmit data buffer in the host memory. The transmission DMA state machine will fetch the data in the host memory into the transmit FIFO. when the transmission DMA is started up. All of the data fetched from the data buffer will be long word aligned before being queued into the transmission FIFO. The driver prograin can inform the transmit DMA the location of the data to be transmitted in the host memory and then the transmit DMA will fetch the data from that location directly. Because the address of the data may not long word aligned, so that the transmit DMA need to align the data for passing the data to the MAC in a long word aligned format. The aligned long word data, and then, is queued into the transmit FIFO. The transmission DMA will not request the MAC to fetch the data in the FIFO for transmitting until the byte count of the data in the FIFO is reach the threshold defined by C18/CNCR bit 14~20. The transmission DMA is implemented a pre-fetch function for speeding the transmit performance. With this implementation, the transmit DMA will pre-fetch the next packet data in the host memory after the current packet data is moved into the transmit FIFO completely. Before starting to fetch the next packet data, the transmit DMA will assert an interrupt if the transmit early interrupt is enabled. If there is no more packet to be transmitted, the transmit DMA will report a buffer unavailable status and assert an interrupt if the transimit buffer unavailable interrupt is enabled. After all of the current packet data in the transmit FIFO are transferred out by the MAC block, the transmit DMA will try to fetch the next packet data again automatically if the transmit DMA is not fetching the data from the host memory. A packet transmit interrupt will be asserted when the current packet is transmitted if the packet transmitted interrupt is enabled. The transmit DMA will write back the current packet transmit status into the first descriptor of the current transmit packet when the packet is successfully transmitted or is aborted due to excessive collision. For consecutively transmitting multiple packets, the software driver can previously program all the packet data in the host memory and then release the access right to the W89C840F. Once the transmit DMA is turned on, the DMA will transmit all of the packet out automatically. The inter-frame gap between these packets will be specified by the MAC block for complying with the IEEE802.3u specification. - 14 -| W89C840F . Hinbond rh EE Ctoctronics Corp. be Q ATES, For concurrently processing the packets transinitting, the transmission DMA asserts the transmit early interrupt to trigger the software driver to set up the next transmitting packet data more earlier. The data transmission rate on the MII bus can be either LO Mbps or LOO Mbps which is quite lower than the rate on PCI bus. Mostly, the packet data is not yet completely transmitted onto the MII bus even though the packet data with only a few bytes have been all moved into the transmit FIFO, the transmission DMA still does not issue an interrupt to host. This will drop the transmit performance if the software driver waits for the current packet being transmitted onto the MII completely and then set up the next packet data. The transmit early interrupt can avoid the time consumption when waiting for the transmit completion of the current packet occurs. Media Access Control function(MAC) The function of W89C840F MAC fully meets the requirements, defined by the TEEE802.3u specification. The following paragraphs will describe the frame structure and the operation of the transinission and receive. The transmission data frame sent from the transmit DMA will be encapsulated by the MAC before transmitting onto the MII bus. The sent data will be assembled with the preamble, the start frame delimiter(SFD), the frame check sequence and the padding for enforcing those less than 64 bytes to meet the minimum size frame and CRC sequence. The out going frame format will be as following 10101010- - -- 10101010)1010111 0 Wi W2]-- dn jpadding CRC31| CRC30| --- | CRCO As mentioned by the above format, the preamble is a consecutive 7-byte long with the pattern 10101010 and the SFD is a one byte 10101011 data. The padding data will be all 0 value if the sent data frame is less than 64 bytes. The padding disable function specified in the bit23 of the transmit descriptor TOL is used to control if the MAC needs to pad data at the end of frame data or not when the transinitted data frame is less than 64 bytes. The padding data will not be appended if the padding disable bit is set to high. The bits CRCO ... CRC31 are the 32 bits cyclic redundancy check(CRC) sequence. The CRC encoding is defined by the following polynomial specified by the IEEE802.3. G(xy=xr t xt xP tx? gx tx? ex gx tb tx tx taxt 4x? tx! This 32 bits CRC appending function will be disabled if the Inhibit CRC of the transmission descriptor TOL is set to high. The MAC also performs many other transmission functions specified by the [EEE802.3, including the inter-frame spacing function, collision detection, collision enforcement, collision backoff and retransmission. The collision backoff timer is a function of the integer slot time, 512 bit times. The number of slot times to delay between the current transmission attempt to the next attempt is determined by a uniformly distributed random integer algorithm specified by the IEEE802.3. The integer, r, is specified as the following O, C38, C3c, C40, C44, C48. 6) Any read on the reserved register will be returned with 0 s value. The following table outlined all the control/status registers inside this chip and its offset address, and summarized its function. Code Abbr. Meaning Base offset from FBIOA, FBMA coo CBCR Bus Control 00H C04 CTSDR Transmit Start Demand 04H Cos CRSDR Receive Start Demand 08H coc CRDLA Receive Descriptor List Address 0CH C10 CTDLA Transmit Descriptor List Address 10H Cl4 CISR Interrupt Status 14H Clg CNCR Network Configuration 18H cic CIMR Interrupt Mask 1CH C20 CFDCR Frame Discarded Counter 20H C24 CMITR MII Management and ROM 24H C28 CBROA Boot ROM Offset Address 28H C2c CGTP General Timer 2CH C30 CRDAR Current Receive Descriptor Address 30H C34 CRBAR Current Recetve Buffer Address 34H C38 CMAO Multicast Address 0 38H C3c CMAL1 Multicast Address 1 3CH C40 CPAO Physical Address 0 40H Publication Release Date: April 1997 -31- Revision AlW89C840F C44 CPAL Physical Address 1 44H C48 CBRCR Boot ROM Size Configuration 48H C4c CTDAR Current Transmit Descriptor Address 4cH C50 CTBAR Current Transmit Buffer Address 50H C54~CFF reserved reserved reserved This table lists the initial state of each register in the W89C840F after hardware reset and software reset seperately. Code Abbr. hardware reset software reset Coo CBCR 00000010H 00000010H C04 CTSDR 00000000H 00000000H C08 CRSDR 00000000H. 00000000H. coc CRDLA 00000000H 00000000H C10 CTDLA 00000000H. 00000000H. Cl4 CISR 03800000H 03800000H Clg CNCR 20000030H 20000030H cic CIMR 00000000H 00000000H C20 CFDCR 00000000H 00000000H C24 CMITR 00000000H 00000000H C28 CBROA 00000000H 00000000H C2Cc CGTP 00000000H 00000000H C30 CRDAR 00000000H 00000000H C34 CRBAR 00000000H 00000000H C38 CMAO 00000000H not affected Cc3c CMAL 00000000H. not affected C40 CPAO 00000000H not affected C44 CPAI1 00000000H not affected C48 CBRCR 00000000H not affected Cdc CTDAR 00000000H 00000000H C50 CTBAR 00000000H 00000000H The detail function and operation for each register in the W89C840F will be described in the following paragraph. There are total 21 registers to be described in register code order in this paragraph. The full name of these registers are COO/CBCR Bus Control Register, CO4/CTSDR Transmit Start Demand Register, CO8/CRSDR Receive Start Demand Register, COC/CRDLA Receive Descriptors List Addresses, C1O/CTDLA Transmit Descriptors List Addresses, C14/CISR Interrupt Status Register, -32-W89C840F ATES, RR i Winbond C1L8/CNCR Network Configuration Register, CLC/CIMR Interrupt Mask Register, C20/CFDCR Frame Discarded Counter Register, C24/CMIIR MIT Management and ROM Register, C28/CBROA Boot ROM Offset Address Register, C2C/CGTR General Timer Register, C30/CRDAR Current Receive Descriptor Address Register, C34/CRBAR Current Receive Buffer Address Register, C38/CMAO Multicast Address Register 0, C3C/CMAL Multicast Address Register 1, C40/CPAO Physical Address Register 0, C44/CPA1 Physical Address Register 1, C48/CBRCR Boot ROM Size Configuration Register, C4AC/CTDAR Current Transinit Descriptor Address Register and CSO/CTBAR Current Transinit Buffer Address Register. C00/CBCR Bus Control Register: This register defines the configuration of bus master, including the wait state control, the endian mode control of the descriptor, cache alignment control, burst length control, descriptor skip length and the internal bus access priority. In addition to the bus master control, the software reset will be performed after programming a logic | to the software reset bit of COO/CBCR. Before writing data to the COO/CBCR, the transmit and receive processes must be stopped. Otherwise the current transmit or receive operation will not be completed correctly. The following table detailedly described the function of each bit of the register COO/CBCR. Bit Attribute Bit name Description 31:22 R --- Reserved. Fixed at 0. 21 R/W WAIT Wait State Insertion When WAIT is set, the W89C840F, as a bus master, executes memory read/write with one wait state every data phase. When WAIT is reset, the W89C840F, as a bus master, executes memory read/write with zero wait state every data phase. 20 R/W DBE Descriptor Big Endian Mode When set, the descriptors will be handled in big endian mode; when reset, the descriptors will be treated in little endian mode 19:16 R --- Reserved. Fixed at 0. Publication Release Date: April 1997 - 33 - Revision AlW89C840F L BRRs 15:14 R/W CA Cache Alignment CA defines the address boundary for the burst access to the transmission or receive data. When the starting address of the data burst access is not aligned, more specifically, the starting address should be a multiple of some number such as 4, 8 etc., the W89C840F will have the first burst transfer that causes that the next burst access will has the start address aligned. After the first burst occurred, all other burst operation are aligned with the configuration of CA accordingly. The CA must be initialized with a non zero value after reset. The alignment configuration is as following: [15:14] Address Alignment [00] reserved [01] long-word alignment [10] 16 long-word alignment [11] 32 long-word alignment 13:8 R/W BL Burst Length BL defines the maximum number of the long words that can be transferred within one PCI burst transaction. The burst length configuration is as following. [13:8] Burst Length 00H refer to CA 01H | long word 02H 2 long word 04H 4 long word 08H 8 long word 10H 16 long word 20H 32 long word other reserved 7 R/W BBE Buffer With Big Endian When set, the data buffers are treated with big endian ordering. When reset, the data buffers are treated with little endian ordering. 6:2 R/W SKIP Skip Length Between Descriptors This field specifies the skip length between two descriptors (from the start address of the current descriptor to the start address of the next descriptor). The unit of the skip length is long word. The default value after hardware or software reset is 04H. -34-K rh be Q ATES, Winbond EE Ctoctronics Corp. W89C840F R/W ARB Arbitration Between Tx And Rx Processes When set, the TX process and RX process will have the nght to use the internal bus with the same priority. When reset, the RX process will have higher priority than TX process with regarding to the internal bus utilization. SWR Software Reset. Set SWR to high will reset most internal registers (except that C38, C3c, C40, C44, C48, and PCI Configuration Registers). The software reset will be lasted for 4 PCI clocks and the bit will self-clean after software reset completed. If any consequent access to the W89C840F is coming during this reset process, the W89C840F will delay asserting TRDY# until the reset process is completed. This bit is default 0 after hardware reset. CO4/CTSDR Transmit Start Demand Register The register CO4/CTSDR is used to request the W89C840F to do a transmission process. Bit Attribute Bit name Description 31:0 Ww TSD Transmit Start Demand A write to this register will trigger the W89C840F*s transmit DMA to fetch the descriptor for progressing the transmission operation when the W89C840F s transmit DMA is staying at the suspend state. Otherwise, the write operation will have no effect. The W89C840F* s transmit DMA will return to the suspend state if no descriptor is available. Meanwhile, the bit 2 of C14/CISR will be asserted to claim the transmit buffer unavailable If there is any descriptor available, W89C840F will start to the transmit process. C08/CRSDR Receive Start Demand Register The register CO4/CTSDR is used to request the W89C840F to do a receive process. Bit Attribute Bit name Description Publication Release Date: April 1997 - 35- Revision AlATES, \ Winbond Clectronics Carp. W89C840F 31:0 Ww RSD Receive Start Demand A write to this register will trigger the W89C840Fs receive DMA to fetch the descriptor for progressing the receiving operation when the W89C840P s receive DMA is staying at the suspend state. Otherwise, the write operation will have no effect. The W89C840Fs receive DMA will return to the suspend state if no descriptor is available. Meanwhile, the bit 7 of Cl4/CISR will be asserted to claim the receive buffer unavailable. If there is any descriptor available, W89C840F will start to the receive process and waiting for the incoming frames. COC/CRDLA Receive Descriptors List Addresses The register COC/CRDLA defines the start address of the receive descriptor list. It should be updated only when the receive DMA state machine is staying at the stop state. Bit Attribute Bit name Description 31:2 R/W SRL Start of Receive List. L:0 R/W MBZ Must be written as 0 for long word alignment. C10/CTDLA Transmit Descriptors List Addresses The register CLO/CTDLA defines the start address of the transmit descriptor list. It should be updated only when the transmission DMA state machine is staying at the stop state. Bit Attribute Bit name Description 31:2 R/W STL Start of Transmit List. 1:0 R/W MBZ Must be written as 0 for long word alignment. -36-ATES, \ Winbond Clectronics Carp. W89C840F C14/CISR Interrupt Status Register Most bits of the CL14/CISR report the interrupt status. The assertion of the interrupt status, reported by bits 0, 1, 2, 3, 4, 5, 6,7, 8, LO, LL and 13, and the corresponding interrupt mask bits will cause a hardware interrupt to the host. A wiite with 1s value the status bit will clear them and write 0 will have no effect. Bit Attribute Bit name Description 31:26 R --- Reserved. Fixed at 0. 25:23 R BET Bus Error Type. The field indicates the error type of bus error and is valid only when bit 13, bus error, is set. the assertion of these bits does not generate interrupt. The definition of bus error is as follows. BET[25:23] Error State 000 Parity Error 001 Master Abort O10 Target Abort O11 Reserved. 1xx Reserved. The meanings of the error type is described as following. * Parity Error --- When W89C840F operates as a bus master, it can detect a data parity error during a read transaction or sample PERRB asserted on a write transaction if Parity Error Response bit (FO4[6]) is set. * Master Abort --- When W89C840F operates as a bus master, W89C840F terminates the read or write transaction with master abort. * Target Abort --- When W89C840F operates as a bus master, the read or write transaction is terminated with target abort. The initial state of this field after reset is zero. 22:20 R TPS Transmit Process State. This field indicates the transmit state. This field does not generate interrupt. 19:17 R RPS Receive Process State. This field indicates the receive state. This field does not generate interrupt. Publication Release Date: April 1997 - 37 - Revision AlW89C840F iF 16 R NIR Normal Interrupt Report. The normal interrupt report includes transmit completed interrupt, transmit buffer unavailable interrupt and the receive completed interrupt. The NIR is a logical OR result of the bits 0, 2, 6 of the register C14/CISR. Only the bits corresponding to the unmasked bits of CLC/CIMR will affect this bit. 15 R AIR Abnormal Interrupt Report. The abnormal interrupt includes transmit process in idle state interrupt, receive early interrupt, receive error interrupt, transmit FIFO under-flow interrupt, receive buffer unavailable interrupt, receive idle state interrupt, transmit early interrupt, timer expire interrupt and the bus error internupt. The AIR is a logical OR result of the bits 1, 3, 4, 5, 7, 8, 10,11, 13 of the register Cl4/CISR. Only these bits corresponding to the unmasked bits of the CLC/CIMR will affect this bit. 14 R --- Reserved. Fixed at 0. 13 R/W BE Bus Error. A high indicates a bus error happened. The error type will be shown by bit 25~23. 12 R --- Reserved. Fixed at 0. 11 R/W TE Timer Expired. A high indicates the general timer (C2C/CGTR) expired. 10 R/W TEI Transmit Early Interrupt The W89C840F will has Transmit Early Interrupt status set after the packet to be transmitted is completely transferred into the transmit FIFO if Transmit Early Interrupt On bit of CL8/CNCR is set. The TEI will be cleared automatically after the packet is transmitted out from the transmit FIFO completely. 9 R --- Reserved. Fixed at 0. 8 R/W RIDLE Receive in Idle State. Set means the receive DMA state machine is in the idle state. 7 R/W RBU Receive Buffer Unavailable. When there is no receive buffer available, this bit is set and the receive process enters the suspend state. When W89C840F is first initialized, this bit will not be set even if there is no buffer available. It will be set only when there has been any available buffer and no available buffer afterwards. The RBU will not accumulate the number of the receive buffer unavailable event, i.c. the write an Ls value to RBU will clear the RBU no matter how many times the receive buffer unavailable has been occurred before the RBU is cleared. -38-K rh be Q ATES, Winbond EE Ctoctronics Corp. W89C840F 6 R/W RINI Receive Interrupt A high indicates that a frame has been received and the receive status is transferred into the receive descriptors of the current fraine. TUF Transmit FIFO Under-flow A high indicates that the transmit FIFO had an under-flow error during the packet transmission. After the FIFO under-flow occurred, the transmit DMA will not continue to fetch the un-transmitted data of the current frame but fetch the descriptor of the current frame for looking for the last descriptor of the current frame. The W89C840Fs transmit DMA state machine will write the transmit status to the last descriptor of the current frame with a 1s value for the bit 1 of Transmit Descriptor 0 (TOO[L]). The W89C840F will continue to transmit next packet when the current fraine transinit status is updated.. RERR Receive Error. A high indicates that the receive DMA detects a receive error during the packet reception. The receive DMA will set this bit when some prior received data of the current incoming packet have been moved into the data buffer in the host memory and some kind of error occurred when receiving the posterior data of the current incoming packet from the MIT bus. The INTAB will be asserted when a receive error is detected and the receive error interrupt enable is unmasked and the error packet will be aborted. REI Receive Early Interrupt The REI will be set when the number of the data of the incoming frame, in long word unit, transferred to the data buffer reaches Receive Early Interrupt Threshold specified by the register CL8ACNCR if Receive Early Interrupt On in the register C18/CNCR is set. This bit will be cleared automatically after Receive Interrupt (RINI) or Receive Error (RERR) is set.. Transmit Buffer Unavailable A high indicates that there is no available transmit descriptor during or after the packet transimission. The transmit process will stay in suspend state. The TBU will not accumulate the number of transmit buffer unavailable event, i.c. write an L value to TBU will clear the TBU, no matter how many times the transmit buffer unavailable has been occurred before the TBU is cleared. TIDLE Transmit Process in Idle State. A high indicates the transmit state machine is in the idle state. Publication Release Date: April 1997 - 39- Revision AlW89C840F cinbond ATES, 0 R/W TINI Transmit Interrupt The TINI will be set when a frame transmit is completed and the FINT (bit 31) of Transmit Descriptor | (TO1) is set. C18/CNCR Network Configuration Register The register C18/CNCR defines the configuration for the data transmission or receiving and the interrupt algorithm for interrupt assertion. Bit Attribute Bit name Description 31 R/W REIO Receive Early Interrupt On The receive early interrupt function will be enabled when the REIO is set to high. Otherwise, the receive early interrupt function will be disabled. During receiving packet data, the W89C840F will assert an interrupt request when the bytes number of the received data, which the receive DMA has moved them into the data buffer in the system meimory , excesses the receive early interrupt threshold. 30 R/W TEIO Transmit Early Interrupt On The transmit early interrupt function will be enabled when the TEIO is set to high. Otherwise, the transmit early interrupt function will be disabled. The W89C840F will assert an early transmit interrupt when all the current packet data have been moved into the 2 Kbytes transmit FIFO no matter the data have been put onto the MII interface completely or not. 29 RAW FES Fast Ethernet Select When set, W89C840F will run in 100 Mbps mode. When reset, W89C@40F run in LO Mbps mode. To change this bit, the transmit state machine must be in Idle state. The SQE test function will be enabled when FES is reset to low. - 40 -ATES, \ Winbond Clectronics Carp. W89C840F 28:21 R/W REIT Receive Early Interrupt Threshold During receiving packet, the W89C840F will assert an interrupt request when the bytes nuinber of the received data, which the receive DMA has moved them into the data buffer, excesses the receive early interrupt threshold. To set this field OOH will disable receive early interrupt function. The setting of the receive early interrupt is as following. REIT[28:21] receive early interrupt threshold OfH 60 bytes 10H 64 bytes ffH 020 bytes 20:14 TTH Transinit Threshold. These bits select the transmit threshold level of the transmit FIFO. The packet Transmission will be started immediately once the data queued into the transmit FIFO has reached the threshold level. The transmission will also be started immediately when the full packet has been transferred into the transmit FIFO even though the frame length is less than the TTH level. To change this bit, the transmit state machine must be in Idle state. The following table shows there is a difference with 16 bytes for each consecutive setting value in this field, except that the first one in the table. TTH[20:14] 00H full packet 01H 16 bytes 02H 32 bytes Of 240 bytes 10H 256 bytes 7H 2032 bytes Publication Release Date: April 1997 - 4] - Revision AlW89C840F A a 13 R/W TXON Transmit On. When set, the transmission process will be started (leave the Idle state, at first, and fetch the transmission descriptor according to the configuration of CLO/CTDLA ). When reset, the transmission state machine will be stopped after the current frame is completed (transmitted successfully or transmission abort with excessive collision). The register CLO/CTDLA must be programmed before setting TXON high. 12 R --- Reserved. Fixed at 0. 11:10 R/W LBK Loopback Mode. The LBK selects the W89C840F loop-back modes: LBK[1 1:10] Loop-back Mode 00 Normal mode 01 Internal Loop-back 10 External Loop-back 9 R/W FD Full Duplex Mode. When set, the W89C840F will perform the full duplex function. When reset, the W89C840F works in half duplex mode. In full duplex inode, the W89C840F can transinit and receive packets at the same time. In half duplex mode, the W89C840F can only exclusively cither transmit or receive. The W89C840F is not allowed to be programmed in internal loop-back mode when it is in full duplex mode. To change this mode setting, be sure W89C840F is completely idle and the Receive On bit (RXON) and the Transmit On bit (TXON) are both reset. 8 R --- Reserved. Fixed at 0. 7 R/W AEP Accept Error Packet. When set, all incoming packets passed address filtering will be accepted, including runt packets, CRC error packets, and dribbling bit error packets. When reset, only the valid incoming packets will be accepted. Default 0. 6 R/W ARP Accept Runt Packet. When set, the incoming packets pass the address filtering with the length less than 64 bytes are accepted. When reset, the incoming packets pass the address filtering with the length less than 64 bytes are rejected. Default 0. 5 R/W ABP Accept Broadcast Packet. When set, all incoming packets with a broadcast address will be accepted. When reset, the incoming packets with a broadcast address will be rejected. Default L. -42-h AY LcEE: ATES, Winbond EE Ctoctronics Corp. W89C840F 4 R/W AMP Accept Multicast Packet. When set, all incoming packets with a multicast address match the node inulticast address table (MAR7 ~ MARO) will be accepted. When reset, all incoming packets with a multicast address (excluding broadcast address) will be rejected. Default 1. 3 R/W APP Accept All Physical Packet. When set, all incoming packets with unicast address will be accepted. When reset, only the incoming packets with destination address matching the physical address of the node will be accepted. Default 0. 2 R --- Reserved. Fixed at 0. 1 R/W RXON Receive On. When set, the receive process will be started (leave the Idle state, at first, and fetch the receive descriptor according to the configuration of the register COC/CRDLA ). When reset, the receive state machine will be stopped after the current frame is completed. The COC/CRDLA, C40/PARO, C44/PAR1, C38/MARO and C3C/MAR1 registers must be programmed before setting the RXON high. 0 R --- Reserved. Fixed at 0. C1C/CIMR Interrupt Mask Register The register CLC/CIMR controls the interrupt enable corresponding to the bits in the register CL4/CISR. Bit Attribute Bit name Description 31:17 R Reserved. Fixed at 0. 16 R/W NIE Normal Interrupt Enable. The Normal Interrupt will be enabled if the NIE is set to high. The Normal Interrupt is disabled when the NIE is reset to low. The hardware interrupt will be asserted if both the NIE bit of the CLC/CIMR and the NIR bit of the Cl4/CISR NIR are set to high. 15 AIE Abnormal Interrupt Enable. The Abnorinal Interrupt will be enabled if the AIE is set to high. The Abnormal Interrupt is disabled when the AIE is reset to low. The hardware interrupt will be asserted if both the AIE bit of the CLC/CIMR and the AIR bit of the C14/CISR AIR are set to high. l4 Reserved. Fixed at 0. Publication Release Date: April 1997 - 43 - Revision AlATES, ih inbond Clectronics Carp. W89C840F 13 R/W BEE Bus Error Enable. The Bus Error Interrupt will be enabled if both ATE(bit 15) and BEE are set to high, otherwise, the Bus Error Interrupt will be disabled. The hardware interrupt will be asserted if all of the AIE bit of the CLC/CIMR, the BEE bit of the CLC/CIMR and the BE bit of the C14/CISR are set to high at the same time. 12 Reserved. Fixed at 0. Ll TEE Timer Expired Enable. The Timer Expired Interrupt will be enabled if both ATE(bit 15) and TEE are set to high, otherwise, the Timer Expired Interrupt will be disabled. The hardware interrupt will be asserted if all of the bit AIE in C1C/CIMR, the bit TEE in CLC/CIMR and the bit TE C14/CISR are set to high at the same time. LO TEIE Transmit Early Interrupt Enable. The Transmit Early Interrupt will be enabled if both ATE(bit 15) and TEIE are set to high, otherwise, the Transmit Early Interrupt will be disabled. The hardware interrupt will be asserted if all of the bit AIE in CLC/CIMR, the bit TETE in CLC/CIMR and the bit TEI in C14/CISR are set to high at the same time. Reserved. Fixed at 0. RIE Receive Idle Enable. The Receive Idle Interrupt will be enabled if both ATE(bit 15) and RIE are set to high, otherwise, the Receive Idle Interrupt will be disabled. The hardware interrupt will be asserted if all of the bit AIE in CLC/CIMR, the bit RIE in CLC/CIMR and the bit RIDLE in C14/CISR are set to high. RBUE Receive Buffer Unavailable Enable. The Receive Buffer Unavailable Interrupt will be enabled if both ATE(bit 15) and RBUE are set to high, otherwise, the Receive Buffer Unavailable Interrupt will be disabled. The hardware interrupt will be asserted if all of the bit ATE in CLC/CIMR,the bit RBUE in CLC/CIMR and the bit RBU in C14/CISR are set to high. RINTE Receive Interrupt Enable. The Receive Interrupt will be enabled if both NIE(bit 16) and RINTE are set to high, otherwise, the Receive Interrupt will be disabled. The hardware interrupt will be asserted if all of the bit NIE in CLC/CIMR, the bit RINTE in CLC/CIMR and the bit RINI in C14/CISR are set to high. TFUE Transmit FIFO Underflow Enable. The Transmit FIFO Underflow Interrupt will be enabled if both ATE(bit 15) and TFUE are set to high, otherwise, the Transmit FIFO Underflow Interrupt will be disabled. The hardware interrupt will be asserted if all of the bit ATE in CLC/CIMR, the bit TFUE in CLC/CIMR and the bit TUF in C14/CISR are set to high. 44 -, cp ATES, inbond Clectronics Carp. W89C840F 4 R/W RERRE Receive Error Enable. The Receive Error Interrupt will be enabled if both ATE(bit 15) and RERRE are set to high, otherwise, the Receive Error Interrupt will be disabled. The hardware interrupt will be asserted if all of the bit AIE in CLC/CIMR, the bit RERRE in CLC/CIMR and the bit RERR in C14/CISR are set to high. REIE Receive Early Interrupt Enable. The Receive Early Interrupt will be enabled if both ATE(bit 15) and REIE are set to high, otherwise, the Receive Early Interrupt will be disabled. The hardware interrupt will be asserted if all of the bit AIE in CLC/CIMR, the bit REIE in CLC/CIMR and the bit REI in C14/CISR are set to high. TBUE Transmit Buffer Unavailable Enable. The Transmit Buffer Unavailable Interrupt will be enabled if both NIE(bit 16) and TBUE are set to high, otherwise, the Transmit Buffer Unavailable Interrupt will be disabled. The hardware interrupt will be asserted if all of the bitsNIE and TBUE in C1C/CIMR and the bit TBU in CI4/CISR are set to high. TIE Transmit Idle Enable. The Transmit Idle Interrupt will be enabled if both ATE(bit 15) and TIE are set to high, otherwise, the Transmit Idle Interrupt will be disabled. The hardware interrupt will be asserted if all of the CIC/CIMR AIF, CLC/CIMR TIE and C14/CISR TIDLE are set to high. TINTE Transmit Interrupt Enable. The Transmit Interrupt will be enabled if both NIE(bit 16) and TINTE are set to high, otherwise, the Transmit Interrupt will be disabled. The hardware interrupt will be asserted if all of the bits NIE and TINTE in C1C/CIMR and the bit TINI in C14/CISR are set to high. Publication Release Date: April 1997 - 45 - Revision AlATES, \ Winbond Clectronics Carp. W89C840F C20/CFDCR Frame Discarded Counter Register The register C20/CFDCR records the missed packet count and the FIFO overflow count. Bit Attribute Bit name Description 31 R MRFO More Receive FIFO Overflow This bit is the overflow bit of the receive FIFO Overflow counter. The actual number of the FIFO overflow must be more than the number shown by the bits field RFOC if the MRFO is set to high. This bit will be reset after a read operation 30:17 RFOC Receive FIFO Overflow Counter The RFOC indicates the number of the packets that are discarded due to the receive FIFO overflow under the condition of the receive buffer is not available. This counter will be reset after being read by the driver program. 16 MMP More Missed Packets Overtlow bit of Missed Packet Counter. The actual number of the missed packet must be more than the number shown by the bits field MPC if MMP is set tot high. This bit will be reset after read by a read operation. 15:0 MPC Missed Packet Counter The MPC indicates the number of packets that are discarded due to the receive FIFO overflow which is caused by that the receive DMA can not get sufficient utilizing on PCI bus, in which, the receive data buffer is available for the current frame. Although there is a receive data buffer available for the current frame, the received data of the current frame in the FIFO can not be completely moved into the data buffer in host memory before the receive FIFO is overflow if the receive DMA can not get sufficient utilizing on PCI bus. This counter will be reset after a read operation. C24/CMIIR Mil Management and ROM Register The register C24/CMIIR is used to specify the control function and the data message passing for the on board EEPROM and boot ROM device access. The followed table described the MII management frame format: MIl Management Protocol PRE | ST | OP | PHYAD | REGAD | TA | DATA IBLE Read 1..1 | 01 | 10 | AAAAA | RRRRR | ZO | 16 bits Z Write 1..1 | O1 | 01 | AAAAA | RRRRR | 10 | 16 bits Z PRE:Preample, ST:Start of Frame, OP:Operation code, PHY AD:PHY address, REGAD: register address - 46 -W89C840F ATES, RR i Winbond TA:Turnaround. The detailed timings for the read and the write operation, respectively, of the MII management function are illustrated as the figure below. Each bits in the management data frame(MDIO) are synchronized at the nsing edge of the MIT management clock(MDC) 2 oO: 16 7O : . are MDIO. -__ pee Tih impedance@) {diel Preatnble Istart {Read PHYAD REGAD | TA | Data | Idle Typical MDIO/MDC Read Gycie = hr MDIO IRDY# 1s ._ 16 | | r | ! TRDY# 7 STS ! DEVSEL# ! . | | 1 TH | | | SS ! | 1718 | ! TIO | ! PAR | {INPUT XA : OUTPUT | ee > | (114 | T15 | IDSEL# ! N 2 ! ! : Symbol Description Min Typical | Max | Unit TL PCI input signal set up time* 7 nsec T2 PCI input signal hold time* 0 nsec T3 BE Byte Enable set up time 7 nsec T4 BE Byte Enable hold time 0 nsec T5 IRDY# set up time 7 nsec T6 IRDY# hold time 0 nsec T7 PAR input setup time 7 nsec T8 PAR input hold time 0 nsec T9 DEVSEL# driven time Ll 12 13 nsec TLO DEVSEL# hold time 11 12 13 nsec TLL output data hold time 18 19 20 nsec T12 TRDY# driven time IL 12 13 nsec T13 TRDY# hold time 11 12 13 nsec Tl4 PAR output driven time 11 12 13 nsec TLS PAR output hold time 11 12 13 nsec Note: address, command, and FRAME# for slave access, IDSEL# tor configuration read transaction -65- Publication Release Date: April 1997 Revision AlW89C840F RNG ATES, AC Characteristics (Vpp=4.75 V to 5.25V, Vec=0 V,TA = 0 C to 70 C) PCI Slave Write Transaction 0 1 2 3 CLK : ! SS VS Vd | FRAME# \ ! ! 3 | ! | 112, | | AD[31::0] ! < |__DATA . +4 H ! ! ae | C/BE[3:0 | x tt IRDY# v ey ! TRDY# ~~ Seq | }/--+ : 1g | ! DEVSEL ve m4 fp ! i ae PAR ; A | : Ineur | IDSEL# \ Mitte ! \o . , (71 PERR# ! ! Ih ' (T17) Symbol | Description Min Typical | Max Unit T1 PCl input signal setup time 7 nsec T2 PGI input signal hold time* 0 nsec T3 BE Byte Enable set up time 7 nsec T4 BE Byte Enable hold time 0 nsec T5 IRDY# set up time 7 nsec T6 IRDY# hold time 0 nsec T? PAR input setup time 7 nsec T8 PAR input hold time 0 nsec T9 DEVSEL# criven time 11 12 13 nsec T10 DEVSEL# hold time 11 12 13 nsec T11 input data set up time 7 nsec T12 input data hold time 0 nsec T13 TRDY# driven time 11 12 13 nsec T14 TRDY# hold time 11 12 13 nsec T15 PAR input setup time 7 nsec T16 PAR input hold time 0 nsec T17 PERR# driven time** 11 12 13 nsec - 66 -| W89C840F Winbond EB Dlectronics Carp. Bi rh ATES, cere T18 PERR# hold time** 11 12 13 nsec Note: address, command, and FRAME# for slave access, IDSEL# for configuration read transaction **PERR# will be asserted if the parity error event occurred. AC Characteristics (Vpp=4.75 V to 5.25V, Vee=0 V,TA = 0 C to 70 C) PCI Transaction Termination Disconnect-G/Retry Type: C/BE[3-0]# (sau nee IRDY# TRDY# 4 A DEVSEL# ! -_ L\\ STOP# | | 9 4 2 3 4 15 18 i? 18 19 CLK pT FRAME# | | | ! Ly AD[31:;0) ~~ ABBRESS} Symbol | Description Min Typical |} Max | Unit TL FRAME+# deasserted from clock 15 0 nsec T2 Clock 16 to STOP# asserted time Ll 12 13 nsec T3 Clock 18 to STOP# and DEVSEL# hold time Ll 12 13 nsec Note: 1) The other timing requireiments for PCI input signal are as the read transaction timing. 2) T1,T2 and T3 are used for the disconnect type C(host try to transfer more than one data phase). Publication Release Date: April 1997 - 67 - Revision AlW89C840F RR i Winbond ATES, Target-Abort Type CLK FRAME# AD[81::0] C/BE[3::0]# IRD Y# TRDY# DEVSEL# STOP# SYMBOL | DESCRIPTION Min | typical | MAX | UNIT Tl FRAME# deasserted from clock 15 0 nsec T2 Clock 4 to DEVSEL# hold time LL 12 13 nsec T3 Clock 6 to STOP# hold time LL 12 13 nsec Note: 1) The other timing requirements for PCI input signal are as the read transaction timing.. 2) T2 and T3 are used for the target abort type(host addressing error). - 68 -AC Characteristics wa 32KX8-220 BPROM/ FLASH MEMORY Read cycle CLK FRAME# AD[31::0] C_BEB[3:0]}# _ Xx W89C840F (Vpp=4.75 V to 5.25V, Vgg=0 V,TA = 0 C to 70 C) IRDY# TRDY# DEVSEL# MSA14/L MSA[9:0] MSA[13:10] BPCSB MSRDB MSD[7:0] SYMBOL | DESCRIPTION Min | typical | MAX | UNIT T1 clock 4 to MSA14/L valid 8 13 18 nsec T2 clock 5 to MSA14/L deasserted time 8 13 18 nsec T3 clock 6 to MSA bus valid 8 13 18 nsec T4 clock 14 to MSA bus valid 8 13 18 nsec T5 clock 23 to MSA deasserted 8 13 18 nsec T6 clock 4 to MSA high nibble valid 8 13 18 nsec T7 clock 6 to BPCSB valid 15 20 25 nsec T8 clock 25 to BPCSB deasserted t 12 17 nsec T9 clock 8 clock 17 to MSRDB asserted time 15 20 25 nsec T10 clock 13/ clock 22 to MSRDB deasserted time 8 13 18 nsec T11 MSD setup time trom clock 13 nsec T12 MSD hold time from clock 15 0 nsec Note: 1) The other timing requirements for PCI signal are as the read transaction timing. 2) BPROM/FLASH memory access could be byte, word or double word access. The timing is the same. - 69 - Publication Release Date: April 1997 Revision AlW89C840F RR i Winbond ATES, AC Characteristics (Vpyp=4.75 V to 5.25V, Veo=0 V,TA = 0 C ta 70 C) Serial EEPROM Timing DESCRIPTION MIN | MAX. | UNIT SYMBOL TL EECS asserted to SK 500 ns T2 EECS hold from SK 0 500 ns T3 MSD2 OFF time 500 600 ns T4 MSD2 ON time 500 | 600 ns T5 MSD2 clock period L 1.2 us T6 MSD1 set up time to MSD2 high 500 | 600 ns T7 MSD1 hold time from MSD2 high 500 | 600 ns T8 MSD0 valid trom MSD2 high 300 ns BootROM/Flash Interface Read Cycle Timing (Byte mode) SYMBOL | DESCRIPTION MIN. | MAX | UNIT TRC Read Cycle Time 210 - ns TACS Address valid to CS# asserted 0 5 ns TCES CE# valid to Data valid - 210 ns TCEH Data hold from CE# deasserted 0 - ns TDLES Data valid to LE enable 10 - us TDLEH LE enable high time 20 - ns Read Cycle Timing (Double Word mode) Symbol Parameters MIN, | MAX. Unit TRC Read Cycle Time 210 - ns TACS |Address valid to CS# asserted 0 5 ns TCES CE# valid to data valid - 210 ns TAD Address valid to data Valid - 210 ns TDH Data hold from address deasserted 0 - ns TTCEH |Data hold from CE# deasserted 0 - ns TDLES |Data valid to LE enable 10 - ns TTDLEH_ |LE enable high time 20 - ns -7O-W89C840F RR i Winbond ATES, Write Cycle Timing (Byte mode) Symbol Parameters MIN, | MAX. Unit TDS Data valid to BtCSB deasserted 55 - ns TDH Data hold from BtCSB deasserted 10 - ns TWC Write Cycle Time 130 - ns TWS Address valid to BtCSB asserted 0 - ns TWP BtCSB asserted width 95 - ns TTWPH |BtCSB keep high from BtCSB deasserted 155 - ns TDLES |Data valid to LE enable 10 - ns TDLEH = |LE enable high time 20 - ns $. Test Load AC Timing Test Conditions PARAMETER TEST CONDITION Supply voltage (Vpp/Vss) 5V15% Temperature 25C/T0C Input Test Pattern Levels (TTL/CMOS) GND to 4.0V Input Rise and Fall Times (TTL/CMOS) 5n8 Input and Output Pattern Reference Level (TTL/CMOS) L5V Tristate Reference Levels Float (V) + 0.5V Output Load Vec SW1 (Note 2) L 0.1uF - i DEVICE RL =-22K - UNDER : Input TEST Output T CL (Note 1) Note 1: Load capacitance employed on output is 50 pF. Note 2: SW 1=Open for push pull outputs during timing test. Publication Release Date: April 1997 -71- Revision Alte i ginbond ATES, W89C840F SWL=VCC for VOL test. SW L=GND for VOH test. SW1=VCC for High-Z to active low and active low to High-Z measurements. SW1=GND for High-Z to active high and active high to High-Z measurements. Pin Capacitance TA = 25C f= 1 MHz SYMBOL PARAMETER TYP UNIT CIN Input Capacitance 7 pF CoutT Output Capacitance 10 pF Derating Factor Output timing is measured with a purely capacitive load of 50pF. The correction factor when CL>50pF is +0,4 ns/pF. -72-ie .Minbond ATES, W89C840F $. Package Dimension Sf it * j = L eh qt See Detail F As L Seating Plane a Detail F - 73- D in inehes | D Inn Symbol Min | Nom | Max | Min |Nom | Max A | jene | | | 330 Aa 0.004 _ | a0 _ _ Ay [6-007 [0.092 [9497 | 2798 | 2845 | 2972 b 0.019 | 6.012 [9.016 | 9.254 | 0.305 | 9.407 t 0.004 | 6.006 [0.010 | 0.101 | 0.152 | 0.254 D 0.546 (0.551 | 0.556 | 13.87 | 14.00 | 14.13 E 0.782 | 0.737 | 0.792 | 19.87 | 20.00 | 20.13 lal 0.020 [0.026 [0.032 | 0.495 | 0.65 | 0.002 Ho [%-728 [o740 [0.752 [18.49 | 18.80 | 19.10 He [9-264 [0.976 [0.888 | 24.49 | 24.80 | 25.10 L 0.039 | 0.047 /0.055 | 0.981 | 1.194 | 1.397 Li 0.087 | 9.095 [0.103 | 221 | 2413 | 2616 _ |0004 | |o102 gd o | 2] a | 2 Notes: 1. Dimension D & E do not inchide interiaad flagh. 2. Dimension b does not include dambar protrusion intrusion. 3. Controlling dimension: Millimeters: 4. General appearance spec. should be based on final visual inspection spec. Publication Release Date: April 1997 Revision Al