Patent Publication Number: US-6912202-B1

Title: Arrangement for testing network switch expansion port using external logic to emulate connected expansion port

Description:
BACKGROUND OF THE INVENTION 
   1. Field of the Invention 
   The present invention relates to the testing of network devices such as integrated network switches configured for switching data packets between subnetworks. 
   2. Background Art 
   Local area networks use a network cable or other media to link stations on the network. Each local area network architecture uses a media access control (MAC) enabling network interface devices at each network node to access the network medium. 
   Switched local area networks such as Ethernet (IEEE 802.3) based systems arc encountering increasing demands for higher speed connectivity, more flexible switching performance, and the ability to accommodate more complex network architectures. For example, commonly-assigned U.S. Pat. No. 5,953,335 discloses a network switch configured for switching layer  2  type Ethernet (IEEE 802.3) data packets between different network nodes. Hence, network switch designers and test engineers need to be able to minimize the time and expense needed to evaluate designs during prototyping of Ethernet-based network systems. 
   One problem associated with testing network-based switch chips involves the limited availability of the sample chips for testing hardware associated with interaction between multiple chips. For example, the network switch disclosed in U.S. Pat. No. 5,953,335 describes an expansion port that may be used for interconnecting multiple network switch chips for transfer of packet data according to a prescribed bus protocol, such as peripheral component interconnect (PCI) bus protocol. However, use of the expansion port assumes the availability of at least one additional network switch chip for interconnection of the expansion ports of the respective network switch chips. 
   Hence, there is a concern that the expansion port and associated operations cannot be tested or validated if only one network switch chip is available for testing. In addition, even if a second network switch chip was available for testing of the expansion ports, a detected error between the expansion port operations creates the additional problem of determining whether the detected error is due to a problem in the first switch chip under test, a problem in the second switch chip used for testing the expansion port of first switch chip, a problem in the connection between the two expansion ports, or any combination of the foregoing. 
   SUMMARY OF THE INVENTION 
   There is a need for an arrangement that enables an expansion port of a network switch chip, configured for transferring data according to a prescribed bus protocol, to be tested and evaluated without the necessity of a second switch chip. 
   This and other needs are attained by the present invention, where a network switch chip having an expansion port configured for transferring data according to a prescribed bus protocol is tested using an external logic unit configured to emulate a connected expansion port The external logic unit is configured for receiving an expansion port frame from the expansion port via an expansion bus, generating a new expansion port frame, and outputting the new expansion port frame to the expansion port via the expansion bus. Hence, a test engineer can validate the expansion port of the network switch chip by detecting the reception of the new expansion port frame by the expansion port. Hence, the expansion port of the network switch chip can be tested without the necessity of a second network switch chip. 
   One aspect of the present invention provides a method for testing a network switch chip having an expansion port configured for transferring data according to a prescribed protocol. The method includes receiving by an external logic unit an expansion port frame from the expansion port via an expansion bus. The method also includes generating by the external logic unit a new expansion port frame based on reception of the expansion port frame, and outputting the new expansion port frame onto the expansion bus for reception by the expansion port of the network switch chip. 
   Another aspect of the present invention provides a test system configured for testing a network switch chip having an expansion port configured for transferring data according to a prescribed protocol. The test system includes an expansion port bus configured for propagation of the expansion port frame output by the expansion port, and an external logic unit. The external logic unit is configured for generating a new expansion port frame based on reception of the expansion port frame, and outputting the new expansion port frame onto the expansion bus for reception by the expansion port of the network switch chip. Hence, the expansion port of the network switch chip can be tested without the necessity of a second switch chip having a corresponding expansion port. 
   Additional advantages and novel features of the invention will be set forth in part in the description which follows and in part will become apparent to those skilled in the art upon examination of the following or may be learned by practice of the invention. The advantages of the present invention may be realized and attained by means of instrumentalities and combinations particularly pointed in the appended claims. 

   
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Reference is made to the attached drawings, wherein elements having the same reference numeral designations represent like elements throughout and wherein: 
       FIG. 1  is a block diagram of a system configured for testing an expansion port of a network switch chip according to an embodiment of the present invention. 
       FIG. 2  is a diagram illustrating an expansion port frame. 
       FIG. 3  is a diagram illustrating a method of testing the expansion port of the network switch chip using a field programmable gate array, according to an embodiment of the present invention. 
   

   BEST MODE FOR CARRYING OUT THE INVENTION 
     FIG. 1  is a block diagram illustrating a testing system  10  configured for testing a network switch chip  12 , for example an integrated network switch as illustrated in U.S. Pat. No. 5,953,335, according to an embodiment of the present invention. In particular, the network switch chip  12  includes network switch ports  14  configured for sending and receiving data frames according to a prescribed network protocol, such as IEEE 802.3-based Media Independent Interface (MII) protocol. The network switch  12  also includes an expansion port  16  configured for transferring expansion port frames  40 , illustrated in  FIG. 2 , between other switch chips via an expansion bus  36  and the respective switch ports according to a prescribed protocol, for example burst-based bus protocol. The network switch chip  12  also includes a peripheral component interconnect (PCI) interface  18 , enabling a host CPU  20  to configure and control the network switch chip  12  via a PCI bus  22 . Hence, a test engineer can configure the network switch chip  12  to output prescribed expansion port frames  40  onto an expansion bus  36 , and to read any expansion port frames received by the expansion port  16  from the expansion bus  36 . 
   According to the disclosed embodiment, the test system  10  includes a converter  30  configured for receiving an expansion port frame, modifying the received expansion port frame into a new expansion port frame, and outputting the new expansion port frame back onto the expansion bus  36  for reception by the expansion port  16 . Hence, a test engineer using the host CPU  20  can validate the performance of the expansion port  16  by outputting a prescribed expansion port frame onto the expansion bus  36 , determining whether the expansion port  16  has received a new expansion port frame from the expansion bus  36 , and comparing the differences between the output expansion port frame and the new expansion port frame relative to the changes made by the converter  30 . 
   The converter  30 , implemented for example using a PC board, includes a first in first out (FIFO) buffer  32  and an external logic unit  34 , implemented as a field programmable gate array (FPGA). The FIFO buffer  32  is configured for storing at least one maximum sized expansion port frame (e.g., 1526 bytes). 
     FIG. 3  is a diagram illustrating the method of testing the network switch chip according to an embodiment of the present invention. The method begins in step  60 , where the converter  30  receives the expansion port frame as burst traffic and stores in step  62  the burst traffic (as an expansion port frame) in the FIFO  32 . In particular, data is transferred over the expansion bus  36  on the expansion port transmit data path (ETXD 1 ) in bursts of eight clock (ETX_CLK=ERX_CLK) cycles; the data includes start and end of frame information as well as frame data. As shown in  FIG. 2 , the expansion port frame  40  includes a destination address field  50  storing a destination address value (DA), a source address field  52  storing a source address value (SA), and device ID field  54  for identifying the network switch chip  12  having output the expansion port frame  40 . 
   The FPGA  34  asserts the expansion port receiver request signal (ERX_REQ 2 ) until detecting that the FIFO  32  is full. Hence, the expansion port  16  continues to transmit data so long as the expansion port receiver request (ETX_REQ 2 ) signal (i.e., the expansion port transmit grant (ETX_GNT 1 ) input) is asserted by the FPGA  34 ; in other words, the expansion port  16  continues to transmit data as long as the expansion port transmit grant (ETX_GNT 1 ) input is asserted. Control information, such as start and stop markers that correspond to data, is supplied by the expansion port  16  on the expansion port control data lines (ETX_INFO 1 , ERX_INFO 2 ). The expansion port transmit start of burst (ETX_SB 1 ) is used by the expansion port  16  to indicate to the FPGA  34  on the expansion port receive start of burst (ERX_SB 2 ) input that valid data will be presented on the expansion port transmit data (ETXD 1 ) path for a burst of eight clock cycles. 
   Once a full expansion port frame  52  has been stored in the expansion port FIFO  32 , the FPGA  34  generates the new expansion port frame by changing data within the received expansion port frame stored in the expansion port FIFO  32 . In particular, the FPGA  34  swaps (i.e., inserts) in step  64  the destination address and source address values into the source address field  52  and destination address field  50 , respectively, creating the appearance that the destination network node is sending acknowledgment back to the source of the data packet. The FPGA  34  also inserts in step  66  a new device identifier value, different from the existing device identifier value, into the device identifier field  54 . 
   The FPGA  34  then outputs in step  68  the new expansion port frame onto the expansion port bus  36  for reception by the expansion port  16 . In particular, the FPGA  34  waits until the expansion port receiver request signal (ETX_REQ 1 ) is asserted by the expansion port  16 . The FPGA  34  continues to transmit data so long as the expansion port receiver request (ETX_REQ 1 ) signal (i.e., the expansion port transmit grant (ETX_GNT 2 ) input) is asserted by the expansion port  16 . Control information, such as start and stop markers that correspond to data, is supplied by the FPGA  34  on the expansion port control data lines (ETX_INFO 2 , ERX_INFO 1 ). The expansion port transmit start of burst (ETX_SB 2 ) is used by the FPGA  34  to indicate to the expansion port  16  on the expansion port receive start of burst (ERX_SB 1 ) input that valid data will be presented on the expansion port transmit data (ETXD 2 ) path for a burst of eight clock cycles (ETX_CLK and ERX_CLK). 
   According to the disclosed embodiment, an expansion port of a network switch chip is tested using an FPGA configured for generating a new expansion port frame based on changing data within a received expansion port frame, enabling a test engineer to validate the expansion port based on reception of the new expansion port frame from the expansion bus. Hence, the expansion port of a network switch chip can be validated without the necessity of another switch chip interconnected by an expansion bus. 
   While this invention has been described with what is presently considered to be the most practical preferred embodiment, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.