Abstract:
A packet network interface apparatus includes a media access control (MAC) module for constructing a packet for transmission over a packet network and a physical coding sublayer (PCS) module for encoding the packet for transmission over a physical interface. An inter packet gap module located between the MAC module and the PCS module directly transfers data to the PCS module while maintaining a certain inter packet gap by deleting or inserting idle characters. The inter packet gap module has at least one memory module for temporary storage of packet data. The modules preferably operate in a common time domain.

Description:
FIELD OF THE INVENTION 
       [0001]    This invention relates to data communication systems, and in particular to packet network interface circuits, such as high speed Ethernet interface circuits. 
       BACKGROUND OF THE INVENTION 
       [0002]    Ethernet is a family of frame-based computer networking technologies for local area networks (LAN). It defines a number of wiring and signaling standards for the Physical Layer of the OSI networking model as well as a common addressing format and Media Access Control at the Data Link Layer. 
         [0003]    The IEEE 802.3 standard, which is herein incorporated by reference, specifies the data format for Ethernet frames at various interfaces. For example, FIG.  82 - 3 —PCS Transmit bit ordering, illustrates the required format of data blocks at the egress of the PCS. 
         [0004]      FIG. 1  illustrates the required function of the MAC (Media Access Control) and PCS (Physical Coding Sublayer) as present in high-speed technologies such as 10 Gb/s (Giga-bits per second), 40 Gb/s, and 100 Gb/s Ethernet. The functions of the MAC and PCS are well known and are briefly described as follows. 
         [0005]    In  FIG. 1 , the Ethernet data interface to the MAC and PCS may include a payload  100  consisting typically of 46 to 1500 bytes; a destination address  101  consisting typically of 6 bytes; a source address  102  consisting typically of 6 bytes; an optional 802.1Q tag and Ethertype  103  consisting typically of 6 or more bytes. These inputs are meant to illustrate and therefore the length and description of these Ethernet inputs do not limit the scope of the present invention. The Ethernet data bytes are input to the MAC and PCS on a transmit data bus  104  with a width w and output from the MAC and PCS on a receive data bus  105 . The width w is specific to the particular implementation and may include additional control information as required (for example for maintenance and identifying the Ethernet data bytes). 
         [0006]    In  FIG. 1 , the MAC and PCS circuit  106  functions to generate and decode the high speed Ethernet frame  122  format according to a specific Ethernet technology (for example 40 Gb/s or 100 Gb/s over fiber optics). The PCS function includes formatting and decoding the frame  122  correctly to be transmitted on  107  and received from  108  a number of physical lanes n, where n may be 1, 4, 10, or any other integer according to the specific Ethernet technology. The Ethernet frame  122  is encoded, scrambled, and striped across the n lanes  107  according to a predefined sequence by the PCS in the transmit direction. The PCS performs the reverse function in the receive direction. 
         [0007]    The Ethernet frame  122  is constructed according to the applicable Ethernet specification clause, and typically includes the following groups of octets: a Start octet  110 ; a sequence of 6 Preamble octets  111 ; a Start of Frame Delimiter octet  112 ; a Destination Address of 6 octets  113 ; a Source Address of 6 octets  114 ; a Payload  116 ,  118  of 46 to 1500 octets total; a Frame Check Sequence  119  of 4 octets; and a Terminate character  120 . There is also required to be an IPG (Inter Packet Gap)  121 ,  109  between occurrences of the Ethernet frame. The IPG consists of idle characters and is required to be an average of 12 octets minimum. Additionally, there are periodic Alignment Blocks  117 , which may occur at any time during transmission, and are inserted between scheduled octets. They do not replace octets. For example, according to one issue of the Ethernet standard, a single Alignment Block is inserted into each lane every 16,383 blocks. 
         [0008]    The receive function of  FIG. 1  is substantially the reverse of the transmit function. That is to say, where the transmitter constructs and formats the Ethernet frame  122  from the incoming Ethernet data  104 , the receiver decodes and disassembles the Ethernet frame  122  and sends Ethernet data  105  to the MAC client. Additional functions of the receiver such as the checking of the FCS  119  and the lane alignment process using the alignment block  117  are not within the scope of the present invention. 
         [0009]    A challenge in generating the required sequence of octets in the transmit direction is to maintain the necessary minimum IPG when constructing the frame. 
         [0010]    A more detailed view of the MAC and PCS circuits for the transmit direction is illustrated in  FIG. 2 , which shows a typical prior art implementation of the transmitter functions. 
         [0011]    In  FIG. 2 , Ethernet data  200  from a MAC client is received by the MAC  203  module over a bus  204  of width w. The MAC frame generation circuit  205  functions to construct the Ethernet frame for transmission by prepending and appending information such as a header  206 , FCS  207 , and providing idle characters  208  between frames. The header consists of the Preamble and Start of Frame Delimiters as described by  FIG. 1 . It is then a function of the RS (Reconciliation Sublayer)  210  to format the Ethernet frame for transmission to the PCS module  215  over an xMII interface  213 . The term xMII may refer to XGMII for 10 Gb/s Ethernet, XLGMII for 40 Gb/s Ethernet, or CGMII for 100 Gb/s Ethernet, depending on the Ethernet technology being implemented, or any other MII type of Ethernet interface as may be specified in future revisions of the IEEE 802.3 specification. The xMII interface consists of m lanes for Ethernet frame data, where m is typically 4 or 8 or a multiple of 8. Each lane transfers 8 bits in parallel (at one time). The MAC and PCS modules are clocked in different clock domains A and B. 
         [0012]    The RS  210  typically includes a buffer circuit  209 , which serves to temporarily store the octets comprising the Ethernet frame and then forward them to the xMII interface at the correct time according to a striping schedule. The RS circuit  210  arranges the Ethernet frame over the xMII interface in such a way that said frame will begin with the first octet of the header  206  in the first lane of the xMII interface  213 . In so doing, the first octet of the preamble is replaced with a Start octet  212 . The time for this to occur is controlled by the buffer  209  in response to the striping schedule. The remaining octets are transmitted over the xMII in a pre-determined sequence until the last octet of the FCS  207  has been transmitted. This will be followed by a Terminate octet  223  which replaces the first idle character of the inter packet gap. 
         [0013]    Since the Ethernet frame may contain any integral number of octets (within certain pre-defined limits), the Terminate octet  223  may exist in any lane of the xMII interface. However, a rule exists that the Start octet shall occur in the first lane of the xMII interface. Therefore the required minimum 12 octets of IPG  208  may not be precisely achieved, since some idle octets may have to be inserted or deleted in order to present the next Start octet on the first lane of the xMII interface. Since a rule states that only an average of 12 octets minimum must be achieved, a Deficit Idle Counter (DIC)  211  is used to keep track of the idle octets inserted or deleted. Information from the DIC controls the readout schedule from the buffer  209 . Thus the xMII data rate will be the same as the MAC data rate on average. The DIC  211  is adjusted depending on which lane the start character has been shifted to and the terminate location. 
         [0014]    It is noted that in some prior art embodiments, the xMII interface is not a physical interface, but exists logically within an integrated circuit. 
         [0015]    Continuing with  FIG. 2 , the transmit PCS  215  functions to arrange the m xMII data lanes  213  for transmission over a physical interface  221  consisting of n lanes. The main functions include encoding, scrambling, lane distribution  219 , and alignment code insertion  220 . Since the insertion of alignment codes  218  results in extra bandwidth, a rate adapting FIFO  217  is required to periodically add or delete idle characters. Furthermore, since the MAC processing clock  202  and PCS processing clock  216  may be different, the rate adapting FIFO  217  also serves to add or delete idle characters in order to maintain uninterrupted data flow to the physical medium, where data includes the Ethernet frame and idle characters. It is noted that idle characters are required to be deleted or inserted by the PCS in groups of 8 (one block). This ensures that the Start character for an Ethernet frame will remain at the start of a PCS lane. 
         [0016]    The transmitted Ethernet frame  222  including all control characters and the IPG  223  (all of which were formatted by the PCS) are striped across the n lanes of the physical medium  221  in a predefined sequence which is known to those skilled in the art. The value of n is typically 1, 4, or 10 depending on the type of physical interface. 
       SUMMARY OF THE INVENTION 
       [0017]    According to the present invention there is provided a packet network interface apparatus, comprising a media access control (MAC) module for constructing a packet for transmission over a packet network; a physical coding sublayer (PCS) module for encoding the packet for transmission over a physical interface; and an inter packet gap module between the MAC module and the PCS module for directly transferring data to the PCS module while maintaining a certain inter packet gap by deleting or inserting idle characters, said inter packet gap module comprising at least one memory module for temporary storage of packet data. 
         [0018]    Embodiments of the present invention are an improvement over the prior art in the following respects. All processing may be performed within a single clock domain. This allows for the elimination of the rate adapting FIFO resulting in a smaller circuit. Second, the xMII interface is avoided as a physical interface and exists only logically. This allows processing steps to be avoided with a corresponding reduction in circuitry. Third, the MAC and PCS functions may be integrated in a new way such that overall circuitry is reduced. 
         [0019]    The intermediate interface between the MAC and PCS can be greatly simplified when both are implemented on a single common integrated circuit. 
         [0020]    According to another aspect of the invention there is provided method of establishing connection between a client and a physical interface in a packet network, comprising constructing a packet for transmission over a packet network in a media access control (MAC) module; encoding the packet for transmission over a physical interface in a physical coding sublayer (PCS) module; and directly transferring data to the PCS module under the control of an inter packet gap module that buffers the data in blocks sized for processing by the PCS and maintains a certain inter packet gap by deleting or inserting idle characters; and wherein the modules operate in a common time domain. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0021]    The invention will now be described in more detail, by way of example only, with reference to the accompanying drawings, in which: 
           [0022]      FIG. 1  illustrates the interfaces to the MAC and PCS circuits including the required Ethernet frame structure on the line; 
           [0023]      FIG. 2  illustrates a prior art circuit for the MAC and PCS including an intermediate xMII interface; and 
           [0024]      FIG. 3  illustrates an efficient circuit for a MAC and PCS interface in accordance with one embodiment of the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0025]    In this disclosure, the terms byte, octet, and character may be considered equivalent; the term block refers to a group of 8 bytes (64 bits) before the PCS and encoded into 66 bits after the PCS; IPG (Inter Packet Gap) and IFG (Inter Frame Gap) may be considered equivalent; packet and frame may be considered equivalent; the IPG includes idle characters; Gb/s means gigabits per second. The term circuit is used in a general sense to include both hardware and software implementations. 
         [0026]    The exemplary embodiment is described using specific values for certain parameters, such as the size of a block and the size of an IPG. It is to be understood that these values are meant to illustrate and do not limit the scope of the invention to other parameter values, which may be changed from time to time according to future revisions of the IEEE 802.3 specification. 
         [0027]    Referring to  FIG. 3 , the interface circuit receives Ethernet data  300  from a MAC client. The interface to said MAC client is a bus  304  of width w, which may be considered logically the same as in the prior art for better understanding of its compatibility with the present invention. The width w is specific to a particular system implementation and may include additional control information as required, for example, for maintenance and identifying the Ethernet data bytes as well as Ethernet data. The frame generation circuit  305  functions to format the Ethernet frame by prepending a header  306 , which includes the preamble and start of frame delimiter of  FIG. 1 , appending an FCS  307 , and maintaining an IPG  308  between frames. The frame generation logic  305  constructs the Ethernet frame according to the IEEE 802.3 Ethernet standard in a manner known to persons skilled in the art. 
         [0028]    The interface circuit contains a novel Gapping Logic  310 . The gapping logic circuit  310  takes care of moving data through the MAC and PCS functions more efficiently than the prior art implementation that employs an RS. The parts of the gapping logic circuit will now be described. 
         [0029]    The Ethernet frame constructed by the MAC is temporarily stored in a buffer  309 . One of the functions of the buffer is to keep track of its fill level to ensure that all Ethernet data can be processed. This is necessary because the common processing clock  302  for all circuits of is not required to be the same as that of the MAC client  341 , which may have an undefined bandwidth. Therefore the buffer  309  , which may comprise at least one memory unit, generates a backpressure signal  340  to indicate to the MAC client to temporarily cease sending data to the MAC in the event that said buffer approaches its maximum capacity. 
         [0030]    In the event that the MAC client is unable to provide Ethernet frame data in a timely manner, resulting in an underflow condition of the buffer  309 , then the PCS  315  will be unable to complete the encoding of the frame in contiguous blocks. The IEEE 802.3 specification requires that this event will cause the PCS to generate error blocks in order that the corresponding receiver will recognize the underflow condition and respond accordingly. When there is a long interval between complete Ethernet fames, possibly causing a buffer underflow, there is no error condition. The transmitter simply begins idle character insertion which may continue indefinitely since there is no maximum specified inter packet gap. 
         [0031]    The gapping logic, also referred to as the inter packet gap module,  310  functions to read data from the buffer  309  (removing it from temporary storage) according to a schedule which ensures that the beginning of an Ethernet frame occurs at the start of a block of data. A block of data consists of 64 bits at this point in the logic. At the same time, the first character of the Ethernet frame (the first octet of the preamble) is replaced with a Start character  312 . Under normal conditions (no overflow or underflow), the gapping logic continues to read Ethernet frame data from the buffer continuously until the last character of the appended FCS  307  has been reached. At this point a Terminate character  323  is inserted. The terminate character is followed by the idle characters of the IPG  308  until the next Ethernet frame. Data is read from the buffer in blocks (64 bits) at one time for transfer to the PCS  315  for encoding. The buffer  309  ensures that the start character is placed at the start of a block of data that is read out for the PCS. In some embodiments, data is read from the buffer in an integral number of blocks at one time for transfer to the PCS. 
         [0032]    The payload of an Ethernet frame may contain any integral number of bytes within certain predefined limits, and therefore the terminate character  323  may occur anywhere within a block. The terminate character is followed by idle characters. However, there is a requirement in the IEEE 802.3 specification that the IPG shall consist of at least 12 bytes on average. The gapping logic functions to ensure that the minimum 12-byte IPG requirement is met by inserting idle characters if needed to maintain the requirement or deleting them if possible to maximize bandwidth utilization. This is accomplished by also meeting the requirement of starting an Ethernet frame at the beginning of a block. Since the requirement is for an average minimum of 12 bytes for the IPG rather than a constant number of bytes, a counter is used to keep track of the number of idle characters comprising the IPG which have deviated from the average minimum of  12 . This is the DIC (Deficit Idle Counter)  311 . Another counter used for idle character insertion decisions is the SIC (Surplus Idle Counter)  311  whose function will be described later. 
         [0033]    The logic for the DIC value uses information, such as the presence of start and terminate characters and the presence of an FCS, to determine the number of idle characters that need to be inserted. When idle characters  342  are inserted, the value of the DIC  311  is also adjusted accordingly. The IPG size between Ethernet frames is therefore maintained at the required average value of 12 bytes minimum without loss of channel capacity. At the same time, the gapping logic ensures that the start of an Ethernet frame always occurs at the beginning of a block of data. 
         [0034]    Since the gapping logic has read data from the buffer  309  in accordance with the block format required for the PCS, no further logic is needed to transfer blocks. This is in contrast to the prior art which requires at least an xMII logical interface circuit and rate adapting FIFO. The Ethernet frame data read from the buffer  309  in blocks may be directly processed by the PCS  315 . 
         [0035]    The PCS  315  is able to recognize the beginning of an Ethernet frame by means of the start character  312  which was inserted by the gapping logic  310 . Beginning with the start character, the blocks of Ethernet frame data are processed by the PCS by the encoding and scrambling circuits  319  and distributed among the n lanes  321  of the Ethernet physical media adapter. Encoding is performed on a block basis whereby each 64-bit block is encoded into a 66-bit block. The encoding and scrambling functions and the means to perform these functions are well known to those skilled in the art. The PCS continually process blocks in this manner, including blocks which contain idle characters. The gapping logic  310  has ensured that each block conforms to the required delineation required by the IEEE 802.3 specification and the required number of idle characters. 
         [0036]    The distribution of formatted blocks across n lanes  321  is performed in accordance with the requirements of the applicable Ethernet physical layer technology. For example, 40GBASE-SR4 Ethernet over fiber optics employs  4  lanes operating at an aggregate data rate of 41.25 Gb/s. It is noted that at the egress of the PCS, each lane may be transferred to the physical layer adapter by means of a parallel bus. 
         [0037]    The PCS  315  also functions to insert periodic alignment blocks  318 . The alignment code insertion circuit  320  functions to insert alignment blocks at a period specified in the IEEE 802.3 standard, for example after every 16,383 blocks of data. The alignment blocks may be inserted at any position within the Ethernet frame  322  or IPG  323 . In the event that an alignment block has been inserted, a corresponding number of idle characters must be removed. The alignment code insertion logic  320  therefore signals the SIC (Surplus Idle Counter)  311  that an alignment block has been inserted. The gapping logic  310  responds to the signal by ensuring that a number of idle characters corresponding to the length of the alignment block are not inserted for each occurrence of an alignment block. The result is that the egress bandwidth of the PCS is held to a constant value even though an alignment block was added to the Ethernet data. 
         [0038]    Embodiments of the present invention therefore accomplish a rate adaptation and compensation for alignment block insertion by the same gapping logic circuit which also functions to generate blocks of data for the PCS. This results in a significant circuit reduction. 
         [0039]    Embodiments of the present invention function with better circuit utilization efficiency than the prior art. It is noted that the functionality between the MAC client  341  and physical interface  321  may be entirely compliant to the IEEE 802.3 Ethernet specification, and the interfaces of the invention are compatible with those of the prior art. 
         [0040]    Persons skilled in the art may conceive of additional embodiments that contain variations and modifications of the preferred embodiment. Accordingly, any embodiment which falls within the scope of the claims set forth below is to be regarded as part of the invention described herein.