background image

6.0 LOOPBACK TESTS

Three types of loopback tests may be performed to verify
the data path through the DP8390/901/902/905. The tests
are as follows:

1. Group I tests verify the CRC generation capability of the

NIC. In this case, the NIC generates and appends a CRC
to the loopback packet, and software is used to verify a
matching CRC.

2. Group II tests verify the CRC recognition capability of the

NIC. Here, the NIC verifies a software generated CRC.

3. Group III tests verify the address recognition logic of the

NIC.

The loopback tests which follow were performed on the
DP83902EB-AT PC-AT Compatible DP83902 ST-NIC Ether-
net Evaluation Board. During each of the loopback tests, the
Data Configuration Register was programmed to 41h, which
selects loopback mode and word transfers. Refer to Appen-
dix A for the actual source code necessary to perform
Group I loopback.

6.1 Group I Loopback Tests: CRC Generation

The basic steps necessary to perform the Group I loopback
tests (in which the CRC is appended by the NIC) are as
follows:

1. Set Command Register to 21h (page 0).

2. Initialize Data Configuration Register to 41h (loopback

mode and word transfers).

3. Initialize Receive Configuration Register to 1Fh (promis-

cuous mode).

4. Initialize Transmit Byte Count Registers and Transmit

Page Start Register.

5. Set Command Register to 22h (start mode).

6. Create loopback packet and transfer into NIC buffer

memory.

7. Transmit dummy packet to check for unterminated or un-

connected cable by performing the following steps:

a) Set Transmit Configuration Register to 00h (normal op-

eration).

b) Write FFh to Interrupt Status Register to reset.

c) Set Command Register to 26h (transmit). Note that the

Command Register must first be in start mode (22h)
before transmitting (26h).

d) Loop until the Packet Transmitted bit is set in the Inter-

rupt Status Register. If the time-out loop completes
and this bit is not set, the transmit has timed out, and
the cable may not be connected.

e) Check Interrupt Status Register for 08h (Transmit Er-

ror). If the Transmit Error bit is set, excessive collisions
have occurred, and the cable may not be terminated.

8. Start loopback mode 1 test (TCR

e

02h) by performing

the following steps:

a) Reset Transmit Configuration Register to 00h.

b) Reset Command Register to 21h. If the NIC is currently

receiving a packet, it will wait for the reception of the
current packet to complete before it will reset. Thus, a
wait state of at least 1.5 ms is necessary to insure that
the NIC will completely reset.

c) Program the Transmit Configuration Register to the ap-

propriate loopback mode, in this case mode 1 loop-
back (TCR

e

02h).

d) Write FFh to Interrupt Status Register to reset.

e) Set Command Register to 22h (start mode).

f) Set Command Register to 26h (transmit).

g) Wait for transmit to complete (Command Register

e

22h).

h) Check Interrupt Status Register for 06h (good trans-

mission).

i) Read FIFO and compare CRC with previously calculat-

ed CRC.

9. Start loopback mode 2 test (TCR

e

04h): See step 8.

10. Transmit a dummy packet to change the contents of the

FIFO. This step must be taken to ensure that the cable
is connected. If the cable is not connected, the NIC
does not receive anything into its FIFO during external
loopback; therefore if the contents of the FIFO have not
been changed, the disconnected cable is not detected.
See step 7.

11. Start loopback mode 3 test (TCR

e

06h): See step 8.

12. If mode 3 loopback fails, transmission may have been

aborted due to excessive collisions (check the Transmit
Status Register). In this case network traffic has inter-
fered, but the CTI or TPI may still be operational.

GROUP I RESULTS

The following examples show what results can be expected
from a properly operating NIC during Group I loopback oper-
ations. The restrictions and results of each loopback mode
are listed for reference.

Internal Loopback through the NIC

Loopback Path

TCR

RCR

TSR

RSR

ISR

Mode 1 (NIC)

02H

1FH

51H

02H

06H

TSR:

Before transmission of the loopback packet, Carrier
Sense and Collision inputs are monitored (as re-
quired by CSMA/CD protocol). Once the NIC gains
access to the network for transmission, the Carrier
Sense and Collision Detect inputs are ignored.
Thus, the Carrier Sense Lost and CD Heartbeat bits
are always set in the Transmit Status Register.

RSR:

CRC errors are always indicated by the receiver if
the CRC is appended by the transmitter.

ISR:

Only the Packet Transmitted and Receive Error bits
in the Interrupt Status Register are set; the Packet
Received bit is set only if status is written to memo-
ry. In loopback this action does not occur, hence
the Packet Received bit remains 0 for all loopback
modes.

Internal Loopback through the SNI

Loopback Path

TCR

RCR

TSR

RSR

ISR

Mode 2 (SNI)

04H

1FH

41H

02H

06H

5

Summary of Contents for DP8390

Page 1: ...that generates the tests Appendix A This document also discusses varia tions in loopback results caused by several common config uration errors Throughout this document the term NIC refers to the con...

Page 2: ...TL F 12034 2 FIGURE 2 Loopback Mode 2 Through the Encoder Decoder TL F 12034 3 FIGURE 3 Loopback Mode 3 Through the TPI or CTI 2...

Page 3: ...isters TBCR0 and TBCR1 are decremented 2 The NIC generates 56 bits of preamble followed by an 8 bit Start of Frame Delimiter 3 Data is transferred from the FIFO to the serializer 4 If the Inhibit CRC...

Page 4: ...Register to 21h followed by a wait state of at least 1 5 ms for the NIC to reset c Program the desired loopback mode into the Transmit Configuration Register 6 Loopback only operates with byte wide t...

Page 5: ...er to 21h If the NIC is currently receiving a packet it will wait for the reception of the current packet to complete before it will reset Thus a wait state of at least 1 5 ms is necessary to insure t...

Page 6: ...tus Register is set The packet received bit is set only if status is written to memory In loopback this action does not occur hence the Packet Received bit remains 0 for all loopback modes Internal Lo...

Page 7: ...SR ISR Mode 3 CTI 06H 1FH 0CH 02H 08H If the coax cable is disconnected the results will differ from those listed in Section 6 1 as follows Loopback Path TCR RCR TSR RSR ISR Mode 1 NIC 02H 1FH 40H 02H...

Page 8: ...cription in Section 6 1 When executed the FIFO and register contents are printed to an output file output txt unless specified differently Refer to AN 874 Writing Drivers for the DP8390 NIC Family of...

Page 9: ...TL F 12034 8 9...

Page 10: ...TL F 12034 9 10...

Page 11: ...TL F 12034 10 11...

Page 12: ...ional Semiconductor National Semiconductor National Semiconductores National Semiconductor Corporation GmbH Japan Ltd Hong Kong Ltd Do Brazil Ltda Australia Pty Ltd 2900 Semiconductor Drive Livry Garg...

Reviews: