DP8390 PDF
DP8390 PDF
DP8390 PDF
July 1995
Table of Contents
1 0 SYSTEM DIAGRAM 2 0 BLOCK DIAGRAM 3 0 FUNCTIONAL DESCRIPTION 4 0 TRANSMIT RECEIVE PACKET ENCAPSULATION DECAPSULATION 5 0 PIN DESCRIPTIONS 6 0 DIRECT MEMORY ACCESS CONTROL (DMA) 7 0 PACKET RECEPTION 8 0 PACKET TRANSMISSION 9 0 REMOTE DMA 10 0 INTERNAL REGISTERS 11 0 INITIALIZATION PROCEDURES 12 0 LOOPBACK DIAGNOSTICS 13 0 BUS ARBITRATION AND TIMING 14 0 PRELIMINARY ELECTRICAL CHARACTERISTICS 15 0 SWITCHING CHARACTERISTICS 16 0 PHYSICAL DIMENSIONS
Features
Y Y
Y Y Y Y
Y Y
Compatible with IEEE 802 3 Ethernet II Thin Ethernet StarLAN Interfaces with 8- 16- and 32-bit microprocessor systems Implements simple versatile buffer management Requires single 5V supply Utilizes low power microCMOS process Includes Two 16-bit DMA channels 16-byte internal FIFO with programmable threshold Network statistics storage Supports physical multicast and broadcast address filtering Provides 3 levels of loopback Utilizes independent system and network clocks
1 0 System Diagram
IEEE 802 3 Compatible Ethernet Thin Ethernet Local Area Network Chip Set
TL F 8582 1
TRI-STATE is a registered trademark of National Semiconductor Corporation C1995 National Semiconductor Corporation
TL F 8582
RRD-B30M105 Printed in U S A
2 0 Block Diagram
TL F 8582 2
FIGURE 1
3 0 Functional Description
(Refer to Figure 1 ) RECEIVE DESERIALIZER The Receive Deserializer is activated when the input signal Carrier Sense is asserted to allow incoming bits to be shifted into the shift register by the receive clock The serial receive data is also routed to the CRC generator checker The Receive Deserializer includes a synch detector which detects the SFD (Start of Frame Delimiter) to establish where byte boundaries within the serial bit stream are located After every eight receive clocks the byte wide data is transferred to the 16-byte FIFO and the Receive Byte Count is incremented The first six bytes after the SFD are checked for valid comparison by the Address Recognition Logic If the Address Recognition Logic does not recognize the packet the FIFO is cleared CRC GENERATOR CHECKER During transmission the CRC logic generates a local CRC field for the transmitted bit sequence The CRC encodes all fields after the synch byte The CRC is shifted out MSB first following the last transmit byte During reception the CRC logic generates a CRC field from the incoming packet This local CRC is serially compared to the incoming CRC appended to the end of the packet by the transmitting node If the local and received CRC match a specific pattern will be generated and decoded to indicate no data errors Transmission errors result in a different pattern and are detected resulting in rejection of a packet TRANSMIT SERIALIZER The Transmit Serializer reads parallel data from the FIFO and serializes it for transmission The serializer is clocked by the transmit clock generated by the Serial Network Interface (DP8391) The serial data is also shifted into the CRC generator checker At the beginning of each transmission the Preamble and Synch Generator append 62 bits of 1 0 preamble and a 1 1 synch pattern After the last data byte of the packet has been serialized the 32-bit FCS field is shifted directly out of the CRC generator In the event of a collision the Preamble and Synch generator is used to generate a 32-bit JAM pattern of all 1s ADDRESS RECOGNITION LOGIC The address recognition logic compares the Destination Address Field (first 6 bytes of the received packet) to the Physical address registers stored in the Address Register Array If any one of the six bytes does not match the pre-programmed physical address the Protocol Control Logic rejects the packet All multicast destination addresses are filtered using a hashing technique (See register description ) If the multicast address indexes a bit that has been set in the filter bit array of the Multicast Address Register Array the packet is accepted otherwise it is rejected by the Protocol Control Logic Each destination address is also checked for all 1s which is the reserved broadcast address FIFO AND FIFO CONTROL LOGIC The NIC features a 16-byte FIFO During transmission the DMA writes data into the FIFO and the Transmit Serializer reads data from the FIFO and transmits it During reception the Receive Deserializer writes data into the FIFO and the DMA reads data from the FIFO The FIFO control logic is used to count the number of bytes in the FIFO so that after a preset level the DMA can begin a bus access and write read data to from the FIFO before a FIFO underflow overflow occurs
TL F 8582 3
FIGURE 2
Connection Diagrams
Plastic Chip Carrier Dual-In-Line Package
TL F 8582 5 TL F 8582 4
5 0 Pin Descriptions
BUS INTERFACE PINS Symbol AD0 AD15 DIP Pin No 112 14 17 Function I OZ Description MULTIPLEXED ADDRESS DATA BUS Register Access with DMA inactive CS low and ACK returned from NIC pins AD0AD7 are used to read write register data AD8 AD15 float during I O transfers SRD SWR pins are used to select direction of transfer Bus Master with BACK input asserted During t1 of memory cycle AD0 AD15 contain address During t2 t3 t4 AD0 AD15 contain data (word transfer mode) During t2 t3 t4 AD0 AD7 contain data AD8 AD15 contain address (byte transfer mode) Direction of transfer is indicated by NIC on MWR MRD lines ADDRESS STROBE 0 Input with DMA inactive and CS low latches RA0RA3 inputs on falling edge If high data present on RA0RA3 will flow through latch Output when Bus Master latches address bits (A0A15) to external memory during DMA transfers
ADS0
18
I OZ
MWR
20
OZ
MRD
21
OZ
22 23 24
I I O
RA0 RA3
4548
PRD
44
WACK
43
INT
42
RESET
41
BREQ
31
BACK
30
PRQ ADS1
29
OZ
READY
28
RACK
26
BSCK
25
39 38 37 35 34 33
I I I O O I
TXE
32
TL F 8582 55
7 0 Packet Reception
The Local DMA receive channel uses a Buffer Ring Structure comprised of a series of contiguous fixed length 256 byte (128 word) buffers for storage of received packets The location of the Receive Buffer Ring is programmed in two registers a Page Start and a Page Stop Register Ethernet packets consist of a distribution of shorter link control packets and longer data packets the 256 byte buffer length provides a good compromise between short packets and longer packets to most efficiently use memory In addition these buffers provide memory resources for storage of back-toback packets in loaded networks The assignment of buffers
TL F 8582 6
TL F 8582 7
Register An offset of 4 bytes is saved in this first buffer to allow room for storing receive status corresponding to this packet Received Packet Enters Buffer Pages
TL F 8582 31
LINKING RECEIVE BUFFER PAGES If the length of the packet exhausts the first 256 byte buffer the DMA performs a forward link to the next buffer to store the remainder of the packet For a maximal length packet the buffer logic will link six buffers to store the entire packet Buffers cannot be skipped when linking a packet will always be stored in contiguous buffers Before the next buffer can be linked the Buffer Management Logic performs two comparisons The first comparison tests for equality between the DMA address of the next buffer and the contents of the Page Stop Register If the buffer address equals the Page Stop Register the buffer management logic will restore the DMA to the first buffer in the Receive Buffer Ring value programmed in the Page Start Address Register The second comparison tests for equality between the DMA address of the next buffer address and the contents of the Boundary Pointer Register If the two values are equal the reception is aborted The Boundary Pointer Register can be used to protect against overwriting any area in the receive buffer ring that has not yet been read When linking buffers buffer management will never cross this pointer effectively avoiding any overwrites If the buffer address does not match either the Boundary Pointer or Page Stop Address the link to the next buffer is performed Linking Buffers Before the DMA can enter the next contiguous 256 byte buffer the address is checked for equality to PSTOP and to the Boundary Pointer If neither are reached the DMA is allowed to use the next buffer
TL F 858230
BEGINNING OF RECEPTION When the first packet begins arriving the NIC begins storing the packet at the location pointed to by the Current Page
TL F 8582 8
Buffer Ring Overflow If the Buffer Ring has been filled and the DMA reaches the Boundary Pointer Address reception of the incoming packet will be aborted by the NIC Thus the packets previously received and still contained in the Ring will not be destroyed In a heavily loaded network environment the local DMA may be disabled preventing the NIC from buffering packets from the network To guarantee this will not happen a software reset must be issued during all Receive Buffer Ring overflows (indicated by the OVW bit in the Interrupt Status Register) The following procedure is required to recover from a Receiver Buffer Ring Overflow If this routine is not adhered to the NIC may act in an unpredictable manner It should also be noted that it is not permissible to service an overflow interrupt by continuing to empty packets from the receive buffer without implementing the prescribed overflow routine A flow chart of the NICs overflow routine can be found at the right
Note It is necessary to define a variable in the driver which will be called Resend
1 Read and store the value of the TXP bit in the NICs Command Register 2 Issue the STOP command to the NIC This is accomplished be setting the STP bit in the NICs Command Register Writing 21H to the Command Register will stop the NIC
Note If the STP is set when a transmission is in progress the RST bit may not be set In this case the NIC is guaranteed to be reset after the longest packet time (1500 bytes e 1 2 ms) For the DP8390D (but not for the DP8390B) the NIC will be reset within 2 microseconds after the STP bit is set and Loopback mode 1 is programmed
TL F 8582 95
Overflow Routine Flow Chart 5 Read the stored value of the TXP bit from step 1 above If this value is a 0 set the Resend variable to a 0 and jump to step 6 If this value is a 1 read the NICs Interrupt Status Register If either the Packet Transmitted bit (PTX) or Transmit Error bit (TXE) is set to a 1 set the Resend variable to a 0 and jump to step 6 If neither of these bits is set place a 1 in the Resend variable and jump to step 6 This step determines if there was a transmission in progress when the stop command was issued in step 2 If there was a transmission in progress the NICs ISR is read to determine whether or not the packet was recognized by the NIC If neither the PTX nor TXE bit was set 9
3 Wait for at least 1 6 ms Since the NIC will complete any transmission or reception that is in progress it is necessary to time out for the maximum possible duration of an Ethernet transmission or reception By waiting 1 6 ms this is achieved with some guard band added Previously it was recommended that the RST bit of the Interrupt Status Register be polled to insure that the pending transmission or reception is completed This bit is not a reliable indicator and subsequently should be ignored 4 Clear the NICs Remote Byte Count registers (RBCR0 and RBCR1)
8 9 10
11
Note If Remote DMA is not being used the NIC does not need to be started before packets can be removed from the receive buffer ring Hence step 8 could be done before step 7
END OF PACKET OPERATIONS At the end of the packet the NIC determines whether the received packet is to be accepted or rejected It either branches to a routine to store the Buffer Header or to another routine that recovers the buffers used to store the packet SUCCESSFUL RECEPTION If the packet is successfully received as shown the DMA is restored to the first buffer used to store the packet (pointed Termination of Received Packet Packet Accepted
TL F 8582 13
Error Recovery If the packet is rejected as shown the DMA is restored by the NIC by reprogramming the DMA starting address pointed to by the Current Page Register REMOVING PACKETS FROM THE RING Packets are removed from the ring using the Remote DMA or an external device When using the Remote DMA the Send Packet command can be used This programs the Remote DMA to automatically remove the received packet pointed to by the Boundary Pointer At the end of the transfer the NIC moves the Boundary Pointer freeing additional buffers for reception The Boundary Pointer can also be moved manually by programming the Boundary Register Care should be taken to keep the Boundary Pointer at least one buffer behind the Current Page Pointer The following is a suggested method for maintaining the Receive Buffer Ring pointers 1 At initialization set up a software variable (next pkt) to indicate where the next packet will be read At the beginning of each Remote Read DMA operation the value of next pkt will be loaded into RSAR0 and RSAR1 2 When initializing the NIC set BNDRY e PSTART CURR e PSTART a 1 next pkt e PSTART a 1
TL F 858210
10
AD7 Receive Status Next Packet Pointer Receive Byte Count 0 Receive Byte Count 1 Byte 0 Byte 1
AD0
8 0 Packet Transmission
The Local DMA is also used during transmission of a packet Three registers control the DMA transfer during transmission a Transmit Page Start Address Register (TPSR) and the Transmit Byte Count Registers (TBCR0 1) When the NIC receives a command to transmit the packet pointed to by these registers buffer memory data will be moved into the FIFO as required during transmission The NIC will generate and append the preamble synch and CRC fields TRANSMIT PACKET ASSEMBLY The NIC requires a contiguous assembled packet with the format shown The transmit byte count includes the Destination Address Source Address Length Field and Data It does not include preamble and CRC When transmitting data smaller than 46 bytes the packet must be padded to a minimum size of 64 bytes The programmer is responsible for adding and stripping pad bytes General Transmit Packet Format
TL F 8582 57
upper byte count e next page pointer b next pkt b 1 if (upper byte count) k 0 then upper byte count e (PSTOP b next pkt) a (next page pointer b PSTART) b 1 if (lower byte count) l 0 fch then upper byte count e upper byte count a 1 STORAGE FORMAT FOR RECEIVED PACKETS The following diagrams describe the format for how received packets are placed into memory by the local DMA channel These modes are selected in the Data Configuration Register Storage Format AD15 AD8 AD7 AD0
Byte 1
11
D0
This format is used with 68000 type processors D7 DA0 DA1 DA2 DA3 DA4 D0
COLLISION RECOVERY During transmission the Buffer Management logic monitors the transmit circuitry to determine if a collision has occurred If a collision is detected the Buffer Management logic will reset the FIFO and restore the Transmit DMA pointers for retransmission of the packet The COL bit will be set in the TSR and the NCR (Number of Collisions Register) will be incremented If 15 retransmissions each result in a collision the transmission will be aborted and the ABT bit in the TSR will be set
Note NCR reads as zeroes if excessive collisions are encountered
TRANSMIT PACKET ASSEMBLY FORMAT The following diagrams describe the format for how packets must be assembled prior to transmission for different byte ordering schemes The various formats are selected in the Data Configuration Register D15 D8 D7 D0 DA1 DA3 DA5 SA1 SA3 SA5 T L1 DATA 1 DA0 DA2 DA4 DA0 DA2 DA4 T L0 DATA 0
9 0 Remote DMA
The Remote DMA channel is used to both assemble packets for transmission and to remove received packets from the Receive Buffer Ring It may also be used as a general purpose slave DMA channel for moving blocks of data or commands between host memory and local buffer memory There are three modes of operation Remote Write Remote Read or Send Packet Two register pairs are used to control the Remote DMA a Remote Start Address (RSAR0 RSAR1) and a Remote Byte Count (RBCR0 RBCR1) register pair The Start Address Register pair points to the beginning of the block to be moved while the Byte Count Register pair is used to indicate the number of bytes to be transferred Full handshake logic is provided to move data between local buffer memory and a bidirectional I O port
12
TL F 8582 96
13
TL F 8582 97
End of Packet Processing End of Packet Processing (EOPP) times for 10 MHz and 20 MHz have been tabulated in the table below End of Packet Processing Times for Various FIFO Thresholds Bus Clocks and Transfer Modes Mode Byte Threshold 2 bytes 4 bytes 8 bytes 2 bytes 4 bytes 8 bytes 2 bytes 4 bytes 8 bytes 2 bytes 4 bytes 8 bytes Bus Clock 10 MHz EOPP 7 0 ms 8 6 ms 11 0 ms 3 6 ms 4 2 ms 5 0 ms 5 4 ms 6 2 ms 7 4 ms 3 0 ms 3 2 ms 3 6 ms
Byte
20 MHz
Word
10 MHz
Word
20 MHz
Threshold Detection (Bus Latency) To assure that no overwriting of data in the FIFO the FIFO logic flags a FIFO overrun as the 13th byte is written into the FIFO effectively shortening the FIFO to 13 bytes The FIFO logic also operates differently in Byte Mode and in Word Mode In Byte Mode a threshold is indicated when the n a 1
14
TL F 8582 98
TL F 8582 99
byte has entered the FIFO thus with an 8 byte threshold the NIC issues Bus Request (BREQ) when the 9th byte has entered the FIFO For Word Mode BREQ is not generated until the n a 2 bytes have entered the FIFO Thus with a 4 word threshold (equivalent to 8 byte threshold) BREQ is issued when the 10th byte has entered the FIFO The two graphs the figures above indicate the maximum allowable bus latency for Word and Byte transfer modes The FIFO at the Beginning of Transmit Before transmitting the NIC performs a prefetch from memory to load the FIFO The number of bytes prefetched is the programmed FIFO threshold The next BREQ is not issued until after the NIC actually begins trasmitting data i e after SFD The Transmit Prefetch diagram illustrates this process SEND PACKET COMMAND The Remote DMA channel can be automatically initialized to transfer a single packet from the Receive Buffer Ring
The CPU begins this transfer by issuing a Send Packet Command The DMA will be initialized to the value of the Boundary Pointer Register and the Remote Byte Count Register pair (RBCR0 RBCR1) will be initialized to the value of the Receive Byte Count fields found in the Buffer Header of each packet After the data is transferred the Boundary Pointer is advanced to allow the buffers to be used for new receive packets The Remote Read will terminate when the Byte Count equals zero The Remote DMA is then prepared to read the next packet from the Receive Buffer Ring If the DMA pointer crosses the Page Stop Register it is reset to the Page Start Address This allows the Remote DMA to remove packets that have wrapped around to the top of the Receive Buffer Ring
Note 1 In order for the NIC to correctly execute the Send Packet Command the upper Remote Byte Count Register (RBCR1) must first be loaded with 0FH Note 2 The Send Packet command cannot be used with 68000 type processors
TL F 8582 A0
15
TL F 8582 59
10 0 Internal Registers
All registers are 8-bit wide and mapped into two pages which are selected in the Command Register (PS0 PS1) Pins RA0 RA3 are used to address registers within each page Page 0 registers are those registers which are commonly accessed during NIC operation while page 1 registers are used primarily for initialization The registers are partitioned to avoid having to perform two write read cycles to access commonly used registers
TL F 8582 60
16
Current Remote DMA Remote Start Address Address 0 (CRDA0) Register 0 (RSAR0) Current Remote DMA Remote Start Address Address 1 (CRDA1) Register 1 (RSAR1) Reserved Reserved Receive Status Register (RSR) Tally Counter 0 (Frame Alignment Errors) (CNTR0) Tally Counter 1 (CRC Errors) (CNTR1) Tally Counter 2 (Missed Packet Errors) (CNTR2) Remote Byte Count Register 0 (RBCR0) Remote Byte Count Register 1 (RBCR1) Receive Configuration Register (RCR) Transmit Configuration Register (TCR) Data Configuration Register (DCR) Interrupt Mask Register (IMR)
0EH
0EH
0FH
0FH
17
Note Page 2 registers should only be accessed for diagnostic purposes They should not be modified during normal operation Page 3 should never be modified
18
Bit D0
Symbol STP
Description STOP Software reset command takes the controller offline no packets will be received or transmitted Any reception or transmission in progress will continue to completion before entering the reset state To exit this state the STP bit must be reset and the STA bit must be set high To perform a software reset this bit should be set high The software reset has executed only when indicated by the RST bit in the ISR being set to a 1 STP powers up high
Note If the NIC has previously been in start mode and the STP is set both the STP and STA bits will remain set
D1 D2
STA TXP
START This bit is used to activate the NIC after either power up or when the NIC has been placed in a reset mode by software command or error STA powers up low TRANSMIT PACKET This bit must be set to initiate transmission of a packet TXP is internally reset either after the transmission is completed or aborted This bit should be set only after the Transmit Byte Count and Transmit Page Start registers have been programmed
Note Before the transmit command is given the STA bit must be set and the STP bit reset
D3 D4 D5
REMOTE DMA COMMAND These three encoded bits control operation of the Remote DMA channel RD2 can be set to abort any Remote DMA command in progress The Remote Byte Count Registers should be cleared when a Remote DMA has been aborted The Remote Start Addresses are not restored to the starting address if the Remote DMA is aborted RD2 RD1 RD0 0 0 0 Not Allowed 0 0 1 Remote Read 0 1 0 Remote Write (Note 2) 0 1 1 Send Packet 1 X X Abort Complete Remote DMA (Note 1)
Note 1 If a remote DMA operation is aborted and the remote byte count has not decremented to zero PRQ (pin 29 DIP) will remain high A read acknowledge (RACK) on a write acknowledge (WACK) will reset PRQ low Note 2 For proper operation of the Remote Write DMA there are two steps which must be performed before using the Remote Write DMA The steps are as follows i) Write a non-zero value into RBCR0 ii) Set bits RD2 RD1 RD0 to 0 0 1 iii) Set RBCR0 1 and RSAR0 1 iv) Issue the Remote Write DMA Command (RD2 RD1 RD0 e 0 1 0)
D6 D7
PS0 PS1
PAGE SELECT These two encoded bits select which register page is to be accessed with addresses RA0 3 PS1 PS0 0 0 Register Page 0 0 1 Register Page 1 1 0 Register Page 2 1 1 Reserved
19
Bit D0 D1 D2
Description PACKET RECEIVED Indicates packet received with no errors PACKET TRANSMITTED Indicates packet transmitted with no errors RECEIVE ERROR Indicates that a packet was received with one or more of the following errors CRC Error Frame Alignment Error FIFO Overrun Missed Packet TRANSMIT ERROR Set when packet transmitted with one or more of the following errors Excessive Collisions FIFO Underrun OVERWRITE WARNING Set when receive buffer ring storage resources have been exhausted (Local DMA has reached Boundary Pointer) COUNTER OVERFLOW Set when MSB of one or more of the Network Tally Counters has been set REMOTE DMA COMPLETE Set when Remote DMA operation has been completed RESET STATUS Set when NIC enters reset state and cleared when a Start Command is issued to the CR This bit is also set when a Receive Buffer Ring overflow occurs and is cleared when one or more packets have been removed from the ring Writing to this bit has no effect NOTE This bit does not generate an interrupt it is merely a status indicator
D3
TXE
D4 D5 D6 D7
20
Bit D0
Symbol PRXE
Description PACKET RECEIVED INTERRUPT ENABLE 0 Interrupt Disabled 1 Enables Interrupt when packet received PACKET TRANSMITTED INTERRUPT ENABLE 0 Interrupt Disabled 1 Enables Interrupt when packet is transmitted RECEIVE ERROR INTERRUPT ENABLE 0 Interrupt Disabled 1 Enables Interrupt when packet received with error TRANSMIT ERROR INTERRUPT ENABLE 0 Interrupt Disabled 1 Enables Interrupt when packet transmission results in error OVERWRITE WARNING INTERRUPT ENABLE 0 Interrupt Disabled 1 Enables Interrupt when Buffer Management Logic lacks sufficient buffers to store incoming packet COUNTER OVERFLOW INTERRUPT ENABLE 0 Interrupt Disabled 1 Enables Interrupt when MSB of one or more of the Network Statistics counters has been set DMA COMPLETE INTERRUPT ENABLE 0 Interrupt Disabled 1 Enables Interrupt when Remote DMA transfer has been completed reserved
D1
PTXE
D2
RXEE
D3
TXEE
D4
OVWE
D5
CNTE
D6
RDCE
D7
reserved
21
Bit D0
Symbol WTS WORD TRANSFER SELECT 0 Selects byte-wide DMA transfers 1 Selects word-wide DMA transfers
Description
WTS establishes byte or word transfers for both Remote and Local DMA transfers
Note When word-wide mode is selected up to 32k words are addressable A0 remains low
D1
BOS
BYTE ORDER SELECT 0 MS byte placed on AD15AD8 and LS byte on AD7 AD0 (32000 8086) 1 MS byte placed on AD7AD0 and LS byte on AD15 AD8 (68000) Ignored when WTS is low
D2
LAS
LONG ADDRESS SELECT 0 Dual 16-bit DMA mode 1 Single 32-bit DMA mode When LAS is high the contents of the Remote DMA registers RSAR0 1 are issued as A16 A31 Power up high
D3
LS
LOOPBACK SELECT 0 Loopback mode selected Bits D1 D2 of the TCR must also be programmed for Loopback operation 1 Normal Operation AUTO-INITIALIZE REMOTE 0 Send Command not executed all packets removed from Buffer Ring under program control 1 Send Command executed Remote DMA auto-initialized to remove packets from Buffer Ring
Note Send Command cannot be used with 68000 type processors
D4
AR
D5 D6
FT0 FT1
FIFO THRESHHOLD SELECT Encoded FIFO threshhold Establishes point at which bus is requested when filling or emptying the FIFO During reception the FIFO threshold indicates the number of bytes (or words) the FIFO has filled serially from the network before bus request (BREQ) is asserted
Note FIFO threshold setting determines the DMA burst length
RECEIVE THRESHOLDS FT1 FT0 Word Wide Byte Wide 0 0 1 Word 2 Bytes 0 1 2 Words 4 Bytes 1 0 4 Words 8 Bytes 1 1 6 Words 12 Bytes During transmission the FIFO threshold indicates the numer of bytes (or words) the FIFO has filled from the Local DMA before BREQ is asserted Thus the transmission threshold is 16 bytes less the receive threshold
22
Bit D0
Symbol CRC
Description INHIBIT CRC 0 CRC appended by transmitter 1 CRC inhibited by transmitter In loopback mode CRC can be enabled or disabled to test the CRC logic ENCODED LOOPBACK CONTROL These encoded configuration bits set the type of loopback that is to be performed Note that loopback in mode 2 sets the LPBK pin high this places the SNI in loopback mode and that D3 of the DCR must be set to zero for loopback operation LB1 LB0 Mode 0 0 0 Normal Operation (LPBK e 0) Mode 1 0 1 Internal Loopback (LPBK e 0) Mode 2 1 0 External Loopback (LPBK e 1) Mode 3 1 1 External Loopback (LPBK e 0) AUTO TRANSMIT DISABLE This bit allows another station to disable the NICs transmitter by transmission of a particular multicast packet The transmitter can be re-enabled by resetting this bit or by reception of a second particular multicast packet 0 Normal Operation 1 Reception of multicast address hashing to bit 62 disables transmitter reception of multicast address hashing to bit 63 enables transmitter COLLISION OFFSET ENABLE This bit modifies the backoff algorithm to allow prioritization of nodes 0 Backoff Logic implements normal algorithm 1 Forces Backoff algorithm modification to 0 to 2min(3 a n 10) slot times for first three collisions then follows standard backoff (For first three collisions station has higher average backoff delay making a low priority mode ) reserved reserved reserved
D1 D2
LB0 LB1
D3
ATD
D4
OFST
D5 D6 D7
23
Bit D0 D1 D2
Description PACKET TRANSMITTED Indicates transmission without error (No excessive collisions or FIFO underrun) (ABT e 0 FU e 0) reserved TRANSMIT COLLIDED Indicates that the transmission collided at least once with another station on the network The number of collisions is recorded in the Number of Collisions Registers (NCR) TRANSMIT ABORTED Indicates the NIC aborted transmission because of excessive collisions (Total number of transmissions including original transmission attempt equals 16) CARRIER SENSE LOST This bit is set when carrier is lost during transmission of the packet Carrier Sense is monitored from the end of Preamble Synch until TXEN is dropped Transmission is not aborted on loss of carrier FIFO UNDERRUN If the NIC cannot gain access of the bus before the FIFO empties this bit is set Transmission of the packet will be aborted CD HEARTBEAT Failure of the transceiver to transmit a collision signal after transmission of a packet will set this bit The Collision Detect (CD) heartbeat signal must commence during the first 6 4 ms of the Interframe Gap following a transmission In certain collisions the CD Heartbeat bit will be set even though the transceiver is not performing the CD heartbeat test OUT OF WINDOW COLLISION Indicates that a collision occurred after a slot time (51 2 ms) Transmissions rescheduled as in normal collisions
D3
ABT
D4
CRS
D5 D6
FU CDH
D7
OWC
24
Bit D0
Symbol SEP
Description SAVE ERRORED PACKETS 0 Packets with receive errors are rejected 1 Packets with receive errors are accepted Receive errors are CRC and Frame Alignment errors ACCEPT RUNT PACKETS This bit allows the receiver to accept packets that are smaller than 64 bytes The packet must be at least 8 bytes long to be accepted as a runt 0 Packets with fewer than 64 bytes rejected 1 Packets with fewer than 64 bytes accepted ACCEPT BROADCAST Enables the receiver to accept a packet with an all 1s destination address 0 Packets with broadcast destination address rejected 1 Packets with broadcast destination address accepted ACCEPT MULTICAST Enables the receiver to accept a packet with a multicast address all multicast addresses must pass the hashing array 0 Packets with multicast destination address not checked 1 Packets with multicast destination address checked PROMISCUOUS PHYSICAL Enables the receiver to accept all packets with a physical address 0 Physical address of node must match the station address programmed in PAR0PAR5 1 All packets with physical addresses accepted MONITOR MODE Enables the receiver to check addresses and CRC on incoming packets without buffering to memory The Missed Packet Tally counter will be incremented for each recognized packet 0 Packets buffered to memory 1 Packets checked for address match good CRC and Frame Alignment but not buffered to memory reserved reserved
D1
AR
D2
AB
D3
AM
D4
PRO
D5
MON
D6 D7
reserved reserved
Note D2 and D3 are ORd together i e if D2 and D3 are set the NIC will accept broadcast and multicast addresses as well as its own physical address To establish full promiscuous mode bits D2 D3 and D4 should be set In addition the multicast hashing array must be set to all 1s in order to accept all multicast addresses
25
Bit D0 D1 D2
Description PACKET RECEIVED INTACT Indicates packet received without error (Bits CRC FAE FO and MPA are zero for the received packet ) CRC ERROR Indicates packet received with CRC error Increments Tally Counter (CNTR1) This bit will also be set for Frame Alignment errors FRAME ALIGNMENT ERROR Indicates that the incoming packet did not end on a byte boundary and the CRC did not match at last byte boundary Increments Tally Counter (CNTR0) FIFO OVERRUN This bit is set when the FIFO is not serviced causing overflow during reception Reception of the packet will be aborted MISSED PACKET Set when packet intended for node cannot be accepted by NIC because of a lack of receive buffers or if the controller is in monitor mode and did not buffer the packet to memory Increments Tally Counter (CNTR2) PHYSICAL MULTICAST ADDRESS Indicates whether received packet had a physical or multicast address type 0 Physical Address Match 1 Multicast Broadcast Address Match RECEIVER DISABLED Set when receiver disabled by entering Monitor mode Reset when receiver is re-enabled when exiting Monitor mode DEFERRING Set when CRS or COL inputs are active If the transceiver has asserted the CD line as a result of the jabber this bit will stay set indicating the jabber condition
D3 D4
FO MPA
D5
PHY
D6 D7
DIS DFR
Note Following coding applies to CRC and FAE bits FAE CRC Type of Error 0 0 No Error (Good CRC and k 6 Dribble Bits) 0 1 CRC Error 1 0 Illegal will not occur 1 1 Frame Alignment Error and CRC Error
26
TL F 8582 61
The DMA Registers are partitioned into three groups Transmit Receive and Remote DMA Registers The Transmit registers are used to initialize the Local DMA Channel for transmission of packets while the Receive Registers are used to initialize the Local DMA Channel for packet Reception The Page Stop Page Start Current and Boundary Registers are used by the Buffer Management Logic to supervise the Receive Buffer Ring The Remote DMA Registers are used to initialize the Remote DMA
Note In the figure above registers are shown as 8 or 16 bits wide Although some registers are 16-bit internal registers all registers are accessed as 8-bit registers Thus the 16-bit Transmit Byte Count Register is broken into two 8-bit registers TBCR0 and TBCR1 Also TPSR PSTART PSTOP CURR and BNRY only check or control the upper 8 bits of address information on the bus Thus they are shifted to positions 15-8 in the diagram above
bytes in the source destination length and data fields The maximum number of transmit bytes allowed is 64k bytes The NIC will not truncate transmissions longer than 1500 bytes The bit assignment is shown below 7 6 5 4 3 2 1 0 TBCR1 L15 7 TBCR0 L7 L14 6 L6 L13 5 L5 L12 4 L4 L11 3 L3 L10 2 L2 L9 1 L1 L8 0 L0
10 5 TRANSMIT DMA REGISTERS TRANSMIT PAGE START REGISTER (TPSR) This register points to the assembled packet to be transmitted Only the eight higher order addresses are specified since all transmit packets are assembled on 256-byte page boundaries The bit assignment is shown below The values placed in bits D7D0 will be used to initialize the higher order address (A8A15) of the Local DMA for transmission The lower order bits (A7A0) are initialized to zero Bit Assignment 7 6 5 4 3 2 1 0 TPSR A15 A14 A13 A12 A11 A10 A9 A8
(A7 A0 Initialized to zero) TRANSMIT BYTE COUNT REGISTER 0 1 (TBCR0 TBCR1) These two registers indicate the length of the packet to be transmitted in bytes The count must include the number of 27
10 6 LOCAL DMA RECEIVE REGISTERS PAGE START STOP REGISTERS (PSTART PSTOP) The Page Start and Page Stop Registers program the starting and stopping address of the Receive Buffer Ring Since the NIC uses fixed 256-byte buffers aligned on page boundaries only the upper eight bits of the start and stop address are specified PSTART PSTOP bit assignment 7 6 5 4 3 2 1 0 PSTART A15 A14 A13 A12 A11 A10 A9 A8 PSTOP BOUNDARY (BNRY) REGISTER This register is used to prevent overflow of the Receive Buffer Ring Buffer management compares the contents of this register to the next buffer address when linking buffers together If the contents of this register match the next buffer address the Local DMA operation is aborted 7 6 5 4 3 2 1 0 BNRY A15 A14 A13 A12 A11 A10 A9 A8
PAR1 DA15 DA14 DA13 DA12 DA11 DA10 DA9 CURRENT LOCAL DMA REGISTER 0 1 (CLDA0 1) These two registers can be accessed to determine the current Local DMA Address 7 6 5 4 3 2 1 0 CLDA1 A15 7 CLDA0 A7 A14 6 A6 A13 5 A5 A12 4 A4 A11 3 A3 A10 2 A2 A9 1 A1 A8 0 A0
PAR2 DA23 DA22 DA21 DA20 DA19 DA18 DA17 DA16 PAR3 DA31 DA30 DA29 DA28 DA27 DA26 DA25 DA24 PAR4 DA39 DA38 DA37 DA36 DA35 DA34 DA33 DA32 PAR5 DA47 DA46 DA45 DA44 DA43 DA42 DA41 DA40 Destination Address P S DA0 DA1 DA2 DA3
Note P S e Preamble Synch DA0 e Physical Multicast Bit
Source
10 7 REMOTE DMA REGISTERS REMOTE START ADDRESS REGISTERS (RSAR0 1) Remote DMA operations are programmed via the Remote Start Address (RSAR0 1) and Remote Byte Count (RBCR0 1) registers The Remote Start Address is used to point to the start of the block of data to be transferred and the Remote Byte Count is used to indicate the length of the block (in bytes) 7 6 5 4 3 2 1 0 RSAR1 A15 7 RSAR0 A7 A14 6 A6 A13 5 A5 A12 4 A4 A11 3 A3 A10 2 A2 A9 1 A1 A8 0 A0
6 4 3 2 REMOTE BYTE COUNT REGISTERS (RBCR0 1) 7 6 5 4 3 2 1 0 RBCR1 BC15 BC14 BC13 BC12 BC11 BC10 BC9 BC8 7 6 5 4 3 2 1 0
10 9 MULTICAST ADDRESS REGISTERS (MAR0 MAR7) The multicast address registers provide filtering of multicast addresses hashed by the CRC logic All destination addresses are fed through the CRC logic and as the last bit of the destination address enters the CRC the 6 most significant bits of the CRC generator are latched These 6 bits are then decoded by a 1 of 64 decode to index a unique filter bit (FB0 63) in the multicast address registers If the filter bit selected is set the multicast packet is accepted The system designer would use a program to determine which filter bits to set in the multicast registers All multicast filter bits that correspond to multicast address accepted by the node are then set to one To accept all multicast packets all of the registers are set to all ones
Note Although the hashing algorithm does not guarantee perfect filtering of multicast address it will perfectly filter up to 64 multicast addresses if these addresses are chosen to map into unique locations in the multicast filter
CURRENT REMOTE DMA ADDRESS (CRDA0 CRDA1) The Current Remote DMA Registers contain the current address of the Remote DMA The bit assignment is shown below 7 6 5 4 3 2 1 0
TL F 8582 62
A14 6 A6
A13 5 A5
A12 4 A4
A11 3 A3
A10 2 A2
A9 1 A1
A8 0 A0
28
MAR2 FB23 FB22 FB21 FB20 FB19 FB18 FB17 FB16 MAR3 FB31 FB30 FB29 FB28 FB27 FB26 FB25 FB24 MAR4 FB39 FB38 FB37 FB36 FB35 FB34 FB33 FB32 MAR5 FB47 FB46 FB45 FB44 FB43 FB42 FB41 FB40 MAR6 FB55 FB54 FB53 FB52 FB51 FB50 FB49 FB48 MAR7 FB63 FB62 FB61 FB60 FB59 FB58 FB57 FB56 If address Y is found to hash to the value 32 (20H) then FB32 in MAR4 should be initialized to 1 This will cause the NIC to accept any multicast packet with the address Y NETWORK TALLY COUNTERS Three 8-bit counters are provided for monitoring the number of CRC errors Frame Alignment Errors and Missed Packets The maximum count reached by any counter is 192 (C0H) These registers will be cleared when read by the CPU The count is recorded in binary in CT0CT7 of each Tally Register Frame Alignment Error Tally (CNTR0) This counter is incremented every time a packet is received with a Frame Alignment Error The packet must have been recognized by the address recognition logic The counter is cleared after it is read by the processor 7 6 5 4 3 2 1 0 CNTR0 CT7 CT6 CT5 CT4 CT3 CT2 CT1 CT0
11 0 Initialization Procedures
The NIC must be initialized prior to transmission or reception of packets from the network Power on reset is applied to the NICs reset pin This clears sets the following bits Register Command Register (CR) Interrupt Status (ISR) Interrupt Mask (IMR) Data Control (DCR) Transmit Config (TCR) LB1 LB0 All Bits LAS Reset Bits TXP STA Set Bits RD2 STP RST
The NIC remains in its reset state until a Start Command is issued This guarantees that no packets are transmitted or received and that the NIC remains a bus slave until all appropriate internal registers have been programmed After initialization the STP bit of the command register is reset and packets may be received and transmitted Initialization Sequence The following initialization procedure is mandatory 1) Program Command Register for Page 0 (Command Register e 21H) 2) Initialize Data Configuration Register (DCR) 3) Clear Remote Byte Count Registers (RBCR0 RBCR1) 4) Initialize Receive Configuration Register (RCR) 5) Place the NIC in LOOPBACK mode 1 or 2 (Transmit Configuration Register e 02H or 04H) 6) Initialize Receive Buffer Ring Boundary Pointer (BNDRY) Page Start (PSTART) and Page Stop (PSTOP) 7) Clear Interrupt Status Register (ISR) by writing 0FFh to it 8) Initialize Interrupt Mask Register (IMR) 9) Program Command Register for page 1 (Command Register e 61H) i)Initialize Physical Address Registers (PAR0-PAR5) ii)Initialize Multicast Address Registers (MAR0-MAR7) iii)Initialize CURRent pointer 10) Put NIC in START mode (Command Register e 22H) The local receive DMA is still not active since the NIC is in LOOPBACK 11) Initialize the Transmit Configuration for the intended value The NIC is now ready for transmission and reception
CRC Error Tally (CNTR1) This counter is incremented every time a packet is received with a CRC error The packet must first be recognized by the address recognition logic The counter is cleared after it is read by the processor 7 6 5 4 3 2 1 0 CNTR1 CT7 CT6 CT5 CT4 CT3 CT2 CT1 CT0
Frames Lost Tally Register (CNTR2) This counter is incremented if a packet cannot be received due to lack of buffer resources In monitor mode this counter will count the number of packets that pass the address recognition logic 7 6 5 4 3 2 1 0 CNTR2 CT7 CT6 CT5 CT4 CT3 CT2 CT1 CT0
FIFO This is an eight bit register that allows the CPU to examine the contents of the FIFO after loopback The FIFO will contain the last 8 data bytes transmitted in the loopback packet Sequential reads from the FIFO will advance a pointer in the FIFO and allow reading of all 8 bytes 7 6 5 4 3 2 1 0 FIFO DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Note The FIFO should only be read when the NIC has been programmed in loopback mode
29
11 0 Initialization Procedures
(Continued) Before receiving packets the user must specify the location of the Receive Buffer Ring This is programmed in the Page Start and Page Stop Registers In addition the Boundary and Current Page Registers must be initialized to the value of the Page Start Register These registers will be modified during reception of packets When in word-wide mode with Byte Order Select low the following format must be used for the loopback packet
12 0 Loopback Diagnostics
Three forms of local loopback are provided on the NIC The user has the ability to loopback through the deserializer on the DP8390D NIC through the DP8391 SNI and to the coax to check the link through the transceiver circuitry Because of the half duplex architecture of the NIC loopback testing is a special mode of operation with the following restrictions Restrictions During Loopback The FIFO is split into two halves one used for transmission the other for reception Only 8-bit fields can be fetched from memory so two tests are required for 16-bit systems to verify integrity of the entire data path During loopback the maximum latency from the assertion of BREQ to BACK is 2 0 ms Systems that wish to use the loopback test yet do not meet this latency can limit the loopback packet to 7 bytes without experiencing underflow Only the last 8 bytes of the loopback packet are retained in the FIFO The last 8 bytes can be read through the FIFO register which will advance through the FIFO to allow reading the receive packet sequentially
DESTINATION ADDRESS SOURCE ADDRESS LENGTH DATA CRC
e (6 bytes) Station Physical Address
TL F 8582 16
Note When using loopback in word mode 2n bytes must be programmed in TBCR0 1 Where n e actual number of bytes assembled in even or odd location
To initiate a loopback the user first assembles the loopback packet then selects the type of loopback using the Transmit Configuration register bits LB0 LB1 The transmit configuration register must also be set to enable or disable CRC generation during transmission The user then issues a normal transmit command to send the packet During loopback the receiver checks for an address match and if CRC bit in the TCR is set the receiver will also check the CRC The last 8 bytes of the loopback packet are buffered and can be read out of the FIFO using the FIFO read port Loopback Modes MODE 1 Loopback Through the Controller (LB1 e 0 LB0 e 1) If the loopback is through the NIC then the serializer is simply linked to the deserializer and the receive clock is derived from the transmit clock MODE 2 Loopback Through the SNI (LB1 e 1 LB0 e 0) If the loopback is to be performed through the SNI the NIC provides a control (LPBK) that forces the SNI to loopback all signals MODE 3 Loopback to Coax (LB1 e 1 LB0 e 1) Packets can be transmitted to the coax in loopback mode to check all of the transmit and receive paths and the coax itself
Note In MODE 1 CRS and COL lines are not indicated in any status register but the NIC will still defer if these lines are active In MODE 2 COL is masked and in MODE 3 CRS and COL are not masked It is not possible to go directly between the loopback modes it is necessary to return to normal operation (00H) when changing modes
l
2 bytes
e 46 to 1500 bytes
When in word-wide mode with Byte Order Select set the loopback packet must be assembled in the even byte locations as shown below (The loopback only operates with byte wide transfers )
TL F 858215
Reading the Loopback Packet The last eight bytes of a received packet can be examined by 8 consecutive reads of the FIFO register The FIFO pointer is incremented after the rising edge of the CPUs read strobe by internally synchronizing and advancing the pointer This may take up to four bus clock cycles if the pointer has not been incremented by the time the CPU reads the FIFO register again the NIC will insert wait states
Note The FIFO may only be read during Loopback Reading the FIFO at any other time will cause the NIC to malfunction
30
LOOPBACK OPERATION IN THE NIC Loopback is a modified form of transmission using only half of the FIFO This places certain restrictions on the use of loopback testing When loopback mode is selected in the TCR the FIFO is split A packet should be assembled in memory with programming of TPSR and TBCR0 TBCR1 registers When the transmit command is issued the following operations occur Transmitter Actions 1) Data is transferred from memory by the DMA until the FIFO is filled For each transfer TBCR0 and TBCR1 are decremented (Subsequent burst transfers are initiated when the number of bytes in the FIFO drops below the programmed threshold ) 2) The NIC generates 56 bits of preamble followed by an 8-bit synch pattern 3) Data transferred from FIFO to serializer 4) If CRC e 1 in TCR no CRC calculated by NIC the last byte transmitted is the last byte from the FIFO (Allows software CRC to be appended) If CRC e 0 NIC calculates and appends four bytes of CRC 5) At end of Transmission PTX bit set in ISR Receiver Actions 1) Wait for synch all preamble stripped 2) Store packet in FIFO increment receive byte count for each incoming byte 3) If CRC e 0 in TCR receiver checks incoming packet for CRC errors If CRC e 1 in TCR receiver does not check CRC errors CRC error bit always set in RSR (for address matching packets) 4) At end of receive receive byte count written into FIFO receive status register is updated The PRX bit is typically set in the RSR even if the address does not match If CRC errors are forced the packet must match the address filters in order for the CRC error bit in the RS to be set EXAMPLES The following examples show what results can be expected from a properly operating NIC during loopback The restrictions and results of each type of loopback are listed for reference The loopback tests are divided into two sets of tests One to verify the data path CRC generation and byte count through all three paths The second set of tests uses internal loopback to verify the receivers CRC checking and address recognition For all of the tests the DCR was programmed to 40h PATH NIC Internal TCR 02 RCR 00 TSR 53(1) RSR 02(2) ISR 02(3)
x x
For the following alignment in the FIFO the packet length should be (N c 8) a 5 Bytes Note that if the CRC bit in the TCR is set CRC will not be appended by the transmitter If the CRC is appended by the transmitter the last four bytes bytes N-3 to N correspond to the CRC
FIFO LOCATION 0 1 2 3 4 5 6 7 FIFO CONTENTS BYTE N-4 BYTE N-3 (CRC1) BYTE N-2 (CRC2) BYTE N-1 (CRC3) BYTE N (CRC4) LOWER BYTE COUNT UPPER BYTE COUNT UPPER BYTE COUNT
x
AR
LOOPBACK TESTS Loopback capabilities are provided to allow certain tests to be performed to validate operation of the DP8390D NIC prior to transmitting and receiving packets on a live network Typically these tests may be performed during power up of a node The diagnostic provides support to verify the following 1) Verify integrity of data path Received data is checked against transmitted data 2) Verify CRC logics capability to generate good CRC on transmit verify CRC on receive (good or bad CRC) 3) Verify that the Address Recognition Logic can a) Recognize address match packets b) Reject packets that fail to match an address
Note 1 Since carrier sense and collision detect inputs are blocked during internal loopback carrier and CD heartbeat are not seen and the CRS and CDH bits are set Note 2 CRC errors are always indicated by receiver if CRC is appended by the transmitter Note 3 Only the PTX bit in the ISR is set the PRX bit is only set if status is written to memory In loopback this action does not occur and the PRX bit remains 0 for all loopback modes Note 4 All values are hex
31
Note 1 CDH is set CRS is not set since it is generated by the external encoder decoder
TCR 06
RCR 00
TSR 03(1)
RSR 02
ISR 02(2)
Note 1 CDH and CRS should not be set The TSR however could also contain 01H 03H 07H and a variety of other values depending on whether collisions were encountered or the packet was deferred Note 2 Will contain 08H if packet is not transmittable Note 3 During external loopback the NIC is now exposed to network traffic it is therefore possible for the contents of both the Receive portion of the FIFO and the RSR to be corrupted by any other packet on the network Thus in a live network the contents of the FIFO and RSR should not be depended on The NIC will still abide by the standard CSMA CD protocol in external loopback mode (i e The network will not be disturbed by the loopback packet) Note 4 All values are hex
CRC AND ADDRESS RECOGNITION The next three tests exercise the address recognition logic and CRC These tests should be performed using internal loopback only so that the NIC is isolated from interference from the network These tests also require the capability to generate CRC in software The address recognition logic cannot be directly tested The CRC and FAE bits in the RSR are only set if the address of the packet matches the address filters If errors are expected to be set and they are not set the packet has been rejected on the basis of an address mismatch The following sequence of packets will test the address recognition logic The DCR should be set to 40H the TCR should be set to 03H with a software generated CRC Packet Contents Test Test A Test B Test C Address Matching Matching Non-Matching CRC Good Bad Bad Results RSR 01(1) 02(2) 01
TL F 8582 63
Additional information required for network management is available in the Receive and Transmit Status Registers Transmit status is available after each transmission for information regarding events during transmission Typically the following statistics might be gathered in software Traffic Frames Sent OK Frames Received OK Multicast Frames Received Packets Lost Due to Lack of Resources Retries Packet CRC Errors Alignment Errors Excessive Collisions Packet with Length Errors Heartbeat Failure
Errors
Note 1 Status will read 21H if multicast address used Note 2 Status will read 22H if multicast address used Note 3 In test A the RSR is set up In test B the address is found to match since the CRC is flagged as bad Test C proves that the address recognition logic can distinguish a bad address and does not notify the RSR of the bad CRC The receiving CRC is proven to work in test A and test B Note 4 All values are hex
32
TL F 8582 64
Upon power-up the NIC is in an indeterminant state After receiving a Hardware Reset the NIC comes up as a slave in the Reset State The receiver and transmitter are both disabled in this state The reset state can be reentered under three conditions soft reset (Stop Command) hard reset (RESET input) or an error that shuts down the receiver or transmitter (FIFO underflow or overflow) After initialization of registers the NIC is issued a Start command and the NIC enters Idle state Until the DMA is required the NIC remains in an idle state The idle state is exited by a request from the FIFO in the case of receive or transmit or from the Remote DMA in the case of Remote DMA operation After acquiring the bus in a BREQ BACK handshake the Remote or Local DMA transfer is completed and the NIC reenters the idle state
DMA TRANSFERS TIMING The DMA can be programmed for the following types of transfers 16-Bit Address 8-bit Data Transfer 16-Bit Address 16-bit Data Transfer 32-Bit Address 8-bit Data Transfer 32-Bit Address 16-bit Data Transfer All DMA transfers use BSCK for timing 16-Bit Address modes require 4 BSCK cycles as shown below
TL F 8582 65
33
TL F 8582 66
TL F 8582 67
TL F 8582 68
Note In 32-bit address mode ADS1 is at TRI-STATE after the first T1T4 states thus a 4 7k pull-down resistor is required for 32-bit address mode
34
TL F 8582 69
INTERLEAVED LOCAL OPERATION If a remote DMA transfer is initiated or in progress when a packet is being received or transmitted the Remote DMA transfer will be interrupted for higher priority Local DMA
transfers When the Local DMA transfer is completed the Remote DMA will rearbitrate for the bus and continue its transfers This is illustrated below
TL F 8582 70
Note that if the FIFO requires service while a remote DMA is in progress BREQ is not dropped and the Local DMA burst is appended to the Remote Transfer When switching from a local transfer to a remote transfer however BREQ is dropped and raised again This allows the CPU or other devices to fairly contend for the bus REMOTE DMA-BIDIRECTIONAL PORT CONTROL The Remote DMA transfers data between the local buffer memory and a bidirectional port (memory to I O transfer)
This transfer is arbited on a byte by byte basis versus the burst transfer used for Local DMA transfers This bidirectional port is also read written by the host All transfers through this port are asynchronous At any one time transfers are limited to one direction either from the port to local buffer memory (Remote Write) or from local buffer memory to the port (Remote Read)
TL F 8582 71
35
TL F 8582 72
REMOTE WRITE TIMING A Remote Write operation transfers data from the I O port to the local buffer RAM The NIC initiates a transfer by requesting a byte word via the PRQ The system transfers a byte word to the latch via IOW this write strobe is detected by the NIC and PRQ is removed By removing the PRQ the Remote DMA holds off further transfers into the latch until the current byte word has been transferred from the latch PRQ is reasserted and the next transfer can begin
1) NIC asserts PRQ System writes byte word into latch NIC removes PRQ 2) Remote DMA reads contents of port and writes byte word to local buffer memory increments address and decrements byte count (RBCR0 1) 3) Go back to step 1 Steps 1 3 are repeated until the remote DMA is complete
TL F 8582 73
36
Write to Register
TL F 8582 74
TL F 8582 75
TIME BETWEEN CHIP SELECTS The NIC requires that successive chip selects be no closer than 4 bus clocks (BSCK) together below If the condition is violated the NIC may glitch ACK CPUs that operate from pipelined instructions (i e 386) or have a cache (i e
486) can execute consecutive I O cycles very quickly The solution is to delay the execution of consecutive I O cycles by either breaking the pipeline or forcing the CPU to access outisde its cache
TL F 8582 A1
37
Preliminary DC Specifications TA e 0 C to 70 C
Symbol VOH VOL VIH VIH2 VIL VIL2 IIN IOZ ICC Parameter Minimum High Level Output Voltage (Notes 1 4) Minimum Low Level Output Voltage (Notes 1 4) Minimum High Level Input Voltage (Note 2) Minimum High Level Input Voltage for RACK WACK (Note 2) Minimum Low Level Input Voltage (Note 2) Minimum Low Level Input Voltage For RACK WACK (Note 2) Input Current Maximum TRI-STATE Output Leakage Current Average Supply Current (Note 3)
VI e VCC or GND VOUT e VCC or GND TXCK e 10 MHz RXCK e 10 MHz BSCK e 20 MHz IOUT e 0 mA VIN e VCC or GND
b1 0 b 10
a1 0 a 10
40
mA
Note 1 These levels are tested dynamically using a limited amount of functional test patterns please refer to AC Test Load Note 2 Limited functional test patterns are performed at these input levels The majority of functional tests are performed at levels of 0V and 3V Note 3 This is measured with a 0 1 mF bypass capacitor between VCC and GND Note 4 The low drive CMOS compatible VOH and VOL limits are not tested directly Detailed device characterization validates that this specification can be guaranteed by testing the high drive TTL compatible VOL and VOH specification
38
TL F 8582 76
Parameter Register Select Setup to ADS0 Low Register Select Hold from ADS0 Low Address Strobe Width In Acknowledge Low to Data Valid Read Strobe to Data TRI-STATE Read Strobe to ACK Low (Notes 1 3) Read Strobe to ACK High Register Select to Slave Read Low Latched RS03 (Note 2)
Min 10 13 15
Max
Units ns ns ns
55 15 70 n bcyc a 30 30 10
ns ns ns ns ns
Note 1 ACK is not generated until CS and SRD are low and the NIC has synchronized to the register access The NIC will insert an integral number of Bus Clock cycles until it is synchronized In Dual Bus systems additional cycles will be used for a local or remote DMA to complete Wait states must be issued to the CPU until ACK is asserted low Note 2 CS may be asserted before or after SRD If CS is asserted after SRD rackl is referenced from falling edge of CS CS can be de-asserted concurrently with SRD or after SRD is de-asserted Note 3 These limits include the RC delay inherent in our test method These signals typically turn off within 15 ns enabling other devices to drive these lines with no contention
39
TL F 8582 77
Parameter Register Select to Read Setup (Notes 1 3) Register Select Hold from Read ACK Low to Valid Data Read Strobe to Data TRI-STATE (Note 2) Read Strobe to ACK Low (Note 3) Read Strobe to ACK High
Min 10 0
Max
Units ns ns
55 15 70 n bcyc a 30 30
ns ns ns ns
Note 1 rsrs includes flow-through time of latch Note 2 These limits include the RC delay inherent in our test method These signals typically turn off within 15 ns enabling other devices to drive these lines with no contention Note 3 CS may be asserted before or after RA03 and SRD since address decode begins when ACK is asserted If CS is asserted after RA0-3 and SRD rack1 is referenced from falling edge of CS
40
TL F 8582 78
Parameter Register Select Setup to ADS0 Low Register Select Hold from ADS0 Low Address Strobe Width In Register Write Data Setup Register Write Data Hold Write Strobe Width from ACK Write Strobe High to ACK High Write Low to ACK Low (Notes 1 2) Register Select to Write Strobe Low
Min 10 17 15 20 21 50
Max
Units ns ns ns ns ns ns
30 n bcyc a 30 10
ns ns ns
Note 1 ACK is not generated until CS and SWR are low and the NIC has synchronized to the register access In Dual Bus Systems additional cycles will be used for a local DMA or Remote DMA to complete Note 2 CS may be asserted before or after SWR If CS is asserted after SWR wackl is referenced from falling edge of CS
41
TL F 8582 79
Parameter Register Select to Write Setup (Note 1) Register Select Hold from Write Register Write Data Setup Register Write Data Hold Write Low to ACK Low (Note 2) Write High to ACK High Write Width from ACK
Min 15 0 20 21
Max
Units ns ns ns ns
n bcyc a 30 30 50
ns ns ns
Note 1 Assumes ADS0 is high when RA03 changing Note 2 ACK is not generated until CS and SWR are low and the NIC has synchronized to the register access In Dual Bus systems additional cycles will be used for a local DMA or remote DMA to complete
42
TL F 8582 80
Parameter Bus Clock to Bus Request High for Local DMA Bus Clock to Bus Request High for Remote DMA Bus Request Low from Bus Clock Acknowledge Setup to Bus Clock (Note 1) Bus Clock to Control Enable Bus Clock to Control Release (Notes 2 3)
Min
Max 43 38 55
Units ns ns ns ns
2 60 70
ns ns
Note 1 BACK must be setup before T1 after BREQ is asserted Missed setup will slip the beginning of the DMA by four bus clocks The Bus Latency will influence the allowable FIFO threshold and transfer mode (empty fill vs exact burst transfer) Note 2 During remote DMA transfers only a single bus transfer is performed During local DMA operations burst mode transfers are performed Note 3 These limits include the RC delay inherent in our test method These signals typically turn off within 15 ns enabling other devices to drive these lines with no contention
43
TL F 8582 81
Symbol bcyc bch bcl bcash bcasl aswo bcadv bcadz ads adh
Parameter Bus Clock Cycle Time (Note 2) Bus Clock High Time Bus Clock Low Time Bus Clock to Address Strobe High Bus Clock to Address Strobe Low Address Strobe Width Out Bus Clock to Address Valid Bus Clock to Address TRI-STATE (Note 3) Address Setup to ADS0 1 Low Address Hold from ADS0 1 Low
Min 50 22 5 22 5
Max 1000
Units ns ns ns
ns ns ns ns ns ns ns
Note 1 Cycles T1 T2 T3 T4 are only issued for the first transfer in a burst when 32-bit mode has been selected Note 2 The rate of bus clock must be high enough to support transfers to from the FIFO at a rate greater than the serial network transfers from to the FIFO Note 3 These limits include the RC delay inherent in our test method These signals typically turn off within 15 ns enabling other devices to drive these lines with no contention
44
TL F 8582 82
Parameter Bus Clock to Read Strobe Low Bus Clock to Read Strobe High Data Setup to Read Strobe High Data Hold from Read Strobe High DMA Read Strobe Width Out Memory Read High to Address TRI-STATE (Notes 1 2) Address Strobe to Data Strobe Data Strobe to Address Active Address Valid to Read Strobe High
Min
Max 43 40
Units ns ns ns ns ns
ns ns ns ns
Note 1 During a burst A8A15 are not TRI-STATE if byte wide transfers are selected On the last transfer A8A15 are TRI-STATE as shown above Note 2 These limits include the RC delay inherent in our test method These signals typically turn off within bch a 15 ns enabling other devices to drive these lines with no contention
45
TL F 8582 83
Parameter Bus Clock to Write Strobe Low Bus Clock to Write Strobe High Data Setup to WR High Data Hold from WR Low Write Strobe to Address TRI-STATE (Notes 1 2) Address Strobe to Data Strobe Address Strobe to Write Data Valid
Min
Max 40 40
Units ns ns ns ns
ns ns ns
Note 1 When using byte mode transfers A8A15 are only TRI-STATE on the last transfer waz timing is only valid for last transfer in a burst Note 2 These limits include the RC delay inherent in our test method These signals typically turn off within bch a 15 ns enabling other devices to drive these lines with no contention
46
TL F 8582 45
Parameter External Wait Setup to T3v Clock (Note 1) External Wait Release Time (Note 1)
Min 10 15
Max
Units ns ns
Note 1 The addition of wait states affects the count of deserialized bytes and is limited to a number of bus clock cycles depending on the bus clock and network rates The allowable wait states are found in the table below (Assumes 10 Mbit sec data rate ) The number of allowable wait states in byte mode can be calculated using W(byte mode) e W tnw tbsck
BSCK (MHz) 8 10 12 14 16 18 20 0 0 1 1 1 2 2
4 5 tbsck 1 J
8 tnw
b
The number of allowable wait states in word mode can be calculated using W(word mode) e
2 tbsck 1 J
5 tnw
b
47
TL F 8582 84
Parameter Bus Clock to Port Write Low Bus Clock to Port Write High Port Write High to Port Request High (Note 1) Port Request Low from Read Acknowledge High Remote Acknowledge Read Strobe Pulse Width
Min
Max 43 40 30 45
Units ns ns ns ns ns
20
Note 1 Start of next transfer is dependent on where RACK is generated relative to BSCK and whether a local DMA is pending
48
TL F 8582 85
Parameter Bus Clock to Port Write Low Bus Clock to Port Write High Port Write High to Port Request High (Note 1) Port Request Low from Read Acknowledge High Remote Acknowledge Read Strobe Pulse Width Read Acknowledge High to Next Port Write Cycle (Notes 2 3 4)
Min
Max 43 40 30 45
Units ns ns ns ns ns
20
11
BUSCK
Note 1 Start of next transfer is dependent on where RACK is generated relative to BSCK and whether a local DMA is pending Note 2 This is not a measured value but guaranteed by design Note 3 RACK must be high for a minimum of 7 BUSCK Note 4 Assumes no local DMA interleave no CS and immediate BACK
49
TL F 8582 86
Parameter Bus Clock to Port Request High (Note 1) WACK to Port Request Low WACK Pulse Width Bus Clock to Port Read Low (Note 2) Bus Clock to Port Read High
Min
Max 42 45
Units ns ns ns
20 40 40
ns ns
Note 1 The first port request is issued in response to the remote write command It is subsequently issued on T1 clock cycles following completion of remote DMA cycles Note 2 The start of the remote DMA write following WACK is dependent on where WACK is issued relative to BUSCK and whether a local DMA is pending
50
TL F 8582 87
Parameter Bus Clock to Port Request High (Note 1) WACK to Port Request Low WACK Pulse Width Bus Clock to Port Read Low (Note 2) Bus Clock to Port Read High Remote Write Port Request to Port Request Time (Notes 3 4 5)
Min
Max 40 45
Units ns ns ns
20 40 40 12
ns ns BUSCK
Note 1 The first port request is issued in response to the remote write command It is subsequently issued on T1 clock cycles following completion of remote DMA cycles Note 2 The start of the remote DMA write following WACK is dependent on where WACK is issued relative to BUSCK and whether a local DMA is pending Note 3 Assuming wackw k 1 BUSCK and no local DMA interleave no CS immediate BACK and WACK goes high before T4 Note 4 WACK must be high for a minimum of 7 BUSCK Note 5 This is not a measured value but guaranteed by design
51
TL F 8582 88
Parameter Receive Clock High Time Receive Clock Low Time Receive Clock Cycle Time Receive Data Setup Time to Receive Clock High (Note 1) Receive Data Hold Time from Receive Clock High First Preamble Bit to Synch (Note 2)
Min 40 40 80 20 17 8
Max
Units ns ns
120
ns ns ns rcyc cycles
Note 1 All bits entering NIC must be properly decoded if the PLL is still locking the clock to the NIC should be disabled or CRS delayed Any two sequential 1 data bits will be interpreted as Synch Note 2 This is a minimum requirement which allows reception of a packet
Serial Timing
TL F 8582 89
Parameter Minimum Number of Receive Clocks after CRS Low (Note 1) Maximum of Allowed Dribble Bits Clocks (Note 2) Receive Recovery Time (Notes 4 5) Receive Clock to Carrier Sense Low (Note 3)
Min 5
Max
3 40 0 1
Note 1 The NIC requires a minimum number of receive clocks following the de-assertion of carrier sense (CRS) These additional clocks are provided by the DP8391 SNI If other decoder PLLs are being used additional clocks should be provided Short clocks or glitches are not allowed Note 2 Up to 5 bits of dribble bits can be tolerated without resulting in a receive error Note 3 Guarantees to only load bit N additional bits up to tdrb can be tolerated Note 4 This is the time required for the receive state machine to complete end of receive processing This parameter is not measured but is guaranteed by design This is not a measured parameter but is a design requirement Note 5 CRS must remain de-asserted for a minimum of 2 RXC cycles to be recognized as end of carrier
52
TL F 8582 90
Parameter Transmit Clock High Time Transmit Clock Low Time Transmit Clock Cycle Time Transmit Clock to Transmit Enable High (Note 1) Transmit Clock to Serial Data Valid Serial Data Hold Time from Transmit Clock High
Min 36 36 80
Max
Units ns ns
120 48 67
ns ns ns ns
10
Note 1 The NIC issues TXEN coincident with the first bit of preamble The first bit of preamble is always a 1
Serial Timing
TL F 8582 91
Parameter Transmit Clock to Data Low Transmit Clock to TXEN Low TXEN Low to Start of Collision Detect Heartbeat (Note 1) Collision Detect Width
Min
Max 55 55
0 2
64
Note 1 If COL is not seen during the first 64 TX clock cycles following de-assertion of TXEN the CDH bit in the TSR is set
53
TL F 8582 92
Parameter Collision Detect Width Delay from Collision to First Bit of Jam (Note 1) Jam Period (Note 2)
Min 2
Max
8 32
Note 1 The NIC must synchronize to collision detect If the NIC is in the middle of serializing a byte of data the remainder of the byte will be serialized Thus the jam pattern will start anywhere from 1 to 8 TXC cycles after COL is asserted Note 2 The NIC always issues 32 bits of jam The jam is all 1s data
Reset Timing
TL F 8582 93
Symbol rstw
Min 8
Max
Note 1 The RESET pulse requires that BSCK and TXC be stable On power up RESET should not be raised until BSCK and TXC have become stable Several registers are affected by RESET Consult the register descriptions for details Note 2 The slower of BSCK or TXC clocks will determine the minimum time for the RESET signal to be low If BSCK k TXC then RESET e 8 c BSCK If TXC k BSCK then RESET e 8 c TXC
54
Pin Capacitance TA e 25 C
Parameter CIN COUT Description Input Capacitance Output Capacitance Typ 7 7
DERATING FACTOR Output timings are measured with a purely capacitave load for 50 pF The following correction factor can be used for other loads CL t 50 pf a 0 3 ns pF (for all outputs except TXE TXD and LBK)
TL F 8582 94
Note 1 CL e 50 pF includes scope and jig capacitance Note 2 S1 e Open for timing tests for push pull outputs S1 e VCC for VOL test S1 e GND for VOH test S1 e VCC for High Impedance to active low and active low to High Impedance measurements S1 e GND for High Impedance to active high and active high to High Impedance measurements
55
Lit
103052
Molded Dual-In-Line Package (N) Order Number DP8390DN NS Package Number N48A
Plastic Chip Carrier (V) Order Number DP8390DV NS Package Number V68A LIFE SUPPORT POLICY NATIONALS PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF NATIONAL SEMICONDUCTOR CORPORATION As used herein 1 Life support devices or systems are devices or systems which (a) are intended for surgical implant into the body or (b) support or sustain life and whose failure to perform when properly used in accordance with instructions for use provided in the labeling can be reasonably expected to result in a significant injury to the user
National Semiconductor Corporation 1111 West Bardin Road Arlington TX 76017 Tel 1(800) 272-9959 Fax 1(800) 737-7018
2 A critical component is any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system or to affect its safety or effectiveness
National Semiconductor Europe Fax (a49) 0-180-530 85 86 Email cnjwge tevm2 nsc com Deutsch Tel (a49) 0-180-530 85 85 English Tel (a49) 0-180-532 78 32 Fran ais Tel (a49) 0-180-532 93 58 Italiano Tel (a49) 0-180-534 16 80
National Semiconductor Hong Kong Ltd 13th Floor Straight Block Ocean Centre 5 Canton Rd Tsimshatsui Kowloon Hong Kong Tel (852) 2737-1600 Fax (852) 2736-9960
National does not assume any responsibility for use of any circuitry described no circuit patent licenses are implied and National reserves the right at any time without notice to change said circuitry and specifications
This datasheet has been downloaded from: www.DatasheetCatalog.com Datasheets for electronic components.